surprise
2023-12-29 18377dc5d61caf3a6a0835e17015ac2601f8709d
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
(()=>{var xt=function(O){var D={};function o(_){if(D[_])return D[_].exports;var e=D[_]={i:_,l:!1,exports:{}};return O[_].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=O,o.c=D,o.d=function(_,e,b){o.o(_,e)||Object.defineProperty(_,e,{enumerable:!0,get:b})},o.r=function(_){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})},o.t=function(_,e){if(1&e&&(_=o(_)),8&e||4&e&&typeof _=="object"&&_&&_.__esModule)return _;var b=Object.create(null);if(o.r(b),Object.defineProperty(b,"default",{enumerable:!0,value:_}),2&e&&typeof _!="string")for(var g in _)o.d(b,g,function(f){return _[f]}.bind(null,g));return b},o.n=function(_){var e=_&&_.__esModule?function(){return _.default}:function(){return _};return o.d(e,"a",e),e},o.o=function(_,e){return Object.prototype.hasOwnProperty.call(_,e)},o.p="",o(o.s=131)}([function(O,D,o){function _(u,i){return function(a){if(Array.isArray(a))return a}(u)||function(a,n){var t=[],r=!0,l=!1,d=void 0;try{for(var h,m=a[Symbol.iterator]();!(r=(h=m.next()).done)&&(t.push(h.value),!n||t.length!==n);r=!0);}catch(S){l=!0,d=S}finally{try{r||m.return==null||m.return()}finally{if(l)throw d}}return t}(u,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function e(u){return(e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(u)}var b=o(73),g=o(35);o(3),D.easeCubicInOut=function(u){if(u<=0)return 0;if(u>=1)return 1;var i=u*u,a=i*u;return 4*(u<.5?a:3*(u-i)+a-.75)},D.bezier=function(u,i,a,n){var t=new b(u,i,a,n);return function(r){return t.solve(r)}},D.ease=D.bezier(.25,.1,.25,1),D.clamp=function(u,i,a){return Math.min(a,Math.max(i,u))},D.wrap=function(u,i,a){var n=a-i,t=((u-i)%n+n)%n+i;return t===i?a:t},D.asyncAll=function(u,i,a){if(!u.length)return a(null,[]);var n=u.length,t=new Array(u.length),r=null;u.forEach(function(l,d){i(l,function(h,m){h&&(r=h),t[d]=m,--n==0&&a(r,t)})})},D.values=function(u){var i=[];for(var a in u)i.push(u[a]);return i},D.keysDifference=function(u,i){var a=[];for(var n in u)n in i||a.push(n);return a},D.extend=function(u){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];for(var t=0,r=a;t<r.length;t++){var l=r[t];for(var d in l)u[d]=l[d]}return u},D.pick=function(u,i){for(var a={},n=0;n<i.length;n++){var t=i[n];t in u&&(a[t]=u[t])}return a};var f=1;D.uniqueId=function(){return f++},D.bindAll=function(u,i){u.forEach(function(a){i[a]&&(i[a]=i[a].bind(i))})},D.getCoordinatesCenter=function(u){for(var i=1/0,a=1/0,n=-1/0,t=-1/0,r=0;r<u.length;r++)i=Math.min(i,u[r].column),a=Math.min(a,u[r].row),n=Math.max(n,u[r].column),t=Math.max(t,u[r].row);var l=n-i,d=t-a,h=Math.max(l,d),m=Math.max(0,Math.floor(-Math.log(h)/Math.LN2));return new g((i+n)/2,(a+t)/2,0).zoomTo(m)},D.endsWith=function(u,i){return u.indexOf(i,u.length-i.length)!==-1},D.mapObject=function(u,i,a){var n={};for(var t in u)n[t]=i.call(a||this,u[t],t,u);return n},D.filterObject=function(u,i,a){var n={};for(var t in u)i.call(a||this,u[t],t,u)&&(n[t]=u[t]);return n},D.deepEqual=o(74),D.clone=function(u){return Array.isArray(u)?u.map(D.clone):e(u)==="object"&&u?D.mapObject(u,D.clone):u},D.arraysIntersect=function(u,i){for(var a=0;a<u.length;a++)if(i.indexOf(u[a])>=0)return!0;return!1};var c={};D.warnOnce=function(u){c[u]||(typeof console<"u"&&console.warn(u),c[u]=!0)},D.isCounterClockwise=function(u,i,a){return(a.y-u.y)*(i.x-u.x)>(i.y-u.y)*(a.x-u.x)},D.calculateSignedArea=function(u){for(var i,a,n=0,t=0,r=u.length,l=r-1;t<r;l=t++)i=u[t],n+=((a=u[l]).x-i.x)*(i.y+a.y);return n},D.isClosedPolygon=function(u){if(u.length<4)return!1;var i=u[0],a=u[u.length-1];return!(Math.abs(i.x-a.x)>0||Math.abs(i.y-a.y)>0)&&Math.abs(D.calculateSignedArea(u))>.01},D.sphericalToCartesian=function(u){var i=_(u,3),a=i[0],n=i[1],t=i[2];return n+=90,n*=Math.PI/180,t*=Math.PI/180,{x:a*Math.cos(n)*Math.sin(t),y:a*Math.sin(n)*Math.sin(t),z:a*Math.cos(t)}},D.parseCacheControl=function(u){var i={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(n,t,r,l){var d=r||l;return i[t]=!d||d.toLowerCase(),""}),i["max-age"]){var a=parseInt(i["max-age"],10);isNaN(a)?delete i["max-age"]:i["max-age"]=a}return i}},function(O,D,o){"use strict";(function(_){var e=o(135);/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */function b(k,v){if(k===v)return 0;for(var x=k.length,T=v.length,E=0,C=Math.min(x,T);E<C;++E)if(k[E]!==v[E]){x=k[E],T=v[E];break}return x<T?-1:T<x?1:0}function g(k){return _.Buffer&&typeof _.Buffer.isBuffer=="function"?_.Buffer.isBuffer(k):!(k==null||!k._isBuffer)}var f=o(136),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,i=function(){}.name==="foo";function a(k){return Object.prototype.toString.call(k)}function n(k){return!g(k)&&typeof _.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(k):!!k&&(k instanceof DataView||!!(k.buffer&&k.buffer instanceof ArrayBuffer)))}var t=O.exports=S,r=/\s*function\s+([^\(\s]*)\s*/;function l(k){if(f.isFunction(k)){if(i)return k.name;var v=k.toString().match(r);return v&&v[1]}}function d(k,v){return typeof k=="string"?k.length<v?k:k.slice(0,v):k}function h(k){if(i||!f.isFunction(k))return f.inspect(k);var v=l(k);return"[Function"+(v?": "+v:"")+"]"}function m(k,v,x,T,E){throw new t.AssertionError({message:x,actual:k,expected:v,operator:T,stackStartFunction:E})}function S(k,v){k||m(k,!0,v,"==",t.ok)}function y(k,v,x,T){if(k===v)return!0;if(g(k)&&g(v))return b(k,v)===0;if(f.isDate(k)&&f.isDate(v))return k.getTime()===v.getTime();if(f.isRegExp(k)&&f.isRegExp(v))return k.source===v.source&&k.global===v.global&&k.multiline===v.multiline&&k.lastIndex===v.lastIndex&&k.ignoreCase===v.ignoreCase;if(k!==null&&typeof k=="object"||v!==null&&typeof v=="object"){if(n(k)&&n(v)&&a(k)===a(v)&&!(k instanceof Float32Array||k instanceof Float64Array))return b(new Uint8Array(k.buffer),new Uint8Array(v.buffer))===0;if(g(k)!==g(v))return!1;var E=(T=T||{actual:[],expected:[]}).actual.indexOf(k);return E!==-1&&E===T.expected.indexOf(v)||(T.actual.push(k),T.expected.push(v),function(C,z,P,B){if(C==null||z==null)return!1;if(f.isPrimitive(C)||f.isPrimitive(z))return C===z;if(P&&Object.getPrototypeOf(C)!==Object.getPrototypeOf(z))return!1;var F=s(C),Z=s(z);if(F&&!Z||!F&&Z)return!1;if(F)return C=u.call(C),z=u.call(z),y(C,z,P);var W,J,X=A(C),R=A(z);if(X.length!==R.length)return!1;for(X.sort(),R.sort(),J=X.length-1;J>=0;J--)if(X[J]!==R[J])return!1;for(J=X.length-1;J>=0;J--)if(W=X[J],!y(C[W],z[W],P,B))return!1;return!0}(k,v,x,T))}return x?k===v:k==v}function s(k){return Object.prototype.toString.call(k)=="[object Arguments]"}function p(k,v){if(!k||!v)return!1;if(Object.prototype.toString.call(v)=="[object RegExp]")return v.test(k);try{if(k instanceof v)return!0}catch{}return!Error.isPrototypeOf(v)&&v.call({},k)===!0}function w(k,v,x,T){var E;if(typeof v!="function")throw new TypeError('"block" argument must be a function');typeof x=="string"&&(T=x,x=null),E=function(P){var B;try{P()}catch(F){B=F}return B}(v),T=(x&&x.name?" ("+x.name+").":".")+(T?" "+T:"."),k&&!E&&m(E,x,"Missing expected exception"+T);var C=typeof T=="string",z=!k&&E&&!x;if((!k&&f.isError(E)&&C&&p(E,x)||z)&&m(E,x,"Got unwanted exception"+T),k&&E&&x&&!p(E,x)||!k&&E)throw E}t.AssertionError=function(k){this.name="AssertionError",this.actual=k.actual,this.expected=k.expected,this.operator=k.operator,k.message?(this.message=k.message,this.generatedMessage=!1):(this.message=function(P){return d(h(P.actual),128)+" "+P.operator+" "+d(h(P.expected),128)}(this),this.generatedMessage=!0);var v=k.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,v);else{var x=new Error;if(x.stack){var T=x.stack,E=l(v),C=T.indexOf(`
`+E);if(C>=0){var z=T.indexOf(`
`,C+1);T=T.substring(z+1)}this.stack=T}}},f.inherits(t.AssertionError,Error),t.fail=m,t.ok=S,t.equal=function(k,v,x){k!=v&&m(k,v,x,"==",t.equal)},t.notEqual=function(k,v,x){k==v&&m(k,v,x,"!=",t.notEqual)},t.deepEqual=function(k,v,x){y(k,v,!1)||m(k,v,x,"deepEqual",t.deepEqual)},t.deepStrictEqual=function(k,v,x){y(k,v,!0)||m(k,v,x,"deepStrictEqual",t.deepStrictEqual)},t.notDeepEqual=function(k,v,x){y(k,v,!1)&&m(k,v,x,"notDeepEqual",t.notDeepEqual)},t.notDeepStrictEqual=function k(v,x,T){y(v,x,!0)&&m(v,x,T,"notDeepStrictEqual",k)},t.strictEqual=function(k,v,x){k!==v&&m(k,v,x,"===",t.strictEqual)},t.notStrictEqual=function(k,v,x){k===v&&m(k,v,x,"!==",t.notStrictEqual)},t.throws=function(k,v,x){w(!0,k,v,x)},t.doesNotThrow=function(k,v,x){w(!1,k,v,x)},t.ifError=function(k){if(k)throw k},t.strict=e(function k(v,x){v||m(v,!0,x,"==",k)},t,{equal:t.strictEqual,deepEqual:t.deepStrictEqual,notEqual:t.notStrictEqual,notDeepEqual:t.notDeepStrictEqual}),t.strict.strict=t.strict;var A=Object.keys||function(k){var v=[];for(var x in k)c.call(k,x)&&v.push(x);return v}}).call(this,o(134))},function(O,D,o){var _=o(5),e=_.performance&&_.performance.now?_.performance.now.bind(_.performance):Date.now.bind(Date),b=_.requestAnimationFrame||_.mozRequestAnimationFrame||_.webkitRequestAnimationFrame||_.msRequestAnimationFrame,g=_.cancelAnimationFrame||_.mozCancelAnimationFrame||_.webkitCancelAnimationFrame||_.msCancelAnimationFrame;O.exports={now:e,frame:function(c){return b(c)},cancelFrame:function(c){return g(c)},getImageData:function(c){var u=_.document.createElement("canvas"),i=u.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return u.width=c.width,u.height=c.height,i.drawImage(c,0,0,c.width,c.height),i.getImageData(0,0,c.width,c.height)},hardwareConcurrency:_.navigator.hardwareConcurrency||4,get devicePixelRatio(){return _.devicePixelRatio},supportsWebp:!1};var f=_.document.createElement("img");f.onload=function(){O.exports.supportsWebp=!0},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="},function(O,D,o){"use strict";function _(e,b){this.x=e,this.y=b}O.exports=_,_.prototype={clone:function(){return new _(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,b){return this.clone()._rotateAround(e,b)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var b=e.x-this.x,g=e.y-this.y;return b*b+g*g},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,b){return Math.atan2(this.x*b-this.y*e,this.x*e+this.y*b)},_matMult:function(e){var b=e[0]*this.x+e[1]*this.y,g=e[2]*this.x+e[3]*this.y;return this.x=b,this.y=g,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var b=Math.cos(e),g=Math.sin(e),f=b*this.x-g*this.y,c=g*this.x+b*this.y;return this.x=f,this.y=c,this},_rotateAround:function(e,b){var g=Math.cos(e),f=Math.sin(e),c=b.x+g*(this.x-b.x)-f*(this.y-b.y),u=b.y+f*(this.x-b.x)+g*(this.y-b.y);return this.x=c,this.y=u,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_.convert=function(e){return e instanceof _?e:Array.isArray(e)?new _(e[0],e[1]):e}},function(O,D,o){function _(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function e(v,x){for(var T=0;T<x.length;T++){var E=x[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(v,E.key,E)}}function b(v,x,T){return x&&e(v.prototype,x),T&&e(v,T),v}var g=o(1),f=o(0),c=f.clone,u=f.extend,i=f.easeCubicInOut,a=o(26),n=o(30).normalizePropertyExpression,t=(o(12),o(11).register),r=function(){function v(x,T){_(this,v),this.property=x,this.value=T,this.expression=n(T===void 0?x.specification.default:T,x.specification)}return b(v,[{key:"isDataDriven",value:function(){return this.expression.kind==="source"||this.expression.kind==="composite"}},{key:"possiblyEvaluate",value:function(x){return this.property.possiblyEvaluate(this,x)}}]),v}(),l=function(){function v(x){_(this,v),this.property=x,this.value=new r(x,void 0)}return b(v,[{key:"transitioned",value:function(x,T){return new h(this.property,this.value,T,u({},x.transition,this.transition),x.now)}},{key:"untransitioned",value:function(){return new h(this.property,this.value,null,{},0)}}]),v}(),d=function(){function v(x){_(this,v),this._properties=x,this._values=Object.create(x.defaultTransitionablePropertyValues)}return b(v,[{key:"getValue",value:function(x){return c(this._values[x].value.value)}},{key:"setValue",value:function(x,T){this._values.hasOwnProperty(x)||(this._values[x]=new l(this._values[x].property)),this._values[x].value=new r(this._values[x].property,T===null?void 0:c(T))}},{key:"getTransition",value:function(x){return c(this._values[x].transition)}},{key:"setTransition",value:function(x,T){this._values.hasOwnProperty(x)||(this._values[x]=new l(this._values[x].property)),this._values[x].transition=c(T)||void 0}},{key:"serialize",value:function(){for(var x={},T=0,E=Object.keys(this._values);T<E.length;T++){var C=E[T],z=this.getValue(C);z!==void 0&&(x[C]=z);var P=this.getTransition(C);P!==void 0&&(x["".concat(C,"-transition")]=P)}return x}},{key:"transitioned",value:function(x,T){for(var E=new m(this._properties),C=0,z=Object.keys(this._values);C<z.length;C++){var P=z[C];E._values[P]=this._values[P].transitioned(x,T._values[P])}return E}},{key:"untransitioned",value:function(){for(var x=new m(this._properties),T=0,E=Object.keys(this._values);T<E.length;T++){var C=E[T];x._values[C]=this._values[C].untransitioned()}return x}}]),v}(),h=function(){function v(x,T,E,C,z){_(this,v),this.property=x,this.value=T,this.begin=z+C.delay||0,this.end=this.begin+C.duration||0,x.specification.transition&&(C.delay||C.duration)&&(this.prior=E)}return b(v,[{key:"possiblyEvaluate",value:function(x){var T=x.now||0,E=this.value.possiblyEvaluate(x),C=this.prior;if(C){if(T>this.end)return this.prior=null,E;if(this.value.isDataDriven())return this.prior=null,E;if(T<this.begin)return C.possiblyEvaluate(x);var z=(T-this.begin)/(this.end-this.begin);return this.property.interpolate(C.possiblyEvaluate(x),E,i(z))}return E}}]),v}(),m=function(){function v(x){_(this,v),this._properties=x,this._values=Object.create(x.defaultTransitioningPropertyValues)}return b(v,[{key:"possiblyEvaluate",value:function(x){for(var T=new s(this._properties),E=0,C=Object.keys(this._values);E<C.length;E++){var z=C[E];T._values[z]=this._values[z].possiblyEvaluate(x)}return T}},{key:"hasTransition",value:function(){for(var x=0,T=Object.keys(this._values);x<T.length;x++){var E=T[x];if(this._values[E].prior)return!0}return!1}}]),v}(),S=function(){function v(x){_(this,v),this._properties=x,this._values=Object.create(x.defaultPropertyValues)}return b(v,[{key:"getValue",value:function(x){return c(this._values[x].value)}},{key:"setValue",value:function(x,T){this._values[x]=new r(this._values[x].property,T===null?void 0:c(T))}},{key:"serialize",value:function(){for(var x={},T=0,E=Object.keys(this._values);T<E.length;T++){var C=E[T],z=this.getValue(C);z!==void 0&&(x[C]=z)}return x}},{key:"possiblyEvaluate",value:function(x){for(var T=new s(this._properties),E=0,C=Object.keys(this._values);E<C.length;E++){var z=C[E];T._values[z]=this._values[z].possiblyEvaluate(x)}return T}}]),v}(),y=function(){function v(x,T,E){_(this,v),this.property=x,this.value=T,this.globals=E}return b(v,[{key:"isConstant",value:function(){return this.value.kind==="constant"}},{key:"constantOr",value:function(x){return this.value.kind==="constant"?this.value.value:x}},{key:"evaluate",value:function(x){return this.property.evaluate(this.value,this.globals,x)}}]),v}(),s=function(){function v(x){_(this,v),this._properties=x,this._values=Object.create(x.defaultPossiblyEvaluatedValues)}return b(v,[{key:"get",value:function(x){return this._values[x]}}]),v}(),p=function(){function v(x){_(this,v),this.specification=x}return b(v,[{key:"possiblyEvaluate",value:function(x,T){return g(!x.isDataDriven()),x.expression.evaluate(T)}},{key:"interpolate",value:function(x,T,E){var C=a[this.specification.type];return C?C(x,T,E):x}}]),v}(),w=function(){function v(x){_(this,v),this.specification=x}return b(v,[{key:"possiblyEvaluate",value:function(x,T){return x.expression.kind==="constant"||x.expression.kind==="camera"?new y(this,{kind:"constant",value:x.expression.evaluate(T)},T):new y(this,x.expression,T)}},{key:"interpolate",value:function(x,T,E){if(x.value.kind!=="constant"||T.value.kind!=="constant")return x;if(x.value.value!==void 0&&T.value.value!==void 0){var C=a[this.specification.type];return C?new y(this,{kind:"constant",value:C(x.value.value,T.value.value,E)},x.globals):x}}},{key:"evaluate",value:function(x,T,E){return x.kind==="constant"?x.value:x.evaluate(T,E)}}]),v}(),A=function(){function v(x){_(this,v),this.specification=x}return b(v,[{key:"possiblyEvaluate",value:function(x,T){if(x.value!==void 0){if(x.expression.kind==="constant"){var E=x.expression.evaluate(T);return this._calculate(E,E,E,T)}return g(!x.isDataDriven()),this._calculate(x.expression.evaluate({zoom:T.zoom-1}),x.expression.evaluate({zoom:T.zoom}),x.expression.evaluate({zoom:T.zoom+1}),T)}}},{key:"_calculate",value:function(x,T,E,C){var z=C.zoom,P=z-Math.floor(z),B=C.crossFadingFactor();return z>C.zoomHistory.lastIntegerZoom?{from:x,to:T,fromScale:2,toScale:1,t:P+(1-P)*B}:{from:E,to:T,fromScale:.5,toScale:1,t:1-(1-B)*P}}},{key:"interpolate",value:function(x){return x}}]),v}(),k=function(){function v(x){_(this,v),this.specification=x}return b(v,[{key:"possiblyEvaluate",value:function(){}},{key:"interpolate",value:function(){}}]),v}();t("DataDrivenProperty",w),t("DataConstantProperty",p),t("CrossFadedProperty",A),t("HeatmapColorProperty",k),O.exports={PropertyValue:r,Transitionable:d,Transitioning:m,Layout:S,PossiblyEvaluatedPropertyValue:y,PossiblyEvaluated:s,DataConstantProperty:p,DataDrivenProperty:w,CrossFadedProperty:A,HeatmapColorProperty:k,Properties:function v(x){for(var T in _(this,v),this.properties=x,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},x){var E=x[T],C=this.defaultPropertyValues[T]=new r(E,void 0),z=this.defaultTransitionablePropertyValues[T]=new l(E);this.defaultTransitioningPropertyValues[T]=z.untransitioned(),this.defaultPossiblyEvaluatedValues[T]=C.possiblyEvaluate({})}}}},function(O,D){O.exports=self},function(O,D){O.exports=8192},function(O,D){O.exports=function(o,_,e){this.message=(o?"".concat(o,": "):"")+e,_!=null&&_.__line__&&(this.line=_.__line__)}},function(O,D){var o={kind:"null"},_={kind:"number"},e={kind:"string"},b={kind:"boolean"},g={kind:"color"},f={kind:"object"},c={kind:"value"};function u(n,t){return{kind:"array",itemType:n,N:t}}function i(n){if(n.kind==="array"){var t=i(n.itemType);return typeof n.N=="number"?"array<".concat(t,", ").concat(n.N,">"):n.itemType.kind==="value"?"array":"array<".concat(t,">")}return n.kind}var a=[o,_,e,b,g,f,u(c)];O.exports={NullType:o,NumberType:_,StringType:e,BooleanType:b,ColorType:g,ObjectType:f,ValueType:c,array:u,ErrorType:{kind:"error"},toString:i,checkSubtype:function n(t,r){if(r.kind==="error")return null;if(t.kind==="array"){if(r.kind==="array"&&!n(t.itemType,r.itemType)&&(typeof t.N!="number"||t.N===r.N))return null}else{if(t.kind===r.kind)return null;if(t.kind==="value"){for(var l=0,d=a;l<d.length;l++)if(!n(d[l],r))return null}}return"Expected ".concat(i(t)," but found ").concat(i(r)," instead.")}}},function(O,D,o){var _=o(3),e=o(5);D.create=function(a,n,t){var r=e.document.createElement(a);return n&&(r.className=n),t&&t.appendChild(r),r},D.createNS=function(a,n){return e.document.createElementNS(a,n)};var b=e.document.documentElement.style;function g(a){for(var n=0;n<a.length;n++)if(a[n]in b)return a[n];return a[0]}var f,c=g(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);D.disableDrag=function(){c&&(f=b[c],b[c]="none")},D.enableDrag=function(){c&&(b[c]=f)};var u=g(["transform","WebkitTransform"]);D.setTransform=function(a,n){a.style[u]=n};var i=function a(n){n.preventDefault(),n.stopPropagation(),e.removeEventListener("click",a,!0)};D.suppressClick=function(){e.addEventListener("click",i,!0),e.setTimeout(function(){e.removeEventListener("click",i,!0)},0)},D.mousePos=function(a,n){var t=a.getBoundingClientRect();return n=n.touches?n.touches[0]:n,new _(n.clientX-t.left-a.clientLeft,n.clientY-t.top-a.clientTop)},D.touchPos=function(a,n){for(var t=a.getBoundingClientRect(),r=[],l=n.type==="touchend"?n.changedTouches:n.touches,d=0;d<l.length;d++)r.push(new _(l[d].clientX-t.left-a.clientLeft,l[d].clientY-t.top-a.clientTop));return r},D.remove=function(a){a.parentNode&&a.parentNode.removeChild(a)}},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(0);function b(c,u,i){i[c]=i[c]||[],i[c].push(u)}function g(c,u,i){if(i&&i[c]){var a=i[c].indexOf(u);a!==-1&&i[c].splice(a,1)}}var f=function(){function c(){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,c)}var u,i,a;return u=c,(i=[{key:"on",value:function(n,t){return this._listeners=this._listeners||{},b(n,t,this._listeners),this}},{key:"off",value:function(n,t){return g(n,t,this._listeners),g(n,t,this._oneTimeListeners),this}},{key:"once",value:function(n,t){return this._oneTimeListeners=this._oneTimeListeners||{},b(n,t,this._oneTimeListeners),this}},{key:"fire",value:function(n,t){if(this.listens(n)){t=e.extend({},t,{type:n,target:this});var r=this._listeners&&this._listeners[n]?this._listeners[n].slice():[],l=!0,d=!1,h=void 0;try{for(var m,S=r[Symbol.iterator]();!(l=(m=S.next()).done);l=!0)m.value.call(this,t)}catch(x){d=!0,h=x}finally{try{l||S.return==null||S.return()}finally{if(d)throw h}}var y=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[],s=!0,p=!1,w=void 0;try{for(var A,k=y[Symbol.iterator]();!(s=(A=k.next()).done);s=!0){var v=A.value;g(n,v,this._oneTimeListeners),v.call(this,t)}}catch(x){p=!0,w=x}finally{try{s||k.return==null||k.return()}finally{if(p)throw w}}this._eventedParent&&this._eventedParent.fire(n,e.extend({},t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData))}else e.endsWith(n,"error")&&console.error(t&&t.error||t||"Empty error event");return this}},{key:"listens",value:function(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)}},{key:"setEventedParent",value:function(n,t){return this._eventedParent=n,this._eventedParentData=t,this}}])&&_(u.prototype,i),a&&_(u,a),c}();O.exports=f},function(O,D,o){function _(S){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(S)}var e=o(1),b=o(102),g=o(12),f=o(30),c=f.StylePropertyFunction,u=f.StyleExpression,i=f.StyleExpressionWithErrorHandling,a=f.ZoomDependentExpression,n=f.ZoomConstantExpression,t=o(42).CompoundExpression,r=o(90),l=o(5).ImageData,d={};function h(S,y){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e(!d[S],"".concat(S," is already registered.")),Object.defineProperty(y,"_classRegistryKey",{value:S,writeable:!1}),d[S]={klass:y,omit:s.omit||[],shallow:s.shallow||[]}}for(var m in h("Object",Object),b.serialize=function(S,y){var s=S.toArrayBuffer();return y&&y.push(s),s},b.deserialize=function(S){return new b(S)},h("Grid",b),h("Color",g),h("StylePropertyFunction",c),h("StyleExpression",u,{omit:["_evaluator"]}),h("StyleExpressionWithErrorHandling",i,{omit:["_evaluator"]}),h("ZoomDependentExpression",a),h("ZoomConstantExpression",n),h("CompoundExpression",t,{omit:["_evaluate"]}),r)r[m]._classRegistryKey||h("Expression_".concat(m),r[m]);O.exports={register:h,serialize:function S(y,s){if(y==null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||y instanceof Boolean||y instanceof Number||y instanceof String||y instanceof Date||y instanceof RegExp)return y;if(y instanceof ArrayBuffer)return s&&s.push(y),y;if(ArrayBuffer.isView(y)){var p=y;return s&&s.push(p.buffer),p}if(y instanceof l)return s&&s.push(y.data.buffer),y;if(Array.isArray(y)){var w=[],A=!0,k=!1,v=void 0;try{for(var x,T=y[Symbol.iterator]();!(A=(x=T.next()).done);A=!0){var E=x.value;w.push(S(E,s))}}catch(Z){k=!0,v=Z}finally{try{A||T.return==null||T.return()}finally{if(k)throw v}}return w}if(_(y)==="object"){var C=y.constructor,z=C._classRegistryKey;if(!z)throw new Error("can't serialize object of unregistered class");e(d[z]);var P={};if(C.serialize)P._serialized=C.serialize(y,s);else for(var B in y)if(y.hasOwnProperty(B)&&!(d[z].omit.indexOf(B)>=0)){var F=y[B];P[B]=d[z].shallow.indexOf(B)>=0?F:S(F,s)}return{name:z,properties:P}}throw new Error("can't serialize object of type ".concat(_(y)))},deserialize:function S(y){if(y==null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||y instanceof Boolean||y instanceof Number||y instanceof String||y instanceof Date||y instanceof RegExp||y instanceof ArrayBuffer||ArrayBuffer.isView(y)||y instanceof l)return y;if(Array.isArray(y))return y.map(function(E){return S(E)});if(_(y)==="object"){var s=y,p=s.name,w=s.properties;if(!p)throw new Error("can't deserialize object of anonymous class");var A=d[p].klass;if(!A)throw new Error("can't deserialize unregistered class ".concat(p));if(A.deserialize)return A.deserialize(w._serialized);for(var k=Object.create(A.prototype),v=0,x=Object.keys(w);v<x.length;v++){var T=x[v];k[T]=d[p].shallow.indexOf(T)>=0?w[T]:S(w[T])}return k}throw new Error("can't deserialize object of type ".concat(_(y)))}}},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(80).parseCSSColor,b=function(){function g(i,a,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,g),this.r=i,this.g=a,this.b=n,this.a=t}var f,c,u;return f=g,u=[{key:"parse",value:function(i){if(i){if(i instanceof g)return i;if(typeof i=="string"){var a=e(i);if(a)return new g(a[0]/255*a[3],a[1]/255*a[3],a[2]/255*a[3],a[3])}}}}],(c=[{key:"toString",value:function(){var i=this,a=[this.r,this.g,this.b].map(function(n){return Math.round(255*n/i.a)});return"rgba(".concat(a.concat(this.a).join(","),")")}}])&&_(f.prototype,c),u&&_(f,u),g}();b.black=new b(0,0,0,1),b.white=new b(1,1,1,1),b.transparent=new b(0,0,0,0),O.exports=b},function(O,D,o){O.exports=o(140)},function(O,D,o){function _(I){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(I)}function e(I,j){if(!(I instanceof j))throw new TypeError("Cannot call a class as a function")}function b(I,j){for(var M=0;M<j.length;M++){var N=j[M];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(I,N.key,N)}}function g(I,j,M){return j&&b(I.prototype,j),M&&b(I,M),I}function f(I,j){return!j||_(j)!=="object"&&typeof j!="function"?function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(I):j}function c(I){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(j){return j.__proto__||Object.getPrototypeOf(j)})(I)}function u(I,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(j&&j.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),j&&i(I,j)}function i(I,j){return(i=Object.setPrototypeOf||function(M,N){return M.__proto__=N,M})(I,j)}var a=o(1),n=o(23).StructArray,t=o(23).Struct,r=o(11).register,l=o(3),d=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N){var V=this.length;this.resize(V+1);var G=2*V;return this.int16[G+0]=M,this.int16[G+1]=N,V}}]),j}();d.prototype.bytesPerElement=4,r("StructArrayLayout2i4",d);var h=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G){var H=this.length;this.resize(H+1);var Y=4*H;return this.int16[Y+0]=M,this.int16[Y+1]=N,this.int16[Y+2]=V,this.int16[Y+3]=G,H}}]),j}();h.prototype.bytesPerElement=8,r("StructArrayLayout4i8",h);var m=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G,H,Y){var $=this.length;this.resize($+1);var Q=6*$;return this.int16[Q+0]=M,this.int16[Q+1]=N,this.int16[Q+2]=V,this.int16[Q+3]=G,this.int16[Q+4]=H,this.int16[Q+5]=Y,$}}]),j}();m.prototype.bytesPerElement=12,r("StructArrayLayout2i4i12",m);var S=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G,H,Y,$,Q){var tt=this.length;this.resize(tt+1);var et=6*tt,nt=12*tt;return this.int16[et+0]=M,this.int16[et+1]=N,this.int16[et+2]=V,this.int16[et+3]=G,this.uint8[nt+8]=H,this.uint8[nt+9]=Y,this.uint8[nt+10]=$,this.uint8[nt+11]=Q,tt}}]),j}();S.prototype.bytesPerElement=12,r("StructArrayLayout4i4ub12",S);var y=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G,H,Y,$,Q){var tt=this.length;this.resize(tt+1);var et=8*tt;return this.int16[et+0]=M,this.int16[et+1]=N,this.int16[et+2]=V,this.int16[et+3]=G,this.uint16[et+4]=H,this.uint16[et+5]=Y,this.uint16[et+6]=$,this.uint16[et+7]=Q,tt}}]),j}();y.prototype.bytesPerElement=16,r("StructArrayLayout4i4ui16",y);var s=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V){var G=this.length;this.resize(G+1);var H=3*G;return this.float32[H+0]=M,this.float32[H+1]=N,this.float32[H+2]=V,G}}]),j}();s.prototype.bytesPerElement=12,r("StructArrayLayout3f12",s);var p=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M){var N=this.length;this.resize(N+1);var V=1*N;return this.uint32[V+0]=M,N}}]),j}();p.prototype.bytesPerElement=4,r("StructArrayLayout1ul4",p);var w=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G,H,Y,$,Q,tt,et,nt){var ot=this.length;this.resize(ot+1);var it=12*ot,at=6*ot;return this.int16[it+0]=M,this.int16[it+1]=N,this.int16[it+2]=V,this.int16[it+3]=G,this.int16[it+4]=H,this.int16[it+5]=Y,this.uint32[at+3]=$,this.uint16[it+8]=Q,this.uint16[it+9]=tt,this.int16[it+10]=et,this.int16[it+11]=nt,ot}}]),j}();w.prototype.bytesPerElement=24,r("StructArrayLayout6i1ul2ui2i24",w);var A=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G,H,Y){var $=this.length;this.resize($+1);var Q=6*$;return this.int16[Q+0]=M,this.int16[Q+1]=N,this.int16[Q+2]=V,this.int16[Q+3]=G,this.int16[Q+4]=H,this.int16[Q+5]=Y,$}}]),j}();A.prototype.bytesPerElement=12,r("StructArrayLayout2i2i2i12",A);var k=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N){var V=this.length;this.resize(V+1);var G=4*V;return this.uint8[G+0]=M,this.uint8[G+1]=N,V}}]),j}();k.prototype.bytesPerElement=4,r("StructArrayLayout2ub4",k);var v=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G,H,Y,$,Q,tt,et,nt,ot,it,at){var st=this.length;this.resize(st+1);var rt=20*st,lt=10*st,ct=40*st;return this.int16[rt+0]=M,this.int16[rt+1]=N,this.uint16[rt+2]=V,this.uint16[rt+3]=G,this.uint32[lt+2]=H,this.uint32[lt+3]=Y,this.uint32[lt+4]=$,this.uint16[rt+10]=Q,this.uint16[rt+11]=tt,this.uint16[rt+12]=et,this.float32[lt+7]=nt,this.float32[lt+8]=ot,this.uint8[ct+36]=it,this.uint8[ct+37]=at,st}}]),j}();v.prototype.bytesPerElement=40,r("StructArrayLayout2i2ui3ul3ui2f2ub40",v);var x=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M){var N=this.length;this.resize(N+1);var V=1*N;return this.float32[V+0]=M,N}}]),j}();x.prototype.bytesPerElement=4,r("StructArrayLayout1f4",x);var T=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V){var G=this.length;this.resize(G+1);var H=3*G;return this.int16[H+0]=M,this.int16[H+1]=N,this.int16[H+2]=V,G}}]),j}();T.prototype.bytesPerElement=6,r("StructArrayLayout3i6",T);var E=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V){var G=this.length;this.resize(G+1);var H=2*G,Y=4*G;return this.uint32[H+0]=M,this.uint16[Y+2]=N,this.uint16[Y+3]=V,G}}]),j}();E.prototype.bytesPerElement=8,r("StructArrayLayout1ul2ui8",E);var C=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V){var G=this.length;this.resize(G+1);var H=3*G;return this.uint16[H+0]=M,this.uint16[H+1]=N,this.uint16[H+2]=V,G}}]),j}();C.prototype.bytesPerElement=6,r("StructArrayLayout3ui6",C);var z=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N){var V=this.length;this.resize(V+1);var G=2*V;return this.uint16[G+0]=M,this.uint16[G+1]=N,V}}]),j}();z.prototype.bytesPerElement=4,r("StructArrayLayout2ui4",z);var P=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N){var V=this.length;this.resize(V+1);var G=2*V;return this.float32[G+0]=M,this.float32[G+1]=N,V}}]),j}();P.prototype.bytesPerElement=8,r("StructArrayLayout2f8",P);var B=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,n),g(j,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(M,N,V,G){var H=this.length;this.resize(H+1);var Y=4*H;return this.float32[Y+0]=M,this.float32[Y+1]=N,this.float32[Y+2]=V,this.float32[Y+3]=G,H}}]),j}();B.prototype.bytesPerElement=16,r("StructArrayLayout4f16",B);var F=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,t),g(j,[{key:"anchorPointX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(M){this._structArray.int16[this._pos2+0]=M}},{key:"anchorPointY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(M){this._structArray.int16[this._pos2+1]=M}},{key:"x1",get:function(){return this._structArray.int16[this._pos2+2]},set:function(M){this._structArray.int16[this._pos2+2]=M}},{key:"y1",get:function(){return this._structArray.int16[this._pos2+3]},set:function(M){this._structArray.int16[this._pos2+3]=M}},{key:"x2",get:function(){return this._structArray.int16[this._pos2+4]},set:function(M){this._structArray.int16[this._pos2+4]=M}},{key:"y2",get:function(){return this._structArray.int16[this._pos2+5]},set:function(M){this._structArray.int16[this._pos2+5]=M}},{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(M){this._structArray.uint32[this._pos4+3]=M}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+8]},set:function(M){this._structArray.uint16[this._pos2+8]=M}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+9]},set:function(M){this._structArray.uint16[this._pos2+9]=M}},{key:"radius",get:function(){return this._structArray.int16[this._pos2+10]},set:function(M){this._structArray.int16[this._pos2+10]=M}},{key:"signedDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+11]},set:function(M){this._structArray.int16[this._pos2+11]=M}},{key:"anchorPoint",get:function(){return new l(this.anchorPointX,this.anchorPointY)}}]),j}();F.prototype.size=24;var Z=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,w),g(j,[{key:"get",value:function(M){return a(!this.isTransferred),new F(this,M)}}]),j}();r("CollisionBoxArray",Z);var W=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,t),g(j,[{key:"anchorX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(M){this._structArray.int16[this._pos2+0]=M}},{key:"anchorY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(M){this._structArray.int16[this._pos2+1]=M}},{key:"glyphStartIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(M){this._structArray.uint16[this._pos2+2]=M}},{key:"numGlyphs",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(M){this._structArray.uint16[this._pos2+3]=M}},{key:"vertexStartIndex",get:function(){return this._structArray.uint32[this._pos4+2]},set:function(M){this._structArray.uint32[this._pos4+2]=M}},{key:"lineStartIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(M){this._structArray.uint32[this._pos4+3]=M}},{key:"lineLength",get:function(){return this._structArray.uint32[this._pos4+4]},set:function(M){this._structArray.uint32[this._pos4+4]=M}},{key:"segment",get:function(){return this._structArray.uint16[this._pos2+10]},set:function(M){this._structArray.uint16[this._pos2+10]=M}},{key:"lowerSize",get:function(){return this._structArray.uint16[this._pos2+11]},set:function(M){this._structArray.uint16[this._pos2+11]=M}},{key:"upperSize",get:function(){return this._structArray.uint16[this._pos2+12]},set:function(M){this._structArray.uint16[this._pos2+12]=M}},{key:"lineOffsetX",get:function(){return this._structArray.float32[this._pos4+7]},set:function(M){this._structArray.float32[this._pos4+7]=M}},{key:"lineOffsetY",get:function(){return this._structArray.float32[this._pos4+8]},set:function(M){this._structArray.float32[this._pos4+8]=M}},{key:"writingMode",get:function(){return this._structArray.uint8[this._pos1+36]},set:function(M){this._structArray.uint8[this._pos1+36]=M}},{key:"hidden",get:function(){return this._structArray.uint8[this._pos1+37]},set:function(M){this._structArray.uint8[this._pos1+37]=M}}]),j}();W.prototype.size=40;var J=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,v),g(j,[{key:"get",value:function(M){return a(!this.isTransferred),new W(this,M)}}]),j}();r("PlacedSymbolArray",J);var X=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,t),g(j,[{key:"offsetX",get:function(){return this._structArray.float32[this._pos4+0]},set:function(M){this._structArray.float32[this._pos4+0]=M}}]),j}();X.prototype.size=4;var R=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,x),g(j,[{key:"getoffsetX",value:function(M){return this.float32[1*M+0]}},{key:"get",value:function(M){return a(!this.isTransferred),new X(this,M)}}]),j}();r("GlyphOffsetArray",R);var U=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,t),g(j,[{key:"x",get:function(){return this._structArray.int16[this._pos2+0]},set:function(M){this._structArray.int16[this._pos2+0]=M}},{key:"y",get:function(){return this._structArray.int16[this._pos2+1]},set:function(M){this._structArray.int16[this._pos2+1]=M}},{key:"tileUnitDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+2]},set:function(M){this._structArray.int16[this._pos2+2]=M}}]),j}();U.prototype.size=6;var K=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,T),g(j,[{key:"getx",value:function(M){return this.int16[3*M+0]}},{key:"gety",value:function(M){return this.int16[3*M+1]}},{key:"gettileUnitDistanceFromAnchor",value:function(M){return this.int16[3*M+2]}},{key:"get",value:function(M){return a(!this.isTransferred),new U(this,M)}}]),j}();r("SymbolLineVertexArray",K);var q=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,t),g(j,[{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+0]},set:function(M){this._structArray.uint32[this._pos4+0]=M}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(M){this._structArray.uint16[this._pos2+2]=M}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(M){this._structArray.uint16[this._pos2+3]=M}}]),j}();q.prototype.size=8;var L=function(I){function j(){return e(this,j),f(this,c(j).apply(this,arguments))}return u(j,E),g(j,[{key:"get",value:function(M){return a(!this.isTransferred),new q(this,M)}}]),j}();r("FeatureIndexArray",L),O.exports={StructArrayLayout2i4:d,StructArrayLayout4i8:h,StructArrayLayout2i4i12:m,StructArrayLayout4i4ub12:S,StructArrayLayout4i4ui16:y,StructArrayLayout3f12:s,StructArrayLayout1ul4:p,StructArrayLayout6i1ul2ui2i24:w,StructArrayLayout2i2i2i12:A,StructArrayLayout2ub4:k,StructArrayLayout2i2ui3ul3ui2f2ub40:v,StructArrayLayout1f4:x,StructArrayLayout3i6:T,StructArrayLayout1ul2ui8:E,StructArrayLayout3ui6:C,StructArrayLayout2ui4:z,StructArrayLayout2f8:P,StructArrayLayout4f16:B,PosArray:d,RasterBoundsArray:h,CircleLayoutArray:d,FillLayoutArray:d,FillExtrusionLayoutArray:m,HeatmapLayoutArray:d,LineLayoutArray:S,SymbolLayoutArray:y,SymbolDynamicLayoutArray:s,SymbolOpacityArray:p,CollisionBoxLayoutArray:A,CollisionCircleLayoutArray:A,CollisionVertexArray:k,TriangleIndexArray:C,LineIndexArray:z,CollisionBoxArray:Z,PlacedSymbolArray:J,GlyphOffsetArray:R,SymbolLineVertexArray:K,FeatureIndexArray:L}},function(O,D){var o=function _(e,b,g){(function(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")})(this,_),this.func=e,this.mask=b,this.range=g};o.ReadOnly=!1,o.ReadWrite=!0,o.disabled=new o(519,o.ReadOnly,[0,1]),O.exports=o},function(O,D,o){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function e(t,r){return!r||_(r)!=="object"&&typeof r!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(t):r}function b(t){var r=typeof Map=="function"?new Map:void 0;return(b=function(l){if(l===null||(d=l,Function.toString.call(d).indexOf("[native code]")===-1))return l;var d;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(l))return r.get(l);r.set(l,h)}function h(){return g(l,arguments,c(this).constructor)}return h.prototype=Object.create(l.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f(h,l)})(t)}function g(t,r,l){return(g=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(d,h,m){var S=[null];S.push.apply(S,h);var y=new(Function.bind.apply(d,S));return m&&f(y,m.prototype),y}).apply(null,arguments)}function f(t,r){return(f=Object.setPrototypeOf||function(l,d){return l.__proto__=d,l})(t,r)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var u=o(5),i={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};D.ResourceType=i,typeof Object.freeze=="function"&&Object.freeze(i);var a=function(t){function r(l,d){var h;return function(m,S){if(!(m instanceof S))throw new TypeError("Cannot call a class as a function")}(this,r),(h=e(this,c(r).call(this,l))).status=d,h}return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(d&&d.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),d&&f(l,d)}(r,b(Error)),r}();function n(t){var r=new u.XMLHttpRequest;for(var l in r.open("GET",t.url,!0),t.headers)r.setRequestHeader(l,t.headers[l]);return r.withCredentials=t.credentials==="include",r}D.getJSON=function(t,r){var l=n(t);return l.setRequestHeader("Accept","application/json"),l.onerror=function(){r(new Error(l.statusText))},l.onload=function(){if(l.status>=200&&l.status<300&&l.response){var d;try{d=JSON.parse(l.response)}catch(h){return r(h)}r(null,d)}else r(new a(l.statusText,l.status))},l.send(),l},D.getArrayBuffer=function(t,r){var l=n(t);return l.responseType="arraybuffer",l.onerror=function(){r(new Error(l.statusText))},l.onload=function(){var d=l.response;if(d.byteLength===0&&l.status===200)return r(new Error("http status 200 returned without content."));l.status>=200&&l.status<300&&l.response?r(null,{data:d,cacheControl:l.getResponseHeader("Cache-Control"),expires:l.getResponseHeader("Expires")}):r(new a(l.statusText,l.status))},l.send(),l},D.getImage=function(t,r){return D.getArrayBuffer(t,function(l,d){if(l)r(l);else if(d){var h=new u.Image,m=u.URL||u.webkitURL;h.onload=function(){r(null,h),m.revokeObjectURL(h.src)};var S=new u.Blob([new Uint8Array(d.data)],{type:"image/png"});h.cacheControl=d.cacheControl,h.expires=d.expires,h.src=d.data.byteLength?m.createObjectURL(S):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},D.getVideo=function(t,r){var l,d,h=u.document.createElement("video");h.onloadstart=function(){r(null,h)};for(var m=0;m<t.length;m++){var S=u.document.createElement("source");l=t[m],d=void 0,(d=u.document.createElement("a")).href=l,(d.protocol!==u.document.location.protocol||d.host!==u.document.location.host)&&(h.crossOrigin="Anonymous"),S.src=t[m],h.appendChild(S)}return h}},function(O,D){function o(_){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(_)}O.exports=function(_){return _ instanceof Number?"number":_ instanceof String?"string":_ instanceof Boolean?"boolean":Array.isArray(_)?"array":_===null?"null":o(_)}},function(O,D){var o=function _(e,b,g,f,c,u){(function(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")})(this,_),this.test=e,this.ref=b,this.mask=g,this.fail=f,this.depthFail=c,this.pass=u};o.disabled=new o({func:519,mask:0},0,0,7680,7680,7680),O.exports=o},function(O,D,o){function _(h){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(h)}function e(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function b(h,m){return!m||_(m)!=="object"&&typeof m!="function"?function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}(h):m}function g(h){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)})(h)}function f(h,m){return(f=Object.setPrototypeOf||function(S,y){return S.__proto__=y,S})(h,m)}var c=o(0),u=o(13),i=o(54),a=o(10),n=o(4),t=n.Layout,r=n.Transitionable,l=(n.Transitioning,n.Properties,function(h){function m(p,w){var A;for(var k in function(x,T){if(!(x instanceof T))throw new TypeError("Cannot call a class as a function")}(this,m),(A=b(this,g(m).call(this))).id=p.id,A.metadata=p.metadata,A.type=p.type,A.minzoom=p.minzoom,A.maxzoom=p.maxzoom,A.visibility="visible",p.type!=="background"&&(A.source=p.source,A.sourceLayer=p["source-layer"],A.filter=p.filter),A._featureFilter=function(){return!0},w.layout&&(A._unevaluatedLayout=new t(w.layout)),A._transitionablePaint=new r(w.paint),p.paint)A.setPaintProperty(k,p.paint[k],{validate:!1});for(var v in p.layout)A.setLayoutProperty(v,p.layout[v],{validate:!1});return A._transitioningPaint=A._transitionablePaint.untransitioned(),A}var S,y,s;return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(w&&w.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),w&&f(p,w)}(m,a),S=m,(y=[{key:"getLayoutProperty",value:function(p){return p==="visibility"?this.visibility:this._unevaluatedLayout.getValue(p)}},{key:"setLayoutProperty",value:function(p,w,A){if(w!=null){var k="layers.".concat(this.id,".layout.").concat(p);if(this._validate(i.layoutProperty,k,p,w,A))return}p!=="visibility"?this._unevaluatedLayout.setValue(p,w):this.visibility=w==="none"?w:"visible"}},{key:"getPaintProperty",value:function(p){return c.endsWith(p,"-transition")?this._transitionablePaint.getTransition(p.slice(0,-11)):this._transitionablePaint.getValue(p)}},{key:"setPaintProperty",value:function(p,w,A){if(w!=null){var k="layers.".concat(this.id,".paint.").concat(p);if(this._validate(i.paintProperty,k,p,w,A))return}c.endsWith(p,"-transition")?this._transitionablePaint.setTransition(p.slice(0,-11),w||void 0):this._transitionablePaint.setValue(p,w)}},{key:"isHidden",value:function(p){return!!(this.minzoom&&p<this.minzoom)||!!(this.maxzoom&&p>=this.maxzoom)||this.visibility==="none"}},{key:"updateTransitions",value:function(p){this._transitioningPaint=this._transitionablePaint.transitioned(p,this._transitioningPaint)}},{key:"hasTransition",value:function(){return this._transitioningPaint.hasTransition()}},{key:"recalculate",value:function(p){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(p)),this.paint=this._transitioningPaint.possiblyEvaluate(p)}},{key:"serialize",value:function(){var p={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility==="none"&&(p.layout=p.layout||{},p.layout.visibility="none"),c.filterObject(p,function(w,A){return!(w===void 0||A==="layout"&&!Object.keys(w).length||A==="paint"&&!Object.keys(w).length)})}},{key:"_validate",value:function(p,w,A,k,v){return(!v||v.validate!==!1)&&i.emitErrors(this,p.call(i,{key:w,layerType:this.type,objectKey:A,value:k,styleSpec:u,style:{glyphs:!0,sprite:!0}}))}},{key:"hasOffscreenPass",value:function(){return!1}},{key:"resize",value:function(){}}])&&e(S.prototype,y),s&&e(S,s),m}());O.exports=l;var d={circle:o(151),heatmap:o(155),hillshade:o(158),fill:o(160),"fill-extrusion":o(165),line:o(169),symbol:o(174),background:o(180),raster:o(182)};l.create=function(h){return new d[h.type](h)}},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(5),b=e.HTMLImageElement,g=e.HTMLCanvasElement,f=e.HTMLVideoElement,c=e.ImageData,u=function(){function i(r,l,d,h){(function(y,s){if(!(y instanceof s))throw new TypeError("Cannot call a class as a function")})(this,i),this.context=r;var m=l.width,S=l.height;this.size=[m,S],this.format=d,this.texture=r.gl.createTexture(),this.update(l,h)}var a,n,t;return a=i,(n=[{key:"update",value:function(r,l){var d=r.width,h=r.height;this.size=[d,h];var m=this.context,S=m.gl;S.bindTexture(S.TEXTURE_2D,this.texture),m.pixelStoreUnpack.set(1),this.format===S.RGBA&&l!==!1&&m.pixelStoreUnpackPremultiplyAlpha.set(!0),r instanceof b||r instanceof g||r instanceof f||r instanceof c?S.texImage2D(S.TEXTURE_2D,0,this.format,this.format,S.UNSIGNED_BYTE,r):S.texImage2D(S.TEXTURE_2D,0,this.format,d,h,0,this.format,S.UNSIGNED_BYTE,r.data)}},{key:"bind",value:function(r,l,d){var h=this.context.gl;h.bindTexture(h.TEXTURE_2D,this.texture),r!==this.filter&&(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,r),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,d||r),this.filter=r),l!==this.wrap&&(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,l),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,l),this.wrap=l)}},{key:"destroy",value:function(){this.context.gl.deleteTexture(this.texture),this.texture=null}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){function _(f){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(f)}function e(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var b=o(0).wrap,g=function(){function f(a,n){if(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,f),isNaN(a)||isNaN(n))throw new Error("Invalid LngLat object: (".concat(a,", ").concat(n,")"));if(this.lng=+a,this.lat=+n,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}var c,u,i;return c=f,i=[{key:"convert",value:function(a){if(a instanceof f)return a;if(Array.isArray(a)&&(a.length===2||a.length===3))return new f(Number(a[0]),Number(a[1]));if(!Array.isArray(a)&&_(a)==="object"&&a!==null)return new f(Number(a.lng),Number(a.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}],(u=[{key:"wrap",value:function(){return new f(b(this.lng,-180,180),this.lat)}},{key:"toArray",value:function(){return[this.lng,this.lat]}},{key:"toString",value:function(){return"LngLat(".concat(this.lng,", ").concat(this.lat,")")}},{key:"toBounds",value:function(a){var n=360*a/40075017,t=n/Math.cos(Math.PI/180*this.lat);return new(o(39))(new f(this.lng-t,this.lat-n),new f(this.lng+t,this.lat+n))}}])&&e(c.prototype,u),i&&e(c,i),f}();O.exports=g},function(O,D,o){O.exports=function(){"use strict";var _;return(_=new Float32Array(3))[0]=0,_[1]=0,_[2]=0,function(){var e=new Float32Array(4);e[0]=0,e[1]=0,e[2]=0,e[3]=0}(),{vec3:{transformMat3:function(e,b,g){var f=b[0],c=b[1],u=b[2];return e[0]=f*g[0]+c*g[3]+u*g[6],e[1]=f*g[1]+c*g[4]+u*g[7],e[2]=f*g[2]+c*g[5]+u*g[8],e}},vec4:{transformMat4:function(e,b,g){var f=b[0],c=b[1],u=b[2],i=b[3];return e[0]=g[0]*f+g[4]*c+g[8]*u+g[12]*i,e[1]=g[1]*f+g[5]*c+g[9]*u+g[13]*i,e[2]=g[2]*f+g[6]*c+g[10]*u+g[14]*i,e[3]=g[3]*f+g[7]*c+g[11]*u+g[15]*i,e}},mat2:{create:function(){var e=new Float32Array(4);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},rotate:function(e,b,g){var f=b[0],c=b[1],u=b[2],i=b[3],a=Math.sin(g),n=Math.cos(g);return e[0]=f*n+u*a,e[1]=c*n+i*a,e[2]=f*-a+u*n,e[3]=c*-a+i*n,e},scale:function(e,b,g){var f=b[0],c=b[1],u=b[2],i=b[3],a=g[0],n=g[1];return e[0]=f*a,e[1]=c*a,e[2]=u*n,e[3]=i*n,e}},mat3:{create:function(){var e=new Float32Array(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromRotation:function(e,b){var g=Math.sin(b),f=Math.cos(b);return e[0]=f,e[1]=g,e[2]=0,e[3]=-g,e[4]=f,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}},mat4:{create:function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},translate:function(e,b,g){var f,c,u,i,a,n,t,r,l,d,h,m,S=g[0],y=g[1],s=g[2];return b===e?(e[12]=b[0]*S+b[4]*y+b[8]*s+b[12],e[13]=b[1]*S+b[5]*y+b[9]*s+b[13],e[14]=b[2]*S+b[6]*y+b[10]*s+b[14],e[15]=b[3]*S+b[7]*y+b[11]*s+b[15]):(f=b[0],c=b[1],u=b[2],i=b[3],a=b[4],n=b[5],t=b[6],r=b[7],l=b[8],d=b[9],h=b[10],m=b[11],e[0]=f,e[1]=c,e[2]=u,e[3]=i,e[4]=a,e[5]=n,e[6]=t,e[7]=r,e[8]=l,e[9]=d,e[10]=h,e[11]=m,e[12]=f*S+a*y+l*s+b[12],e[13]=c*S+n*y+d*s+b[13],e[14]=u*S+t*y+h*s+b[14],e[15]=i*S+r*y+m*s+b[15]),e},scale:function(e,b,g){var f=g[0],c=g[1],u=g[2];return e[0]=b[0]*f,e[1]=b[1]*f,e[2]=b[2]*f,e[3]=b[3]*f,e[4]=b[4]*c,e[5]=b[5]*c,e[6]=b[6]*c,e[7]=b[7]*c,e[8]=b[8]*u,e[9]=b[9]*u,e[10]=b[10]*u,e[11]=b[11]*u,e[12]=b[12],e[13]=b[13],e[14]=b[14],e[15]=b[15],e},multiply:function(e,b,g){var f=b[0],c=b[1],u=b[2],i=b[3],a=b[4],n=b[5],t=b[6],r=b[7],l=b[8],d=b[9],h=b[10],m=b[11],S=b[12],y=b[13],s=b[14],p=b[15],w=g[0],A=g[1],k=g[2],v=g[3];return e[0]=w*f+A*a+k*l+v*S,e[1]=w*c+A*n+k*d+v*y,e[2]=w*u+A*t+k*h+v*s,e[3]=w*i+A*r+k*m+v*p,w=g[4],A=g[5],k=g[6],v=g[7],e[4]=w*f+A*a+k*l+v*S,e[5]=w*c+A*n+k*d+v*y,e[6]=w*u+A*t+k*h+v*s,e[7]=w*i+A*r+k*m+v*p,w=g[8],A=g[9],k=g[10],v=g[11],e[8]=w*f+A*a+k*l+v*S,e[9]=w*c+A*n+k*d+v*y,e[10]=w*u+A*t+k*h+v*s,e[11]=w*i+A*r+k*m+v*p,w=g[12],A=g[13],k=g[14],v=g[15],e[12]=w*f+A*a+k*l+v*S,e[13]=w*c+A*n+k*d+v*y,e[14]=w*u+A*t+k*h+v*s,e[15]=w*i+A*r+k*m+v*p,e},perspective:function(e,b,g,f,c){var u=1/Math.tan(b/2),i=1/(f-c);return e[0]=u/g,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(c+f)*i,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*c*f*i,e[15]=0,e},rotateX:function(e,b,g){var f=Math.sin(g),c=Math.cos(g),u=b[4],i=b[5],a=b[6],n=b[7],t=b[8],r=b[9],l=b[10],d=b[11];return b!==e&&(e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3],e[12]=b[12],e[13]=b[13],e[14]=b[14],e[15]=b[15]),e[4]=u*c+t*f,e[5]=i*c+r*f,e[6]=a*c+l*f,e[7]=n*c+d*f,e[8]=t*c-u*f,e[9]=r*c-i*f,e[10]=l*c-a*f,e[11]=d*c-n*f,e},rotateZ:function(e,b,g){var f=Math.sin(g),c=Math.cos(g),u=b[0],i=b[1],a=b[2],n=b[3],t=b[4],r=b[5],l=b[6],d=b[7];return b!==e&&(e[8]=b[8],e[9]=b[9],e[10]=b[10],e[11]=b[11],e[12]=b[12],e[13]=b[13],e[14]=b[14],e[15]=b[15]),e[0]=u*c+t*f,e[1]=i*c+r*f,e[2]=a*c+l*f,e[3]=n*c+d*f,e[4]=t*c-u*f,e[5]=r*c-i*f,e[6]=l*c-a*f,e[7]=d*c-n*f,e},invert:function(e,b){var g=b[0],f=b[1],c=b[2],u=b[3],i=b[4],a=b[5],n=b[6],t=b[7],r=b[8],l=b[9],d=b[10],h=b[11],m=b[12],S=b[13],y=b[14],s=b[15],p=g*a-f*i,w=g*n-c*i,A=g*t-u*i,k=f*n-c*a,v=f*t-u*a,x=c*t-u*n,T=r*S-l*m,E=r*y-d*m,C=r*s-h*m,z=l*y-d*S,P=l*s-h*S,B=d*s-h*y,F=p*B-w*P+A*z+k*C-v*E+x*T;return F?(F=1/F,e[0]=(a*B-n*P+t*z)*F,e[1]=(c*P-f*B-u*z)*F,e[2]=(S*x-y*v+s*k)*F,e[3]=(d*v-l*x-h*k)*F,e[4]=(n*C-i*B-t*E)*F,e[5]=(g*B-c*C+u*E)*F,e[6]=(y*A-m*x-s*w)*F,e[7]=(r*x-d*A+h*w)*F,e[8]=(i*P-a*C+t*T)*F,e[9]=(f*C-g*P-u*T)*F,e[10]=(m*v-S*A+s*p)*F,e[11]=(l*A-r*v-h*p)*F,e[12]=(a*E-i*z-n*T)*F,e[13]=(g*z-f*E+c*T)*F,e[14]=(S*w-m*k-y*p)*F,e[15]=(r*k-l*w+d*p)*F,e):null},ortho:function(e,b,g,f,c,u,i){var a=1/(b-g),n=1/(f-c),t=1/(u-i);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*t,e[11]=0,e[12]=(b+g)*a,e[13]=(c+f)*n,e[14]=(i+u)*t,e[15]=1,e}}}}()},function(O,D,o){function _(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}function e(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}var b=o(1),g={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},f=function(){function u(){e(this,u),this.isTransferred=!1,this.capacity=-1,this.resize(0)}var i,a,n;return i=u,n=[{key:"serialize",value:function(t,r){return b(!t.isTransferred),t._trim(),r&&(t.isTransferred=!0,r.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}},{key:"deserialize",value:function(t){var r=Object.create(this.prototype);return r.arrayBuffer=t.arrayBuffer,r.length=t.length,r.capacity=t.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}}],(a=[{key:"_trim",value:function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}},{key:"clear",value:function(){this.length=0}},{key:"resize",value:function(t){b(!this.isTransferred),this.reserve(t),this.length=t}},{key:"reserve",value:function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}},{key:"_refreshViews",value:function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}])&&_(i.prototype,a),n&&_(i,n),u}();function c(u,i){return Math.ceil(u/i)*i}O.exports.StructArray=f,O.exports.Struct=function u(i,a){e(this,u),this._structArray=i,this._pos1=a*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},O.exports.viewTypes=g,O.exports.createLayout=function(u){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,a=0,n=0;return{members:u.map(function(t){b(t.name.length);var r,l=(r=t.type,g[r].BYTES_PER_ELEMENT),d=a=c(a,Math.max(i,l)),h=t.components||1;return n=Math.max(n,l),a+=l*h,{name:t.name,type:t.type,components:h,offset:d}}),size:c(a,Math.max(n,i)),alignment:i}}},function(O,D){function o(_){return _ instanceof Number||_ instanceof String||_ instanceof Boolean?_.valueOf():_}O.exports=o,O.exports.deep=function _(e){return Array.isArray(e)?e.map(_):o(e)}},function(O,D,o){function _(l){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(l)}var e=o(1),b=o(12),g=o(8),f=g.NullType,c=g.NumberType,u=g.StringType,i=g.BooleanType,a=g.ColorType,n=g.ObjectType,t=g.ValueType,r=g.array;O.exports={Color:b,validateRGBA:function(l,d,h,m){return typeof l=="number"&&l>=0&&l<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof h=="number"&&h>=0&&h<=255?m===void 0||typeof m=="number"&&m>=0&&m<=1?null:"Invalid rgba value [".concat([l,d,h,m].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat((typeof m=="number"?[l,d,h,m]:[l,d,h]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")},isValue:function l(d){if(d===null||typeof d=="string"||typeof d=="boolean"||typeof d=="number"||d instanceof b)return!0;if(Array.isArray(d)){var h=!0,m=!1,S=void 0;try{for(var y,s=d[Symbol.iterator]();!(h=(y=s.next()).done);h=!0)if(!l(y.value))return!1}catch(w){m=!0,S=w}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}return!0}if(_(d)==="object"){for(var p in d)if(!l(d[p]))return!1;return!0}return!1},typeOf:function l(d){if(d===null)return f;if(typeof d=="string")return u;if(typeof d=="boolean")return i;if(typeof d=="number")return c;if(d instanceof b)return a;if(Array.isArray(d)){var h,m=d.length,S=!0,y=!1,s=void 0;try{for(var p,w=d[Symbol.iterator]();!(S=(p=w.next()).done);S=!0){var A=l(p.value);if(h){if(h===A)continue;h=t;break}h=A}}catch(k){y=!0,s=k}finally{try{S||w.return==null||w.return()}finally{if(y)throw s}}return r(h||t,m)}return e(_(d)==="object"),n}}},function(O,D,o){var _=o(12);function e(b,g,f){return b*(1-f)+g*f}O.exports={number:e,color:function(b,g,f){return new _(e(b.r,g.r,f),e(b.g,g.g,f),e(b.b,g.b,f),e(b.a,g.a,f))},array:function(b,g,f){return b.map(function(c,u){return e(c,g[u],f)})}}},function(O,D,o){function _(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}function e(r,l){for(var d=0;d<l.length;d++){var h=l[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}function b(r,l,d){return l&&e(r.prototype,l),d&&e(r,d),r}var g=o(198),f=o(1),c=o(11).register,u=o(35),i=function(){function r(l,d,h){_(this,r),f(l>=0&&l<=25),f(d>=0&&d<Math.pow(2,l)),f(h>=0&&h<Math.pow(2,l)),this.z=l,this.x=d,this.y=h,this.key=t(0,l,d,h)}return b(r,[{key:"equals",value:function(l){return this.z===l.z&&this.x===l.x&&this.y===l.y}},{key:"url",value:function(l,d){var h=g.getTileBBox(this.x,this.y,this.z),m=function(S,y,s){for(var p,w="",A=S;A>0;A--)w+=(y&(p=1<<A-1)?1:0)+(s&p?2:0);return w}(this.z,this.x,this.y);return l[(this.x+this.y)%l.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(d==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",m).replace("{bbox-epsg-3857}",h)}}]),r}(),a=function r(l,d,h){_(this,r),this.wrap=l,this.canonical=d,this.key=t(l,d.z,d.x,d.y),this.posMatrix=h},n=function(){function r(l,d,h,m,S){_(this,r),f(l>=h),this.overscaledZ=l,this.wrap=d,this.canonical=new i(h,+m,+S),this.key=t(d,l,m,S)}return b(r,[{key:"scaledTo",value:function(l){f(l<=this.overscaledZ);var d=this.canonical.z-l;return l>this.canonical.z?new r(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new r(l,this.wrap,l,this.canonical.x>>d,this.canonical.y>>d)}},{key:"isChildOf",value:function(l){var d=this.canonical.z-l.canonical.z;return l.overscaledZ===0||l.overscaledZ<this.overscaledZ&&l.canonical.x===this.canonical.x>>d&&l.canonical.y===this.canonical.y>>d}},{key:"children",value:function(l){if(this.overscaledZ>=l)return[new r(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var d=this.canonical.z+1,h=2*this.canonical.x,m=2*this.canonical.y;return[new r(d,this.wrap,d,h,m),new r(d,this.wrap,d,h+1,m),new r(d,this.wrap,d,h,m+1),new r(d,this.wrap,d,h+1,m+1)]}},{key:"isLessThan",value:function(l){return this.wrap<l.wrap||!(this.wrap>l.wrap)&&(this.overscaledZ<l.overscaledZ||!(this.overscaledZ>l.overscaledZ)&&(this.canonical.x<l.canonical.x||!(this.canonical.x>l.canonical.x)&&this.canonical.y<l.canonical.y))}},{key:"wrapped",value:function(){return new r(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}},{key:"overscaleFactor",value:function(){return Math.pow(2,this.overscaledZ-this.canonical.z)}},{key:"toUnwrapped",value:function(){return new a(this.wrap,this.canonical,this.posMatrix)}},{key:"toString",value:function(){return"".concat(this.overscaledZ,"/").concat(this.canonical.x,"/").concat(this.canonical.y)}},{key:"toCoordinate",value:function(){return new u(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)}}]),r}();function t(r,l,d,h){(r*=2)<0&&(r=-1*r-1);var m=1<<l;return 32*(m*m*r+m*h+d)+l}c("CanonicalTileID",i),c("OverscaledTileID",n,{omit:["posMatrix"]}),O.exports={CanonicalTileID:i,OverscaledTileID:n,UnwrappedTileID:a}},function(O,D,o){var _=o(6);O.exports=function(e,b,g){return b*(_/e.tileSize)}},function(O,D,o){var _=o(41),e=o(24),b=o(30).isExpression,g=o(57).isFunction;O.exports=function(f){var c=o(91),u=o(94),i=o(43),a={"*":function(){return[]},array:o(92),boolean:o(148),number:o(93),color:o(149),constants:o(75),enum:o(58),filter:o(59),function:o(91),layer:o(95),object:o(43),source:o(99),light:o(100),string:o(101)},n=f.value,t=f.valueSpec,r=f.styleSpec;return t.function&&g(e(n))?c(f):t.function&&b(e.deep(n))?u(f):t.type&&a[t.type]?a[t.type](f):i(_({},f,{valueSpec:t.type?r[t.type]:t}))}},function(O,D,o){function _(j){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M})(j)}function e(j,M){return!M||_(M)!=="object"&&typeof M!="function"?function(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}(j):M}function b(j){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(M){return M.__proto__||Object.getPrototypeOf(M)})(j)}function g(j,M){return(g=Object.setPrototypeOf||function(N,V){return N.__proto__=V,N})(j,M)}function f(j,M){if(!(j instanceof M))throw new TypeError("Cannot call a class as a function")}function c(j,M){for(var N=0;N<M.length;N++){var V=M[N];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(j,V.key,V)}}function u(j,M,N){return M&&c(j.prototype,M),N&&c(j,N),j}var i=o(1),a=o(41),n=o(76),t=o(77),r=o(55),l=o(42).CompoundExpression,d=o(86),h=o(56),m=o(88),S=o(89),y=o(90),s=o(84),p=o(31),w=o(146),A=w.success,k=w.error,v=function(){function j(M){f(this,j),this.expression=M}return u(j,[{key:"evaluate",value:function(M,N){return this._evaluator||(this._evaluator=new r),this._evaluator.globals=M,this._evaluator.feature=N,this.expression.evaluate(this._evaluator)}}]),j}(),x=function(j){function M(N,V){var G,H;return f(this,M),(G=e(this,b(M).call(this,N)))._warningHistory={},G._defaultValue=(H=V).type==="color"&&F(H.default)?new W(0,0,0,0):H.type==="color"?W.parse(H.default)||null:H.default===void 0?null:H.default,V.type==="enum"&&(G._enumValues=V.values),G}return function(N,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(V&&V.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),V&&g(N,V)}(M,v),u(M,[{key:"evaluate",value:function(N,V){this._evaluator||(this._evaluator=new r),this._evaluator.globals=N,this._evaluator.feature=V;try{var G=this.expression.evaluate(this._evaluator);if(G==null)return this._defaultValue;if(this._enumValues&&!(G in this._enumValues))throw new p("Expected value to be one of ".concat(Object.keys(this._enumValues).map(function(H){return JSON.stringify(H)}).join(", "),", but found ").concat(JSON.stringify(G)," instead."));return G}catch(H){return this._warningHistory[H.message]||(this._warningHistory[H.message]=!0,typeof console<"u"&&console.warn(H.message)),this._defaultValue}}}]),M}();function T(j){return Array.isArray(j)&&j.length>0&&typeof j[0]=="string"&&j[0]in y}function E(j,M){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},V=new t(y,[],function(H){var Y={color:R,string:U,number:K,enum:U,boolean:q};return H.type==="array"?I(Y[H.value]||L,H.length):Y[H.type]||null}(M)),G=V.parse(j);return G?N.handleErrors===!1?A(new v(G)):A(new x(G,M)):(i(V.errors.length>0),k(V.errors))}var C=function(){function j(M,N){f(this,j),this.kind=M,this._styleExpression=N}return u(j,[{key:"evaluate",value:function(M,N){return this._styleExpression.evaluate(M,N)}}]),j}(),z=function(){function j(M,N,V){f(this,j),this.kind=M,this.zoomStops=V.labels,this._styleExpression=N,V instanceof h&&(this._interpolationType=V.interpolation)}return u(j,[{key:"evaluate",value:function(M,N){return this._styleExpression.evaluate(M,N)}},{key:"interpolationFactor",value:function(M,N,V){return this._interpolationType?h.interpolationFactor(this._interpolationType,M,N,V):0}}]),j}();function P(j,M){if((j=E(j,M,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})).result==="error")return j;var N=j.value.expression,V=s.isFeatureConstant(N);if(!V&&!M["property-function"])return k([new n("","property expressions not supported")]);var G=s.isGlobalPropertyConstant(N,["zoom"]);if(!G&&M["zoom-function"]===!1)return k([new n("","zoom expressions not supported")]);var H=function Y($){var Q=null;if($ instanceof S)Q=Y($.result);else if($ instanceof m){var tt=!0,et=!1,nt=void 0;try{for(var ot,it=$.args[Symbol.iterator]();!(tt=(ot=it.next()).done);tt=!0){var at=ot.value;if(Q=Y(at))break}}catch(st){et=!0,nt=st}finally{try{tt||it.return==null||it.return()}finally{if(et)throw nt}}}else($ instanceof d||$ instanceof h)&&$.input instanceof l&&$.input.name==="zoom"&&(Q=$);return Q instanceof n||$.eachChild(function(st){var rt=Y(st);rt instanceof n?Q=rt:!Q&&rt?Q=new n("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Q&&rt&&Q!==rt&&(Q=new n("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),Q}(N);return H||G?H instanceof n?k([H]):H instanceof h&&M.function==="piecewise-constant"?k([new n("",'"interpolate" expressions cannot be used with this property')]):A(H?new z(V?"camera":"composite",j.value,H):new C(V?"constant":"source",j.value)):k([new n("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}var B=o(57),F=B.isFunction,Z=B.createFunction,W=o(25).Color,J=function(){function j(M,N){f(this,j),this._parameters=M,this._specification=N,a(this,Z(this._parameters,this._specification))}return u(j,null,[{key:"deserialize",value:function(M){return new j(M._parameters,M._specification)}},{key:"serialize",value:function(M){return{_parameters:M._parameters,_specification:M._specification}}}]),j}();O.exports={StyleExpression:v,StyleExpressionWithErrorHandling:x,isExpression:T,createExpression:E,createPropertyExpression:P,normalizePropertyExpression:function(j,M){if(F(j))return new J(j,M);if(T(j)){var N=P(j,M);if(N.result==="error")throw new Error(N.value.map(function(G){return"".concat(G.key,": ").concat(G.message)}).join(", "));return N.value}var V=j;return typeof j=="string"&&M.type==="color"&&(V=W.parse(j)),{kind:"constant",evaluate:function(){return V}}},ZoomConstantExpression:C,ZoomDependentExpression:z,StylePropertyFunction:J};var X=o(8),R=X.ColorType,U=X.StringType,K=X.NumberType,q=X.BooleanType,L=X.ValueType,I=X.array},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(c){(function(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")})(this,e),this.name="ExpressionEvaluationError",this.message=c}var b,g,f;return b=e,(g=[{key:"toJSON",value:function(){return this.message}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D,o){function _(y,s){if(!(y instanceof s))throw new TypeError("Cannot call a class as a function")}function e(y,s){for(var p=0;p<s.length;p++){var w=s[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}function b(y,s,p){return s&&e(y.prototype,s),p&&e(y,p),y}var g=o(153).packUint8ToFloat,f=(o(12),o(11).register),c=o(4).PossiblyEvaluatedPropertyValue,u=o(14),i=u.StructArrayLayout1f4,a=u.StructArrayLayout2f8,n=u.StructArrayLayout4f16;function t(y){return[g(255*y.r,255*y.g),g(255*y.b,255*y.a)]}var r=function(){function y(s,p,w){_(this,y),this.value=s,this.name=p,this.type=w,this.statistics={max:-1/0}}return b(y,[{key:"defines",value:function(){return["#define HAS_UNIFORM_u_".concat(this.name)]}},{key:"populatePaintArray",value:function(){}},{key:"upload",value:function(){}},{key:"destroy",value:function(){}},{key:"setUniforms",value:function(s,p,w,A){var k=A.constantOr(this.value),v=s.gl;this.type==="color"?v.uniform4f(p.uniforms["u_".concat(this.name)],k.r,k.g,k.b,k.a):v.uniform1f(p.uniforms["u_".concat(this.name)],k)}}]),y}(),l=function(){function y(s,p,w){_(this,y),this.expression=s,this.name=p,this.type=w,this.statistics={max:-1/0};var A=w==="color"?a:i;this.paintVertexAttributes=[{name:"a_".concat(p),type:"Float32",components:w==="color"?2:1,offset:0}],this.paintVertexArray=new A}return b(y,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(s,p){var w=this.paintVertexArray,A=w.length;w.reserve(s);var k=this.expression.evaluate({zoom:0},p);if(this.type==="color")for(var v=t(k),x=A;x<s;x++)w.emplaceBack(v[0],v[1]);else{for(var T=A;T<s;T++)w.emplaceBack(k);this.statistics.max=Math.max(this.statistics.max,k)}}},{key:"upload",value:function(s){this.paintVertexArray&&(this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"setUniforms",value:function(s,p){s.gl.uniform1f(p.uniforms["a_".concat(this.name,"_t")],0)}}]),y}(),d=function(){function y(s,p,w,A,k){_(this,y),this.expression=s,this.name=p,this.type=w,this.useIntegerZoom=A,this.zoom=k,this.statistics={max:-1/0};var v=w==="color"?n:a;this.paintVertexAttributes=[{name:"a_".concat(p),type:"Float32",components:w==="color"?4:2,offset:0}],this.paintVertexArray=new v}return b(y,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(s,p){var w=this.paintVertexArray,A=w.length;w.reserve(s);var k=this.expression.evaluate({zoom:this.zoom},p),v=this.expression.evaluate({zoom:this.zoom+1},p);if(this.type==="color")for(var x=t(k),T=t(v),E=A;E<s;E++)w.emplaceBack(x[0],x[1],T[0],T[1]);else{for(var C=A;C<s;C++)w.emplaceBack(k,v);this.statistics.max=Math.max(this.statistics.max,k,v)}}},{key:"upload",value:function(s){this.paintVertexArray&&(this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"interpolationFactor",value:function(s){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(s),this.zoom,this.zoom+1):this.expression.interpolationFactor(s,this.zoom,this.zoom+1)}},{key:"setUniforms",value:function(s,p,w){s.gl.uniform1f(p.uniforms["a_".concat(this.name,"_t")],this.interpolationFactor(w.zoom))}}]),y}(),h=function(){function y(){_(this,y),this.binders={},this.cacheKey="",this._buffers=[]}return b(y,[{key:"populatePaintArrays",value:function(s,p){for(var w in this.binders)this.binders[w].populatePaintArray(s,p)}},{key:"defines",value:function(){var s=[];for(var p in this.binders)s.push.apply(s,this.binders[p].defines());return s}},{key:"setUniforms",value:function(s,p,w,A){for(var k in this.binders)this.binders[k].setUniforms(s,p,A,w.get(k))}},{key:"getPaintVertexBuffers",value:function(){return this._buffers}},{key:"upload",value:function(s){for(var p in this.binders)this.binders[p].upload(s);var w=[];for(var A in this.binders){var k=this.binders[A];(k instanceof l||k instanceof d)&&k.paintVertexBuffer&&w.push(k.paintVertexBuffer)}this._buffers=w}},{key:"destroy",value:function(){for(var s in this.binders)this.binders[s].destroy()}}],[{key:"createDynamic",value:function(s,p,w){var A=new y,k=[];for(var v in s.paint._values)if(w(v)){var x=s.paint.get(v);if(x instanceof c&&x.property.specification["property-function"]){var T=S(v,s.type),E=x.property.specification.type,C=x.property.useIntegerZoom;x.value.kind==="constant"?(A.binders[v]=new r(x.value,T,E),k.push("/u_".concat(T))):x.value.kind==="source"?(A.binders[v]=new l(x.value,T,E),k.push("/a_".concat(T))):(A.binders[v]=new d(x.value,T,E,C,p),k.push("/z_".concat(T)))}}return A.cacheKey=k.sort().join(""),A}}]),y}(),m=function(){function y(s,p,w){var A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return!0};_(this,y),this.programConfigurations={};var k=!0,v=!1,x=void 0;try{for(var T,E=p[Symbol.iterator]();!(k=(T=E.next()).done);k=!0){var C=T.value;this.programConfigurations[C.id]=h.createDynamic(C,w,A),this.programConfigurations[C.id].layoutAttributes=s}}catch(z){v=!0,x=z}finally{try{k||E.return==null||E.return()}finally{if(v)throw x}}}return b(y,[{key:"populatePaintArrays",value:function(s,p){for(var w in this.programConfigurations)this.programConfigurations[w].populatePaintArrays(s,p)}},{key:"get",value:function(s){return this.programConfigurations[s]}},{key:"upload",value:function(s){for(var p in this.programConfigurations)this.programConfigurations[p].upload(s)}},{key:"destroy",value:function(){for(var s in this.programConfigurations)this.programConfigurations[s].destroy()}}]),y}();function S(y,s){return{"text-opacity":"opacity","icon-opacity":"opacity","text-color":"fill_color","icon-color":"fill_color","text-halo-color":"halo_color","icon-halo-color":"halo_color","text-halo-blur":"halo_blur","icon-halo-blur":"halo_blur","text-halo-width":"halo_width","icon-halo-width":"halo_width","line-gap-width":"gapwidth"}[y]||y.replace("".concat(s,"-"),"").replace(/-/g,"_")}f("ConstantBinder",r),f("SourceExpressionBinder",l),f("CompositeExpressionBinder",d),f("ProgramConfiguration",h,{omit:["_buffers"]}),f("ProgramConfigurationSet",m),O.exports={ProgramConfiguration:h,ProgramConfigurationSet:m}},function(O,D,o){function _(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function e(t,r){for(var l=0;l<r.length;l++){var d=r[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}function b(t,r,l){return r&&e(t.prototype,r),l&&e(t,l),t}var g=o(1),f=o(11).register;function c(t,r,l,d){var h=r.width,m=r.height;if(d){if(d.length!==h*m*l)throw new RangeError("mismatched image size")}else d=new Uint8Array(h*m*l);return t.width=h,t.height=m,t.data=d,t}function u(t,r,l){var d=r.width,h=r.height;if(d!==t.width||h!==t.height){var m=c({},{width:d,height:h},l);i(t,m,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,d),height:Math.min(t.height,h)},l),t.width=d,t.height=h,t.data=m.data}}function i(t,r,l,d,h,m){if(h.width===0||h.height===0)return r;if(h.width>t.width||h.height>t.height||l.x>t.width-h.width||l.y>t.height-h.height)throw new RangeError("out of range source coordinates for image copy");if(h.width>r.width||h.height>r.height||d.x>r.width-h.width||d.y>r.height-h.height)throw new RangeError("out of range destination coordinates for image copy");var S=t.data,y=r.data;g(S!==y);for(var s=0;s<h.height;s++)for(var p=((l.y+s)*t.width+l.x)*m,w=((d.y+s)*r.width+d.x)*m,A=0;A<h.width*m;A++)y[w+A]=S[p+A];return r}var a=function(){function t(r,l){_(this,t),c(this,r,1,l)}return b(t,[{key:"resize",value:function(r){u(this,r,1)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(r,l,d,h,m){i(r,l,d,h,m,1)}}]),t}(),n=function(){function t(r,l){_(this,t),c(this,r,4,l)}return b(t,[{key:"resize",value:function(r){u(this,r,4)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(r,l,d,h,m){i(r,l,d,h,m,4)}}]),t}();f("AlphaImage",a),f("RGBAImage",n),O.exports={AlphaImage:a,RGBAImage:n}},function(O,D,o){var _=o(64),e=o(2),b="See https://www.mapbox.com/api-documentation/#access-tokens";function g(n,t){var r=i(_.API_URL);if(n.protocol=r.protocol,n.authority=r.authority,r.path!=="/"&&(n.path="".concat(r.path).concat(n.path)),!_.REQUIRE_ACCESS_TOKEN)return a(n);if(!(t=t||_.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. ".concat(b));if(t[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ".concat(b));return n.params.push("access_token=".concat(t)),a(n)}function f(n){return n.indexOf("mapbox:")===0}D.isMapboxURL=f,D.normalizeStyleURL=function(n,t){if(!f(n))return n;var r=i(n);return r.path="/styles/v1".concat(r.path),g(r,t)},D.normalizeGlyphsURL=function(n,t){if(!f(n))return n;var r=i(n);return r.path="/fonts/v1".concat(r.path),g(r,t)},D.normalizeSourceURL=function(n,t){if(!f(n))return n;var r=i(n);return r.path="/v4/".concat(r.authority,".json"),r.params.push("secure"),g(r,t)},D.normalizeSpriteURL=function(n,t,r,l){var d=i(n);return f(n)?(d.path="/styles/v1".concat(d.path,"/sprite").concat(t).concat(r),g(d,l)):(d.path+="".concat(t).concat(r),a(d))};var c=/(\.(png|jpg)\d*)(?=$)/;D.normalizeTileURL=function(n,t,r){if(!t||!f(t))return n;var l=i(n),d=e.devicePixelRatio>=2||r===512?"@2x":"",h=e.supportsWebp?".webp":"$1";return l.path=l.path.replace(c,"".concat(d).concat(h)),function(m){for(var S=0;S<m.length;S++)m[S].indexOf("access_token=tk.")===0&&(m[S]="access_token=".concat(_.ACCESS_TOKEN||""))}(l.params),a(l)};var u=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function i(n){var t=n.match(u);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function a(n){var t=n.params.length?"?".concat(n.params.join("&")):"";return"".concat(n.protocol,"://").concat(n.authority).concat(n.path).concat(t)}},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(c,u,i){(function(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")})(this,e),this.column=c,this.row=u,this.zoom=i}var b,g,f;return b=e,(g=[{key:"clone",value:function(){return new e(this.column,this.row,this.zoom)}},{key:"zoomTo",value:function(c){return this.clone()._zoomTo(c)}},{key:"sub",value:function(c){return this.clone()._sub(c)}},{key:"_zoomTo",value:function(c){var u=Math.pow(2,c-this.zoom);return this.column*=u,this.row*=u,this.zoom=c,this}},{key:"_sub",value:function(c){return c=c.zoomTo(this.zoom),this.column-=c.column,this.row-=c.row,this}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(0).warnOnce,b=o(11).register,g=Math.pow(2,16)-1,f=function(){function c(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,c),this.segments=n}var u,i,a;return u=c,(i=[{key:"prepareSegment",value:function(n,t,r){var l=this.segments[this.segments.length-1];return n>g&&e("Max vertices per segment is ".concat(g,": bucket requested ").concat(n)),(!l||l.vertexLength+n>O.exports.MAX_VERTEX_ARRAY_LENGTH)&&(l={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(l)),l}},{key:"get",value:function(){return this.segments}},{key:"destroy",value:function(){var n=!0,t=!1,r=void 0;try{for(var l,d=this.segments[Symbol.iterator]();!(n=(l=d.next()).done);n=!0){var h=l.value;for(var m in h.vaos)h.vaos[m].destroy()}}catch(S){t=!0,r=S}finally{try{n||d.return==null||d.return()}finally{if(t)throw r}}}}])&&_(u.prototype,i),a&&_(u,a),c}();b("SegmentVector",f),O.exports={SegmentVector:f,MAX_VERTEX_ARRAY_LENGTH:g}},function(O,D,o){O.exports={LineIndexArray:o(14).LineIndexArray,TriangleIndexArray:o(14).TriangleIndexArray}},function(O,D,o){var _=o(0),e=o(6),b,g=(b=16,{min:-1*Math.pow(2,b-1),max:Math.pow(2,b-1)-1});O.exports=function(f){for(var c=e/f.extent,u=f.loadGeometry(),i=0;i<u.length;i++)for(var a=u[i],n=0;n<a.length;n++){var t=a[n];t.x=Math.round(t.x*c),t.y=Math.round(t.y*c),(t.x<g.min||t.x>g.max||t.y<g.min||t.y>g.max)&&_.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return u}},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(21),b=function(){function g(i,a){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,g),i&&(a?this.setSouthWest(i).setNorthEast(a):i.length===4?this.setSouthWest([i[0],i[1]]).setNorthEast([i[2],i[3]]):this.setSouthWest(i[0]).setNorthEast(i[1]))}var f,c,u;return f=g,u=[{key:"convert",value:function(i){return!i||i instanceof g?i:new g(i)}}],(c=[{key:"setNorthEast",value:function(i){return this._ne=i instanceof e?new e(i.lng,i.lat):e.convert(i),this}},{key:"setSouthWest",value:function(i){return this._sw=i instanceof e?new e(i.lng,i.lat):e.convert(i),this}},{key:"extend",value:function(i){var a,n,t=this._sw,r=this._ne;if(i instanceof e)a=i,n=i;else{if(!(i instanceof g))return Array.isArray(i)?i.every(Array.isArray)?this.extend(g.convert(i)):this.extend(e.convert(i)):this;if(a=i._sw,n=i._ne,!a||!n)return this}return t||r?(t.lng=Math.min(a.lng,t.lng),t.lat=Math.min(a.lat,t.lat),r.lng=Math.max(n.lng,r.lng),r.lat=Math.max(n.lat,r.lat)):(this._sw=new e(a.lng,a.lat),this._ne=new e(n.lng,n.lat)),this}},{key:"getCenter",value:function(){return new e((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}},{key:"getSouthWest",value:function(){return this._sw}},{key:"getNorthEast",value:function(){return this._ne}},{key:"getNorthWest",value:function(){return new e(this.getWest(),this.getNorth())}},{key:"getSouthEast",value:function(){return new e(this.getEast(),this.getSouth())}},{key:"getWest",value:function(){return this._sw.lng}},{key:"getSouth",value:function(){return this._sw.lat}},{key:"getEast",value:function(){return this._ne.lng}},{key:"getNorth",value:function(){return this._ne.lat}},{key:"toArray",value:function(){return[this._sw.toArray(),this._ne.toArray()]}},{key:"toString",value:function(){return"LngLatBounds(".concat(this._sw.toString(),", ").concat(this._ne.toString(),")")}},{key:"isEmpty",value:function(){return!(this._sw&&this._ne)}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(1),b=function(){function g(){(function(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")})(this,g),this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}var f,c,u;return f=g,(c=[{key:"bind",value:function(i,a,n,t,r,l,d,h){this.context=i;for(var m=this.boundPaintVertexBuffers.length!==t.length,S=0;!m&&S<t.length;S++)this.boundPaintVertexBuffers[S]!==t[S]&&(m=!0);var y=!this.vao||this.boundProgram!==a||this.boundLayoutVertexBuffer!==n||m||this.boundIndexBuffer!==r||this.boundVertexOffset!==l||this.boundDynamicVertexBuffer!==d||this.boundDynamicVertexBuffer2!==h;!i.extVertexArrayObject||y?this.freshBind(a,n,t,r,l,d,h):(i.bindVertexArrayOES.set(this.vao),d&&d.bind(),r&&r.dynamicDraw&&r.bind(),h&&h.bind())}},{key:"freshBind",value:function(i,a,n,t,r,l,d){var h,m=i.numAttributes,S=this.context,y=S.gl;if(S.extVertexArrayObject)this.vao&&this.destroy(),this.vao=S.extVertexArrayObject.createVertexArrayOES(),S.bindVertexArrayOES.set(this.vao),h=0,this.boundProgram=i,this.boundLayoutVertexBuffer=a,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=t,this.boundVertexOffset=r,this.boundDynamicVertexBuffer=l,this.boundDynamicVertexBuffer2=d;else{h=S.currentNumAttributes||0;for(var s=m;s<h;s++)e(s!==0),y.disableVertexAttribArray(s)}a.enableAttributes(y,i);var p=!0,w=!1,A=void 0;try{for(var k,v=n[Symbol.iterator]();!(p=(k=v.next()).done);p=!0)k.value.enableAttributes(y,i)}catch(B){w=!0,A=B}finally{try{p||v.return==null||v.return()}finally{if(w)throw A}}l&&l.enableAttributes(y,i),d&&d.enableAttributes(y,i),a.bind(),a.setVertexAttribPointers(y,i,r);var x=!0,T=!1,E=void 0;try{for(var C,z=n[Symbol.iterator]();!(x=(C=z.next()).done);x=!0){var P=C.value;P.bind(),P.setVertexAttribPointers(y,i,r)}}catch(B){T=!0,E=B}finally{try{x||z.return==null||z.return()}finally{if(T)throw E}}l&&(l.bind(),l.setVertexAttribPointers(y,i,r)),t&&t.bind(),d&&(d.bind(),d.setVertexAttribPointers(y,i,r)),S.currentNumAttributes=m}},{key:"destroy",value:function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D){O.exports=function(o){for(var _=arguments.length,e=new Array(_>1?_-1:0),b=1;b<_;b++)e[b-1]=arguments[b];for(var g=0,f=e;g<f.length;g++){var c=f[g];for(var u in c)o[u]=c[u]}return o}},function(O,D,o){function _(u,i){return function(a){if(Array.isArray(a))return a}(u)||function(a,n){var t=[],r=!0,l=!1,d=void 0;try{for(var h,m=a[Symbol.iterator]();!(r=(h=m.next()).done)&&(t.push(h.value),!n||t.length!==n);r=!0);}catch(S){l=!0,d=S}finally{try{r||m.return==null||m.return()}finally{if(l)throw d}}return t}(u,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function e(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}var b=o(8).toString,g=o(77),f=(o(55),o(1)),c=function(){function u(t,r,l,d){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,u),this.name=t,this.type=r,this._evaluate=l,this.args=d}var i,a,n;return i=u,n=[{key:"parse",value:function(t,r){var l=t[0],d=u.definitions[l];if(!d)return r.error('Unknown expression "'.concat(l,'". If you wanted a literal array, use ["literal", [...]].'),0);for(var h=Array.isArray(d)?d[0]:d.type,m=Array.isArray(d)?[[d[1],d[2]]]:d.overloads,S=m.filter(function(U){var K=_(U,1)[0];return!Array.isArray(K)||K.length===t.length-1}),y=[],s=1;s<t.length;s++){var p=t[s],w=void 0;if(S.length===1){var A=S[0][0];w=Array.isArray(A)?A[s-1]:A.type}var k=r.parse(p,1+y.length,w);if(!k)return null;y.push(k)}var v=null,x=!0,T=!1,E=void 0;try{for(var C,z=S[Symbol.iterator]();!(x=(C=z.next()).done);x=!0){var P=_(C.value,2),B=P[0],F=P[1];if(v=new g(r.registry,r.path,null,r.scope),Array.isArray(B)&&B.length!==y.length)v.error("Expected ".concat(B.length," arguments, but found ").concat(y.length," instead."));else{for(var Z=0;Z<y.length;Z++){var W=Array.isArray(B)?B[Z]:B.type,J=y[Z];v.concat(Z+1).checkSubtype(W,J.type)}if(v.errors.length===0)return new u(l,h,F,y)}}}catch(U){T=!0,E=U}finally{try{x||z.return==null||z.return()}finally{if(T)throw E}}if(f(!v||v.errors.length>0),S.length===1)r.errors.push.apply(r.errors,v.errors);else{var X=(S.length?S:m).map(function(U){var K,q=_(U,1)[0];return K=q,Array.isArray(K)?"(".concat(K.map(b).join(", "),")"):"(".concat(b(K.type),"...)")}).join(" | "),R=y.map(function(U){return b(U.type)}).join(", ");r.error("Expected arguments of type ".concat(X,", but found (").concat(R,") instead."))}return null}},{key:"register",value:function(t,r){for(var l in f(!u.definitions),u.definitions=r,r)t[l]=u}}],(a=[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&e(i.prototype,a),n&&e(i,n),u}();O.exports={CompoundExpression:c,varargs:function(u){return{type:u}}}},function(O,D,o){var _=o(7),e=o(17),b=o(29);O.exports=function(g){var f=g.key,c=g.value,u=g.valueSpec||{},i=g.objectElementValidators||{},a=g.style,n=g.styleSpec,t=[],r=e(c);if(r!=="object")return[new _(f,c,"object expected, ".concat(r," found"))];for(var l in c){var d=l.split(".")[0],h=u[d]||u["*"],m=void 0;if(i[d])m=i[d];else if(u[d])m=b;else if(i["*"])m=i["*"];else{if(!u["*"]){t.push(new _(f,c[l],'unknown property "'.concat(l,'"')));continue}m=b}t=t.concat(m({key:(f&&"".concat(f,"."))+l,value:c[l],valueSpec:h,style:a,styleSpec:n,object:c,objectKey:l},c))}for(var S in u)i[S]||u[S].required&&u[S].default===void 0&&c[S]===void 0&&t.push(new _(f,c,'missing required property "'.concat(S,'"')));return t}},function(O,D,o){var _=o(0).isCounterClockwise;function e(a,n,t){if(a.length>1){if(b(a,n))return!0;for(var r=0;r<n.length;r++)if(f(n[r],a,t))return!0}for(var l=0;l<a.length;l++)if(f(a[l],n,t))return!0;return!1}function b(a,n){if(a.length===0||n.length===0)return!1;for(var t=0;t<a.length-1;t++)for(var r=a[t],l=a[t+1],d=0;d<n.length-1;d++)if(g(r,l,n[d],n[d+1]))return!0;return!1}function g(a,n,t,r){return _(a,t,r)!==_(n,t,r)&&_(a,n,t)!==_(a,n,r)}function f(a,n,t){var r=t*t;if(n.length===1)return a.distSqr(n[0])<r;for(var l=1;l<n.length;l++)if(c(a,n[l-1],n[l])<r)return!0;return!1}function c(a,n,t){var r=n.distSqr(t);if(r===0)return a.distSqr(n);var l=((a.x-n.x)*(t.x-n.x)+(a.y-n.y)*(t.y-n.y))/r;return l<0?a.distSqr(n):l>1?a.distSqr(t):a.distSqr(t.sub(n)._mult(l)._add(n))}function u(a,n){for(var t,r,l,d=!1,h=0;h<a.length;h++)for(var m=0,S=(t=a[h]).length-1;m<t.length;S=m++)r=t[m],l=t[S],r.y>n.y!=l.y>n.y&&n.x<(l.x-r.x)*(n.y-r.y)/(l.y-r.y)+r.x&&(d=!d);return d}function i(a,n){for(var t=!1,r=0,l=a.length-1;r<a.length;l=r++){var d=a[r],h=a[l];d.y>n.y!=h.y>n.y&&n.x<(h.x-d.x)*(n.y-d.y)/(h.y-d.y)+d.x&&(t=!t)}return t}O.exports={multiPolygonIntersectsBufferedMultiPoint:function(a,n,t){for(var r=0;r<a.length;r++)for(var l=a[r],d=0;d<n.length;d++)for(var h=n[d],m=0;m<h.length;m++){var S=h[m];if(i(l,S)||f(S,l,t))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(a,n){if(a.length===1&&a[0].length===1)return u(n,a[0][0]);for(var t=0;t<n.length;t++)for(var r=n[t],l=0;l<r.length;l++)if(u(a,r[l]))return!0;for(var d=0;d<a.length;d++){for(var h=a[d],m=0;m<h.length;m++)if(u(n,h[m]))return!0;for(var S=0;S<n.length;S++)if(b(h,n[S]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(a,n,t){for(var r=0;r<n.length;r++)for(var l=n[r],d=0;d<a.length;d++){var h=a[d];if(h.length>=3){for(var m=0;m<l.length;m++)if(i(h,l[m]))return!0}if(e(h,l,t))return!0}return!1},polygonIntersectsPolygon:function(a,n){for(var t=0;t<a.length;t++)if(i(n,a[t]))return!0;for(var r=0;r<n.length;r++)if(i(a,n[r]))return!0;return!!b(a,n)},distToSegmentSquared:c}},function(O,D,o){var _=o(0),e={vector:o(196),raster:o(114),"raster-dem":o(197),geojson:o(115),video:o(199),image:o(52),canvas:o(200)};D.create=function(b,g,f,c){var u=new e[g.type](b,g,f,c);if(u.id!==b)throw new Error("Expected Source id to be ".concat(b," instead of ").concat(u.id));return _.bindAll(["load","abort","unload","serialize","prepare"],u),u},D.getType=function(b){return e[b]},D.setType=function(b,g){e[b]=g}},function(O,D,o){var _=o(23).createLayout;O.exports=_([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}])},function(O,D,o){var _=o(3);O.exports={getMaximumPaintValue:function(e,b,g){var f=b.paint.get(e).value;return f.kind==="constant"?f.value:g.programConfigurations.get(b.id).binders[e].statistics.max},translateDistance:function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},translate:function(e,b,g,f,c){if(!b[0]&&!b[1])return e;var u=_.convert(b);g==="viewport"&&u._rotate(-f);for(var i=[],a=0;a<e.length;a++){for(var n=e[a],t=[],r=0;r<n.length;r++)t.push(n[r].sub(u._mult(c)));i.push(t)}return i}}},function(O,D,o){O.exports.VectorTile=o(172),O.exports.VectorTileFeature=o(107),O.exports.VectorTileLayer=o(106)},function(O,D,o){var _=o(16),e=o(10),b=o(5),g=!1,f=null;O.exports.evented=new e,O.exports.registerForPluginAvailability=function(c){return f?c({pluginBlobURL:f,errorCallback:O.exports.errorCallback}):O.exports.evented.once("pluginAvailable",c),c},O.exports.createBlobURL=function(c){return b.URL.createObjectURL(new b.Blob([c.data],{type:"text/javascript"}))},O.exports.clearRTLTextPlugin=function(){g=!1,f=null},O.exports.setRTLTextPlugin=function(c,u){if(g)throw new Error("setRTLTextPlugin cannot be called multiple times.");g=!0,O.exports.errorCallback=u,_.getArrayBuffer({url:c},function(i,a){i?u(i):a&&(f=O.exports.createBlobURL(a),O.exports.evented.fire("pluginAvailable",{pluginBlobURL:f,errorCallback:u}))})},O.exports.applyArabicShaping=null,O.exports.processBidirectionalText=null},function(O,D,o){var _=o(30).normalizePropertyExpression,e=o(26),b=o(0);O.exports={getSizeData:function(g,f){var c=f.expression;if(c.kind==="constant")return{functionType:"constant",layoutSize:c.evaluate({zoom:g+1})};if(c.kind==="source")return{functionType:"source"};for(var u=c.zoomStops,i=0;i<u.length&&u[i]<=g;)i++;for(var a=i=Math.max(0,i-1);a<u.length&&u[a]<g+1;)a++;a=Math.min(u.length-1,a);var n={min:u[i],max:u[a]};return c.kind==="composite"?{functionType:"composite",zoomRange:n,propertyValue:f.value}:{functionType:"camera",layoutSize:c.evaluate({zoom:g+1}),zoomRange:n,sizeRange:{min:c.evaluate({zoom:n.min}),max:c.evaluate({zoom:n.max})},propertyValue:f.value}},evaluateSizeForFeature:function(g,f,c){var u=f;return g.functionType==="source"?c.lowerSize/10:g.functionType==="composite"?e.number(c.lowerSize/10,c.upperSize/10,u.uSizeT):u.uSize},evaluateSizeForZoom:function(g,f,c){if(g.functionType==="constant")return{uSizeT:0,uSize:g.layoutSize};if(g.functionType==="source")return{uSizeT:0,uSize:0};if(g.functionType==="camera"){var u=g.propertyValue,i=g.zoomRange,a=g.sizeRange,n=_(u,c.specification),t=b.clamp(n.interpolationFactor(f,i.min,i.max),0,1);return{uSizeT:0,uSize:a.min+t*(a.max-a.min)}}var r=g.propertyValue,l=g.zoomRange,d=_(r,c.specification);return{uSizeT:b.clamp(d.interpolationFactor(f,l.min,l.max),0,1),uSize:0}}}},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=e.DataDrivenProperty,c=(e.CrossFadedProperty,e.HeatmapColorProperty,new b({"symbol-placement":new g(_.layout_symbol["symbol-placement"]),"symbol-spacing":new g(_.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new g(_.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new g(_.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new g(_.layout_symbol["icon-ignore-placement"]),"icon-optional":new g(_.layout_symbol["icon-optional"]),"icon-rotation-alignment":new g(_.layout_symbol["icon-rotation-alignment"]),"icon-size":new f(_.layout_symbol["icon-size"]),"icon-text-fit":new g(_.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new g(_.layout_symbol["icon-text-fit-padding"]),"icon-image":new f(_.layout_symbol["icon-image"]),"icon-rotate":new f(_.layout_symbol["icon-rotate"]),"icon-padding":new g(_.layout_symbol["icon-padding"]),"icon-keep-upright":new g(_.layout_symbol["icon-keep-upright"]),"icon-offset":new f(_.layout_symbol["icon-offset"]),"icon-anchor":new f(_.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new g(_.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new g(_.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new g(_.layout_symbol["text-rotation-alignment"]),"text-field":new f(_.layout_symbol["text-field"]),"text-font":new f(_.layout_symbol["text-font"]),"text-size":new f(_.layout_symbol["text-size"]),"text-max-width":new f(_.layout_symbol["text-max-width"]),"text-line-height":new g(_.layout_symbol["text-line-height"]),"text-letter-spacing":new f(_.layout_symbol["text-letter-spacing"]),"text-justify":new f(_.layout_symbol["text-justify"]),"text-anchor":new f(_.layout_symbol["text-anchor"]),"text-max-angle":new g(_.layout_symbol["text-max-angle"]),"text-rotate":new f(_.layout_symbol["text-rotate"]),"text-padding":new g(_.layout_symbol["text-padding"]),"text-keep-upright":new g(_.layout_symbol["text-keep-upright"]),"text-transform":new f(_.layout_symbol["text-transform"]),"text-offset":new f(_.layout_symbol["text-offset"]),"text-allow-overlap":new g(_.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new g(_.layout_symbol["text-ignore-placement"]),"text-optional":new g(_.layout_symbol["text-optional"])})),u=new b({"icon-opacity":new f(_.paint_symbol["icon-opacity"]),"icon-color":new f(_.paint_symbol["icon-color"]),"icon-halo-color":new f(_.paint_symbol["icon-halo-color"]),"icon-halo-width":new f(_.paint_symbol["icon-halo-width"]),"icon-halo-blur":new f(_.paint_symbol["icon-halo-blur"]),"icon-translate":new g(_.paint_symbol["icon-translate"]),"icon-translate-anchor":new g(_.paint_symbol["icon-translate-anchor"]),"text-opacity":new f(_.paint_symbol["text-opacity"]),"text-color":new f(_.paint_symbol["text-color"]),"text-halo-color":new f(_.paint_symbol["text-halo-color"]),"text-halo-width":new f(_.paint_symbol["text-halo-width"]),"text-halo-blur":new f(_.paint_symbol["text-halo-blur"]),"text-translate":new g(_.paint_symbol["text-translate"]),"text-translate-anchor":new g(_.paint_symbol["text-translate-anchor"])});O.exports={paint:u,layout:c}},function(O,D,o){function _(s){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(s)}function e(s,p){for(var w=0;w<p.length;w++){var A=p[w];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(s,A.key,A)}}function b(s,p){return!p||_(p)!=="object"&&typeof p!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(s):p}function g(s){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)})(s)}function f(s,p){return(f=Object.setPrototypeOf||function(w,A){return w.__proto__=A,w})(s,p)}var c=o(0),u=o(27).CanonicalTileID,i=o(21),a=o(3),n=o(10),t=o(16),r=o(2),l=o(6),d=o(14).RasterBoundsArray,h=o(46),m=o(40),S=o(20),y=function(s){function p(v,x,T,E){var C;return function(z,P){if(!(z instanceof P))throw new TypeError("Cannot call a class as a function")}(this,p),(C=b(this,g(p).call(this))).id=v,C.dispatcher=T,C.coordinates=x.coordinates,C.type="image",C.minzoom=0,C.maxzoom=22,C.tileSize=512,C.tiles={},C.setEventedParent(E),C.options=x,C}var w,A,k;return function(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),x&&f(v,x)}(p,n),w=p,(A=[{key:"load",value:function(){var v=this;this.fire("dataloading",{dataType:"source"}),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(x,T){x?v.fire("error",{error:x}):T&&(v.image=r.getImageData(T),v._finishLoading())})}},{key:"_finishLoading",value:function(){this.map&&(this.setCoordinates(this.coordinates),this.fire("data",{dataType:"source",sourceDataType:"metadata"}))}},{key:"onAdd",value:function(v){this.map=v,this.load()}},{key:"setCoordinates",value:function(v){this.coordinates=v;var x=this.map,T=v.map(function(z){return x.transform.locationCoordinate(i.convert(z)).zoomTo(0)}),E=this.centerCoord=c.getCoordinatesCenter(T);E.column=Math.floor(E.column),E.row=Math.floor(E.row),this.tileID=new u(E.zoom,E.column,E.row),this.minzoom=this.maxzoom=E.zoom;var C=T.map(function(z){var P=z.zoomTo(E.zoom);return new a(Math.round((P.column-E.column)*l),Math.round((P.row-E.row)*l))});return this._boundsArray=new d,this._boundsArray.emplaceBack(C[0].x,C[0].y,0,0),this._boundsArray.emplaceBack(C[1].x,C[1].y,l,0),this._boundsArray.emplaceBack(C[3].x,C[3].y,0,l),this._boundsArray.emplaceBack(C[2].x,C[2].y,l,l),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire("data",{dataType:"source",sourceDataType:"content"}),this}},{key:"prepare",value:function(){if(Object.keys(this.tiles).length!==0&&this.image){var v=this.map.painter.context,x=v.gl;for(var T in this.boundsBuffer||(this.boundsBuffer=v.createVertexBuffer(this._boundsArray,h.members)),this.boundsVAO||(this.boundsVAO=new m),this.texture||(this.texture=new S(v,this.image,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE)),this.tiles){var E=this.tiles[T];E.state!=="loaded"&&(E.state="loaded",E.texture=this.texture)}}}},{key:"loadTile",value:function(v,x){this.tileID&&this.tileID.equals(v.tileID.canonical)?(this.tiles[String(v.tileID.wrap)]=v,v.buckets={},x(null)):(v.state="errored",x(null))}},{key:"serialize",value:function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}},{key:"hasTransition",value:function(){return!1}}])&&e(w.prototype,A),k&&e(w,k),p}();O.exports=y},function(O,D,o){function _(J){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X})(J)}function e(J,X){for(var R=0;R<X.length;R++){var U=X[R];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(J,U.key,U)}}function b(J){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(X){return X.__proto__||Object.getPrototypeOf(X)})(J)}function g(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J}function f(J,X){return(f=Object.setPrototypeOf||function(R,U){return R.__proto__=U,R})(J,X)}var c=o(1),u=o(10),i=o(19),a=o(184),n=o(185),t=o(187),r=o(192),l=o(193),d=o(0),h=o(16),m=o(34),S=o(2),y=o(194),s=o(54),p=o(45).getType,w=o(45).setType,A=o(116),k=o(117),v=(o(115),o(13)),x=o(209),T=o(214),E=o(216),C=o(49),z=o(217),P=o(108),B=o(123),F=d.pick(E.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Z=d.pick(E.operations,["setCenter","setZoom","setBearing","setPitch"]),W=function(J){function X(q){var L,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(function(M,N){if(!(M instanceof N))throw new TypeError("Cannot call a class as a function")})(this,X),(L=function(M,N){return!N||_(N)!=="object"&&typeof N!="function"?g(M):N}(this,b(X).call(this))).map=q,L.dispatcher=new y(x(),g(L)),L.imageManager=new n,L.glyphManager=new t(q._transformRequest,I.localIdeographFontFamily),L.lineAtlas=new l(256,512),L.crossTileSymbolIndex=new B,L._layers={},L._order=[],L.sourceCaches={},L.zoomHistory=new P,L._loaded=!1,L._resetUpdates();var j=g(L);return L._rtlTextPluginCallback=C.registerForPluginAvailability(function(M){for(var N in j.dispatcher.broadcast("loadRTLTextPlugin",M.pluginBlobURL,M.errorCallback),j.sourceCaches)j.sourceCaches[N].reload()}),L.on("data",function(M){if(M.dataType==="source"&&M.sourceDataType==="metadata"){var N=L.sourceCaches[M.sourceId];if(N){var V=N.getSource();if(V&&V.vectorLayerIds)for(var G in L._layers){var H=L._layers[G];H.source===V.id&&L._validateLayer(H)}}}}),L}var R,U,K;return function(q,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");q.prototype=Object.create(L&&L.prototype,{constructor:{value:q,writable:!0,configurable:!0}}),L&&f(q,L)}(X,u),R=X,(U=[{key:"loadURL",value:function(q){var L=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.fire("dataloading",{dataType:"style"});var j=typeof I.validate=="boolean"?I.validate:!m.isMapboxURL(q);q=m.normalizeStyleURL(q,I.accessToken);var M=this.map._transformRequest(q,h.ResourceType.Style);h.getJSON(M,function(N,V){N?L.fire("error",{error:N}):V&&L._load(V,j)})}},{key:"loadJSON",value:function(q){var L=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.fire("dataloading",{dataType:"style"}),S.frame(function(){L._load(q,I.validate!==!1)})}},{key:"_load",value:function(q,L){var I=this;if(!L||!s.emitErrors(this,s(q))){for(var j in this._loaded=!0,this.stylesheet=q,q.sources)this.addSource(j,q.sources[j],{validate:!1});q.sprite?a(q.sprite,this.map._transformRequest,function(Q,tt){if(Q)I.fire("error",Q);else if(tt)for(var et in tt)I.imageManager.addImage(et,tt[et]);I.imageManager.setLoaded(!0),I.fire("data",{dataType:"style"})}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(q.glyphs);var M=T(this.stylesheet.layers);this._order=M.map(function(Q){return Q.id}),this._layers={};var N=!0,V=!1,G=void 0;try{for(var H,Y=M[Symbol.iterator]();!(N=(H=Y.next()).done);N=!0){var $=H.value;($=i.create($)).setEventedParent(this,{layer:{id:$.id}}),this._layers[$.id]=$}}catch(Q){V=!0,G=Q}finally{try{N||Y.return==null||Y.return()}finally{if(V)throw G}}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new r(this.stylesheet.light),this.fire("data",{dataType:"style"}),this.fire("style.load")}}},{key:"_validateLayer",value:function(q){var L=this.sourceCaches[q.source];if(L){var I=q.sourceLayer;if(I){var j=L.getSource();(j.type==="geojson"||j.vectorLayerIds&&j.vectorLayerIds.indexOf(I)===-1)&&this.fire("error",{error:new Error('Source layer "'.concat(I,'" ')+'does not exist on source "'.concat(j.id,'" ')+'as specified by style layer "'.concat(q.id,'"'))})}}}},{key:"loaded",value:function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var q in this.sourceCaches)if(!this.sourceCaches[q].loaded())return!1;return!!this.imageManager.isLoaded()}},{key:"_serializeLayers",value:function(q){var L=this;return q.map(function(I){return L._layers[I].serialize()})}},{key:"hasTransitions",value:function(){if(this.light&&this.light.hasTransition())return!0;for(var q in this.sourceCaches)if(this.sourceCaches[q].hasTransition())return!0;for(var L in this._layers)if(this._layers[L].hasTransition())return!0;return!1}},{key:"_checkLoaded",value:function(){if(!this._loaded)throw new Error("Style is not done loading")}},{key:"update",value:function(q){if(this._loaded){if(this._changed){var L=Object.keys(this._updatedLayers),I=Object.keys(this._removedLayers);for(var j in(L.length||I.length)&&this._updateWorkerLayers(L,I),this._updatedSources){var M=this._updatedSources[j];c(M==="reload"||M==="clear"),M==="reload"?this._reloadSource(j):M==="clear"&&this._clearSource(j)}for(var N in this._updatedPaintProps)this._layers[N].updateTransitions(q);this.light.updateTransitions(q),this._resetUpdates(),this.fire("data",{dataType:"style"})}for(var V in this.sourceCaches)this.sourceCaches[V].used=!1;var G=!0,H=!1,Y=void 0;try{for(var $,Q=this._order[Symbol.iterator]();!(G=($=Q.next()).done);G=!0){var tt=$.value,et=this._layers[tt];et.recalculate(q),!et.isHidden(q.zoom)&&et.source&&(this.sourceCaches[et.source].used=!0)}}catch(nt){H=!0,Y=nt}finally{try{G||Q.return==null||Q.return()}finally{if(H)throw Y}}this.light.recalculate(q),this.z=q.zoom}}},{key:"_updateWorkerLayers",value:function(q,L){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(q),removedIds:L})}},{key:"_resetUpdates",value:function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}}},{key:"setState",value:function(q){var L=this;if(this._checkLoaded(),s.emitErrors(this,s(q)))return!1;(q=d.clone(q)).layers=T(q.layers);var I=E(this.serialize(),q).filter(function(M){return!(M.command in Z)});if(I.length===0)return!1;var j=I.filter(function(M){return!(M.command in F)});if(j.length>0)throw new Error("Unimplemented: ".concat(j.map(function(M){return M.command}).join(", "),"."));return I.forEach(function(M){M.command!=="setTransition"&&L[M.command].apply(L,M.args)}),this.stylesheet=q,!0}},{key:"addImage",value:function(q,L){if(this.getImage(q))return this.fire("error",{error:new Error("An image with this name already exists.")});this.imageManager.addImage(q,L),this.fire("data",{dataType:"style"})}},{key:"getImage",value:function(q){return this.imageManager.getImage(q)}},{key:"removeImage",value:function(q){if(!this.getImage(q))return this.fire("error",{error:new Error("No image with this name exists.")});this.imageManager.removeImage(q),this.fire("data",{dataType:"style"})}},{key:"addSource",value:function(q,L,I){var j=this;if(this._checkLoaded(),this.sourceCaches[q]!==void 0)throw new Error("There is already a source with this ID");if(!L.type)throw new Error("The type property must be defined, but the only the following properties were given: ".concat(Object.keys(L).join(", "),"."));if(!(["vector","raster","geojson","video","image","canvas"].indexOf(L.type)>=0)||!this._validate(s.source,"sources.".concat(q),L,null,I)){var M=this.sourceCaches[q]=new k(q,L,this.dispatcher);M.style=this,M.setEventedParent(this,function(){return{isSourceLoaded:j.loaded(),source:M.serialize(),sourceId:q}}),M.onAdd(this.map),this._changed=!0}}},{key:"removeSource",value:function(q){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error("There is no source with this ID");for(var L in this._layers)if(this._layers[L].source===q)return this.fire("error",{error:new Error('Source "'.concat(q,'" cannot be removed while layer "').concat(L,'" is using it.'))});var I=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],I.fire("data",{sourceDataType:"metadata",dataType:"source",sourceId:q}),I.setEventedParent(null),I.clearTiles(),I.onRemove&&I.onRemove(this.map),this._changed=!0}},{key:"setGeoJSONSourceData",value:function(q,L){this._checkLoaded(),c(this.sourceCaches[q]!==void 0,"There is no source with this ID");var I=this.sourceCaches[q].getSource();c(I.type==="geojson"),I.setData(L),this._changed=!0}},{key:"getSource",value:function(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()}},{key:"addLayer",value:function(q,L,I){this._checkLoaded();var j=q.id;if(_(q.source)==="object"&&(this.addSource(j,q.source),q=d.clone(q),q=d.extend(q,{source:j})),!this._validate(s.layer,"layers.".concat(j),q,{arrayIndex:-1},I)){var M=i.create(q);this._validateLayer(M),M.setEventedParent(this,{layer:{id:j}});var N=L?this._order.indexOf(L):this._order.length;if(L&&N===-1)this.fire("error",{error:new Error('Layer with id "'.concat(L,'" does not exist on this map.'))});else{if(this._order.splice(N,0,j),this._layerOrderChanged=!0,this._layers[j]=M,this._removedLayers[j]&&M.source){var V=this._removedLayers[j];delete this._removedLayers[j],V.type!==M.type?this._updatedSources[M.source]="clear":(this._updatedSources[M.source]="reload",this.sourceCaches[M.source].pause())}this._updateLayer(M)}}}},{key:"moveLayer",value:function(q,L){if(this._checkLoaded(),this._changed=!0,this._layers[q]){var I=this._order.indexOf(q);this._order.splice(I,1);var j=L?this._order.indexOf(L):this._order.length;L&&j===-1?this.fire("error",{error:new Error('Layer with id "'.concat(L,'" does not exist on this map.'))}):(this._order.splice(j,0,q),this._layerOrderChanged=!0)}else this.fire("error",{error:new Error("The layer '".concat(q,"' does not exist in ")+"the map's style and cannot be moved.")})}},{key:"removeLayer",value:function(q){this._checkLoaded();var L=this._layers[q];if(L){L.setEventedParent(null);var I=this._order.indexOf(q);this._order.splice(I,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=L,delete this._layers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q]}else this.fire("error",{error:new Error("The layer '".concat(q,"' does not exist in ")+"the map's style and cannot be removed.")})}},{key:"getLayer",value:function(q){return this._layers[q]}},{key:"setLayerZoomRange",value:function(q,L,I){this._checkLoaded();var j=this.getLayer(q);j?j.minzoom===L&&j.maxzoom===I||(L!=null&&(j.minzoom=L),I!=null&&(j.maxzoom=I),this._updateLayer(j)):this.fire("error",{error:new Error("The layer '".concat(q,"' does not exist in ")+"the map's style and cannot have zoom extent.")})}},{key:"setFilter",value:function(q,L){this._checkLoaded();var I=this.getLayer(q);if(I){if(!d.deepEqual(I.filter,L))return L==null?(I.filter=void 0,void this._updateLayer(I)):void(this._validate(s.filter,"layers.".concat(I.id,".filter"),L)||(I.filter=d.clone(L),this._updateLayer(I)))}else this.fire("error",{error:new Error("The layer '".concat(q,"' does not exist in ")+"the map's style and cannot be filtered.")})}},{key:"getFilter",value:function(q){return d.clone(this.getLayer(q).filter)}},{key:"setLayoutProperty",value:function(q,L,I){this._checkLoaded();var j=this.getLayer(q);j?d.deepEqual(j.getLayoutProperty(L),I)||(j.setLayoutProperty(L,I),this._updateLayer(j)):this.fire("error",{error:new Error("The layer '".concat(q,"' does not exist in ")+"the map's style and cannot be styled.")})}},{key:"getLayoutProperty",value:function(q,L){return this.getLayer(q).getLayoutProperty(L)}},{key:"setPaintProperty",value:function(q,L,I){this._checkLoaded();var j=this.getLayer(q);if(j){if(!d.deepEqual(j.getPaintProperty(L),I)){var M=j._transitionablePaint._values[L].value.isDataDriven();j.setPaintProperty(L,I),(j._transitionablePaint._values[L].value.isDataDriven()||M)&&this._updateLayer(j),this._changed=!0,this._updatedPaintProps[q]=!0}}else this.fire("error",{error:new Error("The layer '".concat(q,"' does not exist in ")+"the map's style and cannot be styled.")})}},{key:"getPaintProperty",value:function(q,L){return this.getLayer(q).getPaintProperty(L)}},{key:"getTransition",value:function(){return d.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}},{key:"serialize",value:function(){var q=this;return d.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:d.mapObject(this.sourceCaches,function(L){return L.serialize()}),layers:this._order.map(function(L){return q._layers[L].serialize()})},function(L){return L!==void 0})}},{key:"_updateLayer",value:function(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&(this._updatedSources[q.source]="reload",this.sourceCaches[q.source].pause()),this._changed=!0}},{key:"_flattenRenderedFeatures",value:function(q){for(var L=[],I=this._order.length-1;I>=0;I--){var j=this._order[I],M=!0,N=!1,V=void 0;try{for(var G,H=q[Symbol.iterator]();!(M=(G=H.next()).done);M=!0){var Y=G.value[j];if(Y){var $=!0,Q=!1,tt=void 0;try{for(var et,nt=Y[Symbol.iterator]();!($=(et=nt.next()).done);$=!0){var ot=et.value;L.push(ot)}}catch(it){Q=!0,tt=it}finally{try{$||nt.return==null||nt.return()}finally{if(Q)throw tt}}}}}catch(it){N=!0,V=it}finally{try{M||H.return==null||H.return()}finally{if(N)throw V}}}return L}},{key:"queryRenderedFeatures",value:function(q,L,I,j){L&&L.filter&&this._validate(s.filter,"queryRenderedFeatures.filter",L.filter);var M={};if(L&&L.layers){if(!Array.isArray(L.layers))return this.fire("error",{error:"parameters.layers must be an Array."}),[];var N=!0,V=!1,G=void 0;try{for(var H,Y=L.layers[Symbol.iterator]();!(N=(H=Y.next()).done);N=!0){var $=H.value,Q=this._layers[$];if(!Q)return this.fire("error",{error:"The layer '".concat($,"' does not exist ")+"in the map's style and cannot be queried for features."}),[];M[Q.source]=!0}}catch(ot){V=!0,G=ot}finally{try{N||Y.return==null||Y.return()}finally{if(V)throw G}}}var tt=[];for(var et in this.sourceCaches)if(!L.layers||M[et]){var nt=A.rendered(this.sourceCaches[et],this._layers,q,L,I,j,this.collisionIndex);tt.push(nt)}return this._flattenRenderedFeatures(tt)}},{key:"querySourceFeatures",value:function(q,L){L&&L.filter&&this._validate(s.filter,"querySourceFeatures.filter",L.filter);var I=this.sourceCaches[q];return I?A.source(I,L):[]}},{key:"addSourceType",value:function(q,L,I){return p(q)?I(new Error('A source type called "'.concat(q,'" already exists.'))):(w(q,L),L.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:q,url:L.workerSourceURL},I):I(null,null))}},{key:"getLight",value:function(){return this.light.getLight()}},{key:"setLight",value:function(q){this._checkLoaded();var L=this.light.getLight(),I=!1;for(var j in q)if(!d.deepEqual(q[j],L[j])){I=!0;break}if(I){var M={now:S.now(),transition:d.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(q),this.light.updateTransitions(M)}}},{key:"_validate",value:function(q,L,I,j,M){return(!M||M.validate!==!1)&&s.emitErrors(this,q.call(s,d.extend({key:L,style:this.serialize(),value:I,styleSpec:v},j)))}},{key:"_remove",value:function(){for(var q in C.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[q].clearTiles();this.dispatcher.remove()}},{key:"_clearSource",value:function(q){this.sourceCaches[q].clearTiles()}},{key:"_reloadSource",value:function(q){this.sourceCaches[q].resume(),this.sourceCaches[q].reload()}},{key:"_updateSources",value:function(q){for(var L in this.sourceCaches)this.sourceCaches[L].update(q)}},{key:"_generateCollisionBoxes",value:function(){for(var q in this.sourceCaches)this._reloadSource(q)}},{key:"_updatePlacement",value:function(q,L,I){var j=this,M=!1,N=!1,V={},G=!0,H=!1,Y=void 0;try{for(var $,Q=this._order[Symbol.iterator]();!(G=($=Q.next()).done);G=!0){var tt=$.value,et=this._layers[tt];if(et.type==="symbol"){V[et.source]||function(){var ft=j.sourceCaches[et.source];V[et.source]=ft.getRenderableIds().map(function(ht){return ft.getTileByID(ht)}).sort(function(ht,mt){return mt.tileID.overscaledZ-ht.tileID.overscaledZ||(ht.tileID.isLessThan(mt.tileID)?-1:1)})}();var nt=this.crossTileSymbolIndex.addLayer(et,V[et.source]);M=M||nt}}}catch(ft){H=!0,Y=ft}finally{try{G||Q.return==null||Q.return()}finally{if(H)throw Y}}var ot=this._layerOrderChanged;if((ot||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(S.now()))&&(this.pauseablePlacement=new z(q,this._order,ot,L,I),this._layerOrderChanged=!1),this.pauseablePlacement.isDone())this.placement.setStale();else{if(this.pauseablePlacement.continuePlacement(this._order,this._layers,V),this.pauseablePlacement.isDone()){var it=this.pauseablePlacement.placement;N=it.commit(this.placement,S.now()),(!this.placement||N||M)&&(this.placement=it,this.collisionIndex=this.placement.collisionIndex),this.placement.setRecent(S.now(),it.stale)}M&&this.pauseablePlacement.placement.setStale()}if(N||M){var at=!0,st=!1,rt=void 0;try{for(var lt,ct=this._order[Symbol.iterator]();!(at=(lt=ct.next()).done);at=!0){var ut=lt.value,pt=this._layers[ut];pt.type==="symbol"&&this.placement.updateLayerOpacities(pt,V[pt.source])}}catch(ft){st=!0,rt=ft}finally{try{at||ct.return==null||ct.return()}finally{if(st)throw rt}}}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(S.now())}},{key:"getImages",value:function(q,L,I){this.imageManager.getImages(L.icons,I)}},{key:"getGlyphs",value:function(q,L,I){this.glyphManager.getGlyphs(L.stacks,I)}}])&&e(R.prototype,U),K&&e(R,K),X}();O.exports=W},function(O,D,o){O.exports=o(141),O.exports.emitErrors=function(_,e){if(e&&e.length){var b=!0,g=!1,f=void 0;try{for(var c,u=e[Symbol.iterator]();!(b=(c=u.next()).done);b=!0){var i=c.value.message;_.fire("error",{error:new Error(i)})}}catch(a){g=!0,f=a}finally{try{b||u.return==null||u.return()}finally{if(g)throw f}}return!0}return!1}},function(O,D,o){function _(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}var e=o(1),b=o(78),g=o(25).Color,f=["Unknown","Point","LineString","Polygon"],c=function(){function u(){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,u),this.scope=new b,this._parseColorCache={}}var i,a,n;return i=u,(a=[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?typeof this.feature.type=="number"?f[this.feature.type]:this.feature.type:null}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"pushScope",value:function(t){this.scope=this.scope.concat(t)}},{key:"popScope",value:function(){e(this.scope.parent),this.scope=this.scope.parent}},{key:"parseColor",value:function(t){var r=this._parseColorCache[t];return r||(r=this._parseColorCache[t]=g.parse(t)),r}}])&&_(i.prototype,a),n&&_(i,n),u}();O.exports=c},function(O,D,o){function _(h){return function(m){if(Array.isArray(m)){for(var S=0,y=new Array(m.length);S<m.length;S++)y[S]=m[S];return y}}(h)||e(h)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(h){if(Symbol.iterator in Object(h)||Object.prototype.toString.call(h)==="[object Arguments]")return Array.from(h)}function b(h,m){return f(h)||function(S,y){var s=[],p=!0,w=!1,A=void 0;try{for(var k,v=S[Symbol.iterator]();!(p=(k=v.next()).done)&&(s.push(k.value),!y||s.length!==y);p=!0);}catch(x){w=!0,A=x}finally{try{p||v.return==null||v.return()}finally{if(w)throw A}}return s}(h,m)||g()}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function f(h){if(Array.isArray(h))return h}function c(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}var u=o(73),i=o(26),a=o(8),n=a.toString,t=a.NumberType,r=o(87).findStopLessThanOrEqualTo,l=function(){function h(s,p,w,A){(function(B,F){if(!(B instanceof F))throw new TypeError("Cannot call a class as a function")})(this,h),this.type=s,this.interpolation=p,this.input=w,this.labels=[],this.outputs=[];var k=!0,v=!1,x=void 0;try{for(var T,E=A[Symbol.iterator]();!(k=(T=E.next()).done);k=!0){var C=b(T.value,2),z=C[0],P=C[1];this.labels.push(z),this.outputs.push(P)}}catch(B){v=!0,x=B}finally{try{k||E.return==null||E.return()}finally{if(v)throw x}}}var m,S,y;return m=h,y=[{key:"interpolationFactor",value:function(s,p,w,A){var k=0;if(s.name==="exponential")k=d(p,s.base,w,A);else if(s.name==="linear")k=d(p,1,w,A);else if(s.name==="cubic-bezier"){var v=s.controlPoints;k=new u(v[0],v[1],v[2],v[3]).solve(d(p,1,w,A))}return k}},{key:"parse",value:function(s,p){var w,A=f(w=s)||e(w)||g(),k=A[1],v=A[2],x=A.slice(3);if(!Array.isArray(k)||k.length===0)return p.error("Expected an interpolation type expression.",1);if(k[0]==="linear")k={name:"linear"};else if(k[0]==="exponential"){var T=k[1];if(typeof T!="number")return p.error("Exponential interpolation requires a numeric base.",1,1);k={name:"exponential",base:T}}else{if(k[0]!=="cubic-bezier")return p.error("Unknown interpolation type ".concat(String(k[0])),1,0);var E=k.slice(1);if(E.length!==4||E.some(function(X){return typeof X!="number"||X<0||X>1}))return p.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);k={name:"cubic-bezier",controlPoints:E}}if(s.length-1<4)return p.error("Expected at least 4 arguments, but found only ".concat(s.length-1,"."));if((s.length-1)%2!=0)return p.error("Expected an even number of arguments.");if(!(v=p.parse(v,2,t)))return null;var C=[],z=null;p.expectedType&&p.expectedType.kind!=="value"&&(z=p.expectedType);for(var P=0;P<x.length;P+=2){var B=x[P],F=x[P+1],Z=P+3,W=P+4;if(typeof B!="number")return p.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Z);if(C.length&&C[C.length-1][0]>=B)return p.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Z);var J=p.parse(F,W,z);if(!J)return null;z=z||J.type,C.push([B,J])}return z.kind==="number"||z.kind==="color"||z.kind==="array"&&z.itemType.kind==="number"&&typeof z.N=="number"?new h(z,k,v,C):p.error("Type ".concat(n(z)," is not interpolatable."))}}],(S=[{key:"evaluate",value:function(s){var p=this.labels,w=this.outputs;if(p.length===1)return w[0].evaluate(s);var A=this.input.evaluate(s);if(A<=p[0])return w[0].evaluate(s);var k=p.length;if(A>=p[k-1])return w[k-1].evaluate(s);var v=r(p,A),x=p[v],T=p[v+1],E=h.interpolationFactor(this.interpolation,A,x,T),C=w[v].evaluate(s),z=w[v+1].evaluate(s);return i[this.type.kind.toLowerCase()](C,z,E)}},{key:"eachChild",value:function(s){s(this.input);var p=!0,w=!1,A=void 0;try{for(var k,v=this.outputs[Symbol.iterator]();!(p=(k=v.next()).done);p=!0)s(k.value)}catch(x){w=!0,A=x}finally{try{p||v.return==null||v.return()}finally{if(w)throw A}}}},{key:"possibleOutputs",value:function(){var s;return(s=[]).concat.apply(s,_(this.outputs.map(function(p){return p.possibleOutputs()})))}}])&&c(m.prototype,S),y&&c(m,y),h}();function d(h,m,S,y){var s=y-S,p=h-S;return s===0?0:m===1?p/s:(Math.pow(m,p)-1)/(Math.pow(m,s)-1)}O.exports=l},function(O,D,o){function _(h){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(h)}var e=o(147),b=o(12),g=o(41),f=o(17),c=o(26),u=o(56);function i(h){return h}function a(h,m,S){return h!==void 0?h:m!==void 0?m:S!==void 0?S:void 0}function n(h,m,S,y,s){return a(_(S)===s?y[S]:void 0,h.default,m.default)}function t(h,m,S){if(f(S)!=="number")return a(h.default,m.default);var y=h.stops.length;if(y===1||S<=h.stops[0][0])return h.stops[0][1];if(S>=h.stops[y-1][0])return h.stops[y-1][1];var s=d(h.stops,S);return h.stops[s][1]}function r(h,m,S){var y=h.base!==void 0?h.base:1;if(f(S)!=="number")return a(h.default,m.default);var s=h.stops.length;if(s===1||S<=h.stops[0][0])return h.stops[0][1];if(S>=h.stops[s-1][0])return h.stops[s-1][1];var p=d(h.stops,S),w=function(T,E,C,z){var P=z-C,B=T-C;return P===0?0:E===1?B/P:(Math.pow(E,B)-1)/(Math.pow(E,P)-1)}(S,y,h.stops[p][0],h.stops[p+1][0]),A=h.stops[p][1],k=h.stops[p+1][1],v=c[m.type]||i;if(h.colorSpace&&h.colorSpace!=="rgb"){var x=e[h.colorSpace];v=function(T,E){return x.reverse(x.interpolate(x.forward(T),x.forward(E),w))}}return typeof A.evaluate=="function"?{evaluate:function(){for(var T=arguments.length,E=new Array(T),C=0;C<T;C++)E[C]=arguments[C];var z=A.evaluate.apply(void 0,E),P=k.evaluate.apply(void 0,E);if(z!==void 0&&P!==void 0)return v(z,P,w)}}:v(A,k,w)}function l(h,m,S){return m.type==="color"?S=b.parse(S):f(S)===m.type||m.type==="enum"&&m.values[S]||(S=void 0),a(S,h.default,m.default)}function d(h,m){for(var S,y,s=0,p=h.length-1,w=0;s<=p;){if(S=h[w=Math.floor((s+p)/2)][0],y=h[w+1][0],m===S||m>S&&m<y)return w;S<m?s=w+1:S>m&&(p=w-1)}return Math.max(w-1,0)}O.exports={createFunction:function h(m,S){var y,s,p,w=S.type==="color",A=m.stops&&_(m.stops[0][0])==="object",k=A||m.property!==void 0,v=A||!k,x=m.type||(S.function==="interpolated"?"exponential":"interval");if(w&&((m=g({},m)).stops&&(m.stops=m.stops.map(function(L){return[L[0],b.parse(L[1])]})),m.default?m.default=b.parse(m.default):m.default=b.parse(S.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!e[m.colorSpace])throw new Error("Unknown color space: ".concat(m.colorSpace));if(x==="exponential")y=r;else if(x==="interval")y=t;else if(x==="categorical"){y=n,s=Object.create(null);var T=!0,E=!1,C=void 0;try{for(var z,P=m.stops[Symbol.iterator]();!(T=(z=P.next()).done);T=!0){var B=z.value;s[B[0]]=B[1]}}catch(L){E=!0,C=L}finally{try{T||P.return==null||P.return()}finally{if(E)throw C}}p=_(m.stops[0][0])}else{if(x!=="identity")throw new Error('Unknown function type "'.concat(x,'"'));y=l}if(A){for(var F={},Z=[],W=0;W<m.stops.length;W++){var J=m.stops[W],X=J[0].zoom;F[X]===void 0&&(F[X]={zoom:X,type:m.type,property:m.property,default:m.default,stops:[]},Z.push(X)),F[X].stops.push([J[0].value,J[1]])}for(var R=[],U=0,K=Z;U<K.length;U++){var q=K[U];R.push([F[q].zoom,h(F[q],S)])}return{kind:"composite",interpolationFactor:u.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:R.map(function(L){return L[0]}),evaluate:function(L,I){var j=L.zoom;return r({stops:R,base:m.base},S,j).evaluate(j,I)}}}return v?{kind:"camera",interpolationFactor:x==="exponential"?u.interpolationFactor.bind(void 0,{name:"exponential",base:m.base!==void 0?m.base:1}):function(){return 0},zoomStops:m.stops.map(function(L){return L[0]}),evaluate:function(L){var I=L.zoom;return y(m,S,I,s,p)}}:{kind:"source",evaluate:function(L,I){var j=I&&I.properties?I.properties[m.property]:void 0;return j===void 0?a(m.default,S.default):y(m,S,j,s,p)}}},isFunction:function(h){return _(h)==="object"&&h!==null&&!Array.isArray(h)}}},function(O,D,o){var _=o(7),e=o(24);O.exports=function(b){var g=b.key,f=b.value,c=b.valueSpec,u=[];return Array.isArray(c.values)?c.values.indexOf(e(f))===-1&&u.push(new _(g,f,"expected one of [".concat(c.values.join(", "),"], ").concat(JSON.stringify(f)," found"))):Object.keys(c.values).indexOf(e(f))===-1&&u.push(new _(g,f,"expected one of [".concat(Object.keys(c.values).join(", "),"], ").concat(JSON.stringify(f)," found"))),u}},function(O,D,o){var _=o(7),e=o(94),b=o(58),g=o(17),f=o(24),c=o(41),u=o(60).isExpressionFilter;O.exports=function(i){return u(f.deep(i.value))?e(c({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function a(n){var t=n.value,r=n.key;if(g(t)!=="array")return[new _(r,t,"array expected, ".concat(g(t)," found"))];var l=n.styleSpec,d,h=[];if(t.length<1)return[new _(r,t,"filter array must have at least 1 element")];switch(h=h.concat(b({key:"".concat(r,"[0]"),value:t[0],valueSpec:l.filter_operator,style:n.style,styleSpec:n.styleSpec})),f(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&f(t[1])==="$type"&&h.push(new _(r,t,'"$type" cannot be use with operator "'.concat(t[0],'"')));case"==":case"!=":t.length!==3&&h.push(new _(r,t,'filter array for operator "'.concat(t[0],'" must have 3 elements')));case"in":case"!in":t.length>=2&&(d=g(t[1]))!=="string"&&h.push(new _("".concat(r,"[1]"),t[1],"string expected, ".concat(d," found")));for(var m=2;m<t.length;m++)d=g(t[m]),f(t[1])==="$type"?h=h.concat(b({key:"".concat(r,"[").concat(m,"]"),value:t[m],valueSpec:l.geometry_type,style:n.style,styleSpec:n.styleSpec})):d!=="string"&&d!=="number"&&d!=="boolean"&&h.push(new _("".concat(r,"[").concat(m,"]"),t[m],"string, number, or boolean expected, ".concat(d," found")));break;case"any":case"all":case"none":for(var S=1;S<t.length;S++)h=h.concat(a({key:"".concat(r,"[").concat(S,"]"),value:t[S],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":d=g(t[1]),t.length!==2?h.push(new _(r,t,'filter array for "'.concat(t[0],'" operator must have 2 elements'))):d!=="string"&&h.push(new _("".concat(r,"[1]"),t[1],"string expected, ".concat(d," found")))}return h}(i)}},function(O,D,o){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}var e=o(30).createExpression;function b(t){if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length===3&&(Array.isArray(t[1])||Array.isArray(t[2]));case"any":case"all":var r=!0,l=!1,d=void 0;try{for(var h,m=t.slice(1)[Symbol.iterator]();!(r=(h=m.next()).done);r=!0){var S=h.value;if(!b(S)&&typeof S!="boolean")return!1}}catch(y){l=!0,d=y}finally{try{r||m.return==null||m.return()}finally{if(l)throw d}}return!0;default:return!0}}O.exports=function(t){if(!t)return function(){return!0};b(t)||(t=c(t));var r=e(t,g);if(r.result==="error")throw new Error(r.value.map(function(l){return"".concat(l.key,": ").concat(l.message)}).join(", "));return function(l,d){return r.value.evaluate(l,d)}},O.exports.isExpressionFilter=b;var g={type:"boolean",default:!1,function:!0,"property-function":!0,"zoom-function":!0};function f(t,r){return t<r?-1:t>r?1:0}function c(t){if(!t)return!0;var r,l=t[0];return t.length<=1?l!=="any":l==="=="?u(t[1],t[2],"=="):l==="!="?n(u(t[1],t[2],"==")):l==="<"||l===">"||l==="<="||l===">="?u(t[1],t[2],l):l==="any"?(r=t.slice(1),["any"].concat(r.map(c))):l==="all"?["all"].concat(t.slice(1).map(c)):l==="none"?["all"].concat(t.slice(1).map(c).map(n)):l==="in"?i(t[1],t.slice(2)):l==="!in"?n(i(t[1],t.slice(2))):l==="has"?a(t[1]):l!=="!has"||n(a(t[1]))}function u(t,r,l){switch(t){case"$type":return["filter-type-".concat(l),r];case"$id":return["filter-id-".concat(l),r];default:return["filter-".concat(l),t,r]}}function i(t,r){if(r.length===0)return!1;switch(t){case"$type":return["filter-type-in",["literal",r]];case"$id":return["filter-id-in",["literal",r]];default:return r.length>200&&!r.some(function(l){return _(l)!==_(r[0])})?["filter-in-large",t,["literal",r.sort(f)]]:["filter-in-small",t,["literal",r]]}}function a(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function n(t){return["!",t]}},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(108),b=function(){function g(i,a){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,g),this.zoom=i,a?(this.now=a.now,this.fadeDuration=a.fadeDuration,this.zoomHistory=a.zoomHistory,this.transition=a.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new e,this.transition={})}var f,c,u;return f=g,(c=[{key:"crossFadingFactor",value:function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D,o){function _(q,L){if(!(q instanceof L))throw new TypeError("Cannot call a class as a function")}function e(q,L){for(var I=0;I<L.length;I++){var j=L[I];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(q,j.key,j)}}function b(q,L,I){return L&&e(q.prototype,L),I&&e(q,I),q}var g=o(175),f=g.symbolLayoutAttributes,c=g.collisionVertexAttributes,u=g.collisionBoxLayout,i=g.collisionCircleLayout,a=g.dynamicLayoutAttributes,n=o(14),t=n.SymbolLayoutArray,r=n.SymbolDynamicLayoutArray,l=n.SymbolOpacityArray,d=n.CollisionBoxLayoutArray,h=n.CollisionCircleLayoutArray,m=n.CollisionVertexArray,S=n.PlacedSymbolArray,y=n.GlyphOffsetArray,s=n.SymbolLineVertexArray,p=o(3),w=o(36).SegmentVector,A=o(32).ProgramConfigurationSet,k=o(37),v=k.TriangleIndexArray,x=k.LineIndexArray,T=o(176),E=o(177),C=o(63),z=o(38),P=o(48).VectorTileFeature.types,B=o(110),F=(o(178),o(50).getSizeData),Z=o(11).register,W=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function J(q,L,I,j,M,N,V,G){q.emplaceBack(L,I,Math.round(64*j),Math.round(64*M),N,V,G?G[0]:0,G?G[1]:0)}function X(q,L,I){q.emplaceBack(L.x,L.y,I),q.emplaceBack(L.x,L.y,I),q.emplaceBack(L.x,L.y,I),q.emplaceBack(L.x,L.y,I)}var R=function(){function q(L){_(this,q),this.layoutVertexArray=new t,this.indexArray=new v,this.programConfigurations=L,this.segments=new w,this.dynamicLayoutVertexArray=new r,this.opacityVertexArray=new l,this.placedSymbolArray=new S}return b(q,[{key:"upload",value:function(L,I){this.layoutVertexBuffer=L.createVertexBuffer(this.layoutVertexArray,f.members),this.indexBuffer=L.createIndexBuffer(this.indexArray,I),this.programConfigurations.upload(L),this.dynamicLayoutVertexBuffer=L.createVertexBuffer(this.dynamicLayoutVertexArray,a.members,!0),this.opacityVertexBuffer=L.createVertexBuffer(this.opacityVertexArray,W,!0),this.opacityVertexBuffer.itemSize=1}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}]),q}();Z("SymbolBuffers",R);var U=function(){function q(L,I,j){_(this,q),this.layoutVertexArray=new L,this.layoutAttributes=I,this.indexArray=new j,this.segments=new w,this.collisionVertexArray=new m}return b(q,[{key:"upload",value:function(L){this.layoutVertexBuffer=L.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=L.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=L.createVertexBuffer(this.collisionVertexArray,c.members,!0)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}]),q}();Z("CollisionBuffers",U);var K=function(){function q(L){_(this,q),this.collisionBoxArray=L.collisionBoxArray,this.zoom=L.zoom,this.overscaling=L.overscaling,this.layers=L.layers,this.layerIds=this.layers.map(function(M){return M.id}),this.index=L.index,this.pixelRatio=L.pixelRatio;var I=this.layers[0]._unevaluatedLayout._values;this.textSizeData=F(this.zoom,I["text-size"]),this.iconSizeData=F(this.zoom,I["icon-size"]);var j=this.layers[0].layout;this.sortFeaturesByY=j.get("text-allow-overlap")||j.get("icon-allow-overlap")||j.get("text-ignore-placement")||j.get("icon-ignore-placement")}return b(q,[{key:"createArrays",value:function(){this.text=new R(new A(f.members,this.layers,this.zoom,function(L){return/^text/.test(L)})),this.icon=new R(new A(f.members,this.layers,this.zoom,function(L){return/^icon/.test(L)})),this.collisionBox=new U(d,u.members,x),this.collisionCircle=new U(h,i.members,v),this.glyphOffsetArray=new y,this.lineVertexArray=new s}},{key:"populate",value:function(L,I){var j=this.layers[0],M=j.layout,N=M.get("text-font"),V=M.get("text-field"),G=M.get("icon-image"),H=(V.value.kind!=="constant"||V.value.value.length>0)&&(N.value.kind!=="constant"||N.value.value.length>0),Y=G.value.kind!=="constant"||G.value.value&&G.value.value.length>0;if(this.features=[],H||Y){var $=I.iconDependencies,Q=I.glyphDependencies,tt={zoom:this.zoom},et=!0,nt=!1,ot=void 0;try{for(var it,at=L[Symbol.iterator]();!(et=(it=at.next()).done);et=!0){var st=it.value,rt=st.feature,lt=st.index,ct=st.sourceLayerIndex;if(j._featureFilter(tt,rt)){var ut=void 0;H&&(ut=j.getValueAndResolveTokens("text-field",rt),ut=T(ut,j,rt));var pt=void 0;if(Y&&(pt=j.getValueAndResolveTokens("icon-image",rt)),ut||pt){var ft={text:ut,icon:pt,index:lt,sourceLayerIndex:ct,geometry:z(rt),properties:rt.properties,type:P[rt.type]};if(rt.id!==void 0&&(ft.id=rt.id),this.features.push(ft),pt&&($[pt]=!0),ut){for(var ht=N.evaluate(rt).join(","),mt=Q[ht]=Q[ht]||{},dt=M.get("text-rotation-alignment")==="map"&&M.get("symbol-placement")==="line",vt=C.allowsVerticalWritingMode(ut),yt=0;yt<ut.length;yt++)if(mt[ut.charCodeAt(yt)]=!0,dt&&vt){var gt=B.lookup[ut.charAt(yt)];gt&&(mt[gt.charCodeAt(0)]=!0)}}}}}}catch(bt){nt=!0,ot=bt}finally{try{et||at.return==null||at.return()}finally{if(nt)throw ot}}M.get("symbol-placement")==="line"&&(this.features=E(this.features))}}},{key:"isEmpty",value:function(){return this.symbolInstances.length===0}},{key:"upload",value:function(L){this.text.upload(L,this.sortFeaturesByY),this.icon.upload(L,this.sortFeaturesByY),this.collisionBox.upload(L),this.collisionCircle.upload(L)}},{key:"destroy",value:function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()}},{key:"addToLineVertexArray",value:function(L,I){var j=this.lineVertexArray.length;if(L.segment!==void 0){for(var M=L.dist(I[L.segment+1]),N=L.dist(I[L.segment]),V={},G=L.segment+1;G<I.length;G++)V[G]={x:I[G].x,y:I[G].y,tileUnitDistanceFromAnchor:M},G<I.length-1&&(M+=I[G+1].dist(I[G]));for(var H=L.segment||0;H>=0;H--)V[H]={x:I[H].x,y:I[H].y,tileUnitDistanceFromAnchor:N},H>0&&(N+=I[H-1].dist(I[H]));for(var Y=0;Y<I.length;Y++){var $=V[Y];this.lineVertexArray.emplaceBack($.x,$.y,$.tileUnitDistanceFromAnchor)}}return{lineStartIndex:j,lineLength:this.lineVertexArray.length-j}}},{key:"addSymbols",value:function(L,I,j,M,N,V,G,H,Y,$){var Q=L.indexArray,tt=L.layoutVertexArray,et=L.dynamicLayoutVertexArray,nt=L.segments.prepareSegment(4*I.length,L.layoutVertexArray,L.indexArray),ot=this.glyphOffsetArray.length,it=nt.vertexLength,at=!0,st=!1,rt=void 0;try{for(var lt,ct=I[Symbol.iterator]();!(at=(lt=ct.next()).done);at=!0){var ut=lt.value,pt=ut.tl,ft=ut.tr,ht=ut.bl,mt=ut.br,dt=ut.tex,vt=nt.vertexLength,yt=ut.glyphOffset[1];J(tt,H.x,H.y,pt.x,yt+pt.y,dt.x,dt.y,j),J(tt,H.x,H.y,ft.x,yt+ft.y,dt.x+dt.w,dt.y,j),J(tt,H.x,H.y,ht.x,yt+ht.y,dt.x,dt.y+dt.h,j),J(tt,H.x,H.y,mt.x,yt+mt.y,dt.x+dt.w,dt.y+dt.h,j),X(et,H,0),Q.emplaceBack(vt,vt+1,vt+2),Q.emplaceBack(vt+1,vt+2,vt+3),nt.vertexLength+=4,nt.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ut.glyphOffset[0])}}catch(gt){st=!0,rt=gt}finally{try{at||ct.return==null||ct.return()}finally{if(st)throw rt}}L.placedSymbolArray.emplaceBack(H.x,H.y,ot,this.glyphOffsetArray.length-ot,it,Y,$,H.segment,j?j[0]:0,j?j[1]:0,M[0],M[1],G,!1),L.programConfigurations.populatePaintArrays(L.layoutVertexArray.length,V)}},{key:"_addCollisionDebugVertex",value:function(L,I,j,M,N){return I.emplaceBack(0,0),L.emplaceBack(j.x,j.y,M.x,M.y,Math.round(N.x),Math.round(N.y))}},{key:"addCollisionDebugVertices",value:function(L,I,j,M,N,V,G,H){var Y=N.segments.prepareSegment(4,N.layoutVertexArray,N.indexArray),$=Y.vertexLength,Q=N.layoutVertexArray,tt=N.collisionVertexArray;if(this._addCollisionDebugVertex(Q,tt,V,G.anchor,new p(L,I)),this._addCollisionDebugVertex(Q,tt,V,G.anchor,new p(j,I)),this._addCollisionDebugVertex(Q,tt,V,G.anchor,new p(j,M)),this._addCollisionDebugVertex(Q,tt,V,G.anchor,new p(L,M)),Y.vertexLength+=4,H){var et=N.indexArray;et.emplaceBack($,$+1,$+2),et.emplaceBack($,$+2,$+3),Y.primitiveLength+=2}else{var nt=N.indexArray;nt.emplaceBack($,$+1),nt.emplaceBack($+1,$+2),nt.emplaceBack($+2,$+3),nt.emplaceBack($+3,$),Y.primitiveLength+=4}}},{key:"generateCollisionDebugBuffers",value:function(){var L=!0,I=!1,j=void 0;try{for(var M,N=this.symbolInstances[Symbol.iterator]();!(L=(M=N.next()).done);L=!0){var V=M.value;V.textCollisionFeature={boxStartIndex:V.textBoxStartIndex,boxEndIndex:V.textBoxEndIndex},V.iconCollisionFeature={boxStartIndex:V.iconBoxStartIndex,boxEndIndex:V.iconBoxEndIndex};for(var G=0;G<2;G++){var H=V[G===0?"textCollisionFeature":"iconCollisionFeature"];if(H)for(var Y=H.boxStartIndex;Y<H.boxEndIndex;Y++){var $=this.collisionBoxArray.get(Y),Q=$.x1,tt=$.y1,et=$.x2,nt=$.y2,ot=$.radius>0;this.addCollisionDebugVertices(Q,tt,et,nt,ot?this.collisionCircle:this.collisionBox,$.anchorPoint,V,ot)}}}}catch(it){I=!0,j=it}finally{try{L||N.return==null||N.return()}finally{if(I)throw j}}}},{key:"deserializeCollisionBoxes",value:function(L,I,j,M,N){for(var V={},G=I;G<j;G++){var H=L.get(G);if(H.radius===0){V.textBox={x1:H.x1,y1:H.y1,x2:H.x2,y2:H.y2,anchorPointX:H.anchorPointX,anchorPointY:H.anchorPointY};break}V.textCircles||(V.textCircles=[]),V.textCircles.push(H.anchorPointX,H.anchorPointY,H.radius,H.signedDistanceFromAnchor,1)}for(var Y=M;Y<N;Y++){var $=L.get(Y);if($.radius===0){V.iconBox={x1:$.x1,y1:$.y1,x2:$.x2,y2:$.y2,anchorPointX:$.anchorPointX,anchorPointY:$.anchorPointY};break}}return V}},{key:"hasTextData",value:function(){return this.text.segments.get().length>0}},{key:"hasIconData",value:function(){return this.icon.segments.get().length>0}},{key:"hasCollisionBoxData",value:function(){return this.collisionBox.segments.get().length>0}},{key:"hasCollisionCircleData",value:function(){return this.collisionCircle.segments.get().length>0}},{key:"sortFeatures",value:function(L){var I=this;if(this.sortFeaturesByY&&this.sortedAngle!==L&&(this.sortedAngle=L,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var j=[],M=0;M<this.symbolInstances.length;M++)j.push(M);var N=Math.sin(L),V=Math.cos(L);j.sort(function(ut,pt){var ft=I.symbolInstances[ut],ht=I.symbolInstances[pt];return(N*ft.anchor.x+V*ft.anchor.y|0)-(N*ht.anchor.x+V*ht.anchor.y|0)||ht.featureIndex-ft.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear();for(var G=0,H=j;G<H.length;G++){var Y=H[G],$=this.symbolInstances[Y],Q=!0,tt=!1,et=void 0;try{for(var nt,ot=$.placedTextSymbolIndices[Symbol.iterator]();!(Q=(nt=ot.next()).done);Q=!0)for(var it=nt.value,at=this.text.placedSymbolArray.get(it),st=at.vertexStartIndex+4*at.numGlyphs,rt=at.vertexStartIndex;rt<st;rt+=4)this.text.indexArray.emplaceBack(rt,rt+1,rt+2),this.text.indexArray.emplaceBack(rt+1,rt+2,rt+3)}catch(ut){tt=!0,et=ut}finally{try{Q||ot.return==null||ot.return()}finally{if(tt)throw et}}var lt=this.icon.placedSymbolArray.get(Y);if(lt.numGlyphs){var ct=lt.vertexStartIndex;this.icon.indexArray.emplaceBack(ct,ct+1,ct+2),this.icon.indexArray.emplaceBack(ct+1,ct+2,ct+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}]),q}();Z("SymbolBucket",K,{omit:["layers","collisionBoxArray","features","compareText"],shallow:["symbolInstances"]}),K.MAX_GLYPHS=65535,K.addDynamicAttributes=X,O.exports=K},function(O,D,o){var _=o(109);O.exports.allowsIdeographicBreaking=function(e){var b=!0,g=!1,f=void 0;try{for(var c,u=e[Symbol.iterator]();!(b=(c=u.next()).done);b=!0){var i=c.value;if(!D.charAllowsIdeographicBreaking(i.charCodeAt(0)))return!1}}catch(a){g=!0,f=a}finally{try{b||u.return==null||u.return()}finally{if(g)throw f}}return!0},O.exports.allowsVerticalWritingMode=function(e){var b=!0,g=!1,f=void 0;try{for(var c,u=e[Symbol.iterator]();!(b=(c=u.next()).done);b=!0){var i=c.value;if(D.charHasUprightVerticalOrientation(i.charCodeAt(0)))return!0}}catch(a){g=!0,f=a}finally{try{b||u.return==null||u.return()}finally{if(g)throw f}}return!1},O.exports.allowsLetterSpacing=function(e){var b=!0,g=!1,f=void 0;try{for(var c,u=e[Symbol.iterator]();!(b=(c=u.next()).done);b=!0){var i=c.value;if(!D.charAllowsLetterSpacing(i.charCodeAt(0)))return!1}}catch(a){g=!0,f=a}finally{try{b||u.return==null||u.return()}finally{if(g)throw f}}return!0},O.exports.charAllowsLetterSpacing=function(e){return!_.Arabic(e)&&!_["Arabic Supplement"](e)&&!_["Arabic Extended-A"](e)&&!_["Arabic Presentation Forms-A"](e)&&!_["Arabic Presentation Forms-B"](e)},O.exports.charAllowsIdeographicBreaking=function(e){return!(e<11904)&&(!!_["Bopomofo Extended"](e)||!!_.Bopomofo(e)||!!_["CJK Compatibility Forms"](e)||!!_["CJK Compatibility Ideographs"](e)||!!_["CJK Compatibility"](e)||!!_["CJK Radicals Supplement"](e)||!!_["CJK Strokes"](e)||!!_["CJK Symbols and Punctuation"](e)||!!_["CJK Unified Ideographs Extension A"](e)||!!_["CJK Unified Ideographs"](e)||!!_["Enclosed CJK Letters and Months"](e)||!!_["Halfwidth and Fullwidth Forms"](e)||!!_.Hiragana(e)||!!_["Ideographic Description Characters"](e)||!!_["Kangxi Radicals"](e)||!!_["Katakana Phonetic Extensions"](e)||!!_.Katakana(e)||!!_["Vertical Forms"](e)||!!_["Yi Radicals"](e)||!!_["Yi Syllables"](e))},D.charHasUprightVerticalOrientation=function(e){return e===746||e===747||!(e<4352)&&(!!_["Bopomofo Extended"](e)||!!_.Bopomofo(e)||!(!_["CJK Compatibility Forms"](e)||e>=65097&&e<=65103)||!!_["CJK Compatibility Ideographs"](e)||!!_["CJK Compatibility"](e)||!!_["CJK Radicals Supplement"](e)||!!_["CJK Strokes"](e)||!(!_["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||e===12336)||!!_["CJK Unified Ideographs Extension A"](e)||!!_["CJK Unified Ideographs"](e)||!!_["Enclosed CJK Letters and Months"](e)||!!_["Hangul Compatibility Jamo"](e)||!!_["Hangul Jamo Extended-A"](e)||!!_["Hangul Jamo Extended-B"](e)||!!_["Hangul Jamo"](e)||!!_["Hangul Syllables"](e)||!!_.Hiragana(e)||!!_["Ideographic Description Characters"](e)||!!_.Kanbun(e)||!!_["Kangxi Radicals"](e)||!!_["Katakana Phonetic Extensions"](e)||!(!_.Katakana(e)||e===12540)||!(!_["Halfwidth and Fullwidth Forms"](e)||e===65288||e===65289||e===65293||e>=65306&&e<=65310||e===65339||e===65341||e===65343||e>=65371&&e<=65503||e===65507||e>=65512&&e<=65519)||!(!_["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||!!_["Unified Canadian Aboriginal Syllabics"](e)||!!_["Unified Canadian Aboriginal Syllabics Extended"](e)||!!_["Vertical Forms"](e)||!!_["Yijing Hexagram Symbols"](e)||!!_["Yi Syllables"](e)||!!_["Yi Radicals"](e))},D.charHasNeutralVerticalOrientation=function(e){return!(!_["Latin-1 Supplement"](e)||e!==167&&e!==169&&e!==174&&e!==177&&e!==188&&e!==189&&e!==190&&e!==215&&e!==247)||!(!_["General Punctuation"](e)||e!==8214&&e!==8224&&e!==8225&&e!==8240&&e!==8241&&e!==8251&&e!==8252&&e!==8258&&e!==8263&&e!==8264&&e!==8265&&e!==8273)||!!_["Letterlike Symbols"](e)||!!_["Number Forms"](e)||!(!_["Miscellaneous Technical"](e)||!(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215))||!(!_["Control Pictures"](e)||e===9251)||!!_["Optical Character Recognition"](e)||!!_["Enclosed Alphanumerics"](e)||!!_["Geometric Shapes"](e)||!(!_["Miscellaneous Symbols"](e)||e>=9754&&e<=9759)||!(!_["Miscellaneous Symbols and Arrows"](e)||!(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243))||!!_["CJK Symbols and Punctuation"](e)||!!_.Katakana(e)||!!_["Private Use Area"](e)||!!_["CJK Compatibility Forms"](e)||!!_["Small Form Variants"](e)||!!_["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533},D.charHasRotatedVerticalOrientation=function(e){return!(D.charHasUprightVerticalOrientation(e)||D.charHasNeutralVerticalOrientation(e))}},function(O,D){O.exports={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null}},function(O,D,o){"use strict";O.exports=e;var _=o(190);function e(y){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(y)?y:new Uint8Array(y||0),this.pos=0,this.type=0,this.length=this.buf.length}e.Varint=0,e.Fixed64=1,e.Bytes=2,e.Fixed32=5;function b(y){return y.type===e.Bytes?y.readVarint()+y.pos:y.pos+1}function g(y,s,p){return p?4294967296*s+(y>>>0):4294967296*(s>>>0)+(y>>>0)}function f(y,s,p){var w=s<=16383?1:s<=2097151?2:s<=268435455?3:Math.floor(Math.log(s)/(7*Math.LN2));p.realloc(w);for(var A=p.pos-1;A>=y;A--)p.buf[A+w]=p.buf[A]}function c(y,s){for(var p=0;p<y.length;p++)s.writeVarint(y[p])}function u(y,s){for(var p=0;p<y.length;p++)s.writeSVarint(y[p])}function i(y,s){for(var p=0;p<y.length;p++)s.writeFloat(y[p])}function a(y,s){for(var p=0;p<y.length;p++)s.writeDouble(y[p])}function n(y,s){for(var p=0;p<y.length;p++)s.writeBoolean(y[p])}function t(y,s){for(var p=0;p<y.length;p++)s.writeFixed32(y[p])}function r(y,s){for(var p=0;p<y.length;p++)s.writeSFixed32(y[p])}function l(y,s){for(var p=0;p<y.length;p++)s.writeFixed64(y[p])}function d(y,s){for(var p=0;p<y.length;p++)s.writeSFixed64(y[p])}function h(y,s){return(y[s]|y[s+1]<<8|y[s+2]<<16)+16777216*y[s+3]}function m(y,s,p){y[p]=s,y[p+1]=s>>>8,y[p+2]=s>>>16,y[p+3]=s>>>24}function S(y,s){return(y[s]|y[s+1]<<8|y[s+2]<<16)+(y[s+3]<<24)}e.prototype={destroy:function(){this.buf=null},readFields:function(y,s,p){for(p=p||this.length;this.pos<p;){var w=this.readVarint(),A=w>>3,k=this.pos;this.type=7&w,y(A,s,this),this.pos===k&&this.skip(w)}return s},readMessage:function(y,s){return this.readFields(y,s,this.readVarint()+this.pos)},readFixed32:function(){var y=h(this.buf,this.pos);return this.pos+=4,y},readSFixed32:function(){var y=S(this.buf,this.pos);return this.pos+=4,y},readFixed64:function(){var y=h(this.buf,this.pos)+4294967296*h(this.buf,this.pos+4);return this.pos+=8,y},readSFixed64:function(){var y=h(this.buf,this.pos)+4294967296*S(this.buf,this.pos+4);return this.pos+=8,y},readFloat:function(){var y=_.read(this.buf,this.pos,!0,23,4);return this.pos+=4,y},readDouble:function(){var y=_.read(this.buf,this.pos,!0,52,8);return this.pos+=8,y},readVarint:function(y){var s,p,w=this.buf;return s=127&(p=w[this.pos++]),p<128?s:(s|=(127&(p=w[this.pos++]))<<7,p<128?s:(s|=(127&(p=w[this.pos++]))<<14,p<128?s:(s|=(127&(p=w[this.pos++]))<<21,p<128?s:function(A,k,v){var x,T,E=v.buf;if(T=E[v.pos++],x=(112&T)>>4,T<128||(T=E[v.pos++],x|=(127&T)<<3,T<128)||(T=E[v.pos++],x|=(127&T)<<10,T<128)||(T=E[v.pos++],x|=(127&T)<<17,T<128)||(T=E[v.pos++],x|=(127&T)<<24,T<128)||(T=E[v.pos++],x|=(1&T)<<31,T<128))return g(A,x,k);throw new Error("Expected varint not more than 10 bytes")}(s|=(15&(p=w[this.pos]))<<28,y,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var y=this.readVarint();return y%2==1?(y+1)/-2:y/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var y=this.readVarint()+this.pos,s=function(p,w,A){for(var k="",v=w;v<A;){var x,T,E,C=p[v],z=null,P=C>239?4:C>223?3:C>191?2:1;if(v+P>A)break;P===1?C<128&&(z=C):P===2?(192&(x=p[v+1]))==128&&(z=(31&C)<<6|63&x)<=127&&(z=null):P===3?(x=p[v+1],T=p[v+2],(192&x)==128&&(192&T)==128&&((z=(15&C)<<12|(63&x)<<6|63&T)<=2047||z>=55296&&z<=57343)&&(z=null)):P===4&&(x=p[v+1],T=p[v+2],E=p[v+3],(192&x)==128&&(192&T)==128&&(192&E)==128&&((z=(15&C)<<18|(63&x)<<12|(63&T)<<6|63&E)<=65535||z>=1114112)&&(z=null)),z===null?(z=65533,P=1):z>65535&&(z-=65536,k+=String.fromCharCode(z>>>10&1023|55296),z=56320|1023&z),k+=String.fromCharCode(z),v+=P}return k}(this.buf,this.pos,y);return this.pos=y,s},readBytes:function(){var y=this.readVarint()+this.pos,s=this.buf.subarray(this.pos,y);return this.pos=y,s},readPackedVarint:function(y,s){if(this.type!==e.Bytes)return y.push(this.readVarint(s));var p=b(this);for(y=y||[];this.pos<p;)y.push(this.readVarint(s));return y},readPackedSVarint:function(y){if(this.type!==e.Bytes)return y.push(this.readSVarint());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readSVarint());return y},readPackedBoolean:function(y){if(this.type!==e.Bytes)return y.push(this.readBoolean());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readBoolean());return y},readPackedFloat:function(y){if(this.type!==e.Bytes)return y.push(this.readFloat());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readFloat());return y},readPackedDouble:function(y){if(this.type!==e.Bytes)return y.push(this.readDouble());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readDouble());return y},readPackedFixed32:function(y){if(this.type!==e.Bytes)return y.push(this.readFixed32());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readFixed32());return y},readPackedSFixed32:function(y){if(this.type!==e.Bytes)return y.push(this.readSFixed32());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readSFixed32());return y},readPackedFixed64:function(y){if(this.type!==e.Bytes)return y.push(this.readFixed64());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readFixed64());return y},readPackedSFixed64:function(y){if(this.type!==e.Bytes)return y.push(this.readSFixed64());var s=b(this);for(y=y||[];this.pos<s;)y.push(this.readSFixed64());return y},skip:function(y){var s=7&y;if(s===e.Varint)for(;this.buf[this.pos++]>127;);else if(s===e.Bytes)this.pos=this.readVarint()+this.pos;else if(s===e.Fixed32)this.pos+=4;else{if(s!==e.Fixed64)throw new Error("Unimplemented type: "+s);this.pos+=8}},writeTag:function(y,s){this.writeVarint(y<<3|s)},realloc:function(y){for(var s=this.length||16;s<this.pos+y;)s*=2;if(s!==this.length){var p=new Uint8Array(s);p.set(this.buf),this.buf=p,this.length=s}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(y){this.realloc(4),m(this.buf,y,this.pos),this.pos+=4},writeSFixed32:function(y){this.realloc(4),m(this.buf,y,this.pos),this.pos+=4},writeFixed64:function(y){this.realloc(8),m(this.buf,-1&y,this.pos),m(this.buf,Math.floor(y*23283064365386963e-26),this.pos+4),this.pos+=8},writeSFixed64:function(y){this.realloc(8),m(this.buf,-1&y,this.pos),m(this.buf,Math.floor(y*23283064365386963e-26),this.pos+4),this.pos+=8},writeVarint:function(y){(y=+y||0)>268435455||y<0?function(s,p){var w,A;if(s>=0?(w=s%4294967296|0,A=s/4294967296|0):(A=~(-s/4294967296),4294967295^(w=~(-s%4294967296))?w=w+1|0:(w=0,A=A+1|0)),s>=18446744073709552e3||s<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");p.realloc(10),function(k,v,x){x.buf[x.pos++]=127&k|128,k>>>=7,x.buf[x.pos++]=127&k|128,k>>>=7,x.buf[x.pos++]=127&k|128,k>>>=7,x.buf[x.pos++]=127&k|128,k>>>=7,x.buf[x.pos]=127&k}(w,0,p),function(k,v){var x=(7&k)<<4;v.buf[v.pos++]|=x|((k>>>=3)?128:0),k&&(v.buf[v.pos++]=127&k|((k>>>=7)?128:0),k&&(v.buf[v.pos++]=127&k|((k>>>=7)?128:0),k&&(v.buf[v.pos++]=127&k|((k>>>=7)?128:0),k&&(v.buf[v.pos++]=127&k|((k>>>=7)?128:0),k&&(v.buf[v.pos++]=127&k)))))}(A,p)}(y,this):(this.realloc(4),this.buf[this.pos++]=127&y|(y>127?128:0),y<=127||(this.buf[this.pos++]=127&(y>>>=7)|(y>127?128:0),y<=127||(this.buf[this.pos++]=127&(y>>>=7)|(y>127?128:0),y<=127||(this.buf[this.pos++]=y>>>7&127))))},writeSVarint:function(y){this.writeVarint(y<0?2*-y-1:2*y)},writeBoolean:function(y){this.writeVarint(Boolean(y))},writeString:function(y){y=String(y),this.realloc(4*y.length),this.pos++;var s=this.pos;this.pos=function(w,A,k){for(var v,x,T=0;T<A.length;T++){if((v=A.charCodeAt(T))>55295&&v<57344){if(!x){v>56319||T+1===A.length?(w[k++]=239,w[k++]=191,w[k++]=189):x=v;continue}if(v<56320){w[k++]=239,w[k++]=191,w[k++]=189,x=v;continue}v=x-55296<<10|v-56320|65536,x=null}else x&&(w[k++]=239,w[k++]=191,w[k++]=189,x=null);v<128?w[k++]=v:(v<2048?w[k++]=v>>6|192:(v<65536?w[k++]=v>>12|224:(w[k++]=v>>18|240,w[k++]=v>>12&63|128),w[k++]=v>>6&63|128),w[k++]=63&v|128)}return k}(this.buf,y,this.pos);var p=this.pos-s;p>=128&&f(s,p,this),this.pos=s-1,this.writeVarint(p),this.pos+=p},writeFloat:function(y){this.realloc(4),_.write(this.buf,y,this.pos,!0,23,4),this.pos+=4},writeDouble:function(y){this.realloc(8),_.write(this.buf,y,this.pos,!0,52,8),this.pos+=8},writeBytes:function(y){var s=y.length;this.writeVarint(s),this.realloc(s);for(var p=0;p<s;p++)this.buf[this.pos++]=y[p]},writeRawMessage:function(y,s){this.pos++;var p=this.pos;y(s,this);var w=this.pos-p;w>=128&&f(p,w,this),this.pos=p-1,this.writeVarint(w),this.pos+=w},writeMessage:function(y,s,p){this.writeTag(y,e.Bytes),this.writeRawMessage(s,p)},writePackedVarint:function(y,s){s.length&&this.writeMessage(y,c,s)},writePackedSVarint:function(y,s){s.length&&this.writeMessage(y,u,s)},writePackedBoolean:function(y,s){s.length&&this.writeMessage(y,n,s)},writePackedFloat:function(y,s){s.length&&this.writeMessage(y,i,s)},writePackedDouble:function(y,s){s.length&&this.writeMessage(y,a,s)},writePackedFixed32:function(y,s){s.length&&this.writeMessage(y,t,s)},writePackedSFixed32:function(y,s){s.length&&this.writeMessage(y,r,s)},writePackedFixed64:function(y,s){s.length&&this.writeMessage(y,l,s)},writePackedSFixed64:function(y,s){s.length&&this.writeMessage(y,d,s)},writeBytesField:function(y,s){this.writeTag(y,e.Bytes),this.writeBytes(s)},writeFixed32Field:function(y,s){this.writeTag(y,e.Fixed32),this.writeFixed32(s)},writeSFixed32Field:function(y,s){this.writeTag(y,e.Fixed32),this.writeSFixed32(s)},writeFixed64Field:function(y,s){this.writeTag(y,e.Fixed64),this.writeFixed64(s)},writeSFixed64Field:function(y,s){this.writeTag(y,e.Fixed64),this.writeSFixed64(s)},writeVarintField:function(y,s){this.writeTag(y,e.Varint),this.writeVarint(s)},writeSVarintField:function(y,s){this.writeTag(y,e.Varint),this.writeSVarint(s)},writeStringField:function(y,s){this.writeTag(y,e.Bytes),this.writeString(s)},writeFloatField:function(y,s){this.writeTag(y,e.Fixed32),this.writeFloat(s)},writeDoubleField:function(y,s){this.writeTag(y,e.Fixed64),this.writeDouble(s)},writeBooleanField:function(y,s){this.writeVarintField(y,Boolean(s))}}},function(O,D,o){var _=o(3),e=o(22),b=e.mat4,g=e.vec4,f=o(50),c=o(62).addDynamicAttributes,u=o(51).layout,i=o(205).WritingMode;function a(s,p){var w=[s.x,s.y,0,1];y(w,w,p);var A=w[3];return{point:new _(w[0]/A,w[1]/A),signedDistanceFromCamera:A}}function n(s,p){var w=s[0]/s[3],A=s[1]/s[3];return w>=-p[0]&&w<=p[0]&&A>=-p[1]&&A<=p[1]}function t(s,p,w,A,k,v,x,T,E,C,z,P){var B=T.glyphStartIndex+T.numGlyphs,F=T.lineStartIndex,Z=T.lineStartIndex+T.lineLength,W=p.getoffsetX(T.glyphStartIndex),J=p.getoffsetX(B-1),X=h(s*W,w,A,k,v,x,T.segment,F,Z,E,C,z,P);if(!X)return null;var R=h(s*J,w,A,k,v,x,T.segment,F,Z,E,C,z,P);return R?{first:X,last:R}:null}function r(s,p,w,A){return s===i.horizontal&&Math.abs(w.y-p.y)>Math.abs(w.x-p.x)*A?{useVertical:!0}:(s===i.vertical?p.y<w.y:p.x>w.x)?{needsFlipping:!0}:null}function l(s,p,w,A,k,v,x,T,E,C,z,P,B,F){var Z,W=p/24,J=s.lineOffsetX*p,X=s.lineOffsetY*p;if(s.numGlyphs>1){var R=s.glyphStartIndex+s.numGlyphs,U=s.lineStartIndex,K=s.lineStartIndex+s.lineLength,q=t(W,T,J,X,w,z,P,s,E,v,B,!1);if(!q)return{notEnoughRoom:!0};var L=a(q.first.point,x).point,I=a(q.last.point,x).point;if(A&&!w){var j=r(s.writingMode,L,I,F);if(j)return j}Z=[q.first];for(var M=s.glyphStartIndex+1;M<R-1;M++)Z.push(h(W*T.getoffsetX(M),J,X,w,z,P,s.segment,U,K,E,v,B,!1));Z.push(q.last)}else{if(A&&!w){var N=a(P,k).point,V=s.lineStartIndex+s.segment+1,G=new _(E.getx(V),E.gety(V)),H=a(G,k),Y=H.signedDistanceFromCamera>0?H.point:d(P,G,N,1,k),$=r(s.writingMode,N,Y,F);if($)return $}var Q=h(W*T.getoffsetX(s.glyphStartIndex),J,X,w,z,P,s.segment,s.lineStartIndex,s.lineStartIndex+s.lineLength,E,v,B,!1);if(!Q)return{notEnoughRoom:!0};Z=[Q]}var tt=!0,et=!1,nt=void 0;try{for(var ot,it=Z[Symbol.iterator]();!(tt=(ot=it.next()).done);tt=!0){var at=ot.value;c(C,at.point,at.angle)}}catch(st){et=!0,nt=st}finally{try{tt||it.return==null||it.return()}finally{if(et)throw nt}}return{}}function d(s,p,w,A,k){var v=a(s.add(s.sub(p)._unit()),k).point,x=w.sub(v);return w.add(x._mult(A/x.mag()))}function h(s,p,w,A,k,v,x,T,E,C,z,P,B){var F=A?s-p:s+p,Z=F>0?1:-1,W=0;A&&(Z*=-1,W=Math.PI),Z<0&&(W+=Math.PI);for(var J=Z>0?T+x:T+x+1,X=J,R=k,U=k,K=0,q=0,L=Math.abs(F);K+q<=L;){if((J+=Z)<T||J>=E)return null;if(U=R,(R=P[J])===void 0){var I=new _(C.getx(J),C.gety(J)),j=a(I,z);if(j.signedDistanceFromCamera>0)R=P[J]=j.point;else{var M=J-Z;R=d(K===0?v:new _(C.getx(M),C.gety(M)),I,U,L-K+1,z)}}K+=q,q=U.dist(R)}var N=(L-K)/q,V=R.sub(U),G=V.mult(N)._add(U);return G._add(V._unit()._perp()._mult(w*Z)),{point:G,angle:W+Math.atan2(R.y-U.y,R.x-U.x),tileDistance:B?{prevTileDistance:J-Z===X?0:C.gettileUnitDistanceFromAnchor(J-Z),lastSegmentViewportDistance:L-K}:null}}O.exports={updateLineLabels:function(s,p,w,A,k,v,x,T){var E=A?s.textSizeData:s.iconSizeData,C=f.evaluateSizeForZoom(E,w.transform.zoom,u.properties[A?"text-size":"icon-size"]),z=[256/w.width*2+1,256/w.height*2+1],P=A?s.text.dynamicLayoutVertexArray:s.icon.dynamicLayoutVertexArray;P.clear();for(var B=s.lineVertexArray,F=A?s.text.placedSymbolArray:s.icon.placedSymbolArray,Z=w.transform.width/w.transform.height,W=!1,J=0;J<F.length;J++){var X=F.get(J);if(X.hidden||X.writingMode===i.vertical&&!W)S(X.numGlyphs,P);else{W=!1;var R=[X.anchorX,X.anchorY,0,1];if(g.transformMat4(R,R,p),n(R,z)){var U=R[3],K=.5+U/w.transform.cameraToCenterDistance*.5,q=f.evaluateSizeForFeature(E,C,X),L=x?q*K:q/K,I=new _(X.anchorX,X.anchorY),j=a(I,k).point,M={},N=l(X,L,!1,T,p,k,v,s.glyphOffsetArray,B,P,j,I,M,Z);W=N.useVertical,(N.notEnoughRoom||W||N.needsFlipping&&l(X,L,!0,T,p,k,v,s.glyphOffsetArray,B,P,j,I,M,Z).notEnoughRoom)&&S(X.numGlyphs,P)}else S(X.numGlyphs,P)}}A?s.text.dynamicLayoutVertexBuffer.updateData(P):s.icon.dynamicLayoutVertexBuffer.updateData(P)},getLabelPlaneMatrix:function(s,p,w,A,k){var v=b.identity(new Float32Array(16));return p?(b.identity(v),b.scale(v,v,[1/k,1/k,1]),w||b.rotateZ(v,v,A.angle)):(b.scale(v,v,[A.width/2,-A.height/2,1]),b.translate(v,v,[1,-1,0]),b.multiply(v,v,s)),v},getGlCoordMatrix:function(s,p,w,A,k){var v=b.identity(new Float32Array(16));return p?(b.multiply(v,v,s),b.scale(v,v,[k,k,1]),w||b.rotateZ(v,v,-A.angle)):(b.scale(v,v,[1,-1,1]),b.translate(v,v,[-1,-1,0]),b.scale(v,v,[2/A.width,2/A.height,1])),v},project:a,placeFirstAndLastGlyph:t,xyTransformMat4:y};var m=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function S(s,p){for(var w=0;w<s;w++){var A=p.length;p.resize(A+4),p.float32.set(m,3*A)}}function y(s,p,w){var A=p[0],k=p[1];return s[0]=w[0]*A+w[4]*k+w[12],s[1]=w[1]*A+w[5]*k+w[13],s[3]=w[3]*A+w[7]*k+w[15],s}},function(O,D,o){function _(X,R){for(var U=0;U<R.length;U++){var K=R[U];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(X,K.key,K)}}var e=o(206),b=o(207),g=o(208),f=(o(15),o(18),o(68)),c=o(0),u=o(122),i=u.ClearColor,a=u.ClearDepth,n=u.ClearStencil,t=u.ColorMask,r=u.DepthMask,l=u.StencilMask,d=u.StencilFunc,h=u.StencilOp,m=u.StencilTest,S=u.DepthRange,y=u.DepthTest,s=u.DepthFunc,p=u.Blend,w=u.BlendFunc,A=u.BlendColor,k=u.Program,v=u.LineWidth,x=u.ActiveTextureUnit,T=u.Viewport,E=u.BindFramebuffer,C=u.BindRenderbuffer,z=u.BindTexture,P=u.BindVertexBuffer,B=u.BindElementBuffer,F=u.BindVertexArrayOES,Z=u.PixelStoreUnpack,W=u.PixelStoreUnpackPremultiplyAlpha,J=function(){function X(q){(function(L,I){if(!(L instanceof I))throw new TypeError("Cannot call a class as a function")})(this,X),this.gl=q,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.lineWidthRange=q.getParameter(q.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new i(this),this.clearDepth=new a(this),this.clearStencil=new n(this),this.colorMask=new t(this),this.depthMask=new r(this),this.stencilMask=new l(this),this.stencilFunc=new d(this),this.stencilOp=new h(this),this.stencilTest=new m(this),this.depthRange=new S(this),this.depthTest=new y(this),this.depthFunc=new s(this),this.blend=new p(this),this.blendFunc=new w(this),this.blendColor=new A(this),this.program=new k(this),this.lineWidth=new v(this),this.activeTexture=new x(this),this.viewport=new T(this),this.bindFramebuffer=new E(this),this.bindRenderbuffer=new C(this),this.bindTexture=new z(this),this.bindVertexBuffer=new P(this),this.bindElementBuffer=new B(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new F(this),this.pixelStoreUnpack=new Z(this),this.pixelStoreUnpackPremultiplyAlpha=new W(this),this.extTextureFilterAnisotropic=q.getExtension("EXT_texture_filter_anisotropic")||q.getExtension("MOZ_EXT_texture_filter_anisotropic")||q.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=q.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=q.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&q.getExtension("OES_texture_half_float_linear")}var R,U,K;return R=X,(U=[{key:"createIndexBuffer",value:function(q,L){return new e(this,q,L)}},{key:"createVertexBuffer",value:function(q,L,I){return new b(this,q,L,I)}},{key:"createRenderbuffer",value:function(q,L,I){var j=this.gl,M=j.createRenderbuffer();return this.bindRenderbuffer.set(M),j.renderbufferStorage(j.RENDERBUFFER,q,L,I),this.bindRenderbuffer.set(null),M}},{key:"createFramebuffer",value:function(q,L){return new g(this,q,L)}},{key:"clear",value:function(q){var L=q.color,I=q.depth,j=this.gl,M=0;L&&(M|=j.COLOR_BUFFER_BIT,this.clearColor.set(L),this.colorMask.set([!0,!0,!0,!0])),I!==void 0&&(M|=j.DEPTH_BUFFER_BIT,this.clearDepth.set(I),this.depthMask.set(!0)),j.clear(M)}},{key:"setDepthMode",value:function(q){q.func!==this.gl.ALWAYS||q.mask?(this.depthTest.set(!0),this.depthFunc.set(q.func),this.depthMask.set(q.mask),this.depthRange.set(q.range)):this.depthTest.set(!1)}},{key:"setStencilMode",value:function(q){q.func!==this.gl.ALWAYS||q.mask?(this.stencilTest.set(!0),this.stencilMask.set(q.mask),this.stencilOp.set([q.fail,q.depthFail,q.pass]),this.stencilFunc.set({func:q.test.func,ref:q.ref,mask:q.test.mask})):this.stencilTest.set(!1)}},{key:"setColorMode",value:function(q){c.deepEqual(q.blendFunction,f.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(q.blendFunction),this.blendColor.set(q.blendColor)),this.colorMask.set(q.mask)}}])&&_(R.prototype,U),K&&_(R,K),X}();O.exports=J},function(O,D,o){var _=o(12),e=function b(g,f,c){(function(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")})(this,b),this.blendFunction=g,this.blendColor=f,this.mask=c};e.disabled=new e(e.Replace=[1,0],_.transparent,[!1,!1,!1,!1]),e.unblended=new e(e.Replace,_.transparent,[!0,!0,!0,!0]),e.alphaBlended=new e([1,771],_.transparent,[!0,!0,!0,!0]),O.exports=e},function(O,D,o){function _(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function e(v,x){for(var T=0;T<x.length;T++){var E=x[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(v,E.key,E)}}function b(v,x,T){return x&&e(v.prototype,x),T&&e(v,T),v}var g=o(120),f=o(6),c=o(50),u=o(66),i=o(51).layout,a=o(1),n=o(28),t=function(){function v(x,T,E,C){_(this,v),this.opacity=x?Math.max(0,Math.min(1,x.opacity+(x.placed?T:-T))):C&&E?1:0,this.placed=E}return b(v,[{key:"isHidden",value:function(){return this.opacity===0&&!this.placed}}]),v}(),r=function(){function v(x,T,E,C,z){_(this,v),this.text=new t(x?x.text:null,T,E,z),this.icon=new t(x?x.icon:null,T,C,z)}return b(v,[{key:"isHidden",value:function(){return this.text.isHidden()&&this.icon.isHidden()}}]),v}(),l=function v(x,T,E){_(this,v),this.text=x,this.icon=T,this.skipFade=E},d=function(){function v(x,T){_(this,v),this.transform=x.clone(),this.collisionIndex=new g(this.transform),this.recentUntil=-1/0,this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=T}return b(v,[{key:"placeLayerTile",value:function(x,T,E,C){var z=T.getBucket(x);if(z){var P=z.layers[0].layout,B=Math.pow(2,this.transform.zoom-T.tileID.overscaledZ),F=T.tileSize/f,Z=this.transform.calculatePosMatrix(T.tileID.toUnwrapped()),W=u.getLabelPlaneMatrix(Z,P.get("text-pitch-alignment")==="map",P.get("text-rotation-alignment")==="map",this.transform,n(T,1,this.transform.zoom)),J=u.getLabelPlaneMatrix(Z,P.get("icon-pitch-alignment")==="map",P.get("icon-rotation-alignment")==="map",this.transform,n(T,1,this.transform.zoom));this.placeLayerBucket(z,Z,W,J,B,F,E,C,T.collisionBoxArray,T.tileID.key,x.source)}}},{key:"placeLayerBucket",value:function(x,T,E,C,z,P,B,F,Z,W,J){var X=x.layers[0].layout,R=c.evaluateSizeForZoom(x.textSizeData,this.transform.zoom,i.properties["text-size"]),U=!x.hasTextData()||X.get("text-optional"),K=!x.hasIconData()||X.get("icon-optional"),q=!0,L=!1,I=void 0;try{for(var j,M=x.symbolInstances[Symbol.iterator]();!(q=(j=M.next()).done);q=!0){var N=j.value;if(!F[N.crossTileID]){var V=!1,G=!1,H=!0,Y=null,$=null,Q=null;N.collisionArrays||(N.collisionArrays=x.deserializeCollisionBoxes(Z,N.textBoxStartIndex,N.textBoxEndIndex,N.iconBoxStartIndex,N.iconBoxEndIndex)),N.collisionArrays.textBox&&(V=(Y=this.collisionIndex.placeCollisionBox(N.collisionArrays.textBox,X.get("text-allow-overlap"),P,T)).box.length>0,H=H&&Y.offscreen);var tt=N.collisionArrays.textCircles;if(tt){var et=x.text.placedSymbolArray.get(N.placedTextSymbolIndices[0]),nt=c.evaluateSizeForFeature(x.textSizeData,R,et);$=this.collisionIndex.placeCollisionCircles(tt,X.get("text-allow-overlap"),z,P,N.key,et,x.lineVertexArray,x.glyphOffsetArray,nt,T,E,B,X.get("text-pitch-alignment")==="map"),V=X.get("text-allow-overlap")||$.circles.length>0,H=H&&$.offscreen}N.collisionArrays.iconBox&&(G=(Q=this.collisionIndex.placeCollisionBox(N.collisionArrays.iconBox,X.get("icon-allow-overlap"),P,T)).box.length>0,H=H&&Q.offscreen),U||K?K?U||(G=G&&V):V=G&&V:G=V=G&&V,V&&Y&&this.collisionIndex.insertCollisionBox(Y.box,X.get("text-ignore-placement"),W,J,x.bucketInstanceId,N.textBoxStartIndex),G&&Q&&this.collisionIndex.insertCollisionBox(Q.box,X.get("icon-ignore-placement"),W,J,x.bucketInstanceId,N.iconBoxStartIndex),V&&$&&this.collisionIndex.insertCollisionCircles($.circles,X.get("text-ignore-placement"),W,J,x.bucketInstanceId,N.textBoxStartIndex),a(N.crossTileID!==0),a(x.bucketInstanceId!==0),this.placements[N.crossTileID]=new l(V,G,H||x.justReloaded),F[N.crossTileID]=!0}}}catch(ot){L=!0,I=ot}finally{try{q||M.return==null||M.return()}finally{if(L)throw I}}x.justReloaded=!1}},{key:"commit",value:function(x,T){this.commitTime=T;var E=!1,C=x&&this.fadeDuration!==0?(this.commitTime-x.commitTime)/this.fadeDuration:1,z=x?x.opacities:{};for(var P in this.placements){var B=this.placements[P],F=z[P];F?(this.opacities[P]=new r(F,C,B.text,B.icon),E=E||B.text!==F.text.placed||B.icon!==F.icon.placed):(this.opacities[P]=new r(null,C,B.text,B.icon,B.skipFade),E=E||B.text||B.icon)}for(var Z in z){var W=z[Z];if(!this.opacities[Z]){var J=new r(W,C,!1,!1);J.isHidden()||(this.opacities[Z]=J,E=E||W.text.placed||W.icon.placed)}}return E}},{key:"updateLayerOpacities",value:function(x,T){var E={},C=!0,z=!1,P=void 0;try{for(var B,F=T[Symbol.iterator]();!(C=(B=F.next()).done);C=!0){var Z=B.value,W=Z.getBucket(x);W&&this.updateBucketOpacities(W,E,Z.collisionBoxArray)}}catch(J){z=!0,P=J}finally{try{C||F.return==null||F.return()}finally{if(z)throw P}}}},{key:"updateBucketOpacities",value:function(x,T,E){x.hasTextData()&&x.text.opacityVertexArray.clear(),x.hasIconData()&&x.icon.opacityVertexArray.clear(),x.hasCollisionBoxData()&&x.collisionBox.collisionVertexArray.clear(),x.hasCollisionCircleData()&&x.collisionCircle.collisionVertexArray.clear();for(var C=x.layers[0].layout,z=new r(null,0,C.get("text-allow-overlap"),C.get("icon-allow-overlap"),!0),P=0;P<x.symbolInstances.length;P++){var B=x.symbolInstances[P],F=T[B.crossTileID],Z=this.opacities[B.crossTileID];Z?F&&(Z=z):(Z=z,this.opacities[B.crossTileID]=Z),T[B.crossTileID]=!0;var W=B.numGlyphVertices>0||B.numVerticalGlyphVertices>0,J=B.numIconVertices>0;if(W){for(var X=k(Z.text),R=(B.numGlyphVertices+B.numVerticalGlyphVertices)/4,U=0;U<R;U++)x.text.opacityVertexArray.emplaceBack(X);var K=!0,q=!1,L=void 0;try{for(var I,j=B.placedTextSymbolIndices[Symbol.iterator]();!(K=(I=j.next()).done);K=!0){var M=I.value;x.text.placedSymbolArray.get(M).hidden=Z.text.isHidden()}}catch(Q){q=!0,L=Q}finally{try{K||j.return==null||j.return()}finally{if(q)throw L}}}if(J){for(var N=k(Z.icon),V=0;V<B.numIconVertices/4;V++)x.icon.opacityVertexArray.emplaceBack(N);x.icon.placedSymbolArray.get(P).hidden=Z.icon.isHidden()}B.collisionArrays||(B.collisionArrays=x.deserializeCollisionBoxes(E,B.textBoxStartIndex,B.textBoxEndIndex,B.iconBoxStartIndex,B.iconBoxEndIndex));var G=B.collisionArrays;if(G){G.textBox&&x.hasCollisionBoxData()&&h(x.collisionBox.collisionVertexArray,Z.text.placed,!1),G.iconBox&&x.hasCollisionBoxData()&&h(x.collisionBox.collisionVertexArray,Z.icon.placed,!1);var H=G.textCircles;if(H&&x.hasCollisionCircleData())for(var Y=0;Y<H.length;Y+=5){var $=F||H[Y+4]===0;h(x.collisionCircle.collisionVertexArray,Z.text.placed,$)}}}x.sortFeatures(this.transform.angle),x.hasTextData()&&x.text.opacityVertexBuffer&&x.text.opacityVertexBuffer.updateData(x.text.opacityVertexArray),x.hasIconData()&&x.icon.opacityVertexBuffer&&x.icon.opacityVertexBuffer.updateData(x.icon.opacityVertexArray),x.hasCollisionBoxData()&&x.collisionBox.collisionVertexBuffer&&x.collisionBox.collisionVertexBuffer.updateData(x.collisionBox.collisionVertexArray),x.hasCollisionCircleData()&&x.collisionCircle.collisionVertexBuffer&&x.collisionCircle.collisionVertexBuffer.updateData(x.collisionCircle.collisionVertexArray),a(x.text.opacityVertexArray.length===x.text.layoutVertexArray.length/4),a(x.icon.opacityVertexArray.length===x.icon.layoutVertexArray.length/4)}},{key:"symbolFadeChange",value:function(x){return this.fadeDuration===0?1:(x-this.commitTime)/this.fadeDuration}},{key:"hasTransitions",value:function(x){return this.symbolFadeChange(x)<1||this.stale}},{key:"stillRecent",value:function(x){return this.recentUntil>x}},{key:"setRecent",value:function(x,T){this.stale=T,this.recentUntil=x+this.fadeDuration}},{key:"setStale",value:function(){this.stale=!0}}]),v}();function h(v,x,T){v.emplaceBack(x?1:0,T?1:0),v.emplaceBack(x?1:0,T?1:0),v.emplaceBack(x?1:0,T?1:0),v.emplaceBack(x?1:0,T?1:0)}var m=Math.pow(2,25),S=Math.pow(2,24),y=Math.pow(2,17),s=Math.pow(2,16),p=Math.pow(2,9),w=Math.pow(2,8),A=Math.pow(2,1);function k(v){if(v.opacity===0&&!v.placed)return 0;if(v.opacity===1&&v.placed)return 4294967295;var x=v.placed?1:0,T=Math.floor(127*v.opacity);return T*m+x*S+T*y+x*s+T*p+x*w+T*A+x}O.exports=d},function(O,D,o){var _=o(1),e=o(28);D.isPatternMissing=function(b,g){if(!b)return!1;var f=g.imageManager.getPattern(b.from),c=g.imageManager.getPattern(b.to);return!f||!c},D.prepare=function(b,g,f){var c=g.context,u=c.gl,i=g.imageManager.getPattern(b.from),a=g.imageManager.getPattern(b.to);_(i&&a),u.uniform1i(f.uniforms.u_image,0),u.uniform2fv(f.uniforms.u_pattern_tl_a,i.tl),u.uniform2fv(f.uniforms.u_pattern_br_a,i.br),u.uniform2fv(f.uniforms.u_pattern_tl_b,a.tl),u.uniform2fv(f.uniforms.u_pattern_br_b,a.br);var n=g.imageManager.getPixelSize(),t=n.width,r=n.height;u.uniform2fv(f.uniforms.u_texsize,[t,r]),u.uniform1f(f.uniforms.u_mix,b.t),u.uniform2fv(f.uniforms.u_pattern_size_a,i.displaySize),u.uniform2fv(f.uniforms.u_pattern_size_b,a.displaySize),u.uniform1f(f.uniforms.u_scale_a,b.fromScale),u.uniform1f(f.uniforms.u_scale_b,b.toScale),c.activeTexture.set(u.TEXTURE0),g.imageManager.bind(g.context)},D.setTile=function(b,g,f){var c=g.context.gl;c.uniform1f(f.uniforms.u_tile_units_to_pixels,1/e(b,1,g.transform.tileZoom(b)));var u=Math.pow(2,b.tileID.overscaledZ),i=b.tileSize*Math.pow(2,g.transform.tileZoom(b))/u,a=i*(b.tileID.canonical.x+b.tileID.wrap*u),n=i*b.tileID.canonical.y;c.uniform2f(f.uniforms.u_pixel_coord_upper,a>>16,n>>16),c.uniform2f(f.uniforms.u_pixel_coord_lower,65535&a,65535&n)}},function(O,D,o){var _=o(72),e=o(2),b=o(132).version,g=o(133),f=o(295),c=o(296),u=o(128),i=o(297),a=o(298),n=o(299),t=o(129),r=o(53),l=o(21),d=o(39),h=o(3),m=o(10),S=o(64),y=o(49),s=o(300);O.exports={version:b,supported:_,workerCount:Math.max(Math.floor(e.hardwareConcurrency/2),1),setRTLTextPlugin:y.setRTLTextPlugin,Map:g,NavigationControl:f,GeolocateControl:c,AttributionControl:u,ScaleControl:i,FullscreenControl:a,Popup:n,Marker:t,Style:r,LngLat:l,LngLatBounds:d,Point:h,Evented:m,config:S,BasicRenderer:s,get accessToken(){return S.ACCESS_TOKEN},set accessToken(p){S.ACCESS_TOKEN=p}}},function(O,D,o){"use strict";function _(b){return!!(typeof window<"u"&&typeof document<"u"&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var g,f,c=new Blob([""],{type:"text/javascript"}),u=URL.createObjectURL(c);try{f=new Worker(u),g=!0}catch{g=!1}return f&&f.terminate(),URL.revokeObjectURL(u),g}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(g){return e[g]===void 0&&(e[g]=function(f){var c=document.createElement("canvas"),u=Object.create(_.webGLContextAttributes);return u.failIfMajorPerformanceCaveat=f,c.probablySupportsContext?c.probablySupportsContext("webgl",u)||c.probablySupportsContext("experimental-webgl",u):c.supportsContext?c.supportsContext("webgl",u)||c.supportsContext("experimental-webgl",u):c.getContext("webgl",u)||c.getContext("experimental-webgl",u)}(g)),e[g]}(b&&b.failIfMajorPerformanceCaveat))}O.exports?O.exports=_:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=_);var e={};_.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},function(O,D){function o(_,e,b,g){this.cx=3*_,this.bx=3*(b-_)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(g-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=_,this.p1y=g,this.p2x=b,this.p2y=g}O.exports=o,o.prototype.sampleCurveX=function(_){return((this.ax*_+this.bx)*_+this.cx)*_},o.prototype.sampleCurveY=function(_){return((this.ay*_+this.by)*_+this.cy)*_},o.prototype.sampleCurveDerivativeX=function(_){return(3*this.ax*_+2*this.bx)*_+this.cx},o.prototype.solveCurveX=function(_,e){var b,g,f,c,u;for(e===void 0&&(e=1e-6),f=_,u=0;u<8;u++){if(c=this.sampleCurveX(f)-_,Math.abs(c)<e)return f;var i=this.sampleCurveDerivativeX(f);if(Math.abs(i)<1e-6)break;f-=c/i}if((f=_)<(b=0))return b;if(f>(g=1))return g;for(;b<g;){if(c=this.sampleCurveX(f),Math.abs(c-_)<e)return f;_>c?b=f:g=f,f=.5*(g-b)+b}return f},o.prototype.solve=function(_,e){return this.sampleCurveY(this.solveCurveX(_,e))}},function(O,D){function o(_){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(_)}O.exports=function _(e,b){if(Array.isArray(e)){if(!Array.isArray(b)||e.length!==b.length)return!1;for(var g=0;g<e.length;g++)if(!_(e[g],b[g]))return!1;return!0}if(o(e)==="object"&&e!==null&&b!==null){if(o(b)!=="object"||Object.keys(e).length!==Object.keys(b).length)return!1;for(var f in e)if(!_(e[f],b[f]))return!1;return!0}return e===b}},function(O,D,o){var _=o(7);O.exports=function(e){var b=e.key,g=e.value;return g?[new _(b,g,"constants have been deprecated as of v8")]:[]}},function(O,D){function o(u){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(u)}function _(u,i){return!i||o(i)!=="object"&&typeof i!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(u):i}function e(u){var i=typeof Map=="function"?new Map:void 0;return(e=function(a){if(a===null||(n=a,Function.toString.call(n).indexOf("[native code]")===-1))return a;var n;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(i!==void 0){if(i.has(a))return i.get(a);i.set(a,t)}function t(){return b(a,arguments,f(this).constructor)}return t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),g(t,a)})(u)}function b(u,i,a){return(b=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(n,t,r){var l=[null];l.push.apply(l,t);var d=new(Function.bind.apply(n,l));return r&&g(d,r.prototype),d}).apply(null,arguments)}function g(u,i){return(g=Object.setPrototypeOf||function(a,n){return a.__proto__=n,a})(u,i)}function f(u){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(u)}var c=function(u){function i(a,n){var t;return function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}(this,i),(t=_(this,f(i).call(this,n))).message=n,t.key=a,t}return function(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),n&&g(a,n)}(i,e(Error)),i}();O.exports=c},function(O,D,o){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function e(t,r){for(var l=0;l<r.length;l++){var d=r[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}var b=o(78),g=o(8).checkSubtype,f=o(76),c=o(79),u=o(81),i=o(82),a=o(83),n=function(){function t(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],S=arguments.length>2?arguments[2]:void 0,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new b,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];(function(p,w){if(!(p instanceof w))throw new TypeError("Cannot call a class as a function")})(this,t),this.registry=h,this.path=m,this.key=m.map(function(p){return"[".concat(p,"]")}).join(""),this.scope=y,this.errors=s,this.expectedType=S}var r,l,d;return r=t,(l=[{key:"parse",value:function(h,m,S,y){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},p=this;if(m&&(p=p.concat(m,S,y)),h!==null&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"||(h=["literal",h]),Array.isArray(h)){if(h.length===0)return p.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var w=h[0];if(typeof w!="string")return p.error("Expression name must be a string, but found ".concat(_(w),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var A=p.registry[w];if(A){var k=A.parse(h,p);if(!k)return null;if(p.expectedType){var v=p.expectedType,x=k.type;if(v.kind!=="string"&&v.kind!=="number"&&v.kind!=="boolean"||x.kind!=="value")if(v.kind==="array"&&x.kind==="value")s.omitTypeAnnotations||(k=new i(v,k));else if(v.kind!=="color"||x.kind!=="value"&&x.kind!=="string"){if(p.checkSubtype(p.expectedType,k.type))return null}else s.omitTypeAnnotations||(k=new a(v,[k]));else s.omitTypeAnnotations||(k=new u(v,[k]))}if(!(k instanceof c)&&function(E){var C=o(42).CompoundExpression,z=o(84),P=z.isGlobalPropertyConstant,B=z.isFeatureConstant,F=o(85);if(E instanceof F||E instanceof C&&E.name==="error")return!1;var Z=!0;return E.eachChild(function(W){W instanceof c||(Z=!1)}),Z?B(E)&&P(E,["zoom","heatmap-density"]):!1}(k)){var T=new(o(55));try{k=new c(k.type,k.evaluate(T))}catch(E){return p.error(E.message),null}}return k}return p.error('Unknown expression "'.concat(w,'". If you wanted a literal array, use ["literal", [...]].'),0)}return h===void 0?p.error("'undefined' value invalid. Use null instead."):_(h)==="object"?p.error('Bare objects invalid. Use ["literal", {...}] instead.'):p.error("Expected an array, but found ".concat(_(h)," instead."))}},{key:"concat",value:function(h,m,S){var y=typeof h=="number"?this.path.concat(h):this.path,s=S?this.scope.concat(S):this.scope;return new t(this.registry,y,m||null,s,this.errors)}},{key:"error",value:function(h){for(var m=arguments.length,S=new Array(m>1?m-1:0),y=1;y<m;y++)S[y-1]=arguments[y];var s="".concat(this.key).concat(S.map(function(p){return"[".concat(p,"]")}).join(""));this.errors.push(new f(s,h))}},{key:"checkSubtype",value:function(h,m){var S=g(h,m);return S&&this.error(S),S}}])&&e(r.prototype,l),d&&e(r,d),t}();O.exports=n},function(O,D){function o(b,g){return function(f){if(Array.isArray(f))return f}(b)||function(f,c){var u=[],i=!0,a=!1,n=void 0;try{for(var t,r=f[Symbol.iterator]();!(i=(t=r.next()).done)&&(u.push(t.value),!c||u.length!==c);i=!0);}catch(l){a=!0,n=l}finally{try{i||r.return==null||r.return()}finally{if(a)throw n}}return u}(b,g)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _(b,g){for(var f=0;f<g.length;f++){var c=g[f];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(b,c.key,c)}}var e=function(){function b(u){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];(function(S,y){if(!(S instanceof y))throw new TypeError("Cannot call a class as a function")})(this,b),this.parent=u,this.bindings={};var a=!0,n=!1,t=void 0;try{for(var r,l=i[Symbol.iterator]();!(a=(r=l.next()).done);a=!0){var d=o(r.value,2),h=d[0],m=d[1];this.bindings[h]=m}}catch(S){n=!0,t=S}finally{try{a||l.return==null||l.return()}finally{if(n)throw t}}}var g,f,c;return g=b,(f=[{key:"concat",value:function(u){return new b(this,u)}},{key:"get",value:function(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error("".concat(u," not found in scope."))}},{key:"has",value:function(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}])&&_(g.prototype,f),c&&_(g,c),b}();O.exports=e},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(25),b=e.isValue,g=e.typeOf,f=function(){function c(n,t){(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.type=n,this.value=t}var u,i,a;return u=c,a=[{key:"parse",value:function(n,t){if(n.length!==2)return t.error("'literal' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(!b(n[1]))return t.error("invalid value");var r=n[1],l=g(r),d=t.expectedType;return l.kind!=="array"||l.N!==0||!d||d.kind!=="array"||typeof d.N=="number"&&d.N!==0||(l=d),new c(l,r)}}],(i=[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[this.value]}}])&&_(u.prototype,i),a&&_(u,a),c}();O.exports=f},function(O,D){var o={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _(c){return(c=Math.round(c))<0?0:c>255?255:c}function e(c){return c<0?0:c>1?1:c}function b(c){return c[c.length-1]==="%"?_(parseFloat(c)/100*255):_(parseInt(c))}function g(c){return c[c.length-1]==="%"?e(parseFloat(c)/100):e(parseFloat(c))}function f(c,u,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?c+(u-c)*i*6:2*i<1?u:3*i<2?c+(u-c)*(.6666666666666666-i)*6:c}try{D.parseCSSColor=function(c){var u,i=c.replace(/ /g,"").toLowerCase();if(i in o)return o[i].slice();if(i[0]==="#")return i.length===4?(u=parseInt(i.substr(1),16))>=0&&u<=4095?[(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1]:null:i.length===7&&(u=parseInt(i.substr(1),16))>=0&&u<=16777215?[(16711680&u)>>16,(65280&u)>>8,255&u,1]:null;var a=i.indexOf("("),n=i.indexOf(")");if(a!==-1&&n+1===i.length){var t=i.substr(0,a),r=i.substr(a+1,n-(a+1)).split(","),l=1;switch(t){case"rgba":if(r.length!==4)return null;l=g(r.pop());case"rgb":return r.length!==3?null:[b(r[0]),b(r[1]),b(r[2]),l];case"hsla":if(r.length!==4)return null;l=g(r.pop());case"hsl":if(r.length!==3)return null;var d=(parseFloat(r[0])%360+360)%360/360,h=g(r[1]),m=g(r[2]),S=m<=.5?m*(h+1):m+h-m*h,y=2*m-S;return[_(255*f(y,S,d+.3333333333333333)),_(255*f(y,S,d)),_(255*f(y,S,d-.3333333333333333)),l];default:return null}}return null}}catch{}},function(O,D,o){function _(S){return function(y){if(Array.isArray(y)){for(var s=0,p=new Array(y.length);s<y.length;s++)p[s]=y[s];return p}}(S)||function(y){if(Symbol.iterator in Object(y)||Object.prototype.toString.call(y)==="[object Arguments]")return Array.from(y)}(S)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(S,y){for(var s=0;s<y.length;s++){var p=y[s];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(S,p.key,p)}}var b=o(1),g=o(8),f=g.ObjectType,c=g.ValueType,u=g.StringType,i=g.NumberType,a=g.BooleanType,n=o(31),t=o(8),r=t.checkSubtype,l=t.toString,d=o(25).typeOf,h={string:u,number:i,boolean:a,object:f},m=function(){function S(w,A){(function(k,v){if(!(k instanceof v))throw new TypeError("Cannot call a class as a function")})(this,S),this.type=w,this.args=A}var y,s,p;return y=S,p=[{key:"parse",value:function(w,A){if(w.length<2)return A.error("Expected at least one argument.");var k=w[0];b(h[k],k);for(var v=h[k],x=[],T=1;T<w.length;T++){var E=A.parse(w[T],T,c);if(!E)return null;x.push(E)}return new S(v,x)}}],(s=[{key:"evaluate",value:function(w){for(var A=0;A<this.args.length;A++){var k=this.args[A].evaluate(w);if(!r(this.type,d(k)))return k;if(A===this.args.length-1)throw new n("Expected value to be of type ".concat(l(this.type),", but found ").concat(l(d(k))," instead."))}return b(!1),null}},{key:"eachChild",value:function(w){this.args.forEach(w)}},{key:"possibleOutputs",value:function(){var w;return(w=[]).concat.apply(w,_(this.args.map(function(A){return A.possibleOutputs()})))}}])&&e(y.prototype,s),p&&e(y,p),S}();O.exports=m},function(O,D,o){function _(d,h){for(var m=0;m<h.length;m++){var S=h[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}var e=o(8),b=e.toString,g=e.array,f=e.ValueType,c=e.StringType,u=e.NumberType,i=e.BooleanType,a=e.checkSubtype,n=o(25).typeOf,t=o(31),r={string:c,number:u,boolean:i},l=function(){function d(y,s){(function(p,w){if(!(p instanceof w))throw new TypeError("Cannot call a class as a function")})(this,d),this.type=y,this.input=s}var h,m,S;return h=d,S=[{key:"parse",value:function(y,s){if(y.length<2||y.length>4)return s.error("Expected 1, 2, or 3 arguments, but found ".concat(y.length-1," instead."));var p,w;if(y.length>2){var A=y[1];if(typeof A!="string"||!(A in r))return s.error('The item type argument of "array" must be one of string, number, boolean',1);p=r[A]}else p=f;if(y.length>3){if(typeof y[2]!="number"||y[2]<0||y[2]!==Math.floor(y[2]))return s.error('The length argument to "array" must be a positive integer literal',2);w=y[2]}var k=g(p,w),v=s.parse(y[y.length-1],y.length-1,f);return v?new d(k,v):null}}],(m=[{key:"evaluate",value:function(y){var s=this.input.evaluate(y);if(a(this.type,n(s)))throw new t("Expected value to be of type ".concat(b(this.type),", but found ").concat(b(n(s))," instead."));return s}},{key:"eachChild",value:function(y){y(this.input)}},{key:"possibleOutputs",value:function(){return this.input.possibleOutputs()}}])&&_(h.prototype,m),S&&_(h,S),d}();O.exports=l},function(O,D,o){function _(d){return function(h){if(Array.isArray(h)){for(var m=0,S=new Array(h.length);m<h.length;m++)S[m]=h[m];return S}}(d)||function(h){if(Symbol.iterator in Object(h)||Object.prototype.toString.call(h)==="[object Arguments]")return Array.from(h)}(d)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(d,h){for(var m=0;m<h.length;m++){var S=h[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}var b=o(1),g=o(8),f=g.ColorType,c=g.ValueType,u=g.NumberType,i=o(25),a=i.Color,n=i.validateRGBA,t=o(31),r={"to-number":u,"to-color":f},l=function(){function d(y,s){(function(p,w){if(!(p instanceof w))throw new TypeError("Cannot call a class as a function")})(this,d),this.type=y,this.args=s}var h,m,S;return h=d,S=[{key:"parse",value:function(y,s){if(y.length<2)return s.error("Expected at least one argument.");var p=y[0];b(r[p],p);for(var w=r[p],A=[],k=1;k<y.length;k++){var v=s.parse(y[k],k,c);if(!v)return null;A.push(v)}return new d(w,A)}}],(m=[{key:"evaluate",value:function(y){if(this.type.kind==="color"){var s,p,w=!0,A=!1,k=void 0;try{for(var v,x=this.args[Symbol.iterator]();!(w=(v=x.next()).done);w=!0)if(s=v.value.evaluate(y),p=null,typeof s=="string"){var T=y.parseColor(s);if(T)return T}else if(Array.isArray(s)&&!(p=s.length<3||s.length>4?"Invalid rbga value ".concat(JSON.stringify(s),": expected an array containing either three or four numeric values."):n(s[0],s[1],s[2],s[3])))return new a(s[0]/255,s[1]/255,s[2]/255,s[3])}catch(W){A=!0,k=W}finally{try{w||x.return==null||x.return()}finally{if(A)throw k}}throw new t(p||"Could not parse color from value '".concat(typeof s=="string"?s:JSON.stringify(s),"'"))}var E=null,C=!0,z=!1,P=void 0;try{for(var B,F=this.args[Symbol.iterator]();!(C=(B=F.next()).done);C=!0)if((E=B.value.evaluate(y))!==null){var Z=Number(E);if(!isNaN(Z))return Z}}catch(W){z=!0,P=W}finally{try{C||F.return==null||F.return()}finally{if(z)throw P}}throw new t("Could not convert ".concat(JSON.stringify(E)," to number."))}},{key:"eachChild",value:function(y){this.args.forEach(y)}},{key:"possibleOutputs",value:function(){var y;return(y=[]).concat.apply(y,_(this.args.map(function(s){return s.possibleOutputs()})))}}])&&e(h.prototype,m),S&&e(h,S),d}();O.exports=l},function(O,D,o){var _=o(42).CompoundExpression;O.exports={isFeatureConstant:function e(b){if(b instanceof _&&(b.name==="get"&&b.args.length===1||b.name==="has"&&b.args.length===1||b.name==="properties"||b.name==="geometry-type"||b.name==="id"||b.name.startsWith("filter-")))return!1;var g=!0;return b.eachChild(function(f){g&&!e(f)&&(g=!1)}),g},isGlobalPropertyConstant:function e(b,g){if(b instanceof _&&g.indexOf(b.name)>=0)return!1;var f=!0;return b.eachChild(function(c){f&&!e(c,g)&&(f=!1)}),f}}},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(c,u){(function(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e),this.type=u,this.name=c}var b,g,f;return b=e,f=[{key:"parse",value:function(c,u){if(c.length!==2||typeof c[1]!="string")return u.error("'var' expression requires exactly one string literal argument.");var i=c[1];return u.scope.has(i)?new e(i,u.scope.get(i).type):u.error('Unknown variable "'.concat(i,'". Make sure "').concat(i,'" has been bound in an enclosing "let" expression before using it.'),1)}}],(g=[{key:"evaluate",value:function(c){return c.scope.get(this.name).evaluate(c)}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D,o){function _(n){return function(t){if(Array.isArray(t)){for(var r=0,l=new Array(t.length);r<t.length;r++)l[r]=t[r];return l}}(n)||e(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(n){if(Symbol.iterator in Object(n)||Object.prototype.toString.call(n)==="[object Arguments]")return Array.from(n)}function b(n,t){return f(n)||function(r,l){var d=[],h=!0,m=!1,S=void 0;try{for(var y,s=r[Symbol.iterator]();!(h=(y=s.next()).done)&&(d.push(y.value),!l||d.length!==l);h=!0);}catch(p){m=!0,S=p}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}return d}(n,t)||g()}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function f(n){if(Array.isArray(n))return n}function c(n,t){for(var r=0;r<t.length;r++){var l=t[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}var u=o(8).NumberType,i=o(87).findStopLessThanOrEqualTo,a=function(){function n(d,h,m){(function(x,T){if(!(x instanceof T))throw new TypeError("Cannot call a class as a function")})(this,n),this.type=d,this.input=h,this.labels=[],this.outputs=[];var S=!0,y=!1,s=void 0;try{for(var p,w=m[Symbol.iterator]();!(S=(p=w.next()).done);S=!0){var A=b(p.value,2),k=A[0],v=A[1];this.labels.push(k),this.outputs.push(v)}}catch(x){y=!0,s=x}finally{try{S||w.return==null||w.return()}finally{if(y)throw s}}}var t,r,l;return t=n,l=[{key:"parse",value:function(d,h){var m,S=f(m=d)||e(m)||g(),y=S[1],s=S.slice(2);if(d.length-1<4)return h.error("Expected at least 4 arguments, but found only ".concat(d.length-1,"."));if((d.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(!(y=h.parse(y,1,u)))return null;var p=[],w=null;h.expectedType&&h.expectedType.kind!=="value"&&(w=h.expectedType),s.unshift(-1/0);for(var A=0;A<s.length;A+=2){var k=s[A],v=s[A+1],x=A+1,T=A+2;if(typeof k!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',x);if(p.length&&p[p.length-1][0]>=k)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',x);var E=h.parse(v,T,w);if(!E)return null;w=w||E.type,p.push([k,E])}return new n(w,y,p)}}],(r=[{key:"evaluate",value:function(d){var h=this.labels,m=this.outputs;if(h.length===1)return m[0].evaluate(d);var S=this.input.evaluate(d);if(S<=h[0])return m[0].evaluate(d);var y=h.length;return S>=h[y-1]?m[y-1].evaluate(d):m[i(h,S)].evaluate(d)}},{key:"eachChild",value:function(d){d(this.input);var h=!0,m=!1,S=void 0;try{for(var y,s=this.outputs[Symbol.iterator]();!(h=(y=s.next()).done);h=!0)d(y.value)}catch(p){m=!0,S=p}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}}},{key:"possibleOutputs",value:function(){var d;return(d=[]).concat.apply(d,_(this.outputs.map(function(h){return h.possibleOutputs()})))}}])&&c(t.prototype,r),l&&c(t,l),n}();O.exports=a},function(O,D,o){var _=o(31);O.exports={findStopLessThanOrEqualTo:function(e,b){for(var g,f,c=0,u=e.length-1,i=0;c<=u;){if(g=e[i=Math.floor((c+u)/2)],f=e[i+1],b===g||b>g&&b<f)return i;if(g<b)c=i+1;else{if(!(g>b))throw new _("Input is not a number.");u=i-1}}return Math.max(i-1,0)}}},function(O,D,o){function _(i){return function(a){if(Array.isArray(a)){for(var n=0,t=new Array(a.length);n<a.length;n++)t[n]=a[n];return t}}(i)||function(a){if(Symbol.iterator in Object(a)||Object.prototype.toString.call(a)==="[object Arguments]")return Array.from(a)}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var b=o(1),g=o(8),f=g.checkSubtype,c=g.ValueType,u=function(){function i(r,l){(function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")})(this,i),this.type=r,this.args=l}var a,n,t;return a=i,t=[{key:"parse",value:function(r,l){if(r.length<2)return l.error("Expectected at least one argument.");var d=null,h=l.expectedType;h&&h.kind!=="value"&&(d=h);var m=[],S=!0,y=!1,s=void 0;try{for(var p,w=r.slice(1)[Symbol.iterator]();!(S=(p=w.next()).done);S=!0){var A=p.value,k=l.parse(A,1+m.length,d,void 0,{omitTypeAnnotations:!0});if(!k)return null;d=d||k.type,m.push(k)}}catch(v){y=!0,s=v}finally{try{S||w.return==null||w.return()}finally{if(y)throw s}}return b(d),new i(h&&m.some(function(v){return f(h,v.type)})?c:d,m)}}],(n=[{key:"evaluate",value:function(r){var l=null,d=!0,h=!1,m=void 0;try{for(var S,y=this.args[Symbol.iterator]();!(d=(S=y.next()).done)&&(l=S.value.evaluate(r))===null;d=!0);}catch(s){h=!0,m=s}finally{try{d||y.return==null||y.return()}finally{if(h)throw m}}return l}},{key:"eachChild",value:function(r){this.args.forEach(r)}},{key:"possibleOutputs",value:function(){var r;return(r=[]).concat.apply(r,_(this.args.map(function(l){return l.possibleOutputs()})))}}])&&e(a.prototype,n),t&&e(a,t),i}();O.exports=u},function(O,D){function o(b){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(b)}function _(b,g){for(var f=0;f<g.length;f++){var c=g[f];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(b,c.key,c)}}var e=function(){function b(u,i){(function(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")})(this,b),this.type=i.type,this.bindings=[].concat(u),this.result=i}var g,f,c;return g=b,c=[{key:"parse",value:function(u,i){if(u.length<4)return i.error("Expected at least 3 arguments, but found ".concat(u.length-1," instead."));for(var a=[],n=1;n<u.length-1;n+=2){var t=u[n];if(typeof t!="string")return i.error("Expected string, but found ".concat(o(t)," instead."),n);if(/[^a-zA-Z0-9_]/.test(t))return i.error("Variable names must contain only alphanumeric characters or '_'.",n);var r=i.parse(u[n+1],n+1);if(!r)return null;a.push([t,r])}var l=i.parse(u[u.length-1],u.length-1,void 0,a);return l?new b(a,l):null}}],(f=[{key:"evaluate",value:function(u){u.pushScope(this.bindings);var i=this.result.evaluate(u);return u.popScope(),i}},{key:"eachChild",value:function(u){var i=!0,a=!1,n=void 0;try{for(var t,r=this.bindings[Symbol.iterator]();!(i=(t=r.next()).done);i=!0)u(t.value[1])}catch(l){a=!0,n=l}finally{try{i||r.return==null||r.return()}finally{if(a)throw n}}u(this.result)}},{key:"possibleOutputs",value:function(){return this.result.possibleOutputs()}}])&&_(g.prototype,f),c&&_(g,c),b}();O.exports=e},function(O,D,o){function _(M){return function(N){if(Array.isArray(N)){for(var V=0,G=new Array(N.length);V<N.length;V++)G[V]=N[V];return G}}(M)||function(N){if(Symbol.iterator in Object(N)||Object.prototype.toString.call(N)==="[object Arguments]")return Array.from(N)}(M)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(M){return(e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(M)}function b(M,N){return function(V){if(Array.isArray(V))return V}(M)||function(V,G){var H=[],Y=!0,$=!1,Q=void 0;try{for(var tt,et=V[Symbol.iterator]();!(Y=(tt=et.next()).done)&&(H.push(tt.value),!G||H.length!==G);Y=!0);}catch(nt){$=!0,Q=nt}finally{try{Y||et.return==null||et.return()}finally{if($)throw Q}}return H}(M,N)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var g=o(8),f=g.NumberType,c=g.StringType,u=g.BooleanType,i=g.ColorType,a=g.ObjectType,n=g.ValueType,t=g.ErrorType,r=g.array,l=g.toString,d=o(25),h=d.typeOf,m=d.Color,S=d.validateRGBA,y=o(42),s=y.CompoundExpression,p=y.varargs,w=o(31),A=o(89),k=o(85),v=o(79),x=o(81),T=o(82),E=o(83),C=o(142),z=o(143),P=o(144),B=o(86),F=o(56),Z=o(88),W=o(145),J={"==":W.Equals,"!=":W.NotEquals,array:T,at:C,boolean:x,case:P,coalesce:Z,interpolate:F,let:A,literal:v,match:z,number:x,object:x,step:B,string:x,"to-color":E,"to-number":E,var:k};function X(M,N){var V=b(N,4),G=V[0],H=V[1],Y=V[2],$=V[3];G=G.evaluate(M),H=H.evaluate(M),Y=Y.evaluate(M);var Q=$?$.evaluate(M):1,tt=S(G,H,Y,Q);if(tt)throw new w(tt);return new m(G/255*Q,H/255*Q,Y/255*Q,Q)}function R(M,N){return M in N}function U(M,N){var V=N[M];return V===void 0?null:V}function K(M,N){return b(N,1)[0].evaluate(M).length}function q(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)<H.evaluate(M)}function L(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)>H.evaluate(M)}function I(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)<=H.evaluate(M)}function j(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)>=H.evaluate(M)}s.register(J,{error:[t,[c],function(M,N){var V=b(N,1)[0];throw new w(V.evaluate(M))}],typeof:[c,[n],function(M,N){var V=b(N,1)[0];return l(h(V.evaluate(M)))}],"to-string":[c,[n],function(M,N){var V=b(N,1)[0],G=e(V=V.evaluate(M));return V===null||G==="string"||G==="number"||G==="boolean"?String(V):V instanceof m?V.toString():JSON.stringify(V)}],"to-boolean":[u,[n],function(M,N){var V=b(N,1)[0];return Boolean(V.evaluate(M))}],"to-rgba":[r(f,4),[i],function(M,N){var V=b(N,1)[0].evaluate(M),G=V.r,H=V.g,Y=V.b,$=V.a;return[255*G/$,255*H/$,255*Y/$,$]}],rgb:[i,[f,f,f],X],rgba:[i,[f,f,f,f],X],length:{type:f,overloads:[[[c],K],[[r(n)],K]]},has:{type:u,overloads:[[[c],function(M,N){return R(b(N,1)[0].evaluate(M),M.properties())}],[[c,a],function(M,N){var V=b(N,2),G=V[0],H=V[1];return R(G.evaluate(M),H.evaluate(M))}]]},get:{type:n,overloads:[[[c],function(M,N){return U(b(N,1)[0].evaluate(M),M.properties())}],[[c,a],function(M,N){var V=b(N,2),G=V[0],H=V[1];return U(G.evaluate(M),H.evaluate(M))}]]},properties:[a,[],function(M){return M.properties()}],"geometry-type":[c,[],function(M){return M.geometryType()}],id:[n,[],function(M){return M.id()}],zoom:[f,[],function(M){return M.globals.zoom}],"heatmap-density":[f,[],function(M){return M.globals.heatmapDensity||0}],"+":[f,p(f),function(M,N){var V=0,G=!0,H=!1,Y=void 0;try{for(var $,Q=N[Symbol.iterator]();!(G=($=Q.next()).done);G=!0)V+=$.value.evaluate(M)}catch(tt){H=!0,Y=tt}finally{try{G||Q.return==null||Q.return()}finally{if(H)throw Y}}return V}],"*":[f,p(f),function(M,N){var V=1,G=!0,H=!1,Y=void 0;try{for(var $,Q=N[Symbol.iterator]();!(G=($=Q.next()).done);G=!0)V*=$.value.evaluate(M)}catch(tt){H=!0,Y=tt}finally{try{G||Q.return==null||Q.return()}finally{if(H)throw Y}}return V}],"-":{type:f,overloads:[[[f,f],function(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)-H.evaluate(M)}],[[f],function(M,N){return-b(N,1)[0].evaluate(M)}]]},"/":[f,[f,f],function(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)/H.evaluate(M)}],"%":[f,[f,f],function(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)%H.evaluate(M)}],ln2:[f,[],function(){return Math.LN2}],pi:[f,[],function(){return Math.PI}],e:[f,[],function(){return Math.E}],"^":[f,[f,f],function(M,N){var V=b(N,2),G=V[0],H=V[1];return Math.pow(G.evaluate(M),H.evaluate(M))}],sqrt:[f,[f],function(M,N){var V=b(N,1)[0];return Math.sqrt(V.evaluate(M))}],log10:[f,[f],function(M,N){var V=b(N,1)[0];return Math.log10(V.evaluate(M))}],ln:[f,[f],function(M,N){var V=b(N,1)[0];return Math.log(V.evaluate(M))}],log2:[f,[f],function(M,N){var V=b(N,1)[0];return Math.log2(V.evaluate(M))}],sin:[f,[f],function(M,N){var V=b(N,1)[0];return Math.sin(V.evaluate(M))}],cos:[f,[f],function(M,N){var V=b(N,1)[0];return Math.cos(V.evaluate(M))}],tan:[f,[f],function(M,N){var V=b(N,1)[0];return Math.tan(V.evaluate(M))}],asin:[f,[f],function(M,N){var V=b(N,1)[0];return Math.asin(V.evaluate(M))}],acos:[f,[f],function(M,N){var V=b(N,1)[0];return Math.acos(V.evaluate(M))}],atan:[f,[f],function(M,N){var V=b(N,1)[0];return Math.atan(V.evaluate(M))}],min:[f,p(f),function(M,N){return Math.min.apply(Math,_(N.map(function(V){return V.evaluate(M)})))}],max:[f,p(f),function(M,N){return Math.max.apply(Math,_(N.map(function(V){return V.evaluate(M)})))}],"filter-==":[u,[c,n],function(M,N){var V=b(N,2),G=V[0],H=V[1];return M.properties()[G.value]===H.value}],"filter-id-==":[u,[n],function(M,N){var V=b(N,1)[0];return M.id()===V.value}],"filter-type-==":[u,[c],function(M,N){var V=b(N,1)[0];return M.geometryType()===V.value}],"filter-<":[u,[c,n],function(M,N){var V=b(N,2),G=V[0],H=V[1],Y=M.properties()[G.value],$=H.value;return e(Y)===e($)&&Y<$}],"filter-id-<":[u,[n],function(M,N){var V=b(N,1)[0],G=M.id(),H=V.value;return e(G)===e(H)&&G<H}],"filter->":[u,[c,n],function(M,N){var V=b(N,2),G=V[0],H=V[1],Y=M.properties()[G.value],$=H.value;return e(Y)===e($)&&Y>$}],"filter-id->":[u,[n],function(M,N){var V=b(N,1)[0],G=M.id(),H=V.value;return e(G)===e(H)&&G>H}],"filter-<=":[u,[c,n],function(M,N){var V=b(N,2),G=V[0],H=V[1],Y=M.properties()[G.value],$=H.value;return e(Y)===e($)&&Y<=$}],"filter-id-<=":[u,[n],function(M,N){var V=b(N,1)[0],G=M.id(),H=V.value;return e(G)===e(H)&&G<=H}],"filter->=":[u,[c,n],function(M,N){var V=b(N,2),G=V[0],H=V[1],Y=M.properties()[G.value],$=H.value;return e(Y)===e($)&&Y>=$}],"filter-id->=":[u,[n],function(M,N){var V=b(N,1)[0],G=M.id(),H=V.value;return e(G)===e(H)&&G>=H}],"filter-has":[u,[n],function(M,N){return b(N,1)[0].value in M.properties()}],"filter-has-id":[u,[],function(M){return M.id()!==null}],"filter-type-in":[u,[r(c)],function(M,N){return b(N,1)[0].value.indexOf(M.geometryType())>=0}],"filter-id-in":[u,[r(n)],function(M,N){return b(N,1)[0].value.indexOf(M.id())>=0}],"filter-in-small":[u,[c,r(n)],function(M,N){var V=b(N,2),G=V[0];return V[1].value.indexOf(M.properties()[G.value])>=0}],"filter-in-large":[u,[c,r(n)],function(M,N){var V=b(N,2),G=V[0],H=V[1];return function(Y,$,Q,tt){for(;Q<=tt;){var et=Q+tt>>1;if($[et]===Y)return!0;$[et]>Y?tt=et-1:Q=et+1}return!1}(M.properties()[G.value],H.value,0,H.value.length-1)}],">":{type:u,overloads:[[[f,f],L],[[c,c],L]]},"<":{type:u,overloads:[[[f,f],q],[[c,c],q]]},">=":{type:u,overloads:[[[f,f],j],[[c,c],j]]},"<=":{type:u,overloads:[[[f,f],I],[[c,c],I]]},all:{type:u,overloads:[[[u,u],function(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)&&H.evaluate(M)}],[p(u),function(M,N){var V=!0,G=!1,H=void 0;try{for(var Y,$=N[Symbol.iterator]();!(V=(Y=$.next()).done);V=!0)if(!Y.value.evaluate(M))return!1}catch(Q){G=!0,H=Q}finally{try{V||$.return==null||$.return()}finally{if(G)throw H}}return!0}]]},any:{type:u,overloads:[[[u,u],function(M,N){var V=b(N,2),G=V[0],H=V[1];return G.evaluate(M)||H.evaluate(M)}],[p(u),function(M,N){var V=!0,G=!1,H=void 0;try{for(var Y,$=N[Symbol.iterator]();!(V=(Y=$.next()).done);V=!0)if(Y.value.evaluate(M))return!0}catch(Q){G=!0,H=Q}finally{try{V||$.return==null||$.return()}finally{if(G)throw H}}return!1}]]},"!":[u,[u],function(M,N){return!b(N,1)[0].evaluate(M)}],upcase:[c,[c],function(M,N){return b(N,1)[0].evaluate(M).toUpperCase()}],downcase:[c,[c],function(M,N){return b(N,1)[0].evaluate(M).toLowerCase()}],concat:[c,p(c),function(M,N){return N.map(function(V){return V.evaluate(M)}).join("")}]}),O.exports=J},function(O,D,o){var _=o(7),e=o(17),b=o(29),g=o(43),f=o(92),c=o(93),u=o(24);O.exports=function(i){var a,n,t,r=i.valueSpec,l=u(i.value.type),d={},h=l!=="categorical"&&i.value.property===void 0,m=!h,S=e(i.value.stops)==="array"&&e(i.value.stops[0])==="array"&&e(i.value.stops[0][0])==="object",y=g({key:i.key,value:i.value,valueSpec:i.styleSpec.function,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(w){if(l==="identity")return[new _(w.key,w.value,'identity function may not have a "stops" property')];var A=[],k=w.value;return A=A.concat(f({key:w.key,value:k,valueSpec:w.valueSpec,style:w.style,styleSpec:w.styleSpec,arrayElementValidator:s})),e(k)==="array"&&k.length===0&&A.push(new _(w.key,k,"array must have at least one stop")),A},default:function(w){return b({key:w.key,value:w.value,valueSpec:r,style:w.style,styleSpec:w.styleSpec})}}});return l==="identity"&&h&&y.push(new _(i.key,i.value,'missing required property "property"')),l==="identity"||i.value.stops||y.push(new _(i.key,i.value,'missing required property "stops"')),l==="exponential"&&i.valueSpec.function==="piecewise-constant"&&y.push(new _(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(m&&!i.valueSpec["property-function"]?y.push(new _(i.key,i.value,"property functions not supported")):h&&!i.valueSpec["zoom-function"]&&i.objectKey!=="heatmap-color"&&y.push(new _(i.key,i.value,"zoom functions not supported"))),l!=="categorical"&&!S||i.value.property!==void 0||y.push(new _(i.key,i.value,'"property" property is required')),y;function s(w){var A=[],k=w.value,v=w.key;if(e(k)!=="array")return[new _(v,k,"array expected, ".concat(e(k)," found"))];if(k.length!==2)return[new _(v,k,"array length 2 expected, length ".concat(k.length," found"))];if(S){if(e(k[0])!=="object")return[new _(v,k,"object expected, ".concat(e(k[0])," found"))];if(k[0].zoom===void 0)return[new _(v,k,"object stop key must have zoom")];if(k[0].value===void 0)return[new _(v,k,"object stop key must have value")];if(t&&t>u(k[0].zoom))return[new _(v,k[0].zoom,"stop zoom values must appear in ascending order")];u(k[0].zoom)!==t&&(t=u(k[0].zoom),n=void 0,d={}),A=A.concat(g({key:"".concat(v,"[0]"),value:k[0],valueSpec:{zoom:{}},style:w.style,styleSpec:w.styleSpec,objectElementValidators:{zoom:c,value:p}}))}else A=A.concat(p({key:"".concat(v,"[0]"),value:k[0],valueSpec:{},style:w.style,styleSpec:w.styleSpec},k));return A.concat(b({key:"".concat(v,"[1]"),value:k[1],valueSpec:r,style:w.style,styleSpec:w.styleSpec}))}function p(w,A){var k=e(w.value),v=u(w.value),x=w.value!==null?w.value:A;if(a){if(k!==a)return[new _(w.key,x,"".concat(k," stop domain type must match previous stop domain type ").concat(a))]}else a=k;if(k!=="number"&&k!=="string"&&k!=="boolean")return[new _(w.key,x,"stop domain value must be a number, string, or boolean")];if(k!=="number"&&l!=="categorical"){var T="number expected, ".concat(k," found");return r["property-function"]&&l===void 0&&(T+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _(w.key,x,T)]}return l!=="categorical"||k!=="number"||isFinite(v)&&Math.floor(v)===v?l!=="categorical"&&k==="number"&&n!==void 0&&v<n?[new _(w.key,x,"stop domain values must appear in ascending order")]:(n=v,l==="categorical"&&v in d?[new _(w.key,x,"stop domain values must be unique")]:(d[v]=!0,[])):[new _(w.key,x,"integer expected, found ".concat(v))]}}},function(O,D,o){var _=o(17),e=o(29),b=o(7);O.exports=function(g){var f=g.value,c=g.valueSpec,u=g.style,i=g.styleSpec,a=g.key,n=g.arrayElementValidator||e;if(_(f)!=="array")return[new b(a,f,"array expected, ".concat(_(f)," found"))];if(c.length&&f.length!==c.length)return[new b(a,f,"array length ".concat(c.length," expected, length ").concat(f.length," found"))];if(c["min-length"]&&f.length<c["min-length"])return[new b(a,f,"array length at least ".concat(c["min-length"]," expected, length ").concat(f.length," found"))];var t={type:c.value};i.$version<7&&(t.function=c.function),_(c.value)==="object"&&(t=c.value);for(var r=[],l=0;l<f.length;l++)r=r.concat(n({array:f,arrayIndex:l,value:f[l],valueSpec:t,style:u,styleSpec:i,key:"".concat(a,"[").concat(l,"]")}));return r}},function(O,D,o){var _=o(17),e=o(7);O.exports=function(b){var g=b.key,f=b.value,c=b.valueSpec,u=_(f);return u!=="number"?[new e(g,f,"number expected, ".concat(u," found"))]:"minimum"in c&&f<c.minimum?[new e(g,f,"".concat(f," is less than the minimum value ").concat(c.minimum))]:"maximum"in c&&f>c.maximum?[new e(g,f,"".concat(f," is greater than the maximum value ").concat(c.maximum))]:[]}},function(O,D,o){var _=o(7),e=o(30),b=e.createExpression,g=e.createPropertyExpression,f=o(24);O.exports=function(c){var u=(c.expressionContext==="property"?g:b)(f.deep(c.value),c.valueSpec);return u.result==="error"?u.value.map(function(i){return new _("".concat(c.key).concat(i.key),c.value,i.message)}):c.expressionContext==="property"&&c.propertyKey==="text-font"&&u.value._styleExpression.expression.possibleOutputs().indexOf(void 0)!==-1?[new _(c.key,c.value,'Invalid data expression for "text-font". Output values must be contained as literals within the expression.')]:[]}},function(O,D,o){var _=o(7),e=o(24),b=o(43),g=o(59),f=o(96),c=o(98),u=o(29),i=o(41);O.exports=function(a){var n=[],t=a.value,r=a.key,l=a.style,d=a.styleSpec;t.type||t.ref||n.push(new _(r,t,'either "type" or "ref" is required'));var h,m=e(t.type),S=e(t.ref);if(t.id)for(var y=e(t.id),s=0;s<a.arrayIndex;s++){var p=l.layers[s];e(p.id)===y&&n.push(new _(r,t.id,'duplicate layer id "'.concat(t.id,'", previously used at line ').concat(p.id.__line__)))}if("ref"in t)["type","source","source-layer","filter","layout"].forEach(function(k){k in t&&n.push(new _(r,t[k],'"'.concat(k,'" is prohibited for ref layers')))}),l.layers.forEach(function(k){e(k.id)===S&&(h=k)}),h?h.ref?n.push(new _(r,t.ref,"ref cannot reference another ref layer")):m=e(h.type):n.push(new _(r,t.ref,'ref layer "'.concat(S,'" not found')));else if(m!=="background")if(t.source){var w=l.sources&&l.sources[t.source],A=w&&e(w.type);w?A==="vector"&&m==="raster"?n.push(new _(r,t.source,'layer "'.concat(t.id,'" requires a raster source'))):A==="raster"&&m!=="raster"?n.push(new _(r,t.source,'layer "'.concat(t.id,'" requires a vector source'))):A!=="vector"||t["source-layer"]?A==="raster-dem"&&m!=="hillshade"&&n.push(new _(r,t.source,"raster-dem source can only be used with layer type 'hillshade'.")):n.push(new _(r,t,'layer "'.concat(t.id,'" must specify a "source-layer"'))):n.push(new _(r,t.source,'source "'.concat(t.source,'" not found')))}else n.push(new _(r,t,'missing required property "source"'));return n=n.concat(b({key:r,value:t,valueSpec:d.layer,style:a.style,styleSpec:a.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return u({key:"".concat(r,".type"),value:t.type,valueSpec:d.layer.type,style:a.style,styleSpec:a.styleSpec,object:t,objectKey:"type"})},filter:g,layout:function(k){return b({layer:t,key:k.key,value:k.value,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{"*":function(v){return c(i({layerType:m},v))}}})},paint:function(k){return b({layer:t,key:k.key,value:k.value,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{"*":function(v){return f(i({layerType:m},v))}}})}}}))}},function(O,D,o){var _=o(97);O.exports=function(e){return _(e,"paint")}},function(O,D,o){var _=o(29),e=o(7),b=o(17),g=o(57).isFunction,f=o(24);O.exports=function(c,u){var i=c.key,a=c.style,n=c.styleSpec,t=c.value,r=c.objectKey,l=n["".concat(u,"_").concat(c.layerType)];if(!l)return[];var d=r.match(/^(.*)-transition$/);if(u==="paint"&&d&&l[d[1]]&&l[d[1]].transition)return _({key:i,value:t,valueSpec:n.transition,style:a,styleSpec:n});var h,m=c.valueSpec||l[r];if(!m)return[new e(i,t,'unknown property "'.concat(r,'"'))];if(b(t)==="string"&&m["property-function"]&&!m.tokens&&(h=/^{([^}]+)}$/.exec(t)))return[new e(i,t,'"'.concat(r,`" does not support interpolation syntax
`)+'Use an identity property function instead: `{ "type": "identity", "property": '.concat(JSON.stringify(h[1])," }`."))];var S=[];return c.layerType==="symbol"&&(r==="text-field"&&a&&!a.glyphs&&S.push(new e(i,t,'use of "text-field" requires a style "glyphs" property')),r==="text-font"&&g(f.deep(t))&&f(t.type)==="identity"&&S.push(new e(i,t,'"text-font" does not support identity functions'))),S.concat(_({key:c.key,value:t,valueSpec:m,style:a,styleSpec:n,expressionContext:"property",propertyKey:r}))}},function(O,D,o){var _=o(97);O.exports=function(e){return _(e,"layout")}},function(O,D,o){var _=o(7),e=o(24),b=o(43),g=o(58);O.exports=function(f){var c=f.value,u=f.key,i=f.styleSpec,a=f.style;if(!c.type)return[new _(u,c,'"type" is required')];var n=e(c.type),t=[];switch(n){case"vector":case"raster":case"raster-dem":if(t=t.concat(b({key:u,value:c,valueSpec:i["source_".concat(n.replace("-","_"))],style:f.style,styleSpec:i})),"url"in c)for(var r in c)["type","url","tileSize"].indexOf(r)<0&&t.push(new _("".concat(u,".").concat(r),c[r],'a source with a "url" property may not include a "'.concat(r,'" property')));return t;case"geojson":return b({key:u,value:c,valueSpec:i.source_geojson,style:a,styleSpec:i});case"video":return b({key:u,value:c,valueSpec:i.source_video,style:a,styleSpec:i});case"image":return b({key:u,value:c,valueSpec:i.source_image,style:a,styleSpec:i});case"canvas":return b({key:u,value:c,valueSpec:i.source_canvas,style:a,styleSpec:i});default:return g({key:"".concat(u,".type"),value:c.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image","canvas"]},style:a,styleSpec:i})}}},function(O,D,o){var _=o(7),e=o(17),b=o(29);O.exports=function(g){var f=g.value,c=g.styleSpec,u=c.light,i=g.style,a=[],n=e(f);if(f===void 0)return a;if(n!=="object")return a=a.concat([new _("light",f,"object expected, ".concat(n," found"))]);for(var t in f){var r=t.match(/^(.*)-transition$/);a=r&&u[r[1]]&&u[r[1]].transition?a.concat(b({key:t,value:f[t],valueSpec:c.transition,style:i,styleSpec:c})):u[t]?a.concat(b({key:t,value:f[t],valueSpec:u[t],style:i,styleSpec:c})):a.concat([new _(t,f[t],'unknown property "'.concat(t,'"'))])}return a}},function(O,D,o){var _=o(17),e=o(7);O.exports=function(b){var g=b.value,f=b.key,c=_(g);return c!=="string"?[new e(f,g,"string expected, ".concat(c," found"))]:[]}},function(O,D,o){"use strict";O.exports=e;var _=3;function e(b,g,f){var c=this.cells=[];if(b instanceof ArrayBuffer){this.arrayBuffer=b;var u=new Int32Array(this.arrayBuffer);b=u[0],g=u[1],f=u[2],this.d=g+2*f;for(var i=0;i<this.d*this.d;i++){var a=u[_+i],n=u[_+i+1];c.push(a===n?null:u.subarray(a,n))}var t=u[_+c.length],r=u[_+c.length+1];this.keys=u.subarray(t,r),this.bboxes=u.subarray(r),this.insert=this._insertReadonly}else{this.d=g+2*f;for(var l=0;l<this.d*this.d;l++)c.push([]);this.keys=[],this.bboxes=[]}this.n=g,this.extent=b,this.padding=f,this.scale=g/b,this.uid=0;var d=f/g*b;this.min=-d,this.max=b+d}e.prototype.insert=function(b,g,f,c,u){this._forEachCell(g,f,c,u,this._insertCell,this.uid++),this.keys.push(b),this.bboxes.push(g),this.bboxes.push(f),this.bboxes.push(c),this.bboxes.push(u)},e.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},e.prototype._insertCell=function(b,g,f,c,u,i){this.cells[u].push(i)},e.prototype.query=function(b,g,f,c,u){var i=this.min,a=this.max;if(b<=i&&g<=i&&a<=f&&a<=c&&!u)return Array.prototype.slice.call(this.keys);var n=[];return this._forEachCell(b,g,f,c,this._queryCell,n,{},u),n},e.prototype._queryCell=function(b,g,f,c,u,i,a,n){var t=this.cells[u];if(t!==null)for(var r=this.keys,l=this.bboxes,d=0;d<t.length;d++){var h=t[d];if(a[h]===void 0){var m=4*h;(n?n(l[m+0],l[m+1],l[m+2],l[m+3]):b<=l[m+2]&&g<=l[m+3]&&f>=l[m+0]&&c>=l[m+1])?(a[h]=!0,i.push(r[h])):a[h]=!1}}},e.prototype._forEachCell=function(b,g,f,c,u,i,a,n){for(var t=this._convertToCellCoord(b),r=this._convertToCellCoord(g),l=this._convertToCellCoord(f),d=this._convertToCellCoord(c),h=t;h<=l;h++)for(var m=r;m<=d;m++){var S=this.d*m+h;if((!n||n(this._convertFromCellCoord(h),this._convertFromCellCoord(m),this._convertFromCellCoord(h+1),this._convertFromCellCoord(m+1)))&&u.call(this,b,g,f,c,S,i,a,n))return}},e.prototype._convertFromCellCoord=function(b){return(b-this.padding)/this.scale},e.prototype._convertToCellCoord=function(b){return Math.max(0,Math.min(this.d-1,Math.floor(b*this.scale)+this.padding))},e.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var b=this.cells,g=_+this.cells.length+1+1,f=0,c=0;c<this.cells.length;c++)f+=this.cells[c].length;var u=new Int32Array(g+f+this.keys.length+this.bboxes.length);u[0]=this.extent,u[1]=this.n,u[2]=this.padding;for(var i=g,a=0;a<b.length;a++){var n=b[a];u[_+a]=i,u.set(n,i),i+=n.length}return u[_+b.length]=i,u.set(this.keys,i),i+=this.keys.length,u[_+b.length+1]=i,u.set(this.bboxes,i),i+=this.bboxes.length,u.buffer}},function(O,D,o){function _(r,l){for(var d=0;d<l.length;d++){var h=l[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}var e=o(14).CircleLayoutArray,b=o(152).members,g=o(36).SegmentVector,f=o(32).ProgramConfigurationSet,c=o(37).TriangleIndexArray,u=o(38),i=o(6),a=o(11).register;function n(r,l,d,h,m){r.emplaceBack(2*l+(h+1)/2,2*d+(m+1)/2)}var t=function(){function r(m){(function(S,y){if(!(S instanceof y))throw new TypeError("Cannot call a class as a function")})(this,r),this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(S){return S.id}),this.index=m.index,this.layoutVertexArray=new e,this.indexArray=new c,this.segments=new g,this.programConfigurations=new f(b,m.layers,m.zoom)}var l,d,h;return l=r,(d=[{key:"populate",value:function(m,S){var y=!0,s=!1,p=void 0;try{for(var w,A=m[Symbol.iterator]();!(y=(w=A.next()).done);y=!0){var k=w.value,v=k.feature,x=k.index,T=k.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},v)){var E=u(v);this.addFeature(v,E),S.featureIndex.insert(v,E,x,T,this.index)}}}catch(C){s=!0,p=C}finally{try{y||A.return==null||A.return()}finally{if(s)throw p}}}},{key:"isEmpty",value:function(){return this.layoutVertexArray.length===0}},{key:"upload",value:function(m){this.layoutVertexBuffer=m.createVertexBuffer(this.layoutVertexArray,b),this.indexBuffer=m.createIndexBuffer(this.indexArray),this.programConfigurations.upload(m)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(m,S){var y=!0,s=!1,p=void 0;try{for(var w,A=S[Symbol.iterator]();!(y=(w=A.next()).done);y=!0){var k=w.value,v=!0,x=!1,T=void 0;try{for(var E,C=k[Symbol.iterator]();!(v=(E=C.next()).done);v=!0){var z=E.value,P=z.x,B=z.y;if(!(P<0||P>=i||B<0||B>=i)){var F=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),Z=F.vertexLength;n(this.layoutVertexArray,P,B,-1,-1),n(this.layoutVertexArray,P,B,1,-1),n(this.layoutVertexArray,P,B,1,1),n(this.layoutVertexArray,P,B,-1,1),this.indexArray.emplaceBack(Z,Z+1,Z+2),this.indexArray.emplaceBack(Z,Z+3,Z+2),F.vertexLength+=4,F.primitiveLength+=2}}}catch(W){x=!0,T=W}finally{try{v||C.return==null||C.return()}finally{if(x)throw T}}}}catch(W){s=!0,p=W}finally{try{y||A.return==null||A.return()}finally{if(s)throw p}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,m)}}])&&_(l.prototype,d),h&&_(l,h),r}();a("CircleBucket",t,{omit:["layers"]}),O.exports=t},function(O,D,o){"use strict";function _(v,x,T){T=T||2;var E,C,z,P,B,F,Z,W=x&&x.length,J=W?x[0]*T:v.length,X=e(v,0,J,T,!0),R=[];if(!X||X.next===X.prev)return R;if(W&&(X=function(K,q,L,I){var j,M,N,V,G,H=[];for(j=0,M=q.length;j<M;j++)N=q[j]*I,V=j<M-1?q[j+1]*I:K.length,(G=e(K,N,V,I,!1))===G.next&&(G.steiner=!0),H.push(r(G));for(H.sort(a),j=0;j<H.length;j++)n(H[j],L),L=b(L,L.next);return L}(v,x,X,T)),v.length>80*T){E=z=v[0],C=P=v[1];for(var U=T;U<J;U+=T)(B=v[U])<E&&(E=B),(F=v[U+1])<C&&(C=F),B>z&&(z=B),F>P&&(P=F);Z=(Z=Math.max(z-E,P-C))!==0?1/Z:0}return g(X,R,T,E,C,Z),R}function e(v,x,T,E,C){var z,P;if(C===k(v,x,T,E)>0)for(z=x;z<T;z+=E)P=p(z,v[z],v[z+1],P);else for(z=T-E;z>=x;z-=E)P=p(z,v[z],v[z+1],P);return P&&m(P,P.next)&&(w(P),P=P.next),P}function b(v,x){if(!v)return v;x||(x=v);var T,E=v;do if(T=!1,E.steiner||!m(E,E.next)&&h(E.prev,E,E.next)!==0)E=E.next;else{if(w(E),(E=x=E.prev)===E.next)break;T=!0}while(T||E!==x);return x}function g(v,x,T,E,C,z,P){if(v){!P&&z&&function(W,J,X,R){var U=W;do U.z===null&&(U.z=t(U.x,U.y,J,X,R)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==W);U.prevZ.nextZ=null,U.prevZ=null,function(K){var q,L,I,j,M,N,V,G,H=1;do{for(L=K,K=null,M=null,N=0;L;){for(N++,I=L,V=0,q=0;q<H&&(V++,I=I.nextZ);q++);for(G=H;V>0||G>0&&I;)V!==0&&(G===0||!I||L.z<=I.z)?(j=L,L=L.nextZ,V--):(j=I,I=I.nextZ,G--),M?M.nextZ=j:K=j,j.prevZ=M,M=j;L=I}M.nextZ=null,H*=2}while(N>1)}(U)}(v,E,C,z);for(var B,F,Z=v;v.prev!==v.next;)if(B=v.prev,F=v.next,z?c(v,E,C,z):f(v))x.push(B.i/T),x.push(v.i/T),x.push(F.i/T),w(v),v=F.next,Z=F.next;else if((v=F)===Z){P?P===1?g(v=u(v,x,T),x,T,E,C,z,2):P===2&&i(v,x,T,E,C,z):g(b(v),x,T,E,C,z,1);break}}}function f(v){var x=v.prev,T=v,E=v.next;if(h(x,T,E)>=0)return!1;for(var C=v.next.next;C!==v.prev;){if(l(x.x,x.y,T.x,T.y,E.x,E.y,C.x,C.y)&&h(C.prev,C,C.next)>=0)return!1;C=C.next}return!0}function c(v,x,T,E){var C=v.prev,z=v,P=v.next;if(h(C,z,P)>=0)return!1;for(var B=C.x<z.x?C.x<P.x?C.x:P.x:z.x<P.x?z.x:P.x,F=C.y<z.y?C.y<P.y?C.y:P.y:z.y<P.y?z.y:P.y,Z=C.x>z.x?C.x>P.x?C.x:P.x:z.x>P.x?z.x:P.x,W=C.y>z.y?C.y>P.y?C.y:P.y:z.y>P.y?z.y:P.y,J=t(B,F,x,T,E),X=t(Z,W,x,T,E),R=v.prevZ,U=v.nextZ;R&&R.z>=J&&U&&U.z<=X;){if(R!==v.prev&&R!==v.next&&l(C.x,C.y,z.x,z.y,P.x,P.y,R.x,R.y)&&h(R.prev,R,R.next)>=0||(R=R.prevZ,U!==v.prev&&U!==v.next&&l(C.x,C.y,z.x,z.y,P.x,P.y,U.x,U.y)&&h(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;R&&R.z>=J;){if(R!==v.prev&&R!==v.next&&l(C.x,C.y,z.x,z.y,P.x,P.y,R.x,R.y)&&h(R.prev,R,R.next)>=0)return!1;R=R.prevZ}for(;U&&U.z<=X;){if(U!==v.prev&&U!==v.next&&l(C.x,C.y,z.x,z.y,P.x,P.y,U.x,U.y)&&h(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function u(v,x,T){var E=v;do{var C=E.prev,z=E.next.next;!m(C,z)&&S(C,E,E.next,z)&&y(C,z)&&y(z,C)&&(x.push(C.i/T),x.push(E.i/T),x.push(z.i/T),w(E),w(E.next),E=v=z),E=E.next}while(E!==v);return E}function i(v,x,T,E,C,z){var P=v;do{for(var B=P.next.next;B!==P.prev;){if(P.i!==B.i&&d(P,B)){var F=s(P,B);return P=b(P,P.next),F=b(F,F.next),g(P,x,T,E,C,z),void g(F,x,T,E,C,z)}B=B.next}P=P.next}while(P!==v)}function a(v,x){return v.x-x.x}function n(v,x){if(x=function(E,C){var z,P=C,B=E.x,F=E.y,Z=-1/0;do{if(F<=P.y&&F>=P.next.y&&P.next.y!==P.y){var W=P.x+(F-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(W<=B&&W>Z){if(Z=W,W===B){if(F===P.y)return P;if(F===P.next.y)return P.next}z=P.x<P.next.x?P:P.next}}P=P.next}while(P!==C);if(!z)return null;if(B===Z)return z.prev;var J,X=z,R=z.x,U=z.y,K=1/0;for(P=z.next;P!==X;)B>=P.x&&P.x>=R&&B!==P.x&&l(F<U?B:Z,F,R,U,F<U?Z:B,F,P.x,P.y)&&((J=Math.abs(F-P.y)/(B-P.x))<K||J===K&&P.x>z.x)&&y(P,E)&&(z=P,K=J),P=P.next;return z}(v,x)){var T=s(x,v);b(T,T.next)}}function t(v,x,T,E,C){return(v=1431655765&((v=858993459&((v=252645135&((v=16711935&((v=32767*(v-T)*C)|v<<8))|v<<4))|v<<2))|v<<1))|(x=1431655765&((x=858993459&((x=252645135&((x=16711935&((x=32767*(x-E)*C)|x<<8))|x<<4))|x<<2))|x<<1))<<1}function r(v){var x=v,T=v;do(x.x<T.x||x.x===T.x&&x.y<T.y)&&(T=x),x=x.next;while(x!==v);return T}function l(v,x,T,E,C,z,P,B){return(C-P)*(x-B)-(v-P)*(z-B)>=0&&(v-P)*(E-B)-(T-P)*(x-B)>=0&&(T-P)*(z-B)-(C-P)*(E-B)>=0}function d(v,x){return v.next.i!==x.i&&v.prev.i!==x.i&&!function(T,E){var C=T;do{if(C.i!==T.i&&C.next.i!==T.i&&C.i!==E.i&&C.next.i!==E.i&&S(C,C.next,T,E))return!0;C=C.next}while(C!==T);return!1}(v,x)&&y(v,x)&&y(x,v)&&function(T,E){var C=T,z=!1,P=(T.x+E.x)/2,B=(T.y+E.y)/2;do C.y>B!=C.next.y>B&&C.next.y!==C.y&&P<(C.next.x-C.x)*(B-C.y)/(C.next.y-C.y)+C.x&&(z=!z),C=C.next;while(C!==T);return z}(v,x)}function h(v,x,T){return(x.y-v.y)*(T.x-x.x)-(x.x-v.x)*(T.y-x.y)}function m(v,x){return v.x===x.x&&v.y===x.y}function S(v,x,T,E){return!!(m(v,x)&&m(T,E)||m(v,E)&&m(T,x))||h(v,x,T)>0!=h(v,x,E)>0&&h(T,E,v)>0!=h(T,E,x)>0}function y(v,x){return h(v.prev,v,v.next)<0?h(v,x,v.next)>=0&&h(v,v.prev,x)>=0:h(v,x,v.prev)<0||h(v,v.next,x)<0}function s(v,x){var T=new A(v.i,v.x,v.y),E=new A(x.i,x.x,x.y),C=v.next,z=x.prev;return v.next=x,x.prev=v,T.next=C,C.prev=T,E.next=T,T.prev=E,z.next=E,E.prev=z,E}function p(v,x,T,E){var C=new A(v,x,T);return E?(C.next=E.next,C.prev=E,E.next.prev=C,E.next=C):(C.prev=C,C.next=C),C}function w(v){v.next.prev=v.prev,v.prev.next=v.next,v.prevZ&&(v.prevZ.nextZ=v.nextZ),v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function A(v,x,T){this.i=v,this.x=x,this.y=T,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function k(v,x,T,E){for(var C=0,z=x,P=T-E;z<T;z+=E)C+=(v[P]-v[z])*(v[z+1]+v[P+1]),P=z;return C}O.exports=_,O.exports.default=_,_.deviation=function(v,x,T,E){var C=x&&x.length,z=C?x[0]*T:v.length,P=Math.abs(k(v,0,z,T));if(C)for(var B=0,F=x.length;B<F;B++){var Z=x[B]*T,W=B<F-1?x[B+1]*T:v.length;P-=Math.abs(k(v,Z,W,T))}var J=0;for(B=0;B<E.length;B+=3){var X=E[B]*T,R=E[B+1]*T,U=E[B+2]*T;J+=Math.abs((v[X]-v[U])*(v[R+1]-v[X+1])-(v[X]-v[R])*(v[U+1]-v[X+1]))}return P===0&&J===0?0:Math.abs((J-P)/P)},_.flatten=function(v){for(var x=v[0][0].length,T={vertices:[],holes:[],dimensions:x},E=0,C=0;C<v.length;C++){for(var z=0;z<v[C].length;z++)for(var P=0;P<x;P++)T.vertices.push(v[C][z][P]);C>0&&(E+=v[C-1].length,T.holes.push(E))}return T}},function(O,D,o){var _=o(163),e=o(0).calculateSignedArea;function b(g,f){return f.area-g.area}O.exports=function(g,f){var c=g.length;if(c<=1)return[g];for(var u,i,a=[],n=0;n<c;n++){var t=e(g[n]);t!==0&&(g[n].area=Math.abs(t),i===void 0&&(i=t<0),i===t<0?(u&&a.push(u),u=[g[n]]):u.push(g[n]))}if(u&&a.push(u),f>1)for(var r=0;r<a.length;r++)a[r].length<=f||(_(a[r],f,1,a[r].length-1,b),a[r]=a[r].slice(0,f));return a}},function(O,D,o){"use strict";var _=o(107);function e(g,f){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=g,this._keys=[],this._values=[],this._features=[],g.readFields(b,this,f),this.length=this._features.length}function b(g,f,c){g===15?f.version=c.readVarint():g===1?f.name=c.readString():g===5?f.extent=c.readVarint():g===2?f._features.push(c.pos):g===3?f._keys.push(c.readString()):g===4&&f._values.push(function(u){for(var i=null,a=u.readVarint()+u.pos;u.pos<a;){var n=u.readVarint()>>3;i=n===1?u.readString():n===2?u.readFloat():n===3?u.readDouble():n===4?u.readVarint64():n===5?u.readVarint():n===6?u.readSVarint():n===7?u.readBoolean():null}return i}(c))}O.exports=e,e.prototype.feature=function(g){if(g<0||g>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[g];var f=this._pbf.readVarint()+this._pbf.pos;return new _(this._pbf,f,this.extent,this._keys,this._values)}},function(O,D,o){"use strict";var _=o(3);function e(f,c,u,i,a){this.properties={},this.extent=u,this.type=0,this._pbf=f,this._geometry=-1,this._keys=i,this._values=a,f.readFields(b,this,c)}function b(f,c,u){f==1?c.id=u.readVarint():f==2?function(i,a){for(var n=i.readVarint()+i.pos;i.pos<n;){var t=a._keys[i.readVarint()],r=a._values[i.readVarint()];a.properties[t]=r}}(u,c):f==3?c.type=u.readVarint():f==4&&(c._geometry=u.pos)}function g(f){for(var c,u,i=0,a=0,n=f.length,t=n-1;a<n;t=a++)c=f[a],i+=((u=f[t]).x-c.x)*(c.y+u.y);return i}O.exports=e,e.types=["Unknown","Point","LineString","Polygon"],e.prototype.loadGeometry=function(){var f=this._pbf;f.pos=this._geometry;for(var c,u=f.readVarint()+f.pos,i=1,a=0,n=0,t=0,r=[];f.pos<u;){if(a<=0){var l=f.readVarint();i=7&l,a=l>>3}if(a--,i===1||i===2)n+=f.readSVarint(),t+=f.readSVarint(),i===1&&(c&&r.push(c),c=[]),c.push(new _(n,t));else{if(i!==7)throw new Error("unknown command "+i);c&&c.push(c[0].clone())}}return c&&r.push(c),r},e.prototype.bbox=function(){var f=this._pbf;f.pos=this._geometry;for(var c=f.readVarint()+f.pos,u=1,i=0,a=0,n=0,t=1/0,r=-1/0,l=1/0,d=-1/0;f.pos<c;){if(i<=0){var h=f.readVarint();u=7&h,i=h>>3}if(i--,u===1||u===2)(a+=f.readSVarint())<t&&(t=a),a>r&&(r=a),(n+=f.readSVarint())<l&&(l=n),n>d&&(d=n);else if(u!==7)throw new Error("unknown command "+u)}return[t,l,r,d]},e.prototype.toGeoJSON=function(f,c,u){var i,a,n=this.extent*Math.pow(2,u),t=this.extent*f,r=this.extent*c,l=this.loadGeometry(),d=e.types[this.type];function h(y){for(var s=0;s<y.length;s++){var p=y[s],w=180-360*(p.y+r)/n;y[s]=[360*(p.x+t)/n-180,360/Math.PI*Math.atan(Math.exp(w*Math.PI/180))-90]}}switch(this.type){case 1:var m=[];for(i=0;i<l.length;i++)m[i]=l[i][0];h(l=m);break;case 2:for(i=0;i<l.length;i++)h(l[i]);break;case 3:for(l=function(y){var s=y.length;if(s<=1)return[y];for(var p,w,A=[],k=0;k<s;k++){var v=g(y[k]);v!==0&&(w===void 0&&(w=v<0),w===v<0?(p&&A.push(p),p=[y[k]]):p.push(y[k]))}return p&&A.push(p),A}(l),i=0;i<l.length;i++)for(a=0;a<l[i].length;a++)h(l[i][a])}l.length===1?l=l[0]:d="Multi"+d;var S={type:"Feature",geometry:{type:d,coordinates:l},properties:this.properties};return"id"in this&&(S.id=this.id),S}},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(){(function(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),this.first=!0}var b,g,f;return b=e,(g=[{key:"update",value:function(c,u){var i=Math.floor(c);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=c,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=u):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=u),c!==this.lastZoom&&(this.lastZoom=c,this.lastFloorZoom=i,!0))}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D){O.exports={"Latin-1 Supplement":function(o){return o>=128&&o<=255},Arabic:function(o){return o>=1536&&o<=1791},"Arabic Supplement":function(o){return o>=1872&&o<=1919},"Arabic Extended-A":function(o){return o>=2208&&o<=2303},"Hangul Jamo":function(o){return o>=4352&&o<=4607},"Unified Canadian Aboriginal Syllabics":function(o){return o>=5120&&o<=5759},"Unified Canadian Aboriginal Syllabics Extended":function(o){return o>=6320&&o<=6399},"General Punctuation":function(o){return o>=8192&&o<=8303},"Letterlike Symbols":function(o){return o>=8448&&o<=8527},"Number Forms":function(o){return o>=8528&&o<=8591},"Miscellaneous Technical":function(o){return o>=8960&&o<=9215},"Control Pictures":function(o){return o>=9216&&o<=9279},"Optical Character Recognition":function(o){return o>=9280&&o<=9311},"Enclosed Alphanumerics":function(o){return o>=9312&&o<=9471},"Geometric Shapes":function(o){return o>=9632&&o<=9727},"Miscellaneous Symbols":function(o){return o>=9728&&o<=9983},"Miscellaneous Symbols and Arrows":function(o){return o>=11008&&o<=11263},"CJK Radicals Supplement":function(o){return o>=11904&&o<=12031},"Kangxi Radicals":function(o){return o>=12032&&o<=12255},"Ideographic Description Characters":function(o){return o>=12272&&o<=12287},"CJK Symbols and Punctuation":function(o){return o>=12288&&o<=12351},Hiragana:function(o){return o>=12352&&o<=12447},Katakana:function(o){return o>=12448&&o<=12543},Bopomofo:function(o){return o>=12544&&o<=12591},"Hangul Compatibility Jamo":function(o){return o>=12592&&o<=12687},Kanbun:function(o){return o>=12688&&o<=12703},"Bopomofo Extended":function(o){return o>=12704&&o<=12735},"CJK Strokes":function(o){return o>=12736&&o<=12783},"Katakana Phonetic Extensions":function(o){return o>=12784&&o<=12799},"Enclosed CJK Letters and Months":function(o){return o>=12800&&o<=13055},"CJK Compatibility":function(o){return o>=13056&&o<=13311},"CJK Unified Ideographs Extension A":function(o){return o>=13312&&o<=19903},"Yijing Hexagram Symbols":function(o){return o>=19904&&o<=19967},"CJK Unified Ideographs":function(o){return o>=19968&&o<=40959},"Yi Syllables":function(o){return o>=40960&&o<=42127},"Yi Radicals":function(o){return o>=42128&&o<=42191},"Hangul Jamo Extended-A":function(o){return o>=43360&&o<=43391},"Hangul Syllables":function(o){return o>=44032&&o<=55215},"Hangul Jamo Extended-B":function(o){return o>=55216&&o<=55295},"Private Use Area":function(o){return o>=57344&&o<=63743},"CJK Compatibility Ideographs":function(o){return o>=63744&&o<=64255},"Arabic Presentation Forms-A":function(o){return o>=64336&&o<=65023},"Vertical Forms":function(o){return o>=65040&&o<=65055},"CJK Compatibility Forms":function(o){return o>=65072&&o<=65103},"Small Form Variants":function(o){return o>=65104&&o<=65135},"Arabic Presentation Forms-B":function(o){return o>=65136&&o<=65279},"Halfwidth and Fullwidth Forms":function(o){return o>=65280&&o<=65519}}},function(O,D,o){var _=o(63);O.exports=function(e){for(var b="",g=0;g<e.length;g++){var f=e.charCodeAt(g+1)||null,c=e.charCodeAt(g-1)||null;(!f||!_.charHasRotatedVerticalOrientation(f)||O.exports.lookup[e[g+1]])&&(!c||!_.charHasRotatedVerticalOrientation(c)||O.exports.lookup[e[g-1]])&&O.exports.lookup[e[g]]?b+=O.exports.lookup[e[g]]:b+=e[g]}return b},O.exports.lookup={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"}},function(O,D,o){O.exports=function(){function _(g,f,c){c=c||{},this.w=g||64,this.h=f||64,this.autoResize=!!c.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(g,f,c){this.x=0,this.y=g,this.w=this.free=f,this.h=c}function b(g,f,c,u,i,a,n){this.id=g,this.x=f,this.y=c,this.w=u,this.h=i,this.maxw=a||u,this.maxh=n||i,this.refcount=0}return _.prototype.pack=function(g,f){g=[].concat(g),f=f||{};for(var c,u,i,a,n=[],t=0;t<g.length;t++)if(c=g[t].w||g[t].width,u=g[t].h||g[t].height,i=g[t].id,c&&u){if(!(a=this.packOne(c,u,i)))continue;f.inPlace&&(g[t].x=a.x,g[t].y=a.y,g[t].id=a.id),n.push(a)}return this.shrink(),n},_.prototype.packOne=function(g,f,c){var u,i,a,n,t,r,l,d,h={freebin:-1,shelf:-1,waste:1/0},m=0;if(typeof c=="string"||typeof c=="number"){if(u=this.getBin(c))return this.ref(u),u;typeof c=="number"&&(this.maxId=Math.max(c,this.maxId))}else c=++this.maxId;for(n=0;n<this.freebins.length;n++){if(f===(u=this.freebins[n]).maxh&&g===u.maxw)return this.allocFreebin(n,g,f,c);f>u.maxh||g>u.maxw||f<=u.maxh&&g<=u.maxw&&(a=u.maxw*u.maxh-g*f)<h.waste&&(h.waste=a,h.freebin=n)}for(n=0;n<this.shelves.length;n++)if(m+=(i=this.shelves[n]).h,!(g>i.free)){if(f===i.h)return this.allocShelf(n,g,f,c);f>i.h||f<i.h&&(a=(i.h-f)*g)<h.waste&&(h.freebin=-1,h.waste=a,h.shelf=n)}return h.freebin!==-1?this.allocFreebin(h.freebin,g,f,c):h.shelf!==-1?this.allocShelf(h.shelf,g,f,c):f<=this.h-m&&g<=this.w?(i=new e(m,this.w,f),this.allocShelf(this.shelves.push(i)-1,g,f,c)):this.autoResize?(t=r=this.h,((l=d=this.w)<=t||g>l)&&(d=2*Math.max(g,l)),(t<l||f>t)&&(r=2*Math.max(f,t)),this.resize(d,r),this.packOne(g,f,c)):null},_.prototype.allocFreebin=function(g,f,c,u){var i=this.freebins.splice(g,1)[0];return i.id=u,i.w=f,i.h=c,i.refcount=0,this.bins[u]=i,this.ref(i),i},_.prototype.allocShelf=function(g,f,c,u){var i=this.shelves[g].alloc(f,c,u);return this.bins[u]=i,this.ref(i),i},_.prototype.shrink=function(){if(this.shelves.length>0){for(var g=0,f=0,c=0;c<this.shelves.length;c++){var u=this.shelves[c];f+=u.h,g=Math.max(u.w-u.free,g)}this.resize(g,f)}},_.prototype.getBin=function(g){return this.bins[g]},_.prototype.ref=function(g){if(++g.refcount==1){var f=g.h;this.stats[f]=1+(0|this.stats[f])}return g.refcount},_.prototype.unref=function(g){return g.refcount===0?0:(--g.refcount==0&&(this.stats[g.h]--,delete this.bins[g.id],this.freebins.push(g)),g.refcount)},_.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},_.prototype.resize=function(g,f){this.w=g,this.h=f;for(var c=0;c<this.shelves.length;c++)this.shelves[c].resize(g);return!0},e.prototype.alloc=function(g,f,c){if(g>this.free||f>this.h)return null;var u=this.x;return this.x+=g,this.free-=g,new b(c,u,this.y,g,f,g,this.h)},e.prototype.resize=function(g){return this.free+=g-this.w,this.w=g,!0},_}()},function(O,D,o){var _=o(0),e=o(16),b=o(2),g=o(34).normalizeSourceURL;O.exports=function(f,c,u){var i=function(a,n){if(a)return u(a);if(n){var t=_.pick(n,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);n.vector_layers&&(t.vectorLayers=n.vector_layers,t.vectorLayerIds=t.vectorLayers.map(function(r){return r.id})),u(null,t)}};f.url?e.getJSON(c(g(f.url),e.ResourceType.Source),i):b.frame(function(){return i(null,f)})}},function(O,D,o){function _(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var e=o(39),b=o(0).clamp,g=function(){function f(a,n,t){(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,f),this.bounds=e.convert(this.validateBounds(a)),this.minzoom=n||0,this.maxzoom=t||24}var c,u,i;return c=f,(u=[{key:"validateBounds",value:function(a){return Array.isArray(a)&&a.length===4?[Math.max(-180,a[0]),Math.max(-90,a[1]),Math.min(180,a[2]),Math.min(90,a[3])]:[-180,-90,180,90]}},{key:"contains",value:function(a){var n=Math.floor(this.lngX(this.bounds.getWest(),a.z)),t=Math.floor(this.latY(this.bounds.getNorth(),a.z)),r=Math.ceil(this.lngX(this.bounds.getEast(),a.z)),l=Math.ceil(this.latY(this.bounds.getSouth(),a.z));return a.x>=n&&a.x<r&&a.y>=t&&a.y<l}},{key:"lngX",value:function(a,n){return(a+180)*(Math.pow(2,n)/360)}},{key:"latY",value:function(a,n){var t=b(Math.sin(Math.PI/180*a),-.9999,.9999),r=Math.pow(2,n)/(2*Math.PI);return Math.pow(2,n-1)+.5*Math.log((1+t)/(1-t))*-r}}])&&_(c.prototype,u),i&&_(c,i),f}();O.exports=g},function(O,D,o){function _(d){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}function e(d,h){for(var m=0;m<h.length;m++){var S=h[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}function b(d){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)})(d)}function g(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function f(d,h){return(f=Object.setPrototypeOf||function(m,S){return m.__proto__=S,m})(d,h)}var c=o(0),u=o(16),i=o(10),a=o(112),n=o(34).normalizeTileURL,t=o(113),r=o(20),l=function(d){function h(s,p,w,A){var k;return function(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}(this,h),(k=function(v,x){return!x||_(x)!=="object"&&typeof x!="function"?g(v):x}(this,b(h).call(this))).id=s,k.dispatcher=w,k.setEventedParent(A),k.type="raster",k.minzoom=0,k.maxzoom=22,k.roundZoom=!0,k.scheme="xyz",k.tileSize=512,k._loaded=!1,k._options=c.extend({},p),c.extend(g(k),c.pick(p,["url","scheme","tileSize"])),k}var m,S,y;return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(p&&p.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),p&&f(s,p)}(h,i),m=h,(S=[{key:"load",value:function(){var s=this;this.fire("dataloading",{dataType:"source"}),a(this._options,this.map._transformRequest,function(p,w){p?s.fire("error",p):w&&(c.extend(s,w),w.bounds&&(s.tileBounds=new t(w.bounds,s.minzoom,s.maxzoom)),s.fire("data",{dataType:"source",sourceDataType:"metadata"}),s.fire("data",{dataType:"source",sourceDataType:"content"}))})}},{key:"onAdd",value:function(s){this.map=s,this.load()}},{key:"serialize",value:function(){return c.extend({},this._options)}},{key:"hasTile",value:function(s){return!this.tileBounds||this.tileBounds.contains(s.canonical)}},{key:"loadTile",value:function(s,p){var w=this,A=n(s.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);s.request=u.getImage(this.map._transformRequest(A,u.ResourceType.Tile),function(k,v){if(delete s.request,s.aborted)s.state="unloaded",p(null);else if(k)s.state="errored",p(k);else if(v){w.map._refreshExpiredTiles&&s.setExpiryData(v),delete v.cacheControl,delete v.expires;var x=w.map.painter.context,T=x.gl;s.texture=w.map.painter.getTileTexture(v.width),s.texture?(s.texture.bind(T.LINEAR,T.CLAMP_TO_EDGE,T.LINEAR_MIPMAP_NEAREST),T.texSubImage2D(T.TEXTURE_2D,0,0,0,T.RGBA,T.UNSIGNED_BYTE,v)):(s.texture=new r(x,v,T.RGBA),s.texture.bind(T.LINEAR,T.CLAMP_TO_EDGE,T.LINEAR_MIPMAP_NEAREST),x.extTextureFilterAnisotropic&&T.texParameterf(T.TEXTURE_2D,x.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,x.extTextureFilterAnisotropicMax)),T.generateMipmap(T.TEXTURE_2D),s.state="loaded",p(null)}})}},{key:"abortTile",value:function(s,p){s.request&&(s.request.abort(),delete s.request),p()}},{key:"unloadTile",value:function(s,p){s.texture&&this.map.painter.saveTileTexture(s.texture),p()}},{key:"hasTransition",value:function(){return!1}}])&&e(m.prototype,S),y&&e(m,y),h}();O.exports=l},function(O,D,o){function _(l){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(l)}function e(l,d){for(var h=0;h<d.length;h++){var m=d[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}function b(l,d){return!d||_(d)!=="object"&&typeof d!="function"?function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(l):d}function g(l){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)})(l)}function f(l,d){return(f=Object.setPrototypeOf||function(h,m){return h.__proto__=m,h})(l,d)}var c=o(10),u=o(0),i=o(5),a=o(6),n=o(16).ResourceType,t=o(2),r=function(l){function d(y,s,p,w){var A;(function(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")})(this,d),(A=b(this,g(d).call(this))).id=y,A.type="geojson",A.minzoom=0,A.maxzoom=18,A.tileSize=512,A.isTileClipped=!0,A.reparseOverscaled=!0,A.dispatcher=p,A.setEventedParent(w),A._data=s.data,A._options=u.extend({},s),s.maxzoom!==void 0&&(A.maxzoom=s.maxzoom),s.type&&(A.type=s.type);var k=a/A.tileSize;return A.workerOptions=u.extend({source:A.id,cluster:s.cluster||!1,geojsonVtOptions:{buffer:(s.buffer!==void 0?s.buffer:128)*k,tolerance:(s.tolerance!==void 0?s.tolerance:.375)*k,extent:a,maxZoom:A.maxzoom},superclusterOptions:{maxZoom:s.clusterMaxZoom!==void 0?Math.min(s.clusterMaxZoom,A.maxzoom-1):A.maxzoom-1,extent:a,radius:(s.clusterRadius||50)*k,log:!1}},s.workerOptions),A}var h,m,S;return function(y,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(s&&s.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),s&&f(y,s)}(d,c),h=d,(m=[{key:"load",value:function(){var y=this;this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(s){s?y.fire("error",{error:s}):y.fire("data",{dataType:"source",sourceDataType:"metadata"})})}},{key:"onAdd",value:function(y){this.map=y,this.load()}},{key:"setData",value:function(y){var s=this;return this._data=y,this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(p){if(p)return s.fire("error",{error:p});s.fire("data",{dataType:"source",sourceDataType:"content"})}),this}},{key:"_updateWorkerData",value:function(y){var s,p,w=this,A=u.extend({},this.workerOptions),k=this._data;typeof k=="string"?A.request=this.map._transformRequest((s=k,(p=i.document.createElement("a")).href=s,p.href),n.Source):A.data=JSON.stringify(k),this.workerID=this.dispatcher.send("".concat(this.type,".loadData"),A,function(v){w._loaded=!0,y(v)},this.workerID)}},{key:"loadTile",value:function(y,s){var p=this,w=y.workerID===void 0||y.state==="expired"?"loadTile":"reloadTile",A={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.devicePixelRatio,overscaling:y.tileID.overscaleFactor(),showCollisionBoxes:this.map.showCollisionBoxes};y.workerID=this.dispatcher.send(w,A,function(k,v){return y.unloadVectorData(),y.aborted?s(null):k?s(k):(y.loadVectorData(v,p.map.painter,w==="reloadTile"),s(null))},this.workerID)}},{key:"abortTile",value:function(y){y.aborted=!0}},{key:"unloadTile",value:function(y){y.unloadVectorData(),this.dispatcher.send("removeTile",{uid:y.uid,type:this.type,source:this.id},null,y.workerID)}},{key:"onRemove",value:function(){this.dispatcher.broadcast("removeSource",{type:this.type,source:this.id})}},{key:"serialize",value:function(){return u.extend({},this._options,{type:this.type,data:this._data})}},{key:"hasTransition",value:function(){return!1}}])&&e(h.prototype,m),S&&e(h,S),d}();O.exports=r},function(O,D){function o(_,e){var b=_.tileID,g=e.tileID;return b.overscaledZ-g.overscaledZ||b.canonical.y-g.canonical.y||b.wrap-g.wrap||b.canonical.x-g.canonical.x}D.rendered=function(_,e,b,g,f,c,u){var i=_.tilesIn(b);i.sort(o);var a=[],n=!0,t=!1,r=void 0;try{for(var l,d=i[Symbol.iterator]();!(n=(l=d.next()).done);n=!0){var h=l.value;a.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,h.queryGeometry,h.scale,g,c,_.id,u)})}}catch(m){t=!0,r=m}finally{try{n||d.return==null||d.return()}finally{if(t)throw r}}return function(m){var S={},y={},s=!0,p=!1,w=void 0;try{for(var A,k=m[Symbol.iterator]();!(s=(A=k.next()).done);s=!0){var v=A.value,x=v.queryResults,T=v.wrappedTileID,E=y[T]=y[T]||{};for(var C in x){var z=x[C],P=E[C]=E[C]||{},B=S[C]=S[C]||[],F=!0,Z=!1,W=void 0;try{for(var J,X=z[Symbol.iterator]();!(F=(J=X.next()).done);F=!0){var R=J.value;P[R.featureIndex]||(P[R.featureIndex]=!0,B.push(R.feature))}}catch(U){Z=!0,W=U}finally{try{F||X.return==null||X.return()}finally{if(Z)throw W}}}}}catch(U){p=!0,w=U}finally{try{s||k.return==null||k.return()}finally{if(p)throw w}}return S}(a)},D.source=function(_,e){for(var b=_.getRenderableIds().map(function(a){return _.getTileByID(a)}),g=[],f={},c=0;c<b.length;c++){var u=b[c],i=u.tileID.canonical.key;f[i]||(f[i]=!0,u.querySourceFeatures(g,e))}return g}},function(O,D,o){function _(p){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(p)}function e(p,w){for(var A=0;A<w.length;A++){var k=w[A];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(p,k.key,k)}}function b(p){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)})(p)}function g(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function f(p,w){return(f=Object.setPrototypeOf||function(A,k){return A.__proto__=k,A})(p,w)}var c=o(45).create,u=o(118),i=o(10),a=o(121),n=o(35),t=o(0),r=o(6),l=(o(67),o(3)),d=o(2),h=o(27).OverscaledTileID,m=o(1),S=function(p){function w(x,T,E){var C;return function(z,P){if(!(z instanceof P))throw new TypeError("Cannot call a class as a function")}(this,w),(C=function(z,P){return!P||_(P)!=="object"&&typeof P!="function"?g(z):P}(this,b(w).call(this))).id=x,C.dispatcher=E,C.on("data",function(z){z.dataType==="source"&&z.sourceDataType==="metadata"&&(C._sourceLoaded=!0),C._sourceLoaded&&!C._paused&&z.dataType==="source"&&z.sourceDataType==="content"&&(C.reload(),C.transform&&C.update(C.transform))}),C.on("error",function(){C._sourceErrored=!0}),C._source=c(x,T,E,g(C)),C._tiles={},C._cache=new a(0,C._unloadTile.bind(g(C))),C._timers={},C._cacheTimers={},C._maxTileCacheSize=null,C._isIdRenderable=C._isIdRenderable.bind(g(C)),C._coveredTiles={},C}var A,k,v;return function(x,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(T&&T.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),T&&f(x,T)}(w,i),A=w,(k=[{key:"onAdd",value:function(x){this.map=x,this._maxTileCacheSize=x?x._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(x)}},{key:"onRemove",value:function(x){this._source&&this._source.onRemove&&this._source.onRemove(x)}},{key:"loaded",value:function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var x in this._tiles){var T=this._tiles[x];if(T.state!=="loaded"&&T.state!=="errored")return!1}return!0}},{key:"getSource",value:function(){return this._source}},{key:"pause",value:function(){this._paused=!0}},{key:"resume",value:function(){if(this._paused){var x=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,x&&this.reload(),this.transform&&this.update(this.transform)}}},{key:"_loadTile",value:function(x,T){return this._source.loadTile(x,T)}},{key:"_unloadTile",value:function(x){if(this._source.unloadTile)return this._source.unloadTile(x,function(){})}},{key:"_abortTile",value:function(x){if(this._source.abortTile)return this._source.abortTile(x,function(){})}},{key:"serialize",value:function(){return this._source.serialize()}},{key:"prepare",value:function(x){for(var T in this._source.prepare&&this._source.prepare(),this._tiles)this._tiles[T].upload(x)}},{key:"getIds",value:function(){var x=this;return Object.keys(this._tiles).map(Number).sort(function(T,E){var C=x._tiles[T].tileID,z=x._tiles[E].tileID,P=new l(C.canonical.x,C.canonical.y).rotate(x.transform.angle),B=new l(z.canonical.x,z.canonical.y).rotate(x.transform.angle);return C.overscaledZ-z.overscaledZ||B.y-P.y||B.x-P.x})}},{key:"getRenderableIds",value:function(){return this.getIds().filter(this._isIdRenderable)}},{key:"hasRenderableParent",value:function(x){var T=this.findLoadedParent(x,0,{});return!!T&&this._isIdRenderable(T.tileID.key)}},{key:"_isIdRenderable",value:function(x){return this._tiles[x]&&this._tiles[x].hasData()&&!this._coveredTiles[x]}},{key:"reload",value:function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var x in this._resetCache(),this._tiles)this._reloadTile(x,"reloading")}},{key:"_reloadTile",value:function(x,T){var E=this._tiles[x];E&&(E.state!=="loading"&&(E.state=T),this._loadTile(E,this._tileLoaded.bind(this,E,x,T)))}},{key:"_tileLoaded",value:function(x,T,E,C){if(C)return x.state="errored",void(C.status!==404?this._source.fire("error",{tile:x,error:C}):this.update(this.transform));x.timeAdded=d.now(),E==="expired"&&(x.refreshedUponExpiration=!0),this._setTileReloadTimer(T,x),this.getSource().type==="raster-dem"&&x.dem&&this._backfillDEM(x),this._source.fire("data",{dataType:"source",tile:x,coord:x.tileID}),this.map&&(this.map.painter.tileExtentVAO.vao=null)}},{key:"_backfillDEM",value:function(x){for(var T=this.getRenderableIds(),E=0;E<T.length;E++){var C=T[E];if(x.neighboringTiles&&x.neighboringTiles[C]){var z=this.getTileByID(C);P(x,z),P(z,x)}}function P(B,F){B.needsHillshadePrepare=!0;var Z=F.tileID.canonical.x-B.tileID.canonical.x,W=F.tileID.canonical.y-B.tileID.canonical.y,J=Math.pow(2,B.tileID.canonical.z),X=F.tileID.key;Z===0&&W===0||Math.abs(W)>1||(Math.abs(Z)>1&&(Math.abs(Z+J)===1?Z+=J:Math.abs(Z-J)===1&&(Z-=J)),F.dem&&B.dem&&(B.dem.backfillBorder(F.dem,Z,W),B.neighboringTiles&&B.neighboringTiles[X]&&(B.neighboringTiles[X].backfilled=!0)))}}},{key:"getTile",value:function(x){return this.getTileByID(x.key)}},{key:"getTileByID",value:function(x){return this._tiles[x]}},{key:"getZoom",value:function(x){return x.zoom+x.scaleZoom(x.tileSize/this._source.tileSize)}},{key:"_findLoadedChildren",value:function(x,T,E){var C=!1;for(var z in this._tiles){var P=this._tiles[z];if(!(E[z]||!P.hasData()||P.tileID.overscaledZ<=x.overscaledZ||P.tileID.overscaledZ>T)){var B=Math.pow(2,P.tileID.canonical.z-x.canonical.z);if(Math.floor(P.tileID.canonical.x/B)===x.canonical.x&&Math.floor(P.tileID.canonical.y/B)===x.canonical.y)for(E[z]=P.tileID,C=!0;P&&P.tileID.overscaledZ-1>x.overscaledZ;){var F=P.tileID.scaledTo(P.tileID.overscaledZ-1);if(!F)break;(P=this._tiles[F.key])&&P.hasData()&&(delete E[z],E[F.key]=F)}}}return C}},{key:"findLoadedParent",value:function(x,T,E){for(var C=x.overscaledZ-1;C>=T;C--){var z=x.scaledTo(C);if(!z)return;var P=String(z.key),B=this._tiles[P];if(B&&B.hasData())return E[P]=z,B;if(this._cache.has(P))return E[P]=z,this._cache.get(P)}}},{key:"updateCacheSize",value:function(x){var T=(Math.ceil(x.width/this._source.tileSize)+1)*(Math.ceil(x.height/this._source.tileSize)+1),E=Math.floor(5*T),C=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,E):E;this._cache.setMaxSize(C)}},{key:"update",value:function(x){var T=this;if(this.transform=x,this._sourceLoaded&&!this._paused){var E;this.updateCacheSize(x),this._coveredTiles={},this.used?this._source.tileID?E=x.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(I){return new h(I.canonical.z,I.wrap,I.canonical.z,I.canonical.x,I.canonical.y)}):(E=x.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(E=E.filter(function(I){return T._source.hasTile(I)}))):E=[];var C,z=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(x)),P=Math.max(z-w.maxOverzooming,this._source.minzoom),B=Math.max(z+w.maxUnderzooming,this._source.minzoom),F=this._updateRetainedTiles(E,z),Z={};if(s(this._source.type))for(var W=Object.keys(F),J=0;J<W.length;J++){var X=W[J],R=F[X];m(R.key===+X);var U=this._tiles[X];if(U&&(U.fadeEndTime===void 0||U.fadeEndTime>=d.now())){this._findLoadedChildren(R,B,F)&&(F[X]=R);var K=this.findLoadedParent(R,P,Z);K&&this._addTile(K.tileID)}}for(C in Z)F[C]||(this._coveredTiles[C]=!0);for(C in Z)F[C]=Z[C];for(var q=t.keysDifference(this._tiles,F),L=0;L<q.length;L++)this._removeTile(q[L])}}},{key:"_updateRetainedTiles",value:function(x,T){for(var E={},C={},z=Math.max(T-w.maxOverzooming,this._source.minzoom),P=Math.max(T+w.maxUnderzooming,this._source.minzoom),B=0;B<x.length;B++){var F=x[B],Z=this._addTile(F),W=!1;if(Z.hasData())E[F.key]=F;else{W=Z.wasRequested(),E[F.key]=F;var J=!0;if(T+1>this._source.maxzoom){var X=F.children(this._source.maxzoom)[0],R=this.getTile(X);R&&R.hasData()?E[X.key]=X:J=!1}else{this._findLoadedChildren(F,P,E);for(var U=F.children(this._source.maxzoom),K=0;K<U.length;K++)if(!E[U[K].key]){J=!1;break}}if(!J)for(var q=F.overscaledZ-1;q>=z;--q){var L=F.scaledTo(q);if(C[L.key]||(C[L.key]=!0,!(Z=this.getTile(L))&&W&&(Z=this._addTile(L)),Z&&(E[L.key]=L,W=Z.wasRequested(),Z.hasData())))break}}}return E}},{key:"_addTile",value:function(x){var T=this._tiles[x.key];if(T)return T;(T=this._cache.getAndRemove(x.key))&&this._cacheTimers[x.key]&&(clearTimeout(this._cacheTimers[x.key]),delete this._cacheTimers[x.key],this._setTileReloadTimer(x.key,T));var E=Boolean(T);return E||(T=new u(x,this._source.tileSize*x.overscaleFactor()),this._loadTile(T,this._tileLoaded.bind(this,T,x.key,T.state))),T?(T.uses++,this._tiles[x.key]=T,E||this._source.fire("dataloading",{tile:T,coord:T.tileID,dataType:"source"}),T):null}},{key:"_setTileReloadTimer",value:function(x,T){var E=this;x in this._timers&&(clearTimeout(this._timers[x]),delete this._timers[x]);var C=T.getExpiryTimeout();C&&(this._timers[x]=setTimeout(function(){E._reloadTile(x,"expired"),delete E._timers[x]},C))}},{key:"_setCacheInvalidationTimer",value:function(x,T){var E=this;x in this._cacheTimers&&(clearTimeout(this._cacheTimers[x]),delete this._cacheTimers[x]);var C=T.getExpiryTimeout();C&&(this._cacheTimers[x]=setTimeout(function(){E._cache.remove(x),delete E._cacheTimers[x]},C))}},{key:"_removeTile",value:function(x){var T=this._tiles[x];if(T&&(T.uses--,delete this._tiles[x],this._timers[x]&&(clearTimeout(this._timers[x]),delete this._timers[x]),!(T.uses>0)))if(T.hasData()){T.tileID=T.tileID.wrapped();var E=T.tileID.key;this._cache.add(E,T),this._setCacheInvalidationTimer(E,T)}else T.aborted=!0,this._abortTile(T),this._unloadTile(T)}},{key:"clearTiles",value:function(){for(var x in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(x);this._resetCache()}},{key:"_resetCache",value:function(){for(var x in this._cacheTimers)clearTimeout(this._cacheTimers[x]);this._cacheTimers={},this._cache.reset()}},{key:"tilesIn",value:function(x){for(var T=[],E=this.getIds(),C=1/0,z=1/0,P=-1/0,B=-1/0,F=x[0].zoom,Z=0;Z<x.length;Z++){var W=x[Z];C=Math.min(C,W.column),z=Math.min(z,W.row),P=Math.max(P,W.column),B=Math.max(B,W.row)}for(var J=0;J<E.length;J++){var X=this._tiles[E[J]],R=X.tileID,U=[y(R,new n(C,z,F)),y(R,new n(P,B,F))];if(U[0].x<r&&U[0].y<r&&U[1].x>=0&&U[1].y>=0){for(var K=[],q=0;q<x.length;q++)K.push(y(R,x[q]));T.push({tile:X,tileID:R,queryGeometry:[K],scale:Math.pow(2,this.transform.zoom-X.tileID.overscaledZ)})}}return T}},{key:"getVisibleCoordinates",value:function(){var x=this,T=this.getRenderableIds().map(function(Z){return x._tiles[Z].tileID}),E=!0,C=!1,z=void 0;try{for(var P,B=T[Symbol.iterator]();!(E=(P=B.next()).done);E=!0){var F=P.value;F.posMatrix=this.transform.calculatePosMatrix(F.toUnwrapped())}}catch(Z){C=!0,z=Z}finally{try{E||B.return==null||B.return()}finally{if(C)throw z}}return T}},{key:"hasTransition",value:function(){if(this._source.hasTransition())return!0;if(s(this._source.type))for(var x in this._tiles){var T=this._tiles[x];if(T.fadeEndTime!==void 0&&T.fadeEndTime>=d.now())return!0}return!1}}])&&e(A.prototype,k),v&&e(A,v),w}();function y(p,w){var A=w.zoomTo(p.canonical.z);return new l((A.column-(p.canonical.x+p.wrap*Math.pow(2,p.canonical.z)))*r,(A.row-p.canonical.y)*r)}function s(p){return p==="raster"||p==="image"||p==="video"}S.maxOverzooming=10,S.maxUnderzooming=3,O.exports=S},function(O,D,o){function _(p,w){for(var A=0;A<w.length;A++){var k=w[A];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(p,k.key,k)}}var e=o(0),b=o(201).deserialize,g=(o(202),o(48)),f=o(65),c=o(119),u=o(60),i=(o(120),o(62)),a=o(14),n=a.RasterBoundsArray,t=a.CollisionBoxArray,r=o(46),l=o(6),d=o(3),h=o(20),m=o(36).SegmentVector,S=o(37).TriangleIndexArray,y=o(2),s=function(){function p(v,x){(function(T,E){if(!(T instanceof E))throw new TypeError("Cannot call a class as a function")})(this,p),this.tileID=v,this.uid=e.uniqueId(),this.uses=0,this.tileSize=x,this.buckets={},this.expirationTime=null,this.expiredRequestCount=0,this.state="loading"}var w,A,k;return w=p,(A=[{key:"registerFadeDuration",value:function(v){var x=v+this.timeAdded;x<y.now()||this.fadeEndTime&&x<this.fadeEndTime||(this.fadeEndTime=x)}},{key:"wasRequested",value:function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}},{key:"loadVectorData",value:function(v,x,T){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",v){if(v.rawTileData&&(this.rawTileData=v.rawTileData),this.collisionBoxArray=v.collisionBoxArray,this.featureIndex=v.featureIndex,this.featureIndex.rawTileData=this.rawTileData,this.buckets=b(v.buckets,x.style),T)for(var E in this.buckets){var C=this.buckets[E];C instanceof i&&(C.justReloaded=!0)}v.iconAtlasImage&&(this.iconAtlasImage=v.iconAtlasImage),v.glyphAtlasImage&&(this.glyphAtlasImage=v.glyphAtlasImage)}else this.collisionBoxArray=new t}},{key:"unloadVectorData",value:function(){for(var v in this.buckets)this.buckets[v].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.collisionBoxArray=null,this.featureIndex=null,this.state="unloaded"}},{key:"unloadDEMData",value:function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"}},{key:"getBucket",value:function(v){return this.buckets[v.id]}},{key:"upload",value:function(v){for(var x in this.buckets){var T=this.buckets[x];T.uploaded||(T.upload(v),T.uploaded=!0)}var E=v.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new h(v,this.iconAtlasImage,E.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new h(v,this.glyphAtlasImage,E.ALPHA),this.glyphAtlasImage=null)}},{key:"queryRenderedFeatures",value:function(v,x,T,E,C,z,P){if(!this.featureIndex||!this.collisionBoxArray)return{};var B=0,F={};for(var Z in v){var W=this.getBucket(v[Z]);W&&(B=Math.max(B,v[Z].queryRadius(W)),W instanceof i&&W.bucketInstanceId!==void 0&&(F[W.bucketInstanceId]=!0))}return this.featureIndex.query({queryGeometry:x,scale:T,tileSize:this.tileSize,bearing:C,params:E,additionalRadius:B,collisionBoxArray:this.collisionBoxArray,sourceID:z,collisionIndex:P,bucketInstanceIds:F},v)}},{key:"querySourceFeatures",value:function(v,x){if(this.rawTileData){this.vtLayers||(this.vtLayers=new g.VectorTile(new f(this.rawTileData)).layers);var T=x?x.sourceLayer:"",E=this.vtLayers._geojsonTileLayer||this.vtLayers[T];if(E)for(var C=u(x&&x.filter),z={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},P=0;P<E.length;P++){var B=E.feature(P);if(C({zoom:this.tileID.overscaledZ},B)){var F=new c(B,z.z,z.x,z.y);F.tile=z,v.push(F)}}}}},{key:"clearMask",value:function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)}},{key:"setMask",value:function(v,x){if(!e.deepEqual(this.mask,v)&&(this.mask=v,this.clearMask(),!e.deepEqual(v,{0:!0}))){var T=new n,E=new S;this.segments=new m,this.segments.prepareSegment(0,T,E);for(var C=Object.keys(v),z=0;z<C.length;z++){var P=v[C[z]],B=l>>P.z,F=new d(P.x*B,P.y*B),Z=new d(F.x+B,F.y+B),W=this.segments.prepareSegment(4,T,E);T.emplaceBack(F.x,F.y,F.x,F.y),T.emplaceBack(Z.x,F.y,Z.x,F.y),T.emplaceBack(F.x,Z.y,F.x,Z.y),T.emplaceBack(Z.x,Z.y,Z.x,Z.y);var J=W.vertexLength;E.emplaceBack(J,J+1,J+2),E.emplaceBack(J+1,J+2,J+3),W.vertexLength+=4,W.primitiveLength+=2}this.maskedBoundsBuffer=x.createVertexBuffer(T,r.members),this.maskedIndexBuffer=x.createIndexBuffer(E)}}},{key:"hasData",value:function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}},{key:"setExpiryData",value:function(v){var x=this.expirationTime;if(v.cacheControl){var T=e.parseCacheControl(v.cacheControl);T["max-age"]&&(this.expirationTime=Date.now()+1e3*T["max-age"])}else v.expires&&(this.expirationTime=new Date(v.expires).getTime());if(this.expirationTime){var E=Date.now(),C=!1;if(this.expirationTime>E)C=!1;else if(x)if(this.expirationTime<x)C=!0;else{var z=this.expirationTime-x;z?this.expirationTime=E+Math.max(z,3e4):C=!0}else C=!0;C?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}},{key:"getExpiryTimeout",value:function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}}])&&_(w.prototype,A),k&&_(w,k),p}();O.exports=s},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(c,u,i,a){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.type="Feature",this._vectorTileFeature=c,c._z=u,c._x=i,c._y=a,this.properties=c.properties,c.id!=null&&(this.id=c.id)}var b,g,f;return b=e,(g=[{key:"toJSON",value:function(){var c={geometry:this.geometry};for(var u in this)u!=="_geometry"&&u!=="_vectorTileFeature"&&(c[u]=this[u]);return c}},{key:"geometry",get:function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set:function(c){this._geometry=c}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D,o){function _(a,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}var e=o(3),b=o(44),g=o(204),f=(o(22).mat4,o(66)),c=100,u=function(){function a(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new g(l.width+2*c,l.height+2*c,25),h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new g(l.width+2*c,l.height+2*c,25);(function(m,S){if(!(m instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),this.transform=l,this.grid=d,this.ignoredGrid=h,this.pitchfactor=Math.cos(l._pitch)*l.cameraToCenterDistance,this.screenRightBoundary=l.width+c,this.screenBottomBoundary=l.height+c}var n,t,r;return n=a,(t=[{key:"placeCollisionBox",value:function(l,d,h,m){var S=this.projectAndGetPerspectiveRatio(m,l.anchorPointX,l.anchorPointY),y=h*S.perspectiveRatio,s=l.x1*y+S.point.x,p=l.y1*y+S.point.y,w=l.x2*y+S.point.x,A=l.y2*y+S.point.y;return!d&&this.grid.hitTest(s,p,w,A)?{box:[],offscreen:!1}:{box:[s,p,w,A],offscreen:this.isOffscreen(s,p,w,A)}}},{key:"approximateTileDistance",value:function(l,d,h,m,S){var y=S?1:m/this.pitchfactor,s=l.lastSegmentViewportDistance*h;return l.prevTileDistance+s+(y-1)*s*Math.abs(Math.sin(d))}},{key:"placeCollisionCircles",value:function(l,d,h,m,S,y,s,p,w,A,k,v,x){var T=[],E=this.projectAnchor(A,y.anchorX,y.anchorY),C=w/24,z=y.lineOffsetX*w,P=y.lineOffsetY*w,B=new e(y.anchorX,y.anchorY),F=f.project(B,k).point,Z=f.placeFirstAndLastGlyph(C,p,z,P,!1,F,B,y,s,k,{},!0),W=!1,J=!0,X=E.perspectiveRatio*m,R=1/(m*h),U=0,K=0;Z&&(U=this.approximateTileDistance(Z.first.tileDistance,Z.first.angle,R,E.cameraDistance,x),K=this.approximateTileDistance(Z.last.tileDistance,Z.last.angle,R,E.cameraDistance,x));for(var q=0;q<l.length;q+=5){var L=l[q],I=l[q+1],j=l[q+2],M=l[q+3];if(!Z||M<-U||M>K)i(l,q,!1);else{var N=this.projectPoint(A,L,I),V=j*X;if(T.length>0){var G=N.x-T[T.length-4],H=N.y-T[T.length-3];if(V*V*2>G*G+H*H&&q+8<l.length){var Y=l[q+8];if(Y>-U&&Y<K){i(l,q,!1);continue}}}var $=q/5;if(T.push(N.x,N.y,V,$),i(l,q,!0),J=J&&this.isOffscreen(N.x-V,N.y-V,N.x+V,N.y+V),!d&&this.grid.hitTestCircle(N.x,N.y,V)){if(!v)return{circles:[],offscreen:!1};W=!0}}}return{circles:W?[]:T,offscreen:J}}},{key:"queryRenderedSymbols",value:function(l,d,h,m,S,y){var s={},p=[];if(l.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return p;for(var w=this.transform.calculatePosMatrix(d.toUnwrapped()),A=[],k=1/0,v=1/0,x=-1/0,T=-1/0,E=0;E<l.length;E++)for(var C=l[E],z=0;z<C.length;z++){var P=this.projectPoint(w,C[z].x,C[z].y);k=Math.min(k,P.x),v=Math.min(v,P.y),x=Math.max(x,P.x),T=Math.max(T,P.y),A.push(P)}for(var B=d.key,F=[],Z=this.grid.query(k,v,x,T),W=0;W<Z.length;W++)Z[W].sourceID===S&&Z[W].tileID===B&&y[Z[W].bucketInstanceId]&&F.push(Z[W].boxIndex);for(var J=this.ignoredGrid.query(k,v,x,T),X=0;X<J.length;X++)J[X].sourceID===S&&J[X].tileID===B&&F.push(J[X].boxIndex);for(var R=0;R<F.length;R++){var U=m.get(F[R]),K=U.sourceLayerIndex,q=U.featureIndex,L=U.bucketIndex;if(s[K]===void 0&&(s[K]={}),s[K][q]===void 0&&(s[K][q]={}),!s[K][q][L]){var I=this.projectAndGetPerspectiveRatio(w,U.anchorPointX,U.anchorPointY),j=h*I.perspectiveRatio,M=U.x1*j+I.point.x,N=U.y1*j+I.point.y,V=U.x2*j+I.point.x,G=U.y2*j+I.point.y,H=[new e(M,N),new e(V,N),new e(V,G),new e(M,G)];b.polygonIntersectsPolygon(A,H)&&(s[K][q][L]=!0,p.push(F[R]))}}return p}},{key:"insertCollisionBox",value:function(l,d,h,m,S,y){var s={tileID:h,sourceID:m,bucketInstanceId:S,boxIndex:y};(d?this.ignoredGrid:this.grid).insert(s,l[0],l[1],l[2],l[3])}},{key:"insertCollisionCircles",value:function(l,d,h,m,S,y){for(var s=d?this.ignoredGrid:this.grid,p=0;p<l.length;p+=4){var w={tileID:h,sourceID:m,bucketInstanceId:S,boxIndex:y+l[p+3]};s.insertCircle(w,l[p],l[p+1],l[p+2])}}},{key:"projectAnchor",value:function(l,d,h){var m=[d,h,0,1];return f.xyTransformMat4(m,m,l),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/m[3]*.5,cameraDistance:m[3]}}},{key:"projectPoint",value:function(l,d,h){var m=[d,h,0,1];return f.xyTransformMat4(m,m,l),new e((m[0]/m[3]+1)/2*this.transform.width+c,(-m[1]/m[3]+1)/2*this.transform.height+c)}},{key:"projectAndGetPerspectiveRatio",value:function(l,d,h){var m=[d,h,0,1];return f.xyTransformMat4(m,m,l),{point:new e((m[0]/m[3]+1)/2*this.transform.width+c,(-m[1]/m[3]+1)/2*this.transform.height+c),perspectiveRatio:.5+this.transform.cameraToCenterDistance/m[3]*.5}}},{key:"isOffscreen",value:function(l,d,h,m){return h<c||l>=this.screenRightBoundary||m<c||d>this.screenBottomBoundary}}])&&_(n.prototype,t),r&&_(n,r),a}();function i(a,n,t){a[n+4]=t?1:0}O.exports=u},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(c,u){(function(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e),this.max=c,this.onRemove=u,this.reset()}var b,g,f;return b=e,(g=[{key:"reset",value:function(){for(var c in this.data)this.onRemove(this.data[c]);return this.data={},this.order=[],this}},{key:"add",value:function(c,u){if(this.has(c))this.order.splice(this.order.indexOf(c),1),this.data[c]=u,this.order.push(c);else if(this.data[c]=u,this.order.push(c),this.order.length>this.max){var i=this.getAndRemove(this.order[0]);i&&this.onRemove(i)}return this}},{key:"has",value:function(c){return c in this.data}},{key:"keys",value:function(){return this.order}},{key:"getAndRemove",value:function(c){if(!this.has(c))return null;var u=this.data[c];return delete this.data[c],this.order.splice(this.order.indexOf(c),1),u}},{key:"get",value:function(c){return this.has(c)?this.data[c]:null}},{key:"remove",value:function(c){if(!this.has(c))return this;var u=this.data[c];return delete this.data[c],this.onRemove(u),this.order.splice(this.order.indexOf(c),1),this}},{key:"setMaxSize",value:function(c){for(this.max=c;this.order.length>this.max;){var u=this.getAndRemove(this.order[0]);u&&this.onRemove(u)}return this}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D,o){function _(L){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I})(L)}function e(L,I){return!I||_(I)!=="object"&&typeof I!="function"?function(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}(L):I}function b(L){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)})(L)}function g(L,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(I&&I.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),I&&f(L,I)}function f(L,I){return(f=Object.setPrototypeOf||function(j,M){return j.__proto__=M,j})(L,I)}function c(L,I){if(!(L instanceof I))throw new TypeError("Cannot call a class as a function")}function u(L,I){for(var j=0;j<I.length;j++){var M=I[j];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}function i(L,I,j){return I&&u(L.prototype,I),j&&u(L,j),L}var a=o(12),n=o(0),t=function(){function L(I){c(this,L),this.context=I,this.current=a.transparent}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I.r===j.r&&I.g===j.g&&I.b===j.b&&I.a===j.a||(this.context.gl.clearColor(I.r,I.g,I.b,I.a),this.current=I)}}]),L}(),r=function(){function L(I){c(this,L),this.context=I,this.current=1}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.clearDepth(I),this.current=I)}}]),L}(),l=function(){function L(I){c(this,L),this.context=I,this.current=0}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.clearStencil(I),this.current=I)}}]),L}(),d=function(){function L(I){c(this,L),this.context=I,this.current=[!0,!0,!0,!0]}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I[0]===j[0]&&I[1]===j[1]&&I[2]===j[2]&&I[3]===j[3]||(this.context.gl.colorMask(I[0],I[1],I[2],I[3]),this.current=I)}}]),L}(),h=function(){function L(I){c(this,L),this.context=I,this.current=!0}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.depthMask(I),this.current=I)}}]),L}(),m=function(){function L(I){c(this,L),this.context=I,this.current=255}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.stencilMask(I),this.current=I)}}]),L}(),S=function(){function L(I){c(this,L),this.context=I,this.current={func:I.gl.ALWAYS,ref:0,mask:255}}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I.func===j.func&&I.ref===j.ref&&I.mask===j.mask||(this.context.gl.stencilFunc(I.func,I.ref,I.mask),this.current=I)}}]),L}(),y=function(){function L(I){c(this,L),this.context=I;var j=this.context.gl;this.current=[j.KEEP,j.KEEP,j.KEEP]}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I[0]===j[0]&&I[1]===j[1]&&I[2]===j[2]||(this.context.gl.stencilOp(I[0],I[1],I[2]),this.current=I)}}]),L}(),s=function(){function L(I){c(this,L),this.context=I,this.current=!1}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;I?j.enable(j.STENCIL_TEST):j.disable(j.STENCIL_TEST),this.current=I}}}]),L}(),p=function(){function L(I){c(this,L),this.context=I,this.current=[0,1]}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I[0]===j[0]&&I[1]===j[1]||(this.context.gl.depthRange(I[0],I[1]),this.current=I)}}]),L}(),w=function(){function L(I){c(this,L),this.context=I,this.current=!1}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;I?j.enable(j.DEPTH_TEST):j.disable(j.DEPTH_TEST),this.current=I}}}]),L}(),A=function(){function L(I){c(this,L),this.context=I,this.current=I.gl.LESS}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.depthFunc(I),this.current=I)}}]),L}(),k=function(){function L(I){c(this,L),this.context=I,this.current=!1}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;I?j.enable(j.BLEND):j.disable(j.BLEND),this.current=I}}}]),L}(),v=function(){function L(I){c(this,L),this.context=I;var j=this.context.gl;this.current=[j.ONE,j.ZERO]}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I[0]===j[0]&&I[1]===j[1]||(this.context.gl.blendFunc(I[0],I[1]),this.current=I)}}]),L}(),x=function(){function L(I){c(this,L),this.context=I,this.current=a.transparent}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I.r===j.r&&I.g===j.g&&I.b===j.b&&I.a===j.a||(this.context.gl.blendColor(I.r,I.g,I.b,I.a),this.current=I)}}]),L}(),T=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.useProgram(I),this.current=I)}}]),L}(),E=function(){function L(I){c(this,L),this.context=I,this.current=1}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.context.lineWidthRange,M=n.clamp(I,j[0],j[1]);this.current!==M&&(this.context.gl.lineWidth(M),this.current=I)}}]),L}(),C=function(){function L(I){c(this,L),this.context=I,this.current=I.gl.TEXTURE0}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&(this.context.gl.activeTexture(I),this.current=I)}}]),L}(),z=function(){function L(I){c(this,L),this.context=I;var j=this.context.gl;this.current=[0,0,j.drawingBufferWidth,j.drawingBufferHeight]}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.current;I[0]===j[0]&&I[1]===j[1]&&I[2]===j[2]&&I[3]===j[3]||(this.context.gl.viewport(I[0],I[1],I[2],I[3]),this.current=I)}}]),L}(),P=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;j.bindFramebuffer(j.FRAMEBUFFER,I),this.current=I}}}]),L}(),B=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;j.bindRenderbuffer(j.RENDERBUFFER,I),this.current=I}}}]),L}(),F=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;j.bindTexture(j.TEXTURE_2D,I),this.current=I}}}]),L}(),Z=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;j.bindBuffer(j.ARRAY_BUFFER,I),this.current=I}}}]),L}(),W=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){var j=this.context.gl;j.bindBuffer(j.ELEMENT_ARRAY_BUFFER,I),this.current=I}}]),L}(),J=function(){function L(I){c(this,L),this.context=I,this.current=null}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){this.current!==I&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(I),this.current=I)}}]),L}(),X=function(){function L(I){c(this,L),this.context=I,this.current=4}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;j.pixelStorei(j.UNPACK_ALIGNMENT,I),this.current=I}}}]),L}(),R=function(){function L(I){c(this,L),this.context=I,this.current=!1}return i(L,[{key:"get",value:function(){return this.current}},{key:"set",value:function(I){if(this.current!==I){var j=this.context.gl;j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I),this.current=I}}}]),L}(),U=function(){function L(I,j){c(this,L),this.context=I,this.current=null,this.parent=j}return i(L,[{key:"get",value:function(){return this.current}}]),L}(),K=function(L){function I(j,M){var N;return c(this,I),(N=e(this,b(I).call(this,j,M))).dirty=!1,N}return g(I,U),i(I,[{key:"set",value:function(j){if(this.dirty||this.current!==j){var M=this.context.gl;this.context.bindFramebuffer.set(this.parent),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,j,0),this.current=j,this.dirty=!1}}},{key:"setDirty",value:function(){this.dirty=!0}}]),I}(),q=function(L){function I(){return c(this,I),e(this,b(I).apply(this,arguments))}return g(I,U),i(I,[{key:"set",value:function(j){if(this.current!==j){var M=this.context.gl;this.context.bindFramebuffer.set(this.parent),M.framebufferRenderbuffer(M.FRAMEBUFFER,M.DEPTH_ATTACHMENT,M.RENDERBUFFER,j),this.current=j}}}]),I}();O.exports={ClearColor:t,ClearDepth:r,ClearStencil:l,ColorMask:d,DepthMask:h,StencilMask:m,StencilFunc:S,StencilOp:y,StencilTest:s,DepthRange:p,DepthTest:w,DepthFunc:A,Blend:k,BlendFunc:v,BlendColor:x,Program:T,LineWidth:E,ActiveTextureUnit:C,Viewport:z,BindFramebuffer:P,BindRenderbuffer:B,BindTexture:F,BindVertexBuffer:Z,BindElementBuffer:W,BindVertexArrayOES:J,PixelStoreUnpack:X,PixelStoreUnpackPremultiplyAlpha:R,ColorAttachment:K,DepthAttachment:q}},function(O,D,o){function _(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function e(n,t){for(var r=0;r<t.length;r++){var l=t[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function b(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}var g=o(6),f=512/g/2,c=function(){function n(t,r,l){_(this,n),this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=l;var d=!0,h=!1,m=void 0;try{for(var S,y=r[Symbol.iterator]();!(d=(S=y.next()).done);d=!0){var s=S.value,p=s.key;this.indexedSymbolInstances[p]||(this.indexedSymbolInstances[p]=[]),this.indexedSymbolInstances[p].push({crossTileID:s.crossTileID,coord:this.getScaledCoordinates(s,t)})}}catch(w){h=!0,m=w}finally{try{d||y.return==null||y.return()}finally{if(h)throw m}}}return b(n,[{key:"getScaledCoordinates",value:function(t,r){var l=r.canonical.z-this.tileID.canonical.z,d=f/Math.pow(2,l),h=t.anchor;return{x:Math.floor((r.canonical.x*g+h.x)*d),y:Math.floor((r.canonical.y*g+h.y)*d)}}},{key:"findMatches",value:function(t,r,l){var d=this.tileID.canonical.z<r.canonical.z?1:Math.pow(2,this.tileID.canonical.z-r.canonical.z),h=!0,m=!1,S=void 0;try{for(var y,s=t[Symbol.iterator]();!(h=(y=s.next()).done);h=!0){var p=y.value;if(!p.crossTileID){var w=this.indexedSymbolInstances[p.key];if(w){var A=this.getScaledCoordinates(p,r),k=!0,v=!1,x=void 0;try{for(var T,E=w[Symbol.iterator]();!(k=(T=E.next()).done);k=!0){var C=T.value;if(Math.abs(C.coord.x-A.x)<=d&&Math.abs(C.coord.y-A.y)<=d&&!l[C.crossTileID]){l[C.crossTileID]=!0,p.crossTileID=C.crossTileID;break}}}catch(z){v=!0,x=z}finally{try{k||E.return==null||E.return()}finally{if(v)throw x}}}}}}catch(z){m=!0,S=z}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}}}]),n}(),u=function(){function n(){_(this,n),this.maxCrossTileID=0}return b(n,[{key:"generate",value:function(){return++this.maxCrossTileID}}]),n}(),i=function(){function n(){_(this,n),this.indexes={},this.usedCrossTileIDs={}}return b(n,[{key:"addBucket",value:function(t,r,l){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===r.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}var d=!0,h=!1,m=void 0;try{for(var S,y=r.symbolInstances[Symbol.iterator]();!(d=(S=y.next()).done);d=!0)S.value.crossTileID=0}catch(B){h=!0,m=B}finally{try{d||y.return==null||y.return()}finally{if(h)throw m}}this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var s=this.usedCrossTileIDs[t.overscaledZ];for(var p in this.indexes){var w=this.indexes[p];if(Number(p)>t.overscaledZ)for(var A in w){var k=w[A];k.tileID.isChildOf(t)&&k.findMatches(r.symbolInstances,t,s)}else{var v=w[t.scaledTo(Number(p)).key];v&&v.findMatches(r.symbolInstances,t,s)}}var x=!0,T=!1,E=void 0;try{for(var C,z=r.symbolInstances[Symbol.iterator]();!(x=(C=z.next()).done);x=!0){var P=C.value;P.crossTileID||(P.crossTileID=l.generate(),s[P.crossTileID]=!0)}}catch(B){T=!0,E=B}finally{try{x||z.return==null||z.return()}finally{if(T)throw E}}return this.indexes[t.overscaledZ]===void 0&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new c(t,r.symbolInstances,r.bucketInstanceId),!0}},{key:"removeBucketCrossTileIDs",value:function(t,r){for(var l in r.indexedSymbolInstances){var d=!0,h=!1,m=void 0;try{for(var S,y=r.indexedSymbolInstances[l][Symbol.iterator]();!(d=(S=y.next()).done);d=!0){var s=S.value;delete this.usedCrossTileIDs[t][s.crossTileID]}}catch(p){h=!0,m=p}finally{try{d||y.return==null||y.return()}finally{if(h)throw m}}}}},{key:"removeStaleBuckets",value:function(t){var r=!1;for(var l in this.indexes){var d=this.indexes[l];for(var h in d)t[d[h].bucketInstanceId]||(this.removeBucketCrossTileIDs(l,d[h]),delete d[h],r=!0)}return r}}]),n}(),a=function(){function n(){_(this,n),this.layerIndexes={},this.crossTileIDs=new u,this.maxBucketInstanceId=0}return b(n,[{key:"addLayer",value:function(t,r){var l=this.layerIndexes[t.id];l===void 0&&(l=this.layerIndexes[t.id]=new i);var d=!1,h={},m=!0,S=!1,y=void 0;try{for(var s,p=r[Symbol.iterator]();!(m=(s=p.next()).done);m=!0){var w=s.value,A=w.getBucket(t);A&&(A.bucketInstanceId||(A.bucketInstanceId=++this.maxBucketInstanceId),l.addBucket(w.tileID,A,this.crossTileIDs)&&(d=!0),h[A.bucketInstanceId]=!0)}}catch(k){S=!0,y=k}finally{try{m||p.return==null||p.return()}finally{if(S)throw y}}return l.removeStaleBuckets(h)&&(d=!0),d}}]),n}();O.exports=a},function(O,D,o){function _(T,E){for(var C=0;C<E.length;C++){var z=E[C];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,z.key,z)}}var e=o(2),b=o(22).mat4,g=o(117),f=o(6),c=o(28),u=o(0),i=o(40),a=o(14),n=a.RasterBoundsArray,t=a.PosArray,r=o(46),l=o(125),d=o(32).ProgramConfiguration,h=o(123),m=o(126),S=o(268),y=o(67),s=o(15),p=o(18),w=o(68),A=(o(20),o(269)),k=o(12),v={symbol:o(270),circle:o(272),heatmap:o(273),line:o(274),fill:o(275),"fill-extrusion":o(276),hillshade:o(277),raster:o(278),background:o(279),debug:o(280)},x=function(){function T(P,B){(function(F,Z){if(!(F instanceof Z))throw new TypeError("Cannot call a class as a function")})(this,T),this.context=new y(P),this.transform=B,this._tileTextures={},this.setup(),this.numSublayers=g.maxUnderzooming+g.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new d,this.crossTileSymbolIndex=new h}var E,C,z;return E=T,(C=[{key:"resize",value:function(P,B){var F=this.context.gl;if(this.width=P*e.devicePixelRatio,this.height=B*e.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style){var Z=!0,W=!1,J=void 0;try{for(var X,R=this.style._order[Symbol.iterator]();!(Z=(X=R.next()).done);Z=!0){var U=X.value;this.style._layers[U].resize()}}catch(K){W=!0,J=K}finally{try{Z||R.return==null||R.return()}finally{if(W)throw J}}}this.depthRbo&&(F.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)}},{key:"setup",value:function(){var P=this.context,B=new t;B.emplaceBack(0,0),B.emplaceBack(f,0),B.emplaceBack(0,f),B.emplaceBack(f,f),this.tileExtentBuffer=P.createVertexBuffer(B,l.members),this.tileExtentVAO=new i,this.tileExtentPatternVAO=new i;var F=new t;F.emplaceBack(0,0),F.emplaceBack(f,0),F.emplaceBack(f,f),F.emplaceBack(0,f),F.emplaceBack(0,0),this.debugBuffer=P.createVertexBuffer(F,l.members),this.debugVAO=new i;var Z=new n;Z.emplaceBack(0,0,0,0),Z.emplaceBack(f,0,f,0),Z.emplaceBack(0,f,0,f),Z.emplaceBack(f,f,f,f),this.rasterBoundsBuffer=P.createVertexBuffer(Z,r.members),this.rasterBoundsVAO=new i;var W=new t;W.emplaceBack(0,0),W.emplaceBack(1,0),W.emplaceBack(0,1),W.emplaceBack(1,1),this.viewportBuffer=P.createVertexBuffer(W,l.members),this.viewportVAO=new i}},{key:"clearStencil",value:function(){var P=this.context,B=P.gl;P.setColorMode(w.disabled),P.setDepthMode(s.disabled),P.setStencilMode(new p({func:B.ALWAYS,mask:0},0,255,B.ZERO,B.ZERO,B.ZERO));var F=b.create();b.ortho(F,0,this.width,this.height,0,0,1),b.scale(F,F,[B.drawingBufferWidth,B.drawingBufferHeight,0]);var Z=this.useProgram("clippingMask");B.uniformMatrix4fv(Z.uniforms.u_matrix,!1,F),this.viewportVAO.bind(P,Z,this.viewportBuffer,[]),B.drawArrays(B.TRIANGLE_STRIP,0,4)}},{key:"_renderTileClippingMasks",value:function(P){var B=this.context,F=B.gl;B.setColorMode(w.disabled),B.setDepthMode(s.disabled);var Z=1;this._tileClippingMaskIDs={};var W=!0,J=!1,X=void 0;try{for(var R,U=P[Symbol.iterator]();!(W=(R=U.next()).done);W=!0){var K=R.value,q=this._tileClippingMaskIDs[K.key]=Z++;B.setStencilMode(new p({func:F.ALWAYS,mask:0},q,255,F.KEEP,F.KEEP,F.REPLACE));var L=this.useProgram("clippingMask");F.uniformMatrix4fv(L.uniforms.u_matrix,!1,K.posMatrix),this.tileExtentVAO.bind(this.context,L,this.tileExtentBuffer,[]),F.drawArrays(F.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}}catch(I){J=!0,X=I}finally{try{W||U.return==null||U.return()}finally{if(J)throw X}}}},{key:"stencilModeForClipping",value:function(P){var B=this.context.gl;return new p({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[P.key],0,B.KEEP,B.KEEP,B.REPLACE)}},{key:"colorModeForRenderPass",value:function(){var P=this.context.gl;return this._showOverdrawInspector?new w([P.CONSTANT_COLOR,P.ONE],new k(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?w.unblended:w.alphaBlended}},{key:"depthModeForSublayer",value:function(P,B,F){var Z=1-((1+this.currentLayer)*this.numSublayers+P)*this.depthEpsilon,W=Z-1+this.depthRange;return new s(F||this.context.gl.LEQUAL,B,[W,Z])}},{key:"render",value:function(P,B){var F=this;for(var Z in this.style=P,this.options=B,this.lineAtlas=P.lineAtlas,this.imageManager=P.imageManager,this.glyphManager=P.glyphManager,this.symbolFadeChange=P.placement.symbolFadeChange(e.now()),P.sourceCaches){var W=this.style.sourceCaches[Z];W.used&&W.prepare(this.context)}var J=this.style._order,X=u.filterObject(this.style.sourceCaches,function($){return $.getSource().type==="raster"||$.getSource().type==="raster-dem"}),R=function($){var Q=X[$],tt=Q.getVisibleCoordinates().map(function(et){return Q.getTile(et)});A(tt,F.context)};for(var U in X)R(U);this.renderPass="offscreen";var K,q=[];this.depthRboNeedsClear=!0;for(var L=0;L<J.length;L++){var I=this.style._layers[J[L]];I.hasOffscreenPass()&&!I.isHidden(this.transform.zoom)&&(I.source!==(K&&K.id)&&(q=[],(K=this.style.sourceCaches[I.source])&&(q=K.getVisibleCoordinates()).reverse()),q.length&&this.renderLayer(this,K,I,q))}this.context.bindFramebuffer.set(null),this.context.clear({color:B.showOverdrawInspector?k.black:k.transparent,depth:1}),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRange=(P._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var j,M=[];for(this.currentLayer=J.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var N=this.style._layers[J[this.currentLayer]];N.source!==(j&&j.id)&&(M=[],(j=this.style.sourceCaches[N.source])&&(this.clearStencil(),M=j.getVisibleCoordinates(),j.getSource().isTileClipped&&this._renderTileClippingMasks(M))),this.renderLayer(this,j,N,M)}this.renderPass="translucent";var V,G=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<J.length;this.currentLayer++){var H=this.style._layers[J[this.currentLayer]];H.source!==(V&&V.id)&&(G=[],(V=this.style.sourceCaches[H.source])&&(this.clearStencil(),G=V.getVisibleCoordinates(),V.getSource().isTileClipped&&this._renderTileClippingMasks(G)),G.reverse()),this.renderLayer(this,V,H,G)}if(this.options.showTileBoundaries){var Y=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];Y&&v.debug(this,Y,Y.getVisibleCoordinates())}}},{key:"setupOffscreenDepthRenderbuffer",value:function(){var P=this.context;this.depthRbo||(this.depthRbo=P.createRenderbuffer(P.gl.DEPTH_COMPONENT16,this.width,this.height))}},{key:"renderLayer",value:function(P,B,F,Z){F.isHidden(this.transform.zoom)||(F.type==="background"||Z.length)&&(this.id=F.id,v[F.type](P,B,F,Z))}},{key:"translatePosMatrix",value:function(P,B,F,Z,W){if(!F[0]&&!F[1])return P;var J=W?Z==="map"?this.transform.angle:0:Z==="viewport"?-this.transform.angle:0;if(J){var X=Math.sin(J),R=Math.cos(J);F=[F[0]*R-F[1]*X,F[0]*X+F[1]*R]}var U=[W?F[0]:c(B,F[0],this.transform.zoom),W?F[1]:c(B,F[1],this.transform.zoom),0],K=new Float32Array(16);return b.translate(K,P,U),K}},{key:"saveTileTexture",value:function(P){var B=this._tileTextures[P.size[0]];B?B.push(P):this._tileTextures[P.size[0]]=[P]}},{key:"getTileTexture",value:function(P){var B=this._tileTextures[P];return B&&B.length>0?B.pop():null}},{key:"_createProgramCached",value:function(P,B){this.cache=this.cache||{};var F="".concat(P).concat(B.cacheKey||"").concat(this._showOverdrawInspector?"/overdraw":"");return this.cache[F]||(this.cache[F]=new S(this.context,m[P],B,this._showOverdrawInspector)),this.cache[F]}},{key:"useProgram",value:function(P,B){var F=this._createProgramCached(P,B||this.emptyProgramConfiguration);return this.context.program.set(F.program),F}}])&&_(E.prototype,C),z&&_(E,z),T}();O.exports=x},function(O,D,o){var _=o(23).createLayout;O.exports=_([{name:"a_pos",type:"Int16",components:2}])},function(O,D,o){var _={prelude:{fragmentSource:o(218),vertexSource:o(219)},background:{fragmentSource:o(220),vertexSource:o(221)},backgroundPattern:{fragmentSource:o(222),vertexSource:o(223)},circle:{fragmentSource:o(224),vertexSource:o(225)},clippingMask:{fragmentSource:o(226),vertexSource:o(227)},heatmap:{fragmentSource:o(228),vertexSource:o(229)},heatmapTexture:{fragmentSource:o(230),vertexSource:o(231)},collisionBox:{fragmentSource:o(232),vertexSource:o(233)},collisionCircle:{fragmentSource:o(234),vertexSource:o(235)},debug:{fragmentSource:o(236),vertexSource:o(237)},fill:{fragmentSource:o(238),vertexSource:o(239)},fillOutline:{fragmentSource:o(240),vertexSource:o(241)},fillOutlinePattern:{fragmentSource:o(242),vertexSource:o(243)},fillPattern:{fragmentSource:o(244),vertexSource:o(245)},fillExtrusion:{fragmentSource:o(246),vertexSource:o(247)},fillExtrusionPattern:{fragmentSource:o(248),vertexSource:o(249)},extrusionTexture:{fragmentSource:o(250),vertexSource:o(251)},hillshadePrepare:{fragmentSource:o(252),vertexSource:o(253)},hillshade:{fragmentSource:o(254),vertexSource:o(255)},line:{fragmentSource:o(256),vertexSource:o(257)},linePattern:{fragmentSource:o(258),vertexSource:o(259)},lineSDF:{fragmentSource:o(260),vertexSource:o(261)},raster:{fragmentSource:o(262),vertexSource:o(263)},symbolIcon:{fragmentSource:o(264),vertexSource:o(265)},symbolSDF:{fragmentSource:o(266),vertexSource:o(267)}},e=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,b=function(f){var c=_[f],u={};c.fragmentSource=c.fragmentSource.replace(e,function(i,a,n,t,r){return u[r]=!0,a==="define"?`
#ifndef HAS_UNIFORM_u_`.concat(r,`
varying `).concat(n," ").concat(t," ").concat(r,`;
#else
uniform `).concat(n," ").concat(t," u_").concat(r,`;
#endif
`):`
#ifdef HAS_UNIFORM_u_`.concat(r,`
    `).concat(n," ").concat(t," ").concat(r," = u_").concat(r,`;
#endif
`)}),c.vertexSource=c.vertexSource.replace(e,function(i,a,n,t,r){var l=t==="float"?"vec2":"vec4";return u[r]?a==="define"?`
#ifndef HAS_UNIFORM_u_`.concat(r,`
uniform lowp float a_`).concat(r,`_t;
attribute `).concat(n," ").concat(l," a_").concat(r,`;
varying `).concat(n," ").concat(t," ").concat(r,`;
#else
uniform `).concat(n," ").concat(t," u_").concat(r,`;
#endif
`):`
#ifndef HAS_UNIFORM_u_`.concat(r,`
    `).concat(r," = unpack_mix_").concat(l,"(a_").concat(r,", a_").concat(r,`_t);
#else
    `).concat(n," ").concat(t," ").concat(r," = u_").concat(r,`;
#endif
`):a==="define"?`
#ifndef HAS_UNIFORM_u_`.concat(r,`
uniform lowp float a_`).concat(r,`_t;
attribute `).concat(n," ").concat(l," a_").concat(r,`;
#else
uniform `).concat(n," ").concat(t," u_").concat(r,`;
#endif
`):`
#ifndef HAS_UNIFORM_u_`.concat(r,`
    `).concat(n," ").concat(t," ").concat(r," = unpack_mix_").concat(l,"(a_").concat(r,", a_").concat(r,`_t);
#else
    `).concat(n," ").concat(t," ").concat(r," = u_").concat(r,`;
#endif
`)})};for(var g in _)b(g);O.exports=_},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(9),b=o(0),g=o(5),f=o(2),c=b.bezier(0,0,.25,1),u=function(){function i(r,l){(function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")})(this,i),this._map=r,this._el=l.element||r.getCanvasContainer(),this._button=l.button||"right",this._bearingSnap=l.bearingSnap||0,this._pitchWithRotate=l.pitchWithRotate!==!1,b.bindAll(["_onDown","_onMove","_onUp"],this)}var a,n,t;return a=i,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value:function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)}},{key:"_onDown",value:function(r){if(!(this._map.boxZoom&&this._map.boxZoom.isActive()||this._map.dragPan&&this._map.dragPan.isActive()||this.isActive())){if(this._button==="right"){var l=r.ctrlKey?0:2,d=r.button;if(g.InstallTrigger!==void 0&&r.button===2&&r.ctrlKey&&g.navigator.platform.toUpperCase().indexOf("MAC")>=0&&(d=0),d!==l)return}else if(r.ctrlKey||r.button!==0)return;e.disableDrag(),g.document.addEventListener("mousemove",this._onMove,{capture:!0}),g.document.addEventListener("mouseup",this._onUp),g.addEventListener("blur",this._onUp),this._active=!1,this._inertia=[[f.now(),this._map.getBearing()]],this._startPos=this._pos=e.mousePos(this._el,r),this._center=this._map.transform.centerPoint,r.preventDefault()}}},{key:"_onMove",value:function(r){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("rotatestart",r),this._fireEvent("movestart",r),this._pitchWithRotate&&this._fireEvent("pitchstart",r));var l=this._map;l.stop();var d=this._pos,h=e.mousePos(this._el,r),m=.8*(d.x-h.x),S=-.5*(d.y-h.y),y=l.getBearing()-m,s=l.getPitch()-S,p=this._inertia,w=p[p.length-1];this._drainInertiaBuffer(),p.push([f.now(),l._normalizeBearing(y,w[1])]),l.transform.bearing=y,this._pitchWithRotate&&(this._fireEvent("pitch",r),l.transform.pitch=s),this._fireEvent("rotate",r),this._fireEvent("move",r),this._pos=h}},{key:"_onUp",value:function(r){var l=this;if(g.document.removeEventListener("mousemove",this._onMove,{capture:!0}),g.document.removeEventListener("mouseup",this._onUp),g.removeEventListener("blur",this._onUp),e.enableDrag(),this.isActive()){this._active=!1,this._fireEvent("rotateend",r),this._drainInertiaBuffer();var d=this._map,h=d.getBearing(),m=this._inertia,S=function(){Math.abs(h)<l._bearingSnap?d.resetNorth({noMoveStart:!0},{originalEvent:r}):(l._map.moving=!1,l._fireEvent("moveend",r)),l._pitchWithRotate&&l._fireEvent("pitchend",r)};if(m.length<2)S();else{var y=m[0],s=m[m.length-1],p=m[m.length-2],w=d._normalizeBearing(h,p[1]),A=s[1]-y[1],k=A<0?-1:1,v=(s[0]-y[0])/1e3;if(A!==0&&v!==0){var x=Math.abs(A*(.25/v));x>180&&(x=180);var T=x/180;w+=k*x*(T/2),Math.abs(d._normalizeBearing(w,0))<this._bearingSnap&&(w=d._normalizeBearing(0,w)),d.rotateTo(w,{duration:1e3*T,easing:c,noMoveStart:!0},{originalEvent:r})}else S()}}}},{key:"_fireEvent",value:function(r,l){return this._map.fire(r,{originalEvent:l})}},{key:"_drainInertiaBuffer",value:function(){for(var r=this._inertia,l=f.now();r.length>0&&l-r[0][0]>160;)r.shift()}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(9),b=o(0),g=o(64),f=function(){function c(n){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,c),this.options=n,b.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)}var u,i,a;return u=c,(i=[{key:"getDefaultPosition",value:function(){return"bottom-right"}},{key:"onAdd",value:function(n){var t=this.options&&this.options.compact;return this._map=n,this._container=e.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),t===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}},{key:"onRemove",value:function(){e.remove(this._container),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0}},{key:"_updateEditLink",value:function(){var n=this._editLink;n||(n=this._editLink=this._container.querySelector(".mapbox-improve-map"));var t=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:g.ACCESS_TOKEN}];if(n){var r=t.reduce(function(l,d,h){return d.value&&(l+="".concat(d.key,"=").concat(d.value).concat(h<t.length-1?"&":"")),l},"?");n.href="https://www.mapbox.com/feedback/".concat(r).concat(this._map._hash?this._map._hash.getHashString(!0):"")}}},{key:"_updateData",value:function(n){n&&n.sourceDataType==="metadata"&&(this._updateAttributions(),this._updateEditLink())}},{key:"_updateAttributions",value:function(){if(this._map.style){var n=[];if(this._map.style.stylesheet){var t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}var r=this._map.style.sourceCaches;for(var l in r){var d=r[l].getSource();d.attribution&&n.indexOf(d.attribution)<0&&n.push(d.attribution)}n.sort(function(h,m){return h.length-m.length}),n=n.filter(function(h,m){for(var S=m+1;S<n.length;S++)if(n[S].indexOf(h)>=0)return!1;return!0}),this._container.innerHTML=n.join(" | "),this._editLink=null}}},{key:"_updateCompact",value:function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")}}])&&_(u.prototype,i),a&&_(u,a),c}();O.exports=f},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(9),b=o(21),g=o(3),f=o(130),c=o(0).bindAll,u=function(){function i(r,l){if(function(P,B){if(!(P instanceof B))throw new TypeError("Cannot call a class as a function")}(this,i),this._offset=g.convert(l&&l.offset||[0,0]),c(["_update","_onMapClick"],this),!r){r=e.create("div");var d=e.createNS("http://www.w3.org/2000/svg","svg");d.setAttributeNS(null,"height","41px"),d.setAttributeNS(null,"width","27px"),d.setAttributeNS(null,"viewBox","0 0 27 41");var h=e.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"stroke","none"),h.setAttributeNS(null,"stroke-width","1"),h.setAttributeNS(null,"fill","none"),h.setAttributeNS(null,"fill-rule","evenodd");var m=e.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"fill-rule","nonzero");var S=e.createNS("http://www.w3.org/2000/svg","g");S.setAttributeNS(null,"transform","translate(3.0, 29.0)"),S.setAttributeNS(null,"fill","#000000");for(var y=0,s=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];y<s.length;y++){var p=s[y],w=e.createNS("http://www.w3.org/2000/svg","ellipse");w.setAttributeNS(null,"opacity","0.04"),w.setAttributeNS(null,"cx","10.5"),w.setAttributeNS(null,"cy","5.80029008"),w.setAttributeNS(null,"rx",p.rx),w.setAttributeNS(null,"ry",p.ry),S.appendChild(w)}var A=e.createNS("http://www.w3.org/2000/svg","g");A.setAttributeNS(null,"fill","#3FB1CE");var k=e.createNS("http://www.w3.org/2000/svg","path");k.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),A.appendChild(k);var v=e.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"opacity","0.25"),v.setAttributeNS(null,"fill","#000000");var x=e.createNS("http://www.w3.org/2000/svg","path");x.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),v.appendChild(x);var T=e.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"transform","translate(6.0, 7.0)"),T.setAttributeNS(null,"fill","#FFFFFF");var E=e.createNS("http://www.w3.org/2000/svg","g");E.setAttributeNS(null,"transform","translate(8.0, 8.0)");var C=e.createNS("http://www.w3.org/2000/svg","circle");C.setAttributeNS(null,"fill","#000000"),C.setAttributeNS(null,"opacity","0.25"),C.setAttributeNS(null,"cx","5.5"),C.setAttributeNS(null,"cy","5.5"),C.setAttributeNS(null,"r","5.4999962");var z=e.createNS("http://www.w3.org/2000/svg","circle");z.setAttributeNS(null,"fill","#FFFFFF"),z.setAttributeNS(null,"cx","5.5"),z.setAttributeNS(null,"cy","5.5"),z.setAttributeNS(null,"r","5.4999962"),E.appendChild(C),E.appendChild(z),m.appendChild(S),m.appendChild(A),m.appendChild(v),m.appendChild(T),m.appendChild(E),d.appendChild(m),r.appendChild(d)}r.classList.add("mapboxgl-marker"),this._element=r,this._popup=null}var a,n,t;return a=i,(n=[{key:"addTo",value:function(r){return this.remove(),this._map=r,r.getCanvasContainer().appendChild(this._element),r.on("move",this._update),r.on("moveend",this._update),this._update(),this._map.on("click",this._onMapClick),this}},{key:"remove",value:function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),delete this._map),e.remove(this._element),this._popup&&this._popup.remove(),this}},{key:"getLngLat",value:function(){return this._lngLat}},{key:"setLngLat",value:function(r){return this._lngLat=b.convert(r),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}},{key:"getElement",value:function(){return this._element}},{key:"setPopup",value:function(r){return this._popup&&(this._popup.remove(),this._popup=null),r&&("offset"in r.options||(r.options.offset=this._offset),this._popup=r,this._lngLat&&this._popup.setLngLat(this._lngLat)),this}},{key:"_onMapClick",value:function(r){var l=r.originalEvent.target,d=this._element;this._popup&&(l===d||d.contains(l))&&this.togglePopup()}},{key:"getPopup",value:function(){return this._popup}},{key:"togglePopup",value:function(){var r=this._popup;return r?(r.isOpen()?r.remove():r.addTo(this._map),this):this}},{key:"_update",value:function(r){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=f(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),r&&r.type!=="moveend"||(this._pos=this._pos.round()),e.setTransform(this._element,"translate(-50%, -50%) translate(".concat(this._pos.x,"px, ").concat(this._pos.y,"px)")))}},{key:"getOffset",value:function(){return this._offset}},{key:"setOffset",value:function(r){return this._offset=g.convert(r),this._update(),this}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){var _=o(21);O.exports=function(e,b,g){if(e=new _(e.lng,e.lat),b){var f=new _(e.lng-360,e.lat),c=new _(e.lng+360,e.lat),u=g.locationPoint(e).distSqr(b);g.locationPoint(f).distSqr(b)<u?e=f:g.locationPoint(c).distSqr(b)<u&&(e=c)}for(;Math.abs(e.lng-g.center.lng)>180;){var i=g.locationPoint(e);if(i.x>=0&&i.y>=0&&i.x<=g.width&&i.y<=g.height)break;e.lng>g.center.lng?e.lng-=360:e.lng+=360}return e}},function(O,D,o){O.exports=o(71)},function(O){O.exports={name:"mapbox-gl",description:"A WebGL interactive maps library",version:"2.1.3",main:"dist/mapbox-gl.js",module:"dist/mapbox-gl.js",style:"dist/mapbox-gl.css",license:"SEE LICENSE IN LICENSE.txt",repository:{type:"git",url:"git://github.com/mapbox/mapbox-gl-js.git"},engines:{node:">=6.4.0"},dependencies:{"@mapbox/gl-matrix":"^0.0.1","@mapbox/mapbox-gl-supported":"^1.3.0","@mapbox/point-geometry":"^0.1.0","@mapbox/shelf-pack":"=3.1.0","@mapbox/sphericalmercator":"github:landtechnologies/sphericalmercator#24a1b89b4edc26fcfd6171d61c27e3a9ea2f885c","@mapbox/tiny-sdf":"^1.1.0","@mapbox/unitbezier":"^0.0.0","@mapbox/vector-tile":"^1.3.0","@mapbox/whoots-js":"^3.0.0",brfs:"^1.4.0",bubleify:"^0.7.0",csscolorparser:"~1.0.2",earcut:"^2.1.3","geojson-rewind":"^0.3.0","geojson-vt":"^3.0.0","gray-matter":"^3.0.8","grid-index":"^1.0.0","jsonlint-lines-primitives":"~1.6.0","mapbox-gl-supported":"^1.2.0",minimist:"0.0.8","package-json-versionify":"^1.0.2",pbf:"^3.0.5","point-geometry":"^0.0.0",quickselect:"^1.0.0",rw:"^1.3.3","shuffle-seed":"^1.1.6","sort-object":"^0.3.2",supercluster:"^2.3.0",through2:"^2.0.3",tinyqueue:"^1.1.0",unassertify:"^2.0.0",unflowify:"^1.0.0","vt-pbf":"^3.0.1",webworkify:"^1.5.0"},devDependencies:{"@babel/cli":"^7.4.4","@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-transform-flow-strip-types":"^7.4.4","@babel/preset-env":"^7.4.5","@mapbox/batfish":"^0.13.3","@mapbox/mapbox-gl-rtl-text":"^0.1.1","@mapbox/mapbox-gl-test-suite":"file:test/integration","babel-eslint":"^7.0.0","babel-loader":"^8.0.6","babel-preset-es2015":"^6.24.1",benchmark:"~2.1.0",browserify:"^14.0.0",coveralls:"^2.11.8",d3:"^4.12.0",derequire:"^2.0.6",documentation:"5.3.3",ejs:"^2.5.7",envify:"^4.0.0",eslint:"4.1.1","eslint-config-mourner":"^2.0.0","eslint-plugin-flowtype":"^2.34.0","eslint-plugin-html":"^3.0.0","eslint-plugin-node":"^5.1.1","eslint-plugin-react":"^7.3.0","execcommand-copy":"^1.1.0","flow-bin":"^0.62.0","flow-coverage-report":"^0.3.0","flow-remove-types":"^1.0.4","github-slugger":"^1.1.1",gl:"^4.0.1",glob:"^7.0.3","in-publish":"^2.0.0","is-builtin-module":"^1.0.0",jsdom:"^11.2.0","json-stringify-pretty-compact":"^1.0.4",lodash:"^4.16.0",minifyify:"^7.0.1","mock-geolocation":"^1.0.11","npm-run-all":"^4.0.1",nyc:"^10.1.2","object.entries":"^1.0.4",pngjs:"^3.0.0",prismjs:"^1.8.1","prop-types":"^15.6.0",proxyquire:"^1.7.9","raw-loader":"^0.5.1",react:"^16.0.0","react-dom":"^16.0.0","react-helmet":"^5.2.0",remark:"^8.0.0","remark-html":"^5.0.1","remark-react":"^4.0.1",request:"^2.79.0",sinon:"^2.1.0",slugg:"^1.2.1",st:"^1.2.0",stylelint:"^7.10.1",tap:"^10.3.0",watchify:"^3.7.0",webpack:"^4.35.0","webpack-cli":"^3.3.5","worker-loader":"^2.0.0"},browserify:{transform:["unflowify",["bubleify",{bubleError:!0,transforms:{dangerousForOf:!0},objectAssign:"Object.assign"}],"package-json-versionify","unassertify","brfs","./build/minifyify_style_spec","./build/strictify"]},browser:{"./src/util/window.js":"./src/util/browser/window.js","./src/util/web_worker.js":"./src/util/browser/web_worker.js"},scripts:{"build-dev":"browserify src/index.js --debug --ignore-transform unassertify --standalone mapboxgl > dist/mapbox-gl-dev.js && tap --no-coverage test/build/dev.test.js","watch-dev":"watchify src/index.js --debug --ignore-transform unassertify --standalone mapboxgl --outfile dist/mapbox-gl-dev.js --verbose","watch-style-property-editor":"watchify debug/style_property_editor.js --debug -o debug/style_property_editor_generated.js --standalone StylePropertyEditor --verbose","build-min":"browserify src/index.js --debug --plugin [minifyify --map mapbox-gl.js.map --output dist/mapbox-gl.js.map] --standalone mapboxgl | derequire > dist/mapbox-gl.js && tap --no-coverage test/build/min.test.js","build-token":"browserify debug/access_token.js --debug --transform envify > debug/access_token_generated.js","build-benchmarks":'BENCHMARK_VERSION="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short=7 HEAD)" browserify bench/benchmarks.js --debug --transform envify --outfile bench/benchmarks_generated.js --verbose',"watch-benchmarks":'BENCHMARK_VERSION="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short=7 HEAD)" watchify bench/benchmarks.js --debug --transform envify --outfile bench/benchmarks_generated.js --verbose',"watch-benchmarks-view":"watchify bench/benchmarks_view.js --debug --outfile bench/benchmarks_view_generated.js --verbose","start-server":"st --no-cache --localhost --port 9966 --index index.html .",start:"run-p build-token watch-dev watch-style-property-editor watch-benchmarks watch-benchmarks-view start-server","start-debug":"run-p build-token watch-dev watch-style-property-editor start-server","start-bench":"run-p build-token watch-benchmarks watch-benchmarks-view start-server","build-docs":"documentation build --github --format json --config ./docs/documentation.yml --output docs/components/api.json src/index.js",build:"run-s build-docs && DEPLOY_ENV=production batfish build # invoked by publisher when publishing docs on the mb-pages branch","start-docs":"run-s build-min build-docs && DEPLOY_ENV=local batfish start",lint:"eslint --cache --ignore-path .gitignore src test bench docs docs/pages/example/*.html debug/*.html","lint-docs":"documentation lint src/index.js","lint-css":"stylelint 'dist/mapbox-gl.css'","open-changed-examples":`git diff --name-only mb-pages HEAD -- docs/pages/example/*.html | awk '{print "http://127.0.0.1:4000/mapbox-gl-js/example/" substr($0,33,length($0)-37)}' | xargs open`,test:"run-s lint lint-css test-flow test-unit","test-suite":"run-s test-render test-query","test-suite-clean":'find test/integration/{render,query}-tests -mindepth 2 -type d  -not \\( -exec test -e "{}/style.json" \\; \\) -print | xargs -t rm -r',"test-unit":"tap --reporter classic --no-coverage test/unit","test-render":"node --max-old-space-size=2048 test/render.test.js","test-query":"node test/query.test.js","test-expressions":"node test/expression.test.js","test-flow":"node build/generate-flow-typed-style-spec && flow .","test-flow-cov":"flow-coverage-report -i 'src/**/*.js' -t html","test-cov":"nyc --require=flow-remove-types/register --reporter=text-summary --reporter=lcov --cache run-s test-unit test-expressions test-query test-render",prepublish:"in-publish && run-s build-dev build-min || not-in-publish",codegen:"node build/generate-style-code.js && flow-node build/generate-struct-arrays.js"},bin:{"gl-style-migrate":"src/style-spec/bin/gl-style-migrate","gl-style-validate":"src/style-spec/bin/gl-style-validate","gl-style-format":"src/style-spec/bin/gl-style-format","gl-style-composite":"src/style-spec/bin/gl-style-composite"},files:["build/","dist/","flow-typed/","src/",".flowconfig"]}},function(O,D,o){function _(F){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z})(F)}function e(F,Z){for(var W=0;W<Z.length;W++){var J=Z[W];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(F,J.key,J)}}function b(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function g(F,Z,W){return(g=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(J,X,R){var U=function(q,L){for(;!Object.prototype.hasOwnProperty.call(q,L)&&(q=f(q))!==null;);return q}(J,X);if(U){var K=Object.getOwnPropertyDescriptor(U,X);return K.get?K.get.call(R):K.value}})(F,Z,W||F)}function f(F){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(Z){return Z.__proto__||Object.getPrototypeOf(Z)})(F)}function c(F,Z){return(c=Object.setPrototypeOf||function(W,J){return W.__proto__=J,W})(F,Z)}var u=o(0),i=o(2),a=o(5),n=o(5),t=n.HTMLImageElement,r=n.HTMLElement,l=o(9),d=o(16),h=o(53),m=o(61),S=o(124),y=o(281),s=o(283),p=o(285),w=o(292),A=o(21),k=o(39),v=o(3),x=o(128),T=o(293),E=o(72),C=o(33).RGBAImage;o(294);var z={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},P=function(F){function Z(R){var U;if(function(I,j){if(!(I instanceof j))throw new TypeError("Cannot call a class as a function")}(this,Z),(R=u.extend({},z,R)).minZoom!=null&&R.maxZoom!=null&&R.minZoom>R.maxZoom)throw new Error("maxZoom must be greater than minZoom");var K=new y(R.minZoom,R.maxZoom,R.renderWorldCopies);(U=function(I,j){return!j||_(j)!=="object"&&typeof j!="function"?b(I):j}(this,f(Z).call(this,K,R)))._interactive=R.interactive,U._maxTileCacheSize=R.maxTileCacheSize,U._failIfMajorPerformanceCaveat=R.failIfMajorPerformanceCaveat,U._preserveDrawingBuffer=R.preserveDrawingBuffer,U._trackResize=R.trackResize,U._bearingSnap=R.bearingSnap,U._refreshExpiredTiles=R.refreshExpiredTiles,U._fadeDuration=R.fadeDuration,U._crossFadingFactor=1;var q=R.transformRequest;if(U._transformRequest=q?function(I,j){return q(I,j)||{url:I}}:function(I){return{url:I}},typeof R.container=="string"){var L=a.document.getElementById(R.container);if(!L)throw new Error("Container '".concat(R.container,"' not found."));U._container=L}else{if(!(R.container instanceof r))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");U._container=R.container}return R.maxBounds&&U.setMaxBounds(R.maxBounds),u.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],b(U)),U._setupContainer(),U._setupPainter(),U.on("move",U._update.bind(b(U),!1)),U.on("zoom",U._update.bind(b(U),!0)),U.on("move",function(){U._rerender()}),a!==void 0&&(a.addEventListener("online",U._onWindowOnline,!1),a.addEventListener("resize",U._onWindowResize,!1)),p(b(U),R),U._hash=R.hash&&new s().addTo(b(U)),U._hash&&U._hash._onHashChange()||U.jumpTo({center:R.center,zoom:R.zoom,bearing:R.bearing,pitch:R.pitch}),U.resize(),R.style&&U.setStyle(R.style,{localIdeographFontFamily:R.localIdeographFontFamily}),R.attributionControl&&U.addControl(new x),U.addControl(new T,R.logoPosition),U.on("style.load",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),U.on("data",U._onData),U.on("dataloading",U._onDataLoading),U}var W,J,X;return function(R,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(U&&U.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),U&&c(R,U)}(Z,w),W=Z,(J=[{key:"addControl",value:function(R,U){U===void 0&&R.getDefaultPosition&&(U=R.getDefaultPosition()),U===void 0&&(U="top-right");var K=R.onAdd(this),q=this._controlPositions[U];return U.indexOf("bottom")!==-1?q.insertBefore(K,q.firstChild):q.appendChild(K),this}},{key:"removeControl",value:function(R){return R.onRemove(this),this}},{key:"resize",value:function(){var R=this._containerDimensions(),U=R[0],K=R[1];return this._resizeCanvas(U,K),this.transform.resize(U,K),this.painter.resize(U,K),this.fire("movestart").fire("move").fire("resize").fire("moveend")}},{key:"getBounds",value:function(){var R=new k(this.transform.pointLocation(new v(0,this.transform.height)),this.transform.pointLocation(new v(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(R.extend(this.transform.pointLocation(new v(this.transform.size.x,0))),R.extend(this.transform.pointLocation(new v(0,this.transform.size.y)))),R}},{key:"getMaxBounds",value:function(){return this.transform.latRange&&this.transform.latRange.length===2&&this.transform.lngRange&&this.transform.lngRange.length===2?new k([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null}},{key:"setMaxBounds",value:function(R){if(R){var U=k.convert(R);this.transform.lngRange=[U.getWest(),U.getEast()],this.transform.latRange=[U.getSouth(),U.getNorth()],this.transform._constrain(),this._update()}else R==null&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this}},{key:"setMinZoom",value:function(R){if((R=R??0)>=0&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between ".concat(0," and the current maxZoom, inclusive"))}},{key:"getMinZoom",value:function(){return this.transform.minZoom}},{key:"setMaxZoom",value:function(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"project",value:function(R){return this.transform.locationPoint(A.convert(R))}},{key:"unproject",value:function(R){return this.transform.pointLocation(v.convert(R))}},{key:"on",value:function(R,U,K){var q=this;if(K===void 0)return g(f(Z.prototype),"on",this).call(this,R,U);var L=function(){if(R==="mouseenter"||R==="mouseover"){var j=!1;return{layer:U,listener:K,delegates:{mousemove:function(H){var Y=q.getLayer(U)?q.queryRenderedFeatures(H.point,{layers:[U]}):[];Y.length?j||(j=!0,K.call(q,u.extend({features:Y},H,{type:R}))):j=!1},mouseout:function(){j=!1}}}}if(R==="mouseleave"||R==="mouseout"){var M=!1;return{layer:U,listener:K,delegates:{mousemove:function(H){(q.getLayer(U)?q.queryRenderedFeatures(H.point,{layers:[U]}):[]).length?M=!0:M&&(M=!1,K.call(q,u.extend({},H,{type:R})))},mouseout:function(H){M&&(M=!1,K.call(q,u.extend({},H,{type:R})))}}}}var N,V,G;return{layer:U,listener:K,delegates:(N={},V=R,G=function(H){var Y=q.getLayer(U)?q.queryRenderedFeatures(H.point,{layers:[U]}):[];Y.length&&K.call(q,u.extend({features:Y},H))},V in N?Object.defineProperty(N,V,{value:G,enumerable:!0,configurable:!0,writable:!0}):N[V]=G,N)}}();for(var I in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(L),L.delegates)this.on(I,L.delegates[I]);return this}},{key:"off",value:function(R,U,K){if(K===void 0)return g(f(Z.prototype),"off",this).call(this,R,U);if(this._delegatedListeners&&this._delegatedListeners[R])for(var q=this._delegatedListeners[R],L=0;L<q.length;L++){var I=q[L];if(I.layer===U&&I.listener===K){for(var j in I.delegates)this.off(j,I.delegates[j]);return q.splice(L,1),this}}return this}},{key:"queryRenderedFeatures",value:function(R,U){var K;return arguments.length===2?(R=arguments[0],U=arguments[1]):arguments.length===1&&((K=arguments[0])instanceof v||Array.isArray(K))?(R=arguments[0],U={}):arguments.length===1?(R=void 0,U=arguments[0]):(R=void 0,U={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(R),U,this.transform.zoom,this.transform.angle):[]}},{key:"_makeQueryGeometry",value:function(R){var U,K=this;if(R===void 0&&(R=[v.convert([0,0]),v.convert([this.transform.width,this.transform.height])]),R instanceof v||typeof R[0]=="number")U=[v.convert(R)];else{var q=[v.convert(R[0]),v.convert(R[1])];U=[q[0],new v(q[1].x,q[0].y),q[1],new v(q[0].x,q[1].y),q[0]]}return U=U.map(function(L){return K.transform.pointCoordinate(L)})}},{key:"querySourceFeatures",value:function(R,U){return this.style.querySourceFeatures(R,U)}},{key:"setStyle",value:function(R,U){if((!U||U.diff!==!1&&!U.localIdeographFontFamily)&&this.style&&R&&_(R)==="object")try{return this.style.setState(R)&&this._update(!0),this}catch(K){u.warnOnce("Unable to perform style diff: ".concat(K.message||K.error||K,".  Rebuilding the style from scratch."))}return this.style&&(this.style.setEventedParent(null),this.style._remove()),R?(this.style=new h(this,U||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R):this.style.loadJSON(R),this):(delete this.style,this)}},{key:"getStyle",value:function(){if(this.style)return this.style.serialize()}},{key:"isStyleLoaded",value:function(){return this.style?this.style.loaded():u.warnOnce("There is no style added to the map.")}},{key:"addSource",value:function(R,U){return this.style.addSource(R,U),this._update(!0),this}},{key:"isSourceLoaded",value:function(R){var U=this.style&&this.style.sourceCaches[R];if(U!==void 0)return U.loaded();this.fire("error",{error:new Error("There is no source with ID '".concat(R,"'"))})}},{key:"areTilesLoaded",value:function(){var R=this.style&&this.style.sourceCaches;for(var U in R){var K=R[U]._tiles;for(var q in K){var L=K[q];if(L.state!=="loaded"&&L.state!=="errored")return!1}}return!0}},{key:"addSourceType",value:function(R,U,K){return this.style.addSourceType(R,U,K)}},{key:"removeSource",value:function(R){return this.style.removeSource(R),this._update(!0),this}},{key:"getSource",value:function(R){return this.style.getSource(R)}},{key:"addImage",value:function(R,U){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=K.pixelRatio,L=q===void 0?1:q,I=K.sdf,j=I!==void 0&&I;if(U instanceof t){var M=i.getImageData(U),N=M.width,V=M.height,G=M.data;this.style.addImage(R,{data:new C({width:N,height:V},G),pixelRatio:L,sdf:j})}else{if(U.width===void 0||U.height===void 0)return this.fire("error",{error:new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")});var H=U.width,Y=U.height,$=U.data;this.style.addImage(R,{data:new C({width:H,height:Y},$.slice(0)),pixelRatio:L,sdf:j})}}},{key:"hasImage",value:function(R){return R?!!this.style.getImage(R):(this.fire("error",{error:new Error("Missing required image id")}),!1)}},{key:"removeImage",value:function(R){this.style.removeImage(R)}},{key:"loadImage",value:function(R,U){d.getImage(this._transformRequest(R,d.ResourceType.Image),U)}},{key:"addLayer",value:function(R,U){return this.style.addLayer(R,U),this._update(!0),this}},{key:"moveLayer",value:function(R,U){return this.style.moveLayer(R,U),this._update(!0),this}},{key:"removeLayer",value:function(R){return this.style.removeLayer(R),this._update(!0),this}},{key:"getLayer",value:function(R){return this.style.getLayer(R)}},{key:"setFilter",value:function(R,U){return this.style.setFilter(R,U),this._update(!0),this}},{key:"setLayerZoomRange",value:function(R,U,K){return this.style.setLayerZoomRange(R,U,K),this._update(!0),this}},{key:"getFilter",value:function(R){return this.style.getFilter(R)}},{key:"setPaintProperty",value:function(R,U,K){return this.style.setPaintProperty(R,U,K),this._update(!0),this}},{key:"getPaintProperty",value:function(R,U){return this.style.getPaintProperty(R,U)}},{key:"setLayoutProperty",value:function(R,U,K){return this.style.setLayoutProperty(R,U,K),this._update(!0),this}},{key:"getLayoutProperty",value:function(R,U){return this.style.getLayoutProperty(R,U)}},{key:"setLight",value:function(R){return this.style.setLight(R),this._update(!0),this}},{key:"getLight",value:function(){return this.style.getLight()}},{key:"getContainer",value:function(){return this._container}},{key:"getCanvasContainer",value:function(){return this._canvasContainer}},{key:"getCanvas",value:function(){return this._canvas}},{key:"_containerDimensions",value:function(){var R=0,U=0;return this._container&&(R=this._container.offsetWidth||400,U=this._container.offsetHeight||300),[R,U]}},{key:"_setupContainer",value:function(){var R=this._container;R.classList.add("mapboxgl-map"),(this._missingCSSContainer=l.create("div","mapboxgl-missing-css",R)).innerHTML="Missing Mapbox GL JS CSS";var U=this._canvasContainer=l.create("div","mapboxgl-canvas-container",R);this._interactive&&U.classList.add("mapboxgl-interactive"),this._canvas=l.create("canvas","mapboxgl-canvas",U),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var K=this._containerDimensions();this._resizeCanvas(K[0],K[1]);var q=this._controlContainer=l.create("div","mapboxgl-control-container",R),L=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(I){L[I]=l.create("div","mapboxgl-ctrl-".concat(I),q)})}},{key:"_resizeCanvas",value:function(R,U){var K=a.devicePixelRatio||1;this._canvas.width=K*R,this._canvas.height=K*U,this._canvas.style.width="".concat(R,"px"),this._canvas.style.height="".concat(U,"px")}},{key:"_setupPainter",value:function(){var R=u.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},E.webGLContextAttributes),U=this._canvas.getContext("webgl",R)||this._canvas.getContext("experimental-webgl",R);U?this.painter=new S(U,this.transform):this.fire("error",{error:new Error("Failed to initialize WebGL")})}},{key:"_contextLost",value:function(R){R.preventDefault(),this._frameId&&(i.cancelFrame(this._frameId),this._frameId=null),this.fire("webglcontextlost",{originalEvent:R})}},{key:"_contextRestored",value:function(R){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:R})}},{key:"loaded",value:function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())}},{key:"_update",value:function(R){this.style&&(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this._rerender())}},{key:"_render",value:function(){this.isEasing()&&this._updateEase();var R=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var U=this.transform.zoom,K=i.now();this.style.zoomHistory.update(U,K);var q=new m(U,{now:K,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),L=q.crossFadingFactor();L===1&&L===this._crossFadingFactor||(R=!0,this._crossFadingFactor=L),this.style.update(q)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming,fadeDuration:this._fadeDuration}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this.style&&(this.style.hasTransitions()||R)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty||this.isEasing())&&this._rerender(),this}},{key:"remove",value:function(){this._hash&&this._hash.remove(),i.cancelFrame(this._frameId),this._frameId=null,this.setStyle(null),a!==void 0&&(a.removeEventListener("resize",this._onWindowResize,!1),a.removeEventListener("online",this._onWindowOnline,!1));var R=this.painter.context.gl.getExtension("WEBGL_lose_context");R&&R.loseContext(),B(this._canvasContainer),B(this._controlContainer),B(this._missingCSSContainer),this._container.classList.remove("mapboxgl-map"),this.fire("remove")}},{key:"_rerender",value:function(){var R=this;this.style&&!this._frameId&&(this._frameId=i.frame(function(){R._frameId=null,R._render()}))}},{key:"_onWindowOnline",value:function(){this._update()}},{key:"_onWindowResize",value:function(){this._trackResize&&this.stop().resize()._update()}},{key:"_onData",value:function(R){this._update(R.dataType==="style"),this.fire("".concat(R.dataType,"data"),R)}},{key:"_onDataLoading",value:function(R){this.fire("".concat(R.dataType,"dataloading"),R)}},{key:"showTileBoundaries",get:function(){return!!this._showTileBoundaries},set:function(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}},{key:"showCollisionBoxes",get:function(){return!!this._showCollisionBoxes},set:function(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}},{key:"showOverdrawInspector",get:function(){return!!this._showOverdrawInspector},set:function(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}},{key:"repaint",get:function(){return!!this._repaint},set:function(R){this._repaint=R,this._update()}},{key:"vertices",get:function(){return!!this._vertices},set:function(R){this._vertices=R,this._update()}}])&&e(W.prototype,J),X&&e(W,X),Z}();function B(F){F.parentNode&&F.parentNode.removeChild(F)}O.exports=P},function(O,D){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}O.exports=o},function(O,D,o){"use strict";/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var _=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;O.exports=function(){try{if(!Object.assign)return!1;var g=new String("abc");if(g[5]="de",Object.getOwnPropertyNames(g)[0]==="5")return!1;for(var f={},c=0;c<10;c++)f["_"+String.fromCharCode(c)]=c;if(Object.getOwnPropertyNames(f).map(function(i){return f[i]}).join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(i){u[i]=i}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(g,f){for(var c,u,i=function(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}(g),a=1;a<arguments.length;a++){for(var n in c=Object(arguments[a]))e.call(c,n)&&(i[n]=c[n]);if(_){u=_(c);for(var t=0;t<u.length;t++)b.call(c,u[t])&&(i[u[t]]=c[u[t]])}}return i}},function(O,D,o){(function(_){var e=Object.getOwnPropertyDescriptors||function(z){for(var P=Object.keys(z),B={},F=0;F<P.length;F++)B[P[F]]=Object.getOwnPropertyDescriptor(z,P[F]);return B},b=/%[sdj%]/g;D.format=function(z){if(!m(z)){for(var P=[],B=0;B<arguments.length;B++)P.push(c(arguments[B]));return P.join(" ")}B=1;for(var F=arguments,Z=F.length,W=String(z).replace(b,function(X){if(X==="%%")return"%";if(B>=Z)return X;switch(X){case"%s":return String(F[B++]);case"%d":return Number(F[B++]);case"%j":try{return JSON.stringify(F[B++])}catch{return"[Circular]"}default:return X}}),J=F[B];B<Z;J=F[++B])d(J)||!s(J)?W+=" "+J:W+=" "+c(J);return W},D.deprecate=function(z,P){if(_!==void 0&&_.noDeprecation===!0)return z;if(_===void 0)return function(){return D.deprecate(z,P).apply(this,arguments)};var B=!1;return function(){if(!B){if(_.throwDeprecation)throw new Error(P);_.traceDeprecation?console.trace(P):console.error(P),B=!0}return z.apply(this,arguments)}};var g,f={};function c(z,P){var B={seen:[],stylize:i};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),l(P)?B.showHidden=P:P&&D._extend(B,P),S(B.showHidden)&&(B.showHidden=!1),S(B.depth)&&(B.depth=2),S(B.colors)&&(B.colors=!1),S(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=u),a(B,z,B.depth)}function u(z,P){var B=c.styles[P];return B?"\x1B["+c.colors[B][0]+"m"+z+"\x1B["+c.colors[B][1]+"m":z}function i(z,P){return z}function a(z,P,B){if(z.customInspect&&P&&A(P.inspect)&&P.inspect!==D.inspect&&(!P.constructor||P.constructor.prototype!==P)){var F=P.inspect(B,z);return m(F)||(F=a(z,F,B)),F}var Z=function(L,I){if(S(I))return L.stylize("undefined","undefined");if(m(I)){var j="'"+JSON.stringify(I).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return L.stylize(j,"string")}if(h(I))return L.stylize(""+I,"number");if(l(I))return L.stylize(""+I,"boolean");if(d(I))return L.stylize("null","null")}(z,P);if(Z)return Z;var W=Object.keys(P),J=function(L){var I={};return L.forEach(function(j,M){I[j]=!0}),I}(W);if(z.showHidden&&(W=Object.getOwnPropertyNames(P)),w(P)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return n(P);if(W.length===0){if(A(P)){var X=P.name?": "+P.name:"";return z.stylize("[Function"+X+"]","special")}if(y(P))return z.stylize(RegExp.prototype.toString.call(P),"regexp");if(p(P))return z.stylize(Date.prototype.toString.call(P),"date");if(w(P))return n(P)}var R,U="",K=!1,q=["{","}"];return r(P)&&(K=!0,q=["[","]"]),A(P)&&(U=" [Function"+(P.name?": "+P.name:"")+"]"),y(P)&&(U=" "+RegExp.prototype.toString.call(P)),p(P)&&(U=" "+Date.prototype.toUTCString.call(P)),w(P)&&(U=" "+n(P)),W.length!==0||K&&P.length!=0?B<0?y(P)?z.stylize(RegExp.prototype.toString.call(P),"regexp"):z.stylize("[Object]","special"):(z.seen.push(P),R=K?function(L,I,j,M,N){for(var V=[],G=0,H=I.length;G<H;++G)T(I,String(G))?V.push(t(L,I,j,M,String(G),!0)):V.push("");return N.forEach(function(Y){Y.match(/^\d+$/)||V.push(t(L,I,j,M,Y,!0))}),V}(z,P,B,J,W):W.map(function(L){return t(z,P,B,J,L,K)}),z.seen.pop(),function(L,I,j){return L.reduce(function(M,N){return N.indexOf(`
`)>=0,M+N.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?j[0]+(I===""?"":I+`
 `)+" "+L.join(`,
  `)+" "+j[1]:j[0]+I+" "+L.join(", ")+" "+j[1]}(R,U,q)):q[0]+U+q[1]}function n(z){return"["+Error.prototype.toString.call(z)+"]"}function t(z,P,B,F,Z,W){var J,X,R;if((R=Object.getOwnPropertyDescriptor(P,Z)||{value:P[Z]}).get?X=R.set?z.stylize("[Getter/Setter]","special"):z.stylize("[Getter]","special"):R.set&&(X=z.stylize("[Setter]","special")),T(F,Z)||(J="["+Z+"]"),X||(z.seen.indexOf(R.value)<0?(X=d(B)?a(z,R.value,null):a(z,R.value,B-1)).indexOf(`
`)>-1&&(X=W?X.split(`
`).map(function(U){return"  "+U}).join(`
`).substr(2):`
`+X.split(`
`).map(function(U){return"   "+U}).join(`
`)):X=z.stylize("[Circular]","special")),S(J)){if(W&&Z.match(/^\d+$/))return X;(J=JSON.stringify(""+Z)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(J=J.substr(1,J.length-2),J=z.stylize(J,"name")):(J=J.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),J=z.stylize(J,"string"))}return J+": "+X}function r(z){return Array.isArray(z)}function l(z){return typeof z=="boolean"}function d(z){return z===null}function h(z){return typeof z=="number"}function m(z){return typeof z=="string"}function S(z){return z===void 0}function y(z){return s(z)&&k(z)==="[object RegExp]"}function s(z){return typeof z=="object"&&z!==null}function p(z){return s(z)&&k(z)==="[object Date]"}function w(z){return s(z)&&(k(z)==="[object Error]"||z instanceof Error)}function A(z){return typeof z=="function"}function k(z){return Object.prototype.toString.call(z)}function v(z){return z<10?"0"+z.toString(10):z.toString(10)}D.debuglog=function(z){if(S(g)&&(g=_.env.NODE_DEBUG||""),z=z.toUpperCase(),!f[z])if(new RegExp("\\b"+z+"\\b","i").test(g)){var P=_.pid;f[z]=function(){var B=D.format.apply(D,arguments);console.error("%s %d: %s",z,P,B)}}else f[z]=function(){};return f[z]},D.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},D.isArray=r,D.isBoolean=l,D.isNull=d,D.isNullOrUndefined=function(z){return z==null},D.isNumber=h,D.isString=m,D.isSymbol=function(z){return typeof z=="symbol"},D.isUndefined=S,D.isRegExp=y,D.isObject=s,D.isDate=p,D.isError=w,D.isFunction=A,D.isPrimitive=function(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||z===void 0},D.isBuffer=o(138);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(z,P){return Object.prototype.hasOwnProperty.call(z,P)}D.log=function(){var z,P;console.log("%s - %s",(z=new Date,P=[v(z.getHours()),v(z.getMinutes()),v(z.getSeconds())].join(":"),[z.getDate(),x[z.getMonth()],P].join(" ")),D.format.apply(D,arguments))},D.inherits=o(139),D._extend=function(z,P){if(!P||!s(P))return z;for(var B=Object.keys(P),F=B.length;F--;)z[B[F]]=P[B[F]];return z};var E=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function C(z,P){if(!z){var B=new Error("Promise was rejected with a falsy value");B.reason=z,z=B}return P(z)}D.promisify=function(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');if(E&&z[E]){var P;if(typeof(P=z[E])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(P,E,{value:P,enumerable:!1,writable:!1,configurable:!0}),P}function P(){for(var B,F,Z=new Promise(function(X,R){B=X,F=R}),W=[],J=0;J<arguments.length;J++)W.push(arguments[J]);W.push(function(X,R){X?F(X):B(R)});try{z.apply(this,W)}catch(X){F(X)}return Z}return Object.setPrototypeOf(P,Object.getPrototypeOf(z)),E&&Object.defineProperty(P,E,{value:P,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(P,e(z))},D.promisify.custom=E,D.callbackify=function(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');function P(){for(var B=[],F=0;F<arguments.length;F++)B.push(arguments[F]);var Z=B.pop();if(typeof Z!="function")throw new TypeError("The last argument must be of type Function");var W=this,J=function(){return Z.apply(W,arguments)};z.apply(this,B).then(function(X){_.nextTick(J,null,X)},function(X){_.nextTick(C,X,J)})}return Object.setPrototypeOf(P,Object.getPrototypeOf(z)),Object.defineProperties(P,e(z)),P}}).call(this,o(137))},function(O,D){var o,_,e=O.exports={};function b(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}function f(d){if(o===setTimeout)return setTimeout(d,0);if((o===b||!o)&&setTimeout)return o=setTimeout,setTimeout(d,0);try{return o(d,0)}catch{try{return o.call(null,d,0)}catch{return o.call(this,d,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:b}catch{o=b}try{_=typeof clearTimeout=="function"?clearTimeout:g}catch{_=g}})();var c,u=[],i=!1,a=-1;function n(){i&&c&&(i=!1,c.length?u=c.concat(u):a=-1,u.length&&t())}function t(){if(!i){var d=f(n);i=!0;for(var h=u.length;h;){for(c=u,u=[];++a<h;)c&&c[a].run();a=-1,h=u.length}c=null,i=!1,function(m){if(_===clearTimeout)return clearTimeout(m);if((_===g||!_)&&clearTimeout)return _=clearTimeout,clearTimeout(m);try{_(m)}catch{try{return _.call(null,m)}catch{return _.call(this,m)}}}(d)}}function r(d,h){this.fun=d,this.array=h}function l(){}e.nextTick=function(d){var h=new Array(arguments.length-1);if(arguments.length>1)for(var m=1;m<arguments.length;m++)h[m-1]=arguments[m];u.push(new r(d,h)),u.length!==1||i||f(t)},r.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.prependListener=l,e.prependOnceListener=l,e.listeners=function(d){return[]},e.binding=function(d){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(d){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(O,D){O.exports=function(o){return o&&typeof o=="object"&&typeof o.copy=="function"&&typeof o.fill=="function"&&typeof o.readUInt8=="function"}},function(O,D){typeof Object.create=="function"?O.exports=function(o,_){o.super_=_,o.prototype=Object.create(_.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})}:O.exports=function(o,_){o.super_=_;var e=function(){};e.prototype=_.prototype,o.prototype=new e,o.prototype.constructor=o}},function(O){O.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90\xB0 orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties.",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property.",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image","source_canvas"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A raster DEM source using Mapbox Terrain RGB"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups."},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{doc:"A canvas data source."}},doc:"The data type of the canvas source."},coordinates:{required:!0,doc:"Corners of canvas specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}},animate:{type:"boolean",default:"true",doc:"Whether the canvas source is animated. If the canvas is static, `animate` should be set to `false` to improve performance."},canvas:{type:"string",required:!0,doc:"HTML ID of the canvas from which to read pixels."}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB tiles","sdk-support":{"basic functionality":{js:"0.43.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level on which the layer gets parsed and appears on."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level on which the layer gets parsed and appears on."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_fill:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_circle:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0"}}}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,doc:"Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0,doc:"Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0"},"data-driven styling":{}}}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] \u2260 value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] \u2265 value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] \u2264 value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] \u2208 {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] \u2209 {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 \u2227 ... \u2227 fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 \u2228 ... \u2228 fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `\xACf0 \u2227 ... \u2227 \xACfn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:`A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:
* In categorical functions, when the feature value does not match any of the stop domain values.
* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a \`circle-color\` property but the feature property value is not a string or not a valid color).
* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
If no default is provided, the style property's default is used in these circumstances.`}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding"},var:{doc:'References variable bound using "let".',group:"Variable binding"},literal:{doc:"Provides a literal array or object value.",group:"Types"},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types"},at:{doc:"Retrieves an item from an array.",group:"Lookup"},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision"},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The `input` can be any string or number expression (e.g. `["get", "building_type"]`). Each label can either be a single literal value or an array of values.',group:"Decision"},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision"},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.',group:"Ramps, scales, curves"},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves"},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math"},pi:{doc:"Returns the mathematical constant pi.",group:"Math"},e:{doc:"Returns the mathematical constant e.",group:"Math"},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types"},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string value is obtained. If none of the inputs are strings, the expression is an error.",group:"Types"},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number value is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types"},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean value is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types"},object:{doc:"Asserts that the input value is an object. If it is not, the expression is an error.",group:"Types"},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `"null"`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types"},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types"},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types"},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color"},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types"},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color"},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color"},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup"},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup"},length:{doc:"Gets the length of an array or string.",group:"Lookup"},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data"},"geometry-type":{doc:"Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data"},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data"},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom"},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math"},"*":{doc:"Returns the product of the inputs.",group:"Math"},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math"},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math"},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math"},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math"},sqrt:{doc:"Returns the square root of the input.",group:"Math"},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math"},ln:{doc:"Returns the natural logarithm of the input.",group:"Math"},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math"},sin:{doc:"Returns the sine of the input.",group:"Math"},cos:{doc:"Returns the cosine of the input.",group:"Math"},tan:{doc:"Returns the tangent of the input.",group:"Math"},asin:{doc:"Returns the arcsine of the input.",group:"Math"},acos:{doc:"Returns the arccosine of the input.",group:"Math"},atan:{doc:"Returns the arctangent of the input.",group:"Math"},min:{doc:"Returns the minimum value of the inputs.",group:"Math"},max:{doc:"Returns the maximum value of the inputs.",group:"Math"},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision"},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision"},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision"},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},concat:{doc:"Returns a string consisting of the concatenation of the inputs.",group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant",doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1,doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0\xB0 (0\xB0 when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0\xB0 when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0\xB0, directly above, to 180\xB0, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0"}}},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-weight":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{js:"0.41.0"}}},"heatmap-intensity":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",function:"interpolated","zoom-function":!0,transition:!1},"hillshade-illumination-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated."},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",function:"interpolated","zoom-function":!0,transition:!0}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}}}},function(O,D,o){var _=o(75),e=o(29),b=o(13),g=o(150);function f(i,a){a=a||b;var n=[];return n=n.concat(e({key:"",value:i,valueSpec:a.$root,styleSpec:a,style:i,objectElementValidators:{glyphs:g,"*":function(){return[]}}})),i.constants&&(n=n.concat(_({key:"constants",value:i.constants,style:i,styleSpec:a}))),c(n)}function c(i){return[].concat(i).sort(function(a,n){return a.line-n.line})}function u(i){return function(){return c(i.apply(this,arguments))}}f.source=u(o(99)),f.light=u(o(100)),f.layer=u(o(95)),f.filter=u(o(59)),f.paintProperty=u(o(96)),f.layoutProperty=u(o(98)),O.exports=f},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(8),b=e.array,g=e.ValueType,f=e.NumberType,c=o(31),u=function(){function i(r,l,d){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,i),this.type=r,this.index=l,this.input=d}var a,n,t;return a=i,t=[{key:"parse",value:function(r,l){if(r.length!==3)return l.error("Expected 2 arguments, but found ".concat(r.length-1," instead."));var d=l.parse(r[1],1,f),h=l.parse(r[2],2,b(l.expectedType||g));return d&&h?new i(h.type.itemType,d,h):null}}],(n=[{key:"evaluate",value:function(r){var l=this.index.evaluate(r),d=this.input.evaluate(r);if(l<0||l>=d.length)throw new c("Array index out of bounds: ".concat(l," > ").concat(d.length,"."));if(l!==Math.floor(l))throw new c("Array index must be an integer, but found ".concat(l," instead."));return d[l]}},{key:"eachChild",value:function(r){r(this.index),r(this.input)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){function _(c){return function(u){if(Array.isArray(u)){for(var i=0,a=new Array(u.length);i<u.length;i++)a[i]=u[i];return a}}(c)||function(u){if(Symbol.iterator in Object(u)||Object.prototype.toString.call(u)==="[object Arguments]")return Array.from(u)}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var b=o(1),g=o(25).typeOf,f=function(){function c(n,t,r,l,d,h){(function(m,S){if(!(m instanceof S))throw new TypeError("Cannot call a class as a function")})(this,c),this.inputType=n,this.type=t,this.input=r,this.cases=l,this.outputs=d,this.otherwise=h}var u,i,a;return u=c,a=[{key:"parse",value:function(n,t){if(n.length<5)return t.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=1)return t.error("Expected an even number of arguments.");var r,l;t.expectedType&&t.expectedType.kind!=="value"&&(l=t.expectedType);for(var d={},h=[],m=2;m<n.length-1;m+=2){var S=n[m],y=n[m+1];Array.isArray(S)||(S=[S]);var s=t.concat(m);if(S.length===0)return s.error("Expected at least one branch label.");var p=!0,w=!1,A=void 0;try{for(var k,v=S[Symbol.iterator]();!(p=(k=v.next()).done);p=!0){var x=k.value;if(typeof x!="number"&&typeof x!="string")return s.error("Branch labels must be numbers or strings.");if(typeof x=="number"&&Math.abs(x)>Number.MAX_SAFE_INTEGER)return s.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if(typeof x=="number"&&Math.floor(x)!==x)return s.error("Numeric branch labels must be integer values.");if(r){if(s.checkSubtype(r,g(x)))return null}else r=g(x);if(d[String(x)]!==void 0)return s.error("Branch labels must be unique.");d[String(x)]=h.length}}catch(z){w=!0,A=z}finally{try{p||v.return==null||v.return()}finally{if(w)throw A}}var T=t.parse(y,m,l);if(!T)return null;l=l||T.type,h.push(T)}var E=t.parse(n[1],1,r);if(!E)return null;var C=t.parse(n[n.length-1],n.length-1,l);return C?(b(r&&l),new c(r,l,E,d,h,C)):null}}],(i=[{key:"evaluate",value:function(n){var t=this.input.evaluate(n);return(this.outputs[this.cases[t]]||this.otherwise).evaluate(n)}},{key:"eachChild",value:function(n){n(this.input),this.outputs.forEach(n),n(this.otherwise)}},{key:"possibleOutputs",value:function(){var n;return(n=[]).concat.apply(n,_(this.outputs.map(function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&e(u.prototype,i),a&&e(u,a),c}();O.exports=f},function(O,D,o){function _(u){return function(i){if(Array.isArray(i)){for(var a=0,n=new Array(i.length);a<i.length;a++)n[a]=i[a];return n}}(u)||function(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(u,i){return function(a){if(Array.isArray(a))return a}(u)||function(a,n){var t=[],r=!0,l=!1,d=void 0;try{for(var h,m=a[Symbol.iterator]();!(r=(h=m.next()).done)&&(t.push(h.value),!n||t.length!==n);r=!0);}catch(S){l=!0,d=S}finally{try{r||m.return==null||m.return()}finally{if(l)throw d}}return t}(u,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function b(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}var g=o(1),f=o(8).BooleanType,c=function(){function u(t,r,l){(function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")})(this,u),this.type=t,this.branches=r,this.otherwise=l}var i,a,n;return i=u,n=[{key:"parse",value:function(t,r){if(t.length<4)return r.error("Expected at least 3 arguments, but found only ".concat(t.length-1,"."));if(t.length%2!=0)return r.error("Expected an odd number of arguments.");var l;r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(var d=[],h=1;h<t.length-1;h+=2){var m=r.parse(t[h],h,f);if(!m)return null;var S=r.parse(t[h+1],h+1,l);if(!S)return null;d.push([m,S]),l=l||S.type}var y=r.parse(t[t.length-1],t.length-1,l);return y?(g(l),new u(l,d,y)):null}}],(a=[{key:"evaluate",value:function(t){var r=!0,l=!1,d=void 0;try{for(var h,m=this.branches[Symbol.iterator]();!(r=(h=m.next()).done);r=!0){var S=e(h.value,2),y=S[0],s=S[1];if(y.evaluate(t))return s.evaluate(t)}}catch(p){l=!0,d=p}finally{try{r||m.return==null||m.return()}finally{if(l)throw d}}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var r=!0,l=!1,d=void 0;try{for(var h,m=this.branches[Symbol.iterator]();!(r=(h=m.next()).done);r=!0){var S=e(h.value,2),y=S[0],s=S[1];t(y),t(s)}}catch(p){l=!0,d=p}finally{try{r||m.return==null||m.return()}finally{if(l)throw d}}t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,_(this.branches.map(function(r){var l=e(r,2);return l[0],l[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&b(i.prototype,a),n&&b(i,n),u}();O.exports=c},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(8),b=e.ValueType,g=e.BooleanType,f=o(8).toString;function c(i){return i.kind==="string"||i.kind==="number"||i.kind==="boolean"||i.kind==="null"}function u(i){return function(){function a(l,d){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,a),this.type=g,this.lhs=l,this.rhs=d}var n,t,r;return n=a,r=[{key:"parse",value:function(l,d){if(l.length!==3)return d.error("Expected two arguments.");var h=d.parse(l[1],1,b);if(!h)return null;var m=d.parse(l[2],2,b);return m?c(h.type)||c(m.type)?h.type.kind!==m.type.kind&&h.type.kind!=="value"&&m.type.kind!=="value"?d.error("Cannot compare ".concat(f(h.type)," and ").concat(f(m.type),".")):new a(h,m):d.error("Expected at least one argument to be a string, number, boolean, or null, but found (".concat(f(h.type),", ").concat(f(m.type),") instead.")):null}}],(t=[{key:"evaluate",value:function(l){return i(this.lhs.evaluate(l),this.rhs.evaluate(l))}},{key:"eachChild",value:function(l){l(this.lhs),l(this.rhs)}},{key:"possibleOutputs",value:function(){return[!0,!1]}}])&&_(n.prototype,t),r&&_(n,r),a}()}O.exports={Equals:u(function(i,a){return i===a}),NotEquals:u(function(i,a){return i!==a})}},function(O,D){O.exports={success:function(o){return{result:"success",value:o}},error:function(o){return{result:"error",value:o}}}},function(O,D,o){var _=o(12),e=o(26).number,b=.95047,g=1,f=1.08883,c=4/29,u=6/29,i=3*u*u,a=u*u*u,n=Math.PI/180,t=180/Math.PI;function r(s){return s>a?Math.pow(s,.3333333333333333):s/i+c}function l(s){return s>u?s*s*s:i*(s-c)}function d(s){return 255*(s<=.0031308?12.92*s:1.055*Math.pow(s,.4166666666666667)-.055)}function h(s){return(s/=255)<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4)}function m(s){var p=h(s.r),w=h(s.g),A=h(s.b),k=r((.4124564*p+.3575761*w+.1804375*A)/b),v=r((.2126729*p+.7151522*w+.072175*A)/g);return{l:116*v-16,a:500*(k-v),b:200*(v-r((.0193339*p+.119192*w+.9503041*A)/f)),alpha:s.a}}function S(s){var p=(s.l+16)/116,w=isNaN(s.a)?p:p+s.a/500,A=isNaN(s.b)?p:p-s.b/200;return p=g*l(p),w=b*l(w),A=f*l(A),new _(d(3.2404542*w-1.5371385*p-.4985314*A),d(-.969266*w+1.8760108*p+.041556*A),d(.0556434*w-.2040259*p+1.0572252*A),s.alpha)}function y(s,p,w){var A=p-s;return s+w*(A>180||A<-180?A-360*Math.round(A/360):A)}O.exports={lab:{forward:m,reverse:S,interpolate:function(s,p,w){return{l:e(s.l,p.l,w),a:e(s.a,p.a,w),b:e(s.b,p.b,w),alpha:e(s.alpha,p.alpha,w)}}},hcl:{forward:function(s){var p=m(s),w=p.l,A=p.a,k=p.b,v=Math.atan2(k,A)*t;return{h:v<0?v+360:v,c:Math.sqrt(A*A+k*k),l:w,alpha:s.a}},reverse:function(s){var p=s.h*n,w=s.c;return S({l:s.l,a:Math.cos(p)*w,b:Math.sin(p)*w,alpha:s.alpha})},interpolate:function(s,p,w){return{h:y(s.h,p.h,w),c:e(s.c,p.c,w),l:e(s.l,p.l,w),alpha:e(s.alpha,p.alpha,w)}}}}},function(O,D,o){var _=o(17),e=o(7);O.exports=function(b){var g=b.value,f=b.key,c=_(g);return c!=="boolean"?[new e(f,g,"boolean expected, ".concat(c," found"))]:[]}},function(O,D,o){var _=o(7),e=o(17),b=o(80).parseCSSColor;O.exports=function(g){var f=g.key,c=g.value,u=e(c);return u!=="string"?[new _(f,c,"color expected, ".concat(u," found"))]:b(c)===null?[new _(f,c,'color expected, "'.concat(c,'" found'))]:[]}},function(O,D,o){var _=o(7),e=o(101);O.exports=function(b){var g=b.value,f=b.key,c=e(b);return c.length||(g.indexOf("{fontstack}")===-1&&c.push(new _(f,g,'"glyphs" url must include a "{fontstack}" token')),g.indexOf("{range}")===-1&&c.push(new _(f,g,'"glyphs" url must include a "{range}" token'))),c}},function(O,D,o){function _(m){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S})(m)}function e(m,S){for(var y=0;y<S.length;y++){var s=S[y];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(m,s.key,s)}}function b(m,S){return!S||_(S)!=="object"&&typeof S!="function"?function(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}(m):S}function g(m){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)})(m)}function f(m,S){return(f=Object.setPrototypeOf||function(y,s){return y.__proto__=s,y})(m,S)}var c=o(19),u=o(103),i=o(44).multiPolygonIntersectsBufferedMultiPoint,a=o(47),n=a.getMaximumPaintValue,t=a.translateDistance,r=a.translate,l=o(154),d=o(4),h=(d.Transitionable,d.Transitioning,d.PossiblyEvaluated,function(m){function S(w){return function(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}(this,S),b(this,g(S).call(this,w,l))}var y,s,p;return function(w,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(A&&A.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),A&&f(w,A)}(S,c),y=S,(s=[{key:"createBucket",value:function(w){return new u(w)}},{key:"queryRadius",value:function(w){var A=w;return n("circle-radius",this,A)+n("circle-stroke-width",this,A)+t(this.paint.get("circle-translate"))}},{key:"queryIntersectsFeature",value:function(w,A,k,v,x,T){var E=r(w,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),x,T),C=this.paint.get("circle-radius").evaluate(A)*T,z=this.paint.get("circle-stroke-width").evaluate(A)*T;return i(E,k,C+z)}}])&&e(y.prototype,s),p&&e(y,p),S}());O.exports=h},function(O,D,o){var _=o(23).createLayout;O.exports=_([{name:"a_pos",components:2,type:"Int16"}],4)},function(O,D,o){var _=o(0);D.packUint8ToFloat=function(e,b){return 256*(e=_.clamp(Math.floor(e),0,255))+(b=_.clamp(Math.floor(b),0,255))}},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=e.DataDrivenProperty,c=(e.CrossFadedProperty,e.HeatmapColorProperty,new b({"circle-radius":new f(_.paint_circle["circle-radius"]),"circle-color":new f(_.paint_circle["circle-color"]),"circle-blur":new f(_.paint_circle["circle-blur"]),"circle-opacity":new f(_.paint_circle["circle-opacity"]),"circle-translate":new g(_.paint_circle["circle-translate"]),"circle-translate-anchor":new g(_.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new g(_.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new g(_.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new f(_.paint_circle["circle-stroke-width"]),"circle-stroke-color":new f(_.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new f(_.paint_circle["circle-stroke-opacity"])}));O.exports={paint:c}},function(O,D,o){function _(d){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}function e(d,h){return!h||_(h)!=="object"&&typeof h!="function"?function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}(d):h}function b(d,h,m){return(b=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(S,y,s){var p=function(A,k){for(;!Object.prototype.hasOwnProperty.call(A,k)&&(A=g(A))!==null;);return A}(S,y);if(p){var w=Object.getOwnPropertyDescriptor(p,y);return w.get?w.get.call(s):w.value}})(d,h,m||d)}function g(d){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)})(d)}function f(d,h){for(var m=0;m<h.length;m++){var S=h[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}function c(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}function u(d,h){return(u=Object.setPrototypeOf||function(m,S){return m.__proto__=S,m})(d,h)}var i=o(19),a=o(156),n=o(33).RGBAImage,t=o(157),r=o(4),l=(r.Transitionable,r.Transitioning,r.PossiblyEvaluated,function(d){function h(m){var S;return function(y,s){if(!(y instanceof s))throw new TypeError("Cannot call a class as a function")}(this,h),(S=e(this,g(h).call(this,m,t)))._updateColorRamp(),S}return function(m,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(S&&S.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),S&&u(m,S)}(h,i),c(h,[{key:"createBucket",value:function(m){return new a(m)}}]),c(h,[{key:"setPaintProperty",value:function(m,S,y){b(g(h.prototype),"setPaintProperty",this).call(this,m,S,y),m==="heatmap-color"&&this._updateColorRamp()}},{key:"_updateColorRamp",value:function(){for(var m=this._transitionablePaint._values["heatmap-color"].value.expression,S=new Uint8Array(1024),y=S.length,s=4;s<y;s+=4){var p=m.evaluate({heatmapDensity:s/y});S[s+0]=Math.floor(255*p.r/p.a),S[s+1]=Math.floor(255*p.g/p.a),S[s+2]=Math.floor(255*p.b/p.a),S[s+3]=Math.floor(255*p.a)}this.colorRamp=new n({width:256,height:1},S),this.colorRampTexture=null}},{key:"resize",value:function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return!1}},{key:"hasOffscreenPass",value:function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}]),h}());O.exports=l},function(O,D,o){function _(i){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(i)}function e(i,a){return!a||_(a)!=="object"&&typeof a!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(i):a}function b(i){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(i)}function g(i,a){return(g=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(i,a)}var f=o(103),c=o(11).register,u=function(i){function a(){return function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),e(this,b(a).apply(this,arguments))}return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&g(n,t)}(a,f),a}();c("HeatmapBucket",u,{omit:["layers"]}),O.exports=u},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=e.DataDrivenProperty,c=(e.CrossFadedProperty,e.HeatmapColorProperty),u=new b({"heatmap-radius":new f(_.paint_heatmap["heatmap-radius"]),"heatmap-weight":new f(_.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new g(_.paint_heatmap["heatmap-intensity"]),"heatmap-color":new c(_.paint_heatmap["heatmap-color"]),"heatmap-opacity":new g(_.paint_heatmap["heatmap-opacity"])});O.exports={paint:u}},function(O,D,o){function _(n){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function e(n,t){for(var r=0;r<t.length;r++){var l=t[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function b(n,t){return!t||_(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(n):t}function g(n){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}function f(n,t){return(f=Object.setPrototypeOf||function(r,l){return r.__proto__=l,r})(n,t)}var c=o(19),u=o(159),i=o(4),a=(i.Transitionable,i.Transitioning,i.PossiblyEvaluated,function(n){function t(h){return function(m,S){if(!(m instanceof S))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,g(t).call(this,h,u))}var r,l,d;return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(m&&m.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),m&&f(h,m)}(t,c),r=t,(l=[{key:"hasOffscreenPass",value:function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}])&&e(r.prototype,l),d&&e(r,d),t}());O.exports=a},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=(e.DataDrivenProperty,e.CrossFadedProperty,e.HeatmapColorProperty,new b({"hillshade-illumination-direction":new g(_.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new g(_.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new g(_.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new g(_.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new g(_.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new g(_.paint_hillshade["hillshade-accent-color"])}));O.exports={paint:f}},function(O,D,o){function _(h){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(h)}function e(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function b(h,m){return!m||_(m)!=="object"&&typeof m!="function"?function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}(h):m}function g(h){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)})(h)}function f(h,m){return(f=Object.setPrototypeOf||function(S,y){return S.__proto__=y,S})(h,m)}var c=o(19),u=o(161),i=o(44).multiPolygonIntersectsMultiPolygon,a=o(47),n=a.translateDistance,t=a.translate,r=o(164),l=o(4),d=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(h){function m(p){return function(w,A){if(!(w instanceof A))throw new TypeError("Cannot call a class as a function")}(this,m),b(this,g(m).call(this,p,r))}var S,y,s;return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(w&&w.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),w&&f(p,w)}(m,c),S=m,(y=[{key:"recalculate",value:function(p){this.paint=this._transitioningPaint.possiblyEvaluate(p),this._transitionablePaint.getValue("fill-outline-color")===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}},{key:"createBucket",value:function(p){return new u(p)}},{key:"queryRadius",value:function(){return n(this.paint.get("fill-translate"))}},{key:"queryIntersectsFeature",value:function(p,w,A,k,v,x){var T=t(p,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),v,x);return i(T,A)}}])&&e(S.prototype,y),s&&e(S,s),m}());O.exports=d},function(O,D,o){function _(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}var e=o(14).FillLayoutArray,b=o(162).members,g=o(36).SegmentVector,f=o(32).ProgramConfigurationSet,c=o(37),u=c.LineIndexArray,i=c.TriangleIndexArray,a=o(38),n=o(104),t=o(105),r=o(1),l=o(11).register,d=function(){function h(s){(function(p,w){if(!(p instanceof w))throw new TypeError("Cannot call a class as a function")})(this,h),this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(p){return p.id}),this.index=s.index,this.layoutVertexArray=new e,this.indexArray=new i,this.indexArray2=new u,this.programConfigurations=new f(b,s.layers,s.zoom),this.segments=new g,this.segments2=new g}var m,S,y;return m=h,(S=[{key:"populate",value:function(s,p){var w=!0,A=!1,k=void 0;try{for(var v,x=s[Symbol.iterator]();!(w=(v=x.next()).done);w=!0){var T=v.value,E=T.feature,C=T.index,z=T.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},E)){var P=a(E);this.addFeature(E,P),p.featureIndex.insert(E,P,C,z,this.index)}}}catch(B){A=!0,k=B}finally{try{w||x.return==null||x.return()}finally{if(A)throw k}}}},{key:"isEmpty",value:function(){return this.layoutVertexArray.length===0}},{key:"upload",value:function(s){this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,b),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.indexBuffer2=s.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(s)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}},{key:"addFeature",value:function(s,p){var w=!0,A=!1,k=void 0;try{for(var v,x=t(p,500)[Symbol.iterator]();!(w=(v=x.next()).done);w=!0){var T=v.value,E=0,C=!0,z=!1,P=void 0;try{for(var B,F=T[Symbol.iterator]();!(C=(B=F.next()).done);C=!0)E+=B.value.length}catch(H){z=!0,P=H}finally{try{C||F.return==null||F.return()}finally{if(z)throw P}}var Z=this.segments.prepareSegment(E,this.layoutVertexArray,this.indexArray),W=Z.vertexLength,J=[],X=[],R=!0,U=!1,K=void 0;try{for(var q,L=T[Symbol.iterator]();!(R=(q=L.next()).done);R=!0){var I=q.value;if(I.length!==0){I!==T[0]&&X.push(J.length/2);var j=this.segments2.prepareSegment(I.length,this.layoutVertexArray,this.indexArray2),M=j.vertexLength;this.layoutVertexArray.emplaceBack(I[0].x,I[0].y),this.indexArray2.emplaceBack(M+I.length-1,M),J.push(I[0].x),J.push(I[0].y);for(var N=1;N<I.length;N++)this.layoutVertexArray.emplaceBack(I[N].x,I[N].y),this.indexArray2.emplaceBack(M+N-1,M+N),J.push(I[N].x),J.push(I[N].y);j.vertexLength+=I.length,j.primitiveLength+=I.length}}}catch(H){U=!0,K=H}finally{try{R||L.return==null||L.return()}finally{if(U)throw K}}var V=n(J,X);r(V.length%3==0);for(var G=0;G<V.length;G+=3)this.indexArray.emplaceBack(W+V[G],W+V[G+1],W+V[G+2]);Z.vertexLength+=E,Z.primitiveLength+=V.length/3}}catch(H){A=!0,k=H}finally{try{w||x.return==null||x.return()}finally{if(A)throw k}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s)}}])&&_(m.prototype,S),y&&_(m,y),h}();l("FillBucket",d,{omit:["layers"]}),O.exports=d},function(O,D,o){var _=o(23).createLayout;O.exports=_([{name:"a_pos",components:2,type:"Int16"}],4)},function(O,D,o){O.exports=function(){"use strict";function _(b,g,f){var c=b[g];b[g]=b[f],b[f]=c}function e(b,g){return b<g?-1:b>g?1:0}return function(b,g,f,c,u){(function i(a,n,t,r,l){for(;r>t;){if(r-t>600){var d=r-t+1,h=n-t+1,m=Math.log(d),S=.5*Math.exp(2*m/3),y=.5*Math.sqrt(m*S*(d-S)/d)*(h-d/2<0?-1:1),s=Math.max(t,Math.floor(n-h*S/d+y)),p=Math.min(r,Math.floor(n+(d-h)*S/d+y));i(a,n,s,p,l)}var w=a[n],A=t,k=r;for(_(a,t,n),l(a[r],w)>0&&_(a,t,r);A<k;){for(_(a,A,k),A++,k--;l(a[A],w)<0;)A++;for(;l(a[k],w)>0;)k--}l(a[t],w)===0?_(a,t,k):_(a,++k,r),k<=n&&(t=k+1),n<=k&&(r=k-1)}})(b,g,f||0,c||b.length-1,u||e)}}()},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=e.DataDrivenProperty,c=e.CrossFadedProperty,u=(e.HeatmapColorProperty,new b({"fill-antialias":new g(_.paint_fill["fill-antialias"]),"fill-opacity":new f(_.paint_fill["fill-opacity"]),"fill-color":new f(_.paint_fill["fill-color"]),"fill-outline-color":new f(_.paint_fill["fill-outline-color"]),"fill-translate":new g(_.paint_fill["fill-translate"]),"fill-translate-anchor":new g(_.paint_fill["fill-translate-anchor"]),"fill-pattern":new c(_.paint_fill["fill-pattern"])}));O.exports={paint:u}},function(O,D,o){function _(h){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(h)}function e(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function b(h,m){return!m||_(m)!=="object"&&typeof m!="function"?function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}(h):m}function g(h){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)})(h)}function f(h,m){return(f=Object.setPrototypeOf||function(S,y){return S.__proto__=y,S})(h,m)}var c=o(19),u=o(166),i=o(44).multiPolygonIntersectsMultiPolygon,a=o(47),n=a.translateDistance,t=a.translate,r=o(168),l=o(4),d=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(h){function m(p){return function(w,A){if(!(w instanceof A))throw new TypeError("Cannot call a class as a function")}(this,m),b(this,g(m).call(this,p,r))}var S,y,s;return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(w&&w.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),w&&f(p,w)}(m,c),S=m,(y=[{key:"createBucket",value:function(p){return new u(p)}},{key:"queryRadius",value:function(){return n(this.paint.get("fill-extrusion-translate"))}},{key:"queryIntersectsFeature",value:function(p,w,A,k,v,x){var T=t(p,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),v,x);return i(T,A)}},{key:"hasOffscreenPass",value:function(){return this.paint.get("fill-extrusion-opacity")!==0&&this.visibility!=="none"}},{key:"resize",value:function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)}}])&&e(S.prototype,y),s&&e(S,s),m}());O.exports=d},function(O,D,o){function _(p,w){for(var A=0;A<w.length;A++){var k=w[A];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(p,k.key,k)}}var e=o(14).FillExtrusionLayoutArray,b=o(167).members,g=o(36),f=g.SegmentVector,c=g.MAX_VERTEX_ARRAY_LENGTH,u=o(32).ProgramConfigurationSet,i=o(37).TriangleIndexArray,a=o(38),n=o(6),t=o(104),r=o(105),l=o(1),d=o(11).register,h=Math.pow(2,13);function m(p,w,A,k,v,x,T,E){p.emplaceBack(w,A,2*Math.floor(k*h)+T,v*h*2,x*h*2,Math.round(E))}var S=function(){function p(v){(function(x,T){if(!(x instanceof T))throw new TypeError("Cannot call a class as a function")})(this,p),this.zoom=v.zoom,this.overscaling=v.overscaling,this.layers=v.layers,this.layerIds=this.layers.map(function(x){return x.id}),this.index=v.index,this.layoutVertexArray=new e,this.indexArray=new i,this.programConfigurations=new u(b,v.layers,v.zoom),this.segments=new f}var w,A,k;return w=p,(A=[{key:"populate",value:function(v,x){var T=!0,E=!1,C=void 0;try{for(var z,P=v[Symbol.iterator]();!(T=(z=P.next()).done);T=!0){var B=z.value,F=B.feature,Z=B.index,W=B.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},F)){var J=a(F);this.addFeature(F,J),x.featureIndex.insert(F,J,Z,W,this.index)}}}catch(X){E=!0,C=X}finally{try{T||P.return==null||P.return()}finally{if(E)throw C}}}},{key:"isEmpty",value:function(){return this.layoutVertexArray.length===0}},{key:"upload",value:function(v){this.layoutVertexBuffer=v.createVertexBuffer(this.layoutVertexArray,b),this.indexBuffer=v.createIndexBuffer(this.indexArray),this.programConfigurations.upload(v)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(v,x){var T=!0,E=!1,C=void 0;try{for(var z,P=r(x,500)[Symbol.iterator]();!(T=(z=P.next()).done);T=!0){var B=z.value,F=0,Z=!0,W=!1,J=void 0;try{for(var X,R=B[Symbol.iterator]();!(Z=(X=R.next()).done);Z=!0)F+=X.value.length}catch(ht){W=!0,J=ht}finally{try{Z||R.return==null||R.return()}finally{if(W)throw J}}var U=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),K=!0,q=!1,L=void 0;try{for(var I,j=B[Symbol.iterator]();!(K=(I=j.next()).done);K=!0){var M=I.value;if(M.length!==0&&!s(M))for(var N=0,V=0;V<M.length;V++){var G=M[V];if(V>=1){var H=M[V-1];if(!y(G,H)){U.vertexLength+4>c&&(U=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Y=G.sub(H)._perp()._unit(),$=H.dist(G);N+$>32768&&(N=0),m(this.layoutVertexArray,G.x,G.y,Y.x,Y.y,0,0,N),m(this.layoutVertexArray,G.x,G.y,Y.x,Y.y,0,1,N),N+=$,m(this.layoutVertexArray,H.x,H.y,Y.x,Y.y,0,0,N),m(this.layoutVertexArray,H.x,H.y,Y.x,Y.y,0,1,N);var Q=U.vertexLength;this.indexArray.emplaceBack(Q,Q+1,Q+2),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),U.vertexLength+=4,U.primitiveLength+=2}}}}}catch(ht){q=!0,L=ht}finally{try{K||j.return==null||j.return()}finally{if(q)throw L}}U.vertexLength+F>c&&(U=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray));var tt=[],et=[],nt=U.vertexLength,ot=!0,it=!1,at=void 0;try{for(var st,rt=B[Symbol.iterator]();!(ot=(st=rt.next()).done);ot=!0){var lt=st.value;if(lt.length!==0){lt!==B[0]&&et.push(tt.length/2);for(var ct=0;ct<lt.length;ct++){var ut=lt[ct];m(this.layoutVertexArray,ut.x,ut.y,0,0,1,1,0),tt.push(ut.x),tt.push(ut.y)}}}}catch(ht){it=!0,at=ht}finally{try{ot||rt.return==null||rt.return()}finally{if(it)throw at}}var pt=t(tt,et);l(pt.length%3==0);for(var ft=0;ft<pt.length;ft+=3)this.indexArray.emplaceBack(nt+pt[ft],nt+pt[ft+1],nt+pt[ft+2]);U.primitiveLength+=pt.length/3,U.vertexLength+=F}}catch(ht){E=!0,C=ht}finally{try{T||P.return==null||P.return()}finally{if(E)throw C}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,v)}}])&&_(w.prototype,A),k&&_(w,k),p}();function y(p,w){return p.x===w.x&&(p.x<0||p.x>n)||p.y===w.y&&(p.y<0||p.y>n)}function s(p){return p.every(function(w){return w.x<0})||p.every(function(w){return w.x>n})||p.every(function(w){return w.y<0})||p.every(function(w){return w.y>n})}d("FillExtrusionBucket",S,{omit:["layers"]}),O.exports=S},function(O,D,o){var _=o(23).createLayout;O.exports=_([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4)},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=e.DataDrivenProperty,c=e.CrossFadedProperty,u=(e.HeatmapColorProperty,new b({"fill-extrusion-opacity":new g(_["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new f(_["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new g(_["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new g(_["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new c(_["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new f(_["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new f(_["paint_fill-extrusion"]["fill-extrusion-base"])}));O.exports={paint:u}},function(O,D,o){function _(T){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(T)}function e(T,E){if(!(T instanceof E))throw new TypeError("Cannot call a class as a function")}function b(T,E){for(var C=0;C<E.length;C++){var z=E[C];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,z.key,z)}}function g(T,E,C){return E&&b(T.prototype,E),C&&b(T,C),T}function f(T,E){return!E||_(E)!=="object"&&typeof E!="function"?function(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}(T):E}function c(T,E,C){return(c=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(z,P,B){var F=function(W,J){for(;!Object.prototype.hasOwnProperty.call(W,J)&&(W=u(W))!==null;);return W}(z,P);if(F){var Z=Object.getOwnPropertyDescriptor(F,P);return Z.get?Z.get.call(B):Z.value}})(T,E,C||T)}function u(T){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(T)}function i(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),E&&a(T,E)}function a(T,E){return(a=Object.setPrototypeOf||function(C,z){return C.__proto__=z,C})(T,E)}var n=o(3),t=o(19),r=o(170),l=o(44).multiPolygonIntersectsBufferedMultiLine,d=o(47),h=d.getMaximumPaintValue,m=d.translateDistance,S=d.translate,y=o(173),s=o(0).extend,p=o(61),w=o(4),A=(w.Transitionable,w.Transitioning,w.Layout,w.PossiblyEvaluated,w.DataDrivenProperty),k=new(function(T){function E(){return e(this,E),f(this,u(E).apply(this,arguments))}return i(E,A),g(E,[{key:"possiblyEvaluate",value:function(C,z){return z=new p(Math.floor(z.zoom),{now:z.now,fadeDuration:z.fadeDuration,zoomHistory:z.zoomHistory,transition:z.transition}),c(u(E.prototype),"possiblyEvaluate",this).call(this,C,z)}},{key:"evaluate",value:function(C,z,P){return z=s({},z,{zoom:Math.floor(z.zoom)}),c(u(E.prototype),"evaluate",this).call(this,C,z,P)}}]),E}())(y.paint.properties["line-width"].specification);k.useIntegerZoom=!0;var v=function(T){function E(C){return e(this,E),f(this,u(E).call(this,C,y))}return i(E,t),g(E,[{key:"recalculate",value:function(C){c(u(E.prototype),"recalculate",this).call(this,C),this.paint._values["line-floorwidth"]=k.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,C)}},{key:"createBucket",value:function(C){return new r(C)}},{key:"queryRadius",value:function(C){var z=C,P=x(h("line-width",this,z),h("line-gap-width",this,z)),B=h("line-offset",this,z);return P/2+Math.abs(B)+m(this.paint.get("line-translate"))}},{key:"queryIntersectsFeature",value:function(C,z,P,B,F,Z){var W=S(C,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),F,Z),J=Z/2*x(this.paint.get("line-width").evaluate(z),this.paint.get("line-gap-width").evaluate(z)),X=this.paint.get("line-offset").evaluate(z);return X&&(P=function(R,U){for(var K=[],q=new n(0,0),L=0;L<R.length;L++){for(var I=R[L],j=[],M=0;M<I.length;M++){var N=I[M-1],V=I[M],G=I[M+1],H=M===0?q:V.sub(N)._unit()._perp(),Y=M===I.length-1?q:G.sub(V)._unit()._perp(),$=H._add(Y)._unit(),Q=$.x*Y.x+$.y*Y.y;$._mult(1/Q),j.push($._mult(U)._add(V))}K.push(j)}return K}(P,X*Z)),l(W,P,J)}}]),E}();function x(T,E){return E>0?E+2*T:T}O.exports=v},function(O,D,o){function _(S,y){for(var s=0;s<y.length;s++){var p=y[s];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(S,p.key,p)}}var e=o(14).LineLayoutArray,b=o(171).members,g=o(36).SegmentVector,f=o(32).ProgramConfigurationSet,c=o(37).TriangleIndexArray,u=o(38),i=o(6),a=o(48).VectorTileFeature.types,n=o(11).register,t=63,r=Math.cos(Math.PI/180*37.5),l=.5,d=Math.pow(2,14)/l;function h(S,y,s,p,w,A,k){S.emplaceBack(y.x,y.y,p?1:0,w?1:-1,Math.round(t*s.x)+128,Math.round(t*s.y)+128,1+(A===0?0:A<0?-1:1)|(k*l&63)<<2,k*l>>6)}var m=function(){function S(w){(function(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")})(this,S),this.zoom=w.zoom,this.overscaling=w.overscaling,this.layers=w.layers,this.layerIds=this.layers.map(function(A){return A.id}),this.index=w.index,this.layoutVertexArray=new e,this.indexArray=new c,this.programConfigurations=new f(b,w.layers,w.zoom),this.segments=new g}var y,s,p;return y=S,(s=[{key:"populate",value:function(w,A){var k=!0,v=!1,x=void 0;try{for(var T,E=w[Symbol.iterator]();!(k=(T=E.next()).done);k=!0){var C=T.value,z=C.feature,P=C.index,B=C.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},z)){var F=u(z);this.addFeature(z,F),A.featureIndex.insert(z,F,P,B,this.index)}}}catch(Z){v=!0,x=Z}finally{try{k||E.return==null||E.return()}finally{if(v)throw x}}}},{key:"isEmpty",value:function(){return this.layoutVertexArray.length===0}},{key:"upload",value:function(w){this.layoutVertexBuffer=w.createVertexBuffer(this.layoutVertexArray,b),this.indexBuffer=w.createIndexBuffer(this.indexArray),this.programConfigurations.upload(w)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(w,A){var k=this.layers[0].layout,v=k.get("line-join").evaluate(w),x=k.get("line-cap"),T=k.get("line-miter-limit"),E=k.get("line-round-limit"),C=!0,z=!1,P=void 0;try{for(var B,F=A[Symbol.iterator]();!(C=(B=F.next()).done);C=!0){var Z=B.value;this.addLine(Z,w,v,x,T,E)}}catch(W){z=!0,P=W}finally{try{C||F.return==null||F.return()}finally{if(z)throw P}}}},{key:"addLine",value:function(w,A,k,v,x,T){for(var E=a[A.type]==="Polygon",C=w.length;C>=2&&w[C-1].equals(w[C-2]);)C--;for(var z=0;z<C-1&&w[z].equals(w[z+1]);)z++;if(!(C<(E?3:2))){k==="bevel"&&(x=1.05);var P=i/(512*this.overscaling)*15,B=w[z],F=this.segments.prepareSegment(10*C,this.layoutVertexArray,this.indexArray);this.distance=0;var Z,W,J,X=v,R=E?"butt":v,U=!0,K=void 0,q=void 0,L=void 0,I=void 0;this.e1=this.e2=this.e3=-1,E&&(Z=w[C-2],I=B.sub(Z)._unit()._perp());for(var j=z;j<C;j++)if(!(q=E&&j===C-1?w[z+1]:w[j+1])||!w[j].equals(q)){I&&(L=I),Z&&(K=Z),Z=w[j],I=q?q.sub(Z)._unit()._perp():L;var M=(L=L||I).add(I);M.x===0&&M.y===0||M._unit();var N=M.x*I.x+M.y*I.y,V=N!==0?1/N:1/0,G=N<r&&K&&q;if(G&&j>z){var H=Z.dist(K);if(H>2*P){var Y=Z.sub(Z.sub(K)._mult(P/H)._round());this.distance+=Y.dist(K),this.addCurrentVertex(Y,this.distance,L.mult(1),0,0,!1,F),K=Y}}var $=K&&q,Q=$?k:q?X:R;if($&&Q==="round"&&(V<T?Q="miter":V<=2&&(Q="fakeround")),Q==="miter"&&V>x&&(Q="bevel"),Q==="bevel"&&(V>2&&(Q="flipbevel"),V<x&&(Q="miter")),K&&(this.distance+=Z.dist(K)),Q==="miter")M._mult(V),this.addCurrentVertex(Z,this.distance,M,0,0,!1,F);else if(Q==="flipbevel"){if(V>100)M=I.clone().mult(-1);else{var tt=L.x*I.y-L.y*I.x>0?-1:1,et=V*L.add(I).mag()/L.sub(I).mag();M._perp()._mult(et*tt)}this.addCurrentVertex(Z,this.distance,M,0,0,!1,F),this.addCurrentVertex(Z,this.distance,M.mult(-1),0,0,!1,F)}else if(Q==="bevel"||Q==="fakeround"){var nt=L.x*I.y-L.y*I.x>0,ot=-Math.sqrt(V*V-1);if(nt?(J=0,W=ot):(W=0,J=ot),U||this.addCurrentVertex(Z,this.distance,L,W,J,!1,F),Q==="fakeround"){for(var it=Math.floor(8*(.5-(N-.5))),at=void 0,st=0;st<it;st++)at=I.mult((st+1)/(it+1))._add(L)._unit(),this.addPieSliceVertex(Z,this.distance,at,nt,F);this.addPieSliceVertex(Z,this.distance,M,nt,F);for(var rt=it-1;rt>=0;rt--)at=L.mult((rt+1)/(it+1))._add(I)._unit(),this.addPieSliceVertex(Z,this.distance,at,nt,F)}q&&this.addCurrentVertex(Z,this.distance,I,-W,-J,!1,F)}else Q==="butt"?(U||this.addCurrentVertex(Z,this.distance,L,0,0,!1,F),q&&this.addCurrentVertex(Z,this.distance,I,0,0,!1,F)):Q==="square"?(U||(this.addCurrentVertex(Z,this.distance,L,1,1,!1,F),this.e1=this.e2=-1),q&&this.addCurrentVertex(Z,this.distance,I,-1,-1,!1,F)):Q==="round"&&(U||(this.addCurrentVertex(Z,this.distance,L,0,0,!1,F),this.addCurrentVertex(Z,this.distance,L,1,1,!0,F),this.e1=this.e2=-1),q&&(this.addCurrentVertex(Z,this.distance,I,-1,-1,!0,F),this.addCurrentVertex(Z,this.distance,I,0,0,!1,F)));if(G&&j<C-1){var lt=Z.dist(q);if(lt>2*P){var ct=Z.add(q.sub(Z)._mult(P/lt)._round());this.distance+=ct.dist(Z),this.addCurrentVertex(ct,this.distance,I.mult(1),0,0,!1,F),Z=ct}}U=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A)}}},{key:"addCurrentVertex",value:function(w,A,k,v,x,T,E){var C,z=this.layoutVertexArray,P=this.indexArray;C=k.clone(),v&&C._sub(k.perp()._mult(v)),h(z,w,C,T,!1,v,A),this.e3=E.vertexLength++,this.e1>=0&&this.e2>=0&&(P.emplaceBack(this.e1,this.e2,this.e3),E.primitiveLength++),this.e1=this.e2,this.e2=this.e3,C=k.mult(-1),x&&C._sub(k.perp()._mult(x)),h(z,w,C,T,!0,-x,A),this.e3=E.vertexLength++,this.e1>=0&&this.e2>=0&&(P.emplaceBack(this.e1,this.e2,this.e3),E.primitiveLength++),this.e1=this.e2,this.e2=this.e3,A>d/2&&(this.distance=0,this.addCurrentVertex(w,this.distance,k,v,x,T,E))}},{key:"addPieSliceVertex",value:function(w,A,k,v,x){k=k.mult(v?-1:1);var T=this.layoutVertexArray,E=this.indexArray;h(T,w,k,!1,v,0,A),this.e3=x.vertexLength++,this.e1>=0&&this.e2>=0&&(E.emplaceBack(this.e1,this.e2,this.e3),x.primitiveLength++),v?this.e2=this.e3:this.e1=this.e3}}])&&_(y.prototype,s),p&&_(y,p),S}();n("LineBucket",m,{omit:["layers"]}),O.exports=m},function(O,D,o){var _=o(23).createLayout;O.exports=_([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4)},function(O,D,o){"use strict";var _=o(106);function e(b,g,f){if(b===3){var c=new _(f,f.readVarint()+f.pos);c.length&&(g[c.name]=c)}}O.exports=function(b,g){this.layers=b.readFields(e,{},g)}},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=e.DataDrivenProperty,c=e.CrossFadedProperty,u=(e.HeatmapColorProperty,new b({"line-cap":new g(_.layout_line["line-cap"]),"line-join":new f(_.layout_line["line-join"]),"line-miter-limit":new g(_.layout_line["line-miter-limit"]),"line-round-limit":new g(_.layout_line["line-round-limit"])})),i=new b({"line-opacity":new f(_.paint_line["line-opacity"]),"line-color":new f(_.paint_line["line-color"]),"line-translate":new g(_.paint_line["line-translate"]),"line-translate-anchor":new g(_.paint_line["line-translate-anchor"]),"line-width":new f(_.paint_line["line-width"]),"line-gap-width":new f(_.paint_line["line-gap-width"]),"line-offset":new f(_.paint_line["line-offset"]),"line-blur":new f(_.paint_line["line-blur"]),"line-dasharray":new c(_.paint_line["line-dasharray"]),"line-pattern":new c(_.paint_line["line-pattern"])});O.exports={paint:i,layout:u}},function(O,D,o){function _(h){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(h)}function e(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function b(h,m){return!m||_(m)!=="object"&&typeof m!="function"?function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}(h):m}function g(h,m,S){return(g=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(y,s,p){var w=function(k,v){for(;!Object.prototype.hasOwnProperty.call(k,v)&&(k=f(k))!==null;);return k}(y,s);if(w){var A=Object.getOwnPropertyDescriptor(w,s);return A.get?A.get.call(p):A.value}})(h,m,S||h)}function f(h){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)})(h)}function c(h,m){return(c=Object.setPrototypeOf||function(S,y){return S.__proto__=y,S})(h,m)}var u=o(19),i=o(62),a=o(179),n=o(30).isExpression,t=o(1),r=o(51),l=o(4),d=(l.Transitionable,l.Transitioning,l.Layout,l.PossiblyEvaluated,function(h){function m(p){return function(w,A){if(!(w instanceof A))throw new TypeError("Cannot call a class as a function")}(this,m),b(this,f(m).call(this,p,r))}var S,y,s;return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(w&&w.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),w&&c(p,w)}(m,u),S=m,(y=[{key:"recalculate",value:function(p){g(f(m.prototype),"recalculate",this).call(this,p),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="line"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="line"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))}},{key:"getValueAndResolveTokens",value:function(p,w){var A=this.layout.get(p).evaluate(w),k=this._unevaluatedLayout._values[p];return k.isDataDriven()||n(k.value)?A:a(w.properties,A)}},{key:"createBucket",value:function(p){return new i(p)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return t(!1),!1}}])&&e(S.prototype,y),s&&e(S,s),m}());O.exports=d},function(O,D,o){var _=o(23).createLayout,e={symbolLayoutAttributes:_([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),dynamicLayoutAttributes:_([{name:"a_projected_pos",components:3,type:"Float32"}],4),placementOpacityAttributes:_([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),collisionVertexAttributes:_([{name:"a_placed",components:2,type:"Uint8"}],4),collisionBox:_([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),collisionBoxLayout:_([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout:_([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),placement:_([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]),glyphOffset:_([{type:"Float32",name:"offsetX"}]),lineVertex:_([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}])};O.exports=e},function(O,D,o){var _=o(49);O.exports=function(e,b,g){var f=b.layout.get("text-transform").evaluate(g);return f==="uppercase"?e=e.toLocaleUpperCase():f==="lowercase"&&(e=e.toLocaleLowerCase()),_.applyArabicShaping&&(e=_.applyArabicShaping(e)),e}},function(O,D){O.exports=function(o){var _={},e={},b=[],g=0;function f(S){b.push(o[S]),g++}function c(S,y,s){var p=e[S];return delete e[S],e[y]=p,b[p].geometry[0].pop(),b[p].geometry[0]=b[p].geometry[0].concat(s[0]),p}function u(S,y,s){var p=_[y];return delete _[y],_[S]=p,b[p].geometry[0].shift(),b[p].geometry[0]=s[0].concat(b[p].geometry[0]),p}function i(S,y,s){var p=s?y[0][y[0].length-1]:y[0][0];return"".concat(S,":").concat(p.x,":").concat(p.y)}for(var a=0;a<o.length;a++){var n=o[a],t=n.geometry,r=n.text;if(r){var l=i(r,t),d=i(r,t,!0);if(l in e&&d in _&&e[l]!==_[d]){var h=u(l,d,t),m=c(l,d,b[h].geometry);delete _[l],delete e[d],e[i(r,b[m].geometry,!0)]=m,b[h].geometry=null}else l in e?c(l,d,t):d in _?u(l,d,t):(f(a),_[l]=g-1,e[d]=g-1)}else f(a)}return b.filter(function(S){return S.geometry})}},function(O,D,o){function _(a){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(a)}function e(a,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function b(a,n){return!n||_(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a):n}function g(a){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(a)}function f(a,n){return(f=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(a,n)}var c=o(3),u=o(11).register,i=function(a){function n(d,h,m,S){var y;return function(s,p){if(!(s instanceof p))throw new TypeError("Cannot call a class as a function")}(this,n),(y=b(this,g(n).call(this,d,h))).angle=m,S!==void 0&&(y.segment=S),y}var t,r,l;return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(h&&h.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),h&&f(d,h)}(n,c),t=n,(r=[{key:"clone",value:function(){return new n(this.x,this.y,this.angle,this.segment)}}])&&e(t.prototype,r),l&&e(t,l),n}();u("Anchor",i),O.exports=i},function(O,D){O.exports=function(o,_){return _.replace(/{([^{}]+)}/g,function(e,b){return b in o?String(o[b]):""}).replace(/FORMAT_NUMBER\(([^\)]+)\)/g,function(e,b){return function(g){g=g.split(",");var f=parseFloat(g[0]);return g[2]&&(f*=parseFloat(g[2])),f<1e3?Math.round(f):f<1e5?(f/1e3).toFixed(1)+"K":f<1e6?Math.round(f/1e3)+"K":f<1e9?(f/1e6).toFixed(2)+"M":f<1e12?(f=Math.round(f/1e6).toFixed(0)).slice(0,-3)+","+f.slice(-4,-1)+"M":"HUGE_NUM"}(b)})}},function(O,D,o){function _(a){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(a)}function e(a,n){return!n||_(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a):n}function b(a){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(a)}function g(a,n){return(g=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(a,n)}var f=o(19),c=o(181),u=o(4),i=(u.Transitionable,u.Transitioning,u.PossiblyEvaluated,function(a){function n(t){return function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),e(this,b(n).call(this,t,c))}return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&g(t,r)}(n,f),n}());O.exports=i},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=(e.DataDrivenProperty,e.CrossFadedProperty),c=(e.HeatmapColorProperty,new b({"background-color":new g(_.paint_background["background-color"]),"background-pattern":new f(_.paint_background["background-pattern"]),"background-opacity":new g(_.paint_background["background-opacity"])}));O.exports={paint:c}},function(O,D,o){function _(a){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(a)}function e(a,n){return!n||_(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a):n}function b(a){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(a)}function g(a,n){return(g=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(a,n)}var f=o(19),c=o(183),u=o(4),i=(u.Transitionable,u.Transitioning,u.PossiblyEvaluated,function(a){function n(t){return function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),e(this,b(n).call(this,t,c))}return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&g(t,r)}(n,f),n}());O.exports=i},function(O,D,o){var _=o(13),e=o(4),b=e.Properties,g=e.DataConstantProperty,f=(e.DataDrivenProperty,e.CrossFadedProperty,e.HeatmapColorProperty,new b({"raster-opacity":new g(_.paint_raster["raster-opacity"]),"raster-hue-rotate":new g(_.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new g(_.paint_raster["raster-brightness-min"]),"raster-brightness-max":new g(_.paint_raster["raster-brightness-max"]),"raster-saturation":new g(_.paint_raster["raster-saturation"]),"raster-contrast":new g(_.paint_raster["raster-contrast"]),"raster-fade-duration":new g(_.paint_raster["raster-fade-duration"])}));O.exports={paint:f}},function(O,D,o){var _=o(16),e=o(2),b=o(34).normalizeSpriteURL,g=o(33).RGBAImage;O.exports=function(f,c,u){var i,a,n,t=e.devicePixelRatio>1?"@2x":"";function r(){if(n)u(n);else if(i&&a){var l=e.getImageData(a),d={};for(var h in i){var m=i[h],S=m.width,y=m.height,s=m.x,p=m.y,w=m.sdf,A=m.pixelRatio,k=new g({width:S,height:y});g.copy(l,k,{x:s,y:p},{x:0,y:0},{width:S,height:y}),d[h]={data:k,pixelRatio:A,sdf:w}}u(null,d)}}_.getJSON(c(b(f,t,".json"),_.ResourceType.SpriteJSON),function(l,d){n||(n=l,i=d,r())}),_.getImage(c(b(f,t,".png"),_.ResourceType.SpriteImage),function(l,d){n||(n=l,a=d,r())})}},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(111),b=o(33).RGBAImage,g=o(186).imagePosition,f=o(20),c=o(1),u=function(){function i(){(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,i),this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new e(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new b({width:64,height:64}),this.dirty=!0}var a,n,t;return a=i,(n=[{key:"isLoaded",value:function(){return this.loaded}},{key:"setLoaded",value:function(r){if(this.loaded!==r&&(this.loaded=r,r)){var l=!0,d=!1,h=void 0;try{for(var m,S=this.requestors[Symbol.iterator]();!(l=(m=S.next()).done);l=!0){var y=m.value,s=y.ids,p=y.callback;this._notify(s,p)}}catch(w){d=!0,h=w}finally{try{l||S.return==null||S.return()}finally{if(d)throw h}}this.requestors=[]}}},{key:"getImage",value:function(r){return this.images[r]}},{key:"addImage",value:function(r,l){c(!this.images[r]),this.images[r]=l}},{key:"removeImage",value:function(r){c(this.images[r]),delete this.images[r];var l=this.patterns[r];l&&(this.shelfPack.unref(l.bin),delete this.patterns[r])}},{key:"getImages",value:function(r,l){var d=!0;if(!this.isLoaded()){var h=!0,m=!1,S=void 0;try{for(var y,s=r[Symbol.iterator]();!(h=(y=s.next()).done);h=!0){var p=y.value;this.images[p]||(d=!1)}}catch(w){m=!0,S=w}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}}this.isLoaded()||d?this._notify(r,l):this.requestors.push({ids:r,callback:l})}},{key:"_notify",value:function(r,l){var d={},h=!0,m=!1,S=void 0;try{for(var y,s=r[Symbol.iterator]();!(h=(y=s.next()).done);h=!0){var p=y.value,w=this.images[p];w&&(d[p]={data:w.data.clone(),pixelRatio:w.pixelRatio,sdf:w.sdf})}}catch(A){m=!0,S=A}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}l(null,d)}},{key:"getPixelSize",value:function(){return{width:this.shelfPack.w,height:this.shelfPack.h}}},{key:"getPattern",value:function(r){var l=this.patterns[r];if(l)return l.position;var d=this.getImage(r);if(!d)return null;var h=d.data.width+2,m=d.data.height+2,S=this.shelfPack.packOne(h,m);if(!S)return null;this.atlasImage.resize(this.getPixelSize());var y=d.data,s=this.atlasImage,p=S.x+1,w=S.y+1,A=y.width,k=y.height;b.copy(y,s,{x:0,y:0},{x:p,y:w},{width:A,height:k}),b.copy(y,s,{x:0,y:k-1},{x:p,y:w-1},{width:A,height:1}),b.copy(y,s,{x:0,y:0},{x:p,y:w+k},{width:A,height:1}),b.copy(y,s,{x:A-1,y:0},{x:p-1,y:w},{width:1,height:k}),b.copy(y,s,{x:0,y:0},{x:p+A,y:w},{width:1,height:k}),this.dirty=!0;var v=g(S,d);return this.patterns[r]={bin:S,position:v},v}},{key:"bind",value:function(r){var l=r.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new f(r,this.atlasImage,l.RGBA),this.atlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE)}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){var _=o(111),e=o(33).RGBAImage,b=1;function g(f,c){var u=c.pixelRatio,i={x:f.x+b,y:f.y+b,w:f.w-2*b,h:f.h-2*b};return{pixelRatio:u,textureRect:i,tl:[i.x,i.y],br:[i.x+i.w,i.y+i.h],displaySize:[i.w/u,i.h/u]}}O.exports={imagePosition:g,makeImageAtlas:function(f){var c=new e({width:0,height:0}),u={},i=new _(0,0,{autoResize:!0});for(var a in f){var n=f[a],t=i.packOne(n.data.width+2*b,n.data.height+2*b);c.resize({width:i.w,height:i.h}),e.copy(n.data,c,{x:0,y:0},{x:t.x+b,y:t.y+b},n.data),u[a]=g(t,n)}return i.shrink(),c.resize({width:i.w,height:i.h}),{image:c,positions:u}}}},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(188),b=o(191),g=o(109),f=o(0).asyncAll,c=o(33).AlphaImage,u=function(){function i(r,l){(function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")})(this,i),this.requestTransform=r,this.localIdeographFontFamily=l,this.entries={}}var a,n,t;return a=i,(n=[{key:"setURL",value:function(r){this.url=r}},{key:"getGlyphs",value:function(r,l){var d=this,h=[];for(var m in r){var S=!0,y=!1,s=void 0;try{for(var p,w=r[m][Symbol.iterator]();!(S=(p=w.next()).done);S=!0){var A=p.value;h.push({stack:m,id:A})}}catch(k){y=!0,s=k}finally{try{S||w.return==null||w.return()}finally{if(y)throw s}}}f(h,function(k,v){var x=k.stack,T=k.id,E=d.entries[x];E||(E=d.entries[x]={glyphs:{},requests:{}});var C=E.glyphs[T];if(C===void 0)if(C=d._tinySDF(E,x,T))v(null,{stack:x,id:T,glyph:C});else{var z=Math.floor(T/256);if(256*z>65535)v(new Error("glyphs > 65535 not supported"));else{var P=E.requests[z];P||(P=E.requests[z]=[],e(x,z,d.url,d.requestTransform,function(B,F){if(F)for(var Z in F)E.glyphs[+Z]=F[+Z];var W=!0,J=!1,X=void 0;try{for(var R,U=P[Symbol.iterator]();!(W=(R=U.next()).done);W=!0)(0,R.value)(B,F)}catch(K){J=!0,X=K}finally{try{W||U.return==null||U.return()}finally{if(J)throw X}}delete E.requests[z]})),P.push(function(B,F){B?v(B):F&&v(null,{stack:x,id:T,glyph:F[T]||null})})}}else v(null,{stack:x,id:T,glyph:C})},function(k,v){if(k)l(k);else if(v){var x={},T=!0,E=!1,C=void 0;try{for(var z,P=v[Symbol.iterator]();!(T=(z=P.next()).done);T=!0){var B=z.value,F=B.stack,Z=B.id,W=B.glyph;(x[F]||(x[F]={}))[Z]=W&&{id:W.id,bitmap:W.bitmap.clone(),metrics:W.metrics}}}catch(J){E=!0,C=J}finally{try{T||P.return==null||P.return()}finally{if(E)throw C}}l(null,x)}})}},{key:"_tinySDF",value:function(r,l,d){var h=this.localIdeographFontFamily;if(h&&(g["CJK Unified Ideographs"](d)||g["Hangul Syllables"](d))){var m=r.tinySDF;if(!m){var S="400";/bold/i.test(l)?S="900":/medium/i.test(l)?S="500":/light/i.test(l)&&(S="200"),m=r.tinySDF=new b(24,3,8,.25,h,S)}return{id:d,bitmap:new c({width:30,height:30},m.draw(String.fromCharCode(d))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){var _=o(34).normalizeGlyphsURL,e=o(16),b=o(189);O.exports=function(g,f,c,u,i){var a=256*f,n=a+255,t=u(_(c).replace("{fontstack}",g).replace("{range}","".concat(a,"-").concat(n)),e.ResourceType.Glyphs);e.getArrayBuffer(t,function(r,l){if(r)i(r);else if(l){var d={},h=!0,m=!1,S=void 0;try{for(var y,s=b(l.data)[Symbol.iterator]();!(h=(y=s.next()).done);h=!0){var p=y.value;d[p.id]=p}}catch(w){m=!0,S=w}finally{try{h||s.return==null||s.return()}finally{if(m)throw S}}i(null,d)}})}},function(O,D,o){var _=o(33).AlphaImage,e=o(65),b=3;function g(u,i,a){u===1&&a.readMessage(f,i)}function f(u,i,a){if(u===3){var n=a.readMessage(c,{}),t=n.id,r=n.bitmap,l=n.width,d=n.height,h=n.left,m=n.top,S=n.advance;i.push({id:t,bitmap:new _({width:l+2*b,height:d+2*b},r),metrics:{width:l,height:d,left:h,top:m,advance:S}})}}function c(u,i,a){u===1?i.id=a.readVarint():u===2?i.bitmap=a.readBytes():u===3?i.width=a.readVarint():u===4?i.height=a.readVarint():u===5?i.left=a.readSVarint():u===6?i.top=a.readSVarint():u===7&&(i.advance=a.readVarint())}O.exports=function(u){return new e(u).readFields(g,[])},O.exports.GLYPH_PBF_BORDER=b},function(O,D){D.read=function(o,_,e,b,g){var f,c,u=8*g-b-1,i=(1<<u)-1,a=i>>1,n=-7,t=e?g-1:0,r=e?-1:1,l=o[_+t];for(t+=r,f=l&(1<<-n)-1,l>>=-n,n+=u;n>0;f=256*f+o[_+t],t+=r,n-=8);for(c=f&(1<<-n)-1,f>>=-n,n+=b;n>0;c=256*c+o[_+t],t+=r,n-=8);if(f===0)f=1-a;else{if(f===i)return c?NaN:1/0*(l?-1:1);c+=Math.pow(2,b),f-=a}return(l?-1:1)*c*Math.pow(2,f-b)},D.write=function(o,_,e,b,g,f){var c,u,i,a=8*f-g-1,n=(1<<a)-1,t=n>>1,r=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=b?0:f-1,d=b?1:-1,h=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(u=isNaN(_)?1:0,c=n):(c=Math.floor(Math.log(_)/Math.LN2),_*(i=Math.pow(2,-c))<1&&(c--,i*=2),(_+=c+t>=1?r/i:r*Math.pow(2,1-t))*i>=2&&(c++,i/=2),c+t>=n?(u=0,c=n):c+t>=1?(u=(_*i-1)*Math.pow(2,g),c+=t):(u=_*Math.pow(2,t-1)*Math.pow(2,g),c=0));g>=8;o[e+l]=255&u,l+=d,u/=256,g-=8);for(c=c<<g|u,a+=g;a>0;o[e+l]=255&c,l+=d,c/=256,a-=8);o[e+l-d]|=128*h}},function(O,D,o){"use strict";O.exports=e,O.exports.default=e;var _=1e20;function e(f,c,u,i,a,n){this.fontSize=f||24,this.buffer=c===void 0?3:c,this.cutoff=i||.25,this.fontFamily=a||"sans-serif",this.fontWeight=n||"normal",this.radius=u||8;var t=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=t,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(t*t),this.gridInner=new Float64Array(t*t),this.f=new Float64Array(t),this.d=new Float64Array(t),this.z=new Float64Array(t+1),this.v=new Int16Array(t),this.middle=Math.round(t/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function b(f,c,u,i,a,n,t){for(var r=0;r<c;r++){for(var l=0;l<u;l++)i[l]=f[l*c+r];for(g(i,a,n,t,u),l=0;l<u;l++)f[l*c+r]=a[l]}for(l=0;l<u;l++){for(r=0;r<c;r++)i[r]=f[l*c+r];for(g(i,a,n,t,c),r=0;r<c;r++)f[l*c+r]=Math.sqrt(a[r])}}function g(f,c,u,i,a){u[0]=0,i[0]=-_,i[1]=+_;for(var n=1,t=0;n<a;n++){for(var r=(f[n]+n*n-(f[u[t]]+u[t]*u[t]))/(2*n-2*u[t]);r<=i[t];)t--,r=(f[n]+n*n-(f[u[t]]+u[t]*u[t]))/(2*n-2*u[t]);u[++t]=n,i[t]=r,i[t+1]=+_}for(n=0,t=0;n<a;n++){for(;i[t+1]<n;)t++;c[n]=(n-u[t])*(n-u[t])+f[u[t]]}}e.prototype.draw=function(f){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(f,this.buffer,this.middle);for(var c=this.ctx.getImageData(0,0,this.size,this.size),u=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var a=c.data[4*i+3]/255;this.gridOuter[i]=a===1?0:a===0?_:Math.pow(Math.max(0,.5-a),2),this.gridInner[i]=a===1?_:a===0?0:Math.pow(Math.max(0,a-.5),2)}for(b(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),b(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var n=this.gridOuter[i]-this.gridInner[i];u[i]=Math.max(0,Math.min(255,Math.round(255-255*(n/this.radius+this.cutoff))))}return u}},function(O,D,o){function _(w){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(w)}function e(w,A){return!A||_(A)!=="object"&&typeof A!="function"?function(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}(w):A}function b(w){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(w)}function g(w,A){return(g=Object.setPrototypeOf||function(k,v){return k.__proto__=v,k})(w,A)}function f(w,A){if(!(w instanceof A))throw new TypeError("Cannot call a class as a function")}function c(w,A){for(var k=0;k<A.length;k++){var v=A[k];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function u(w,A,k){return A&&c(w.prototype,A),k&&c(w,k),w}var i=o(13),a=o(0),n=o(10),t=o(54),r=o(0).sphericalToCartesian,l=(o(12),o(26)),d=o(4),h=d.Properties,m=d.Transitionable,S=(d.Transitioning,d.PossiblyEvaluated,d.DataConstantProperty),y=function(){function w(){f(this,w),this.specification=i.light.position}return u(w,[{key:"possiblyEvaluate",value:function(A,k){return r(A.expression.evaluate(k))}},{key:"interpolate",value:function(A,k,v){return{x:l.number(A.x,k.x,v),y:l.number(A.y,k.y,v),z:l.number(A.z,k.z,v)}}}]),w}(),s=new h({anchor:new S(i.light.anchor),position:new y,color:new S(i.light.color),intensity:new S(i.light.intensity)}),p=function(w){function A(k){var v;return f(this,A),(v=e(this,b(A).call(this)))._transitionable=new m(s),v.setLight(k),v._transitioning=v._transitionable.untransitioned(),v}return function(k,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(v&&v.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),v&&g(k,v)}(A,n),u(A,[{key:"getLight",value:function(){return this._transitionable.serialize()}},{key:"setLight",value:function(k){if(!this._validate(t.light,k))for(var v in k){var x=k[v];a.endsWith(v,"-transition")?this._transitionable.setTransition(v.slice(0,-11),x):this._transitionable.setValue(v,x)}}},{key:"updateTransitions",value:function(k){this._transitioning=this._transitionable.transitioned(k,this._transitioning)}},{key:"hasTransition",value:function(){return this._transitioning.hasTransition()}},{key:"recalculate",value:function(k){this.properties=this._transitioning.possiblyEvaluate(k)}},{key:"_validate",value:function(k,v){return t.emitErrors(this,k.call(t,a.extend({value:v,style:{glyphs:!0,sprite:!0},styleSpec:i})))}}]),A}();O.exports=p},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(0),b=function(){function g(i,a){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,g),this.width=i,this.height=a,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}var f,c,u;return f=g,(c=[{key:"getDash",value:function(i,a){var n=i.join(",")+String(a);return this.positions[n]||(this.positions[n]=this.addDash(i,a)),this.positions[n]}},{key:"addDash",value:function(i,a){var n=a?7:0,t=2*n+1;if(this.nextRow+t>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var r=0,l=0;l<i.length;l++)r+=i[l];for(var d=this.width/r,h=d/2,m=i.length%2==1,S=-n;S<=n;S++)for(var y=this.nextRow+n+S,s=this.width*y,p=m?-i[i.length-1]:0,w=i[0],A=1,k=0;k<this.width;k++){for(;w<k/d;)p=w,w+=i[A],m&&A===i.length-1&&(w+=i[0]),A++;var v=Math.abs(k-p*d),x=Math.abs(k-w*d),T=Math.min(v,x),E=A%2==1,C=void 0;if(a){var z=n?S/n*(h+1):0;if(E){var P=h-Math.abs(z);C=Math.sqrt(T*T+P*P)}else C=h-Math.sqrt(T*T+z*z)}else C=(E?1:-1)*T;this.data[3+4*(s+k)]=Math.max(0,Math.min(255,C+128))}var B={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:r};return this.nextRow+=t,this.dirty=!0,B}},{key:"bind",value:function(i){var a=i.gl;this.texture?(a.bindTexture(a.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,a.texSubImage2D(a.TEXTURE_2D,0,0,0,this.width,this.height,a.RGBA,a.UNSIGNED_BYTE,this.data))):(this.texture=a.createTexture(),a.bindTexture(a.TEXTURE_2D,this.texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,this.width,this.height,0,a.RGBA,a.UNSIGNED_BYTE,this.data))}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D,o){function _(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var e=o(0),b=o(195),g=function(){function f(a,n){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,f),this.workerPool=a,this.actors=[],this.currentActor=0,this.id=e.uniqueId();for(var t=this.workerPool.acquire(this.id),r=0;r<t.length;r++){var l=t[r],d=new b(l,n,this.id);d.name="Worker ".concat(r),this.actors.push(d)}}var c,u,i;return c=f,(u=[{key:"broadcast",value:function(a,n,t){t=t||function(){},e.asyncAll(this.actors,function(r,l){r.send(a,n,l)},t)}},{key:"send",value:function(a,n,t,r){return(typeof r!="number"||isNaN(r))&&(r=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[r].send(a,n,t),r}},{key:"remove",value:function(){this.actors.forEach(function(a){a.remove()}),this.actors=[],this.workerPool.release(this.id)}}])&&_(c.prototype,u),i&&_(c,i),f}();O.exports=g},function(O,D,o){function _(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}var e=o(0),b=o(11),g=b.serialize,f=b.deserialize,c=function(){function u(t,r,l){(function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")})(this,u),this.target=t,this.parent=r,this.mapId=l,this.callbacks={},this.callbackID=0,e.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)}var i,a,n;return i=u,(a=[{key:"send",value:function(t,r,l,d){var h=l?"".concat(this.mapId,":").concat(this.callbackID++):null;l&&(this.callbacks[h]=l);var m=[];this.target.postMessage({targetMapId:d,sourceMapId:this.mapId,type:t,id:String(h),data:g(r,m)},m)}},{key:"receive",value:function(t){var r,l=this,d=t.data,h=d.id;if(!d.targetMapId||this.mapId===d.targetMapId){var m=function(y,s){var p=[];l.target.postMessage({sourceMapId:l.mapId,type:"<response>",id:String(h),error:y?String(y):null,data:g(s,p)},p)};if(d.type==="<response>")r=this.callbacks[d.id],delete this.callbacks[d.id],r&&d.error?r(new Error(d.error)):r&&r(null,f(d.data));else if(d.id!==void 0&&this.parent[d.type])this.parent[d.type](d.sourceMapId,f(d.data),m);else if(d.id!==void 0&&this.parent.getWorkerSource){var S=d.type.split(".");this.parent.getWorkerSource(d.sourceMapId,S[0])[S[1]](f(d.data),m)}else this.parent[d.type](f(d.data))}}},{key:"remove",value:function(){this.target.removeEventListener("message",this.receive,!1)}}])&&_(i.prototype,a),n&&_(i,n),u}();O.exports=c},function(O,D,o){function _(d){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}function e(d,h){for(var m=0;m<h.length;m++){var S=h[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}function b(d){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)})(d)}function g(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function f(d,h){return(f=Object.setPrototypeOf||function(m,S){return m.__proto__=S,m})(d,h)}var c=o(10),u=o(0),i=o(112),a=o(34).normalizeTileURL,n=o(113),t=o(16).ResourceType,r=o(2),l=function(d){function h(s,p,w,A){var k;if(function(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}(this,h),(k=function(v,x){return!x||_(x)!=="object"&&typeof x!="function"?g(v):x}(this,b(h).call(this))).id=s,k.dispatcher=w,k.type="vector",k.minzoom=0,k.maxzoom=22,k.scheme="xyz",k.tileSize=512,k.reparseOverscaled=!0,k.isTileClipped=!0,u.extend(g(k),u.pick(p,["url","scheme","tileSize"])),k._options=u.extend({type:"vector"},p),k.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");return k.setEventedParent(A),k}var m,S,y;return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(p&&p.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),p&&f(s,p)}(h,c),m=h,(S=[{key:"load",value:function(){var s=this;this.fire("dataloading",{dataType:"source"}),i(this._options,this.map._transformRequest,function(p,w){p?s.fire("error",p):w&&(u.extend(s,w),w.bounds&&(s.tileBounds=new n(w.bounds,s.minzoom,s.maxzoom)),s.fire("data",{dataType:"source",sourceDataType:"metadata"}),s.fire("data",{dataType:"source",sourceDataType:"content"}))})}},{key:"hasTile",value:function(s){return!this.tileBounds||this.tileBounds.contains(s.canonical)}},{key:"onAdd",value:function(s){this.map=s,this.load()}},{key:"serialize",value:function(){return u.extend({},this._options)}},{key:"loadTile",value:function(s,p){var w=s.tileID.overscaleFactor(),A=a(s.tileID.canonical.url(this.tiles,this.scheme),this.url),k={request:this.map._transformRequest(A,t.Tile),uid:s.uid,tileID:s.tileID,zoom:s.tileID.overscaledZ,tileSize:this.tileSize*w,type:this.type,source:this.id,pixelRatio:r.devicePixelRatio,overscaling:w,showCollisionBoxes:this.map.showCollisionBoxes};function v(x,T){return s.aborted?p(null):x?p(x):(this.map._refreshExpiredTiles&&s.setExpiryData(T),s.loadVectorData(T,this.map.painter),p(null),void(s.reloadCallback&&(this.loadTile(s,s.reloadCallback),s.reloadCallback=null)))}s.workerID===void 0||s.state==="expired"?s.workerID=this.dispatcher.send("loadTile",k,v.bind(this)):s.state==="loading"?s.reloadCallback=p:this.dispatcher.send("reloadTile",k,v.bind(this),s.workerID)}},{key:"abortTile",value:function(s){this.dispatcher.send("abortTile",{uid:s.uid,type:this.type,source:this.id},void 0,s.workerID)}},{key:"unloadTile",value:function(s){s.unloadVectorData(),this.dispatcher.send("removeTile",{uid:s.uid,type:this.type,source:this.id},void 0,s.workerID),s.workerID=void 0}},{key:"hasTransition",value:function(){return!1}}])&&e(m.prototype,S),y&&e(m,y),h}();O.exports=l},function(O,D,o){function _(l){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(l)}function e(l,d){for(var h=0;h<d.length;h++){var m=d[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}function b(l,d){return!d||_(d)!=="object"&&typeof d!="function"?function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(l):d}function g(l){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)})(l)}function f(l,d){return(f=Object.setPrototypeOf||function(h,m){return h.__proto__=m,h})(l,d)}var c=o(16),u=o(0),i=(o(10),o(34).normalizeTileURL),a=o(2),n=o(27).OverscaledTileID,t=o(114),r=function(l){function d(y,s,p,w){var A;return function(k,v){if(!(k instanceof v))throw new TypeError("Cannot call a class as a function")}(this,d),(A=b(this,g(d).call(this,y,s,p,w))).type="raster-dem",A.maxzoom=22,A._options=u.extend({},s),A}var h,m,S;return function(y,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(s&&s.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),s&&f(y,s)}(d,t),h=d,(m=[{key:"serialize",value:function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds}}},{key:"loadTile",value:function(y,s){var p=i(y.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);y.request=c.getImage(this.map._transformRequest(p,c.ResourceType.Tile),function(w,A){if(delete y.request,y.aborted)y.state="unloaded",s(null);else if(w)y.state="errored",s(w);else if(A){this.map._refreshExpiredTiles&&y.setExpiryData(A),delete A.cacheControl,delete A.expires;var k=a.getImageData(A),v={uid:y.uid,coord:y.tileID,source:this.id,rawImageData:k};y.workerID&&y.state!=="expired"||(y.workerID=this.dispatcher.send("loadDEMTile",v,function(x,T){x&&(y.state="errored",s(x)),T&&(y.dem=T,y.needsHillshadePrepare=!0,y.state="loaded",s(null))}.bind(this)))}}.bind(this)),y.neighboringTiles=this._getNeighboringTiles(y.tileID)}},{key:"_getNeighboringTiles",value:function(y){var s=y.canonical,p=Math.pow(2,s.z),w=(s.x-1+p)%p,A=s.x===0?y.wrap-1:y.wrap,k=(s.x+1+p)%p,v=s.x+1===p?y.wrap+1:y.wrap,x={};return x[new n(y.overscaledZ,A,s.z,w,s.y).key]={backfilled:!1},x[new n(y.overscaledZ,v,s.z,k,s.y).key]={backfilled:!1},s.y>0&&(x[new n(y.overscaledZ,A,s.z,w,s.y-1).key]={backfilled:!1},x[new n(y.overscaledZ,y.wrap,s.z,s.x,s.y-1).key]={backfilled:!1},x[new n(y.overscaledZ,v,s.z,k,s.y-1).key]={backfilled:!1}),s.y+1<p&&(x[new n(y.overscaledZ,A,s.z,w,s.y+1).key]={backfilled:!1},x[new n(y.overscaledZ,y.wrap,s.z,s.x,s.y+1).key]={backfilled:!1},x[new n(y.overscaledZ,v,s.z,k,s.y+1).key]={backfilled:!1}),x}},{key:"unloadTile",value:function(y){y.demTexture&&this.map.painter.saveTileTexture(y.demTexture),y.fbo&&(y.fbo.destroy(),delete y.fbo),y.dem&&delete y.dem,delete y.neighboringTiles,y.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:y.uid,source:this.id},void 0,y.workerID)}}])&&e(h.prototype,m),S&&e(h,S),d}();O.exports=r},function(O,D,o){"use strict";function _(g,f,c,u,i,a){return a=a||{},g+"?"+["bbox="+e(c,u,i),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+f].join("&")}function e(g,f,c){var u=b(256*g,256*(f=Math.pow(2,c)-f-1),c),i=b(256*(g+1),256*(f+1),c);return u[0]+","+u[1]+","+i[0]+","+i[1]}function b(g,f,c){var u=2*Math.PI*6378137/256/Math.pow(2,c);return[g*u-2*Math.PI*6378137/2,f*u-2*Math.PI*6378137/2]}o.r(D),o.d(D,"getURL",function(){return _}),o.d(D,"getTileBBox",function(){return e}),o.d(D,"getMercCoords",function(){return b})},function(O,D,o){function _(r){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(r)}function e(r,l){for(var d=0;d<l.length;d++){var h=l[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}function b(r,l){return!l||_(l)!=="object"&&typeof l!="function"?function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(r):l}function g(r){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)})(r)}function f(r,l){return(f=Object.setPrototypeOf||function(d,h){return d.__proto__=h,d})(r,l)}var c=o(16),u=o(52),i=o(46),a=o(40),n=o(20),t=function(r){function l(S,y,s,p){var w;return function(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}(this,l),(w=b(this,g(l).call(this,S,y,s,p))).roundZoom=!0,w.type="video",w.options=y,w}var d,h,m;return function(S,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(y&&y.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),y&&f(S,y)}(l,u),d=l,(h=[{key:"load",value:function(){var S=this,y=this.options;this.urls=y.urls,c.getVideo(y.urls,function(s,p){s?S.fire("error",{error:s}):p&&(S.video=p,S.video.loop=!0,S.video.addEventListener("playing",function(){S.map._rerender()}),S.map&&S.video.play(),S._finishLoading())})}},{key:"getVideo",value:function(){return this.video}},{key:"onAdd",value:function(S){this.map||(this.map=S,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}},{key:"prepare",value:function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var S=this.map.painter.context,y=S.gl;for(var s in this.boundsBuffer||(this.boundsBuffer=S.createVertexBuffer(this._boundsArray,i.members)),this.boundsVAO||(this.boundsVAO=new a),this.texture?this.video.paused||(this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE),y.texSubImage2D(y.TEXTURE_2D,0,0,0,y.RGBA,y.UNSIGNED_BYTE,this.video)):(this.texture=new n(S,this.video,y.RGBA),this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE)),this.tiles){var p=this.tiles[s];p.state!=="loaded"&&(p.state="loaded",p.texture=this.texture)}}}},{key:"serialize",value:function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}},{key:"hasTransition",value:function(){return this.video&&!this.video.paused}}])&&e(d.prototype,h),m&&e(d,m),l}();O.exports=t},function(O,D,o){function _(r){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(r)}function e(r,l){for(var d=0;d<l.length;d++){var h=l[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}function b(r,l){return!l||_(l)!=="object"&&typeof l!="function"?function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(r):l}function g(r){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)})(r)}function f(r,l){return(f=Object.setPrototypeOf||function(d,h){return d.__proto__=h,d})(r,l)}var c=o(52),u=o(5),i=o(46),a=o(40),n=o(20),t=function(r){function l(S,y,s,p){var w;return function(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}(this,l),(w=b(this,g(l).call(this,S,y,s,p))).options=y,w.animate=y.animate===void 0||y.animate,w}var d,h,m;return function(S,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(y&&y.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),y&&f(S,y)}(l,c),d=l,(h=[{key:"load",value:function(){this.canvas=this.canvas||u.document.getElementById(this.options.canvas),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire("error",new Error("Canvas dimensions cannot be less than or equal to zero.")):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())}},{key:"getCanvas",value:function(){return this.canvas}},{key:"onAdd",value:function(S){this.map=S,this.load(),this.canvas&&this.animate&&this.play()}},{key:"onRemove",value:function(){this.pause()}},{key:"prepare",value:function(){var S=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,S=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,S=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var y=this.map.painter.context,s=y.gl;for(var p in this.boundsBuffer||(this.boundsBuffer=y.createVertexBuffer(this._boundsArray,i.members)),this.boundsVAO||(this.boundsVAO=new a),this.texture?S?this.texture.update(this.canvas):this._playing&&(this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,this.canvas)):(this.texture=new n(y,this.canvas,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE)),this.tiles){var w=this.tiles[p];w.state!=="loaded"&&(w.state="loaded",w.texture=this.texture)}}}},{key:"serialize",value:function(){return{type:"canvas",canvas:this.canvas,coordinates:this.coordinates}}},{key:"hasTransition",value:function(){return this._playing}},{key:"_hasInvalidDimensions",value:function(){for(var S=0,y=[this.canvas.width,this.canvas.height];S<y.length;S++){var s=y[S];if(isNaN(s)||s<=0)return!0}return!1}}])&&e(d.prototype,h),m&&e(d,m),l}();O.exports=t},function(O,D){O.exports={deserialize:function(o,_){var e={};if(!_)return e;var b=!0,g=!1,f=void 0;try{for(var c,u=o[Symbol.iterator]();!(b=(c=u.next()).done);b=!0){var i=c.value,a=i.layerIds.map(function(h){return _.getLayer(h)}).filter(Boolean);if(a.length!==0){i.layers=a;var n=!0,t=!1,r=void 0;try{for(var l,d=a[Symbol.iterator]();!(n=(l=d.next()).done);n=!0)e[l.value.id]=i}catch(h){t=!0,r=h}finally{try{n||d.return==null||d.return()}finally{if(t)throw r}}}}}catch(h){g=!0,f=h}finally{try{b||u.return==null||u.return()}finally{if(g)throw f}}return e}}},function(O,D,o){function _(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}o(3);var e=o(38),b=o(6),g=o(60),f=o(102),c=o(203),u=o(48),i=o(65),a=o(119),n=o(0).arraysIntersect,t=(o(27).OverscaledTileID,o(11).register),r=o(14).FeatureIndexArray,l=function(){function h(s,p,w,A){(function(k,v){if(!(k instanceof v))throw new TypeError("Cannot call a class as a function")})(this,h),this.tileID=s,this.overscaling=p,this.x=s.canonical.x,this.y=s.canonical.y,this.z=s.canonical.z,this.grid=w||new f(b,16,0),this.featureIndexArray=A||new r}var m,S,y;return m=h,(S=[{key:"insert",value:function(s,p,w,A,k){var v=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(w,A,k);for(var x=0;x<p.length;x++){for(var T=p[x],E=[1/0,1/0,-1/0,-1/0],C=0;C<T.length;C++){var z=T[C];E[0]=Math.min(E[0],z.x),E[1]=Math.min(E[1],z.y),E[2]=Math.max(E[2],z.x),E[3]=Math.max(E[3],z.y)}this.grid.insert(v,E[0],E[1],E[2],E[3])}}},{key:"query",value:function(s,p){this.vtLayers||(this.vtLayers=new u.VectorTile(new i(this.rawTileData)).layers,this.sourceLayerCoder=new c(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var w={},A=s.params||{},k=b/s.tileSize/s.scale,v=g(A.filter),x=s.queryGeometry,T=s.additionalRadius*k,E=1/0,C=1/0,z=-1/0,P=-1/0,B=0;B<x.length;B++)for(var F=x[B],Z=0;Z<F.length;Z++){var W=F[Z];E=Math.min(E,W.x),C=Math.min(C,W.y),z=Math.max(z,W.x),P=Math.max(P,W.y)}var J=this.grid.query(E-T,C-T,z+T,P+T);J.sort(d),this.filterMatching(w,J,this.featureIndexArray,x,v,A.layers,p,s.bearing,k);var X=s.collisionIndex?s.collisionIndex.queryRenderedSymbols(x,this.tileID,b/s.tileSize,s.collisionBoxArray,s.sourceID,s.bucketInstanceIds):[];return X.sort(),this.filterMatching(w,X,s.collisionBoxArray,x,v,A.layers,p,s.bearing,k),w}},{key:"filterMatching",value:function(s,p,w,A,k,v,x,T,E){for(var C,z=0;z<p.length;z++){var P=p[z];if(P!==C){C=P;var B=w.get(P),F=this.bucketLayerIDs[B.bucketIndex];if(!v||n(v,F)){var Z=this.sourceLayerCoder.decode(B.sourceLayerIndex),W=this.vtLayers[Z].feature(B.featureIndex);if(k({zoom:this.tileID.overscaledZ},W))for(var J=null,X=0;X<F.length;X++){var R=F[X];if(!(v&&v.indexOf(R)<0)){var U=x[R];if(U&&(U.type==="symbol"||(J||(J=e(W)),U.queryIntersectsFeature(A,W,J,this.z,T,E)))){var K=new a(W,this.z,this.x,this.y);K.layer=U.serialize();var q=s[R];q===void 0&&(q=s[R]=[]),q.push({featureIndex:P,feature:K})}}}}}}}},{key:"hasLayer",value:function(s){var p=!0,w=!1,A=void 0;try{for(var k,v=this.bucketLayerIDs[Symbol.iterator]();!(p=(k=v.next()).done);p=!0){var x=k.value,T=!0,E=!1,C=void 0;try{for(var z,P=x[Symbol.iterator]();!(T=(z=P.next()).done);T=!0)if(s===z.value)return!0}catch(B){E=!0,C=B}finally{try{T||P.return==null||P.return()}finally{if(E)throw C}}}}catch(B){w=!0,A=B}finally{try{p||v.return==null||v.return()}finally{if(w)throw A}}return!1}}])&&_(m.prototype,S),y&&_(m,y),h}();function d(h,m){return m-h}t("FeatureIndex",l,{omit:["rawTileData","sourceLayerCoder","collisionIndex"]}),O.exports=l},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(1),b=function(){function g(i){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,g),this._stringToNumber={},this._numberToString=[];for(var a=0;a<i.length;a++){var n=i[a];this._stringToNumber[n]=a,this._numberToString[a]=n}}var f,c,u;return f=g,(c=[{key:"encode",value:function(i){return e(i in this._stringToNumber),this._stringToNumber[i]}},{key:"decode",value:function(i){return e(i<this._numberToString.length),this._numberToString[i]}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D){function o(e,b){for(var g=0;g<b.length;g++){var f=b[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}var _=function(){function e(c,u,i){(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,e);var a=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(c/i),this.yCellCount=Math.ceil(u/i);for(var t=0;t<this.xCellCount*this.yCellCount;t++)a.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=c,this.height=u,this.xScale=this.xCellCount/c,this.yScale=this.yCellCount/u,this.boxUid=0,this.circleUid=0}var b,g,f;return b=e,(g=[{key:"keysLength",value:function(){return this.boxKeys.length+this.circleKeys.length}},{key:"insert",value:function(c,u,i,a,n){this._forEachCell(u,i,a,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(c),this.bboxes.push(u),this.bboxes.push(i),this.bboxes.push(a),this.bboxes.push(n)}},{key:"insertCircle",value:function(c,u,i,a){this._forEachCell(u-a,i-a,u+a,i+a,this._insertCircleCell,this.circleUid++),this.circleKeys.push(c),this.circles.push(u),this.circles.push(i),this.circles.push(a)}},{key:"_insertBoxCell",value:function(c,u,i,a,n,t){this.boxCells[n].push(t)}},{key:"_insertCircleCell",value:function(c,u,i,a,n,t){this.circleCells[n].push(t)}},{key:"_query",value:function(c,u,i,a,n){if(i<0||c>this.width||a<0||u>this.height)return!n&&[];var t=[];if(c<=0&&u<=0&&this.width<=i&&this.height<=a)t=Array.prototype.slice.call(this.boxKeys).concat(this.circleKeys);else{var r={hitTest:n,seenUids:{box:{},circle:{}}};this._forEachCell(c,u,i,a,this._queryCell,t,r)}return n?t.length>0:t}},{key:"_queryCircle",value:function(c,u,i,a){var n=c-i,t=c+i,r=u-i,l=u+i;if(t<0||n>this.width||l<0||r>this.height)return!a&&[];var d=[],h={hitTest:a,circle:{x:c,y:u,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(n,r,t,l,this._queryCellCircle,d,h),a?d.length>0:d}},{key:"query",value:function(c,u,i,a){return this._query(c,u,i,a,!1)}},{key:"hitTest",value:function(c,u,i,a){return this._query(c,u,i,a,!0)}},{key:"hitTestCircle",value:function(c,u,i){return this._queryCircle(c,u,i,!0)}},{key:"_queryCell",value:function(c,u,i,a,n,t,r){var l=r.seenUids,d=this.boxCells[n];if(d!==null){var h=this.bboxes,m=!0,S=!1,y=void 0;try{for(var s,p=d[Symbol.iterator]();!(m=(s=p.next()).done);m=!0){var w=s.value;if(!l.box[w]){l.box[w]=!0;var A=4*w;if(c<=h[A+2]&&u<=h[A+3]&&i>=h[A+0]&&a>=h[A+1]){if(r.hitTest)return t.push(!0),!0;t.push(this.boxKeys[w])}}}}catch(F){S=!0,y=F}finally{try{m||p.return==null||p.return()}finally{if(S)throw y}}}var k=this.circleCells[n];if(k!==null){var v=this.circles,x=!0,T=!1,E=void 0;try{for(var C,z=k[Symbol.iterator]();!(x=(C=z.next()).done);x=!0){var P=C.value;if(!l.circle[P]){l.circle[P]=!0;var B=3*P;if(this._circleAndRectCollide(v[B],v[B+1],v[B+2],c,u,i,a)){if(r.hitTest)return t.push(!0),!0;t.push(this.circleKeys[P])}}}}catch(F){T=!0,E=F}finally{try{x||z.return==null||z.return()}finally{if(T)throw E}}}}},{key:"_queryCellCircle",value:function(c,u,i,a,n,t,r){var l=r.circle,d=r.seenUids,h=this.boxCells[n];if(h!==null){var m=this.bboxes,S=!0,y=!1,s=void 0;try{for(var p,w=h[Symbol.iterator]();!(S=(p=w.next()).done);S=!0){var A=p.value;if(!d.box[A]){d.box[A]=!0;var k=4*A;if(this._circleAndRectCollide(l.x,l.y,l.radius,m[k+0],m[k+1],m[k+2],m[k+3]))return t.push(!0),!0}}}catch(Z){y=!0,s=Z}finally{try{S||w.return==null||w.return()}finally{if(y)throw s}}}var v=this.circleCells[n];if(v!==null){var x=this.circles,T=!0,E=!1,C=void 0;try{for(var z,P=v[Symbol.iterator]();!(T=(z=P.next()).done);T=!0){var B=z.value;if(!d.circle[B]){d.circle[B]=!0;var F=3*B;if(this._circlesCollide(x[F],x[F+1],x[F+2],l.x,l.y,l.radius))return t.push(!0),!0}}}catch(Z){E=!0,C=Z}finally{try{T||P.return==null||P.return()}finally{if(E)throw C}}}}},{key:"_forEachCell",value:function(c,u,i,a,n,t,r){for(var l=this._convertToXCellCoord(c),d=this._convertToYCellCoord(u),h=this._convertToXCellCoord(i),m=this._convertToYCellCoord(a),S=l;S<=h;S++)for(var y=d;y<=m;y++){var s=this.xCellCount*y+S;if(n.call(this,c,u,i,a,s,t,r))return}}},{key:"_convertToXCellCoord",value:function(c){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(c*this.xScale)))}},{key:"_convertToYCellCoord",value:function(c){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(c*this.yScale)))}},{key:"_circlesCollide",value:function(c,u,i,a,n,t){var r=a-c,l=n-u,d=i+t;return d*d>r*r+l*l}},{key:"_circleAndRectCollide",value:function(c,u,i,a,n,t,r){var l=(t-a)/2,d=Math.abs(c-(a+l));if(d>l+i)return!1;var h=(r-n)/2,m=Math.abs(u-(n+h));if(m>h+i)return!1;if(d<=l||m<=h)return!0;var S=d-l,y=m-h;return S*S+y*y<=i*i}}])&&o(b.prototype,g),f&&o(b,f),e}();O.exports=_},function(O,D,o){var _,e;function b(m,S,y){return S in m?Object.defineProperty(m,S,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[S]=y,m}var g=o(63),f=o(110),c=o(49),u={horizontal:1,vertical:2,horizontalOnly:3};O.exports={shapeText:function(m,S,y,s,p,w,A,k,v,x){var T=m.trim();x===u.vertical&&(T=f(T));var E,C=[],z={positionedGlyphs:C,text:T,top:k[1],bottom:k[1],left:k[0],right:k[0],writingMode:x},P=c.processBidirectionalText;return E=P?P(T,l(T,A,y,S)):function(B,F){var Z=[],W=0,J=!0,X=!1,R=void 0;try{for(var U,K=F[Symbol.iterator]();!(J=(U=K.next()).done);J=!0){var q=U.value;Z.push(B.substring(W,q)),W=q}}catch(L){X=!0,R=L}finally{try{J||K.return==null||K.return()}finally{if(X)throw R}}return W<B.length&&Z.push(B.substring(W,B.length)),Z}(T,l(T,A,y,S)),function(B,F,Z,W,J,X,R,U,K){var q=0,L=-17,I=0,j=B.positionedGlyphs,M=X==="right"?1:X==="left"?0:.5,N=!0,V=!1,G=void 0;try{for(var H,Y=Z[Symbol.iterator]();!(N=(H=Y.next()).done);N=!0){var $=H.value;if(($=$.trim()).length){for(var Q=j.length,tt=0;tt<$.length;tt++){var et=$.charCodeAt(tt),nt=F[et];nt&&(g.charHasUprightVerticalOrientation(et)&&R!==u.horizontal?(j.push({glyph:et,x:q,y:0,vertical:!0}),q+=K+U):(j.push({glyph:et,x:q,y:L,vertical:!1}),q+=nt.metrics.advance+U))}if(j.length!==Q){var ot=q-U;I=Math.max(ot,I),h(j,F,Q,j.length-1,M)}q=0,L+=W}else L+=W}}catch(lt){V=!0,G=lt}finally{try{N||Y.return==null||Y.return()}finally{if(V)throw G}}var it=d(J),at=it.horizontalAlign,st=it.verticalAlign;(function(lt,ct,ut,pt,ft,ht,mt){for(var dt=(ct-ut)*ft,vt=(-pt*mt+.5)*ht,yt=0;yt<lt.length;yt++)lt[yt].x+=dt,lt[yt].y+=vt})(j,M,at,st,I,W,Z.length);var rt=Z.length*W;B.top+=-st*rt,B.bottom=B.top+rt,B.left+=-at*I,B.right=B.left+I}(z,S,E,s,p,w,x,A,v),!!C.length&&z},shapeIcon:function(m,S,y){var s=d(y),p=s.horizontalAlign,w=s.verticalAlign,A=S[0],k=S[1],v=A-m.displaySize[0]*p,x=v+m.displaySize[0],T=k-m.displaySize[1]*w,E=T+m.displaySize[1];return{image:m,top:T,bottom:E,left:v,right:x}},WritingMode:u};var i=(b(_={},9,!0),b(_,10,!0),b(_,11,!0),b(_,12,!0),b(_,13,!0),b(_,32,!0),_),a=(b(e={},10,!0),b(e,32,!0),b(e,38,!0),b(e,40,!0),b(e,41,!0),b(e,43,!0),b(e,45,!0),b(e,47,!0),b(e,173,!0),b(e,183,!0),b(e,8203,!0),b(e,8208,!0),b(e,8211,!0),b(e,8231,!0),e);function n(m,S,y,s){var p=Math.pow(m-S,2);return s?m<S?p/2:2*p:p+Math.abs(y)*y}function t(m,S){var y=0;return m===10&&(y-=1e4),m!==40&&m!==65288||(y+=50),S!==41&&S!==65289||(y+=50),y}function r(m,S,y,s,p,w){var A=null,k=n(S,y,p,w),v=!0,x=!1,T=void 0;try{for(var E,C=s[Symbol.iterator]();!(v=(E=C.next()).done);v=!0){var z=E.value,P=n(S-z.x,y,p,w)+z.badness;P<=k&&(A=z,k=P)}}catch(B){x=!0,T=B}finally{try{v||C.return==null||C.return()}finally{if(x)throw T}}return{index:m,x:S,priorBreak:A,badness:k}}function l(m,S,y,s){if(!y)return[];if(!m)return[];for(var p=[],w=function(T,E,C,z){for(var P=0,B=0;B<T.length;B++){var F=z[T.charCodeAt(B)];F&&(P+=F.metrics.advance+E)}return P/Math.max(1,Math.ceil(P/C))}(m,S,y,s),A=0,k=0;k<m.length;k++){var v=m.charCodeAt(k),x=s[v];x&&!i[v]&&(A+=x.metrics.advance+S),k<m.length-1&&(a[v]||g.charAllowsIdeographicBreaking(v))&&p.push(r(k+1,A,w,p,t(v,m.charCodeAt(k+1)),!1))}return function T(E){return E?T(E.priorBreak).concat(E.index):[]}(r(m.length,A,w,p,0,!0))}function d(m){var S=.5,y=.5;switch(m){case"right":case"top-right":case"bottom-right":S=1;break;case"left":case"top-left":case"bottom-left":S=0}switch(m){case"bottom":case"bottom-right":case"bottom-left":y=1;break;case"top":case"top-right":case"top-left":y=0}return{horizontalAlign:S,verticalAlign:y}}function h(m,S,y,s,p){if(p){var w=S[m[s].glyph];if(w)for(var A=w.metrics.advance,k=(m[s].x+A)*p,v=y;v<=s;v++)m[v].x-=k}}},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(1),b=function(){function g(i,a,n){(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,g),this.context=i;var t=i.gl;this.buffer=t.createBuffer(),this.dynamicDraw=Boolean(n),this.unbindVAO(),i.bindElementBuffer.set(this.buffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?t.DYNAMIC_DRAW:t.STATIC_DRAW),this.dynamicDraw||delete a.arrayBuffer}var f,c,u;return f=g,(c=[{key:"unbindVAO",value:function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null)}},{key:"bind",value:function(){this.context.bindElementBuffer.set(this.buffer)}},{key:"updateData",value:function(i){var a=this.context.gl;e(this.dynamicDraw),this.unbindVAO(),this.bind(),a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)}},{key:"destroy",value:function(){var i=this.context.gl;this.buffer&&(i.deleteBuffer(this.buffer),delete this.buffer)}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D,o){function _(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var e=o(1),b={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},g=function(){function f(a,n,t,r){(function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")})(this,f),this.length=n.length,this.attributes=t,this.itemSize=n.bytesPerElement,this.dynamicDraw=r,this.context=a;var l=a.gl;this.buffer=l.createBuffer(),a.bindVertexBuffer.set(this.buffer),l.bufferData(l.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?l.DYNAMIC_DRAW:l.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}var c,u,i;return c=f,(u=[{key:"bind",value:function(){this.context.bindVertexBuffer.set(this.buffer)}},{key:"updateData",value:function(a){e(a.length===this.length);var n=this.context.gl;this.bind(),n.bufferSubData(n.ARRAY_BUFFER,0,a.arrayBuffer)}},{key:"enableAttributes",value:function(a,n){for(var t=0;t<this.attributes.length;t++){var r=this.attributes[t],l=n.attributes[r.name];l!==void 0&&a.enableVertexAttribArray(l)}}},{key:"setVertexAttribPointers",value:function(a,n,t){for(var r=0;r<this.attributes.length;r++){var l=this.attributes[r],d=n.attributes[l.name];d!==void 0&&a.vertexAttribPointer(d,l.components,a[b[l.type]],!1,this.itemSize,l.offset+this.itemSize*(t||0))}}},{key:"destroy",value:function(){var a=this.context.gl;this.buffer&&(a.deleteBuffer(this.buffer),delete this.buffer)}}])&&_(c.prototype,u),i&&_(c,i),f}();O.exports=g},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(122),b=e.ColorAttachment,g=e.DepthAttachment,f=function(){function c(n,t,r){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,c),this.context=n,this.width=t,this.height=r;var l=n.gl,d=this.framebuffer=l.createFramebuffer();this.colorAttachment=new b(n,d),this.depthAttachment=new g(n,d)}var u,i,a;return u=c,(i=[{key:"destroy",value:function(){var n=this.context.gl,t=this.colorAttachment.get();t&&n.deleteTexture(t);var r=this.depthAttachment.get();r&&n.deleteRenderbuffer(r),n.deleteFramebuffer(this.framebuffer)}}])&&_(u.prototype,i),a&&_(u,a),c}();O.exports=f},function(O,D,o){var _,e=o(210);O.exports=function(){return _||(_=new e),_}},function(O,D,o){function _(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var e=o(1),b=o(211),g=function(){function f(){(function(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")})(this,f),this.active={}}var c,u,i;return c=f,(u=[{key:"acquire",value:function(a){if(!this.workers){var n=o(71).workerCount;for(e(typeof n=="number"&&n<1/0),this.workers=[];this.workers.length<n;)this.workers.push(new b)}return this.active[a]=!0,this.workers.slice()}},{key:"release",value:function(a){delete this.active[a],Object.keys(this.active).length===0&&(this.workers.forEach(function(n){n.terminate()}),this.workers=null)}}])&&_(c.prototype,u),i&&_(c,i),f}();O.exports=g},function(O,D,o){var _=o(212);o(5),O.exports=function(){return new _}},function(O,D,o){O.exports=function(){return o(213)('!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=86)}([function(t,e,n){"use strict";(function(e){var r=n(90);\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=n(91),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function f(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=g,p=/\\s*function\\s+([^\\(\\s]*)\\s*/;function y(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(p);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(l||!a.isFunction(t))return a.inspect(t);var e=y(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,n,r,i){throw new h.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function g(t,e){t||m(t,!0,e,"==",h.ok)}function b(t,e,n,r){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),b(t,e,n);var s,l,c=_(t),f=_(e);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),l=c.length-1;l>=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(s=c[l],!b(t[s],e[s],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function x(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function k(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError(\'"block" argument must be a function\');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&m(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&i&&!n;if((!t&&a.isError(i)&&o&&w(i,n)||s)&&m(i,n,"Got unwanted exception"+r),t&&i&&n&&!w(i,n)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return d(v(t.actual),128)+" "+t.operator+" "+d(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=y(e),o=r.indexOf("\\n"+i);if(o>=0){var a=r.indexOf("\\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=m,h.ok=g,h.equal=function(t,e,n){t!=e&&m(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&m(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){b(t,e,!1)||m(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){b(t,e,!0)||m(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){b(t,e,!1)&&m(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){b(e,n,!0)&&m(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&m(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&m(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){k(!0,t,e,n)},h.doesNotThrow=function(t,e,n){k(!1,t,e,n)},h.ifError=function(t){if(t)throw t},h.strict=r(function t(e,n){e||m(e,!0,n,"==",t)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var _=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(this,n(89))},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(0),s=n(2),u=s.clone,l=s.extend,c=s.easeCubicInOut,f=n(19),h=n(14).normalizePropertyExpression,p=(n(13),n(3).register),y=function(){function t(e,n){r(this,t),this.property=e,this.value=n,this.expression=h(void 0===n?e.specification.default:n,e.specification)}return o(t,[{key:"isDataDriven",value:function(){return"source"===this.expression.kind||"composite"===this.expression.kind}},{key:"possiblyEvaluate",value:function(t){return this.property.possiblyEvaluate(this,t)}}]),t}(),d=function(){function t(e){r(this,t),this.property=e,this.value=new y(e,void 0)}return o(t,[{key:"transitioned",value:function(t,e){return new m(this.property,this.value,e,l({},t.transition,this.transition),t.now)}},{key:"untransitioned",value:function(){return new m(this.property,this.value,null,{},0)}}]),t}(),v=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}return o(t,[{key:"getValue",value:function(t){return u(this._values[t].value.value)}},{key:"setValue",value:function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new d(this._values[t].property)),this._values[t].value=new y(this._values[t].property,null===e?void 0:u(e))}},{key:"getTransition",value:function(t){return u(this._values[t].transition)}},{key:"setTransition",value:function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new d(this._values[t].property)),this._values[t].transition=u(e)||void 0}},{key:"serialize",value:function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i);var o=this.getTransition(r);void 0!==o&&(t["".concat(r,"-transition")]=o)}return t}},{key:"transitioned",value:function(t,e){for(var n=new g(this._properties),r=0,i=Object.keys(this._values);r<i.length;r++){var o=i[r];n._values[o]=this._values[o].transitioned(t,e._values[o])}return n}},{key:"untransitioned",value:function(){for(var t=new g(this._properties),e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e];t._values[r]=this._values[r].untransitioned()}return t}}]),t}(),m=function(){function t(e,n,i,o,a){r(this,t),this.property=e,this.value=n,this.begin=a+o.delay||0,this.end=this.begin+o.duration||0,e.specification.transition&&(o.delay||o.duration)&&(this.prior=i)}return o(t,[{key:"possiblyEvaluate",value:function(t){var e=t.now||0,n=this.value.possiblyEvaluate(t),r=this.prior;if(r){if(e>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(e<this.begin)return r.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(t),n,c(i))}return n}}]),t}(),g=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}return o(t,[{key:"possiblyEvaluate",value:function(t){for(var e=new w(this._properties),n=0,r=Object.keys(this._values);n<r.length;n++){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e}},{key:"hasTransition",value:function(){for(var t=0,e=Object.keys(this._values);t<e.length;t++){var n=e[t];if(this._values[n].prior)return!0}return!1}}]),t}(),b=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultPropertyValues)}return o(t,[{key:"getValue",value:function(t){return u(this._values[t].value)}},{key:"setValue",value:function(t,e){this._values[t]=new y(this._values[t].property,null===e?void 0:u(e))}},{key:"serialize",value:function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e++){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i)}return t}},{key:"possiblyEvaluate",value:function(t){for(var e=new w(this._properties),n=0,r=Object.keys(this._values);n<r.length;n++){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e}}]),t}(),x=function(){function t(e,n,i){r(this,t),this.property=e,this.value=n,this.globals=i}return o(t,[{key:"isConstant",value:function(){return"constant"===this.value.kind}},{key:"constantOr",value:function(t){return"constant"===this.value.kind?this.value.value:t}},{key:"evaluate",value:function(t){return this.property.evaluate(this.value,this.globals,t)}}]),t}(),w=function(){function t(e){r(this,t),this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}return o(t,[{key:"get",value:function(t){return this._values[t]}}]),t}(),k=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){return a(!t.isDataDriven()),t.expression.evaluate(e)}},{key:"interpolate",value:function(t,e,n){var r=f[this.specification.type];return r?r(t,e,n):t}}]),t}(),_=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new x(this,{kind:"constant",value:t.expression.evaluate(e)},e):new x(this,t.expression,e)}},{key:"interpolate",value:function(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0!==t.value.value&&void 0!==e.value.value){var r=f[this.specification.type];return r?new x(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.globals):t}}},{key:"evaluate",value:function(t,e,n){return"constant"===t.kind?t.value:t.evaluate(e,n)}}]),t}(),S=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e);return this._calculate(n,n,n,e)}return a(!t.isDataDriven()),this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e)}}},{key:"_calculate",value:function(t,e,n,r){var i=r.zoom,o=i-Math.floor(i),a=r.crossFadingFactor();return i>r.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*a}:{from:n,to:e,fromScale:.5,toScale:1,t:1-(1-a)*o}}},{key:"interpolate",value:function(t){return t}}]),t}(),A=function(){function t(e){r(this,t),this.specification=e}return o(t,[{key:"possiblyEvaluate",value:function(){}},{key:"interpolate",value:function(){}}]),t}();p("DataDrivenProperty",_),p("DataConstantProperty",k),p("CrossFadedProperty",S),p("HeatmapColorProperty",A),t.exports={PropertyValue:y,Transitionable:v,Transitioning:g,Layout:b,PossiblyEvaluatedPropertyValue:x,PossiblyEvaluated:w,DataConstantProperty:k,DataDrivenProperty:_,CrossFadedProperty:S,HeatmapColorProperty:A,Properties:function t(e){for(var n in r(this,t),this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},e){var i=e[n],o=this.defaultPropertyValues[n]=new y(i,void 0),a=this.defaultTransitionablePropertyValues[n]=new d(i);this.defaultTransitioningPropertyValues[n]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=o.possiblyEvaluate({})}}}},function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(46),a=n(47);n(6);e.easeCubicInOut=function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},e.bezier=function(t,e,n,r){var i=new o(t,e,n,r);return function(t){return i.solve(t)}},e.ease=e.bezier(.25,.1,.25,1),e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.wrap=function(t,e,n){var r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i},e.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);var r=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--r&&n(o,i)})})},e.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},e.keysDifference=function(t,e){var n=[];for(var r in t)r in e||n.push(r);return n},e.extend=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)t[s]=a[s]}return t},e.pick=function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];i in t&&(n[i]=t[i])}return n};var s=1;e.uniqueId=function(){return s++},e.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},e.getCoordinatesCenter=function(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),n=Math.min(n,t[o].row),r=Math.max(r,t[o].column),i=Math.max(i,t[o].row);var s=r-e,u=i-n,l=Math.max(s,u),c=Math.max(0,Math.floor(-Math.log(l)/Math.LN2));return new a((e+r)/2,(n+i)/2,0).zoomTo(c)},e.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},e.mapObject=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n||this,t[i],i,t);return r},e.filterObject=function(t,e,n){var r={};for(var i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r},e.deepEqual=n(88),e.clone=function(t){return Array.isArray(t)?t.map(e.clone):"object"===i(t)&&t?e.mapObject(t,e.clone):t},e.arraysIntersect=function(t,e){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1};var u={};e.warnOnce=function(t){u[t]||("undefined"!=typeof console&&console.warn(t),u[t]=!0)},e.isCounterClockwise=function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)},e.calculateSignedArea=function(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r},e.isClosedPolygon=function(t){if(t.length<4)return!1;var n=t[0],r=t[t.length-1];return!(Math.abs(n.x-r.x)>0||Math.abs(n.y-r.y)>0)&&Math.abs(e.calculateSignedArea(t))>.01},e.sphericalToCartesian=function(t){var e=r(t,3),n=e[0],i=e[1],o=e[2];return i+=90,i*=Math.PI/180,o*=Math.PI/180,{x:n*Math.cos(i)*Math.sin(o),y:n*Math.sin(i)*Math.sin(o),z:n*Math.cos(o)}},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\"((?:[^"\\\\]|\\\\.)*)\\")))?/g,function(t,n,r,i){var o=r||i;return e[n]=!o||o.toLowerCase(),""}),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(0),o=n(48),a=n(13),s=n(14),u=s.StylePropertyFunction,l=s.StyleExpression,c=s.StyleExpressionWithErrorHandling,f=s.ZoomDependentExpression,h=s.ZoomConstantExpression,p=n(23).CompoundExpression,y=n(63),d=n(36).ImageData,v={};function m(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(!v[t],"".concat(t," is already registered.")),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),v[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}for(var g in m("Object",Object),o.serialize=function(t,e){var n=t.toArrayBuffer();return e&&e.push(n),n},o.deserialize=function(t){return new o(t)},m("Grid",o),m("Color",a),m("StylePropertyFunction",u),m("StyleExpression",l,{omit:["_evaluator"]}),m("StyleExpressionWithErrorHandling",c,{omit:["_evaluator"]}),m("ZoomDependentExpression",f),m("ZoomConstantExpression",h),m("CompoundExpression",p,{omit:["_evaluate"]}),y)y[g]._classRegistryKey||m("Expression_".concat(g),y[g]);t.exports={register:m,serialize:function t(e,n){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(e instanceof ArrayBuffer)return n&&n.push(e),e;if(ArrayBuffer.isView(e)){var o=e;return n&&n.push(o.buffer),o}if(e instanceof d)return n&&n.push(e.data.buffer),e;if(Array.isArray(e)){var a=[],s=!0,u=!1,l=void 0;try{for(var c,f=e[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value;a.push(t(h,n))}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}return a}if("object"===r(e)){var p=e.constructor,y=p._classRegistryKey;if(!y)throw new Error("can\'t serialize object of unregistered class");i(v[y]);var m={};if(p.serialize)m._serialized=p.serialize(e,n);else for(var g in e)if(e.hasOwnProperty(g)&&!(v[y].omit.indexOf(g)>=0)){var b=e[g];m[g]=v[y].shallow.indexOf(g)>=0?b:t(b,n)}return{name:y,properties:m}}throw new Error("can\'t serialize object of type ".concat(r(e)))},deserialize:function t(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof d)return e;if(Array.isArray(e))return e.map(function(e){return t(e)});if("object"===r(e)){var n=e,i=n.name,o=n.properties;if(!i)throw new Error("can\'t deserialize object of anonymous class");var a=v[i].klass;if(!a)throw new Error("can\'t deserialize unregistered class ".concat(i));if(a.deserialize)return a.deserialize(o._serialized);for(var s=Object.create(a.prototype),u=0,l=Object.keys(o);u<l.length;u++){var c=l[u];s[c]=v[i].shallow.indexOf(c)>=0?o[c]:t(o[c])}return s}throw new Error("can\'t deserialize object of type ".concat(r(e)))}}},function(t,e){var n={kind:"null"},r={kind:"number"},i={kind:"string"},o={kind:"boolean"},a={kind:"color"},s={kind:"object"},u={kind:"value"};function l(t,e){return{kind:"array",itemType:t,N:e}}function c(t){if("array"===t.kind){var e=c(t.itemType);return"number"==typeof t.N?"array<".concat(e,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(e,">")}return t.kind}var f=[n,r,i,o,a,s,l(u)];t.exports={NullType:n,NumberType:r,StringType:i,BooleanType:o,ColorType:a,ObjectType:s,ValueType:u,array:l,ErrorType:{kind:"error"},toString:c,checkSubtype:function t(e,n){if("error"===n.kind)return null;if("array"===e.kind){if("array"===n.kind&&!t(e.itemType,n.itemType)&&("number"!=typeof e.N||e.N===n.N))return null}else{if(e.kind===n.kind)return null;if("value"===e.kind)for(var r=0,i=f;r<i.length;r++)if(!t(i[r],n))return null}return"Expected ".concat(c(e)," but found ").concat(c(n)," instead.")}}},function(t,e){t.exports=function(t,e,n){this.message=(t?"".concat(t,": "):"")+n,null!=e&&e.__line__&&(this.line=e.__line__)}},function(t,e,n){"use strict";function r(t,e){this.x=t,this.y=e}t.exports=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.x+n*(this.x-e.x)-r*(this.y-e.y),o=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return t instanceof r?t:Array.isArray(t)?new r(t[0],t[1]):t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":n(t)}},function(t,e,n){t.exports=n(102)},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(2),l=n(8),c=n(103),f=n(76),h=n(1),p=h.Layout,y=h.Transitionable,d=(h.Transitioning,h.Properties,function(t){function e(t,n){var r;for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,a(e).call(this))).id=t.id,r.metadata=t.metadata,r.type=t.type,r.minzoom=t.minzoom,r.maxzoom=t.maxzoom,r.visibility="visible","background"!==t.type&&(r.source=t.source,r.sourceLayer=t["source-layer"],r.filter=t.filter),r._featureFilter=function(){return!0},n.layout&&(r._unevaluatedLayout=new p(n.layout)),r._transitionablePaint=new y(n.paint),t.paint)r.setPaintProperty(i,t.paint[i],{validate:!1});for(var s in t.layout)r.setLayoutProperty(s,t.layout[s],{validate:!1});return r._transitioningPaint=r._transitionablePaint.untransitioned(),r}var n,r,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,f),n=e,(r=[{key:"getLayoutProperty",value:function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}},{key:"setLayoutProperty",value:function(t,e,n){if(null!=e){var r="layers.".concat(this.id,".layout.").concat(t);if(this._validate(c.layoutProperty,r,t,e,n))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"}},{key:"getPaintProperty",value:function(t){return u.endsWith(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)}},{key:"setPaintProperty",value:function(t,e,n){if(null!=e){var r="layers.".concat(this.id,".paint.").concat(t);if(this._validate(c.paintProperty,r,t,e,n))return}u.endsWith(t,"-transition")?this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0):this._transitionablePaint.setValue(t,e)}},{key:"isHidden",value:function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility)}},{key:"updateTransitions",value:function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}},{key:"hasTransition",value:function(){return this._transitioningPaint.hasTransition()}},{key:"recalculate",value:function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)}},{key:"serialize",value:function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),u.filterObject(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})}},{key:"_validate",value:function(t,e,n,r,i){return(!i||!1!==i.validate)&&c.emitErrors(this,t.call(c,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:l,style:{glyphs:!0,sprite:!0}}))}},{key:"hasOffscreenPass",value:function(){return!1}},{key:"resize",value:function(){}}])&&i(n.prototype,r),h&&i(n,h),e}());t.exports=d;var v={circle:n(108),heatmap:n(112),hillshade:n(115),fill:n(117),"fill-extrusion":n(122),line:n(126),symbol:n(132),background:n(140),raster:n(142)};d.create=function(t){return new v[t.type](t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=n(0),h=n(17).StructArray,p=n(17).Struct,y=n(3).register,d=n(6),v=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.int16[r+0]=t,this.int16[r+1]=e,n}}]),e}();v.prototype.bytesPerElement=4,y("StructArrayLayout2i4",v);var m=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=n,this.int16[o+3]=r,i}}]),e}();m.prototype.bytesPerElement=8,y("StructArrayLayout4i8",m);var g=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a}}]),e}();g.prototype.bytesPerElement=12,y("StructArrayLayout2i4i12",g);var b=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=6*u,c=12*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint8[c+8]=i,this.uint8[c+9]=o,this.uint8[c+10]=a,this.uint8[c+11]=s,u}}]),e}();b.prototype.bytesPerElement=12,y("StructArrayLayout4i4ub12",b);var x=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=8*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint16[l+4]=i,this.uint16[l+5]=o,this.uint16[l+6]=a,this.uint16[l+7]=s,u}}]),e}();x.prototype.bytesPerElement=16,y("StructArrayLayout4i4ui16",x);var w=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=n,r}}]),e}();w.prototype.bytesPerElement=12,y("StructArrayLayout3f12",w);var k=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.uint32[n+0]=t,e}}]),e}();k.prototype.bytesPerElement=4,y("StructArrayLayout1ul4",k);var _=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s,u,l,c){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=n,this.int16[h+3]=r,this.int16[h+4]=i,this.int16[h+5]=o,this.uint32[p+3]=a,this.uint16[h+8]=s,this.uint16[h+9]=u,this.int16[h+10]=l,this.int16[h+11]=c,f}}]),e}();_.prototype.bytesPerElement=24,y("StructArrayLayout6i1ul2ui2i24",_);var S=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a}}]),e}();S.prototype.bytesPerElement=12,y("StructArrayLayout2i2i2i12",S);var A=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=4*n;return this.uint8[r+0]=t,this.uint8[r+1]=e,n}}]),e}();A.prototype.bytesPerElement=4,y("StructArrayLayout2ub4",A);var T=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r,i,o,a,s,u,l,c,f,h,p){var y=this.length;this.resize(y+1);var d=20*y,v=10*y,m=40*y;return this.int16[d+0]=t,this.int16[d+1]=e,this.uint16[d+2]=n,this.uint16[d+3]=r,this.uint32[v+2]=i,this.uint32[v+3]=o,this.uint32[v+4]=a,this.uint16[d+10]=s,this.uint16[d+11]=u,this.uint16[d+12]=l,this.float32[v+7]=c,this.float32[v+8]=f,this.uint8[m+36]=h,this.uint8[m+37]=p,y}}]),e}();T.prototype.bytesPerElement=40,y("StructArrayLayout2i2ui3ul3ui2f2ub40",T);var j=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.float32[n+0]=t,e}}]),e}();j.prototype.bytesPerElement=4,y("StructArrayLayout1f4",j);var O=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=n,r}}]),e}();O.prototype.bytesPerElement=6,y("StructArrayLayout3i6",O);var z=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=2*r,o=4*r;return this.uint32[i+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=n,r}}]),e}();z.prototype.bytesPerElement=8,y("StructArrayLayout1ul2ui8",z);var P=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=n,r}}]),e}();P.prototype.bytesPerElement=6,y("StructArrayLayout3ui6",P);var E=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.uint16[r+0]=t,this.uint16[r+1]=e,n}}]),e}();E.prototype.bytesPerElement=4,y("StructArrayLayout2ui4",E);var C=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.float32[r+0]=t,this.float32[r+1]=e,n}}]),e}();C.prototype.bytesPerElement=8,y("StructArrayLayout2f8",C);var M=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,h),a(e,[{key:"_refreshViews",value:function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}},{key:"emplaceBack",value:function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=n,this.float32[o+3]=r,i}}]),e}();M.prototype.bytesPerElement=16,y("StructArrayLayout4f16",M);var I=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"anchorPointX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"anchorPointY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"x1",get:function(){return this._structArray.int16[this._pos2+2]},set:function(t){this._structArray.int16[this._pos2+2]=t}},{key:"y1",get:function(){return this._structArray.int16[this._pos2+3]},set:function(t){this._structArray.int16[this._pos2+3]=t}},{key:"x2",get:function(){return this._structArray.int16[this._pos2+4]},set:function(t){this._structArray.int16[this._pos2+4]=t}},{key:"y2",get:function(){return this._structArray.int16[this._pos2+5]},set:function(t){this._structArray.int16[this._pos2+5]=t}},{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(t){this._structArray.uint32[this._pos4+3]=t}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+8]},set:function(t){this._structArray.uint16[this._pos2+8]=t}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+9]},set:function(t){this._structArray.uint16[this._pos2+9]=t}},{key:"radius",get:function(){return this._structArray.int16[this._pos2+10]},set:function(t){this._structArray.int16[this._pos2+10]=t}},{key:"signedDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+11]},set:function(t){this._structArray.int16[this._pos2+11]=t}},{key:"anchorPoint",get:function(){return new d(this.anchorPointX,this.anchorPointY)}}]),e}();I.prototype.size=24;var B=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,_),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new I(this,t)}}]),e}();y("CollisionBoxArray",B);var V=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"anchorX",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"anchorY",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"glyphStartIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(t){this._structArray.uint16[this._pos2+2]=t}},{key:"numGlyphs",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(t){this._structArray.uint16[this._pos2+3]=t}},{key:"vertexStartIndex",get:function(){return this._structArray.uint32[this._pos4+2]},set:function(t){this._structArray.uint32[this._pos4+2]=t}},{key:"lineStartIndex",get:function(){return this._structArray.uint32[this._pos4+3]},set:function(t){this._structArray.uint32[this._pos4+3]=t}},{key:"lineLength",get:function(){return this._structArray.uint32[this._pos4+4]},set:function(t){this._structArray.uint32[this._pos4+4]=t}},{key:"segment",get:function(){return this._structArray.uint16[this._pos2+10]},set:function(t){this._structArray.uint16[this._pos2+10]=t}},{key:"lowerSize",get:function(){return this._structArray.uint16[this._pos2+11]},set:function(t){this._structArray.uint16[this._pos2+11]=t}},{key:"upperSize",get:function(){return this._structArray.uint16[this._pos2+12]},set:function(t){this._structArray.uint16[this._pos2+12]=t}},{key:"lineOffsetX",get:function(){return this._structArray.float32[this._pos4+7]},set:function(t){this._structArray.float32[this._pos4+7]=t}},{key:"lineOffsetY",get:function(){return this._structArray.float32[this._pos4+8]},set:function(t){this._structArray.float32[this._pos4+8]=t}},{key:"writingMode",get:function(){return this._structArray.uint8[this._pos1+36]},set:function(t){this._structArray.uint8[this._pos1+36]=t}},{key:"hidden",get:function(){return this._structArray.uint8[this._pos1+37]},set:function(t){this._structArray.uint8[this._pos1+37]=t}}]),e}();V.prototype.size=40;var L=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,T),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new V(this,t)}}]),e}();y("PlacedSymbolArray",L);var F=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"offsetX",get:function(){return this._structArray.float32[this._pos4+0]},set:function(t){this._structArray.float32[this._pos4+0]=t}}]),e}();F.prototype.size=4;var R=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,j),a(e,[{key:"getoffsetX",value:function(t){return this.float32[1*t+0]}},{key:"get",value:function(t){return f(!this.isTransferred),new F(this,t)}}]),e}();y("GlyphOffsetArray",R);var D=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"x",get:function(){return this._structArray.int16[this._pos2+0]},set:function(t){this._structArray.int16[this._pos2+0]=t}},{key:"y",get:function(){return this._structArray.int16[this._pos2+1]},set:function(t){this._structArray.int16[this._pos2+1]=t}},{key:"tileUnitDistanceFromAnchor",get:function(){return this._structArray.int16[this._pos2+2]},set:function(t){this._structArray.int16[this._pos2+2]=t}}]),e}();D.prototype.size=6;var q=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,O),a(e,[{key:"getx",value:function(t){return this.int16[3*t+0]}},{key:"gety",value:function(t){return this.int16[3*t+1]}},{key:"gettileUnitDistanceFromAnchor",value:function(t){return this.int16[3*t+2]}},{key:"get",value:function(t){return f(!this.isTransferred),new D(this,t)}}]),e}();y("SymbolLineVertexArray",q);var N=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,p),a(e,[{key:"featureIndex",get:function(){return this._structArray.uint32[this._pos4+0]},set:function(t){this._structArray.uint32[this._pos4+0]=t}},{key:"sourceLayerIndex",get:function(){return this._structArray.uint16[this._pos2+2]},set:function(t){this._structArray.uint16[this._pos2+2]=t}},{key:"bucketIndex",get:function(){return this._structArray.uint16[this._pos2+3]},set:function(t){this._structArray.uint16[this._pos2+3]=t}}]),e}();N.prototype.size=8;var U=function(t){function e(){return i(this,e),s(this,u(e).apply(this,arguments))}return l(e,z),a(e,[{key:"get",value:function(t){return f(!this.isTransferred),new N(this,t)}}]),e}();y("FeatureIndexArray",U),t.exports={StructArrayLayout2i4:v,StructArrayLayout4i8:m,StructArrayLayout2i4i12:g,StructArrayLayout4i4ub12:b,StructArrayLayout4i4ui16:x,StructArrayLayout3f12:w,StructArrayLayout1ul4:k,StructArrayLayout6i1ul2ui2i24:_,StructArrayLayout2i2i2i12:S,StructArrayLayout2ub4:A,StructArrayLayout2i2ui3ul3ui2f2ub40:T,StructArrayLayout1f4:j,StructArrayLayout3i6:O,StructArrayLayout1ul2ui8:z,StructArrayLayout3ui6:P,StructArrayLayout2ui4:E,StructArrayLayout2f8:C,StructArrayLayout4f16:M,PosArray:v,RasterBoundsArray:m,CircleLayoutArray:v,FillLayoutArray:v,FillExtrusionLayoutArray:g,HeatmapLayoutArray:v,LineLayoutArray:b,SymbolLayoutArray:x,SymbolDynamicLayoutArray:w,SymbolOpacityArray:k,CollisionBoxLayoutArray:S,CollisionCircleLayoutArray:S,CollisionVertexArray:A,TriangleIndexArray:P,LineIndexArray:E,CollisionBoxArray:B,PlacedSymbolArray:L,GlyphOffsetArray:R,SymbolLineVertexArray:q,FeatureIndexArray:U}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(0),o=n(13),a=n(4),s=a.NullType,u=a.NumberType,l=a.StringType,c=a.BooleanType,f=a.ColorType,h=a.ObjectType,p=a.ValueType,y=a.array;t.exports={Color:o,validateRGBA:function(t,e,n,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,e,n,r].join(", "),"]: \'a\' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", "),"]: \'r\', \'g\', and \'b\' must be between 0 and 255.")},isValue:function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof o)return!0;if(Array.isArray(e)){var n=!0,i=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done);n=!0)if(!t(s.value))return!1}catch(t){i=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}return!0}if("object"===r(e)){for(var l in e)if(!t(e[l]))return!1;return!0}return!1},typeOf:function t(e){if(null===e)return s;if("string"==typeof e)return l;if("boolean"==typeof e)return c;if("number"==typeof e)return u;if(e instanceof o)return f;if(Array.isArray(e)){var n,a=e.length,d=!0,v=!1,m=void 0;try{for(var g,b=e[Symbol.iterator]();!(d=(g=b.next()).done);d=!0){var x=t(g.value);if(n){if(n===x)continue;n=p;break}n=x}}catch(t){v=!0,m=t}finally{try{d||null==b.return||b.return()}finally{if(v)throw m}}return y(n||p,a)}return i("object"===r(e)),h}}},function(t,e){function n(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}t.exports=n,t.exports.deep=function t(e){return Array.isArray(e)?e.map(t):n(e)}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(49).parseCSSColor,o=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.g=n,this.b=r,this.a=i}var e,n,o;return e=t,o=[{key:"parse",value:function(e){if(e){if(e instanceof t)return e;if("string"==typeof e){var n=i(e);if(n)return new t(n[0]/255*n[3],n[1]/255*n[3],n[2]/255*n[3],n[3])}}}}],(n=[{key:"toString",value:function(){var t=this,e=[this.r,this.g,this.b].map(function(e){return Math.round(255*e/t.a)});return"rgba(".concat(e.concat(this.a).join(","),")")}}])&&r(e.prototype,n),o&&r(e,o),t}();o.black=new o(0,0,0,1),o.white=new o(1,1,1,1),o.transparent=new o(0,0,0,0),t.exports=o},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}var c=n(0),f=n(22),h=n(50),p=n(51),y=n(33),d=n(23).CompoundExpression,v=n(59),m=n(34),g=n(61),b=n(62),x=n(63),w=n(57),k=n(15),_=n(99),S=_.success,A=_.error,T=function(){function t(e){s(this,t),this.expression=e}return l(t,[{key:"evaluate",value:function(t,e){return this._evaluator||(this._evaluator=new y),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)}}]),t}(),j=function(t){function e(t,n){var r,a;return s(this,e),(r=i(this,o(e).call(this,t)))._warningHistory={},r._defaultValue="color"===(a=n).type&&I(a.default)?new V(0,0,0,0):"color"===a.type?V.parse(a.default)||null:void 0===a.default?null:a.default,"enum"===n.type&&(r._enumValues=n.values),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,T),l(e,[{key:"evaluate",value:function(t,e){this._evaluator||(this._evaluator=new y),this._evaluator.globals=t,this._evaluator.feature=e;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new k("Expected value to be one of ".concat(Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", "),", but found ").concat(JSON.stringify(n)," instead."));return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),e}();function O(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in x}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new p(x,[],function(t){var e={color:R,string:D,number:q,enum:D,boolean:N};if("array"===t.type)return J(e[t.value]||U,t.length);return e[t.type]||null}(e)),i=r.parse(t);return i?!1===n.handleErrors?S(new T(i)):S(new j(i,e)):(c(r.errors.length>0),A(r.errors))}var P=function(){function t(e,n){s(this,t),this.kind=e,this._styleExpression=n}return l(t,[{key:"evaluate",value:function(t,e){return this._styleExpression.evaluate(t,e)}}]),t}(),E=function(){function t(e,n,r){s(this,t),this.kind=e,this.zoomStops=r.labels,this._styleExpression=n,r instanceof m&&(this._interpolationType=r.interpolation)}return l(t,[{key:"evaluate",value:function(t,e){return this._styleExpression.evaluate(t,e)}},{key:"interpolationFactor",value:function(t,e,n){return this._interpolationType?m.interpolationFactor(this._interpolationType,t,e,n):0}}]),t}();function C(t,e){if("error"===(t=z(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})).result)return t;var n=t.value.expression,r=w.isFeatureConstant(n);if(!r&&!e["property-function"])return A([new h("","property expressions not supported")]);var i=w.isGlobalPropertyConstant(n,["zoom"]);if(!i&&!1===e["zoom-function"])return A([new h("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof b)n=t(e.result);else if(e instanceof g){var r=!0,i=!1,o=void 0;try{for(var a,s=e.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(n=t(u))break}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}else(e instanceof v||e instanceof m)&&e.input instanceof d&&"zoom"===e.input.name&&(n=e);if(n instanceof h)return n;e.eachChild(function(e){var r=t(e);r instanceof h?n=r:!n&&r?n=new h("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):n&&r&&n!==r&&(n=new h("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))});return n}(n);return o||i?o instanceof h?A([o]):o instanceof m&&"piecewise-constant"===e.function?A([new h("",\'"interpolate" expressions cannot be used with this property\')]):S(o?new E(r?"camera":"composite",t.value,o):new P(r?"constant":"source",t.value)):A([new h("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')])}var M=n(35),I=M.isFunction,B=M.createFunction,V=n(11).Color,L=function(){function t(e,n){s(this,t),this._parameters=e,this._specification=n,f(this,B(this._parameters,this._specification))}return l(t,null,[{key:"deserialize",value:function(e){return new t(e._parameters,e._specification)}},{key:"serialize",value:function(t){return{_parameters:t._parameters,_specification:t._specification}}}]),t}();t.exports={StyleExpression:T,StyleExpressionWithErrorHandling:j,isExpression:O,createExpression:z,createPropertyExpression:C,normalizePropertyExpression:function(t,e){if(I(t))return new L(t,e);if(O(t)){var n=C(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=V.parse(t)),{kind:"constant",evaluate:function(){return r}}},ZoomConstantExpression:P,ZoomDependentExpression:E,StylePropertyFunction:L};var F=n(4),R=F.ColorType,D=F.StringType,q=F.NumberType,N=F.BooleanType,U=F.ValueType,J=F.array},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name="ExpressionEvaluationError",this.message=e}var e,r,i;return e=t,(r=[{key:"toJSON",value:function(){return this.message}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){var r=n(22),i=n(12),o=n(14).isExpression,a=n(35).isFunction;t.exports=function(t){var e=n(65),s=n(68),u=n(24),l={"*":function(){return[]},array:n(66),boolean:n(105),number:n(67),color:n(106),constants:n(64),enum:n(37),filter:n(38),function:n(65),layer:n(69),object:n(24),source:n(73),light:n(74),string:n(75)},c=t.value,f=t.valueSpec,h=t.styleSpec;return f.function&&a(i(c))?e(t):f.function&&o(i.deep(c))?s(t):f.type&&l[f.type]?l[f.type](t):u(r({},t,{valueSpec:f.type?h[f.type]:f}))}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(0),a={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},s=function(){function t(){i(this,t),this.isTransferred=!1,this.capacity=-1,this.resize(0)}var e,n,a;return e=t,a=[{key:"serialize",value:function(t,e){return o(!t.isTransferred),t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}},{key:"deserialize",value:function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}}],(n=[{key:"_trim",value:function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}},{key:"clear",value:function(){this.length=0}},{key:"resize",value:function(t){o(!this.isTransferred),this.reserve(t),this.length=t}},{key:"reserve",value:function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}},{key:"_refreshViews",value:function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}])&&r(e.prototype,n),a&&r(e,a),t}();function u(t,e){return Math.ceil(t/e)*e}t.exports.StructArray=s,t.exports.Struct=function t(e,n){i(this,t),this._structArray=e,this._pos1=n*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},t.exports.viewTypes=a,t.exports.createLayout=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,r=0;return{members:t.map(function(t){o(t.name.length);var i,s=(i=t.type,a[i].BYTES_PER_ELEMENT),l=n=u(n,Math.max(e,s)),c=t.components||1;return r=Math.max(r,s),n+=s*c,{name:t.name,type:t.type,components:c,offset:l}}),size:u(n,Math.max(r,e)),alignment:e}}},function(t,e){t.exports=8192},function(t,e,n){var r=n(13);function i(t,e,n){return t*(1-n)+e*n}t.exports={number:i,color:function(t,e,n){return new r(i(t.r,e.r,n),i(t.g,e.g,n),i(t.b,e.b,n),i(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return i(t,e[r],n)})}}},function(t,e,n){var r=n(2),i=n(18);var o,a=(o=16,{min:-1*Math.pow(2,o-1),max:Math.pow(2,o-1)-1});t.exports=function(t){for(var e=i/t.extent,n=t.loadGeometry(),o=0;o<n.length;o++)for(var s=n[o],u=0;u<s.length;u++){var l=s[u];l.x=Math.round(l.x*e),l.y=Math.round(l.y*e),(l.x<a.min||l.x>a.max||l.y<a.min||l.y>a.max)&&r.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}},function(t,e,n){t.exports.VectorTile=n(129),t.exports.VectorTileFeature=n(80),t.exports.VectorTileLayer=n(79)},function(t,e){t.exports=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)t[s]=a[s]}return t}},function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(4).toString,a=n(51),s=(n(33),n(0)),u=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e,this.type=n,this._evaluate=r,this.args=i}var e,n,u;return e=t,u=[{key:"parse",value:function(e,n){var i=e[0],u=t.definitions[i];if(!u)return n.error(\'Unknown expression "\'.concat(i,\'". If you wanted a literal array, use ["literal", [...]].\'),0);for(var l=Array.isArray(u)?u[0]:u.type,c=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,f=c.filter(function(t){var n=r(t,1)[0];return!Array.isArray(n)||n.length===e.length-1}),h=[],p=1;p<e.length;p++){var y=e[p],d=void 0;if(1===f.length){var v=f[0][0];d=Array.isArray(v)?v[p-1]:v.type}var m=n.parse(y,1+h.length,d);if(!m)return null;h.push(m)}var g=null,b=!0,x=!1,w=void 0;try{for(var k,_=f[Symbol.iterator]();!(b=(k=_.next()).done);b=!0){var S=r(k.value,2),A=S[0],T=S[1];if(g=new a(n.registry,n.path,null,n.scope),Array.isArray(A)&&A.length!==h.length)g.error("Expected ".concat(A.length," arguments, but found ").concat(h.length," instead."));else{for(var j=0;j<h.length;j++){var O=Array.isArray(A)?A[j]:A.type,z=h[j];g.concat(j+1).checkSubtype(O,z.type)}if(0===g.errors.length)return new t(i,l,T,h)}}}catch(t){x=!0,w=t}finally{try{b||null==_.return||_.return()}finally{if(x)throw w}}if(s(!g||g.errors.length>0),1===f.length)n.errors.push.apply(n.errors,g.errors);else{var P=(f.length?f:c).map(function(t){var e,n=r(t,1)[0];return e=n,Array.isArray(e)?"(".concat(e.map(o).join(", "),")"):"(".concat(o(e.type),"...)")}).join(" | "),E=h.map(function(t){return o(t.type)}).join(", ");n.error("Expected arguments of type ".concat(P,", but found (").concat(E,") instead."))}return null}},{key:"register",value:function(e,n){for(var r in s(!t.definitions),t.definitions=n,n)e[r]=t}}],(n=[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&i(e.prototype,n),u&&i(e,u),t}();t.exports={CompoundExpression:u,varargs:function(t){return{type:t}}}},function(t,e,n){var r=n(5),i=n(7),o=n(16);t.exports=function(t){var e=t.key,n=t.value,a=t.valueSpec||{},s=t.objectElementValidators||{},u=t.style,l=t.styleSpec,c=[],f=i(n);if("object"!==f)return[new r(e,n,"object expected, ".concat(f," found"))];for(var h in n){var p=h.split(".")[0],y=a[p]||a["*"],d=void 0;if(s[p])d=s[p];else if(a[p])d=o;else if(s["*"])d=s["*"];else{if(!a["*"]){c.push(new r(e,n[h],\'unknown property "\'.concat(h,\'"\')));continue}d=o}c=c.concat(d({key:(e?"".concat(e,"."):e)+h,value:n[h],valueSpec:y,style:u,styleSpec:l,object:n,objectKey:h},n))}for(var v in a)s[v]||a[v].required&&void 0===a[v].default&&void 0===n[v]&&c.push(new r(e,n,\'missing required property "\'.concat(v,\'"\')));return c}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2).warnOnce,o=n(3).register,a=Math.pow(2,16)-1,s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.segments=t}var n,o,s;return n=e,(o=[{key:"prepareSegment",value:function(e,n,r){var o=this.segments[this.segments.length-1];return e>a&&i("Max vertices per segment is ".concat(a,": bucket requested ").concat(e)),(!o||o.vertexLength+e>t.exports.MAX_VERTEX_ARRAY_LENGTH)&&(o={vertexOffset:n.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(o)),o}},{key:"get",value:function(){return this.segments}},{key:"destroy",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.segments[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;for(var a in o.vaos)o.vaos[a].destroy()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}}])&&r(n.prototype,o),s&&r(n,s),e}();o("SegmentVector",s),t.exports={SegmentVector:s,MAX_VERTEX_ARRAY_LENGTH:a}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(110).packUint8ToFloat,s=(n(13),n(3).register),u=n(1).PossiblyEvaluatedPropertyValue,l=n(10),c=l.StructArrayLayout1f4,f=l.StructArrayLayout2f8,h=l.StructArrayLayout4f16;function p(t){return[a(255*t.r,255*t.g),a(255*t.b,255*t.a)]}var y=function(){function t(e,n,i){r(this,t),this.value=e,this.name=n,this.type=i,this.statistics={max:-1/0}}return o(t,[{key:"defines",value:function(){return["#define HAS_UNIFORM_u_".concat(this.name)]}},{key:"populatePaintArray",value:function(){}},{key:"upload",value:function(){}},{key:"destroy",value:function(){}},{key:"setUniforms",value:function(t,e,n,r){var i=r.constantOr(this.value),o=t.gl;"color"===this.type?o.uniform4f(e.uniforms["u_".concat(this.name)],i.r,i.g,i.b,i.a):o.uniform1f(e.uniforms["u_".concat(this.name)],i)}}]),t}(),d=function(){function t(e,n,i){r(this,t),this.expression=e,this.name=n,this.type=i,this.statistics={max:-1/0};var o="color"===i?f:c;this.paintVertexAttributes=[{name:"a_".concat(n),type:"Float32",components:"color"===i?2:1,offset:0}],this.paintVertexArray=new o}return o(t,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate({zoom:0},e);if("color"===this.type)for(var o=p(i),a=r;a<t;a++)n.emplaceBack(o[0],o[1]);else{for(var s=r;s<t;s++)n.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}}},{key:"upload",value:function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"setUniforms",value:function(t,e){t.gl.uniform1f(e.uniforms["a_".concat(this.name,"_t")],0)}}]),t}(),v=function(){function t(e,n,i,o,a){r(this,t),this.expression=e,this.name=n,this.type=i,this.useIntegerZoom=o,this.zoom=a,this.statistics={max:-1/0};var s="color"===i?h:f;this.paintVertexAttributes=[{name:"a_".concat(n),type:"Float32",components:"color"===i?4:2,offset:0}],this.paintVertexArray=new s}return o(t,[{key:"defines",value:function(){return[]}},{key:"populatePaintArray",value:function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate({zoom:this.zoom},e),o=this.expression.evaluate({zoom:this.zoom+1},e);if("color"===this.type)for(var a=p(i),s=p(o),u=r;u<t;u++)n.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=r;l<t;l++)n.emplaceBack(i,o);this.statistics.max=Math.max(this.statistics.max,i,o)}}},{key:"upload",value:function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))}},{key:"destroy",value:function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},{key:"interpolationFactor",value:function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)}},{key:"setUniforms",value:function(t,e,n){t.gl.uniform1f(e.uniforms["a_".concat(this.name,"_t")],this.interpolationFactor(n.zoom))}}]),t}(),m=function(){function t(){r(this,t),this.binders={},this.cacheKey="",this._buffers=[]}return o(t,[{key:"populatePaintArrays",value:function(t,e){for(var n in this.binders)this.binders[n].populatePaintArray(t,e)}},{key:"defines",value:function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t}},{key:"setUniforms",value:function(t,e,n,r){for(var i in this.binders){this.binders[i].setUniforms(t,e,r,n.get(i))}}},{key:"getPaintVertexBuffers",value:function(){return this._buffers}},{key:"upload",value:function(t){for(var e in this.binders)this.binders[e].upload(t);var n=[];for(var r in this.binders){var i=this.binders[r];(i instanceof d||i instanceof v)&&i.paintVertexBuffer&&n.push(i.paintVertexBuffer)}this._buffers=n}},{key:"destroy",value:function(){for(var t in this.binders)this.binders[t].destroy()}}],[{key:"createDynamic",value:function(e,n,r){var i=new t,o=[];for(var a in e.paint._values)if(r(a)){var s=e.paint.get(a);if(s instanceof u&&s.property.specification["property-function"]){var l=b(a,e.type),c=s.property.specification.type,f=s.property.useIntegerZoom;"constant"===s.value.kind?(i.binders[a]=new y(s.value,l,c),o.push("/u_".concat(l))):"source"===s.value.kind?(i.binders[a]=new d(s.value,l,c),o.push("/a_".concat(l))):(i.binders[a]=new v(s.value,l,c,f,n),o.push("/z_".concat(l)))}}return i.cacheKey=o.sort().join(""),i}}]),t}(),g=function(){function t(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};r(this,t),this.programConfigurations={};var a=!0,s=!1,u=void 0;try{for(var l,c=n[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value;this.programConfigurations[f.id]=m.createDynamic(f,i,o),this.programConfigurations[f.id].layoutAttributes=e}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}return o(t,[{key:"populatePaintArrays",value:function(t,e){for(var n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e)}},{key:"get",value:function(t){return this.programConfigurations[t]}},{key:"upload",value:function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)}},{key:"destroy",value:function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()}}]),t}();function b(t,e){return{"text-opacity":"opacity","icon-opacity":"opacity","text-color":"fill_color","icon-color":"fill_color","text-halo-color":"halo_color","icon-halo-color":"halo_color","text-halo-blur":"halo_blur","icon-halo-blur":"halo_blur","text-halo-width":"halo_width","icon-halo-width":"halo_width","line-gap-width":"gapwidth"}[t]||t.replace("".concat(e,"-"),"").replace(/-/g,"_")}s("ConstantBinder",y),s("SourceExpressionBinder",d),s("CompositeExpressionBinder",v),s("ProgramConfiguration",m,{omit:["_buffers"]}),s("ProgramConfigurationSet",g),t.exports={ProgramConfiguration:m,ProgramConfigurationSet:g}},function(t,e,n){t.exports={LineIndexArray:n(10).LineIndexArray,TriangleIndexArray:n(10).TriangleIndexArray}},function(t,e,n){var r=n(2).isCounterClockwise;function i(t,e,n){if(t.length>1){if(o(t,e))return!0;for(var r=0;r<e.length;r++)if(s(e[r],t,n))return!0}for(var i=0;i<t.length;i++)if(s(t[i],e,n))return!0;return!1}function o(t,e){if(0===t.length||0===e.length)return!1;for(var n=0;n<t.length-1;n++)for(var r=t[n],i=t[n+1],o=0;o<e.length-1;o++){if(a(r,i,e[o],e[o+1]))return!0}return!1}function a(t,e,n,i){return r(t,n,i)!==r(e,n,i)&&r(t,e,n)!==r(t,e,i)}function s(t,e,n){var r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(var i=1;i<e.length;i++){if(u(t,e[i-1],e[i])<r)return!0}return!1}function u(t,e,n){var r=e.distSqr(n);if(0===r)return t.distSqr(e);var i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return i<0?t.distSqr(e):i>1?t.distSqr(n):t.distSqr(n.sub(e)._mult(i)._add(e))}function l(t,e){for(var n,r,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(n=t[a]).length-1;s<n.length;u=s++)r=n[s],i=n[u],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function c(t,e){for(var n=!1,r=0,i=t.length-1;r<t.length;i=r++){var o=t[r],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}t.exports={multiPolygonIntersectsBufferedMultiPoint:function(t,e,n){for(var r=0;r<t.length;r++)for(var i=t[r],o=0;o<e.length;o++)for(var a=e[o],u=0;u<a.length;u++){var l=a[u];if(c(i,l))return!0;if(s(l,i,n))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(t,e){if(1===t.length&&1===t[0].length)return l(e,t[0][0]);for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;i++)if(l(t,r[i]))return!0;for(var a=0;a<t.length;a++){for(var s=t[a],u=0;u<s.length;u++)if(l(e,s[u]))return!0;for(var c=0;c<e.length;c++)if(o(s,e[c]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(t,e,n){for(var r=0;r<e.length;r++)for(var o=e[r],a=0;a<t.length;a++){var s=t[a];if(s.length>=3)for(var u=0;u<o.length;u++)if(c(s,o[u]))return!0;if(i(s,o,n))return!0}return!1},polygonIntersectsPolygon:function(t,e){for(var n=0;n<t.length;n++)if(c(e,t[n]))return!0;for(var r=0;r<e.length;r++)if(c(t,e[r]))return!0;return!!o(t,e)},distToSegmentSquared:u}},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(0),s=n(3).register;function u(t,e,n,r){var i=e.width,o=e.height;if(r){if(r.length!==i*o*n)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*o*n);return t.width=i,t.height=o,t.data=r,t}function l(t,e,n){var r=e.width,i=e.height;if(r!==t.width||i!==t.height){var o=u({},{width:r,height:i},n);c(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,r),height:Math.min(t.height,i)},n),t.width=r,t.height=i,t.data=o.data}}function c(t,e,n,r,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");var s=t.data,u=e.data;a(s!==u);for(var l=0;l<i.height;l++)for(var c=((n.y+l)*t.width+n.x)*o,f=((r.y+l)*e.width+r.x)*o,h=0;h<i.width*o;h++)u[f+h]=s[c+h];return e}var f=function(){function t(e,n){r(this,t),u(this,e,1,n)}return o(t,[{key:"resize",value:function(t){l(this,t,1)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(t,e,n,r,i){c(t,e,n,r,i,1)}}]),t}(),h=function(){function t(e,n){r(this,t),u(this,e,4,n)}return o(t,[{key:"resize",value:function(t){l(this,t,4)}},{key:"clone",value:function(){return new t({width:this.width,height:this.height},new Uint8Array(this.data))}}],[{key:"copy",value:function(t,e,n,r,i){c(t,e,n,r,i,4)}}]),t}();s("AlphaImage",f),s("RGBAImage",h),t.exports={AlphaImage:f,RGBAImage:h}},function(t,e,n){var r=n(6);t.exports={getMaximumPaintValue:function(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).binders[t].statistics.max},translateDistance:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},translate:function(t,e,n,i,o){if(!e[0]&&!e[1])return t;var a=r.convert(e);"viewport"===n&&a._rotate(-i);for(var s=[],u=0;u<t.length;u++){for(var l=t[u],c=[],f=0;f<l.length;f++)c.push(l[f].sub(a._mult(o)));s.push(c)}return s}}},function(t,e,n){var r=n(136);t.exports.allowsIdeographicBreaking=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!e.charAllowsIdeographicBreaking(s.charCodeAt(0)))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0},t.exports.allowsVerticalWritingMode=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(e.charHasUprightVerticalOrientation(s.charCodeAt(0)))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1},t.exports.allowsLetterSpacing=function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!e.charAllowsLetterSpacing(s.charCodeAt(0)))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0},t.exports.charAllowsLetterSpacing=function(t){return!r.Arabic(t)&&(!r["Arabic Supplement"](t)&&(!r["Arabic Extended-A"](t)&&(!r["Arabic Presentation Forms-A"](t)&&!r["Arabic Presentation Forms-B"](t))))},t.exports.charAllowsIdeographicBreaking=function(t){return!(t<11904)&&(!!r["Bopomofo Extended"](t)||(!!r.Bopomofo(t)||(!!r["CJK Compatibility Forms"](t)||(!!r["CJK Compatibility Ideographs"](t)||(!!r["CJK Compatibility"](t)||(!!r["CJK Radicals Supplement"](t)||(!!r["CJK Strokes"](t)||(!!r["CJK Symbols and Punctuation"](t)||(!!r["CJK Unified Ideographs Extension A"](t)||(!!r["CJK Unified Ideographs"](t)||(!!r["Enclosed CJK Letters and Months"](t)||(!!r["Halfwidth and Fullwidth Forms"](t)||(!!r.Hiragana(t)||(!!r["Ideographic Description Characters"](t)||(!!r["Kangxi Radicals"](t)||(!!r["Katakana Phonetic Extensions"](t)||(!!r.Katakana(t)||(!!r["Vertical Forms"](t)||(!!r["Yi Radicals"](t)||!!r["Yi Syllables"](t))))))))))))))))))))},e.charHasUprightVerticalOrientation=function(t){return 746===t||747===t||!(t<4352)&&(!!r["Bopomofo Extended"](t)||(!!r.Bopomofo(t)||(!(!r["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||(!!r["CJK Compatibility Ideographs"](t)||(!!r["CJK Compatibility"](t)||(!!r["CJK Radicals Supplement"](t)||(!!r["CJK Strokes"](t)||(!(!r["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!r["CJK Unified Ideographs Extension A"](t)||(!!r["CJK Unified Ideographs"](t)||(!!r["Enclosed CJK Letters and Months"](t)||(!!r["Hangul Compatibility Jamo"](t)||(!!r["Hangul Jamo Extended-A"](t)||(!!r["Hangul Jamo Extended-B"](t)||(!!r["Hangul Jamo"](t)||(!!r["Hangul Syllables"](t)||(!!r.Hiragana(t)||(!!r["Ideographic Description Characters"](t)||(!!r.Kanbun(t)||(!!r["Kangxi Radicals"](t)||(!!r["Katakana Phonetic Extensions"](t)||(!(!r.Katakana(t)||12540===t)||(!(!r["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||(!(!r["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!r["Unified Canadian Aboriginal Syllabics"](t)||(!!r["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!r["Vertical Forms"](t)||(!!r["Yijing Hexagram Symbols"](t)||(!!r["Yi Syllables"](t)||!!r["Yi Radicals"](t))))))))))))))))))))))))))))))},e.charHasNeutralVerticalOrientation=function(t){return!(!r["Latin-1 Supplement"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!r["General Punctuation"](t)||8214!==t&&8224!==t&&8225!==t&&8240!==t&&8241!==t&&8251!==t&&8252!==t&&8258!==t&&8263!==t&&8264!==t&&8265!==t&&8273!==t)||(!!r["Letterlike Symbols"](t)||(!!r["Number Forms"](t)||(!(!r["Miscellaneous Technical"](t)||!(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215))||(!(!r["Control Pictures"](t)||9251===t)||(!!r["Optical Character Recognition"](t)||(!!r["Enclosed Alphanumerics"](t)||(!!r["Geometric Shapes"](t)||(!(!r["Miscellaneous Symbols"](t)||t>=9754&&t<=9759)||(!(!r["Miscellaneous Symbols and Arrows"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!r["CJK Symbols and Punctuation"](t)||(!!r.Katakana(t)||(!!r["Private Use Area"](t)||(!!r["CJK Compatibility Forms"](t)||(!!r["Small Form Variants"](t)||(!!r["Halfwidth and Fullwidth Forms"](t)||(8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)))))))))))))))))},e.charHasRotatedVerticalOrientation=function(t){return!(e.charHasUprightVerticalOrientation(t)||e.charHasNeutralVerticalOrientation(t))}},function(t,e,n){"use strict";t.exports=i;var r=n(146);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;function o(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function u(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function l(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function c(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function m(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function g(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=m(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=m(this.buf,this.pos)+4294967296*m(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=m(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return a(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return a(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,n){var r="",i=e;for(;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=o(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&s(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&s(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=n(52),a=n(11).Color,s=["Unknown","Point","LineString","Polygon"],u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scope=new o,this._parseColorCache={}}var e,n,u;return e=t,(n=[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?"number"==typeof this.feature.type?s[this.feature.type]:this.feature.type:null}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"pushScope",value:function(t){this.scope=this.scope.concat(t)}},{key:"popScope",value:function(){i(this.scope.parent),this.scope=this.scope.parent}},{key:"parseColor",value:function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=a.parse(t)),e}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function o(t,e){return s(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t){if(Array.isArray(t))return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=n(46),c=n(19),f=n(4),h=f.toString,p=f.NumberType,y=n(60).findStopLessThanOrEqualTo,d=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];var a=!0,s=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=o(l.value,2),h=f[0],p=f[1];this.labels.push(h),this.outputs.push(p)}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}var e,n,f;return e=t,f=[{key:"interpolationFactor",value:function(t,e,n,r){var i=0;if("exponential"===t.name)i=v(e,t.base,n,r);else if("linear"===t.name)i=v(e,1,n,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new l(o[0],o[1],o[2],o[3]).solve(v(e,1,n,r))}return i}},{key:"parse",value:function(e,n){var r,o=s(r=e)||i(r)||a(),u=o[1],l=o[2],c=o.slice(3);if(!Array.isArray(u)||0===u.length)return n.error("Expected an interpolation type expression.",1);if("linear"===u[0])u={name:"linear"};else if("exponential"===u[0]){var f=u[1];if("number"!=typeof f)return n.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:f}}else{if("cubic-bezier"!==u[0])return n.error("Unknown interpolation type ".concat(String(u[0])),1,0);var y=u.slice(1);if(4!==y.length||y.some(function(t){return"number"!=typeof t||t<0||t>1}))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:y}}if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(l=n.parse(l,2,p)))return null;var d=[],v=null;n.expectedType&&"value"!==n.expectedType.kind&&(v=n.expectedType);for(var m=0;m<c.length;m+=2){var g=c[m],b=c[m+1],x=m+3,w=m+4;if("number"!=typeof g)return n.error(\'Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.\',x);if(d.length&&d[d.length-1][0]>=g)return n.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',x);var k=n.parse(b,w,v);if(!k)return null;v=v||k.type,d.push([g,k])}return"number"===v.kind||"color"===v.kind||"array"===v.kind&&"number"===v.itemType.kind&&"number"==typeof v.N?new t(v,u,l,d):n.error("Type ".concat(h(v)," is not interpolatable."))}}],(n=[{key:"evaluate",value:function(e){var n=this.labels,r=this.outputs;if(1===n.length)return r[0].evaluate(e);var i=this.input.evaluate(e);if(i<=n[0])return r[0].evaluate(e);var o=n.length;if(i>=n[o-1])return r[o-1].evaluate(e);var a=y(n,i),s=n[a],u=n[a+1],l=t.interpolationFactor(this.interpolation,i,s,u),f=r[a].evaluate(e),h=r[a+1].evaluate(e);return c[this.type.kind.toLowerCase()](f,h,l)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()})))}}])&&u(e.prototype,n),f&&u(e,f),t}();function v(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}t.exports=d},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(100),o=n(13),a=n(22),s=n(7),u=n(19),l=n(34);function c(t){return t}function f(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function h(t,e,n,i,o){return f(r(n)===o?i[n]:void 0,t.default,e.default)}function p(t,e,n){if("number"!==s(n))return f(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=v(t.stops,n);return t.stops[i][1]}function y(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==s(n))return f(t.default,e.default);var o=t.stops.length;if(1===o)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[o-1][0])return t.stops[o-1][1];var a=v(t.stops,n),l=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[a][0],t.stops[a+1][0]),h=t.stops[a][1],p=t.stops[a+1][1],y=u[e.type]||c;if(t.colorSpace&&"rgb"!==t.colorSpace){var d=i[t.colorSpace];y=function(t,e){return d.reverse(d.interpolate(d.forward(t),d.forward(e),l))}}return"function"==typeof h.evaluate?{evaluate:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=h.evaluate.apply(void 0,e),i=p.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==i)return y(r,i,l)}}:y(h,p,l)}function d(t,e,n){return"color"===e.type?n=o.parse(n):s(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),f(n,t.default,e.default)}function v(t,e){for(var n,r,i=0,o=t.length-1,a=0;i<=o;){if(n=t[a=Math.floor((i+o)/2)][0],r=t[a+1][0],e===n||e>n&&e<r)return a;n<e?i=a+1:n>e&&(o=a-1)}return Math.max(a-1,0)}t.exports={createFunction:function t(e,n){var s,u,c,v="color"===n.type,m=e.stops&&"object"===r(e.stops[0][0]),g=m||void 0!==e.property,b=m||!g,x=e.type||("interpolated"===n.function?"exponential":"interval");if(v&&((e=a({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],o.parse(t[1])]})),e.default?e.default=o.parse(e.default):e.default=o.parse(n.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!i[e.colorSpace])throw new Error("Unknown color space: ".concat(e.colorSpace));if("exponential"===x)s=y;else if("interval"===x)s=p;else if("categorical"===x){s=h,u=Object.create(null);var w=!0,k=!1,_=void 0;try{for(var S,A=e.stops[Symbol.iterator]();!(w=(S=A.next()).done);w=!0){var T=S.value;u[T[0]]=T[1]}}catch(t){k=!0,_=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw _}}c=r(e.stops[0][0])}else{if("identity"!==x)throw new Error(\'Unknown function type "\'.concat(x,\'"\'));s=d}if(m){for(var j={},O=[],z=0;z<e.stops.length;z++){var P=e.stops[z],E=P[0].zoom;void 0===j[E]&&(j[E]={zoom:E,type:e.type,property:e.property,default:e.default,stops:[]},O.push(E)),j[E].stops.push([P[0].value,P[1]])}for(var C=[],M=0,I=O;M<I.length;M++){var B=I[M];C.push([j[B].zoom,t(j[B],n)])}return{kind:"composite",interpolationFactor:l.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:C.map(function(t){return t[0]}),evaluate:function(t,r){var i=t.zoom;return y({stops:C,base:e.base},n,i).evaluate(i,r)}}}return b?{kind:"camera",interpolationFactor:"exponential"===x?l.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var r=t.zoom;return s(e,n,r,u,c)}}:{kind:"source",evaluate:function(t,r){var i=r&&r.properties?r.properties[e.property]:void 0;return void 0===i?f(e.default,n.default):s(e,n,i,u,c)}}},isFunction:function(t){return"object"===r(t)&&null!==t&&!Array.isArray(t)}}},function(t,e){t.exports=self},function(t,e,n){var r=n(5),i=n(12);t.exports=function(t){var e=t.key,n=t.value,o=t.valueSpec,a=[];return Array.isArray(o.values)?-1===o.values.indexOf(i(n))&&a.push(new r(e,n,"expected one of [".concat(o.values.join(", "),"], ").concat(JSON.stringify(n)," found"))):-1===Object.keys(o.values).indexOf(i(n))&&a.push(new r(e,n,"expected one of [".concat(Object.keys(o.values).join(", "),"], ").concat(JSON.stringify(n)," found"))),a}},function(t,e,n){var r=n(5),i=n(68),o=n(37),a=n(7),s=n(12),u=n(22),l=n(39).isExpressionFilter;t.exports=function(t){return l(s.deep(t.value))?i(u({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value;var i=e.key;if("array"!==a(n))return[new r(i,n,"array expected, ".concat(a(n)," found"))];var u=e.styleSpec;var l;var c=[];if(n.length<1)return[new r(i,n,"filter array must have at least 1 element")];c=c.concat(o({key:"".concat(i,"[0]"),value:n[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec}));switch(s(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===s(n[1])&&c.push(new r(i,n,\'"$type" cannot be use with operator "\'.concat(n[0],\'"\')));case"==":case"!=":3!==n.length&&c.push(new r(i,n,\'filter array for operator "\'.concat(n[0],\'" must have 3 elements\')));case"in":case"!in":n.length>=2&&"string"!==(l=a(n[1]))&&c.push(new r("".concat(i,"[1]"),n[1],"string expected, ".concat(l," found")));for(var f=2;f<n.length;f++)l=a(n[f]),"$type"===s(n[1])?c=c.concat(o({key:"".concat(i,"[").concat(f,"]"),value:n[f],valueSpec:u.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==l&&"number"!==l&&"boolean"!==l&&c.push(new r("".concat(i,"[").concat(f,"]"),n[f],"string, number, or boolean expected, ".concat(l," found")));break;case"any":case"all":case"none":for(var h=1;h<n.length;h++)c=c.concat(t({key:"".concat(i,"[").concat(h,"]"),value:n[h],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":l=a(n[1]),2!==n.length?c.push(new r(i,n,\'filter array for "\'.concat(n[0],\'" operator must have 2 elements\'))):"string"!==l&&c.push(new r("".concat(i,"[1]"),n[1],"string expected, ".concat(l," found")))}return c}(t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(14).createExpression;function o(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case"any":case"all":var e=!0,n=!1,r=void 0;try{for(var i,a=t.slice(1)[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var s=i.value;if(!o(s)&&"boolean"!=typeof s)return!1}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return!0;default:return!0}}t.exports=function(t){if(!t)return function(){return!0};o(t)||(t=u(t));var e=i(t,a);if("error"===e.result)throw new Error(e.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return function(t,n){return e.value.evaluate(t,n)}},t.exports.isExpressionFilter=o;var a={type:"boolean",default:!1,function:!0,"property-function":!0,"zoom-function":!0};function s(t,e){return t<e?-1:t>e?1:0}function u(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?l(t[1],t[2],"=="):"!="===n?h(l(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?l(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(u))):"all"===n?["all"].concat(t.slice(1).map(u)):"none"===n?["all"].concat(t.slice(1).map(u).map(h)):"in"===n?c(t[1],t.slice(2)):"!in"===n?h(c(t[1],t.slice(2))):"has"===n?f(t[1]):"!has"!==n||h(f(t[1]))}function l(t,e,n){switch(t){case"$type":return["filter-type-".concat(n),e];case"$id":return["filter-id-".concat(n),e];default:return["filter-".concat(n),t,e]}}function c(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return r(t)!==r(e[0])})?["filter-in-large",t,["literal",e.sort(s)]]:["filter-in-small",t,["literal",e]]}}function f(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function h(t){return["!",t]}},function(t,e,n){var r=n(120),i=n(2).calculateSignedArea;function o(t,e){return e.area-t.area}t.exports=function(t,e){var n=t.length;if(n<=1)return[t];for(var a,s,u=[],l=0;l<n;l++){var c=i(t[l]);0!==c&&(t[l].area=Math.abs(c),void 0===s&&(s=c<0),s===c<0?(a&&u.push(a),a=[t[l]]):a.push(t[l]))}if(a&&u.push(a),e>1)for(var f=0;f<u.length;f++)u[f].length<=e||(r(u[f],e,1,u[f].length-1,o),u[f]=u[f].slice(0,e));return u}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(131),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e,n?(this.now=n.now,this.fadeDuration=n.fadeDuration,this.zoomHistory=n.zoomHistory,this.transition=n.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new i,this.transition={})}var e,n,o;return e=t,(n=[{key:"crossFadingFactor",value:function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(133),s=a.symbolLayoutAttributes,u=a.collisionVertexAttributes,l=a.collisionBoxLayout,c=a.collisionCircleLayout,f=a.dynamicLayoutAttributes,h=n(10),p=h.SymbolLayoutArray,y=h.SymbolDynamicLayoutArray,d=h.SymbolOpacityArray,v=h.CollisionBoxLayoutArray,m=h.CollisionCircleLayoutArray,g=h.CollisionVertexArray,b=h.PlacedSymbolArray,x=h.GlyphOffsetArray,w=h.SymbolLineVertexArray,k=n(6),_=n(25).SegmentVector,S=n(26).ProgramConfigurationSet,A=n(27),T=A.TriangleIndexArray,j=A.LineIndexArray,O=n(134),z=n(135),P=n(31),E=n(20),C=n(21).VectorTileFeature.types,M=n(81),I=(n(45),n(137).getSizeData),B=n(3).register,V=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function L(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,Math.round(64*r),Math.round(64*i),o,a,s?s[0]:0,s?s[1]:0)}function F(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}var R=function(){function t(e){r(this,t),this.layoutVertexArray=new p,this.indexArray=new T,this.programConfigurations=e,this.segments=new _,this.dynamicLayoutVertexArray=new y,this.opacityVertexArray=new d,this.placedSymbolArray=new b}return o(t,[{key:"upload",value:function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,s.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,f.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,V,!0),this.opacityVertexBuffer.itemSize=1}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}]),t}();B("SymbolBuffers",R);var D=function(){function t(e,n,i){r(this,t),this.layoutVertexArray=new e,this.layoutAttributes=n,this.indexArray=new i,this.segments=new _,this.collisionVertexArray=new g}return o(t,[{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,u.members,!0)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}]),t}();B("CollisionBuffers",D);var q=function(){function t(e){r(this,t),this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.pixelRatio=e.pixelRatio;var n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=I(this.zoom,n["text-size"]),this.iconSizeData=I(this.zoom,n["icon-size"]);var i=this.layers[0].layout;this.sortFeaturesByY=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")}return o(t,[{key:"createArrays",value:function(){this.text=new R(new S(s.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new R(new S(s.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new D(v,l.members,j),this.collisionCircle=new D(m,c.members,T),this.glyphOffsetArray=new x,this.lineVertexArray=new w}},{key:"populate",value:function(t,e){var n=this.layers[0],r=n.layout,i=r.get("text-font"),o=r.get("text-field"),a=r.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.length>0)&&("constant"!==i.value.kind||i.value.value.length>0),u="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||u){var l=e.iconDependencies,c=e.glyphDependencies,f={zoom:this.zoom},h=!0,p=!1,y=void 0;try{for(var d,v=t[Symbol.iterator]();!(h=(d=v.next()).done);h=!0){var m=d.value,g=m.feature,b=m.index,x=m.sourceLayerIndex;if(n._featureFilter(f,g)){var w=void 0;s&&(w=n.getValueAndResolveTokens("text-field",g),w=O(w,n,g));var k=void 0;if(u&&(k=n.getValueAndResolveTokens("icon-image",g)),w||k){var _={text:w,icon:k,index:b,sourceLayerIndex:x,geometry:E(g),properties:g.properties,type:C[g.type]};if(void 0!==g.id&&(_.id=g.id),this.features.push(_),k&&(l[k]=!0),w)for(var S=i.evaluate(g).join(","),A=c[S]=c[S]||{},T="map"===r.get("text-rotation-alignment")&&"line"===r.get("symbol-placement"),j=P.allowsVerticalWritingMode(w),I=0;I<w.length;I++)if(A[w.charCodeAt(I)]=!0,T&&j){var B=M.lookup[w.charAt(I)];B&&(A[B.charCodeAt(0)]=!0)}}}}}catch(t){p=!0,y=t}finally{try{h||null==v.return||v.return()}finally{if(p)throw y}}"line"===r.get("symbol-placement")&&(this.features=z(this.features))}}},{key:"isEmpty",value:function(){return 0===this.symbolInstances.length}},{key:"upload",value:function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)}},{key:"destroy",value:function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()}},{key:"addToLineVertexArray",value:function(t,e){var n=this.lineVertexArray.length;if(void 0!==t.segment){for(var r=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:r},a<e.length-1&&(r+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}},{key:"addSymbols",value:function(t,e,n,r,i,o,a,s,u,l){var c=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),y=this.glyphOffsetArray.length,d=p.vertexLength,v=!0,m=!1,g=void 0;try{for(var b,x=e[Symbol.iterator]();!(v=(b=x.next()).done);v=!0){var w=b.value,k=w.tl,_=w.tr,S=w.bl,A=w.br,T=w.tex,j=p.vertexLength,O=w.glyphOffset[1];L(f,s.x,s.y,k.x,O+k.y,T.x,T.y,n),L(f,s.x,s.y,_.x,O+_.y,T.x+T.w,T.y,n),L(f,s.x,s.y,S.x,O+S.y,T.x,T.y+T.h,n),L(f,s.x,s.y,A.x,O+A.y,T.x+T.w,T.y+T.h,n),F(h,s,0),c.emplaceBack(j,j+1,j+2),c.emplaceBack(j+1,j+2,j+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(w.glyphOffset[0])}}catch(t){m=!0,g=t}finally{try{v||null==x.return||x.return()}finally{if(m)throw g}}t.placedSymbolArray.emplaceBack(s.x,s.y,y,this.glyphOffsetArray.length-y,d,u,l,s.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o)}},{key:"_addCollisionDebugVertex",value:function(t,e,n,r,i){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,r.x,r.y,Math.round(i.x),Math.round(i.y))}},{key:"addCollisionDebugVertices",value:function(t,e,n,r,i,o,a,s){var u=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=u.vertexLength,c=i.layoutVertexArray,f=i.collisionVertexArray;if(this._addCollisionDebugVertex(c,f,o,a.anchor,new k(t,e)),this._addCollisionDebugVertex(c,f,o,a.anchor,new k(n,e)),this._addCollisionDebugVertex(c,f,o,a.anchor,new k(n,r)),this._addCollisionDebugVertex(c,f,o,a.anchor,new k(t,r)),u.vertexLength+=4,s){var h=i.indexArray;h.emplaceBack(l,l+1,l+2),h.emplaceBack(l,l+2,l+3),u.primitiveLength+=2}else{var p=i.indexArray;p.emplaceBack(l,l+1),p.emplaceBack(l+1,l+2),p.emplaceBack(l+2,l+3),p.emplaceBack(l+3,l),u.primitiveLength+=4}}},{key:"generateCollisionDebugBuffers",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.symbolInstances[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;o.textCollisionFeature={boxStartIndex:o.textBoxStartIndex,boxEndIndex:o.textBoxEndIndex},o.iconCollisionFeature={boxStartIndex:o.iconBoxStartIndex,boxEndIndex:o.iconBoxEndIndex};for(var a=0;a<2;a++){var s=o[0===a?"textCollisionFeature":"iconCollisionFeature"];if(s)for(var u=s.boxStartIndex;u<s.boxEndIndex;u++){var l=this.collisionBoxArray.get(u),c=l.x1,f=l.y1,h=l.x2,p=l.y2,y=l.radius>0;this.addCollisionDebugVertices(c,f,h,p,y?this.collisionCircle:this.collisionBox,l.anchorPoint,o,y)}}}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}},{key:"deserializeCollisionBoxes",value:function(t,e,n,r,i){for(var o={},a=e;a<n;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY};break}o.textCircles||(o.textCircles=[]);o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var u=r;u<i;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY};break}}return o}},{key:"hasTextData",value:function(){return this.text.segments.get().length>0}},{key:"hasIconData",value:function(){return this.icon.segments.get().length>0}},{key:"hasCollisionBoxData",value:function(){return this.collisionBox.segments.get().length>0}},{key:"hasCollisionCircleData",value:function(){return this.collisionCircle.segments.get().length>0}},{key:"sortFeatures",value:function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var n=[],r=0;r<this.symbolInstances.length;r++)n.push(r);var i=Math.sin(t),o=Math.cos(t);n.sort(function(t,n){var r=e.symbolInstances[t],a=e.symbolInstances[n];return(i*r.anchor.x+o*r.anchor.y|0)-(i*a.anchor.x+o*a.anchor.y|0)||a.featureIndex-r.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear();for(var a=0,s=n;a<s.length;a++){var u=s[a],l=this.symbolInstances[u],c=!0,f=!1,h=void 0;try{for(var p,y=l.placedTextSymbolIndices[Symbol.iterator]();!(c=(p=y.next()).done);c=!0)for(var d=p.value,v=this.text.placedSymbolArray.get(d),m=v.vertexStartIndex+4*v.numGlyphs,g=v.vertexStartIndex;g<m;g+=4)this.text.indexArray.emplaceBack(g,g+1,g+2),this.text.indexArray.emplaceBack(g+1,g+2,g+3)}catch(t){f=!0,h=t}finally{try{c||null==y.return||y.return()}finally{if(f)throw h}}var b=this.icon.placedSymbolArray.get(u);if(b.numGlyphs){var x=b.vertexStartIndex;this.icon.indexArray.emplaceBack(x,x+1,x+2),this.icon.indexArray.emplaceBack(x+1,x+2,x+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}]),t}();B("SymbolBucket",q,{omit:["layers","collisionBoxArray","features","compareText"],shallow:["symbolInstances"]}),q.MAX_GLYPHS=65535,q.addDynamicAttributes=F,t.exports=q},function(t,e,n){var r=n(44),i=n(76),o=n(36),a=!1,s=null;t.exports.evented=new i,t.exports.registerForPluginAvailability=function(e){return s?e({pluginBlobURL:s,errorCallback:t.exports.errorCallback}):t.exports.evented.once("pluginAvailable",e),e},t.exports.createBlobURL=function(t){return o.URL.createObjectURL(new o.Blob([t.data],{type:"text/javascript"}))},t.exports.clearRTLTextPlugin=function(){a=!1,s=null},t.exports.setRTLTextPlugin=function(e,n){if(a)throw new Error("setRTLTextPlugin cannot be called multiple times.");a=!0,t.exports.errorCallback=n,r.getArrayBuffer({url:e},function(e,r){e?n(e):r&&(s=t.exports.createBlobURL(r),t.exports.evented.fire("pluginAvailable",{pluginBlobURL:s,errorCallback:n}))})},t.exports.applyArabicShaping=null,t.exports.processBidirectionalText=null},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,t)})(t)}function a(t,e,n){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=n(36),c={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};e.ResourceType=c,"function"==typeof Object.freeze&&Object.freeze(c);var f=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=i(this,u(e).call(this,t))).status=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,o(Error)),e}();function h(t){var e=new l.XMLHttpRequest;for(var n in e.open("GET",t.url,!0),t.headers)e.setRequestHeader(n,t.headers[n]);return e.withCredentials="include"===t.credentials,e}e.getJSON=function(t,e){var n=h(t);return n.setRequestHeader("Accept","application/json"),n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var t;try{t=JSON.parse(n.response)}catch(t){return e(t)}e(null,t)}else e(new f(n.statusText,n.status))},n.send(),n},e.getArrayBuffer=function(t,e){var n=h(t);return n.responseType="arraybuffer",n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){var t=n.response;if(0===t.byteLength&&200===n.status)return e(new Error("http status 200 returned without content."));n.status>=200&&n.status<300&&n.response?e(null,{data:t,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")}):e(new f(n.statusText,n.status))},n.send(),n};e.getImage=function(t,n){return e.getArrayBuffer(t,function(t,e){if(t)n(t);else if(e){var r=new l.Image,i=l.URL||l.webkitURL;r.onload=function(){n(null,r),i.revokeObjectURL(r.src)};var o=new l.Blob([new Uint8Array(e.data)],{type:"image/png"});r.cacheControl=e.cacheControl,r.expires=e.expires,r.src=e.data.byteLength?i.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},e.getVideo=function(t,e){var n,r,i=l.document.createElement("video");i.onloadstart=function(){e(null,i)};for(var o=0;o<t.length;o++){var a=l.document.createElement("source");n=t[o],r=void 0,(r=l.document.createElement("a")).href=n,(r.protocol!==l.document.location.protocol||r.host!==l.document.location.host)&&(i.crossOrigin="Anonymous"),a.src=t[o],i.appendChild(a)}return i}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(6),l=n(3).register,c=function(t){function e(t,n,r,i){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=o(this,a(e).call(this,t,n))).angle=r,void 0!==i&&(s.segment=i),s}var n,r,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"clone",value:function(){return new e(this.x,this.y,this.angle,this.segment)}}])&&i(n.prototype,r),l&&i(n,l),e}();l("Anchor",c),t.exports=c},function(t,e){function n(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=n,this.p2y=r}t.exports=n,n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var n,r,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.column=e,this.row=n,this.zoom=r}var e,r,i;return e=t,(r=[{key:"clone",value:function(){return new t(this.column,this.row,this.zoom)}},{key:"zoomTo",value:function(t){return this.clone()._zoomTo(t)}},{key:"sub",value:function(t){return this.clone()._sub(t)}},{key:"_zoomTo",value:function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this}},{key:"_sub",value:function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){"use strict";t.exports=i;var r=3;function i(t,e,n){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],n=o[2],this.d=e+2*n;for(var a=0;a<this.d*this.d;a++){var s=o[r+a],u=o[r+a+1];i.push(s===u?null:o.subarray(s,u))}var l=o[r+i.length],c=o[r+i.length+1];this.keys=o.subarray(l,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*n;for(var f=0;f<this.d*this.d;f++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;var h=n/e*t;this.min=-h,this.max=t+h}i.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},i.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},i.prototype._insertCell=function(t,e,n,r,i,o){this.cells[i].push(o)},i.prototype.query=function(t,e,n,r,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,n,r,this._queryCell,s,{},i),s},i.prototype._queryCell=function(t,e,n,r,i,o,a,s){var u=this.cells[i];if(null!==u)for(var l=this.keys,c=this.bboxes,f=0;f<u.length;f++){var h=u[f];if(void 0===a[h]){var p=4*h;(s?s(c[p+0],c[p+1],c[p+2],c[p+3]):t<=c[p+2]&&e<=c[p+3]&&n>=c[p+0]&&r>=c[p+1])?(a[h]=!0,o.push(l[h])):a[h]=!1}}},i.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(n),f=this._convertToCellCoord(r),h=u;h<=c;h++)for(var p=l;p<=f;p++){var y=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,n,r,y,o,a,s))return}},i.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},i.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},i.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=r+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var o=new Int32Array(e+n+this.keys.length+this.bboxes.length);o[0]=this.extent,o[1]=this.n,o[2]=this.padding;for(var a=e,s=0;s<t.length;s++){var u=t[s];o[r+s]=a,o.set(u,a),a+=u.length}return o[r+t.length]=a,o.set(this.keys,a),a+=this.keys.length,o[r+t.length+1]=a,o.set(this.bboxes,a),a+=this.bboxes.length,o.buffer}},function(t,e){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in n)return n[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=i.indexOf("("),l=i.indexOf(")");if(-1!==u&&l+1===i.length){var c=i.substr(0,u),f=i.substr(u+1,l-(u+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)return null;h=a(f.pop());case"rgb":return 3!==f.length?null:[o(f[0]),o(f[1]),o(f[2]),h];case"hsla":if(4!==f.length)return null;h=a(f.pop());case"hsl":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,y=a(f[1]),d=a(f[2]),v=d<=.5?d*(y+1):d+y-d*y,m=2*d-v;return[r(255*s(m,v,p+1/3)),r(255*s(m,v,p)),r(255*s(m,v,p-1/3)),h];default:return null}}return null}}catch(t){}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function i(t){var e="function"==typeof Map?new Map:void 0;return(i=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return o(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)})(t)}function o(t,e,n){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=function(t){function e(t,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=r(this,s(e).call(this,n))).message=n,i.key=t,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,i(Error)),e}();t.exports=u},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(52),a=n(4).checkSubtype,s=n(50),u=n(53),l=n(54),c=n(55),f=n(56),h=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registry=e,this.path=n,this.key=n.map(function(t){return"[".concat(t,"]")}).join(""),this.scope=i,this.errors=a,this.expectedType=r}var e,h,p;return e=t,(h=[{key:"parse",value:function(t,e,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this;if(e&&(s=s.concat(e,i,o)),null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return s.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');var h=t[0];if("string"!=typeof h)return s.error("Expression name must be a string, but found ".concat(r(h),\' instead. If you wanted a literal array, use ["literal", [...]].\'),0),null;var p=s.registry[h];if(p){var y=p.parse(t,s);if(!y)return null;if(s.expectedType){var d=s.expectedType,v=y.type;if("string"!==d.kind&&"number"!==d.kind&&"boolean"!==d.kind||"value"!==v.kind)if("array"===d.kind&&"value"===v.kind)a.omitTypeAnnotations||(y=new c(d,y));else if("color"!==d.kind||"value"!==v.kind&&"string"!==v.kind){if(s.checkSubtype(s.expectedType,y.type))return null}else a.omitTypeAnnotations||(y=new f(d,[y]));else a.omitTypeAnnotations||(y=new l(d,[y]))}if(!(y instanceof u)&&function(t){var e=n(23).CompoundExpression,r=n(57),i=r.isGlobalPropertyConstant,o=r.isFeatureConstant,a=n(58);if(t instanceof a)return!1;if(t instanceof e&&"error"===t.name)return!1;var s=!0;if(t.eachChild(function(t){t instanceof u||(s=!1)}),!s)return!1;return o(t)&&i(t,["zoom","heatmap-density"])}(y)){var m=new(n(33));try{y=new u(y.type,y.evaluate(m))}catch(t){return s.error(t.message),null}}return y}return s.error(\'Unknown expression "\'.concat(h,\'". If you wanted a literal array, use ["literal", [...]].\'),0)}return void 0===t?s.error("\'undefined\' value invalid. Use null instead."):"object"===r(t)?s.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):s.error("Expected an array, but found ".concat(r(t)," instead."))}},{key:"concat",value:function(e,n,r){var i="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,i,n||null,o,this.errors)}},{key:"error",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="".concat(this.key).concat(n.map(function(t){return"[".concat(t,"]")}).join(""));this.errors.push(new s(i,t))}},{key:"checkSubtype",value:function(t,e){var n=a(t,e);return n&&this.error(n),n}}])&&i(e.prototype,h),p&&i(e,p),t}();t.exports=h},function(t,e){function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parent=e,this.bindings={};var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=n(s.value,2),c=l[0],f=l[1];this.bindings[c]=f}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}var e,i,o;return e=t,(i=[{key:"concat",value:function(e){return new t(this,e)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}])&&r(e.prototype,i),o&&r(e,o),t}();t.exports=i},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(11),o=i.isValue,a=i.typeOf,s=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.value=n}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("\'literal\' expression requires exactly one argument, but found ".concat(e.length-1," instead."));if(!o(e[1]))return n.error("invalid value");var r=e[1],i=a(r),s=n.expectedType;return"array"!==i.kind||0!==i.N||!s||"array"!==s.kind||"number"==typeof s.N&&0!==s.N||(i=s),new t(i,r)}}],(n=[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[this.value]}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=s},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(4),s=a.ObjectType,u=a.ValueType,l=a.StringType,c=a.NumberType,f=a.BooleanType,h=n(15),p=n(4),y=p.checkSubtype,d=p.toString,v=n(11).typeOf,m={string:l,number:c,boolean:f,object:s},g=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];o(m[r],r);for(var i=m[r],a=[],s=1;s<e.length;s++){var l=n.parse(e[s],s,u);if(!l)return null;a.push(l)}return new t(i,a)}}],(n=[{key:"evaluate",value:function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!y(this.type,v(n)))return n;if(e===this.args.length-1)throw new h("Expected value to be of type ".concat(d(this.type),", but found ").concat(d(v(n))," instead."))}return o(!1),null}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=g},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(4),o=i.toString,a=i.array,s=i.ValueType,u=i.StringType,l=i.NumberType,c=i.BooleanType,f=i.checkSubtype,h=n(11).typeOf,p=n(15),y={string:u,number:l,boolean:c},d=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.input=n}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(e.length<2||e.length>4)return n.error("Expected 1, 2, or 3 arguments, but found ".concat(e.length-1," instead."));var r,i;if(e.length>2){var o=e[1];if("string"!=typeof o||!(o in y))return n.error(\'The item type argument of "array" must be one of string, number, boolean\',1);r=y[o]}else r=s;if(e.length>3){if("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2]))return n.error(\'The length argument to "array" must be a positive integer literal\',2);i=e[2]}var u=a(r,i),l=n.parse(e[e.length-1],e.length-1,s);return l?new t(u,l):null}}],(n=[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);if(f(this.type,h(e)))throw new p("Expected value to be of type ".concat(o(this.type),", but found ").concat(o(h(e))," instead."));return e}},{key:"eachChild",value:function(t){t(this.input)}},{key:"possibleOutputs",value:function(){return this.input.possibleOutputs()}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=d},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(4),s=a.ColorType,u=a.ValueType,l=a.NumberType,c=n(11),f=c.Color,h=c.validateRGBA,p=n(15),y={"to-number":l,"to-color":s},d=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];o(y[r],r);for(var i=y[r],a=[],s=1;s<e.length;s++){var l=n.parse(e[s],s,u);if(!l)return null;a.push(l)}return new t(i,a)}}],(n=[{key:"evaluate",value:function(t){if("color"===this.type.kind){var e,n,r=!0,i=!1,o=void 0;try{for(var a,s=this.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){if(e=a.value.evaluate(t),n=null,"string"==typeof e){var u=t.parseColor(e);if(u)return u}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value ".concat(JSON.stringify(e),": expected an array containing either three or four numeric values."):h(e[0],e[1],e[2],e[3])))return new f(e[0]/255,e[1]/255,e[2]/255,e[3])}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}throw new p(n||"Could not parse color from value \'".concat("string"==typeof e?e:JSON.stringify(e),"\'"))}var l=null,c=!0,y=!1,d=void 0;try{for(var v,m=this.args[Symbol.iterator]();!(c=(v=m.next()).done);c=!0){if(null!==(l=v.value.evaluate(t))){var g=Number(l);if(!isNaN(g))return g}}}catch(t){y=!0,d=t}finally{try{c||null==m.return||m.return()}finally{if(y)throw d}}throw new p("Could not convert ".concat(JSON.stringify(l)," to number."))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=d},function(t,e,n){var r=n(23).CompoundExpression;t.exports={isFeatureConstant:function t(e){if(e instanceof r){if("get"===e.name&&1===e.args.length)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(e.name.startsWith("filter-"))return!1}var n=!0;return e.eachChild(function(e){n&&!t(e)&&(n=!1)}),n},isGlobalPropertyConstant:function t(e,n){if(e instanceof r&&n.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild(function(e){i&&!t(e,n)&&(i=!1)}),i}}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n,this.name=e}var e,r,i;return e=t,i=[{key:"parse",value:function(e,n){if(2!==e.length||"string"!=typeof e[1])return n.error("\'var\' expression requires exactly one string literal argument.");var r=e[1];return n.scope.has(r)?new t(r,n.scope.get(r).type):n.error(\'Unknown variable "\'.concat(r,\'". Make sure "\').concat(r,\'" has been bound in an enclosing "let" expression before using it.\'),1)}}],(r=[{key:"evaluate",value:function(t){return t.scope.get(this.name).evaluate(t)}},{key:"eachChild",value:function(){}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function o(t,e){return s(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t){if(Array.isArray(t))return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=n(4).NumberType,c=n(60).findStopLessThanOrEqualTo,f=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.input=n,this.labels=[],this.outputs=[];var i=!0,a=!1,s=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=o(u.value,2),f=c[0],h=c[1];this.labels.push(f),this.outputs.push(h)}}catch(t){a=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}}var e,n,f;return e=t,f=[{key:"parse",value:function(e,n){var r,o=s(r=e)||i(r)||a(),u=o[1],c=o.slice(2);if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(u=n.parse(u,1,l)))return null;var f=[],h=null;n.expectedType&&"value"!==n.expectedType.kind&&(h=n.expectedType),c.unshift(-1/0);for(var p=0;p<c.length;p+=2){var y=c[p],d=c[p+1],v=p+1,m=p+2;if("number"!=typeof y)return n.error(\'Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.\',v);if(f.length&&f[f.length-1][0]>=y)return n.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',v);var g=n.parse(d,m,h);if(!g)return null;h=h||g.type,f.push([y,g])}return new t(h,u,f)}}],(n=[{key:"evaluate",value:function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[c(e,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()})))}}])&&u(e.prototype,n),f&&u(e,f),t}();t.exports=f},function(t,e,n){var r=n(15);t.exports={findStopLessThanOrEqualTo:function(t,e){for(var n,i,o=0,a=t.length-1,s=0;o<=a;){if(n=t[s=Math.floor((o+a)/2)],i=t[s+1],e===n||e>n&&e<i)return s;if(n<e)o=s+1;else{if(!(n>e))throw new r("Input is not a number.");a=s-1}}return Math.max(s-1,0)}}},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(4),s=a.checkSubtype,u=a.ValueType,l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.args=n}var e,n,a;return e=t,a=[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expectected at least one argument.");var r=null,i=n.expectedType;i&&"value"!==i.kind&&(r=i);var a=[],l=!0,c=!1,f=void 0;try{for(var h,p=e.slice(1)[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var y=h.value,d=n.parse(y,1+a.length,r,void 0,{omitTypeAnnotations:!0});if(!d)return null;r=r||d.type,a.push(d)}}catch(t){c=!0,f=t}finally{try{l||null==p.return||p.return()}finally{if(c)throw f}}return o(r),new t(i&&a.some(function(t){return s(i,t.type)})?u:r,a)}}],(n=[{key:"evaluate",value:function(t){var e=null,n=!0,r=!1,i=void 0;try{for(var o,a=this.args[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(null!==(e=o.value.evaluate(t)))break}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return e}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.args.map(function(t){return t.possibleOutputs()})))}}])&&i(e.prototype,n),a&&i(e,a),t}();t.exports=l},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n.type,this.bindings=[].concat(e),this.result=n}var e,i,o;return e=t,o=[{key:"parse",value:function(e,r){if(e.length<4)return r.error("Expected at least 3 arguments, but found ".concat(e.length-1," instead."));for(var i=[],o=1;o<e.length-1;o+=2){var a=e[o];if("string"!=typeof a)return r.error("Expected string, but found ".concat(n(a)," instead."),o);if(/[^a-zA-Z0-9_]/.test(a))return r.error("Variable names must contain only alphanumeric characters or \'_\'.",o);var s=r.parse(e[o+1],o+1);if(!s)return null;i.push([a,s])}var u=r.parse(e[e.length-1],e.length-1,void 0,i);return u?new t(i,u):null}}],(i=[{key:"evaluate",value:function(t){t.pushScope(this.bindings);var e=this.result.evaluate(t);return t.popScope(),e}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bindings[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value[1])}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}t(this.result)}},{key:"possibleOutputs",value:function(){return this.result.possibleOutputs()}}])&&r(e.prototype,i),o&&r(e,o),t}();t.exports=i},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=n(4),s=a.NumberType,u=a.StringType,l=a.BooleanType,c=a.ColorType,f=a.ObjectType,h=a.ValueType,p=a.ErrorType,y=a.array,d=a.toString,v=n(11),m=v.typeOf,g=v.Color,b=v.validateRGBA,x=n(23),w=x.CompoundExpression,k=x.varargs,_=n(15),S=n(62),A=n(58),T=n(53),j=n(54),O=n(55),z=n(56),P=n(95),E=n(96),C=n(97),M=n(59),I=n(34),B=n(61),V=n(98),L={"==":V.Equals,"!=":V.NotEquals,array:O,at:P,boolean:j,case:C,coalesce:B,interpolate:I,let:S,literal:T,match:E,number:j,object:j,step:M,string:j,"to-color":z,"to-number":z,var:A};function F(t,e){var n=o(e,4),r=n[0],i=n[1],a=n[2],s=n[3];r=r.evaluate(t),i=i.evaluate(t),a=a.evaluate(t);var u=s?s.evaluate(t):1,l=b(r,i,a,u);if(l)throw new _(l);return new g(r/255*u,i/255*u,a/255*u,u)}function R(t,e){return t in e}function D(t,e){var n=e[t];return void 0===n?null:n}function q(t,e){return o(e,1)[0].evaluate(t).length}function N(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)<i.evaluate(t)}function U(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)>i.evaluate(t)}function J(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)<=i.evaluate(t)}function G(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)>=i.evaluate(t)}w.register(L,{error:[p,[u],function(t,e){var n=o(e,1)[0];throw new _(n.evaluate(t))}],typeof:[u,[h],function(t,e){var n=o(e,1)[0];return d(m(n.evaluate(t)))}],"to-string":[u,[h],function(t,e){var n=o(e,1)[0],r=i(n=n.evaluate(t));return null===n||"string"===r||"number"===r||"boolean"===r?String(n):n instanceof g?n.toString():JSON.stringify(n)}],"to-boolean":[l,[h],function(t,e){var n=o(e,1)[0];return Boolean(n.evaluate(t))}],"to-rgba":[y(s,4),[c],function(t,e){var n=o(e,1)[0].evaluate(t),r=n.r,i=n.g,a=n.b,s=n.a;return[255*r/s,255*i/s,255*a/s,s]}],rgb:[c,[s,s,s],F],rgba:[c,[s,s,s,s],F],length:{type:s,overloads:[[[u],q],[[y(h)],q]]},has:{type:l,overloads:[[[u],function(t,e){return R(o(e,1)[0].evaluate(t),t.properties())}],[[u,f],function(t,e){var n=o(e,2),r=n[0],i=n[1];return R(r.evaluate(t),i.evaluate(t))}]]},get:{type:h,overloads:[[[u],function(t,e){return D(o(e,1)[0].evaluate(t),t.properties())}],[[u,f],function(t,e){var n=o(e,2),r=n[0],i=n[1];return D(r.evaluate(t),i.evaluate(t))}]]},properties:[f,[],function(t){return t.properties()}],"geometry-type":[u,[],function(t){return t.geometryType()}],id:[h,[],function(t){return t.id()}],zoom:[s,[],function(t){return t.globals.zoom}],"heatmap-density":[s,[],function(t){return t.globals.heatmapDensity||0}],"+":[s,k(s),function(t,e){var n=0,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n+=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"*":[s,k(s),function(t,e){var n=1,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n*=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"-":{type:s,overloads:[[[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)-i.evaluate(t)}],[[s],function(t,e){return-o(e,1)[0].evaluate(t)}]]},"/":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)/i.evaluate(t)}],"%":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[s,[],function(){return Math.LN2}],pi:[s,[],function(){return Math.PI}],e:[s,[],function(){return Math.E}],"^":[s,[s,s],function(t,e){var n=o(e,2),r=n[0],i=n[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[s,[s],function(t,e){var n=o(e,1)[0];return Math.sqrt(n.evaluate(t))}],log10:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log10(n.evaluate(t))}],ln:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log(n.evaluate(t))}],log2:[s,[s],function(t,e){var n=o(e,1)[0];return Math.log2(n.evaluate(t))}],sin:[s,[s],function(t,e){var n=o(e,1)[0];return Math.sin(n.evaluate(t))}],cos:[s,[s],function(t,e){var n=o(e,1)[0];return Math.cos(n.evaluate(t))}],tan:[s,[s],function(t,e){var n=o(e,1)[0];return Math.tan(n.evaluate(t))}],asin:[s,[s],function(t,e){var n=o(e,1)[0];return Math.asin(n.evaluate(t))}],acos:[s,[s],function(t,e){var n=o(e,1)[0];return Math.acos(n.evaluate(t))}],atan:[s,[s],function(t,e){var n=o(e,1)[0];return Math.atan(n.evaluate(t))}],min:[s,k(s),function(t,e){return Math.min.apply(Math,r(e.map(function(e){return e.evaluate(t)})))}],max:[s,k(s),function(t,e){return Math.max.apply(Math,r(e.map(function(e){return e.evaluate(t)})))}],"filter-==":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],i=n[1];return t.properties()[r.value]===i.value}],"filter-id-==":[l,[h],function(t,e){var n=o(e,1)[0];return t.id()===n.value}],"filter-type-==":[l,[u],function(t,e){var n=o(e,1)[0];return t.geometryType()===n.value}],"filter-<":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s<u}],"filter-id-<":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r<a}],"filter->":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s>u}],"filter-id->":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r>a}],"filter-<=":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s<=u}],"filter-id-<=":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r<=a}],"filter->=":[l,[u,h],function(t,e){var n=o(e,2),r=n[0],a=n[1],s=t.properties()[r.value],u=a.value;return i(s)===i(u)&&s>=u}],"filter-id->=":[l,[h],function(t,e){var n=o(e,1)[0],r=t.id(),a=n.value;return i(r)===i(a)&&r>=a}],"filter-has":[l,[h],function(t,e){return o(e,1)[0].value in t.properties()}],"filter-has-id":[l,[],function(t){return null!==t.id()}],"filter-type-in":[l,[y(u)],function(t,e){return o(e,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[l,[y(h)],function(t,e){return o(e,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[l,[u,y(h)],function(t,e){var n=o(e,2),r=n[0];return n[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[l,[u,y(h)],function(t,e){var n=o(e,2),r=n[0],i=n[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],">":{type:l,overloads:[[[s,s],U],[[u,u],U]]},"<":{type:l,overloads:[[[s,s],N],[[u,u],N]]},">=":{type:l,overloads:[[[s,s],G],[[u,u],G]]},"<=":{type:l,overloads:[[[s,s],J],[[u,u],J]]},all:{type:l,overloads:[[[l,l],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)&&i.evaluate(t)}],[k(l),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(!o.value.evaluate(t))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}]]},any:{type:l,overloads:[[[l,l],function(t,e){var n=o(e,2),r=n[0],i=n[1];return r.evaluate(t)||i.evaluate(t)}],[k(l),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(o.value.evaluate(t))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1}]]},"!":[l,[l],function(t,e){return!o(e,1)[0].evaluate(t)}],upcase:[u,[u],function(t,e){return o(e,1)[0].evaluate(t).toUpperCase()}],downcase:[u,[u],function(t,e){return o(e,1)[0].evaluate(t).toLowerCase()}],concat:[u,k(u),function(t,e){return e.map(function(e){return e.evaluate(t)}).join("")}]}),t.exports=L},function(t,e,n){var r=n(5);t.exports=function(t){var e=t.key,n=t.value;return n?[new r(e,n,"constants have been deprecated as of v8")]:[]}},function(t,e,n){var r=n(5),i=n(7),o=n(16),a=n(24),s=n(66),u=n(67),l=n(12);t.exports=function(t){var e,n,c,f=t.valueSpec,h=l(t.value.type),p={},y="categorical"!==h&&void 0===t.value.property,d=!y,v="array"===i(t.value.stops)&&"array"===i(t.value.stops[0])&&"object"===i(t.value.stops[0][0]),m=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===h)return[new r(t.key,t.value,\'identity function may not have a "stops" property\')];var e=[],n=t.value;e=e.concat(s({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:g})),"array"===i(n)&&0===n.length&&e.push(new r(t.key,n,"array must have at least one stop"));return e},default:function(t){return o({key:t.key,value:t.value,valueSpec:f,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===h&&y&&m.push(new r(t.key,t.value,\'missing required property "property"\')),"identity"===h||t.value.stops||m.push(new r(t.key,t.value,\'missing required property "stops"\')),"exponential"===h&&"piecewise-constant"===t.valueSpec.function&&m.push(new r(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(d&&!t.valueSpec["property-function"]?m.push(new r(t.key,t.value,"property functions not supported")):y&&!t.valueSpec["zoom-function"]&&"heatmap-color"!==t.objectKey&&m.push(new r(t.key,t.value,"zoom functions not supported"))),"categorical"!==h&&!v||void 0!==t.value.property||m.push(new r(t.key,t.value,\'"property" property is required\')),m;function g(t){var e=[],s=t.value,h=t.key;if("array"!==i(s))return[new r(h,s,"array expected, ".concat(i(s)," found"))];if(2!==s.length)return[new r(h,s,"array length 2 expected, length ".concat(s.length," found"))];if(v){if("object"!==i(s[0]))return[new r(h,s,"object expected, ".concat(i(s[0])," found"))];if(void 0===s[0].zoom)return[new r(h,s,"object stop key must have zoom")];if(void 0===s[0].value)return[new r(h,s,"object stop key must have value")];if(c&&c>l(s[0].zoom))return[new r(h,s[0].zoom,"stop zoom values must appear in ascending order")];l(s[0].zoom)!==c&&(c=l(s[0].zoom),n=void 0,p={}),e=e.concat(a({key:"".concat(h,"[0]"),value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:u,value:b}}))}else e=e.concat(b({key:"".concat(h,"[0]"),value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},s));return e.concat(o({key:"".concat(h,"[1]"),value:s[1],valueSpec:f,style:t.style,styleSpec:t.styleSpec}))}function b(t,o){var a=i(t.value),s=l(t.value),u=null!==t.value?t.value:o;if(e){if(a!==e)return[new r(t.key,u,"".concat(a," stop domain type must match previous stop domain type ").concat(e))]}else e=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new r(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==h){var c="number expected, ".concat(a," found");return f["property-function"]&&void 0===h&&(c+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new r(t.key,u,c)]}return"categorical"!==h||"number"!==a||isFinite(s)&&Math.floor(s)===s?"categorical"!==h&&"number"===a&&void 0!==n&&s<n?[new r(t.key,u,"stop domain values must appear in ascending order")]:(n=s,"categorical"===h&&s in p?[new r(t.key,u,"stop domain values must be unique")]:(p[s]=!0,[])):[new r(t.key,u,"integer expected, found ".concat(s))]}}},function(t,e,n){var r=n(7),i=n(16),o=n(5);t.exports=function(t){var e=t.value,n=t.valueSpec,a=t.style,s=t.styleSpec,u=t.key,l=t.arrayElementValidator||i;if("array"!==r(e))return[new o(u,e,"array expected, ".concat(r(e)," found"))];if(n.length&&e.length!==n.length)return[new o(u,e,"array length ".concat(n.length," expected, length ").concat(e.length," found"))];if(n["min-length"]&&e.length<n["min-length"])return[new o(u,e,"array length at least ".concat(n["min-length"]," expected, length ").concat(e.length," found"))];var c={type:n.value};s.$version<7&&(c.function=n.function),"object"===r(n.value)&&(c=n.value);for(var f=[],h=0;h<e.length;h++)f=f.concat(l({array:e,arrayIndex:h,value:e[h],valueSpec:c,style:a,styleSpec:s,key:"".concat(u,"[").concat(h,"]")}));return f}},function(t,e,n){var r=n(7),i=n(5);t.exports=function(t){var e=t.key,n=t.value,o=t.valueSpec,a=r(n);return"number"!==a?[new i(e,n,"number expected, ".concat(a," found"))]:"minimum"in o&&n<o.minimum?[new i(e,n,"".concat(n," is less than the minimum value ").concat(o.minimum))]:"maximum"in o&&n>o.maximum?[new i(e,n,"".concat(n," is greater than the maximum value ").concat(o.maximum))]:[]}},function(t,e,n){var r=n(5),i=n(14),o=i.createExpression,a=i.createPropertyExpression,s=n(12);t.exports=function(t){var e=("property"===t.expressionContext?a:o)(s.deep(t.value),t.valueSpec);return"error"===e.result?e.value.map(function(e){return new r("".concat(t.key).concat(e.key),t.value,e.message)}):"property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new r(t.key,t.value,\'Invalid data expression for "text-font". Output values must be contained as literals within the expression.\')]:[]}},function(t,e,n){var r=n(5),i=n(12),o=n(24),a=n(38),s=n(70),u=n(72),l=n(16),c=n(22);t.exports=function(t){var e=[],n=t.value,f=t.key,h=t.style,p=t.styleSpec;n.type||n.ref||e.push(new r(f,n,\'either "type" or "ref" is required\'));var y,d=i(n.type),v=i(n.ref);if(n.id)for(var m=i(n.id),g=0;g<t.arrayIndex;g++){var b=h.layers[g];i(b.id)===m&&e.push(new r(f,n.id,\'duplicate layer id "\'.concat(n.id,\'", previously used at line \').concat(b.id.__line__)))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach(function(t){t in n&&e.push(new r(f,n[t],\'"\'.concat(t,\'" is prohibited for ref layers\')))}),h.layers.forEach(function(t){i(t.id)===v&&(y=t)}),y?y.ref?e.push(new r(f,n.ref,"ref cannot reference another ref layer")):d=i(y.type):e.push(new r(f,n.ref,\'ref layer "\'.concat(v,\'" not found\')));else if("background"!==d)if(n.source){var x=h.sources&&h.sources[n.source],w=x&&i(x.type);x?"vector"===w&&"raster"===d?e.push(new r(f,n.source,\'layer "\'.concat(n.id,\'" requires a raster source\'))):"raster"===w&&"raster"!==d?e.push(new r(f,n.source,\'layer "\'.concat(n.id,\'" requires a vector source\'))):"vector"!==w||n["source-layer"]?"raster-dem"===w&&"hillshade"!==d&&e.push(new r(f,n.source,"raster-dem source can only be used with layer type \'hillshade\'.")):e.push(new r(f,n,\'layer "\'.concat(n.id,\'" must specify a "source-layer"\'))):e.push(new r(f,n.source,\'source "\'.concat(n.source,\'" not found\')))}else e.push(new r(f,n,\'missing required property "source"\'));return e=e.concat(o({key:f,value:n,valueSpec:p.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return l({key:"".concat(f,".type"),value:n.type,valueSpec:p.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:a,layout:function(t){return o({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return u(c({layerType:d},t))}}})},paint:function(t){return o({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(c({layerType:d},t))}}})}}}))}},function(t,e,n){var r=n(71);t.exports=function(t){return r(t,"paint")}},function(t,e,n){var r=n(16),i=n(5),o=n(7),a=n(35).isFunction,s=n(12);t.exports=function(t,e){var n=t.key,u=t.style,l=t.styleSpec,c=t.value,f=t.objectKey,h=l["".concat(e,"_").concat(t.layerType)];if(!h)return[];var p=f.match(/^(.*)-transition$/);if("paint"===e&&p&&h[p[1]]&&h[p[1]].transition)return r({key:n,value:c,valueSpec:l.transition,style:u,styleSpec:l});var y,d=t.valueSpec||h[f];if(!d)return[new i(n,c,\'unknown property "\'.concat(f,\'"\'))];if("string"===o(c)&&d["property-function"]&&!d.tokens&&(y=/^{([^}]+)}$/.exec(c)))return[new i(n,c,\'"\'.concat(f,\'" does not support interpolation syntax\\n\')+\'Use an identity property function instead: `{ "type": "identity", "property": \'.concat(JSON.stringify(y[1])," }`."))];var v=[];return"symbol"===t.layerType&&("text-field"===f&&u&&!u.glyphs&&v.push(new i(n,c,\'use of "text-field" requires a style "glyphs" property\')),"text-font"===f&&a(s.deep(c))&&"identity"===s(c.type)&&v.push(new i(n,c,\'"text-font" does not support identity functions\'))),v.concat(r({key:t.key,value:c,valueSpec:d,style:u,styleSpec:l,expressionContext:"property",propertyKey:f}))}},function(t,e,n){var r=n(71);t.exports=function(t){return r(t,"layout")}},function(t,e,n){var r=n(5),i=n(12),o=n(24),a=n(37);t.exports=function(t){var e=t.value,n=t.key,s=t.styleSpec,u=t.style;if(!e.type)return[new r(n,e,\'"type" is required\')];var l=i(e.type),c=[];switch(l){case"vector":case"raster":case"raster-dem":if(c=c.concat(o({key:n,value:e,valueSpec:s["source_".concat(l.replace("-","_"))],style:t.style,styleSpec:s})),"url"in e)for(var f in e)["type","url","tileSize"].indexOf(f)<0&&c.push(new r("".concat(n,".").concat(f),e[f],\'a source with a "url" property may not include a "\'.concat(f,\'" property\')));return c;case"geojson":return o({key:n,value:e,valueSpec:s.source_geojson,style:u,styleSpec:s});case"video":return o({key:n,value:e,valueSpec:s.source_video,style:u,styleSpec:s});case"image":return o({key:n,value:e,valueSpec:s.source_image,style:u,styleSpec:s});case"canvas":return o({key:n,value:e,valueSpec:s.source_canvas,style:u,styleSpec:s});default:return a({key:"".concat(n,".type"),value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image","canvas"]},style:u,styleSpec:s})}}},function(t,e,n){var r=n(5),i=n(7),o=n(16);t.exports=function(t){var e=t.value,n=t.styleSpec,a=n.light,s=t.style,u=[],l=i(e);if(void 0===e)return u;if("object"!==l)return u=u.concat([new r("light",e,"object expected, ".concat(l," found"))]);for(var c in e){var f=c.match(/^(.*)-transition$/);u=f&&a[f[1]]&&a[f[1]].transition?u.concat(o({key:c,value:e[c],valueSpec:n.transition,style:s,styleSpec:n})):a[c]?u.concat(o({key:c,value:e[c],valueSpec:a[c],style:s,styleSpec:n})):u.concat([new r(c,e[c],\'unknown property "\'.concat(c,\'"\'))])}return u}},function(t,e,n){var r=n(7),i=n(5);t.exports=function(t){var e=t.value,n=t.key,o=r(e);return"string"!==o?[new i(n,e,"string expected, ".concat(o," found"))]:[]}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2);function o(t,e,n){n[t]=n[t]||[],n[t].push(e)}function a(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,s;return e=t,(n=[{key:"on",value:function(t,e){return this._listeners=this._listeners||{},o(t,e,this._listeners),this}},{key:"off",value:function(t,e){return a(t,e,this._listeners),a(t,e,this._oneTimeListeners),this}},{key:"once",value:function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},o(t,e,this._oneTimeListeners),this}},{key:"fire",value:function(t,e){if(this.listens(t)){e=i.extend({},e,{type:t,target:this});var n=this._listeners&&this._listeners[t]?this._listeners[t].slice():[],r=!0,o=!1,s=void 0;try{for(var u,l=n[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){u.value.call(this,e)}}catch(t){o=!0,s=t}finally{try{r||null==l.return||l.return()}finally{if(o)throw s}}var c=this._oneTimeListeners&&this._oneTimeListeners[t]?this._oneTimeListeners[t].slice():[],f=!0,h=!1,p=void 0;try{for(var y,d=c[Symbol.iterator]();!(f=(y=d.next()).done);f=!0){var v=y.value;a(t,v,this._oneTimeListeners),v.call(this,e)}}catch(t){h=!0,p=t}finally{try{f||null==d.return||d.return()}finally{if(h)throw p}}this._eventedParent&&this._eventedParent.fire(t,i.extend({},e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData))}else i.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event");return this}},{key:"listens",value:function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}},{key:"setEventedParent",value:function(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}])&&r(e.prototype,n),s&&r(e,s),t}();t.exports=s},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).CircleLayoutArray,o=n(109).members,a=n(25).SegmentVector,s=n(26).ProgramConfigurationSet,u=n(27).TriangleIndexArray,l=n(20),c=n(18),f=n(3).register;function h(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}var p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new u,this.segments=new a,this.programConfigurations=new s(o,e.layers,e.zoom)}var e,n,f;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,c=s.index,f=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=l(u);this.addFeature(u,h),e.featureIndex.insert(u,h,c,f,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=!0,l=!1,f=void 0;try{for(var p,y=s[Symbol.iterator]();!(u=(p=y.next()).done);u=!0){var d=p.value,v=d.x,m=d.y;if(!(v<0||v>=c||m<0||m>=c)){var g=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),b=g.vertexLength;h(this.layoutVertexArray,v,m,-1,-1),h(this.layoutVertexArray,v,m,1,-1),h(this.layoutVertexArray,v,m,1,1),h(this.layoutVertexArray,v,m,-1,1),this.indexArray.emplaceBack(b,b+1,b+2),this.indexArray.emplaceBack(b,b+3,b+2),g.vertexLength+=4,g.primitiveLength+=2}}}catch(t){l=!0,f=t}finally{try{u||null==y.return||y.return()}finally{if(l)throw f}}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),f&&r(e,f),t}();f("CircleBucket",p,{omit:["layers"]}),t.exports=p},function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,s,u,l,c,p,d,v=e&&e.length,m=v?e[0]*n:t.length,g=i(t,0,m,n,!0),b=[];if(!g||g.next===g.prev)return b;if(v&&(g=function(t,e,n,r){var a,s,u,l,c,p=[];for(a=0,s=e.length;a<s;a++)u=e[a]*r,l=a<s-1?e[a+1]*r:t.length,(c=i(t,u,l,r,!1))===c.next&&(c.steiner=!0),p.push(y(c));for(p.sort(f),a=0;a<p.length;a++)h(p[a],n),n=o(n,n.next);return n}(t,e,g,n)),t.length>80*n){r=u=t[0],s=l=t[1];for(var x=n;x<m;x+=n)(c=t[x])<r&&(r=c),(p=t[x+1])<s&&(s=p),c>u&&(u=c),p>l&&(l=p);d=0!==(d=Math.max(u-r,l-s))?1/d:0}return a(g,b,n,r,s,d),b}function i(t,e,n,r,i){var o,a;if(i===A(t,e,n,r)>0)for(o=e;o<n;o+=r)a=k(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=k(o,t[o],t[o+1],a);return a&&g(a,a.next)&&(_(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!g(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(_(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,f,h){if(t){!h&&f&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,f);for(var y,d,v=t;t.prev!==t.next;)if(y=t.prev,d=t.next,f?u(t,r,i,f):s(t))e.push(y.i/n),e.push(t.i/n),e.push(d.i/n),_(t),t=d.next,v=d.next;else if((t=d)===v){h?1===h?a(t=l(t,e,n),e,n,r,i,f,2):2===h&&c(t,e,n,r,i,f):a(o(t),e,n,r,i,f,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(m(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(d(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(m(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=p(s,u,e,n,r),h=p(l,c,e,n,r),y=t.prevZ,v=t.nextZ;y&&y.z>=f&&v&&v.z<=h;){if(y!==t.prev&&y!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,v!==t.prev&&v!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;y&&y.z>=f;){if(y!==t.prev&&y!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;v&&v.z<=h;){if(v!==t.prev&&v!==t.next&&d(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!g(i,o)&&b(i,r,r.next,o)&&x(i,o)&&x(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),_(r),_(r.next),r=t=o),r=r.next}while(r!==t);return r}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&v(u,l)){var c=w(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,l=n,c=n.x,f=n.y,h=1/0;r=n.next;for(;r!==l;)i>=r.x&&r.x>=c&&i!==r.x&&d(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<h||u===h&&r.x>n.x)&&x(r,t)&&(n=r,h=u),r=r.next;return n}(t,e)){var n=w(e,t);o(n,n.next)}}function p(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function y(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function d(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&x(t,e)&&x(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function m(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){return!!(g(t,e)&&g(n,r)||g(t,r)&&g(n,e))||m(t,e,n)>0!=m(t,e,r)>0&&m(n,r,t)>0!=m(n,r,e)>0}function x(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var n=new S(t.i,t.x,t.y),r=new S(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function k(t,e,n,r){var i=new S(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function _(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(A(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(A(t,l,c,n))}var f=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,p=r[s+1]*n,y=r[s+2]*n;f+=Math.abs((t[h]-t[y])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[y+1]-t[h+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";var r=n(80);function i(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(o,this,e),this.length=this._features.length}function o(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}t.exports=i,i.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new r(this._pbf,e,this.extent,this._keys,this._values)}},function(t,e,n){"use strict";var r=n(6);function i(t,e,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=i,t.readFields(o,this,e)}function o(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){var n=t.readVarint()+t.pos;for(;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function a(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r}t.exports=i,i.types=["Unknown","Point","LineString","Polygon"],i.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,u=[];t.pos<n;){if(o<=0){var l=t.readVarint();i=7&l,o=l>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new r(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,u,s,l]},i.prototype.toGeoJSON=function(t,e,n){var r,o,s=this.extent*Math.pow(2,n),u=this.extent*t,l=this.extent*e,c=this.loadGeometry(),f=i.types[this.type];function h(t){for(var e=0;e<t.length;e++){var n=t[e],r=180-360*(n.y+l)/s;t[e]=[360*(n.x+u)/s-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(r=0;r<c.length;r++)p[r]=c[r][0];h(c=p);break;case 2:for(r=0;r<c.length;r++)h(c[r]);break;case 3:for(c=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var s=a(t[o]);0!==s&&(void 0===r&&(r=s<0),r===s<0?(n&&i.push(n),n=[t[o]]):n.push(t[o]))}n&&i.push(n);return i}(c),r=0;r<c.length;r++)for(o=0;o<c[r].length;o++)h(c[r][o])}1===c.length?c=c[0]:f="Multi"+f;var y={type:"Feature",geometry:{type:f,coordinates:c},properties:this.properties};return"id"in this&&(y.id=this.id),y}},function(t,e,n){var r=n(31);t.exports=function(e){for(var n="",i=0;i<e.length;i++){var o=e.charCodeAt(i+1)||null,a=e.charCodeAt(i-1)||null;(!o||!r.charHasRotatedVerticalOrientation(o)||t.exports.lookup[e[i+1]])&&(!a||!r.charHasRotatedVerticalOrientation(a)||t.exports.lookup[e[i-1]])&&t.exports.lookup[e[i]]?n+=t.exports.lookup[e[i]]:n+=e[i]}return n},t.exports.lookup={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(44),o=n(21),a=n(32),s=n(147),u=n(2);function l(t,e){var n=i.getArrayBuffer(t.request,function(t,n){t?e(t):n&&e(null,{vectorTile:new o.VectorTile(new a(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.abort(),e()}}var c=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actor=e,this.layerIndex=n,this.loadVectorData=r||l,this.loading={},this.loaded={}}var e,n,i;return e=t,(n=[{key:"loadTile",value:function(t,e){var n=this,r=t.source,i=t.uid;this.loading[r]||(this.loading[r]={});var o=this.loading[r][i]=new s(t);o.abort=this.loadVectorData(t,function(t,a){if(delete n.loading[r][i],t||!a)return e(t);var s=a.rawData,l={};a.expires&&(l.expires=a.expires),a.cacheControl&&(l.cacheControl=a.cacheControl),o.vectorTile=a.vectorTile,o.parse(a.vectorTile,n.layerIndex,n.actor,function(t,n){if(t||!n)return e(t);e(null,u.extend({rawTileData:s.slice(0)},n,l))}),n.loaded[r]=n.loaded[r]||{},n.loaded[r][i]=o})}},{key:"reloadTile",value:function(t,e){var n=this.loaded[t.source],r=t.uid,i=this;if(n&&n[r]){var o=n[r];o.showCollisionBoxes=t.showCollisionBoxes,"parsing"===o.status?o.reloadCallback=a.bind(o):"done"===o.status&&o.parse(o.vectorTile,this.layerIndex,this.actor,a.bind(o))}function a(t,n){if(this.reloadCallback){var r=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,i.layerIndex,i.actor,r)}e(t,n)}}},{key:"abortTile",value:function(t,e){var n=this.loading[t.source],r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()}},{key:"removeTile",value:function(t,e){var n=this.loaded[t.source],r=t.uid;n&&n[r]&&delete n[r],e()}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=c},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(0),o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._stringToNumber={},this._numberToString=[];for(var n=0;n<e.length;n++){var r=e[n];this._stringToNumber[r]=n,this._numberToString[n]=r}}var e,n,o;return e=t,(n=[{key:"encode",value:function(t){return i(t in this._stringToNumber),this._stringToNumber[t]}},{key:"decode",value:function(t){return i(t<this._numberToString.length),this._numberToString[t]}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(150),s=n(0),u=n(3).register,l=n(47),c=function(){function t(e,n,i){r(this,t),s(e>=0&&e<=25),s(n>=0&&n<Math.pow(2,e)),s(i>=0&&i<Math.pow(2,e)),this.z=e,this.x=n,this.y=i,this.key=p(0,e,n,i)}return o(t,[{key:"equals",value:function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}},{key:"url",value:function(t,e){var n=a.getTileBBox(this.x,this.y,this.z),r=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<<o-1)?1:0)+(n&r?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",n)}}]),t}(),f=function t(e,n,i){r(this,t),this.wrap=e,this.canonical=n,this.key=p(e,n.z,n.x,n.y),this.posMatrix=i},h=function(){function t(e,n,i,o,a){r(this,t),s(e>=i),this.overscaledZ=e,this.wrap=n,this.canonical=new c(i,+o,+a),this.key=p(n,e,o,a)}return o(t,[{key:"scaledTo",value:function(e){s(e<=this.overscaledZ);var n=this.canonical.z-e;return e>this.canonical.z?new t(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new t(e,this.wrap,e,this.canonical.x>>n,this.canonical.y>>n)}},{key:"isChildOf",value:function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}},{key:"children",value:function(e){if(this.overscaledZ>=e)return[new t(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var n=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new t(n,this.wrap,n,r,i),new t(n,this.wrap,n,r+1,i),new t(n,this.wrap,n,r,i+1),new t(n,this.wrap,n,r+1,i+1)]}},{key:"isLessThan",value:function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}},{key:"wrapped",value:function(){return new t(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}},{key:"overscaleFactor",value:function(){return Math.pow(2,this.overscaledZ-this.canonical.z)}},{key:"toUnwrapped",value:function(){return new f(this.wrap,this.canonical,this.posMatrix)}},{key:"toString",value:function(){return"".concat(this.overscaledZ,"/").concat(this.canonical.x,"/").concat(this.canonical.y)}},{key:"toCoordinate",value:function(){return new l(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)}}]),t}();function p(t,e,n,r){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*r+n)+e}u("CanonicalTileID",c),u("OverscaledTileID",h,{omit:["posMatrix"]}),t.exports={CanonicalTileID:c,OverscaledTileID:h,UnwrappedTileID:f}},function(t,e,n){t.exports=function(){function t(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}function n(t,e,n,r,i,o,a){this.id=t,this.x=e,this.y=n,this.w=r,this.h=i,this.maxw=o||r,this.maxh=a||i,this.refcount=0}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,r,i,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,r=t[s].h||t[s].height,i=t[s].id,n&&r){if(!(o=this.packOne(n,r,i)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},t.prototype.packOne=function(t,n,r){var i,o,a,s,u,l,c,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if("string"==typeof r||"number"==typeof r){if(i=this.getBin(r))return this.ref(i),i;"number"==typeof r&&(this.maxId=Math.max(r,this.maxId))}else r=++this.maxId;for(s=0;s<this.freebins.length;s++){if(n===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,n,r);n>i.maxh||t>i.maxw||n<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*n)<h.waste&&(h.waste=a,h.freebin=s)}for(s=0;s<this.shelves.length;s++)if(p+=(o=this.shelves[s]).h,!(t>o.free)){if(n===o.h)return this.allocShelf(s,t,n,r);n>o.h||n<o.h&&(a=(o.h-n)*t)<h.waste&&(h.freebin=-1,h.waste=a,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,n,r):-1!==h.shelf?this.allocShelf(h.shelf,t,n,r):n<=this.h-p&&t<=this.w?(o=new e(p,this.w,n),this.allocShelf(this.shelves.push(o)-1,t,n,r)):this.autoResize?(u=l=this.h,((c=f=this.w)<=u||t>c)&&(f=2*Math.max(t,c)),(u<c||n>u)&&(l=2*Math.max(n,u)),this.resize(f,l),this.packOne(t,n,r)):null},t.prototype.allocFreebin=function(t,e,n,r){var i=this.freebins.splice(t,1)[0];return i.id=r,i.w=e,i.h=n,i.refcount=0,this.bins[r]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,n,r){var i=this.shelves[t].alloc(e,n,r);return this.bins[r]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var r=this.shelves[n];e+=r.h,t=Math.max(r.w-r.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new n(r,i,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(87),o=n(101),a=n(82),s=n(164),u=n(166),l=n(0),c=n(43);new(function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.self=e,this.actor=new i(e,this),this.layerIndexes={},this.workerSourceTypes={vector:a,geojson:u},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(n.workerSourceTypes[t])throw new Error(\'Worker source with name "\'.concat(t,\'" already registered.\'));n.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(t){if(c.applyArabicShaping||c.processBidirectionalText)throw new Error("RTL text plugin already registered.");c.applyArabicShaping=t.applyArabicShaping,c.processBidirectionalText=t.processBidirectionalText}}var e,n,f;return e=t,(n=[{key:"setLayers",value:function(t,e,n){this.getLayerIndex(t).replace(e),n()}},{key:"updateLayers",value:function(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()}},{key:"loadTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).loadTile(e,n)}},{key:"loadDEMTile",value:function(t,e,n){this.getDEMWorkerSource(t).loadTile(e,n)}},{key:"reloadTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).reloadTile(e,n)}},{key:"abortTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).abortTile(e,n)}},{key:"removeTile",value:function(t,e,n){l(e.type),this.getWorkerSource(t,e.type).removeTile(e,n)}},{key:"removeDEMTile",value:function(t,e){this.getDEMWorkerSource(t).removeTile(e)}},{key:"removeSource",value:function(t,e,n){l(e.type);var r=this.getWorkerSource(t,e.type);void 0!==r.removeSource?r.removeSource(e,n):n()}},{key:"loadWorkerSource",value:function(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t)}}},{key:"loadRTLTextPlugin",value:function(t,e,n){try{c.applyArabicShaping||c.processBidirectionalText||(this.self.importScripts(e),c.applyArabicShaping&&c.processBidirectionalText||n(new Error("RTL Text Plugin failed to import scripts from ".concat(e))))}catch(t){n(t)}}},{key:"getLayerIndex",value:function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new o),e}},{key:"getWorkerSource",value:function(t,e){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),!this.workerSources[t][e]){var r={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e]=new this.workerSourceTypes[e](r,this.getLayerIndex(t))}return this.workerSources[t][e]}},{key:"getDEMWorkerSource",value:function(t){return this.demWorkerSources[t]||(this.demWorkerSources[t]=new s),this.demWorkerSources[t]}}])&&r(e.prototype,n),f&&r(e,f),t}())(self)},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(2),o=n(3),a=o.serialize,s=o.deserialize,u=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.target=e,this.parent=n,this.mapId=r,this.callbacks={},this.callbackID=0,i.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)}var e,n,o;return e=t,(n=[{key:"send",value:function(t,e,n,r){var i=n?"".concat(this.mapId,":").concat(this.callbackID++):null;n&&(this.callbacks[i]=n);var o=[];this.target.postMessage({targetMapId:r,sourceMapId:this.mapId,type:t,id:String(i),data:a(e,o)},o)}},{key:"receive",value:function(t){var e,n=this,r=t.data,i=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var o=function(t,e){var r=[];n.target.postMessage({sourceMapId:n.mapId,type:"<response>",id:String(i),error:t?String(t):null,data:a(e,r)},r)};if("<response>"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&r.error?e(new Error(r.error)):e&&e(null,s(r.data));else if(void 0!==r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,s(r.data),o);else if(void 0!==r.id&&this.parent.getWorkerSource){var u=r.type.split(".");this.parent.getWorkerSource(r.sourceMapId,u[0])[u[1]](s(r.data),o)}else this.parent[r.type](s(r.data))}}},{key:"remove",value:function(){this.target.removeEventListener("message",this.receive,!1)}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=u},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(!t(e[i],r[i]))return!1;return!0}if("object"===n(e)&&null!==e&&null!==r){if("object"!==n(r))return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var o in e)if(!t(e[o],r[o]))return!1;return!0}return e===r}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var l in n=Object(arguments[u]))i.call(n,l)&&(s[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)o.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<o;u=r[++n])d(u)||!x(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(t,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&e._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"\x1B["+s.colors[n][0]+"m"+t+"\x1B["+s.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(m(e)){var n="\'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/\'/g,"\\\\\'").replace(/\\\\"/g,\'"\')+"\'";return t.stylize(n,"string")}if(v(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(d(e))return t.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),k(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(_(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(k(n))return f(n)}var l,x="",S=!1,A=["{","}"];(p(n)&&(S=!0,A=["[","]"]),_(n))&&(x=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(x=" "+RegExp.prototype.toString.call(n)),w(n)&&(x=" "+Date.prototype.toUTCString.call(n)),k(n)&&(x=" "+f(n)),0!==a.length||S&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),l=S?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)j(e,String(a))?o.push(h(t,e,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\\d+$/)||o.push(h(t,e,n,r,i,!0))}),o}(t,n,r,s,a):a.map(function(e){return h(t,n,r,s,e,S)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\\n")>=0&&0,t+e.replace(/\\u001b\\[\\d\\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\\n ")+" "+t.join(",\\n  ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(l,x,A)):A[0]+x+A[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),j(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=d(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\\n")>-1&&(s=o?s.split("\\n").map(function(t){return"  "+t}).join("\\n").substr(2):"\\n"+s.split("\\n").map(function(t){return"   "+t}).join("\\n")):s=t.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/\'/g,"\\\\\'").replace(/\\\\"/g,\'"\').replace(/(^"|"$)/g,"\'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function d(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function g(t){return void 0===t}function b(t){return x(t)&&"[object RegExp]"===S(t)}function x(t){return"object"==typeof t&&null!==t}function w(t){return x(t)&&"[object Date]"===S(t)}function k(t){return x(t)&&("[object Error]"===S(t)||t instanceof Error)}function _(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(g(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\\\b"+n+"\\\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=y,e.isNull=d,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=b,e.isObject=x,e.isDate=w,e.isError=k,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(93);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(t=new Date,n=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(94),e._extend=function(t,e){if(!e||!x(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function z(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError(\'The "original" argument must be of type Function\');if(O&&t[O]){var e;if("function"!=typeof(e=t[O]))throw new TypeError(\'The "util.promisify.custom" argument must be of type Function\');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise(function(t,r){e=t,n=r}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,r){t?n(t):e(r)});try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError(\'The "original" argument must be of type Function\');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,n).then(function(e){t.nextTick(a,null,e)},function(e){t.nextTick(z,e,a)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(92))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new y(t,e)),1!==l.length||c||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(4),o=i.array,a=i.ValueType,s=i.NumberType,u=n(15),l=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.index=n,this.input=r}var e,n,i;return e=t,i=[{key:"parse",value:function(e,n){if(3!==e.length)return n.error("Expected 2 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,s),i=n.parse(e[2],2,o(n.expectedType||a));return r&&i?new t(i.type.itemType,r,i):null}}],(n=[{key:"evaluate",value:function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0||e>=n.length)throw new u("Array index out of bounds: ".concat(e," > ").concat(n.length,"."));if(e!==Math.floor(e))throw new u("Array index must be an integer, but found ".concat(e," instead."));return n[e]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"possibleOutputs",value:function(){return[void 0]}}])&&r(e.prototype,n),i&&r(e,i),t}();t.exports=l},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=n(0),a=n(11).typeOf,s=function(){function t(e,n,r,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.inputType=e,this.type=n,this.input=r,this.cases=i,this.outputs=o,this.otherwise=a}var e,n,s;return e=t,s=[{key:"parse",value:function(e,n){if(e.length<5)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!=1)return n.error("Expected an even number of arguments.");var r,i;n.expectedType&&"value"!==n.expectedType.kind&&(i=n.expectedType);for(var s={},u=[],l=2;l<e.length-1;l+=2){var c=e[l],f=e[l+1];Array.isArray(c)||(c=[c]);var h=n.concat(l);if(0===c.length)return h.error("Expected at least one branch label.");var p=!0,y=!1,d=void 0;try{for(var v,m=c[Symbol.iterator]();!(p=(v=m.next()).done);p=!0){var g=v.value;if("number"!=typeof g&&"string"!=typeof g)return h.error("Branch labels must be numbers or strings.");if("number"==typeof g&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof g&&Math.floor(g)!==g)return h.error("Numeric branch labels must be integer values.");if(r){if(h.checkSubtype(r,a(g)))return null}else r=a(g);if(void 0!==s[String(g)])return h.error("Branch labels must be unique.");s[String(g)]=u.length}}catch(t){y=!0,d=t}finally{try{p||null==m.return||m.return()}finally{if(y)throw d}}var b=n.parse(f,l,i);if(!b)return null;i=i||b.type,u.push(b)}var x=n.parse(e[1],1,r);if(!x)return null;var w=n.parse(e[e.length-1],e.length-1,i);return w?(o(r&&i),new t(r,i,x,s,u,w)):null}}],(n=[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.outputs.map(function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&i(e.prototype,n),s&&i(e,s),t}();t.exports=s},function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=n(0),s=n(4).BooleanType,u=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=e,this.branches=n,this.otherwise=r}var e,n,u;return e=t,u=[{key:"parse",value:function(e,n){if(e.length<4)return n.error("Expected at least 3 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!=0)return n.error("Expected an odd number of arguments.");var r;n.expectedType&&"value"!==n.expectedType.kind&&(r=n.expectedType);for(var i=[],o=1;o<e.length-1;o+=2){var u=n.parse(e[o],o,s);if(!u)return null;var l=n.parse(e[o+1],o+1,r);if(!l)return null;i.push([u,l]),r=r||l.type}var c=n.parse(e[e.length-1],e.length-1,r);return c?(a(r),new t(r,i,c)):null}}],(n=[{key:"evaluate",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,a=this.branches[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=i(o.value,2),u=s[0],l=s[1];if(u.evaluate(t))return l.evaluate(t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,a=this.branches[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=i(o.value,2),u=s[0],l=s[1];t(u),t(l)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}t(this.otherwise)}},{key:"possibleOutputs",value:function(){var t;return(t=[]).concat.apply(t,r(this.branches.map(function(t){var e=i(t,2);e[0];return e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())}}])&&o(e.prototype,n),u&&o(e,u),t}();t.exports=u},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(4),o=i.ValueType,a=i.BooleanType,s=n(4).toString;function u(t){return"string"===t.kind||"number"===t.kind||"boolean"===t.kind||"null"===t.kind}function l(t){return function(){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=a,this.lhs=t,this.rhs=n}var n,i,l;return n=e,l=[{key:"parse",value:function(t,n){if(3!==t.length)return n.error("Expected two arguments.");var r=n.parse(t[1],1,o);if(!r)return null;var i=n.parse(t[2],2,o);return i?u(r.type)||u(i.type)?r.type.kind!==i.type.kind&&"value"!==r.type.kind&&"value"!==i.type.kind?n.error("Cannot compare ".concat(s(r.type)," and ").concat(s(i.type),".")):new e(r,i):n.error("Expected at least one argument to be a string, number, boolean, or null, but found (".concat(s(r.type),", ").concat(s(i.type),") instead.")):null}}],(i=[{key:"evaluate",value:function(e){return t(this.lhs.evaluate(e),this.rhs.evaluate(e))}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs)}},{key:"possibleOutputs",value:function(){return[!0,!1]}}])&&r(n.prototype,i),l&&r(n,l),e}()}t.exports={Equals:l(function(t,e){return t===e}),NotEquals:l(function(t,e){return t!==e})}},function(t,e){t.exports={success:function(t){return{result:"success",value:t}},error:function(t){return{result:"error",value:t}}}},function(t,e,n){var r=n(13),i=n(19).number,o=.95047,a=1,s=1.08883,u=4/29,l=6/29,c=3*l*l,f=l*l*l,h=Math.PI/180,p=180/Math.PI;function y(t){return t>f?Math.pow(t,1/3):t/c+u}function d(t){return t>l?t*t*t:c*(t-u)}function v(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function m(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function g(t){var e=m(t.r),n=m(t.g),r=m(t.b),i=y((.4124564*e+.3575761*n+.1804375*r)/o),u=y((.2126729*e+.7151522*n+.072175*r)/a);return{l:116*u-16,a:500*(i-u),b:200*(u-y((.0193339*e+.119192*n+.9503041*r)/s)),alpha:t.a}}function b(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=a*d(e),n=o*d(n),i=s*d(i),new r(v(3.2404542*n-1.5371385*e-.4985314*i),v(-.969266*n+1.8760108*e+.041556*i),v(.0556434*n-.2040259*e+1.0572252*i),t.alpha)}function x(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}t.exports={lab:{forward:g,reverse:b,interpolate:function(t,e,n){return{l:i(t.l,e.l,n),a:i(t.a,e.a,n),b:i(t.b,e.b,n),alpha:i(t.alpha,e.alpha,n)}}},hcl:{forward:function(t){var e=g(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*p;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*h,n=t.c;return b({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:x(t.h,e.h,n),c:i(t.c,e.c,n),l:i(t.l,e.l,n),alpha:i(t.alpha,e.alpha,n)}}}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(9),o=n(2),a=n(39),s=n(144),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&this.replace(e)}var e,n,u;return e=t,(n=[{key:"replace",value:function(t){this._layerConfigs={},this._layers={},this.update(t,[])}},{key:"update",value:function(t,e){var n=this,r=!0,u=!1,l=void 0;try{for(var c,f=t[Symbol.iterator]();!(r=(c=f.next()).done);r=!0){var h=c.value;this._layerConfigs[h.id]=h;var p=this._layers[h.id]=i.create(h);p._featureFilter=a(p.filter)}}catch(t){u=!0,l=t}finally{try{r||null==f.return||f.return()}finally{if(u)throw l}}var y=!0,d=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(y=(m=g.next()).done);y=!0){var b=m.value;delete this._layerConfigs[b],delete this._layers[b]}}catch(t){d=!0,v=t}finally{try{y||null==g.return||g.return()}finally{if(d)throw v}}this.familiesBySource={};var x=s(o.values(this._layerConfigs)),w=!0,k=!1,_=void 0;try{for(var S,A=x[Symbol.iterator]();!(w=(S=A.next()).done);w=!0){var T=S.value.map(function(t){return n._layers[t.id]}),j=T[0];if("none"!==j.visibility){var O=j.source||"",z=this.familiesBySource[O];z||(z=this.familiesBySource[O]={});var P=j.sourceLayer||"_geojsonTileLayer",E=z[P];E||(E=z[P]=[]),E.push(T)}}}catch(t){k=!0,_=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw _}}}}])&&r(e.prototype,n),u&&r(e,u),t}();t.exports=u},function(t){t.exports={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'mapbox:\'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:\'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90\xB0 orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties.",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property.",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image","source_canvas"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source\'s bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source\'s bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A raster DEM source using Mapbox Terrain RGB"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source\'s bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups."},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{doc:"A canvas data source."}},doc:"The data type of the canvas source."},coordinates:{required:!0,doc:"Corners of canvas specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}},animate:{type:"boolean",default:"true",doc:"Whether the canvas source is animated. If the canvas is static, `animate` should be set to `false` to improve performance."},canvas:{type:"string",required:!0,doc:"HTML ID of the canvas from which to read pixels."}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB tiles","sdk-support":{"basic functionality":{js:"0.43.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'mapbox:\'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level on which the layer gets parsed and appears on."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level on which the layer gets parsed and appears on."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_fill:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_circle:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0"}}}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line\'s width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line\'s width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line\'s width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line\'s width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don\'t have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,doc:"Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"data-driven styling":{}}},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0,doc:"Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}}},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0"},"data-driven styling":{}}}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:\'`["==", key, value]` equality: `feature[key] = value`\'},"!=":{doc:\'`["!=", key, value]` inequality: `feature[key] \u2260 value`\'},">":{doc:\'`[">", key, value]` greater than: `feature[key] > value`\'},">=":{doc:\'`[">=", key, value]` greater than or equal: `feature[key] \u2265 value`\'},"<":{doc:\'`["<", key, value]` less than: `feature[key] < value`\'},"<=":{doc:\'`["<=", key, value]` less than or equal: `feature[key] \u2264 value`\'},in:{doc:\'`["in", key, v0, ..., vn]` set inclusion: `feature[key] \u2208 {v0, ..., vn}`\'},"!in":{doc:\'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] \u2209 {v0, ..., vn}`\'},all:{doc:\'`["all", f0, ..., fn]` logical `AND`: `f0 \u2227 ... \u2227 fn`\'},any:{doc:\'`["any", f0, ..., fn]` logical `OR`: `f0 \u2228 ... \u2228 fn`\'},none:{doc:\'`["none", f0, ..., fn]` logical `NOR`: `\xACf0 \u2227 ... \u2227 \xACfn`\'},has:{doc:\'`["has", key]` `feature[key]` exists\'},"!has":{doc:\'`["!has", key]` `feature[key]` does not exist\'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn\'t otherwise available. It is used in the following circumstances:\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\nIf no default is provided, the style property\'s default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:\'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].\',group:"Variable binding"},var:{doc:\'References variable bound using "let".\',group:"Variable binding"},literal:{doc:"Provides a literal array or object value.",group:"Types"},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types"},at:{doc:"Retrieves an item from an array.",group:"Lookup"},case:{doc:"Selects the first output whose corresponding test condition evaluates to true.",group:"Decision"},match:{doc:\'Selects the output whose label value matches the input value, or the fallback value if no match is found. The `input` can be any string or number expression (e.g. `["get", "building_type"]`). Each label can either be a single literal value or an array of values.\',group:"Decision"},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision"},step:{doc:\'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.\',group:"Ramps, scales, curves"},interpolate:{doc:\'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\\n\\nInterpolation types:\\n- `["linear"]`: interpolates linearly between the pair of stops just less than and just greater than the input.\\n- `["exponential", base]`: interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\\n- `["cubic-bezier", x1, y1, x2, y2]`: interpolates using the cubic bezier curve defined by the given control points.\',group:"Ramps, scales, curves"},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math"},pi:{doc:"Returns the mathematical constant pi.",group:"Math"},e:{doc:"Returns the mathematical constant e.",group:"Math"},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types"},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string value is obtained. If none of the inputs are strings, the expression is an error.",group:"Types"},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number value is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types"},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean value is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types"},object:{doc:"Asserts that the input value is an object. If it is not, the expression is an error.",group:"Types"},"to-string":{doc:\'Converts the input value to a string. If the input is `null`, the result is `"null"`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\',group:"Types"},"to-number":{doc:\'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\',group:"Types"},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types"},"to-rgba":{doc:"Returns a four-element array containing the input color\'s red, green, blue, and alpha components, in that order.",group:"Color"},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types"},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color"},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color"},get:{doc:"Retrieves a property value from the current feature\'s properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup"},has:{doc:"Tests for the presence of an property value in the current feature\'s properties, or from another object if a second argument is provided.",group:"Lookup"},length:{doc:"Gets the length of an array or string.",group:"Lookup"},properties:{doc:\'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.\',group:"Feature data"},"geometry-type":{doc:"Gets the feature\'s geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",group:"Feature data"},id:{doc:"Gets the feature\'s id, if it has one.",group:"Feature data"},zoom:{doc:\'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.\',group:"Zoom"},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap"},"+":{doc:"Returns the sum of the inputs.",group:"Math"},"*":{doc:"Returns the product of the inputs.",group:"Math"},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math"},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math"},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math"},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math"},sqrt:{doc:"Returns the square root of the input.",group:"Math"},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math"},ln:{doc:"Returns the natural logarithm of the input.",group:"Math"},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math"},sin:{doc:"Returns the sine of the input.",group:"Math"},cos:{doc:"Returns the cosine of the input.",group:"Math"},tan:{doc:"Returns the tangent of the input.",group:"Math"},asin:{doc:"Returns the arcsine of the input.",group:"Math"},acos:{doc:"Returns the arccosine of the input.",group:"Math"},atan:{doc:"Returns the arctangent of the input.",group:"Math"},min:{doc:"Returns the minimum value of the inputs.",group:"Math"},max:{doc:"Returns the maximum value of the inputs.",group:"Math"},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.",group:"Decision"},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The inputs must be numbers or strings, and both of the same type.",group:"Decision"},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision"},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision"},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision"},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String"},concat:{doc:"Returns a string consisting of the concatenation of the inputs.",group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant",doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1,doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0\xB0 (0\xB0 when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0\xB0 when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0\xB0, directly above, to 180\xB0, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color\'s opacity will not affect the opacity of the 1px stroke, if it is used.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion\'s surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{}}},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0"}}},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line\'s actual path. Value indicates the width of the inner gap.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-offset":{type:"number",default:0,doc:"The line\'s offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"The geometry\'s offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"data-driven styling":{}}},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{}}},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The width of the circle\'s stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle\'s stroke.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-weight":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{js:"0.41.0"}}},"heatmap-intensity":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:\'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.\',function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0"},"data-driven styling":{}}}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the icon\'s halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the icon\'s anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,doc:"The color of the text\'s halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",doc:"The halo\'s fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}}},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",doc:"Distance that the text\'s anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}}}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",function:"interpolated","zoom-function":!0,transition:!1},"hillshade-illumination-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated."},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",function:"interpolated","zoom-function":!0,transition:!0}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",function:"interpolated","zoom-function":!0,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}}}},function(t,e,n){t.exports=n(104),t.exports.emitErrors=function(t,e){if(e&&e.length){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value.message;t.fire("error",{error:new Error(s)})}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}return!1}},function(t,e,n){var r=n(64),i=n(16),o=n(8),a=n(107);function s(t,e){e=e||o;var n=[];return n=n.concat(i({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:a,"*":function(){return[]}}})),t.constants&&(n=n.concat(r({key:"constants",value:t.constants,style:t,styleSpec:e}))),u(n)}function u(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function l(t){return function(){return u(t.apply(this,arguments))}}s.source=l(n(73)),s.light=l(n(74)),s.layer=l(n(69)),s.filter=l(n(38)),s.paintProperty=l(n(70)),s.layoutProperty=l(n(72)),t.exports=s},function(t,e,n){var r=n(7),i=n(5);t.exports=function(t){var e=t.value,n=t.key,o=r(e);return"boolean"!==o?[new i(n,e,"boolean expected, ".concat(o," found"))]:[]}},function(t,e,n){var r=n(5),i=n(7),o=n(49).parseCSSColor;t.exports=function(t){var e=t.key,n=t.value,a=i(n);return"string"!==a?[new r(e,n,"color expected, ".concat(a," found"))]:null===o(n)?[new r(e,n,\'color expected, "\'.concat(n,\'" found\'))]:[]}},function(t,e,n){var r=n(5),i=n(75);t.exports=function(t){var e=t.value,n=t.key,o=i(t);return o.length?o:(-1===e.indexOf("{fontstack}")&&o.push(new r(n,e,\'"glyphs" url must include a "{fontstack}" token\')),-1===e.indexOf("{range}")&&o.push(new r(n,e,\'"glyphs" url must include a "{range}" token\')),o)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(77),c=n(28).multiPolygonIntersectsBufferedMultiPoint,f=n(30),h=f.getMaximumPaintValue,p=f.translateDistance,y=f.translate,d=n(111),v=n(1),m=(v.Transitionable,v.Transitioning,v.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,d))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(t){var e=t;return h("circle-radius",this,e)+h("circle-stroke-width",this,e)+p(this.paint.get("circle-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=y(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i,o),s=this.paint.get("circle-radius").evaluate(e)*o,u=this.paint.get("circle-stroke-width").evaluate(e)*o;return c(a,n,s+u)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=m},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"}],4)},function(t,e,n){var r=n(2);e.packUint8ToFloat=function(t,e){return 256*(t=r.clamp(Math.floor(t),0,255))+(e=r.clamp(Math.floor(e),0,255))}},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty,new o({"circle-radius":new s(r.paint_circle["circle-radius"]),"circle-color":new s(r.paint_circle["circle-color"]),"circle-blur":new s(r.paint_circle["circle-blur"]),"circle-opacity":new s(r.paint_circle["circle-opacity"]),"circle-translate":new a(r.paint_circle["circle-translate"]),"circle-translate-anchor":new a(r.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new a(r.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new a(r.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new s(r.paint_circle["circle-stroke-width"]),"circle-stroke-color":new s(r.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new s(r.paint_circle["circle-stroke-opacity"])}));t.exports={paint:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t,e,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=n(9),f=n(113),h=n(29).RGBAImage,p=n(114),y=n(1),d=(y.Transitionable,y.Transitioning,y.PossiblyEvaluated,function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=i(this,a(e).call(this,t,p)))._updateColorRamp(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,c),u(e,[{key:"createBucket",value:function(t){return new f(t)}}]),u(e,[{key:"setPaintProperty",value:function(t,n,r){o(a(e.prototype),"setPaintProperty",this).call(this,t,n,r),"heatmap-color"===t&&this._updateColorRamp()}},{key:"_updateColorRamp",value:function(){for(var t=this._transitionablePaint._values["heatmap-color"].value.expression,e=new Uint8Array(1024),n=e.length,r=4;r<n;r+=4){var i=t.evaluate({heatmapDensity:r/n});e[r+0]=Math.floor(255*i.r/i.a),e[r+1]=Math.floor(255*i.g/i.a),e[r+2]=Math.floor(255*i.b/i.a),e[r+3]=Math.floor(255*i.a)}this.colorRamp=new h({width:256,height:1},e),this.colorRampTexture=null}},{key:"resize",value:function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return!1}},{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}]),e}());t.exports=d},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(77),u=n(3).register,l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}();u("HeatmapBucket",l,{omit:["layers"]}),t.exports=l},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty),l=new o({"heatmap-radius":new s(r.paint_heatmap["heatmap-radius"]),"heatmap-weight":new s(r.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new a(r.paint_heatmap["heatmap-intensity"]),"heatmap-color":new u(r.paint_heatmap["heatmap-color"]),"heatmap-opacity":new a(r.paint_heatmap["heatmap-opacity"])});t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(116),c=n(1),f=(c.Transitionable,c.Transitioning,c.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,l))}var n,r,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}])&&i(n.prototype,r),c&&i(n,c),e}());t.exports=f},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty,i.HeatmapColorProperty,new o({"hillshade-illumination-direction":new a(r.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new a(r.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new a(r.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new a(r.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new a(r.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new a(r.paint_hillshade["hillshade-accent-color"])}));t.exports={paint:s}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(118),c=n(28).multiPolygonIntersectsMultiPolygon,f=n(30),h=f.translateDistance,p=f.translate,y=n(121),d=n(1),v=(d.Transitionable,d.Transitioning,d.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,y))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"recalculate",value:function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t),void 0===this._transitionablePaint.getValue("fill-outline-color")&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}},{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(){return h(this.paint.get("fill-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=p(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i,o);return c(a,n)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=v},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).FillLayoutArray,o=n(119).members,a=n(25).SegmentVector,s=n(26).ProgramConfigurationSet,u=n(27),l=u.LineIndexArray,c=u.TriangleIndexArray,f=n(20),h=n(78),p=n(40),y=n(0),d=n(3).register,v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new c,this.indexArray2=new l,this.programConfigurations=new s(o,e.layers,e.zoom),this.segments=new a,this.segments2=new a}var e,n,u;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,l=s.index,c=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=f(u);this.addFeature(u,h),e.featureIndex.insert(u,h,l,c,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=p(e,500)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=0,l=!0,c=!1,f=void 0;try{for(var d,v=s[Symbol.iterator]();!(l=(d=v.next()).done);l=!0){u+=d.value.length}}catch(t){c=!0,f=t}finally{try{l||null==v.return||v.return()}finally{if(c)throw f}}var m=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray),g=m.vertexLength,b=[],x=[],w=!0,k=!1,_=void 0;try{for(var S,A=s[Symbol.iterator]();!(w=(S=A.next()).done);w=!0){var T=S.value;if(0!==T.length){T!==s[0]&&x.push(b.length/2);var j=this.segments2.prepareSegment(T.length,this.layoutVertexArray,this.indexArray2),O=j.vertexLength;this.layoutVertexArray.emplaceBack(T[0].x,T[0].y),this.indexArray2.emplaceBack(O+T.length-1,O),b.push(T[0].x),b.push(T[0].y);for(var z=1;z<T.length;z++)this.layoutVertexArray.emplaceBack(T[z].x,T[z].y),this.indexArray2.emplaceBack(O+z-1,O+z),b.push(T[z].x),b.push(T[z].y);j.vertexLength+=T.length,j.primitiveLength+=T.length}}}catch(t){k=!0,_=t}finally{try{w||null==A.return||A.return()}finally{if(k)throw _}}var P=h(b,x);y(P.length%3==0);for(var E=0;E<P.length;E+=3)this.indexArray.emplaceBack(g+P[E],g+P[E+1],g+P[E+2]);m.vertexLength+=u,m.primitiveLength+=P.length/3}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),u&&r(e,u),t}();d("FillBucket",v,{omit:["layers"]}),t.exports=v},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"}],4)},function(t,e,n){t.exports=function(){"use strict";function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:t>e?1:0}return function(n,r,i,o,a){!function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1),h=Math.max(i,Math.floor(r-u*c/s+f)),p=Math.min(o,Math.floor(r+(s-u)*c/s+f));e(n,r,h,p,a)}var y=n[r],d=i,v=o;for(t(n,i,r),a(n[o],y)>0&&t(n,i,o);d<v;){for(t(n,d,v),d++,v--;a(n[d],y)<0;)d++;for(;a(n[v],y)>0;)v--}0===a(n[i],y)?t(n,i,v):t(n,++v,o),v<=r&&(i=v+1),r<=v&&(o=v-1)}}(n,r,i||0,o||n.length-1,a||e)}}()},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"fill-antialias":new a(r.paint_fill["fill-antialias"]),"fill-opacity":new s(r.paint_fill["fill-opacity"]),"fill-color":new s(r.paint_fill["fill-color"]),"fill-outline-color":new s(r.paint_fill["fill-outline-color"]),"fill-translate":new a(r.paint_fill["fill-translate"]),"fill-translate-anchor":new a(r.paint_fill["fill-translate-anchor"]),"fill-pattern":new u(r.paint_fill["fill-pattern"])}));t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=n(9),l=n(123),c=n(28).multiPolygonIntersectsMultiPolygon,f=n(30),h=f.translateDistance,p=f.translate,y=n(125),d=n(1),v=(d.Transitionable,d.Transitioning,d.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).call(this,t,y))}var n,r,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),n=e,(r=[{key:"createBucket",value:function(t){return new l(t)}},{key:"queryRadius",value:function(){return h(this.paint.get("fill-extrusion-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=p(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),i,o);return c(a,n)}},{key:"hasOffscreenPass",value:function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility}},{key:"resize",value:function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)}}])&&i(n.prototype,r),f&&i(n,f),e}());t.exports=v},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).FillExtrusionLayoutArray,o=n(124).members,a=n(25),s=a.SegmentVector,u=a.MAX_VERTEX_ARRAY_LENGTH,l=n(26).ProgramConfigurationSet,c=n(27).TriangleIndexArray,f=n(20),h=n(18),p=n(78),y=n(40),d=n(0),v=n(3).register,m=Math.pow(2,13);function g(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*m)+a,i*m*2,o*m*2,Math.round(s))}var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new c,this.programConfigurations=new l(o,e.layers,e.zoom),this.segments=new s}var e,n,a;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,l=s.index,c=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=f(u);this.addFeature(u,h),e.featureIndex.insert(u,h,l,c,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=y(e,500)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=0,c=!0,f=!1,h=void 0;try{for(var v,m=s[Symbol.iterator]();!(c=(v=m.next()).done);c=!0){l+=v.value.length}}catch(t){f=!0,h=t}finally{try{c||null==m.return||m.return()}finally{if(f)throw h}}var b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),k=!0,_=!1,S=void 0;try{for(var A,T=s[Symbol.iterator]();!(k=(A=T.next()).done);k=!0){var j=A.value;if(0!==j.length&&!w(j))for(var O=0,z=0;z<j.length;z++){var P=j[z];if(z>=1){var E=j[z-1];if(!x(P,E)){b.vertexLength+4>u&&(b=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var C=P.sub(E)._perp()._unit(),M=E.dist(P);O+M>32768&&(O=0),g(this.layoutVertexArray,P.x,P.y,C.x,C.y,0,0,O),g(this.layoutVertexArray,P.x,P.y,C.x,C.y,0,1,O),O+=M,g(this.layoutVertexArray,E.x,E.y,C.x,C.y,0,0,O),g(this.layoutVertexArray,E.x,E.y,C.x,C.y,0,1,O);var I=b.vertexLength;this.indexArray.emplaceBack(I,I+1,I+2),this.indexArray.emplaceBack(I+1,I+2,I+3),b.vertexLength+=4,b.primitiveLength+=2}}}}}catch(t){_=!0,S=t}finally{try{k||null==T.return||T.return()}finally{if(_)throw S}}b.vertexLength+l>u&&(b=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray));var B=[],V=[],L=b.vertexLength,F=!0,R=!1,D=void 0;try{for(var q,N=s[Symbol.iterator]();!(F=(q=N.next()).done);F=!0){var U=q.value;if(0!==U.length){U!==s[0]&&V.push(B.length/2);for(var J=0;J<U.length;J++){var G=U[J];g(this.layoutVertexArray,G.x,G.y,0,0,1,1,0),B.push(G.x),B.push(G.y)}}}}catch(t){R=!0,D=t}finally{try{F||null==N.return||N.return()}finally{if(R)throw D}}var Z=p(B,V);d(Z.length%3==0);for(var H=0;H<Z.length;H+=3)this.indexArray.emplaceBack(L+Z[H],L+Z[H+1],L+Z[H+2]);b.primitiveLength+=Z.length/3,b.vertexLength+=l}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)}}])&&r(e.prototype,n),a&&r(e,a),t}();function x(t,e){return t.x===e.x&&(t.x<0||t.x>h)||t.y===e.y&&(t.y<0||t.y>h)}function w(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>h})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>h})}v("FillExtrusionBucket",b,{omit:["layers"]}),t.exports=b},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4)},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"fill-extrusion-opacity":new a(r["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new s(r["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new a(r["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new a(r["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new u(r["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new s(r["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new s(r["paint_fill-extrusion"]["fill-extrusion-base"])}));t.exports={paint:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=n(6),p=n(9),y=n(127),d=n(28).multiPolygonIntersectsBufferedMultiLine,v=n(30),m=v.getMaximumPaintValue,g=v.translateDistance,b=v.translate,x=n(130),w=n(2).extend,k=n(41),_=n(1),S=(_.Transitionable,_.Transitioning,_.Layout,_.PossiblyEvaluated,_.DataDrivenProperty),A=new(function(t){function e(){return i(this,e),s(this,l(e).apply(this,arguments))}return c(e,S),a(e,[{key:"possiblyEvaluate",value:function(t,n){return n=new k(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),u(l(e.prototype),"possiblyEvaluate",this).call(this,t,n)}},{key:"evaluate",value:function(t,n,r){return n=w({},n,{zoom:Math.floor(n.zoom)}),u(l(e.prototype),"evaluate",this).call(this,t,n,r)}}]),e}())(x.paint.properties["line-width"].specification);A.useIntegerZoom=!0;var T=function(t){function e(t){return i(this,e),s(this,l(e).call(this,t,x))}return c(e,p),a(e,[{key:"recalculate",value:function(t){u(l(e.prototype),"recalculate",this).call(this,t),this.paint._values["line-floorwidth"]=A.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}},{key:"createBucket",value:function(t){return new y(t)}},{key:"queryRadius",value:function(t){var e=t,n=j(m("line-width",this,e),m("line-gap-width",this,e)),r=m("line-offset",this,e);return n/2+Math.abs(r)+g(this.paint.get("line-translate"))}},{key:"queryIntersectsFeature",value:function(t,e,n,r,i,o){var a=b(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),i,o),s=o/2*j(this.paint.get("line-width").evaluate(e),this.paint.get("line-gap-width").evaluate(e)),u=this.paint.get("line-offset").evaluate(e);return u&&(n=function(t,e){for(var n=[],r=new h(0,0),i=0;i<t.length;i++){for(var o=t[i],a=[],s=0;s<o.length;s++){var u=o[s-1],l=o[s],c=o[s+1],f=0===s?r:l.sub(u)._unit()._perp(),p=s===o.length-1?r:c.sub(l)._unit()._perp(),y=f._add(p)._unit(),d=y.x*p.x+y.y*p.y;y._mult(1/d),a.push(y._mult(e)._add(l))}n.push(a)}return n}(n,u*o)),d(a,n,s)}}]),e}();function j(t,e){return e>0?e+2*t:t}t.exports=T},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(10).LineLayoutArray,o=n(128).members,a=n(25).SegmentVector,s=n(26).ProgramConfigurationSet,u=n(27).TriangleIndexArray,l=n(20),c=n(18),f=n(21).VectorTileFeature.types,h=n(3).register,p=63,y=Math.cos(Math.PI/180*37.5),d=.5,v=Math.pow(2,14)/d;function m(t,e,n,r,i,o,a){t.emplaceBack(e.x,e.y,r?1:0,i?1:-1,Math.round(p*n.x)+128,Math.round(p*n.y)+128,1+(0===o?0:o<0?-1:1)|(a*d&63)<<2,a*d>>6)}var g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=e.index,this.layoutVertexArray=new i,this.indexArray=new u,this.programConfigurations=new s(o,e.layers,e.zoom),this.segments=new a}var e,n,h;return e=t,(n=[{key:"populate",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=s.feature,c=s.index,f=s.sourceLayerIndex;if(this.layers[0]._featureFilter({zoom:this.zoom},u)){var h=l(u);this.addFeature(u,h),e.featureIndex.insert(u,h,c,f,this.index)}}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}},{key:"isEmpty",value:function(){return 0===this.layoutVertexArray.length}},{key:"upload",value:function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,o),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)}},{key:"destroy",value:function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}},{key:"addFeature",value:function(t,e){var n=this.layers[0].layout,r=n.get("line-join").evaluate(t),i=n.get("line-cap"),o=n.get("line-miter-limit"),a=n.get("line-round-limit"),s=!0,u=!1,l=void 0;try{for(var c,f=e[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var h=c.value;this.addLine(h,t,r,i,o,a)}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}},{key:"addLine",value:function(t,e,n,r,i,o){for(var a="Polygon"===f[e.type],s=t.length;s>=2&&t[s-1].equals(t[s-2]);)s--;for(var u=0;u<s-1&&t[u].equals(t[u+1]);)u++;if(!(s<(a?3:2))){"bevel"===n&&(i=1.05);var l=c/(512*this.overscaling)*15,h=t[u],p=this.segments.prepareSegment(10*s,this.layoutVertexArray,this.indexArray);this.distance=0;var d,v,m,g=r,b=a?"butt":r,x=!0,w=void 0,k=void 0,_=void 0,S=void 0;this.e1=this.e2=this.e3=-1,a&&(d=t[s-2],S=h.sub(d)._unit()._perp());for(var A=u;A<s;A++)if(!(k=a&&A===s-1?t[u+1]:t[A+1])||!t[A].equals(k)){S&&(_=S),d&&(w=d),d=t[A],S=k?k.sub(d)._unit()._perp():_;var T=(_=_||S).add(S);0===T.x&&0===T.y||T._unit();var j=T.x*S.x+T.y*S.y,O=0!==j?1/j:1/0,z=j<y&&w&&k;if(z&&A>u){var P=d.dist(w);if(P>2*l){var E=d.sub(d.sub(w)._mult(l/P)._round());this.distance+=E.dist(w),this.addCurrentVertex(E,this.distance,_.mult(1),0,0,!1,p),w=E}}var C=w&&k,M=C?n:k?g:b;if(C&&"round"===M&&(O<o?M="miter":O<=2&&(M="fakeround")),"miter"===M&&O>i&&(M="bevel"),"bevel"===M&&(O>2&&(M="flipbevel"),O<i&&(M="miter")),w&&(this.distance+=d.dist(w)),"miter"===M)T._mult(O),this.addCurrentVertex(d,this.distance,T,0,0,!1,p);else if("flipbevel"===M){if(O>100)T=S.clone().mult(-1);else{var I=_.x*S.y-_.y*S.x>0?-1:1,B=O*_.add(S).mag()/_.sub(S).mag();T._perp()._mult(B*I)}this.addCurrentVertex(d,this.distance,T,0,0,!1,p),this.addCurrentVertex(d,this.distance,T.mult(-1),0,0,!1,p)}else if("bevel"===M||"fakeround"===M){var V=_.x*S.y-_.y*S.x>0,L=-Math.sqrt(O*O-1);if(V?(m=0,v=L):(v=0,m=L),x||this.addCurrentVertex(d,this.distance,_,v,m,!1,p),"fakeround"===M){for(var F=Math.floor(8*(.5-(j-.5))),R=void 0,D=0;D<F;D++)R=S.mult((D+1)/(F+1))._add(_)._unit(),this.addPieSliceVertex(d,this.distance,R,V,p);this.addPieSliceVertex(d,this.distance,T,V,p);for(var q=F-1;q>=0;q--)R=_.mult((q+1)/(F+1))._add(S)._unit(),this.addPieSliceVertex(d,this.distance,R,V,p)}k&&this.addCurrentVertex(d,this.distance,S,-v,-m,!1,p)}else"butt"===M?(x||this.addCurrentVertex(d,this.distance,_,0,0,!1,p),k&&this.addCurrentVertex(d,this.distance,S,0,0,!1,p)):"square"===M?(x||(this.addCurrentVertex(d,this.distance,_,1,1,!1,p),this.e1=this.e2=-1),k&&this.addCurrentVertex(d,this.distance,S,-1,-1,!1,p)):"round"===M&&(x||(this.addCurrentVertex(d,this.distance,_,0,0,!1,p),this.addCurrentVertex(d,this.distance,_,1,1,!0,p),this.e1=this.e2=-1),k&&(this.addCurrentVertex(d,this.distance,S,-1,-1,!0,p),this.addCurrentVertex(d,this.distance,S,0,0,!1,p)));if(z&&A<s-1){var N=d.dist(k);if(N>2*l){var U=d.add(k.sub(d)._mult(l/N)._round());this.distance+=U.dist(d),this.addCurrentVertex(U,this.distance,S.mult(1),0,0,!1,p),d=U}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}}},{key:"addCurrentVertex",value:function(t,e,n,r,i,o,a){var s,u=this.layoutVertexArray,l=this.indexArray;s=n.clone(),r&&s._sub(n.perp()._mult(r)),m(u,t,s,o,!1,r,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(l.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=n.mult(-1),i&&s._sub(n.perp()._mult(i)),m(u,t,s,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(l.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>v/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,n,r,i,o,a))}},{key:"addPieSliceVertex",value:function(t,e,n,r,i){n=n.mult(r?-1:1);var o=this.layoutVertexArray,a=this.indexArray;m(o,t,n,!1,r,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(a.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),r?this.e2=this.e3:this.e1=this.e3}}])&&r(e.prototype,n),h&&r(e,h),t}();h("LineBucket",g,{omit:["layers"]}),t.exports=g},function(t,e,n){var r=n(17).createLayout;t.exports=r([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4)},function(t,e,n){"use strict";var r=n(79);function i(t,e,n){if(3===t){var i=new r(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}t.exports=function(t,e){this.layers=t.readFields(i,{},e)}},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=i.CrossFadedProperty,l=(i.HeatmapColorProperty,new o({"line-cap":new a(r.layout_line["line-cap"]),"line-join":new s(r.layout_line["line-join"]),"line-miter-limit":new a(r.layout_line["line-miter-limit"]),"line-round-limit":new a(r.layout_line["line-round-limit"])})),c=new o({"line-opacity":new s(r.paint_line["line-opacity"]),"line-color":new s(r.paint_line["line-color"]),"line-translate":new a(r.paint_line["line-translate"]),"line-translate-anchor":new a(r.paint_line["line-translate-anchor"]),"line-width":new s(r.paint_line["line-width"]),"line-gap-width":new s(r.paint_line["line-gap-width"]),"line-offset":new s(r.paint_line["line-offset"]),"line-blur":new s(r.paint_line["line-blur"]),"line-dasharray":new u(r.paint_line["line-dasharray"]),"line-pattern":new u(r.paint_line["line-pattern"])});t.exports={paint:c,layout:l}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.first=!0}var e,r,i;return e=t,(r=[{key:"update",value:function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(9),c=n(42),f=n(138),h=n(14).isExpression,p=n(0),y=n(139),d=n(1),v=(d.Transitionable,d.Transitioning,d.Layout,d.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).call(this,t,y))}var n,r,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,l),n=e,(r=[{key:"recalculate",value:function(t){a(s(e.prototype),"recalculate",this).call(this,t),"auto"===this.layout.get("icon-rotation-alignment")&&("line"===this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("line"===this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))}},{key:"getValueAndResolveTokens",value:function(t,e){var n=this.layout.get(t).evaluate(e),r=this._unevaluatedLayout._values[t];return r.isDataDriven()||h(r.value)?n:f(e.properties,n)}},{key:"createBucket",value:function(t){return new c(t)}},{key:"queryRadius",value:function(){return 0}},{key:"queryIntersectsFeature",value:function(){return p(!1),!1}}])&&i(n.prototype,r),d&&i(n,d),e}());t.exports=v},function(t,e,n){var r=n(17).createLayout,i={symbolLayoutAttributes:r([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),dynamicLayoutAttributes:r([{name:"a_projected_pos",components:3,type:"Float32"}],4),placementOpacityAttributes:r([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),collisionVertexAttributes:r([{name:"a_placed",components:2,type:"Uint8"}],4),collisionBox:r([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),collisionBoxLayout:r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout:r([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),placement:r([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]),glyphOffset:r([{type:"Float32",name:"offsetX"}]),lineVertex:r([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}])};t.exports=i},function(t,e,n){var r=n(43);t.exports=function(t,e,n){var i=e.layout.get("text-transform").evaluate(n);return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),r.applyArabicShaping&&(t=r.applyArabicShaping(t)),t}},function(t,e){t.exports=function(t){var e={},n={},r=[],i=0;function o(e){r.push(t[e]),i++}function a(t,e,i){var o=n[t];return delete n[t],n[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(t,n,i){var o=e[n];return delete e[n],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function u(t,e,n){var r=n?e[0][e[0].length-1]:e[0][0];return"".concat(t,":").concat(r.x,":").concat(r.y)}for(var l=0;l<t.length;l++){var c=t[l],f=c.geometry,h=c.text;if(h){var p=u(h,f),y=u(h,f,!0);if(p in n&&y in e&&n[p]!==e[y]){var d=s(p,y,f),v=a(p,y,r[d].geometry);delete e[p],delete n[y],n[u(h,r[v].geometry,!0)]=v,r[d].geometry=null}else p in n?a(p,y,f):y in e?s(p,y,f):(o(l),e[p]=i-1,n[y]=i-1)}else o(l)}return r.filter(function(t){return t.geometry})}},function(t,e){t.exports={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}}},function(t,e,n){var r=n(14).normalizePropertyExpression,i=n(19),o=n(2);t.exports={getSizeData:function(t,e){var n=e.expression;if("constant"===n.kind)return{functionType:"constant",layoutSize:n.evaluate({zoom:t+1})};if("source"===n.kind)return{functionType:"source"};for(var r=n.zoomStops,i=0;i<r.length&&r[i]<=t;)i++;for(var o=i=Math.max(0,i-1);o<r.length&&r[o]<t+1;)o++;o=Math.min(r.length-1,o);var a={min:r[i],max:r[o]};return"composite"===n.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:n.evaluate({zoom:t+1}),zoomRange:a,sizeRange:{min:n.evaluate({zoom:a.min}),max:n.evaluate({zoom:a.max})},propertyValue:e.value}},evaluateSizeForFeature:function(t,e,n){var r=e;return"source"===t.functionType?n.lowerSize/10:"composite"===t.functionType?i.number(n.lowerSize/10,n.upperSize/10,r.uSizeT):r.uSize},evaluateSizeForZoom:function(t,e,n){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,a=t.zoomRange,s=t.sizeRange,u=r(i,n.specification),l=o.clamp(u.interpolationFactor(e,a.min,a.max),0,1);return{uSizeT:0,uSize:s.min+l*(s.max-s.min)}}var c=t.propertyValue,f=t.zoomRange,h=r(c,n.specification);return{uSizeT:o.clamp(h.interpolationFactor(e,f.min,f.max),0,1),uSize:0}}}},function(t,e){t.exports=function(t,e){return e.replace(/{([^{}]+)}/g,function(e,n){return n in t?String(t[n]):""}).replace(/FORMAT_NUMBER\\(([^\\)]+)\\)/g,function(t,e){return function(t){t=t.split(",");var e=parseFloat(t[0]);t[2]&&(e*=parseFloat(t[2]));return e<1e3?Math.round(e):e<1e5?(e/1e3).toFixed(1)+"K":e<1e6?Math.round(e/1e3)+"K":e<1e9?(e/1e6).toFixed(2)+"M":e<1e12?(e=Math.round(e/1e6).toFixed(0)).slice(0,-3)+","+e.slice(-4,-1)+"M":"HUGE_NUM"}(e)})}},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=i.DataDrivenProperty,u=(i.CrossFadedProperty,i.HeatmapColorProperty,new o({"symbol-placement":new a(r.layout_symbol["symbol-placement"]),"symbol-spacing":new a(r.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new a(r.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new a(r.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new a(r.layout_symbol["icon-ignore-placement"]),"icon-optional":new a(r.layout_symbol["icon-optional"]),"icon-rotation-alignment":new a(r.layout_symbol["icon-rotation-alignment"]),"icon-size":new s(r.layout_symbol["icon-size"]),"icon-text-fit":new a(r.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new a(r.layout_symbol["icon-text-fit-padding"]),"icon-image":new s(r.layout_symbol["icon-image"]),"icon-rotate":new s(r.layout_symbol["icon-rotate"]),"icon-padding":new a(r.layout_symbol["icon-padding"]),"icon-keep-upright":new a(r.layout_symbol["icon-keep-upright"]),"icon-offset":new s(r.layout_symbol["icon-offset"]),"icon-anchor":new s(r.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new a(r.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new a(r.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new a(r.layout_symbol["text-rotation-alignment"]),"text-field":new s(r.layout_symbol["text-field"]),"text-font":new s(r.layout_symbol["text-font"]),"text-size":new s(r.layout_symbol["text-size"]),"text-max-width":new s(r.layout_symbol["text-max-width"]),"text-line-height":new a(r.layout_symbol["text-line-height"]),"text-letter-spacing":new s(r.layout_symbol["text-letter-spacing"]),"text-justify":new s(r.layout_symbol["text-justify"]),"text-anchor":new s(r.layout_symbol["text-anchor"]),"text-max-angle":new a(r.layout_symbol["text-max-angle"]),"text-rotate":new s(r.layout_symbol["text-rotate"]),"text-padding":new a(r.layout_symbol["text-padding"]),"text-keep-upright":new a(r.layout_symbol["text-keep-upright"]),"text-transform":new s(r.layout_symbol["text-transform"]),"text-offset":new s(r.layout_symbol["text-offset"]),"text-allow-overlap":new a(r.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new a(r.layout_symbol["text-ignore-placement"]),"text-optional":new a(r.layout_symbol["text-optional"])})),l=new o({"icon-opacity":new s(r.paint_symbol["icon-opacity"]),"icon-color":new s(r.paint_symbol["icon-color"]),"icon-halo-color":new s(r.paint_symbol["icon-halo-color"]),"icon-halo-width":new s(r.paint_symbol["icon-halo-width"]),"icon-halo-blur":new s(r.paint_symbol["icon-halo-blur"]),"icon-translate":new a(r.paint_symbol["icon-translate"]),"icon-translate-anchor":new a(r.paint_symbol["icon-translate-anchor"]),"text-opacity":new s(r.paint_symbol["text-opacity"]),"text-color":new s(r.paint_symbol["text-color"]),"text-halo-color":new s(r.paint_symbol["text-halo-color"]),"text-halo-width":new s(r.paint_symbol["text-halo-width"]),"text-halo-blur":new s(r.paint_symbol["text-halo-blur"]),"text-translate":new a(r.paint_symbol["text-translate"]),"text-translate-anchor":new a(r.paint_symbol["text-translate-anchor"])});t.exports={paint:l,layout:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(9),u=n(141),l=n(1),c=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).call(this,t,u))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}());t.exports=c},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty),u=(i.HeatmapColorProperty,new o({"background-color":new a(r.paint_background["background-color"]),"background-pattern":new s(r.paint_background["background-pattern"]),"background-opacity":new a(r.paint_background["background-opacity"])}));t.exports={paint:u}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=n(9),u=n(143),l=n(1),c=(l.Transitionable,l.Transitioning,l.PossiblyEvaluated,function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,o(e).call(this,t,u))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,s),e}());t.exports=c},function(t,e,n){var r=n(8),i=n(1),o=i.Properties,a=i.DataConstantProperty,s=(i.DataDrivenProperty,i.CrossFadedProperty,i.HeatmapColorProperty,new o({"raster-opacity":new a(r.paint_raster["raster-opacity"]),"raster-hue-rotate":new a(r.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new a(r.paint_raster["raster-brightness-min"]),"raster-brightness-max":new a(r.paint_raster["raster-brightness-max"]),"raster-saturation":new a(r.paint_raster["raster-saturation"]),"raster-contrast":new a(r.paint_raster["raster-contrast"]),"raster-fade-duration":new a(r.paint_raster["raster-fade-duration"])}));t.exports={paint:s}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(145);function o(t){var e=r(t);if("number"===e||"boolean"===e||"string"===e||null==t)return JSON.stringify(t);if(Array.isArray(t)){var n="[",i=!0,a=!1,s=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=u.value;n+="".concat(o(c),",")}}catch(t){a=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return"".concat(n,"]")}for(var f=Object.keys(t).sort(),h="{",p=0;p<f.length;p++)h+="".concat(JSON.stringify(f[p]),":").concat(o(t[f[p]]),",");return"".concat(h,"}")}function a(t){var e="",n=!0,r=!1,a=void 0;try{for(var s,u=i[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var l=s.value;e+="/".concat(o(t[l]))}}catch(t){r=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw a}}return e}t.exports=function(t){for(var e={},n=0;n<t.length;n++){var r=a(t[n]),i=e[r];i||(i=e[r]=[]),i.push(t[n])}var o=[];for(var s in e)o.push(e[s]);return o}},function(t,e){t.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,y=r?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=y,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=y,a/=256,l-=8);t[n+p-y]|=128*d}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(148),o=n(151).performSymbolLayout,a=n(10).CollisionBoxArray,s=n(83),u=n(42),l=n(2),c=n(0),f=n(162).makeImageAtlas,h=n(163).makeGlyphAtlas,p=n(41),y=n(84).OverscaledTileID,d=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileID=new y(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=e.overscaling,this.showCollisionBoxes=e.showCollisionBoxes}var e,n,p;return e=t,(n=[{key:"parse",value:function(t,e,n,r){var p=this;this.status="parsing",this.data=t,this.collisionBoxArray=new a;var y=new s(Object.keys(t.layers).sort()),d=new i(this.tileID,this.overscaling);d.bucketLayerIDs=[];var m,g,b,x={},w={featureIndex:d,iconDependencies:{},glyphDependencies:{}},k=e.familiesBySource[this.source];for(var _ in k){var S=t.layers[_];if(S){1===S.version&&l.warnOnce(\'Vector tile source "\'.concat(this.source,\'" layer "\').concat(_,\'" \')+"does not use vector tile spec v2 and therefore may have some rendering errors.");for(var A=y.encode(_),T=[],j=0;j<S.length;j++){var O=S.feature(j);T.push({feature:O,index:j,sourceLayerIndex:A})}var z=!0,P=!1,E=void 0;try{for(var C,M=k[_][Symbol.iterator]();!(z=(C=M.next()).done);z=!0){var I=C.value,B=I[0];if(c(B.source===this.source),!(B.minzoom&&this.zoom<Math.floor(B.minzoom)))if(!(B.maxzoom&&this.zoom>=B.maxzoom))if("none"!==B.visibility)v(I,this.zoom),(x[B.id]=B.createBucket({index:d.bucketLayerIDs.length,layers:I,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray})).populate(T,w),d.bucketLayerIDs.push(I.map(function(t){return t.id}))}}catch(t){P=!0,E=t}finally{try{z||null==M.return||M.return()}finally{if(P)throw E}}}}var V=l.mapObject(w.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(V).length?n.send("getGlyphs",{uid:this.uid,stacks:V},function(t,e){m||(m=t,g=e,F.call(p))}):g={};var L=Object.keys(w.iconDependencies);function F(){if(m)return r(m);if(g&&b){var t=h(g),e=f(b);for(var n in x){var i=x[n];i instanceof u&&(v(i.layers,this.zoom),o(i,g,t.positions,b,e.positions,this.showCollisionBoxes))}this.status="done",r(null,{buckets:l.values(x).filter(function(t){return!t.isEmpty()}),featureIndex:d,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,iconAtlasImage:e.image})}}L.length?n.send("getImages",{icons:L},function(t,e){m||(m=t,b=e,F.call(p))}):b={},F.call(this)}}])&&r(e.prototype,n),p&&r(e,p),t}();function v(t,e){var n=new p(e),r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){a.value.recalculate(n)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}t.exports=d},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n(6);var i=n(20),o=n(18),a=n(39),s=n(48),u=n(83),l=n(21),c=n(32),f=n(149),h=n(2).arraysIntersect,p=(n(84).OverscaledTileID,n(3).register),y=n(10).FeatureIndexArray,d=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tileID=e,this.overscaling=n,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=r||new s(o,16,0),this.featureIndexArray=i||new y}var e,n,p;return e=t,(n=[{key:"insert",value:function(t,e,n,r,i){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);for(var a=0;a<e.length;a++){for(var s=e[a],u=[1/0,1/0,-1/0,-1/0],l=0;l<s.length;l++){var c=s[l];u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y)}this.grid.insert(o,u[0],u[1],u[2],u[3])}}},{key:"query",value:function(t,e){this.vtLayers||(this.vtLayers=new l.VectorTile(new c(this.rawTileData)).layers,this.sourceLayerCoder=new u(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var n={},r=t.params||{},i=o/t.tileSize/t.scale,s=a(r.filter),f=t.queryGeometry,h=t.additionalRadius*i,p=1/0,y=1/0,d=-1/0,m=-1/0,g=0;g<f.length;g++)for(var b=f[g],x=0;x<b.length;x++){var w=b[x];p=Math.min(p,w.x),y=Math.min(y,w.y),d=Math.max(d,w.x),m=Math.max(m,w.y)}var k=this.grid.query(p-h,y-h,d+h,m+h);k.sort(v),this.filterMatching(n,k,this.featureIndexArray,f,s,r.layers,e,t.bearing,i);var _=t.collisionIndex?t.collisionIndex.queryRenderedSymbols(f,this.tileID,o/t.tileSize,t.collisionBoxArray,t.sourceID,t.bucketInstanceIds):[];return _.sort(),this.filterMatching(n,_,t.collisionBoxArray,f,s,r.layers,e,t.bearing,i),n}},{key:"filterMatching",value:function(t,e,n,r,o,a,s,u,l){for(var c,p=0;p<e.length;p++){var y=e[p];if(y!==c){c=y;var d=n.get(y),v=this.bucketLayerIDs[d.bucketIndex];if(!a||h(a,v)){var m=this.sourceLayerCoder.decode(d.sourceLayerIndex),g=this.vtLayers[m].feature(d.featureIndex);if(o({zoom:this.tileID.overscaledZ},g))for(var b=null,x=0;x<v.length;x++){var w=v[x];if(!(a&&a.indexOf(w)<0)){var k=s[w];if(k&&("symbol"===k.type||(b||(b=i(g)),k.queryIntersectsFeature(r,g,b,this.z,u,l)))){var _=new f(g,this.z,this.x,this.y);_.layer=k.serialize();var S=t[w];void 0===S&&(S=t[w]=[]),S.push({featureIndex:y,feature:_})}}}}}}}},{key:"hasLayer",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bucketLayerIDs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,s=!0,u=!1,l=void 0;try{for(var c,f=a[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){if(t===c.value)return!0}}catch(t){u=!0,l=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw l}}}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return!1}}])&&r(e.prototype,n),p&&r(e,p),t}();function v(t,e){return e-t}p("FeatureIndex",d,{omit:["rawTileData","sourceLayerCoder","collisionIndex"]}),t.exports=d},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="Feature",this._vectorTileFeature=e,e._z=n,e._x=r,e._y=i,this.properties=e.properties,null!=e.id&&(this.id=e.id)}var e,r,i;return e=t,(r=[{key:"toJSON",value:function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t}},{key:"geometry",get:function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},set:function(t){this._geometry=t}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,o,a){return a=a||{},t+"?"+["bbox="+i(n,r,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+e].join("&")}function i(t,e,n){var r=o(256*t,256*(e=Math.pow(2,n)-e-1),n),i=o(256*(t+1),256*(e+1),n);return r[0]+","+r[1]+","+i[0]+","+i[1]}function o(t,e,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}n.r(e),n.d(e,"getURL",function(){return r}),n.d(e,"getTileBBox",function(){return i}),n.d(e,"getMercCoords",function(){return o})},function(t,e,n){var r=n(45),i=n(152),o=n(154),a=n(155),s=n(156),u=s.shapeText,l=s.shapeIcon,c=s.WritingMode,f=n(157),h=f.getGlyphQuads,p=f.getIconQuads,y=n(159),d=n(2),v=n(31),m=n(160),g=n(40),b=n(18),x=n(42),w=n(41);n(6);function k(t,e,n,s,u,l){var f=l.layoutTextSize.evaluate(e),h=l.layoutIconSize.evaluate(e),v=l.textMaxSize.evaluate(e);void 0===v&&(v=f);var w=t.layers[0].layout,k=w.get("text-offset").evaluate(e),A=w.get("icon-offset").evaluate(e),T=f/24,j=t.tilePixelRatio*T,O=t.tilePixelRatio*v/24,z=t.tilePixelRatio*h,P=t.tilePixelRatio*w.get("symbol-spacing"),E=w.get("text-padding")*t.tilePixelRatio,C=w.get("icon-padding")*t.tilePixelRatio,M=w.get("text-max-angle")/180*Math.PI,I="map"===w.get("text-rotation-alignment")&&"line"===w.get("symbol-placement"),B="map"===w.get("icon-rotation-alignment")&&"line"===w.get("symbol-placement"),V=P/2,L=function(r,i){i.x<0||i.x>=b||i.y<0||i.y>=b||t.symbolInstances.push(function(t,e,n,r,i,o,s,u,l,f,h,v,m,g,b,w,k,S,A,T,j,O){var z,P,E=t.addToLineVertexArray(e,n),C=0,M=0,I=0,B=r.horizontal?r.horizontal.text:"",V=[];r.horizontal&&(z=new y(s,n,e,u,l,f,r.horizontal,h,v,m,t.overscaling),M+=_(t,e,r.horizontal,o,m,A,T,g,E,r.vertical?c.horizontal:c.horizontalOnly,V,j,O),r.vertical&&(I+=_(t,e,r.vertical,o,m,A,T,g,E,c.vertical,V,j,O)));var L=z?z.boxStartIndex:t.collisionBoxArray.length,F=z?z.boxEndIndex:t.collisionBoxArray.length;if(i){var R=p(e,i,o,k,r.horizontal,A,T);P=new y(s,n,e,u,l,f,i,b,w,!1,t.overscaling),C=4*R.length;var D=t.iconSizeData,q=null;"source"===D.functionType?q=[10*o.layout.get("icon-size").evaluate(T)]:"composite"===D.functionType&&(q=[10*O.compositeIconSizes[0].evaluate(T),10*O.compositeIconSizes[1].evaluate(T)]),t.addSymbols(t.icon,R,q,S,k,T,!1,e,E.lineStartIndex,E.lineLength)}var N=P?P.boxStartIndex:t.collisionBoxArray.length,U=P?P.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=x.MAX_GLYPHS&&d.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");var J=new a,G=new a;return{key:B,textBoxStartIndex:L,textBoxEndIndex:F,iconBoxStartIndex:N,iconBoxEndIndex:U,textOffset:g,iconOffset:S,anchor:e,line:n,featureIndex:u,feature:T,numGlyphVertices:M,numVerticalGlyphVertices:I,numIconVertices:C,textOpacityState:J,iconOpacityState:G,isDuplicate:!1,placedTextSymbolIndices:V,crossTileID:0}}(t,i,r,n,s,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,j,E,I,k,z,C,B,A,{zoom:t.zoom},e,u,l))};if("line"===w.get("symbol-placement")){var F=!0,R=!1,D=void 0;try{for(var q,N=o(e.geometry,0,0,b,b)[Symbol.iterator]();!(F=(q=N.next()).done);F=!0){var U=q.value,J=i(U,P,M,n.vertical||n.horizontal,s,24,O,t.overscaling,b),G=!0,Z=!1,H=void 0;try{for(var W,Y=J[Symbol.iterator]();!(G=(W=Y.next()).done);G=!0){var K=W.value,X=n.horizontal;X&&S(t,X.text,V,K)||L(U,K)}}catch(t){Z=!0,H=t}finally{try{G||null==Y.return||Y.return()}finally{if(Z)throw H}}}}catch(t){R=!0,D=t}finally{try{F||null==N.return||N.return()}finally{if(R)throw D}}}else if("Polygon"===e.type){var $=!0,Q=!1,tt=void 0;try{for(var et,nt=g(e.geometry,0)[Symbol.iterator]();!($=(et=nt.next()).done);$=!0){var rt=et.value,it=m(rt,16);L(rt[0],new r(it.x,it.y,0))}}catch(t){Q=!0,tt=t}finally{try{$||null==nt.return||nt.return()}finally{if(Q)throw tt}}}else if("LineString"===e.type){var ot=!0,at=!1,st=void 0;try{for(var ut,lt=e.geometry[Symbol.iterator]();!(ot=(ut=lt.next()).done);ot=!0){var ct=ut.value;L(ct,new r(ct[0].x,ct[0].y,0))}}catch(t){at=!0,st=t}finally{try{ot||null==lt.return||lt.return()}finally{if(at)throw st}}}else if("Point"===e.type){var ft=!0,ht=!1,pt=void 0;try{for(var yt,dt=e.geometry[Symbol.iterator]();!(ft=(yt=dt.next()).done);ft=!0){var vt=yt.value,mt=!0,gt=!1,bt=void 0;try{for(var xt,wt=vt[Symbol.iterator]();!(mt=(xt=wt.next()).done);mt=!0){var kt=xt.value;L([kt],new r(kt.x,kt.y,0))}}catch(t){gt=!0,bt=t}finally{try{mt||null==wt.return||wt.return()}finally{if(gt)throw bt}}}}catch(t){ht=!0,pt=t}finally{try{ft||null==dt.return||dt.return()}finally{if(ht)throw pt}}}}function _(t,e,n,r,i,o,a,s,u,l,c,f,p){var y=h(e,n,r,i,o,a,f),d=t.textSizeData,v=null;return"source"===d.functionType?v=[10*r.layout.get("text-size").evaluate(a)]:"composite"===d.functionType&&(v=[10*p.compositeTextSizes[0].evaluate(a),10*p.compositeTextSizes[1].evaluate(a)]),t.addSymbols(t.text,y,v,s,i,a,l,e,u.lineStartIndex,u.lineLength),c.push(t.text.placedSymbolArray.length-1),4*y.length}function S(t,e,n,r){var i=t.compareText;if(e in i){for(var o=i[e],a=o.length-1;a>=0;a--)if(r.dist(o[a])<n)return!0}else i[e]=[];return i[e].push(r),!1}t.exports={performSymbolLayout:function(t,e,n,r,i,o){t.createArrays(),t.symbolInstances=[];var a=512*t.overscaling;t.tilePixelRatio=b/a,t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,f=t.layers[0]._unevaluatedLayout._values,h={};if("composite"===t.textSizeData.functionType){var p=t.textSizeData.zoomRange,y=p.min,m=p.max;h.compositeTextSizes=[f["text-size"].possiblyEvaluate(new w(y)),f["text-size"].possiblyEvaluate(new w(m))]}if("composite"===t.iconSizeData.functionType){var g=t.iconSizeData.zoomRange,x=g.min,_=g.max;h.compositeIconSizes=[f["icon-size"].possiblyEvaluate(new w(x)),f["icon-size"].possiblyEvaluate(new w(_))]}h.layoutTextSize=f["text-size"].possiblyEvaluate(new w(t.zoom+1)),h.layoutIconSize=f["icon-size"].possiblyEvaluate(new w(t.zoom+1)),h.textMaxSize=f["text-size"].possiblyEvaluate(new w(18));var S=24*s.get("text-line-height"),A="map"===s.get("text-rotation-alignment")&&"line"===s.get("symbol-placement"),T=s.get("text-keep-upright"),j=!0,O=!1,z=void 0;try{for(var P,E=t.features[Symbol.iterator]();!(j=(P=E.next()).done);j=!0){var C=P.value,M=s.get("text-font").evaluate(C).join(","),I=e[M]||{},B=n[M]||{},V={},L=C.text;if(L){var F=v.allowsVerticalWritingMode(L),R=s.get("text-offset").evaluate(C).map(function(t){return 24*t}),D=24*s.get("text-letter-spacing").evaluate(C),q=v.allowsLetterSpacing(L)?D:0,N=s.get("text-anchor").evaluate(C),U=s.get("text-justify").evaluate(C),J="line"!==s.get("symbol-placement")?24*s.get("text-max-width").evaluate(C):0;V.horizontal=u(L,I,J,S,N,U,q,R,24,c.horizontal),F&&A&&T&&(V.vertical=u(L,I,J,S,N,U,q,R,24,c.vertical))}var G=void 0;if(C.icon){var Z=r[C.icon];Z&&(G=l(i[C.icon],s.get("icon-offset").evaluate(C),s.get("icon-anchor").evaluate(C)),void 0===t.sdfIcons?t.sdfIcons=Z.sdf:t.sdfIcons!==Z.sdf&&d.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),Z.pixelRatio!==t.pixelRatio?t.iconsNeedLinear=!0:0!==s.get("icon-rotate").constantOr(1)&&(t.iconsNeedLinear=!0))}(V.horizontal||G)&&k(t,C,V,G,B,h)}}catch(t){O=!0,z=t}finally{try{j||null==E.return||E.return()}finally{if(O)throw z}}o&&t.generateCollisionDebugBuffers()}}},function(t,e,n){var r=n(19).number,i=n(45),o=n(153);t.exports=function(t,e,n,a,s,u,l,c,f){var h=a?.6*u*l:0,p=Math.max(a?a.right-a.left:0,s?s.right-s.left:0),y=0===t[0].x||t[0].x===f||0===t[0].y||t[0].y===f;e-p*l<e/4&&(e=p*l+e/4);var d=2*u;return function t(e,n,a,s,u,l,c,f,h){var p=l/2;var y=0;for(var d=0;d<e.length-1;d++)y+=e[d].dist(e[d+1]);var v=0,m=n-a;var g=[];for(var b=0;b<e.length-1;b++){for(var x=e[b],w=e[b+1],k=x.dist(w),_=w.angleTo(x);m+a<v+k;){var S=((m+=a)-v)/k,A=r(x.x,w.x,S),T=r(x.y,w.y,S);if(A>=0&&A<h&&T>=0&&T<h&&m-p>=0&&m+p<=y){var j=new i(A,T,_,b);j._round(),s&&!o(e,j,l,s,u)||g.push(j)}}v+=k}f||g.length||c||(g=t(e,v/2,a,s,u,l,c,!0,h));return g}(t,y?e/2*c%e:(p/2+d)*l*c%e,e,h,n,p*l,y,!1,f)}},function(t,e){t.exports=function(t,e,n,r,i){if(void 0===e.segment)return!0;var o=e,a=e.segment+1,s=0;for(;s>-n/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;var u=[],l=0;for(;s<n/2;){var c=t[a-1],f=t[a],h=t[a+1];if(!h)return!1;var p=c.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:p}),l+=p;s-u[0].distance>r;)l-=u.shift().angleDelta;if(l>i)return!1;a++,s+=f.dist(h)}return!0}},function(t,e,n){var r=n(6);t.exports=function(t,e,n,i,o){for(var a=[],s=0;s<t.length;s++)for(var u=t[s],l=void 0,c=0;c<u.length-1;c++){var f=u[c],h=u[c+1];f.x<e&&h.x<e||(f.x<e?f=new r(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round():h.x<e&&(h=new r(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round()),f.y<n&&h.y<n||(f.y<n?f=new r(f.x+(h.x-f.x)*((n-f.y)/(h.y-f.y)),n)._round():h.y<n&&(h=new r(f.x+(h.x-f.x)*((n-f.y)/(h.y-f.y)),n)._round()),f.x>=i&&h.x>=i||(f.x>=i?f=new r(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x>=i&&(h=new r(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y>=o&&h.y>=o||(f.y>=o?f=new r(f.x+(h.x-f.x)*((o-f.y)/(h.y-f.y)),o)._round():h.y>=o&&(h=new r(f.x+(h.x-f.x)*((o-f.y)/(h.y-f.y)),o)._round()),l&&f.equals(l[l.length-1])||(l=[f],a.push(l)),l.push(h)))))}return a}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(3).register,o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opacity=0,this.targetOpacity=0,this.time=0}var e,n,i;return e=t,(n=[{key:"clone",value:function(){var e=new t;return e.opacity=this.opacity,e.targetOpacity=this.targetOpacity,e.time=this.time,e}}])&&r(e.prototype,n),i&&r(e,i),t}();i("OpacityState",o),t.exports=o},function(t,e,n){var r,i;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(31),s=n(81),u=n(43),l={horizontal:1,vertical:2,horizontalOnly:3};t.exports={shapeText:function(t,e,n,r,i,o,c,f,h,p){var y=t.trim();p===l.vertical&&(y=s(y));var g,b=[],x={positionedGlyphs:b,text:y,top:f[1],bottom:f[1],left:f[0],right:f[0],writingMode:p},w=u.processBidirectionalText;g=w?w(y,d(y,c,n,e)):function(t,e){var n=[],r=0,i=!0,o=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;n.push(t.substring(r,l)),r=l}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}r<t.length&&n.push(t.substring(r,t.length));return n}(y,d(y,c,n,e));return function(t,e,n,r,i,o,s,u,c){var f=0,h=-17,p=0,y=t.positionedGlyphs,d="right"===o?1:"left"===o?0:.5,g=!0,b=!1,x=void 0;try{for(var w,k=n[Symbol.iterator]();!(g=(w=k.next()).done);g=!0){var _=w.value;if((_=_.trim()).length){for(var S=y.length,A=0;A<_.length;A++){var T=_.charCodeAt(A),j=e[T];j&&(a.charHasUprightVerticalOrientation(T)&&s!==l.horizontal?(y.push({glyph:T,x:f,y:0,vertical:!0}),f+=c+u):(y.push({glyph:T,x:f,y:h,vertical:!1}),f+=j.metrics.advance+u))}if(y.length!==S){var O=f-u;p=Math.max(O,p),m(y,e,S,y.length-1,d)}f=0,h+=r}else h+=r}}catch(t){b=!0,x=t}finally{try{g||null==k.return||k.return()}finally{if(b)throw x}}var z=v(i),P=z.horizontalAlign,E=z.verticalAlign;!function(t,e,n,r,i,o,a){for(var s=(e-n)*i,u=(-r*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u}(y,d,P,E,p,r,n.length);var C=n.length*r;t.top+=-E*C,t.bottom=t.top+C,t.left+=-P*p,t.right=t.left+p}(x,e,g,r,i,o,p,c,h),!!b.length&&x},shapeIcon:function(t,e,n){var r=v(n),i=r.horizontalAlign,o=r.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*i,l=u+t.displaySize[0],c=s-t.displaySize[1]*o,f=c+t.displaySize[1];return{image:t,top:c,bottom:f,left:u,right:l}},WritingMode:l};var c=(o(r={},9,!0),o(r,10,!0),o(r,11,!0),o(r,12,!0),o(r,13,!0),o(r,32,!0),r),f=(o(i={},10,!0),o(i,32,!0),o(i,38,!0),o(i,40,!0),o(i,41,!0),o(i,43,!0),o(i,45,!0),o(i,47,!0),o(i,173,!0),o(i,183,!0),o(i,8203,!0),o(i,8208,!0),o(i,8211,!0),o(i,8231,!0),i);function h(t,e,n,r){var i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}function p(t,e){var n=0;return 10===t&&(n-=1e4),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function y(t,e,n,r,i,o){var a=null,s=h(e,n,i,o),u=!0,l=!1,c=void 0;try{for(var f,p=r[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var y=f.value,d=h(e-y.x,n,i,o)+y.badness;d<=s&&(a=y,s=d)}}catch(t){l=!0,c=t}finally{try{u||null==p.return||p.return()}finally{if(l)throw c}}return{index:t,x:e,priorBreak:a,badness:s}}function d(t,e,n,r){if(!n)return[];if(!t)return[];for(var i=[],o=function(t,e,n,r){for(var i=0,o=0;o<t.length;o++){var a=r[t.charCodeAt(o)];a&&(i+=a.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/n))}(t,e,n,r),s=0,u=0;u<t.length;u++){var l=t.charCodeAt(u),h=r[l];h&&!c[l]&&(s+=h.metrics.advance+e),u<t.length-1&&(f[l]||a.charAllowsIdeographicBreaking(l))&&i.push(y(u+1,s,o,i,p(l,t.charCodeAt(u+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(y(t.length,s,o,i,0,!0))}function v(t){var e=.5,n=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function m(t,e,n,r,i){if(i){var o=e[t[r].glyph];if(o)for(var a=o.metrics.advance,s=(t[r].x+a)*i,u=n;u<=r;u++)t[u].x-=s}}},function(t,e,n){var r=n(6),i=n(158).GLYPH_PBF_BORDER;t.exports={getIconQuads:function(t,e,n,i,o,a,s){var u,l,c,f,h=e.image,p=n.layout,y=e.top-1/h.pixelRatio,d=e.left-1/h.pixelRatio,v=e.bottom+1/h.pixelRatio,m=e.right+1/h.pixelRatio;if("none"!==p.get("icon-text-fit")&&o){var g=m-d,b=v-y,x=p.get("text-size").evaluate(s)/24,w=o.left*x,k=o.right*x,_=o.top*x,S=o.bottom*x,A=k-w,T=S-_,j=p.get("icon-text-fit-padding")[0],O=p.get("icon-text-fit-padding")[1],z=p.get("icon-text-fit-padding")[2],P=p.get("icon-text-fit-padding")[3],E="width"===p.get("icon-text-fit")?.5*(T-b):0,C="height"===p.get("icon-text-fit")?.5*(A-g):0,M="width"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?A:g,I="height"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?T:b;u=new r(w+C-P,_+E-j),l=new r(w+C+O+M,_+E-j),c=new r(w+C+O+M,_+E+z+I),f=new r(w+C-P,_+E+z+I)}else u=new r(d,y),l=new r(m,y),c=new r(m,v),f=new r(d,v);var B=n.layout.get("icon-rotate").evaluate(s)*Math.PI/180;if(B){var V=Math.sin(B),L=Math.cos(B),F=[L,-V,V,L];u._matMult(F),l._matMult(F),f._matMult(F),c._matMult(F)}var R={x:h.textureRect.x-1,y:h.textureRect.y-1,w:h.textureRect.w+2,h:h.textureRect.h+2};return[{tl:u,tr:l,bl:f,br:c,tex:R,writingMode:void 0,glyphOffset:[0,0]}]},getGlyphQuads:function(t,e,n,o,a,s,u){for(var l=n.layout.get("text-rotate").evaluate(s)*Math.PI/180,c=n.layout.get("text-offset").evaluate(s).map(function(t){return 24*t}),f=e.positionedGlyphs,h=[],p=0;p<f.length;p++){var y=f[p],d=u[y.glyph];if(d){var v=d.rect;if(v){var m=i+1,g=d.metrics.advance/2,b=o?[y.x+g,y.y]:[0,0],x=o?[0,0]:[y.x+g+c[0],y.y+c[1]],w=d.metrics.left-m-g+x[0],k=-d.metrics.top-m+x[1],_=w+v.w,S=k+v.h,A=new r(w,k),T=new r(_,k),j=new r(w,S),O=new r(_,S);if(o&&y.vertical){var z=new r(-g,g),P=-Math.PI/2,E=new r(5,0);A._rotateAround(P,z)._add(E),T._rotateAround(P,z)._add(E),j._rotateAround(P,z)._add(E),O._rotateAround(P,z)._add(E)}if(l){var C=Math.sin(l),M=Math.cos(l),I=[M,-C,C,M];A._matMult(I),T._matMult(I),j._matMult(I),O._matMult(I)}h.push({tl:A,tr:T,bl:j,br:O,tex:v,writingMode:e.writingMode,glyphOffset:b})}}}return h}}},function(t,e,n){var r=n(29).AlphaImage,i=n(32),o=3;function a(t,e,n){1===t&&n.readMessage(s,e)}function s(t,e,n){if(3===t){var i=n.readMessage(u,{}),a=i.id,s=i.bitmap,l=i.width,c=i.height,f=i.left,h=i.top,p=i.advance;e.push({id:a,bitmap:new r({width:l+2*o,height:c+2*o},s),metrics:{width:l,height:c,left:f,top:h,advance:p}})}}function u(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}t.exports=function(t){return new i(t).readFields(a,[])},t.exports.GLYPH_PBF_BORDER=o},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n,r,i,o,a,s,u,l,c,f){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var h=s.top*u-l,p=s.bottom*u+l,y=s.left*u-l,d=s.right*u+l;if(this.boxStartIndex=e.length,c){var v=p-h,m=d-y;v>0&&(v=Math.max(10*u,v),this._addLineCollisionCircles(e,n,r,r.segment,m,v,i,o,a,f))}else e.emplaceBack(r.x,r.y,y,h,d,p,i,o,a,0,0);this.boxEndIndex=e.length}var e,r,i;return e=t,(r=[{key:"_addLineCollisionCircles",value:function(t,e,n,r,i,o,a,s,u,l){var c=o/2,f=Math.floor(i/c),h=1+.4*Math.log(l)/Math.LN2,p=Math.floor(f*h/2),y=-o/2,d=n,v=r+1,m=y,g=-i/2,b=g-i/4;do{if(--v<0){if(m>g)return;v=0;break}m-=e[v].dist(d),d=e[v]}while(m>b);for(var x=e[v].dist(e[v+1]),w=-p;w<f+p;w++){var k=w*c,_=g+k;if(k<0&&(_+=k),k>i&&(_+=k-i),!(_<m)){for(;m+x<_;){if(m+=x,++v+1>=e.length)return;x=e[v].dist(e[v+1])}var S=_-m,A=e[v],T=e[v+1].sub(A)._unit()._mult(S)._add(A)._round(),j=Math.abs(_-y)<c?0:.8*(_-y);t.emplaceBack(T.x,T.y,-o/2,-o/2,o/2,o/2,a,s,u,o/2,j)}}}}])&&n(e.prototype,r),i&&n(e,i),t}();t.exports=r},function(t,e,n){var r=n(161),i=n(6),o=n(28).distToSegmentSquared;function a(t,e){return e.max-t.max}function s(t,e,n,r){this.p=new i(t,e),this.h=n,this.d=function(t,e){for(var n=!1,r=1/0,i=0;i<e.length;i++)for(var a=e[i],s=0,u=a.length,l=u-1;s<u;l=s++){var c=a[s],f=a[l];c.y>t.y!=f.y>t.y&&t.x<(f.x-c.x)*(t.y-c.y)/(f.y-c.y)+c.x&&(n=!n),r=Math.min(r,o(t,c,f))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}t.exports=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=1/0,u=1/0,l=-1/0,c=-1/0,f=t[0],h=0;h<f.length;h++){var p=f[h];(!h||p.x<o)&&(o=p.x),(!h||p.y<u)&&(u=p.y),(!h||p.x>l)&&(l=p.x),(!h||p.y>c)&&(c=p.y)}var y=l-o,d=c-u,v=Math.min(y,d),m=v/2,g=new r(null,a);if(0===v)return new i(o,u);for(var b=o;b<l;b+=v)for(var x=u;x<c;x+=v)g.push(new s(b+m,x+m,m,t));for(var w=function(t){for(var e=0,n=0,r=0,i=t[0],o=0,a=i.length,u=a-1;o<a;u=o++){var l=i[o],c=i[u],f=l.x*c.y-c.x*l.y;n+=(l.x+c.x)*f,r+=(l.y+c.y)*f,e+=3*f}return new s(n/e,r/e,0,t)}(t),k=g.length;g.length;){var _=g.pop();(_.d>w.d||!w.d)&&(w=_,n&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,k)),_.max-w.d<=e||(m=_.h/2,g.push(new s(_.p.x-m,_.p.y-m,m,t)),g.push(new s(_.p.x+m,_.p.y-m,m,t)),g.push(new s(_.p.x-m,_.p.y+m,m,t)),g.push(new s(_.p.x+m,_.p.y+m,m,t)),k+=4)}return n&&(console.log("num probes: ".concat(k)),console.log("best distance: ".concat(w.d))),w.p}},function(t,e,n){"use strict";function r(t,e){if(!(this instanceof r))return new r(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||i,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function i(t,e){return t<e?-1:t>e?1:0}t.exports=r,t.exports.default=r,r.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},_down:function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),a=o+1,s=e[o];if(a<this.length&&n(e[a],s)<0&&(o=a,s=e[a]),n(s,i)>=0)break;e[t]=s,t=o}e[t]=i}}},function(t,e,n){var r=n(85),i=n(29).RGBAImage,o=1;function a(t,e){var n=e.pixelRatio,r={x:t.x+o,y:t.y+o,w:t.w-2*o,h:t.h-2*o};return{pixelRatio:n,textureRect:r,tl:[r.x,r.y],br:[r.x+r.w,r.y+r.h],displaySize:[r.w/n,r.h/n]}}t.exports={imagePosition:a,makeImageAtlas:function(t){var e=new i({width:0,height:0}),n={},s=new r(0,0,{autoResize:!0});for(var u in t){var l=t[u],c=s.packOne(l.data.width+2*o,l.data.height+2*o);e.resize({width:s.w,height:s.h}),i.copy(l.data,e,{x:0,y:0},{x:c.x+o,y:c.y+o},l.data),n[u]=a(c,l)}return s.shrink(),e.resize({width:s.w,height:s.h}),{image:e,positions:n}}}},function(t,e,n){var r=n(85),i=n(29).AlphaImage,o=1;t.exports={makeGlyphAtlas:function(t){var e=new i({width:0,height:0}),n={},a=new r(0,0,{autoResize:!0});for(var s in t){var u=t[s],l=n[s]={};for(var c in u){var f=u[+c];if(f&&0!==f.bitmap.width&&0!==f.bitmap.height){var h=a.packOne(f.bitmap.width+2*o,f.bitmap.height+2*o);e.resize({width:a.w,height:a.h}),i.copy(f.bitmap,e,{x:0,y:0},{x:h.x+o,y:h.y+o},f.bitmap),l[c]={rect:h,metrics:f.metrics}}}}return a.shrink(),e.resize({width:a.w,height:a.h}),{image:e,positions:n}}}},function(t,e,n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=n(165).DEMData,o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loading={},this.loaded={}}var e,n,o;return e=t,(n=[{key:"loadTile",value:function(t,e){var n=t.source,r=t.uid;this.loading[n]||(this.loading[n]={});var o=new i(r);this.loading[n][r]=o,o.loadFromImage(t.rawImageData),delete this.loading[n][r],this.loaded[n]=this.loaded[n]||{},this.loaded[n][r]=o,e(null,o)}},{key:"removeTile",value:function(t){var e=this.loaded[t.source],n=t.uid;e&&e[n]&&delete e[n]}}])&&r(e.prototype,n),o&&r(e,o),t}();t.exports=o},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(29).RGBAImage,s=n(2),u=n(3).register,l=function(){function t(e,n,i){if(r(this,t),e<=0)throw new RangeError("Level must have positive dimension");this.dim=e,this.border=n,this.stride=this.dim+2*this.border,this.data=i||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))}return o(t,[{key:"set",value:function(t,e,n){this.data[this._idx(t,e)]=n+65536}},{key:"get",value:function(t,e){return this.data[this._idx(t,e)]-65536}},{key:"_idx",value:function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError("out of range source coordinates for DEM data");return(e+this.border)*this.stride+(t+this.border)}}]),t}();u("Level",l);var c=function(){function t(e,n,i){r(this,t),this.uid=e,this.scale=n||1,this.level=i||new l(256,512),this.loaded=!!i}return o(t,[{key:"loadFromImage",value:function(t){if(t.height!==t.width)throw new RangeError("DEM tiles must be square");for(var e=this.level=new l(t.width,t.width/2),n=t.data,r=0;r<e.dim;r++)for(var i=0;i<e.dim;i++){var o=4*(r*e.dim+i);e.set(i,r,this.scale*((256*n[o]*256+256*n[o+1]+n[o+2])/10-1e4))}for(var a=0;a<e.dim;a++)e.set(-1,a,e.get(0,a)),e.set(e.dim,a,e.get(e.dim-1,a)),e.set(a,-1,e.get(a,0)),e.set(a,e.dim,e.get(a,e.dim-1));e.set(-1,-1,e.get(0,0)),e.set(e.dim,-1,e.get(e.dim-1,0)),e.set(-1,e.dim,e.get(0,e.dim-1)),e.set(e.dim,e.dim,e.get(e.dim-1,e.dim-1)),this.loaded=!0}},{key:"getPixels",value:function(){return new a({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))}},{key:"backfillBorder",value:function(t,e,n){var r=this.level,i=t.level;if(r.dim!==i.dim)throw new Error("level mismatch (dem dimension)");var o=e*r.dim,a=e*r.dim+r.dim,u=n*r.dim,l=n*r.dim+r.dim;switch(e){case-1:o=a-1;break;case 1:a=o+1}switch(n){case-1:u=l-1;break;case 1:l=u+1}for(var c=s.clamp(o,-r.border,r.dim+r.border),f=s.clamp(a,-r.border,r.dim+r.border),h=s.clamp(u,-r.border,r.dim+r.border),p=s.clamp(l,-r.border,r.dim+r.border),y=-e*r.dim,d=-n*r.dim,v=h;v<p;v++)for(var m=c;m<f;m++)r.set(m,v,i.get(m+y,v+d))}}]),t}();u("DEMData",c),t.exports={DEMData:c,Level:l}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t):e}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(44),c=n(167),f=n(170),h=n(171),p=n(173),y=n(178),d=n(82);function v(t,e){var n=t.source,r=t.tileID.canonical;if(!this._geoJSONIndexes[n])return e(null,null);var i=this._geoJSONIndexes[n].getTile(r.z,r.x,r.y);if(!i)return e(null,null);var o=new f(i.features),a=h(o);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:o,rawData:a.buffer})}var m=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i=o(this,s(e).call(this,t,n,v)),r&&(i.loadGeoJSON=r),i._geoJSONIndexes={},i}var n,f,h;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,d),n=e,(f=[{key:"loadData",value:function(t,e){var n=this;this.loadGeoJSON(t,function(i,o){if(i||!o)return e(i);if("object"!==r(o))return e(new Error("Input data is not a valid GeoJSON object."));c(o,!0);try{n._geoJSONIndexes[t.source]=t.cluster?p(t.superclusterOptions).load(o.features):y(o,t.geojsonVtOptions)}catch(i){return e(i)}n.loaded[t.source]={},e(null)})}},{key:"reloadTile",value:function(t,n){var r=this.loaded[t.source],i=t.uid;return r&&r[i]?a(s(e.prototype),"reloadTile",this).call(this,t,n):this.loadTile(t,n)}},{key:"loadGeoJSON",value:function(t,e){if(t.request)l.getJSON(t.request,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}}},{key:"removeSource",value:function(t,e){this._geoJSONIndexes[t.source]&&delete this._geoJSONIndexes[t.source],e()}}])&&i(n.prototype,f),h&&i(n,h),e}();t.exports=m},function(t,e,n){var r=n(168);function i(t,e){return function(n){return t(n,e)}}function o(t,e){e=!!e,t[0]=a(t[0],e);for(var n=1;n<t.length;n++)t[n]=a(t[n],!e);return t}function a(t,e){return function(t){return r.ring(t)>=0}(t)===e?t:t.reverse()}t.exports=function t(e,n){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(i(t,n)),e;case"Feature":return e.geometry=t(e.geometry,n),e;case"Polygon":case"MultiPolygon":return function(t,e){"Polygon"===t.type?t.coordinates=o(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(i(o,e)));return t}(e,n);default:return e}}},function(t,e,n){var r=n(169);function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(o(t[n]))}return e}function o(t){var e,n,i,o,s,u,l=0,c=t.length;if(c>2){for(u=0;u<c;u++)u===c-2?(i=c-2,o=c-1,s=0):u===c-1?(i=c-1,o=0,s=1):(i=u,o=u+1,s=u+2),e=t[i],n=t[o],l+=(a(t[s][0])-a(e[0]))*Math.sin(a(n[1]));l=l*r.RADIUS*r.RADIUS/2}return l}function a(t){return t*Math.PI/180}t.exports.geometry=function t(e){var n,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)r+=i(e.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)r+=t(e.geometries[n]);return r}},t.exports.ring=o},function(t,e){t.exports.RADIUS=6378137,t.exports.FLATTENING=1/298.257223563,t.exports.POLAR_RADIUS=6356752.3142},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var a=n(6),s=n(21).VectorTileFeature.prototype.toGeoJSON,u=n(18),l=function(){function t(e){r(this,t),this._feature=e,this.extent=u,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}return o(t,[{key:"loadGeometry",value:function(){if(1===this._feature.type){var t=[],e=!0,n=!1,r=void 0;try{for(var i,o=this._feature.geometry[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;t.push([new a(s[0],s[1])])}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t}var u=[],l=!0,c=!1,f=void 0;try{for(var h,p=this._feature.geometry[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var y=h.value,d=[],v=!0,m=!1,g=void 0;try{for(var b,x=y[Symbol.iterator]();!(v=(b=x.next()).done);v=!0){var w=b.value;d.push(new a(w[0],w[1]))}}catch(t){m=!0,g=t}finally{try{v||null==x.return||x.return()}finally{if(m)throw g}}u.push(d)}}catch(t){c=!0,f=t}finally{try{l||null==p.return||p.return()}finally{if(c)throw f}}return u}},{key:"toGeoJSON",value:function(t,e,n){return s.call(this,t,e,n)}}]),t}(),c=function(){function t(e){r(this,t),this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u,this.length=e.length,this._features=e}return o(t,[{key:"feature",value:function(t){return new l(this._features[t])}}]),t}();t.exports=c},function(t,e,n){var r=n(32),i=n(172);function o(t){var e=new r;return function(t,e){for(var n in t.layers)e.writeMessage(3,a,t.layers[n])}(t,e),e.finish()}function a(t,e){var n;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<t.length;n++)r.feature=t.feature(n),e.writeMessage(2,s,r);var i=r.keys;for(n=0;n<i.length;n++)e.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)e.writeMessage(4,h,o[n])}function s(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,u,t),e.writeVarintField(3,n.type),e.writeMessage(4,f,n)}function u(t,e){var n=t.feature,r=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in n.properties){var u=o[s];void 0===u&&(r.push(s),u=r.length-1,o[s]=u),e.writeVarint(u);var l=n.properties[s],c=typeof l;"string"!==c&&"boolean"!==c&&"number"!==c&&(l=JSON.stringify(l));var f=c+":"+l,h=a[f];void 0===h&&(i.push(l),h=i.length-1,a[f]=h),e.writeVarint(h)}}function l(t,e){return(e<<3)+(7&t)}function c(t){return t<<1^t>>31}function f(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s<a;s++){var u=n[s],f=1;1===r&&(f=u.length),e.writeVarint(l(1,f));for(var h=3===r?u.length-1:u.length,p=0;p<h;p++){1===p&&1!==r&&e.writeVarint(l(2,h-1));var y=u[p].x-i,d=u[p].y-o;e.writeVarint(c(y)),e.writeVarint(c(d)),i+=y,o+=d}3===r&&e.writeVarint(l(7,1))}}function h(t,e){var n=typeof t;"string"===n?e.writeStringField(1,t):"boolean"===n?e.writeBooleanField(7,t):"number"===n&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}t.exports=o,t.exports.fromVectorTileJs=o,t.exports.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var r in t)n[r]=new i(t[r].features,e),n[r].name=r,n[r].version=e.version,n[r].extent=e.extent;return o({layers:n})},t.exports.GeoJSONWrapper=i},function(t,e,n){"use strict";var r=n(6),i=n(21).VectorTileFeature;function o(t,e){this.options=e||{},this.features=t,this.length=t.length}function a(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}t.exports=o,o.prototype.feature=function(t){return new a(this.features[t],this.options.extent)},a.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var n=t[e],i=[],o=0;o<n.length;o++)i.push(new r(n[o][0],n[o][1]));this.geometry.push(i)}return this.geometry},a.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),n=Math.max(n,u.x),r=Math.min(r,u.y),i=Math.max(i,u.y)}return[e,r,n,i]},a.prototype.toGeoJSON=i.prototype.toGeoJSON},function(t,e,n){"use strict";var r=n(174);function i(t){this.options=f(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function o(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:r,properties:i,parentId:-1,numPoints:n}}function a(t,e){var n=t.geometry.coordinates;return{x:l(n[0]),y:c(n[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:u(t),geometry:{type:"Point",coordinates:[(r=t.x,360*(r-.5)),(e=t.y,n=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var e,n,r}function u(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return f(f({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function l(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function f(t,e){for(var n in e)t[n]=e[n];return t}function h(t){return t.x}function p(t){return t.y}t.exports=function(t){return new i(t)},i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var n="prepare "+t.length+" points";e&&console.time(n),this.points=t;var i=t.map(a);e&&console.timeEnd(n);for(var o=this.options.maxZoom;o>=this.options.minZoom;o--){var s=+Date.now();this.trees[o+1]=r(i,h,p,this.options.nodeSize,Float32Array),i=this._cluster(i,o),e&&console.log("z%d: %d clusters in %dms",o,i.length,+Date.now()-s)}return this.trees[this.options.minZoom]=r(i,h,p,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var n=this.trees[this._limitZoom(e)],r=n.range(l(t[0]),c(t[3]),l(t[2]),c(t[1])),i=[],o=0;o<r.length;o++){var a=n.points[r[o]];i.push(a.numPoints?s(a):this.points[a.id])}return i},getChildren:function(t,e){for(var n=this.trees[e+1].points[t],r=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(n.x,n.y,r),o=[],a=0;a<i.length;a++){var u=this.trees[e+1].points[i[a]];u.parentId===t&&o.push(u.numPoints?s(u):this.points[u.id])}return o},getLeaves:function(t,e,n,r){n=n||10,r=r||0;var i=[];return this._appendLeaves(i,t,e,n,r,0),i},getTile:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options.extent,a=this.options.radius/o,s=(n-a)/i,u=(n+1+a)/i,l={features:[]};return this._addTileFeatures(r.range((e-a)/i,s,(e+1+a)/i,u),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-a/i,s,1,u),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,s,a/i,u),r.points,-1,n,i,l),l.features.length?l:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var n=this.getChildren(t,e);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e},_appendLeaves:function(t,e,n,r,i,o){for(var a=this.getChildren(e,n),s=0;s<a.length;s++){var u=a[s].properties;if(u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(t,u.cluster_id,n+1,r,i,o):o<i?o++:t.push(a[s]),t.length===r)break}return o},_addTileFeatures:function(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-n)),Math.round(this.options.extent*(s.y*i-r))]],tags:s.numPoints?u(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var n=[],r=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var s=this.trees[e+1],u=s.within(a.x,a.y,r),l=a.numPoints||1,c=a.x*l,f=a.y*l,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,a));for(var p=0;p<u.length;p++){var y=s.points[u[p]];if(e<y.zoom){var d=y.numPoints||1;y.zoom=e,c+=y.x*d,f+=y.y*d,l+=d,y.parentId=i,this.options.reduce&&this._accumulate(h,y)}}1===l?n.push(a):(a.parentId=i,n.push(o(c/l,f/l,l,i,h)))}}return n},_accumulate:function(t,e){var n=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,n)}}},function(t,e,n){"use strict";var r=n(175),i=n(176),o=n(177);function a(t,e,n,i,o){e=e||s,n=n||u,o=o||Array,this.nodeSize=i||64,this.points=t,this.ids=new o(t.length),this.coords=new o(2*t.length);for(var a=0;a<t.length;a++)this.ids[a]=a,this.coords[2*a]=e(t[a]),this.coords[2*a+1]=n(t[a]);r(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function s(t){return t[0]}function u(t){return t[1]}t.exports=function(t,e,n,r,i){return new a(t,e,n,r,i)},a.prototype={range:function(t,e,n,r){return i(this.ids,this.coords,t,e,n,r,this.nodeSize)},within:function(t,e,n){return o(this.ids,this.coords,t,e,n,this.nodeSize)}}},function(t,e,n){"use strict";function r(t,e,n,r){i(t,n,r),i(e,2*n,2*r),i(e,2*n+1,2*r+1)}function i(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}t.exports=function t(e,n,i,o,a,s){if(a-o<=i)return;var u=Math.floor((o+a)/2);!function t(e,n,i,o,a,s){for(;a>o;){if(a-o>600){var u=a-o+1,l=i-o+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(o,Math.floor(i-l*f/u+h)),y=Math.min(a,Math.floor(i+(u-l)*f/u+h));t(e,n,i,p,y,s)}var d=n[2*i+s],v=o,m=a;for(r(e,n,o,i),n[2*a+s]>d&&r(e,n,o,a);v<m;){for(r(e,n,v,m),v++,m--;n[2*v+s]<d;)v++;for(;n[2*m+s]>d;)m--}n[2*o+s]===d?r(e,n,o,m):r(e,n,++m,a),m<=i&&(o=m+1),i<=m&&(a=m-1)}}(e,n,u,o,a,s%2);t(e,n,i,o,u-1,s+1);t(e,n,i,u+1,a,s+1)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a){var s,u,l=[0,t.length-1,0],c=[];for(;l.length;){var f=l.pop(),h=l.pop(),p=l.pop();if(h-p<=a)for(var y=p;y<=h;y++)s=e[2*y],u=e[2*y+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[y]);else{var d=Math.floor((p+h)/2);s=e[2*d],u=e[2*d+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[d]);var v=(f+1)%2;(0===f?n<=s:r<=u)&&(l.push(p),l.push(d-1),l.push(v)),(0===f?i>=s:o>=u)&&(l.push(d+1),l.push(h),l.push(v))}}return c}},function(t,e,n){"use strict";function r(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}t.exports=function(t,e,n,i,o,a){var s=[0,t.length-1,0],u=[],l=o*o;for(;s.length;){var c=s.pop(),f=s.pop(),h=s.pop();if(f-h<=a)for(var p=h;p<=f;p++)r(e[2*p],e[2*p+1],n,i)<=l&&u.push(t[p]);else{var y=Math.floor((h+f)/2),d=e[2*y],v=e[2*y+1];r(d,v,n,i)<=l&&u.push(t[y]);var m=(c+1)%2;(0===c?n-o<=d:i-o<=v)&&(s.push(h),s.push(y-1),s.push(m)),(0===c?n+o>=d:i+o>=v)&&(s.push(y+1),s.push(f),s.push(m))}}return u}},function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var u=((t-n)*a+(e-r)*s)/(a*a+s*s);u>1?(n=i,r=o):u>0&&(n+=a*u,r+=s*u)}return(a=t-n)*a+(s=e-r)*s}function i(t,e,n,r){var i={id:void 0===t?null:t,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)o(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<e.length;r++)o(t,e[r]);else if("MultiPolygon"===n)for(r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)o(t,e[r][i])}(i),i}function o(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function a(t,e,n,r){if(e.geometry){var o=e.geometry.coordinates,c=e.geometry.type,f=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),h=[],p=e.id;if(n.promoteId?p=e.properties[n.promoteId]:n.generateId&&(p=r||0),"Point"===c)s(o,h);else if("MultiPoint"===c)for(var y=0;y<o.length;y++)s(o[y],h);else if("LineString"===c)u(o,h,f,!1);else if("MultiLineString"===c){if(n.lineMetrics){for(y=0;y<o.length;y++)h=[],u(o[y],h,f,!1),t.push(i(p,"LineString",h,e.properties));return}l(o,h,f,!1)}else if("Polygon"===c)l(o,h,f,!0);else{if("MultiPolygon"!==c){if("GeometryCollection"===c){for(y=0;y<e.geometry.geometries.length;y++)a(t,{id:p,geometry:e.geometry.geometries[y],properties:e.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(y=0;y<o.length;y++){var d=[];l(o[y],d,f,!0),h.push(d)}}t.push(i(p,c,h,e.properties))}}function s(t,e){e.push(c(t[0])),e.push(f(t[1])),e.push(0)}function u(t,e,n,i){for(var o,a,s=0,u=0;u<t.length;u++){var l=c(t[u][0]),h=f(t[u][1]);e.push(l),e.push(h),e.push(0),u>0&&(s+=i?(o*h-l*a)/2:Math.sqrt(Math.pow(l-o,2)+Math.pow(h-a,2))),o=l,a=h}var p=e.length-3;e[2]=1,function t(e,n,i,o){for(var a,s=o,u=i-n>>1,l=i-n,c=e[n],f=e[n+1],h=e[i],p=e[i+1],y=n+3;y<i;y+=3){var d=r(e[y],e[y+1],c,f,h,p);if(d>s)a=y,s=d;else if(d===s){var v=Math.abs(y-u);v<l&&(a=y,l=v)}}s>o&&(a-n>3&&t(e,n,a,o),e[a+2]=s,i-a>3&&t(e,a,i,o))}(e,0,p,n),e[p+2]=1,e.size=Math.abs(s),e.start=0,e.end=e.size}function l(t,e,n,r){for(var i=0;i<t.length;i++){var o=[];u(t[i],o,n,r),e.push(o)}}function c(t){return t/360+.5}function f(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function h(t,e,n,r,o,a,s,u){if(r/=e,a>=(n/=e)&&s<r)return t;if(s<n||a>=r)return null;for(var l=[],c=0;c<t.length;c++){var f=t[c],h=f.geometry,d=f.type,m=0===o?f.minX:f.minY,g=0===o?f.maxX:f.maxY;if(m>=n&&g<r)l.push(f);else if(!(g<n||m>=r)){var b=[];if("Point"===d||"MultiPoint"===d)p(h,b,n,r,o);else if("LineString"===d)y(h,b,n,r,o,!1,u.lineMetrics);else if("MultiLineString"===d)v(h,b,n,r,o,!1);else if("Polygon"===d)v(h,b,n,r,o,!0);else if("MultiPolygon"===d)for(var x=0;x<h.length;x++){var w=[];v(h[x],w,n,r,o,!0),w.length&&b.push(w)}if(b.length){if(u.lineMetrics&&"LineString"===d){for(x=0;x<b.length;x++)l.push(i(f.id,d,b[x],f.tags));continue}"LineString"!==d&&"MultiLineString"!==d||(1===b.length?(d="LineString",b=b[0]):d="MultiLineString"),"Point"!==d&&"MultiPoint"!==d||(d=3===b.length?"Point":"MultiPoint"),l.push(i(f.id,d,b,f.tags))}}}return l.length?l:null}function p(t,e,n,r,i){for(var o=0;o<t.length;o+=3){var a=t[o+i];a>=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function y(t,e,n,r,i,o,a){for(var s,u,l=d(t),c=0===i?g:b,f=t.start,h=0;h<t.length-3;h+=3){var p=t[h],y=t[h+1],v=t[h+2],x=t[h+3],w=t[h+4],k=0===i?p:y,_=0===i?x:w,S=!1;a&&(s=Math.sqrt(Math.pow(p-x,2)+Math.pow(y-w,2))),k<n?_>n&&(u=c(l,p,y,x,w,n),a&&(l.start=f+s*u)):k>r?_<r&&(u=c(l,p,y,x,w,r),a&&(l.start=f+s*u)):m(l,p,y,v),_<n&&k>=n&&(u=c(l,p,y,x,w,n),S=!0),_>r&&k<=r&&(u=c(l,p,y,x,w,r),S=!0),!o&&S&&(a&&(l.end=f+s*u),e.push(l),l=d(t)),a&&(f+=s)}var A=t.length-3;p=t[A],y=t[A+1],v=t[A+2],(k=0===i?p:y)>=n&&k<=r&&m(l,p,y,v),A=l.length-3,o&&A>=3&&(l[A]!==l[0]||l[A+1]!==l[1])&&m(l,l[0],l[1],l[2]),l.length&&e.push(l)}function d(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function v(t,e,n,r,i,o){for(var a=0;a<t.length;a++)y(t[a],e,n,r,i,o,!1)}function m(t,e,n,r){t.push(e),t.push(n),t.push(r)}function g(t,e,n,r,i,o){var a=(o-e)/(r-e);return t.push(o),t.push(n+(i-n)*a),t.push(1),a}function b(t,e,n,r,i,o){var a=(o-n)/(i-n);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function x(t,e){for(var n=[],r=0;r<t.length;r++){var o,a=t[r],s=a.type;if("Point"===s||"MultiPoint"===s||"LineString"===s)o=w(a.geometry,e);else if("MultiLineString"===s||"Polygon"===s){o=[];for(var u=0;u<a.geometry.length;u++)o.push(w(a.geometry[u],e))}else if("MultiPolygon"===s)for(o=[],u=0;u<a.geometry.length;u++){for(var l=[],c=0;c<a.geometry[u].length;c++)l.push(w(a.geometry[u][c],e));o.push(l)}n.push(i(a.id,s,o,a.tags))}return n}function w(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var r=0;r<t.length;r+=3)n.push(t[r]+e,t[r+1],t[r+2]);return n}function k(t,e){if(t.transformed)return t;var n,r,i,o=1<<t.z,a=t.x,s=t.y;for(n=0;n<t.features.length;n++){var u=t.features[n],l=u.geometry,c=u.type;if(u.geometry=[],1===c)for(r=0;r<l.length;r+=2)u.geometry.push(_(l[r],l[r+1],e,o,a,s));else for(r=0;r<l.length;r++){var f=[];for(i=0;i<l[r].length;i+=2)f.push(_(l[r][i],l[r][i+1],e,o,a,s));u.geometry.push(f)}}return t.transformed=!0,t}function _(t,e,n,r,i,o){return[Math.round(n*(t*r-i)),Math.round(n*(e*r-o))]}function S(t,e,n,r,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,A(a,t[s],o,i);var u=t[s].minX,l=t[s].minY,c=t[s].maxX,f=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),c>a.maxX&&(a.maxX=c),f>a.maxY&&(a.maxY=f)}return a}function A(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)T(a,i,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)T(a,i[s],t,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<i.length;u++){var l=i[u];for(s=0;s<l.length;s++)T(a,l[s],t,n,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var f in c={},e.tags)c[f]=e.tags[f];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function T(t,e,n,r,i,o){var a=r*r;if(r>0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===r||e[u+2]>a)&&(n.numSimplified++,s.push(e[u]),s.push(e[u+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r<i;o=r,r+=2)n+=(t[r]-t[o])*(t[r+1]+t[o+1]);if(n>0===e)for(r=0,i=t.length;r<i/2;r+=2){var a=t[r],s=t[r+1];t[r]=t[i-2-r],t[r+1]=t[i-1-r],t[i-2-r]=a,t[i-1-r]=s}}(s,o),t.push(s)}}function j(t,e){return new O(t,e)}function O(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(this.options),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)a(n,t.features[r],e,r);else"Feature"===t.type?a(n,t,e):a(n,{geometry:t},e);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=function(t,e){var n=e.buffer/e.extent,r=t,i=h(t,1,-1-n,n,0,-1,2,e),o=h(t,1,1-n,2+n,0,-1,2,e);return(i||o)&&(r=h(t,1,-n,1+n,0,-1,2,e)||[],i&&(r=x(i,1).concat(r)),o&&(r=r.concat(x(o,-1)))),r}(r,e)).length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function z(t,e,n){return 32*((1<<t)*n+e)+t}n.r(e),n.d(e,"default",function(){return j}),O.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},O.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],u=this.options,l=u.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,f=z(e,n,r),p=this.tiles[f];if(!p&&(l>1&&console.time("creation"),p=this.tiles[f]=S(t,e,n,r,u),this.tileCoords.push({z:e,x:n,y:r}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var y="z"+e;this.stats[y]=(this.stats[y]||0)+1,this.total++}if(p.source=t,i){if(e===u.maxZoom||e===i)continue;var d=1<<i-e;if(n!==Math.floor(o/d)||r!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||p.numPoints<=u.indexMaxPoints)continue;if(p.source=null,0!==t.length){l>1&&console.time("clipping");var v,m,g,b,x,w,k=.5*u.buffer/u.extent,_=.5-k,A=.5+k,T=1+k;v=m=g=b=null,x=h(t,c,n-k,n+A,0,p.minX,p.maxX,u),w=h(t,c,n+_,n+T,0,p.minX,p.maxX,u),t=null,x&&(v=h(x,c,r-k,r+A,1,p.minY,p.maxY,u),m=h(x,c,r+_,r+T,1,p.minY,p.maxY,u),x=null),w&&(g=h(w,c,r-k,r+A,1,p.minY,p.maxY,u),b=h(w,c,r+_,r+T,1,p.minY,p.maxY,u),w=null),l>1&&console.timeEnd("clipping"),s.push(v||[],e+1,2*n,2*r),s.push(m||[],e+1,2*n,2*r+1),s.push(g||[],e+1,2*n+1,2*r),s.push(b||[],e+1,2*n+1,2*r+1)}}},O.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<<t,s=z(t,e=(e%a+a)%a,n);if(this.tiles[s])return k(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var u,l=t,c=e,f=n;!u&&l>0;)l--,c=Math.floor(c/2),f=Math.floor(f/2),u=this.tiles[z(l,c,f)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,c,f),o>1&&console.time("drilling down"),this.splitTile(u.source,l,c,f,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?k(this.tiles[s],i):null):null}}]);\n',null)}},function(O,D,o){"use strict";var _=window.URL||window.webkitURL;O.exports=function(e,b){try{try{var g;try{(g=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),g=g.getBlob()}catch{g=new Blob([e])}return new Worker(_.createObjectURL(g))}catch{return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch{if(!b)throw Error("Inline worker is not supported");return new Worker(b)}}},function(O,D,o){var _=o(215);function e(b,g){var f={};for(var c in b)c!=="ref"&&(f[c]=b[c]);return _.forEach(function(u){u in g&&(f[u]=g[u])}),f}O.exports=function(b){b=b.slice();for(var g=Object.create(null),f=0;f<b.length;f++)g[b[f].id]=b[f];for(var c=0;c<b.length;c++)"ref"in b[c]&&(b[c]=e(b[c],g[b[c].ref]));return b}},function(O,D){O.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},function(O,D,o){var _=o(74),e={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function b(n,t,r){r.push({command:e.addSource,args:[n,t[n]]})}function g(n,t,r){t.push({command:e.removeSource,args:[n]}),r[n]=!0}function f(n,t,r,l){g(n,r,l),b(n,t,r)}function c(n,t,r){var l;for(l in n[r])if(n[r].hasOwnProperty(l)&&l!=="data"&&!_(n[r][l],t[r][l]))return!1;for(l in t[r])if(t[r].hasOwnProperty(l)&&l!=="data"&&!_(n[r][l],t[r][l]))return!1;return!0}function u(n,t,r,l,d,h){var m;for(m in t=t||{},n=n||{})n.hasOwnProperty(m)&&(_(n[m],t[m])||r.push({command:h,args:[l,m,t[m],d]}));for(m in t)t.hasOwnProperty(m)&&!n.hasOwnProperty(m)&&(_(n[m],t[m])||r.push({command:h,args:[l,m,t[m],d]}))}function i(n){return n.id}function a(n,t){return n[t.id]=t,n}O.exports=function(n,t){if(!n)return[{command:e.setStyle,args:[t]}];var r=[];try{if(!_(n.version,t.version))return[{command:e.setStyle,args:[t]}];_(n.center,t.center)||r.push({command:e.setCenter,args:[t.center]}),_(n.zoom,t.zoom)||r.push({command:e.setZoom,args:[t.zoom]}),_(n.bearing,t.bearing)||r.push({command:e.setBearing,args:[t.bearing]}),_(n.pitch,t.pitch)||r.push({command:e.setPitch,args:[t.pitch]}),_(n.sprite,t.sprite)||r.push({command:e.setSprite,args:[t.sprite]}),_(n.glyphs,t.glyphs)||r.push({command:e.setGlyphs,args:[t.glyphs]}),_(n.transition,t.transition)||r.push({command:e.setTransition,args:[t.transition]}),_(n.light,t.light)||r.push({command:e.setLight,args:[t.light]});var l={},d=[];(function(m,S,y,s){var p;for(p in S=S||{},m=m||{})m.hasOwnProperty(p)&&(S.hasOwnProperty(p)||g(p,y,s));for(p in S)S.hasOwnProperty(p)&&(m.hasOwnProperty(p)?_(m[p],S[p])||(m[p].type==="geojson"&&S[p].type==="geojson"&&c(m,S,p)?y.push({command:e.setGeoJSONSourceData,args:[p,S[p].data]}):f(p,S,y,s)):b(p,S,y))})(n.sources,t.sources,d,l);var h=[];n.layers&&n.layers.forEach(function(m){l[m.source]?r.push({command:e.removeLayer,args:[m.id]}):h.push(m)}),r=r.concat(d),function(m,S,y){S=S||[];var s,p,w,A,k,v,x,T=(m=m||[]).map(i),E=S.map(i),C=m.reduce(a,{}),z=S.reduce(a,{}),P=T.slice(),B=Object.create(null);for(s=0,p=0;s<T.length;s++)w=T[s],z.hasOwnProperty(w)?p++:(y.push({command:e.removeLayer,args:[w]}),P.splice(P.indexOf(w,p),1));for(s=0,p=0;s<E.length;s++)w=E[E.length-1-s],P[P.length-1-s]!==w&&(C.hasOwnProperty(w)?(y.push({command:e.removeLayer,args:[w]}),P.splice(P.lastIndexOf(w,P.length-p),1)):p++,v=P[P.length-s],y.push({command:e.addLayer,args:[z[w],v]}),P.splice(P.length-s,0,w),B[w]=!0);for(s=0;s<E.length;s++)if(A=C[w=E[s]],k=z[w],!B[w]&&!_(A,k))if(_(A.source,k.source)&&_(A["source-layer"],k["source-layer"])&&_(A.type,k.type)){for(x in u(A.layout,k.layout,y,w,null,e.setLayoutProperty),u(A.paint,k.paint,y,w,null,e.setPaintProperty),_(A.filter,k.filter)||y.push({command:e.setFilter,args:[w,k.filter]}),_(A.minzoom,k.minzoom)&&_(A.maxzoom,k.maxzoom)||y.push({command:e.setLayerZoomRange,args:[w,k.minzoom,k.maxzoom]}),A)A.hasOwnProperty(x)&&x!=="layout"&&x!=="paint"&&x!=="filter"&&x!=="metadata"&&x!=="minzoom"&&x!=="maxzoom"&&(x.indexOf("paint.")===0?u(A[x],k[x],y,w,x.slice(6),e.setPaintProperty):_(A[x],k[x])||y.push({command:e.setLayerProperty,args:[w,x,k[x]]}));for(x in k)k.hasOwnProperty(x)&&!A.hasOwnProperty(x)&&x!=="layout"&&x!=="paint"&&x!=="filter"&&x!=="metadata"&&x!=="minzoom"&&x!=="maxzoom"&&(x.indexOf("paint.")===0?u(A[x],k[x],y,w,x.slice(6),e.setPaintProperty):_(A[x],k[x])||y.push({command:e.setLayerProperty,args:[w,x,k[x]]}))}else y.push({command:e.removeLayer,args:[w]}),v=P[P.lastIndexOf(w)+1],y.push({command:e.addLayer,args:[k,v]})}(h,t.layers,r)}catch(m){console.warn("Unable to compute style diff:",m),r=[{command:e.setStyle,args:[t]}]}return r},O.exports.operations=e},function(O,D,o){function _(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function e(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}function b(i,a,n){return a&&e(i.prototype,a),n&&e(i,n),i}var g=o(2),f=o(69),c=function(){function i(){_(this,i),this._currentTileIndex=0,this._seenCrossTileIDs={}}return b(i,[{key:"continuePlacement",value:function(a,n,t,r,l){for(;this._currentTileIndex<a.length;){var d=a[this._currentTileIndex];if(n.placeLayerTile(r,d,t,this._seenCrossTileIDs),this._currentTileIndex++,l())return!0}}}]),i}(),u=function(){function i(a,n,t,r,l){_(this,i),this.placement=new f(a,l),this._currentPlacementIndex=n.length-1,this._forceFullPlacement=t,this._showCollisionBoxes=r,this._done=!1}return b(i,[{key:"isDone",value:function(){return this._done}},{key:"continuePlacement",value:function(a,n,t){for(var r=this,l=g.now(),d=function(){var S=g.now()-l;return!r._forceFullPlacement&&S>2};this._currentPlacementIndex>=0;){var h=n[a[this._currentPlacementIndex]],m=this.placement.collisionIndex.transform.zoom;if(h.type==="symbol"&&(!h.minzoom||h.minzoom<=m)&&(!h.maxzoom||h.maxzoom>m)){if(this._inProgressLayer||(this._inProgressLayer=new c),this._inProgressLayer.continuePlacement(t[h.source],this.placement,this._showCollisionBoxes,h,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}}]),i}();O.exports=u},function(O,D){O.exports=`#ifdef GL_ES
precision mediump float;
#else
 
#if !defined(lowp)
#define lowp
#endif
 
#if !defined(mediump)
#define mediump
#endif
 
#if !defined(highp)
#define highp
#endif
 
#endif
`},function(O,D){O.exports=`#ifdef GL_ES
precision highp float;
#else
 
#if !defined(lowp)
#define lowp
#endif
 
#if !defined(mediump)
#define mediump
#endif
 
#if !defined(highp)
#define highp
#endif
 
#endif
 
// Unpack a pair of values that have been packed into a single float.
// The packed values are assumed to be 8-bit unsigned integers, and are
// packed like so:
// packedValue = floor(input[0]) * 256 + input[1],
vec2 unpack_float(const float packedValue) {
    int packedIntValue = int(packedValue);
    int v0 = packedIntValue / 256;
    return vec2(v0, packedIntValue - v0 * 256);
}
 
vec2 unpack_opacity(const float packedOpacity) {
    int intOpacity = int(packedOpacity) / 2;
    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));
}
 
// To minimize the number of attributes needed, we encode a 4-component
// color into a pair of floats (i.e. a vec2) as follows:
// [ floor(color.r * 255) * 256 + color.g * 255,
//   floor(color.b * 255) * 256 + color.g * 255 ]
vec4 decode_color(const vec2 encodedColor) {
    return vec4(
        unpack_float(encodedColor[0]) / 255.0,
        unpack_float(encodedColor[1]) / 255.0
    );
}
 
// Unpack a pair of paint values and interpolate between them.
float unpack_mix_vec2(const vec2 packedValue, const float t) {
    return mix(packedValue[0], packedValue[1], t);
}
 
// Unpack a pair of paint values and interpolate between them.
vec4 unpack_mix_vec4(const vec4 packedColors, const float t) {
    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));
    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));
    return mix(minColor, maxColor, t);
}
 
// The offset depends on how many pixels are between the world origin and the edge of the tile:
// vec2 offset = mod(pixel_coord, size)
//
// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.
// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.
//
// The pixel_coord is passed in as two 16 bit values:
// pixel_coord_upper = floor(pixel_coord / 2^16)
// pixel_coord_lower = mod(pixel_coord, 2^16)
//
// The offset is calculated in a series of steps that should preserve this precision:
vec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,
    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {
 
    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);
    return (tile_units_to_pixels * pos + offset) / pattern_size;
}
`},function(O,D){O.exports=`uniform vec4 u_color;
uniform float u_opacity;
 
void main() {
    gl_FragColor = u_color * u_opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`attribute vec2 a_pos;
 
uniform mat4 u_matrix;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
`},function(O,D){O.exports=`uniform vec2 u_pattern_tl_a;
uniform vec2 u_pattern_br_a;
uniform vec2 u_pattern_tl_b;
uniform vec2 u_pattern_br_b;
uniform vec2 u_texsize;
uniform float u_mix;
uniform float u_opacity;
 
uniform sampler2D u_image;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
 
void main() {
    vec2 imagecoord = mod(v_pos_a, 1.0);
    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);
    vec4 color1 = texture2D(u_image, pos);
 
    vec2 imagecoord_b = mod(v_pos_b, 1.0);
    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);
    vec4 color2 = texture2D(u_image, pos2);
 
    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_pattern_size_a;
uniform vec2 u_pattern_size_b;
uniform vec2 u_pixel_coord_upper;
uniform vec2 u_pixel_coord_lower;
uniform float u_scale_a;
uniform float u_scale_b;
uniform float u_tile_units_to_pixels;
 
attribute vec2 a_pos;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
 
    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);
    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);
}
`},function(O,D){O.exports=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
 
varying vec3 v_data;
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize mediump float radius
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize highp vec4 stroke_color
    #pragma mapbox: initialize mediump float stroke_width
    #pragma mapbox: initialize lowp float stroke_opacity
 
    vec2 extrude = v_data.xy;
    float extrude_length = length(extrude);
 
    lowp float antialiasblur = v_data.z;
    float antialiased_blur = -max(blur, antialiasblur);
 
    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);
 
    float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(
        antialiased_blur,
        0.0,
        extrude_length - radius / (radius + stroke_width)
    );
 
    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform bool u_scale_with_map;
uniform bool u_pitch_with_map;
uniform vec2 u_extrude_scale;
uniform highp float u_camera_to_center_distance;
 
attribute vec2 a_pos;
 
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
 
varying vec3 v_data;
 
void main(void) {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize mediump float radius
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize highp vec4 stroke_color
    #pragma mapbox: initialize mediump float stroke_width
    #pragma mapbox: initialize lowp float stroke_opacity
 
    // unencode the extrusion vector that we snuck into the a_pos vector
    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);
 
    // multiply a_pos by 0.5, since we had it * 2 in order to sneak
    // in extrusion data
    vec2 circle_center = floor(a_pos * 0.5);
    if (u_pitch_with_map) {
        vec2 corner_position = circle_center;
        if (u_scale_with_map) {
            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;
        } else {
            // Pitching the circle with the map effectively scales it with the map
            // To counteract the effect for pitch-scale: viewport, we rescale the
            // whole circle based on the pitch scaling effect at its central point
            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);
            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);
        }
 
        gl_Position = u_matrix * vec4(corner_position, 0, 1);
    } else {
        gl_Position = u_matrix * vec4(circle_center, 0, 1);
 
        if (u_scale_with_map) {
            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;
        } else {
            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;
        }
    }
 
    // This is a minimum blur distance that serves as a faux-antialiasing for
    // the circle. since blur is a ratio of the circle's size and the intent is
    // to keep the blur at roughly 1px, the two are inversely related.
    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);
 
    v_data = vec3(extrude.x, extrude.y, antialiasblur);
}
`},function(O,D){O.exports=`void main() {
    gl_FragColor = vec4(1.0);
}
`},function(O,D){O.exports=`attribute vec2 a_pos;
 
uniform mat4 u_matrix;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
`},function(O,D){O.exports=`#pragma mapbox: define highp float weight
 
uniform highp float u_intensity;
varying vec2 v_extrude;
 
// Gaussian kernel coefficient: 1 / sqrt(2 * PI)
#define GAUSS_COEF 0.3989422804014327
 
void main() {
    #pragma mapbox: initialize highp float weight
 
    // Kernel density estimation with a Gaussian kernel of size 5x5
    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);
    float val = weight * u_intensity * GAUSS_COEF * exp(d);
 
    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
 
uniform mat4 u_matrix;
uniform float u_extrude_scale;
uniform float u_opacity;
uniform float u_intensity;
 
attribute vec2 a_pos;
 
varying vec2 v_extrude;
 
// Effective "0" in the kernel density texture to adjust the kernel size to;
// this empirically chosen number minimizes artifacts on overlapping kernels
// for typical heatmap cases (assuming clustered source)
const highp float ZERO = 1.0 / 255.0 / 16.0;
 
// Gaussian kernel coefficient: 1 / sqrt(2 * PI)
#define GAUSS_COEF 0.3989422804014327
 
void main(void) {
    #pragma mapbox: initialize highp float weight
    #pragma mapbox: initialize mediump float radius
 
    // unencode the extrusion vector that we snuck into the a_pos vector
    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);
 
    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use
    // it to produce the vertices of a square mesh framing the point feature
    // we're adding to the kernel density texture.  We'll also pass it as
    // a varying, so that the fragment shader can determine the distance of
    // each fragment from the point feature.
    // Before we do so, we need to scale it up sufficiently so that the
    // kernel falls effectively to zero at the edge of the mesh.
    // That is, we want to know S such that
    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO
    // Which solves to:
    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0
    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;
 
    // Pass the varying in units of radius
    v_extrude = S * unscaled_extrude;
 
    // Scale by radius and the zoom-based scale factor to produce actual
    // mesh position
    vec2 extrude = v_extrude * radius * u_extrude_scale;
 
    // multiply a_pos by 0.5, since we had it * 2 in order to sneak
    // in extrusion data
    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);
 
    gl_Position = u_matrix * pos;
}
`},function(O,D){O.exports=`uniform sampler2D u_image;
uniform sampler2D u_color_ramp;
uniform float u_opacity;
varying vec2 v_pos;
 
void main() {
    float t = texture2D(u_image, v_pos).r;
    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));
    gl_FragColor = color * u_opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(0.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_world;
attribute vec2 a_pos;
varying vec2 v_pos;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);
 
    v_pos.x = a_pos.x;
    v_pos.y = 1.0 - a_pos.y;
}
`},function(O,D){O.exports=`
varying float v_placed;
varying float v_notUsed;
 
void main() {
 
    float alpha = 0.5;
 
    // Red = collision, hide label
    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;
 
    // Blue = no collision, label is showing
    if (v_placed > 0.5) {
        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;
    }
 
    if (v_notUsed > 0.5) {
        // This box not used, fade it out
        gl_FragColor *= .1;
    }
}`},function(O,D){O.exports=`attribute vec2 a_pos;
attribute vec2 a_anchor_pos;
attribute vec2 a_extrude;
attribute vec2 a_placed;
 
uniform mat4 u_matrix;
uniform vec2 u_extrude_scale;
uniform float u_camera_to_center_distance;
 
varying float v_placed;
varying float v_notUsed;
 
void main() {
    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);
    highp float camera_to_anchor_distance = projectedPoint.w;
    highp float collision_perspective_ratio = 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance);
 
    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);
    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;
 
    v_placed = a_placed.x;
    v_notUsed = a_placed.y;
}
`},function(O,D){O.exports=`
varying float v_placed;
varying float v_notUsed;
varying float v_radius;
varying vec2 v_extrude;
varying vec2 v_extrude_scale;
 
void main() {
    float alpha = 0.5;
 
    // Red = collision, hide label
    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;
 
    // Blue = no collision, label is showing
    if (v_placed > 0.5) {
        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;
    }
 
    if (v_notUsed > 0.5) {
        // This box not used, fade it out
        color *= .2;
    }
 
    float extrude_scale_length = length(v_extrude_scale);
    float extrude_length = length(v_extrude) * extrude_scale_length;
    float stroke_width = 15.0 * extrude_scale_length;
    float radius = v_radius * extrude_scale_length;
 
    float distance_to_edge = abs(extrude_length - radius);
    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);
 
    gl_FragColor = opacity_t * color;
}
`},function(O,D){O.exports=`attribute vec2 a_pos;
attribute vec2 a_anchor_pos;
attribute vec2 a_extrude;
attribute vec2 a_placed;
 
uniform mat4 u_matrix;
uniform vec2 u_extrude_scale;
uniform float u_camera_to_center_distance;
 
varying float v_placed;
varying float v_notUsed;
varying float v_radius;
 
varying vec2 v_extrude;
varying vec2 v_extrude_scale;
 
void main() {
    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);
    highp float camera_to_anchor_distance = projectedPoint.w;
    highp float collision_perspective_ratio = 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance);
 
    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);
 
    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur
    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;
 
    v_placed = a_placed.x;
    v_notUsed = a_placed.y;
    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius
 
    v_extrude = a_extrude * padding_factor;
    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;
}
`},function(O,D){O.exports=`uniform highp vec4 u_color;
 
void main() {
    gl_FragColor = u_color;
}
`},function(O,D){O.exports=`attribute vec2 a_pos;
 
uniform mat4 u_matrix;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
`},function(O,D){O.exports=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize lowp float opacity
 
    gl_FragColor = color * opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`attribute vec2 a_pos;
 
uniform mat4 u_matrix;
 
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize lowp float opacity
 
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
`},function(O,D){O.exports=`#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
 
varying vec2 v_pos;
 
void main() {
    #pragma mapbox: initialize highp vec4 outline_color
    #pragma mapbox: initialize lowp float opacity
 
    float dist = length(v_pos - gl_FragCoord.xy);
    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);
    gl_FragColor = outline_color * (alpha * opacity);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`attribute vec2 a_pos;
 
uniform mat4 u_matrix;
uniform vec2 u_world;
 
varying vec2 v_pos;
 
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize highp vec4 outline_color
    #pragma mapbox: initialize lowp float opacity
 
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;
}
`},function(O,D){O.exports=`uniform vec2 u_pattern_tl_a;
uniform vec2 u_pattern_br_a;
uniform vec2 u_pattern_tl_b;
uniform vec2 u_pattern_br_b;
uniform vec2 u_texsize;
uniform float u_mix;
 
uniform sampler2D u_image;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
varying vec2 v_pos;
 
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize lowp float opacity
 
    vec2 imagecoord = mod(v_pos_a, 1.0);
    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);
    vec4 color1 = texture2D(u_image, pos);
 
    vec2 imagecoord_b = mod(v_pos_b, 1.0);
    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);
    vec4 color2 = texture2D(u_image, pos2);
 
    // find distance to outline for alpha interpolation
 
    float dist = length(v_pos - gl_FragCoord.xy);
    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);
 
 
    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_world;
uniform vec2 u_pattern_size_a;
uniform vec2 u_pattern_size_b;
uniform vec2 u_pixel_coord_upper;
uniform vec2 u_pixel_coord_lower;
uniform float u_scale_a;
uniform float u_scale_b;
uniform float u_tile_units_to_pixels;
 
attribute vec2 a_pos;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
varying vec2 v_pos;
 
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize lowp float opacity
 
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
 
    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);
    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);
 
    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;
}
`},function(O,D){O.exports=`uniform vec2 u_pattern_tl_a;
uniform vec2 u_pattern_br_a;
uniform vec2 u_pattern_tl_b;
uniform vec2 u_pattern_br_b;
uniform vec2 u_texsize;
uniform float u_mix;
 
uniform sampler2D u_image;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
 
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize lowp float opacity
 
    vec2 imagecoord = mod(v_pos_a, 1.0);
    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);
    vec4 color1 = texture2D(u_image, pos);
 
    vec2 imagecoord_b = mod(v_pos_b, 1.0);
    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);
    vec4 color2 = texture2D(u_image, pos2);
 
    gl_FragColor = mix(color1, color2, u_mix) * opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_pattern_size_a;
uniform vec2 u_pattern_size_b;
uniform vec2 u_pixel_coord_upper;
uniform vec2 u_pixel_coord_lower;
uniform float u_scale_a;
uniform float u_scale_b;
uniform float u_tile_units_to_pixels;
 
attribute vec2 a_pos;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
 
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize lowp float opacity
 
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
 
    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);
    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);
}
`},function(O,D){O.exports=`varying vec4 v_color;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define highp vec4 color
 
void main() {
    #pragma mapbox: initialize lowp float base
    #pragma mapbox: initialize lowp float height
    #pragma mapbox: initialize highp vec4 color
 
    gl_FragColor = v_color;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec3 u_lightcolor;
uniform lowp vec3 u_lightpos;
uniform lowp float u_lightintensity;
 
attribute vec2 a_pos;
attribute vec4 a_normal_ed;
 
varying vec4 v_color;
 
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
 
#pragma mapbox: define highp vec4 color
 
void main() {
    #pragma mapbox: initialize lowp float base
    #pragma mapbox: initialize lowp float height
    #pragma mapbox: initialize highp vec4 color
 
    vec3 normal = a_normal_ed.xyz;
 
    base = max(0.0, base);
    height = max(0.0, height);
 
    float t = mod(normal.x, 2.0);
 
    gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);
 
    // Relative luminance (how dark/bright is the surface color?)
    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;
 
    v_color = vec4(0.0, 0.0, 0.0, 1.0);
 
    // Add slight ambient lighting so no extrusions are totally black
    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);
    color += ambientlight;
 
    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray
    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);
 
    // Adjust directional so that
    // the range of values for highlight/shading is narrower
    // with lower light intensity
    // and with lighter/brighter surface colors
    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);
 
    // Add gradient along z axis of side surfaces
    if (normal.y != 0.0) {
        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);
    }
 
    // Assign final color based on surface + ambient light color, diffuse light directional, and light color
    // with lower bounds adjusted to hue of light
    // so that shading is tinted with the complementary (opposite) color to the light color
    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);
    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);
    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);
}
`},function(O,D){O.exports=`uniform vec2 u_pattern_tl_a;
uniform vec2 u_pattern_br_a;
uniform vec2 u_pattern_tl_b;
uniform vec2 u_pattern_br_b;
uniform vec2 u_texsize;
uniform float u_mix;
 
uniform sampler2D u_image;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
varying vec4 v_lighting;
 
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
 
void main() {
    #pragma mapbox: initialize lowp float base
    #pragma mapbox: initialize lowp float height
 
    vec2 imagecoord = mod(v_pos_a, 1.0);
    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);
    vec4 color1 = texture2D(u_image, pos);
 
    vec2 imagecoord_b = mod(v_pos_b, 1.0);
    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);
    vec4 color2 = texture2D(u_image, pos2);
 
    vec4 mixedColor = mix(color1, color2, u_mix);
 
    gl_FragColor = mixedColor * v_lighting;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_pattern_size_a;
uniform vec2 u_pattern_size_b;
uniform vec2 u_pixel_coord_upper;
uniform vec2 u_pixel_coord_lower;
uniform float u_scale_a;
uniform float u_scale_b;
uniform float u_tile_units_to_pixels;
uniform float u_height_factor;
 
uniform vec3 u_lightcolor;
uniform lowp vec3 u_lightpos;
uniform lowp float u_lightintensity;
 
attribute vec2 a_pos;
attribute vec4 a_normal_ed;
 
varying vec2 v_pos_a;
varying vec2 v_pos_b;
varying vec4 v_lighting;
varying float v_directional;
 
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
 
void main() {
    #pragma mapbox: initialize lowp float base
    #pragma mapbox: initialize lowp float height
 
    vec3 normal = a_normal_ed.xyz;
    float edgedistance = a_normal_ed.w;
 
    base = max(0.0, base);
    height = max(0.0, height);
 
    float t = mod(normal.x, 2.0);
    float z = t > 0.0 ? height : base;
 
    gl_Position = u_matrix * vec4(a_pos, z, 1);
 
    vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0
        ? a_pos // extrusion top
        : vec2(edgedistance, z * u_height_factor); // extrusion side
 
    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);
    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);
 
    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);
    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);
    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);
 
    if (normal.y != 0.0) {
        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);
    }
 
    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));
}
`},function(O,D){O.exports=`uniform sampler2D u_image;
uniform float u_opacity;
varying vec2 v_pos;
 
void main() {
    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(0.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_world;
attribute vec2 a_pos;
varying vec2 v_pos;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);
 
    v_pos.x = a_pos.x;
    v_pos.y = 1.0 - a_pos.y;
}
`},function(O,D){O.exports=`#ifdef GL_ES
precision highp float;
#endif
 
uniform sampler2D u_image;
varying vec2 v_pos;
uniform vec2 u_dimension;
uniform float u_zoom;
 
float getElevation(vec2 coord, float bias) {
    // Convert encoded elevation value to meters
    vec4 data = texture2D(u_image, coord) * 255.0;
    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;
}
 
void main() {
    vec2 epsilon = 1.0 / u_dimension;
 
    // queried pixels:
    // +-----------+
    // |   |   |   |
    // | a | b | c |
    // |   |   |   |
    // +-----------+
    // |   |   |   |
    // | d | e | f |
    // |   |   |   |
    // +-----------+
    // |   |   |   |
    // | g | h | i |
    // |   |   |   |
    // +-----------+
 
    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);
    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);
    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);
    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);
    float e = getElevation(v_pos, 0.0);
    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);
    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);
    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);
    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);
 
    // here we divide the x and y slopes by 8 * pixel size
    // where pixel size (aka meters/pixel) is:
    // circumference of the world / (pixels per tile * number of tiles)
    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))
    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)
    // we want to vertically exaggerate the hillshading though, because otherwise
    // it is barely noticeable at low zooms. to do this, we multiply this by some
    // scale factor pow(2, (u_zoom - 14) * a) where a is an arbitrary value and 14 is the
    // maxzoom of the tile source. here we use a=0.3 which works out to the
    // expression below. see nickidlugash's awesome breakdown for more info
    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556
    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;
 
    vec2 deriv = vec2(
        (c + f + f + i) - (a + d + d + g),
        (g + h + h + i) - (a + b + b + c)
    ) /  pow(2.0, (u_zoom - 14.0) * exaggeration + 19.2562 - u_zoom);
 
    gl_FragColor = clamp(vec4(
        deriv.x / 2.0 + 0.5,
        deriv.y / 2.0 + 0.5,
        1.0,
        1.0), 0.0, 1.0);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
 
attribute vec2 a_pos;
attribute vec2 a_texture_pos;
 
varying vec2 v_pos;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;
}
`},function(O,D){O.exports=`uniform sampler2D u_image;
varying vec2 v_pos;
 
uniform vec2 u_latrange;
uniform vec2 u_light;
uniform vec4 u_shadow;
uniform vec4 u_highlight;
uniform vec4 u_accent;
 
#define PI 3.141592653589793
 
void main() {
    vec4 pixel = texture2D(u_image, v_pos);
 
    vec2 deriv = ((pixel.rg * 2.0) - 1.0);
 
    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude
    // to account for mercator projection distortion. see #4807 for details
    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));
    // We also multiply the slope by an arbitrary z-factor of 1.25
    float slope = atan(1.25 * length(deriv) / scaleFactor);
    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);
 
    float intensity = u_light.x;
    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal
    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec
    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.
    float azimuth = u_light.y + PI;
 
    // We scale the slope exponentially based on intensity, using a calculation similar to
    // the exponential interpolation function in the style spec:
    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228
    // so that higher intensity values create more opaque hillshading.
    float base = 1.875 - intensity * 1.75;
    float maxValue = 0.5 * PI;
    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;
 
    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine
    // so that the accent color's rate of change eases in while the shade color's eases out.
    float accent = cos(scaledSlope);
    // We multiply both the accent and shade color by a clamped intensity value
    // so that intensities >= 0.5 do not additionally affect the color values
    // while intensity values < 0.5 make the overall color more transparent.
    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);
    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);
    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);
    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
 
attribute vec2 a_pos;
attribute vec2 a_texture_pos;
 
varying vec2 v_pos;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
    v_pos = a_texture_pos / 8192.0;
}
`},function(O,D){O.exports=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
 
varying vec2 v_width2;
varying vec2 v_normal;
varying float v_gamma_scale;
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
 
    // Calculate the distance of the pixel from the line in pixels.
    float dist = length(v_normal) * v_width2.s;
 
    // Calculate the antialiasing fade factor. This is either when fading in
    // the line in case of an offset line (v_width2.t) or when fading out
    // (v_width2.s)
    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;
    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);
 
    gl_FragColor = color * (alpha * opacity);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`
 
// the distance over which the line edge fades out.
// Retina devices need a smaller distance to avoid aliasing.
#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0
 
// floor(127 / 2) == 63.0
// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is
// stored in a byte (-128..127). we scale regular normals up to length 63, but
// there are also "special" normals that have a bigger length (of up to 126 in
// this case).
// #define scale 63.0
#define scale 0.015873016
 
attribute vec4 a_pos_normal;
attribute vec4 a_data;
 
uniform mat4 u_matrix;
uniform mediump float u_ratio;
uniform vec2 u_gl_units_to_pixels;
 
varying vec2 v_normal;
varying vec2 v_width2;
varying float v_gamma_scale;
 
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize mediump float gapwidth
    #pragma mapbox: initialize lowp float offset
    #pragma mapbox: initialize mediump float width
 
    vec2 a_extrude = a_data.xy - 128.0;
    float a_direction = mod(a_data.z, 4.0) - 1.0;
 
    vec2 pos = a_pos_normal.xy;
 
    // x is 1 if it's a round cap, 0 otherwise
    // y is 1 if the normal points up, and -1 if it points down
    mediump vec2 normal = a_pos_normal.zw;
    v_normal = normal;
 
    // these transformations used to be applied in the JS and native code bases.
    // moved them into the shader for clarity and simplicity.
    gapwidth = gapwidth / 2.0;
    float halfwidth = width / 2.0;
    offset = -1.0 * offset;
 
    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);
    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;
 
    // Scale the extrusion vector down to a normal and then up by the line width
    // of this vertex.
    mediump vec2 dist = outset * a_extrude * scale;
 
    // Calculate the offset when drawing a line that is to the side of the actual line.
    // We do this by creating a vector that points towards the extrude, but rotate
    // it when we're drawing round end points (a_direction = -1 or 1) since their
    // extrude vector points in another direction.
    mediump float u = 0.5 * a_direction;
    mediump float t = 1.0 - abs(u);
    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);
 
    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);
    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;
 
    // calculate how much the perspective view squishes or stretches the extrude
    float extrude_length_without_perspective = length(dist);
    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);
    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;
 
    v_width2 = vec2(outset, inset);
}
`},function(O,D){O.exports=`uniform vec2 u_pattern_size_a;
uniform vec2 u_pattern_size_b;
uniform vec2 u_pattern_tl_a;
uniform vec2 u_pattern_br_a;
uniform vec2 u_pattern_tl_b;
uniform vec2 u_pattern_br_b;
uniform vec2 u_texsize;
uniform float u_fade;
 
uniform sampler2D u_image;
 
varying vec2 v_normal;
varying vec2 v_width2;
varying float v_linesofar;
varying float v_gamma_scale;
 
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
 
void main() {
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
 
    // Calculate the distance of the pixel from the line in pixels.
    float dist = length(v_normal) * v_width2.s;
 
    // Calculate the antialiasing fade factor. This is either when fading in
    // the line in case of an offset line (v_width2.t) or when fading out
    // (v_width2.s)
    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;
    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);
 
    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);
    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);
    float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);
    float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);
    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));
    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));
 
    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);
 
    gl_FragColor = color * alpha * opacity;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`// floor(127 / 2) == 63.0
// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is
// stored in a byte (-128..127). we scale regular normals up to length 63, but
// there are also "special" normals that have a bigger length (of up to 126 in
// this case).
// #define scale 63.0
#define scale 0.015873016
 
// We scale the distance before adding it to the buffers so that we can store
// long distances for long segments. Use this value to unscale the distance.
#define LINE_DISTANCE_SCALE 2.0
 
// the distance over which the line edge fades out.
// Retina devices need a smaller distance to avoid aliasing.
#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0
 
attribute vec4 a_pos_normal;
attribute vec4 a_data;
 
uniform mat4 u_matrix;
uniform mediump float u_ratio;
uniform vec2 u_gl_units_to_pixels;
 
varying vec2 v_normal;
varying vec2 v_width2;
varying float v_linesofar;
varying float v_gamma_scale;
 
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
 
void main() {
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize lowp float offset
    #pragma mapbox: initialize mediump float gapwidth
    #pragma mapbox: initialize mediump float width
 
    vec2 a_extrude = a_data.xy - 128.0;
    float a_direction = mod(a_data.z, 4.0) - 1.0;
    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;
 
    vec2 pos = a_pos_normal.xy;
 
    // x is 1 if it's a round cap, 0 otherwise
    // y is 1 if the normal points up, and -1 if it points down
    mediump vec2 normal = a_pos_normal.zw;
    v_normal = normal;
 
    // these transformations used to be applied in the JS and native code bases.
    // moved them into the shader for clarity and simplicity.
    gapwidth = gapwidth / 2.0;
    float halfwidth = width / 2.0;
    offset = -1.0 * offset;
 
    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);
    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;
 
    // Scale the extrusion vector down to a normal and then up by the line width
    // of this vertex.
    mediump vec2 dist = outset * a_extrude * scale;
 
    // Calculate the offset when drawing a line that is to the side of the actual line.
    // We do this by creating a vector that points towards the extrude, but rotate
    // it when we're drawing round end points (a_direction = -1 or 1) since their
    // extrude vector points in another direction.
    mediump float u = 0.5 * a_direction;
    mediump float t = 1.0 - abs(u);
    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);
 
    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);
    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;
 
    // calculate how much the perspective view squishes or stretches the extrude
    float extrude_length_without_perspective = length(dist);
    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);
    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;
 
    v_linesofar = a_linesofar;
    v_width2 = vec2(outset, inset);
}
`},function(O,D){O.exports=`
uniform sampler2D u_image;
uniform float u_sdfgamma;
uniform float u_mix;
 
varying vec2 v_normal;
varying vec2 v_width2;
varying vec2 v_tex_a;
varying vec2 v_tex_b;
varying float v_gamma_scale;
 
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize mediump float width
    #pragma mapbox: initialize lowp float floorwidth
 
    // Calculate the distance of the pixel from the line in pixels.
    float dist = length(v_normal) * v_width2.s;
 
    // Calculate the antialiasing fade factor. This is either when fading in
    // the line in case of an offset line (v_width2.t) or when fading out
    // (v_width2.s)
    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;
    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);
 
    float sdfdist_a = texture2D(u_image, v_tex_a).a;
    float sdfdist_b = texture2D(u_image, v_tex_b).a;
    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);
    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);
 
    gl_FragColor = color * (alpha * opacity);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`// floor(127 / 2) == 63.0
// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is
// stored in a byte (-128..127). we scale regular normals up to length 63, but
// there are also "special" normals that have a bigger length (of up to 126 in
// this case).
// #define scale 63.0
#define scale 0.015873016
 
// We scale the distance before adding it to the buffers so that we can store
// long distances for long segments. Use this value to unscale the distance.
#define LINE_DISTANCE_SCALE 2.0
 
// the distance over which the line edge fades out.
// Retina devices need a smaller distance to avoid aliasing.
#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0
 
attribute vec4 a_pos_normal;
attribute vec4 a_data;
 
uniform mat4 u_matrix;
uniform mediump float u_ratio;
uniform vec2 u_patternscale_a;
uniform float u_tex_y_a;
uniform vec2 u_patternscale_b;
uniform float u_tex_y_b;
uniform vec2 u_gl_units_to_pixels;
 
varying vec2 v_normal;
varying vec2 v_width2;
varying vec2 v_tex_a;
varying vec2 v_tex_b;
varying float v_gamma_scale;
 
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
 
void main() {
    #pragma mapbox: initialize highp vec4 color
    #pragma mapbox: initialize lowp float blur
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize mediump float gapwidth
    #pragma mapbox: initialize lowp float offset
    #pragma mapbox: initialize mediump float width
    #pragma mapbox: initialize lowp float floorwidth
 
    vec2 a_extrude = a_data.xy - 128.0;
    float a_direction = mod(a_data.z, 4.0) - 1.0;
    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;
 
    vec2 pos = a_pos_normal.xy;
 
    // x is 1 if it's a round cap, 0 otherwise
    // y is 1 if the normal points up, and -1 if it points down
    mediump vec2 normal = a_pos_normal.zw;
    v_normal = normal;
 
    // these transformations used to be applied in the JS and native code bases.
    // moved them into the shader for clarity and simplicity.
    gapwidth = gapwidth / 2.0;
    float halfwidth = width / 2.0;
    offset = -1.0 * offset;
 
    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);
    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;
 
    // Scale the extrusion vector down to a normal and then up by the line width
    // of this vertex.
    mediump vec2 dist =outset * a_extrude * scale;
 
    // Calculate the offset when drawing a line that is to the side of the actual line.
    // We do this by creating a vector that points towards the extrude, but rotate
    // it when we're drawing round end points (a_direction = -1 or 1) since their
    // extrude vector points in another direction.
    mediump float u = 0.5 * a_direction;
    mediump float t = 1.0 - abs(u);
    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);
 
    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);
    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;
 
    // calculate how much the perspective view squishes or stretches the extrude
    float extrude_length_without_perspective = length(dist);
    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);
    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;
 
    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);
    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);
 
    v_width2 = vec2(outset, inset);
}
`},function(O,D){O.exports=`uniform float u_fade_t;
uniform float u_opacity;
uniform sampler2D u_image0;
uniform sampler2D u_image1;
varying vec2 v_pos0;
varying vec2 v_pos1;
 
uniform float u_brightness_low;
uniform float u_brightness_high;
 
uniform float u_saturation_factor;
uniform float u_contrast_factor;
uniform vec3 u_spin_weights;
 
void main() {
 
    // read and cross-fade colors from the main and parent tiles
    vec4 color0 = texture2D(u_image0, v_pos0);
    vec4 color1 = texture2D(u_image1, v_pos1);
    if (color0.a > 0.0) {
        color0.rgb = color0.rgb / color0.a;
    }
    if (color1.a > 0.0) {
        color1.rgb = color1.rgb / color1.a;
    }
    vec4 color = mix(color0, color1, u_fade_t);
    color.a *= u_opacity;
    vec3 rgb = color.rgb;
 
    // spin
    rgb = vec3(
        dot(rgb, u_spin_weights.xyz),
        dot(rgb, u_spin_weights.zxy),
        dot(rgb, u_spin_weights.yzx));
 
    // saturation
    float average = (color.r + color.g + color.b) / 3.0;
    rgb += (average - rgb) * u_saturation_factor;
 
    // contrast
    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;
 
    // brightness
    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);
    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);
 
    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`uniform mat4 u_matrix;
uniform vec2 u_tl_parent;
uniform float u_scale_parent;
uniform float u_buffer_scale;
 
attribute vec2 a_pos;
attribute vec2 a_texture_pos;
 
varying vec2 v_pos0;
varying vec2 v_pos1;
 
void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
    // We are using Int16 for texture position coordinates to give us enough precision for
    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer
    // as an arbitrarily high number to preserve adequate precision when rendering.
    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,
    // so math for modifying either is consistent.
    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;
    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;
}
`},function(O,D){O.exports=`uniform sampler2D u_texture;
 
#pragma mapbox: define lowp float opacity
 
varying vec2 v_tex;
 
void main() {
    #pragma mapbox: initialize lowp float opacity
 
    lowp float alpha = opacity;
    gl_FragColor = texture2D(u_texture, v_tex) * alpha;
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`const float PI = 3.141592653589793;
 
attribute vec4 a_pos_offset;
attribute vec4 a_data;
attribute vec3 a_projected_pos;
 
uniform bool u_is_size_zoom_constant;
uniform bool u_is_size_feature_constant;
uniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function
uniform highp float u_size; // used when size is both zoom and feature constant
uniform highp float u_camera_to_center_distance;
uniform highp float u_pitch;
uniform bool u_rotate_symbol;
uniform highp float u_aspect_ratio;
uniform float u_fade_change;
 
#pragma mapbox: define lowp float opacity
 
uniform mat4 u_matrix;
uniform mat4 u_label_plane_matrix;
uniform mat4 u_gl_coord_matrix;
 
uniform bool u_is_text;
uniform bool u_pitch_with_map;
 
uniform vec2 u_texsize;
 
varying vec2 v_tex;
 
void main() {
    #pragma mapbox: initialize lowp float opacity
 
    vec2 a_pos = a_pos_offset.xy;
    vec2 a_offset = a_pos_offset.zw;
 
    vec2 a_tex = a_data.xy;
    vec2 a_size = a_data.zw;
 
    highp float segment_angle = -a_projected_pos[2];
 
    float size;
    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {
        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;
    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {
        size = a_size[0] / 10.0;
    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {
        size = u_size;
    } else {
        size = u_size;
    }
 
    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);
    highp float camera_to_anchor_distance = projectedPoint.w;
    // See comments in symbol_sdf.vertex
    highp float distance_ratio = u_pitch_with_map ?
        camera_to_anchor_distance / u_camera_to_center_distance :
        u_camera_to_center_distance / camera_to_anchor_distance;
    highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;
 
    size *= perspective_ratio;
 
    float fontScale = u_is_text ? size / 24.0 : size;
 
    highp float symbol_rotation = 0.0;
    if (u_rotate_symbol) {
        // See comments in symbol_sdf.vertex
        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);
 
        vec2 a = projectedPoint.xy / projectedPoint.w;
        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;
 
        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);
    }
 
    highp float angle_sin = sin(segment_angle + symbol_rotation);
    highp float angle_cos = cos(segment_angle + symbol_rotation);
    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
 
    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);
    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);
 
    v_tex = a_tex / u_texsize;
}
`},function(O,D){O.exports=`#define SDF_PX 8.0
#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO
 
uniform bool u_has_halo;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
 
uniform sampler2D u_texture;
uniform highp float u_gamma_scale;
uniform bool u_is_text;
 
varying vec2 v_data0;
varying vec3 v_data1;
 
void main() {
    #pragma mapbox: initialize highp vec4 fill_color
    #pragma mapbox: initialize highp vec4 halo_color
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize lowp float halo_width
    #pragma mapbox: initialize lowp float halo_blur
 
    vec2 tex = v_data0.xy;
    float gamma_scale = v_data1.x;
    float size = v_data1.y;
 
    lowp float dist = texture2D(u_texture, tex).a;
    float fontScale = u_is_text ? size / 24.0 : size;
 
    lowp vec4 color = fill_color;
    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);
    lowp float buff = (256.0 - 64.0) / 256.0;
 
    highp float gamma_scaled = gamma * u_gamma_scale;
    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);
    if (u_has_halo) {
        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);
        highp float gamma_scaled_halo = gamma * u_gamma_scale;
        lowp float buff_halo = (6.0 - halo_width / fontScale) / SDF_PX;
        highp float alpha_halo = smoothstep(buff_halo - gamma_scaled, buff_halo + gamma_scaled, dist);
        color = mix(halo_color, color, alpha);
        alpha = alpha_halo;
    }
    gl_FragColor = color * (alpha * opacity);
 
#ifdef OVERDRAW_INSPECTOR
    gl_FragColor = vec4(1.0);
#endif
}
`},function(O,D){O.exports=`const float PI = 3.141592653589793;
 
attribute vec4 a_pos_offset;
attribute vec4 a_data;
attribute vec3 a_projected_pos;
 
// contents of a_size vary based on the type of property value
// used for {text,icon}-size.
// For constants, a_size is disabled.
// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.
// For composite functions:
// [ text-size(lowerZoomStop, feature),
//   text-size(upperZoomStop, feature) ]
uniform bool u_is_size_zoom_constant;
uniform bool u_is_size_feature_constant;
uniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function
uniform highp float u_size; // used when size is both zoom and feature constant
 
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
 
uniform mat4 u_matrix;
uniform mat4 u_label_plane_matrix;
uniform mat4 u_gl_coord_matrix;
 
uniform bool u_is_text;
uniform bool u_pitch_with_map;
uniform highp float u_pitch;
uniform bool u_rotate_symbol;
uniform highp float u_aspect_ratio;
uniform highp float u_camera_to_center_distance;
uniform float u_fade_change;
 
uniform vec2 u_texsize;
 
varying vec2 v_data0;
varying vec3 v_data1;
 
void main() {
    #pragma mapbox: initialize highp vec4 fill_color
    #pragma mapbox: initialize highp vec4 halo_color
    #pragma mapbox: initialize lowp float opacity
    #pragma mapbox: initialize lowp float halo_width
    #pragma mapbox: initialize lowp float halo_blur
 
    vec2 a_pos = a_pos_offset.xy;
    vec2 a_offset = a_pos_offset.zw;
 
    vec2 a_tex = a_data.xy;
    vec2 a_size = a_data.zw;
 
    highp float segment_angle = -a_projected_pos[2];
    float size;
 
    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {
        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;
    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {
        size = a_size[0] / 10.0;
    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {
        size = u_size;
    } else {
        size = u_size;
    }
 
    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);
    highp float camera_to_anchor_distance = projectedPoint.w;
    // If the label is pitched with the map, layout is done in pitched space,
    // which makes labels in the distance smaller relative to viewport space.
    // We counteract part of that effect by multiplying by the perspective ratio.
    // If the label isn't pitched with the map, we do layout in viewport space,
    // which makes labels in the distance larger relative to the features around
    // them. We counteract part of that effect by dividing by the perspective ratio.
    highp float distance_ratio = u_pitch_with_map ?
        camera_to_anchor_distance / u_camera_to_center_distance :
        u_camera_to_center_distance / camera_to_anchor_distance;
    highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;
 
    size *= perspective_ratio;
 
    float fontScale = u_is_text ? size / 24.0 : size;
 
    highp float symbol_rotation = 0.0;
    if (u_rotate_symbol) {
        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units
        // To figure out that angle in projected space, we draw a short horizontal line in tile
        // space, project it, and measure its angle in projected space.
        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);
 
        vec2 a = projectedPoint.xy / projectedPoint.w;
        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;
 
        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);
    }
 
    highp float angle_sin = sin(segment_angle + symbol_rotation);
    highp float angle_cos = cos(segment_angle + symbol_rotation);
    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
 
    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);
    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);
    float gamma_scale = gl_Position.w;
 
    vec2 tex = a_tex / u_texsize;
 
    v_data0 = vec2(tex.x, tex.y);
    v_data1 = vec3(gamma_scale, size, 1.0);
}
`},function(O,D,o){function _(i,a,n){return a in i?Object.defineProperty(i,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[a]=n,i}function e(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var b=o(2),g=o(126),f=o(1),c=(o(32).ProgramConfiguration,o(40)),u=(o(67),function(){function i(r,l,d,h){(function(z,P){if(!(z instanceof P))throw new TypeError("Cannot call a class as a function")})(this,i);var m=r.gl;this.program=m.createProgram();var S=d.defines().concat("#define DEVICE_PIXEL_RATIO ".concat(b.devicePixelRatio.toFixed(1)));h&&S.push("#define OVERDRAW_INSPECTOR;");var y=S.concat(g.prelude.fragmentSource,l.fragmentSource).join(`
`),s=S.concat(g.prelude.vertexSource,l.vertexSource).join(`
`),p=m.createShader(m.FRAGMENT_SHADER);m.shaderSource(p,y),m.compileShader(p),f(m.getShaderParameter(p,m.COMPILE_STATUS),m.getShaderInfoLog(p)),m.attachShader(this.program,p);var w=m.createShader(m.VERTEX_SHADER);m.shaderSource(w,s),m.compileShader(w),f(m.getShaderParameter(w,m.COMPILE_STATUS),m.getShaderInfoLog(w)),m.attachShader(this.program,w);for(var A=d.layoutAttributes||[],k=0;k<A.length;k++)m.bindAttribLocation(this.program,k,A[k].name);m.linkProgram(this.program),f(m.getProgramParameter(this.program,m.LINK_STATUS),m.getProgramInfoLog(this.program)),this.numAttributes=m.getProgramParameter(this.program,m.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var v=0;v<this.numAttributes;v++){var x=m.getActiveAttrib(this.program,v);x&&(this.attributes[x.name]=m.getAttribLocation(this.program,x.name))}for(var T=m.getProgramParameter(this.program,m.ACTIVE_UNIFORMS),E=0;E<T;E++){var C=m.getActiveUniform(this.program,E);C&&(this.uniforms[C.name]=m.getUniformLocation(this.program,C.name))}}var a,n,t;return a=i,(n=[{key:"draw",value:function(r,l,d,h,m,S,y,s,p){var w,A=r.gl,k=(w={},_(w,A.LINES,2),_(w,A.TRIANGLES,3),w)[l],v=!0,x=!1,T=void 0;try{for(var E,C=S.get()[Symbol.iterator]();!(v=(E=C.next()).done);v=!0){var z=E.value,P=z.vaos||(z.vaos={});(P[d]||(P[d]=new c)).bind(r,this,h,y?y.getPaintVertexBuffers():[],m,z.vertexOffset,s,p),A.drawElements(l,z.primitiveLength*k,A.UNSIGNED_SHORT,z.primitiveOffset*k*2)}}catch(B){x=!0,T=B}finally{try{v||C.return==null||C.return()}finally{if(x)throw T}}}}])&&e(a.prototype,n),t&&e(a,t),i}());O.exports=u},function(O,D,o){var _=o(27),e=_.OverscaledTileID,b=_.CanonicalTileID;function g(f,c,u,i,a){for(var n=0;n<u.length;n++){var t=u[n];if(i.isLessThan(t.tileID))break;if(c.key===t.tileID.key)return;if(t.tileID.isChildOf(c)){for(var r=c.children(1/0),l=0;l<r.length;l++)g(f,r[l],u.slice(n),i,a);return}}var d=c.overscaledZ-f.overscaledZ,h=new b(d,c.canonical.x-(f.canonical.x<<d),c.canonical.y-(f.canonical.y<<d));a[h.key]=a[h.key]||h}O.exports=function(f,c){for(var u=f.sort(function(r,l){return r.tileID.isLessThan(l.tileID)?-1:l.tileID.isLessThan(r.tileID)?1:0}),i=0;i<u.length;i++){var a={},n=u[i],t=u.slice(i+1);g(n.tileID.wrapped(),n.tileID,t,new e(0,n.tileID.wrap+1,0,0,0),a),n.setMask(a,c)}}},function(O,D,o){var _=o(271),e=o(28),b=o(66),g=o(50),f=o(22).mat4.identity(new Float32Array(16)),c=o(51).layout,u=o(18),i=o(15);function a(r,l,d,h,m,S,y,s,p,w){var A,k=r.context,v=k.gl,x=r.transform,T=s==="map",E=p==="map",C=T&&d.layout.get("symbol-placement")==="line",z=T&&!E&&!C,P=E;k.setDepthMode(P?r.depthModeForSublayer(0,i.ReadOnly):i.disabled);var B=!0,F=!1,Z=void 0;try{for(var W,J=h[Symbol.iterator]();!(B=(W=J.next()).done);B=!0){var X=W.value,R=l.getTile(X),U=R.getBucket(d);if(U){var K=m?U.text:U.icon;if(K&&K.segments.get().length){var q=K.programConfigurations.get(d.id),L=m||U.sdfIcons,I=m?U.textSizeData:U.iconSizeData;if(A||(A=r.useProgram(L?"symbolSDF":"symbolIcon",q),q.setUniforms(r.context,A,d.paint,{zoom:r.transform.zoom}),n(A,r,d,m,z,E,I)),k.activeTexture.set(v.TEXTURE0),v.uniform1i(A.uniforms.u_texture,0),m)R.glyphAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),v.uniform2fv(A.uniforms.u_texsize,R.glyphAtlasTexture.size);else{var j=d.layout.get("icon-size").constantOr(0)!==1||U.iconsNeedLinear,M=E||x.pitch!==0;R.iconAtlasTexture.bind(L||r.options.rotating||r.options.zooming||j||M?v.LINEAR:v.NEAREST,v.CLAMP_TO_EDGE),v.uniform2fv(A.uniforms.u_texsize,R.iconAtlasTexture.size)}v.uniformMatrix4fv(A.uniforms.u_matrix,!1,r.translatePosMatrix(X.posMatrix,R,S,y));var N=e(R,1,r.transform.zoom),V=b.getLabelPlaneMatrix(X.posMatrix,E,T,r.transform,N),G=b.getGlCoordMatrix(X.posMatrix,E,T,r.transform,N);v.uniformMatrix4fv(A.uniforms.u_gl_coord_matrix,!1,r.translatePosMatrix(G,R,S,y,!0)),C?(v.uniformMatrix4fv(A.uniforms.u_label_plane_matrix,!1,f),b.updateLineLabels(U,X.posMatrix,r,m,V,G,E,w)):v.uniformMatrix4fv(A.uniforms.u_label_plane_matrix,!1,V),v.uniform1f(A.uniforms.u_fade_change,r.options.fadeDuration?r.symbolFadeChange:1),t(A,q,r,d,R,K,m,L,E)}}}}catch(H){F=!0,Z=H}finally{try{B||J.return==null||J.return()}finally{if(F)throw Z}}}function n(r,l,d,h,m,S,y){var s=l.context.gl,p=l.transform;s.uniform1i(r.uniforms.u_pitch_with_map,S?1:0),s.uniform1f(r.uniforms.u_is_text,h?1:0),s.uniform1f(r.uniforms.u_pitch,p.pitch/360*2*Math.PI);var w=y.functionType==="constant"||y.functionType==="source",A=y.functionType==="constant"||y.functionType==="camera";s.uniform1i(r.uniforms.u_is_size_zoom_constant,w?1:0),s.uniform1i(r.uniforms.u_is_size_feature_constant,A?1:0),s.uniform1f(r.uniforms.u_camera_to_center_distance,p.cameraToCenterDistance);var k=g.evaluateSizeForZoom(y,p.zoom,c.properties[h?"text-size":"icon-size"]);k.uSizeT!==void 0&&s.uniform1f(r.uniforms.u_size_t,k.uSizeT),k.uSize!==void 0&&s.uniform1f(r.uniforms.u_size,k.uSize),s.uniform1f(r.uniforms.u_aspect_ratio,p.width/p.height),s.uniform1i(r.uniforms.u_rotate_symbol,m?1:0)}function t(r,l,d,h,m,S,y,s,p){var w=d.context,A=w.gl,k=d.transform;if(s){var v=h.paint.get(y?"text-halo-width":"icon-halo-width").constantOr(1)!==0,x=p?Math.cos(k._pitch)*k.cameraToCenterDistance:1;A.uniform1f(r.uniforms.u_gamma_scale,x),A.uniform1f(r.uniforms.u_has_halo,v?1:0)}(function(T,E,C,z){z.draw(C,C.gl.TRIANGLES,E.id,T.layoutVertexBuffer,T.indexBuffer,T.segments,T.programConfigurations.get(E.id),T.dynamicLayoutVertexBuffer,T.opacityVertexBuffer)})(S,h,w,r)}O.exports=function(r,l,d,h){if(r.renderPass==="translucent"){var m=r.context;m.setStencilMode(u.disabled),m.setColorMode(r.colorModeForRenderPass()),d.paint.get("icon-opacity").constantOr(1)!==0&&a(r,l,d,h,!1,d.paint.get("icon-translate"),d.paint.get("icon-translate-anchor"),d.layout.get("icon-rotation-alignment"),d.layout.get("icon-pitch-alignment"),d.layout.get("icon-keep-upright")),d.paint.get("text-opacity").constantOr(1)!==0&&a(r,l,d,h,!0,d.paint.get("text-translate"),d.paint.get("text-translate-anchor"),d.layout.get("text-rotation-alignment"),d.layout.get("text-pitch-alignment"),d.layout.get("text-keep-upright")),l.map.showCollisionBoxes&&_(r,l,d,h)}}},function(O,D,o){var _=o(28),e=o(15),b=o(18);function g(f,c,u,i,a){var n=f.context,t=n.gl,r=a?f.useProgram("collisionCircle"):f.useProgram("collisionBox");n.setDepthMode(e.disabled),n.setStencilMode(b.disabled),n.setColorMode(f.colorModeForRenderPass());for(var l=0;l<i.length;l++){var d=i[l],h=c.getTile(d),m=h.getBucket(u);if(m){var S=a?m.collisionCircle:m.collisionBox;if(S){t.uniformMatrix4fv(r.uniforms.u_matrix,!1,d.posMatrix),a||n.lineWidth.set(1),t.uniform1f(r.uniforms.u_camera_to_center_distance,f.transform.cameraToCenterDistance);var y=_(h,1,f.transform.zoom),s=Math.pow(2,f.transform.zoom-h.tileID.overscaledZ);t.uniform1f(r.uniforms.u_pixels_to_tile_units,y),t.uniform2f(r.uniforms.u_extrude_scale,f.transform.pixelsToGLUnits[0]/(y*s),f.transform.pixelsToGLUnits[1]/(y*s)),r.draw(n,a?t.TRIANGLES:t.LINES,u.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,null,S.collisionVertexBuffer,null)}}}}O.exports=function(f,c,u,i){g(f,c,u,i,!1),g(f,c,u,i,!0)}},function(O,D,o){var _=o(28),e=o(18),b=o(15);O.exports=function(g,f,c,u){if(g.renderPass==="translucent"){var i=c.paint.get("circle-opacity"),a=c.paint.get("circle-stroke-width"),n=c.paint.get("circle-stroke-opacity");if(!(i.constantOr(1)===0&&(a.constantOr(1)===0||n.constantOr(1)===0))){var t=g.context,r=t.gl;t.setDepthMode(g.depthModeForSublayer(0,b.ReadOnly)),t.setStencilMode(e.disabled),t.setColorMode(g.colorModeForRenderPass());for(var l=!0,d=0;d<u.length;d++){var h=u[d],m=f.getTile(h),S=m.getBucket(c);if(S){var y=g.context.program.get(),s=S.programConfigurations.get(c.id),p=g.useProgram("circle",s);if((l||p.program!==y)&&(s.setUniforms(t,p,c.paint,{zoom:g.transform.zoom}),l=!1),r.uniform1f(p.uniforms.u_camera_to_center_distance,g.transform.cameraToCenterDistance),r.uniform1i(p.uniforms.u_scale_with_map,c.paint.get("circle-pitch-scale")==="map"?1:0),c.paint.get("circle-pitch-alignment")==="map"){r.uniform1i(p.uniforms.u_pitch_with_map,1);var w=_(m,1,g.transform.zoom);r.uniform2f(p.uniforms.u_extrude_scale,w,w)}else r.uniform1i(p.uniforms.u_pitch_with_map,0),r.uniform2fv(p.uniforms.u_extrude_scale,g.transform.pixelsToGLUnits);r.uniformMatrix4fv(p.uniforms.u_matrix,!1,g.translatePosMatrix(h.posMatrix,m,c.paint.get("circle-translate"),c.paint.get("circle-translate-anchor"))),p.draw(t,r.TRIANGLES,c.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,s)}}}}}},function(O,D,o){var _=o(22).mat4,e=o(20),b=o(28),g=o(12),f=o(15),c=o(18),u=o(68);O.exports=function(i,a,n,t){if(n.paint.get("heatmap-opacity")!==0)if(i.renderPass==="offscreen"){var r=i.context,l=r.gl;r.setDepthMode(i.depthModeForSublayer(0,f.ReadOnly)),r.setStencilMode(c.disabled),function(k,v,x){var T=k.gl;k.activeTexture.set(T.TEXTURE1),k.viewport.set([0,0,v.width/4,v.height/4]);var E=x.heatmapFbo;if(E)T.bindTexture(T.TEXTURE_2D,E.colorAttachment.get()),k.bindFramebuffer.set(E.framebuffer);else{var C=T.createTexture();T.bindTexture(T.TEXTURE_2D,C),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,T.LINEAR),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,T.LINEAR),E=x.heatmapFbo=k.createFramebuffer(v.width/4,v.height/4),function z(P,B,F,Z){var W=P.gl;W.texImage2D(W.TEXTURE_2D,0,W.RGBA,B.width/4,B.height/4,0,W.RGBA,P.extTextureHalfFloat?P.extTextureHalfFloat.HALF_FLOAT_OES:W.UNSIGNED_BYTE,null),Z.colorAttachment.set(F),P.extTextureHalfFloat&&W.checkFramebufferStatus(W.FRAMEBUFFER)!==W.FRAMEBUFFER_COMPLETE&&(P.extTextureHalfFloat=null,Z.colorAttachment.setDirty(),z(P,B,F,Z))}(k,v,C,E)}}(r,i,n),r.clear({color:g.transparent}),r.setColorMode(new u([l.ONE,l.ONE],g.transparent,[!0,!0,!0,!0]));for(var d=!0,h=0;h<t.length;h++){var m=t[h];if(!a.hasRenderableParent(m)){var S=a.getTile(m),y=S.getBucket(n);if(y){var s=i.context.program.get(),p=y.programConfigurations.get(n.id),w=i.useProgram("heatmap",p),A=i.transform.zoom;(d||w.program!==s)&&(p.setUniforms(i.context,w,n.paint,{zoom:A}),d=!1),l.uniform1f(w.uniforms.u_extrude_scale,b(S,1,A)),l.uniform1f(w.uniforms.u_intensity,n.paint.get("heatmap-intensity")),l.uniformMatrix4fv(w.uniforms.u_matrix,!1,m.posMatrix),w.draw(r,l.TRIANGLES,n.id,y.layoutVertexBuffer,y.indexBuffer,y.segments,p)}}}r.viewport.set([0,0,i.width,i.height])}else i.renderPass==="translucent"&&(i.context.setColorMode(i.colorModeForRenderPass()),function(k,v){var x=k.context,T=x.gl,E=v.heatmapFbo;if(!!E){x.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,E.colorAttachment.get()),x.activeTexture.set(T.TEXTURE1);var C=v.colorRampTexture;C||(C=v.colorRampTexture=new e(x,v.colorRamp,T.RGBA)),C.bind(T.LINEAR,T.CLAMP_TO_EDGE),x.setDepthMode(f.disabled);var z=k.useProgram("heatmapTexture"),P=v.paint.get("heatmap-opacity");T.uniform1f(z.uniforms.u_opacity,P),T.uniform1i(z.uniforms.u_image,0),T.uniform1i(z.uniforms.u_color_ramp,1);var B=_.create();_.ortho(B,0,k.width,k.height,0,0,1),T.uniformMatrix4fv(z.uniforms.u_matrix,!1,B),T.uniform2f(z.uniforms.u_world,T.drawingBufferWidth,T.drawingBufferHeight),k.viewportVAO.bind(k.context,z,k.viewportBuffer,[]),T.drawArrays(T.TRIANGLE_STRIP,0,4)}}(i,n))}},function(O,D,o){var _=o(2),e=o(28),b=o(15);function g(f,c,u,i,a,n,t,r,l){var d,h,m,S,y=c.context,s=y.gl,p=a.paint.get("line-dasharray"),w=a.paint.get("line-pattern");if(r||l){var A=1/e(u,1,c.transform.tileZoom(u));if(p){d=c.lineAtlas.getDash(p.from,a.layout.get("line-cap")==="round"),h=c.lineAtlas.getDash(p.to,a.layout.get("line-cap")==="round");var k=d.width*p.fromScale,v=h.width*p.toScale;s.uniform2f(f.uniforms.u_patternscale_a,A/k,-d.height/2),s.uniform2f(f.uniforms.u_patternscale_b,A/v,-h.height/2),s.uniform1f(f.uniforms.u_sdfgamma,c.lineAtlas.width/(256*Math.min(k,v)*_.devicePixelRatio)/2)}else if(w){if(m=c.imageManager.getPattern(w.from),S=c.imageManager.getPattern(w.to),!m||!S)return;s.uniform2f(f.uniforms.u_pattern_size_a,m.displaySize[0]*w.fromScale/A,S.displaySize[1]),s.uniform2f(f.uniforms.u_pattern_size_b,S.displaySize[0]*w.toScale/A,S.displaySize[1]);var x=c.imageManager.getPixelSize(),T=x.width,E=x.height;s.uniform2fv(f.uniforms.u_texsize,[T,E])}s.uniform2f(f.uniforms.u_gl_units_to_pixels,1/c.transform.pixelsToGLUnits[0],1/c.transform.pixelsToGLUnits[1])}r&&(p?(s.uniform1i(f.uniforms.u_image,0),y.activeTexture.set(s.TEXTURE0),c.lineAtlas.bind(y),s.uniform1f(f.uniforms.u_tex_y_a,d.y),s.uniform1f(f.uniforms.u_tex_y_b,h.y),s.uniform1f(f.uniforms.u_mix,p.t)):w&&(s.uniform1i(f.uniforms.u_image,0),y.activeTexture.set(s.TEXTURE0),c.imageManager.bind(y),s.uniform2fv(f.uniforms.u_pattern_tl_a,m.tl),s.uniform2fv(f.uniforms.u_pattern_br_a,m.br),s.uniform2fv(f.uniforms.u_pattern_tl_b,S.tl),s.uniform2fv(f.uniforms.u_pattern_br_b,S.br),s.uniform1f(f.uniforms.u_fade,w.t))),y.setStencilMode(c.stencilModeForClipping(n));var C=c.translatePosMatrix(n.posMatrix,u,a.paint.get("line-translate"),a.paint.get("line-translate-anchor"));s.uniformMatrix4fv(f.uniforms.u_matrix,!1,C),s.uniform1f(f.uniforms.u_ratio,1/e(u,1,c.transform.zoom)),f.draw(y,s.TRIANGLES,a.id,i.layoutVertexBuffer,i.indexBuffer,i.segments,t)}O.exports=function(f,c,u,i){if(f.renderPass==="translucent"&&u.paint.get("line-opacity").constantOr(1)!==0){var a=f.context;a.setDepthMode(f.depthModeForSublayer(0,b.ReadOnly)),a.setColorMode(f.colorModeForRenderPass());var n,t=u.paint.get("line-dasharray")?"lineSDF":u.paint.get("line-pattern")?"linePattern":"line",r=!0,l=!0,d=!1,h=void 0;try{for(var m,S=i[Symbol.iterator]();!(l=(m=S.next()).done);l=!0){var y=m.value,s=c.getTile(y),p=s.getBucket(u);if(p){var w=p.programConfigurations.get(u.id),A=f.context.program.get(),k=f.useProgram(t,w),v=r||k.program!==A,x=n!==s.tileID.overscaledZ;v&&w.setUniforms(f.context,k,u.paint,{zoom:f.transform.zoom}),g(k,f,s,p,u,y,w,v,x),n=s.tileID.overscaledZ,r=!1}}}catch(T){d=!0,h=T}finally{try{l||S.return==null||S.return()}finally{if(d)throw h}}}}},function(O,D,o){var _=o(70),e=o(12),b=o(15);function g(i,a,n,t,r){if(!_.isPatternMissing(n.paint.get("fill-pattern"),i)){var l=!0,d=!0,h=!1,m=void 0;try{for(var S,y=t[Symbol.iterator]();!(d=(S=y.next()).done);d=!0){var s=S.value,p=a.getTile(s),w=p.getBucket(n);w&&(i.context.setStencilMode(i.stencilModeForClipping(s)),r(i,a,n,p,s,w,l),l=!1)}}catch(A){h=!0,m=A}finally{try{d||y.return==null||y.return()}finally{if(h)throw m}}}}function f(i,a,n,t,r,l,d){var h=i.context.gl,m=l.programConfigurations.get(n.id);u("fill",n.paint.get("fill-pattern"),i,m,n,t,r,d).draw(i.context,h.TRIANGLES,n.id,l.layoutVertexBuffer,l.indexBuffer,l.segments,m)}function c(i,a,n,t,r,l,d){var h=i.context.gl,m=l.programConfigurations.get(n.id),S=u("fillOutline",n.getPaintProperty("fill-outline-color")?null:n.paint.get("fill-pattern"),i,m,n,t,r,d);h.uniform2f(S.uniforms.u_world,h.drawingBufferWidth,h.drawingBufferHeight),S.draw(i.context,h.LINES,n.id,l.layoutVertexBuffer,l.indexBuffer2,l.segments2,m)}function u(i,a,n,t,r,l,d,h){var m,S=n.context.program.get();return a?(m=n.useProgram("".concat(i,"Pattern"),t),(h||m.program!==S)&&(t.setUniforms(n.context,m,r.paint,{zoom:n.transform.zoom}),_.prepare(a,n,m)),_.setTile(l,n,m)):(m=n.useProgram(i,t),(h||m.program!==S)&&t.setUniforms(n.context,m,r.paint,{zoom:n.transform.zoom})),n.context.gl.uniformMatrix4fv(m.uniforms.u_matrix,!1,n.translatePosMatrix(d.posMatrix,l,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"))),m}O.exports=function(i,a,n,t){var r=n.paint.get("fill-color"),l=n.paint.get("fill-opacity");if(l.constantOr(1)!==0){var d=i.context;d.setColorMode(i.colorModeForRenderPass());var h=n.paint.get("fill-pattern")||r.constantOr(e.transparent).a!==1||l.constantOr(0)!==1?"translucent":"opaque";i.renderPass===h&&(d.setDepthMode(i.depthModeForSublayer(1,i.renderPass==="opaque"?b.ReadWrite:b.ReadOnly)),g(i,a,n,t,f)),i.renderPass==="translucent"&&n.paint.get("fill-antialias")&&(d.lineWidth.set(2),d.setDepthMode(i.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,b.ReadOnly)),g(i,a,n,t,c))}}},function(O,D,o){var _=o(22),e=o(70),b=o(20),g=o(12),f=o(15),c=_.mat3,u=_.mat4,i=_.vec3,a=o(18);function n(t,r,l,d,h,m,S){var y=t.context,s=y.gl,p=l.paint.get("fill-extrusion-pattern"),w=t.context.program.get(),A=m.programConfigurations.get(l.id),k=t.useProgram(p?"fillExtrusionPattern":"fillExtrusion",A);if((S||k.program!==w)&&A.setUniforms(y,k,l.paint,{zoom:t.transform.zoom}),p){if(e.isPatternMissing(p,t))return;e.prepare(p,t,k),e.setTile(d,t,k),s.uniform1f(k.uniforms.u_height_factor,-Math.pow(2,h.overscaledZ)/d.tileSize/8)}t.context.gl.uniformMatrix4fv(k.uniforms.u_matrix,!1,t.translatePosMatrix(h.posMatrix,d,l.paint.get("fill-extrusion-translate"),l.paint.get("fill-extrusion-translate-anchor"))),function(v,x){var T=x.context.gl,E=x.style.light,C=E.properties.get("position"),z=[C.x,C.y,C.z],P=c.create();E.properties.get("anchor")==="viewport"&&c.fromRotation(P,-x.transform.angle),i.transformMat3(z,z,P);var B=E.properties.get("color");T.uniform3fv(v.uniforms.u_lightpos,z),T.uniform1f(v.uniforms.u_lightintensity,E.properties.get("intensity")),T.uniform3f(v.uniforms.u_lightcolor,B.r,B.g,B.b)}(k,t),k.draw(y,s.TRIANGLES,l.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,A)}O.exports=function(t,r,l,d){if(l.paint.get("fill-extrusion-opacity")!==0)if(t.renderPass==="offscreen"){(function(v,x){var T=v.context,E=T.gl,C=x.viewportFrame;if(v.depthRboNeedsClear&&v.setupOffscreenDepthRenderbuffer(),!C){var z=new b(T,{width:v.width,height:v.height,data:null},E.RGBA);z.bind(E.LINEAR,E.CLAMP_TO_EDGE),(C=x.viewportFrame=T.createFramebuffer(v.width,v.height)).colorAttachment.set(z.texture)}T.bindFramebuffer.set(C.framebuffer),C.depthAttachment.set(v.depthRbo),v.depthRboNeedsClear&&(T.clear({depth:1}),v.depthRboNeedsClear=!1),T.clear({color:g.transparent}),T.setStencilMode(a.disabled),T.setDepthMode(new f(E.LEQUAL,f.ReadWrite,[0,1])),T.setColorMode(v.colorModeForRenderPass())})(t,l);var h=!0,m=!0,S=!1,y=void 0;try{for(var s,p=d[Symbol.iterator]();!(m=(s=p.next()).done);m=!0){var w=s.value,A=r.getTile(w),k=A.getBucket(l);k&&(n(t,r,l,A,w,k,h),h=!1)}}catch(v){S=!0,y=v}finally{try{m||p.return==null||p.return()}finally{if(S)throw y}}}else t.renderPass==="translucent"&&function(v,x){var T=x.viewportFrame;if(!!T){var E=v.context,C=E.gl,z=v.useProgram("extrusionTexture");E.setStencilMode(a.disabled),E.setDepthMode(f.disabled),E.setColorMode(v.colorModeForRenderPass()),E.activeTexture.set(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,T.colorAttachment.get()),C.uniform1f(z.uniforms.u_opacity,x.paint.get("fill-extrusion-opacity")),C.uniform1i(z.uniforms.u_image,0);var P=u.create();u.ortho(P,0,v.width,v.height,0,0,1),C.uniformMatrix4fv(z.uniforms.u_matrix,!1,P),C.uniform2f(z.uniforms.u_world,C.drawingBufferWidth,C.drawingBufferHeight),v.viewportVAO.bind(E,z,v.viewportBuffer,[]),C.drawArrays(C.TRIANGLE_STRIP,0,4)}}(t,l)}},function(O,D,o){var _=o(35),e=o(20),b=o(6),g=o(22).mat4,f=o(18),c=o(15);function u(a,n,t){var r=a.context,l=r.gl,d=n.fbo;if(d){var h=a.useProgram("hillshade"),m=a.transform.calculatePosMatrix(n.tileID.toUnwrapped());(function(A,k,v){var x=v.paint.get("hillshade-illumination-direction")*(Math.PI/180);v.paint.get("hillshade-illumination-anchor")==="viewport"&&(x-=k.transform.angle),k.context.gl.uniform2f(A.uniforms.u_light,v.paint.get("hillshade-exaggeration"),x)})(h,a,t);var S=function(A,k){var v=k.toCoordinate(),x=new _(v.column,v.row+1,v.zoom);return[A.transform.coordinateLocation(v).lat,A.transform.coordinateLocation(x).lat]}(a,n.tileID);r.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,d.colorAttachment.get()),l.uniformMatrix4fv(h.uniforms.u_matrix,!1,m),l.uniform2fv(h.uniforms.u_latrange,S),l.uniform1i(h.uniforms.u_image,0);var y=t.paint.get("hillshade-shadow-color");l.uniform4f(h.uniforms.u_shadow,y.r,y.g,y.b,y.a);var s=t.paint.get("hillshade-highlight-color");l.uniform4f(h.uniforms.u_highlight,s.r,s.g,s.b,s.a);var p=t.paint.get("hillshade-accent-color");if(l.uniform4f(h.uniforms.u_accent,p.r,p.g,p.b,p.a),n.maskedBoundsBuffer&&n.maskedIndexBuffer&&n.segments)h.draw(r,l.TRIANGLES,t.id,n.maskedBoundsBuffer,n.maskedIndexBuffer,n.segments);else{var w=a.rasterBoundsBuffer;a.rasterBoundsVAO.bind(r,h,w,[]),l.drawArrays(l.TRIANGLE_STRIP,0,w.length)}}}function i(a,n){var t=a.context,r=t.gl;if(n.dem&&n.dem.level){var l=n.dem.level.dim,d=n.dem.getPixels();if(t.activeTexture.set(r.TEXTURE1),t.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||a.getTileTexture(n.tileSize),n.demTexture){var h=n.demTexture;h.update(d,!1),h.bind(r.NEAREST,r.CLAMP_TO_EDGE)}else n.demTexture=new e(t,d,r.RGBA,!1),n.demTexture.bind(r.NEAREST,r.CLAMP_TO_EDGE);t.activeTexture.set(r.TEXTURE0);var m=n.fbo;if(!m){var S=new e(t,{width:l,height:l,data:null},r.RGBA);S.bind(r.LINEAR,r.CLAMP_TO_EDGE),(m=n.fbo=t.createFramebuffer(l,l)).colorAttachment.set(S.texture)}t.bindFramebuffer.set(m.framebuffer),t.viewport.set([0,0,l,l]);var y=g.create();g.ortho(y,0,b,-b,0,0,1),g.translate(y,y,[0,-b,0]);var s=a.useProgram("hillshadePrepare");r.uniformMatrix4fv(s.uniforms.u_matrix,!1,y),r.uniform1f(s.uniforms.u_zoom,n.tileID.overscaledZ),r.uniform2fv(s.uniforms.u_dimension,[2*l,2*l]),r.uniform1i(s.uniforms.u_image,1);var p=a.rasterBoundsBuffer;a.rasterBoundsVAO.bind(t,s,p,[]),r.drawArrays(r.TRIANGLE_STRIP,0,p.length),n.needsHillshadePrepare=!1}}O.exports=function(a,n,t,r){if(!(a.renderPass!=="offscreen"&&a.renderPass!=="translucent")){var l=a.context;l.setDepthMode(a.depthModeForSublayer(0,c.ReadOnly)),l.setStencilMode(f.disabled),l.setColorMode(a.colorModeForRenderPass());var d=!0,h=!1,m=void 0;try{for(var S,y=r[Symbol.iterator]();!(d=(S=y.next()).done);d=!0){var s=S.value,p=n.getTile(s);p.needsHillshadePrepare&&a.renderPass==="offscreen"?i(a,p):a.renderPass==="translucent"&&u(a,p,t)}}catch(w){h=!0,m=w}finally{try{d||y.return==null||y.return()}finally{if(h)throw m}}l.viewport.set([0,0,a.width,a.height])}}},function(O,D,o){var _=o(0),e=o(52),b=o(2),g=o(18),f=o(15);function c(u,i,a,n,t){var r=n.paint.get("raster-fade-duration");if(r>0){var l=b.now(),d=(l-u.timeAdded)/r,h=i?(l-i.timeAdded)/r:-1,m=a.getSource(),S=t.coveringZoomLevel({tileSize:m.tileSize,roundZoom:m.roundZoom}),y=!i||Math.abs(i.tileID.overscaledZ-S)>Math.abs(u.tileID.overscaledZ-S),s=y&&u.refreshedUponExpiration?1:_.clamp(y?d:1-h,0,1);return u.refreshedUponExpiration&&d>=1&&(u.refreshedUponExpiration=!1),i?{opacity:1,mix:1-s}:{opacity:s,mix:0}}return{opacity:1,mix:0}}O.exports=function(u,i,a,n){if(u.renderPass==="translucent"&&a.paint.get("raster-opacity")!==0){var t=u.context,r=t.gl,l=i.getSource(),d=u.useProgram("raster");t.setStencilMode(g.disabled),t.setColorMode(u.colorModeForRenderPass()),r.uniform1f(d.uniforms.u_brightness_low,a.paint.get("raster-brightness-min")),r.uniform1f(d.uniforms.u_brightness_high,a.paint.get("raster-brightness-max")),r.uniform1f(d.uniforms.u_saturation_factor,(m=a.paint.get("raster-saturation"),m>0?1-1/(1.001-m):-m)),r.uniform1f(d.uniforms.u_contrast_factor,(h=a.paint.get("raster-contrast"),h>0?1/(1-h):1+h)),r.uniform3fv(d.uniforms.u_spin_weights,function(W){W*=Math.PI/180;var J=Math.sin(W),X=Math.cos(W);return[(2*X+1)/3,(-Math.sqrt(3)*J-X+1)/3,(Math.sqrt(3)*J-X+1)/3]}(a.paint.get("raster-hue-rotate"))),r.uniform1f(d.uniforms.u_buffer_scale,1),r.uniform1i(d.uniforms.u_image0,0),r.uniform1i(d.uniforms.u_image1,1);var h,m,S=n.length&&n[0].overscaledZ,y=!0,s=!1,p=void 0;try{for(var w,A=n[Symbol.iterator]();!(y=(w=A.next()).done);y=!0){var k=w.value;t.setDepthMode(u.depthModeForSublayer(k.overscaledZ-S,a.paint.get("raster-opacity")===1?f.ReadWrite:f.ReadOnly,r.LESS));var v=i.getTile(k),x=u.transform.calculatePosMatrix(k.toUnwrapped());v.registerFadeDuration(a.paint.get("raster-fade-duration")),r.uniformMatrix4fv(d.uniforms.u_matrix,!1,x);var T=i.findLoadedParent(k,0,{}),E=c(v,T,i,a,u.transform),C=void 0,z=void 0;if(t.activeTexture.set(r.TEXTURE0),v.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_NEAREST),t.activeTexture.set(r.TEXTURE1),T?(T.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_NEAREST),C=Math.pow(2,T.tileID.overscaledZ-v.tileID.overscaledZ),z=[v.tileID.canonical.x*C%1,v.tileID.canonical.y*C%1]):v.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_NEAREST),r.uniform2fv(d.uniforms.u_tl_parent,z||[0,0]),r.uniform1f(d.uniforms.u_scale_parent,C||1),r.uniform1f(d.uniforms.u_fade_t,E.mix),r.uniform1f(d.uniforms.u_opacity,E.opacity*a.paint.get("raster-opacity")),l instanceof e){var P=l.boundsBuffer,B=l.boundsVAO;B.bind(t,d,P,[]),r.drawArrays(r.TRIANGLE_STRIP,0,P.length)}else if(v.maskedBoundsBuffer&&v.maskedIndexBuffer&&v.segments)d.draw(t,r.TRIANGLES,a.id,v.maskedBoundsBuffer,v.maskedIndexBuffer,v.segments);else{var F=u.rasterBoundsBuffer,Z=u.rasterBoundsVAO;Z.bind(t,d,F,[]),r.drawArrays(r.TRIANGLE_STRIP,0,F.length)}}}catch(W){s=!0,p=W}finally{try{y||A.return==null||A.return()}finally{if(s)throw p}}}}},function(O,D,o){var _=o(70),e=o(18),b=o(15);O.exports=function(g,f,c){var u=c.paint.get("background-color"),i=c.paint.get("background-opacity");if(i!==0){var a,n=g.context,t=n.gl,r=g.transform,l=r.tileSize,d=c.paint.get("background-pattern"),h=d||u.a!==1||i!==1?"translucent":"opaque";if(g.renderPass===h){if(n.setStencilMode(e.disabled),n.setDepthMode(g.depthModeForSublayer(0,h==="opaque"?b.ReadWrite:b.ReadOnly)),n.setColorMode(g.colorModeForRenderPass()),d){if(_.isPatternMissing(d,g))return;a=g.useProgram("backgroundPattern"),_.prepare(d,g,a),g.tileExtentPatternVAO.bind(n,a,g.tileExtentBuffer,[])}else a=g.useProgram("background"),t.uniform4fv(a.uniforms.u_color,[u.r,u.g,u.b,u.a]),g.tileExtentVAO.bind(n,a,g.tileExtentBuffer,[]);t.uniform1f(a.uniforms.u_opacity,i);var m=r.coveringTiles({tileSize:l}),S=!0,y=!1,s=void 0;try{for(var p,w=m[Symbol.iterator]();!(S=(p=w.next()).done);S=!0){var A=p.value;d&&_.setTile({tileID:A,tileSize:l},g,a),t.uniformMatrix4fv(a.uniforms.u_matrix,!1,g.transform.calculatePosMatrix(A.toUnwrapped())),t.drawArrays(t.TRIANGLE_STRIP,0,g.tileExtentBuffer.length)}}catch(k){y=!0,s=k}finally{try{S||w.return==null||w.return()}finally{if(y)throw s}}}}}},function(O,D,o){var _=o(2),e=o(22).mat4,b=o(6),g=o(40),f=o(14).PosArray,c=o(125),u=o(15),i=o(18);function a(t,r,l){var d=t.context,h=d.gl;d.lineWidth.set(1*_.devicePixelRatio);var m=l.posMatrix,S=t.useProgram("debug");d.setDepthMode(u.disabled),d.setStencilMode(i.disabled),d.setColorMode(t.colorModeForRenderPass()),h.uniformMatrix4fv(S.uniforms.u_matrix,!1,m),h.uniform4f(S.uniforms.u_color,1,0,0,1),t.debugVAO.bind(d,S,t.debugBuffer,[]),h.drawArrays(h.LINE_STRIP,0,t.debugBuffer.length);for(var y=function(E,C,z,P){P=P||1;var B,F,Z,W,J,X,R,U,K=[];for(B=0,F=E.length;B<F;B++)if(J=n[E[B]]){for(U=null,Z=0,W=J[1].length;Z<W;Z+=2)J[1][Z]===-1&&J[1][Z+1]===-1?U=null:(X=C+J[1][Z]*P,R=z-J[1][Z+1]*P,U&&K.push(U.x,U.y,X,R),U={x:X,y:R});C+=J[0]*P}return K}(l.toString(),50,200,5),s=new f,p=0;p<y.length;p+=2)s.emplaceBack(y[p],y[p+1]);var w=d.createVertexBuffer(s,c.members);new g().bind(d,S,w,[]),h.uniform4f(S.uniforms.u_color,1,1,1,1);for(var A=r.getTile(l).tileSize,k=b/(Math.pow(2,t.transform.zoom-l.overscaledZ)*A),v=[[-1,-1],[-1,1],[1,-1],[1,1]],x=0;x<v.length;x++){var T=v[x];h.uniformMatrix4fv(S.uniforms.u_matrix,!1,e.translate([],m,[k*T[0],k*T[1],0])),h.drawArrays(h.LINES,0,w.length)}h.uniform4f(S.uniforms.u_color,0,0,0,1),h.uniformMatrix4fv(S.uniforms.u_matrix,!1,m),h.drawArrays(h.LINES,0,w.length)}O.exports=function(t,r,l){for(var d=0;d<l.length;d++)a(t,r,l[d])};var n={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]}},function(O,D,o){function _(m,S){for(var y=0;y<S.length;y++){var s=S[y];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(m,s.key,s)}}var e=o(21),b=o(3),g=o(35),f=o(0),c=o(26).number,u=o(282),i=o(27),a=(i.CanonicalTileID,i.UnwrappedTileID),n=o(6),t=o(22),r=t.vec4,l=t.mat4,d=t.mat2,h=function(){function m(p,w,A){(function(k,v){if(!(k instanceof v))throw new TypeError("Cannot call a class as a function")})(this,m),this.tileSize=512,this._renderWorldCopies=A===void 0||A,this._minZoom=p||0,this._maxZoom=w||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new e(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={}}var S,y,s;return S=m,(y=[{key:"clone",value:function(){var p=new m(this._minZoom,this._maxZoom,this._renderWorldCopies);return p.tileSize=this.tileSize,p.latRange=this.latRange,p.width=this.width,p.height=this.height,p._center=this._center,p.zoom=this.zoom,p.angle=this.angle,p._fov=this._fov,p._pitch=this._pitch,p._unmodified=this._unmodified,p._calcMatrices(),p}},{key:"coveringZoomLevel",value:function(p){return(p.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/p.tileSize))}},{key:"getVisibleUnwrappedCoordinates",value:function(p){var w=this.pointCoordinate(new b(0,0),0),A=this.pointCoordinate(new b(this.width,0),0),k=Math.floor(w.column),v=Math.floor(A.column),x=[new a(0,p)];if(this._renderWorldCopies)for(var T=k;T<=v;T++)T!==0&&x.push(new a(T,p));return x}},{key:"coveringTiles",value:function(p){var w=this.coveringZoomLevel(p),A=w;if(p.minzoom!==void 0&&w<p.minzoom)return[];p.maxzoom!==void 0&&w>p.maxzoom&&(w=p.maxzoom);var k=this.pointCoordinate(this.centerPoint,w),v=new b(k.column-.5,k.row-.5),x=[this.pointCoordinate(new b(0,0),w),this.pointCoordinate(new b(this.width,0),w),this.pointCoordinate(new b(this.width,this.height),w),this.pointCoordinate(new b(0,this.height),w)];return u(w,x,p.reparseOverscaled?A:w,this._renderWorldCopies).sort(function(T,E){return v.dist(T.canonical)-v.dist(E.canonical)})}},{key:"resize",value:function(p,w){this.width=p,this.height=w,this.pixelsToGLUnits=[2/p,-2/w],this._constrain(),this._calcMatrices()}},{key:"zoomScale",value:function(p){return Math.pow(2,p)}},{key:"scaleZoom",value:function(p){return Math.log(p)/Math.LN2}},{key:"project",value:function(p){return new b(this.lngX(p.lng),this.latY(p.lat))}},{key:"unproject",value:function(p){return new e(this.xLng(p.x),this.yLat(p.y))}},{key:"lngX",value:function(p){return(180+p)*this.worldSize/360}},{key:"latY",value:function(p){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+p*Math.PI/360)))*this.worldSize/360}},{key:"xLng",value:function(p){return 360*p/this.worldSize-180}},{key:"yLat",value:function(p){var w=180-360*p/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(w*Math.PI/180))-90}},{key:"setLocationAtPoint",value:function(p,w){var A=this.pointCoordinate(w)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(p)._sub(A)),this._renderWorldCopies&&(this.center=this.center.wrap())}},{key:"locationPoint",value:function(p){return this.coordinatePoint(this.locationCoordinate(p))}},{key:"pointLocation",value:function(p){return this.coordinateLocation(this.pointCoordinate(p))}},{key:"locationCoordinate",value:function(p){return new g(this.lngX(p.lng)/this.tileSize,this.latY(p.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)}},{key:"coordinateLocation",value:function(p){var w=p.zoomTo(this.zoom);return new e(this.xLng(w.column*this.tileSize),this.yLat(w.row*this.tileSize))}},{key:"pointCoordinate",value:function(p,w){w===void 0&&(w=this.tileZoom);var A=[p.x,p.y,0,1],k=[p.x,p.y,1,1];r.transformMat4(A,A,this.pixelMatrixInverse),r.transformMat4(k,k,this.pixelMatrixInverse);var v=A[3],x=k[3],T=A[1]/v,E=k[1]/x,C=A[2]/v,z=k[2]/x,P=C===z?0:(0-C)/(z-C);return new g(c(A[0]/v,k[0]/x,P)/this.tileSize,c(T,E,P)/this.tileSize,this.zoom)._zoomTo(w)}},{key:"coordinatePoint",value:function(p){var w=p.zoomTo(this.zoom),A=[w.column*this.tileSize,w.row*this.tileSize,0,1];return r.transformMat4(A,A,this.pixelMatrix),new b(A[0]/A[3],A[1]/A[3])}},{key:"calculatePosMatrix",value:function(p){var w=p.key;if(this._posMatrixCache[w])return this._posMatrixCache[w];var A=p.canonical,k=this.worldSize/this.zoomScale(A.z),v=A.x+Math.pow(2,A.z)*p.wrap,x=l.identity(new Float64Array(16));return l.translate(x,x,[v*k,A.y*k,0]),l.scale(x,x,[k/n,k/n,1]),l.multiply(x,this.projMatrix,x),this._posMatrixCache[w]=new Float32Array(x),this._posMatrixCache[w]}},{key:"_constrain",value:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var p,w,A,k,v=-90,x=90,T=-180,E=180,C=this.size,z=this._unmodified;if(this.latRange){var P=this.latRange;v=this.latY(P[1]),p=(x=this.latY(P[0]))-v<C.y?C.y/(x-v):0}if(this.lngRange){var B=this.lngRange;T=this.lngX(B[0]),w=(E=this.lngX(B[1]))-T<C.x?C.x/(E-T):0}var F=Math.max(w||0,p||0);if(F)return this.center=this.unproject(new b(w?(E+T)/2:this.x,p?(x+v)/2:this.y)),this.zoom+=this.scaleZoom(F),this._unmodified=z,void(this._constraining=!1);if(this.latRange){var Z=this.y,W=C.y/2;Z-W<v&&(k=v+W),Z+W>x&&(k=x-W)}if(this.lngRange){var J=this.x,X=C.x/2;J-X<T&&(A=T+X),J+X>E&&(A=E-X)}A===void 0&&k===void 0||(this.center=this.unproject(new b(A!==void 0?A:this.x,k!==void 0?k:this.y))),this._unmodified=z,this._constraining=!1}}},{key:"_calcMatrices",value:function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var p=this._fov/2,w=Math.PI/2+this._pitch,A=Math.sin(p)*this.cameraToCenterDistance/Math.sin(Math.PI-w-p),k=1.01*(Math.cos(Math.PI/2-this._pitch)*A+this.cameraToCenterDistance),v=new Float64Array(16);l.perspective(v,this._fov,this.width/this.height,1,k),l.scale(v,v,[1,-1,1]),l.translate(v,v,[0,0,-this.cameraToCenterDistance]),l.rotateX(v,v,this._pitch),l.rotateZ(v,v,this.angle),l.translate(v,v,[-this.x,-this.y,0]);var x=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(l.scale(v,v,[1,1,x,1]),this.projMatrix=v,v=l.create(),l.scale(v,v,[this.width/2,-this.height/2,1]),l.translate(v,v,[1,-1,0]),this.pixelMatrix=l.multiply(new Float64Array(16),v,this.projMatrix),!(v=l.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=v,this._posMatrixCache={}}}},{key:"minZoom",get:function(){return this._minZoom},set:function(p){this._minZoom!==p&&(this._minZoom=p,this.zoom=Math.max(this.zoom,p))}},{key:"maxZoom",get:function(){return this._maxZoom},set:function(p){this._maxZoom!==p&&(this._maxZoom=p,this.zoom=Math.min(this.zoom,p))}},{key:"renderWorldCopies",get:function(){return this._renderWorldCopies}},{key:"worldSize",get:function(){return this.tileSize*this.scale}},{key:"centerPoint",get:function(){return this.size._div(2)}},{key:"size",get:function(){return new b(this.width,this.height)}},{key:"bearing",get:function(){return-this.angle/Math.PI*180},set:function(p){var w=-f.wrap(p,-180,180)*Math.PI/180;this.angle!==w&&(this._unmodified=!1,this.angle=w,this._calcMatrices(),this.rotationMatrix=d.create(),d.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}},{key:"pitch",get:function(){return this._pitch/Math.PI*180},set:function(p){var w=f.clamp(p,0,60)/180*Math.PI;this._pitch!==w&&(this._unmodified=!1,this._pitch=w,this._calcMatrices())}},{key:"fov",get:function(){return this._fov/Math.PI*180},set:function(p){p=Math.max(.01,Math.min(60,p)),this._fov!==p&&(this._unmodified=!1,this._fov=p/180*Math.PI,this._calcMatrices())}},{key:"zoom",get:function(){return this._zoom},set:function(p){var w=Math.min(Math.max(p,this.minZoom),this.maxZoom);this._zoom!==w&&(this._unmodified=!1,this._zoom=w,this.scale=this.zoomScale(w),this.tileZoom=Math.floor(w),this.zoomFraction=w-this.tileZoom,this._constrain(),this._calcMatrices())}},{key:"center",get:function(){return this._center},set:function(p){p.lat===this._center.lat&&p.lng===this._center.lng||(this._unmodified=!1,this._center=p,this._constrain(),this._calcMatrices())}},{key:"unmodified",get:function(){return this._unmodified}},{key:"x",get:function(){return this.lngX(this.center.lng)}},{key:"y",get:function(){return this.latY(this.center.lat)}},{key:"point",get:function(){return new b(this.x,this.y)}}])&&_(S.prototype,y),s&&_(S,s),m}();O.exports=h},function(O,D,o){o(35);var _=o(27).OverscaledTileID;function e(f,c){if(f.row>c.row){var u=f;f=c,c=u}return{x0:f.column,y0:f.row,x1:c.column,y1:c.row,dx:c.column-f.column,dy:c.row-f.row}}function b(f,c,u,i,a){var n=Math.max(u,Math.floor(c.y0)),t=Math.min(i,Math.ceil(c.y1));if(f.x0===c.x0&&f.y0===c.y0?f.x0+c.dy/f.dy*f.dx<c.x1:f.x1-c.dy/f.dy*f.dx<c.x0){var r=f;f=c,c=r}for(var l=f.dx/f.dy,d=c.dx/c.dy,h=f.dx>0,m=c.dx<0,S=n;S<t;S++){var y=l*Math.max(0,Math.min(f.dy,S+h-f.y0))+f.x0,s=d*Math.max(0,Math.min(c.dy,S+m-c.y0))+c.x0;a(Math.floor(s),Math.ceil(y),S)}}function g(f,c,u,i,a,n){var t,r=e(f,c),l=e(c,u),d=e(u,f);r.dy>l.dy&&(t=r,r=l,l=t),r.dy>d.dy&&(t=r,r=d,d=t),l.dy>d.dy&&(t=l,l=d,d=t),r.dy&&b(d,r,i,a,n),l.dy&&b(d,l,i,a,n)}O.exports=function(f,c,u,i){i===void 0&&(i=!0);var a=1<<f,n={};function t(r,l,d){var h,m,S,y;if(d>=0&&d<=a)for(h=r;h<l;h++)m=Math.floor(h/a),S=(h%a+a)%a,m!==0&&i!==!0||(y=new _(u,m,f,S,d),n[y.key]=y)}return g(c[0],c[1],c[2],0,a,t),g(c[2],c[3],c[0],0,a,t),Object.keys(n).map(function(r){return n[r]})}},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(0),b=o(5),g=o(284),f=function(){function c(){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,c),e.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=g(this._updateHashUnthrottled.bind(this),300)}var u,i,a;return u=c,(i=[{key:"addTo",value:function(n){return this._map=n,b.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}},{key:"remove",value:function(){return b.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this}},{key:"getHashString",value:function(n){var t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,l=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,l),h=Math.round(t.lng*d)/d,m=Math.round(t.lat*d)/d,S=this._map.getBearing(),y=this._map.getPitch(),s="";return s+=n?"#/".concat(h,"/").concat(m,"/").concat(r):"#".concat(r,"/").concat(m,"/").concat(h),(S||y)&&(s+="/".concat(Math.round(10*S)/10)),y&&(s+="/".concat(Math.round(y))),s}},{key:"_onHashChange",value:function(){var n=b.location.hash.replace("#","").split("/");return n.length>=3&&(this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:+(n[3]||0),pitch:+(n[4]||0)}),!0)}},{key:"_updateHashUnthrottled",value:function(){var n=this.getHashString();b.history.replaceState("","",n)}}])&&_(u.prototype,i),a&&_(u,a),c}();O.exports=f},function(O,D){O.exports=function(o,_){var e=!1,b=0;return function(){return e=!0,b||function g(){b=0,e&&(o(),b=setTimeout(g,_),e=!1)}(),b}}},function(O,D,o){var _=o(9),e=o(3),b={scrollZoom:o(286),boxZoom:o(287),dragRotate:o(127),dragPan:o(288),keyboard:o(289),doubleClickZoom:o(290),touchZoomRotate:o(291)};O.exports=function(g,f){var c=g.getCanvasContainer(),u=null,i=!1,a=null,n=null;for(var t in b)g[t]=new b[t](g,f),f.interactive&&f[t]&&g[t].enable(f[t]);function r(){n=null}function l(h,m){var S=_.mousePos(c,m);return g.fire(h,{lngLat:g.unproject(S),point:S,originalEvent:m})}function d(h,m){var S=_.touchPos(c,m),y=S.reduce(function(s,p,w,A){return s.add(p.div(A.length))},new e(0,0));return g.fire(h,{lngLat:g.unproject(y),point:y,lngLats:S.map(function(s){return g.unproject(s)},this),points:S,originalEvent:m})}c.addEventListener("mouseout",function(h){l("mouseout",h)},!1),c.addEventListener("mousedown",function(h){g.doubleClickZoom.isActive()||g.stop(),a=_.mousePos(c,h),l("mousedown",h),i=!0},!1),c.addEventListener("mouseup",function(h){var m=g.dragRotate&&g.dragRotate.isActive();u&&!m&&l("contextmenu",u),u=null,i=!1,l("mouseup",h)},!1),c.addEventListener("mousemove",function(h){if(!(g.dragPan&&g.dragPan.isActive())&&!(g.dragRotate&&g.dragRotate.isActive())){for(var m=h.toElement||h.target;m&&m!==c;)m=m.parentNode;m===c&&l("mousemove",h)}},!1),c.addEventListener("touchstart",function(h){g.stop(),d("touchstart",h),!(!h.touches||h.touches.length>1)&&(n?(clearTimeout(n),n=null,l("dblclick",h)):n=setTimeout(r,300))},!1),c.addEventListener("touchend",function(h){d("touchend",h)},!1),c.addEventListener("touchmove",function(h){d("touchmove",h)},!1),c.addEventListener("touchcancel",function(h){d("touchcancel",h)},!1),c.addEventListener("click",function(h){_.mousePos(c,h).equals(a)&&l("click",h)},!1),c.addEventListener("dblclick",function(h){l("dblclick",h),h.preventDefault()},!1),c.addEventListener("contextmenu",function(h){var m=g.dragRotate&&g.dragRotate.isActive();i||m?i&&(u=h):l("contextmenu",h),h.preventDefault()},!1)}},function(O,D,o){function _(n,t){for(var r=0;r<t.length;r++){var l=t[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}var e=o(9),b=o(0),g=o(2),f=o(5),c=f.navigator.userAgent.toLowerCase(),u=c.indexOf("firefox")!==-1,i=c.indexOf("safari")!==-1&&c.indexOf("chrom")===-1,a=function(){function n(d){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,n),this._map=d,this._el=d.getCanvasContainer(),b.bindAll(["_onWheel","_onTimeout"],this)}var t,r,l;return t=n,(r=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"enable",value:function(d){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0,this._aroundCenter=d&&d.around==="center")}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)}},{key:"_onWheel",value:function(d){var h=0;d.type==="wheel"?(h=d.deltaY,u&&d.deltaMode===f.WheelEvent.DOM_DELTA_PIXEL&&(h/=g.devicePixelRatio),d.deltaMode===f.WheelEvent.DOM_DELTA_LINE&&(h*=40)):d.type==="mousewheel"&&(h=-d.wheelDeltaY,i&&(h/=3));var m=g.now(),S=m-(this._time||0);this._pos=e.mousePos(this._el,d),this._time=m,h!==0&&h%4.000244140625==0?this._type="wheel":h!==0&&Math.abs(h)<4?this._type="trackpad":S>400?(this._type=null,this._lastValue=h,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(S*h)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,h+=this._lastValue)),d.shiftKey&&h&&(h/=4),this._type&&this._zoom(-h,d),d.preventDefault()}},{key:"_onTimeout",value:function(){this._type="wheel",this._zoom(-this._lastValue)}},{key:"_zoom",value:function(d,h){if(d!==0){var m=this._map,S=2/(1+Math.exp(-Math.abs(d/100)));d<0&&S!==0&&(S=1/S);var y=m.ease?m.ease.to:m.transform.scale,s=m.transform.scaleZoom(y*S);m.zoomTo(s,{duration:this._type==="wheel"?200:0,around:this._aroundCenter?m.getCenter():m.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:h})}}}])&&_(t.prototype,r),l&&_(t,l),n}();O.exports=a},function(O,D,o){function _(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}var e=o(9),b=o(39),g=o(0),f=o(5),c=function(){function u(t){(function(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")})(this,u),this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),g.bindAll(["_onMouseDown","_onMouseMove","_onMouseUp","_onKeyDown"],this)}var i,a,n;return i=u,(a=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value:function(){this.isEnabled()||(this._map.dragPan&&this._map.dragPan.disable(),this._el.addEventListener("mousedown",this._onMouseDown,!1),this._map.dragPan&&this._map.dragPan.enable(),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)}},{key:"_onMouseDown",value:function(t){t.shiftKey&&t.button===0&&(f.document.addEventListener("mousemove",this._onMouseMove,!1),f.document.addEventListener("keydown",this._onKeyDown,!1),f.document.addEventListener("mouseup",this._onMouseUp,!1),e.disableDrag(),this._startPos=e.mousePos(this._el,t),this._active=!0)}},{key:"_onMouseMove",value:function(t){var r=this._startPos,l=e.mousePos(this._el,t);this._box||(this._box=e.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var d=Math.min(r.x,l.x),h=Math.max(r.x,l.x),m=Math.min(r.y,l.y),S=Math.max(r.y,l.y);e.setTransform(this._box,"translate(".concat(d,"px,").concat(m,"px)")),this._box.style.width="".concat(h-d,"px"),this._box.style.height="".concat(S-m,"px")}},{key:"_onMouseUp",value:function(t){if(t.button===0){var r=this._startPos,l=e.mousePos(this._el,t),d=new b().extend(this._map.unproject(r)).extend(this._map.unproject(l));this._finish(),r.x===l.x&&r.y===l.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(d,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:d})}}},{key:"_onKeyDown",value:function(t){t.keyCode===27&&(this._finish(),this._fireEvent("boxzoomcancel",t))}},{key:"_finish",value:function(){this._active=!1,f.document.removeEventListener("mousemove",this._onMouseMove,!1),f.document.removeEventListener("keydown",this._onKeyDown,!1),f.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(e.remove(this._box),this._box=null),e.enableDrag()}},{key:"_fireEvent",value:function(t,r){return this._map.fire(t,{originalEvent:r})}}])&&_(i.prototype,a),n&&_(i,n),u}();O.exports=c},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(9),b=o(0),g=o(5),f=o(2),c=b.bezier(0,0,.3,1),u=function(){function i(r){(function(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")})(this,i),this._map=r,this._el=r.getCanvasContainer(),b.bindAll(["_onDown","_onMove","_onUp","_onTouchEnd","_onMouseUp"],this)}var a,n,t;return a=i,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value:function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)}},{key:"_onDown",value:function(r){this._ignoreEvent(r)||this.isActive()||(r.touches?(g.document.addEventListener("touchmove",this._onMove),g.document.addEventListener("touchend",this._onTouchEnd)):(g.document.addEventListener("mousemove",this._onMove),g.document.addEventListener("mouseup",this._onMouseUp)),g.addEventListener("blur",this._onMouseUp),this._active=!1,this._startPos=this._pos=e.mousePos(this._el,r),this._inertia=[[f.now(),this._pos]])}},{key:"_onMove",value:function(r){if(!this._ignoreEvent(r)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("dragstart",r),this._fireEvent("movestart",r));var l=e.mousePos(this._el,r),d=this._map;d.stop(),this._drainInertiaBuffer(),this._inertia.push([f.now(),l]),d.transform.setLocationAtPoint(d.transform.pointLocation(this._pos),l),this._fireEvent("drag",r),this._fireEvent("move",r),this._pos=l,r.preventDefault()}}},{key:"_onUp",value:function(r){var l=this;if(this.isActive()){this._active=!1,this._fireEvent("dragend",r),this._drainInertiaBuffer();var d=function(){l._map.moving=!1,l._fireEvent("moveend",r)},h=this._inertia;if(h.length<2)d();else{var m=h[h.length-1],S=h[0],y=m[1].sub(S[1]),s=(m[0]-S[0])/1e3;if(s===0||m[1].equals(S[1]))d();else{var p=y.mult(.3/s),w=p.mag();w>1400&&(w=1400,p._unit()._mult(w));var A=w/750,k=p.mult(-A/2);this._map.panBy(k,{duration:1e3*A,easing:c,noMoveStart:!0},{originalEvent:r})}}}}},{key:"_onMouseUp",value:function(r){this._ignoreEvent(r)||(this._onUp(r),g.document.removeEventListener("mousemove",this._onMove),g.document.removeEventListener("mouseup",this._onMouseUp),g.removeEventListener("blur",this._onMouseUp))}},{key:"_onTouchEnd",value:function(r){this._ignoreEvent(r)||(this._onUp(r),g.document.removeEventListener("touchmove",this._onMove),g.document.removeEventListener("touchend",this._onTouchEnd))}},{key:"_fireEvent",value:function(r,l){return this._map.fire(r,{originalEvent:l})}},{key:"_ignoreEvent",value:function(r){var l=this._map;return!(!l.boxZoom||!l.boxZoom.isActive())||!(!l.dragRotate||!l.dragRotate.isActive())||(r.touches?r.touches.length>1:!!r.ctrlKey||r.type!=="mousemove"&&r.button&&r.button!==0)}},{key:"_drainInertiaBuffer",value:function(){for(var r=this._inertia,l=f.now();r.length>0&&l-r[0][0]>160;)r.shift()}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){function _(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var e=o(0),b=function(){function f(a){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,f),this._map=a,this._el=a.getCanvasContainer(),e.bindAll(["_onKeyDown"],this)}var c,u,i;return c=f,(u=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"enable",value:function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)}},{key:"_onKeyDown",value:function(a){if(!(a.altKey||a.ctrlKey||a.metaKey)){var n=0,t=0,r=0,l=0,d=0;switch(a.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:a.shiftKey?t=-1:(a.preventDefault(),l=-1);break;case 39:a.shiftKey?t=1:(a.preventDefault(),l=1);break;case 38:a.shiftKey?r=1:(a.preventDefault(),d=-1);break;case 40:a.shiftKey?r=-1:(d=1,a.preventDefault());break;default:return}var h=this._map,m=h.getZoom(),S={duration:300,delayEndEvents:500,easing:g,zoom:n?Math.round(m)+n*(a.shiftKey?2:1):m,bearing:h.getBearing()+15*t,pitch:h.getPitch()+10*r,offset:[100*-l,100*-d],center:h.getCenter()};h.easeTo(S,{originalEvent:a})}}}])&&_(c.prototype,u),i&&_(c,i),f}();function g(f){return f*(2-f)}O.exports=b},function(O,D,o){function _(g,f){for(var c=0;c<f.length;c++){var u=f[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var e=o(0),b=function(){function g(i){(function(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")})(this,g),this._map=i,e.bindAll(["_onDblClick","_onZoomEnd"],this)}var f,c,u;return f=g,(c=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"isActive",value:function(){return!!this._active}},{key:"enable",value:function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)}},{key:"_onDblClick",value:function(i){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(i.originalEvent.shiftKey?-1:1),{around:i.lngLat},i)}},{key:"_onZoomEnd",value:function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)}}])&&_(f.prototype,c),u&&_(f,u),g}();O.exports=b},function(O,D,o){function _(i,a){for(var n=0;n<a.length;n++){var t=a[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}var e=o(9),b=o(0),g=o(5),f=o(2),c=b.bezier(0,0,.15,1),u=function(){function i(r){(function(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")})(this,i),this._map=r,this._el=r.getCanvasContainer(),b.bindAll(["_onStart","_onMove","_onEnd"],this)}var a,n,t;return a=i,(n=[{key:"isEnabled",value:function(){return!!this._enabled}},{key:"enable",value:function(r){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0,this._aroundCenter=r&&r.around==="center")}},{key:"disable",value:function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)}},{key:"disableRotation",value:function(){this._rotationDisabled=!0}},{key:"enableRotation",value:function(){this._rotationDisabled=!1}},{key:"_onStart",value:function(r){if(r.touches.length===2){var l=e.mousePos(this._el,r.touches[0]),d=e.mousePos(this._el,r.touches[1]);this._startVec=l.sub(d),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],g.document.addEventListener("touchmove",this._onMove,!1),g.document.addEventListener("touchend",this._onEnd,!1)}}},{key:"_onMove",value:function(r){if(r.touches.length===2){var l=e.mousePos(this._el,r.touches[0]),d=e.mousePos(this._el,r.touches[1]),h=l.add(d).div(2),m=l.sub(d),S=m.mag()/this._startVec.mag(),y=this._rotationDisabled?0:180*m.angleWith(this._startVec)/Math.PI,s=this._map;if(this._gestureIntent){var p={duration:0,around:s.unproject(h)};this._gestureIntent==="rotate"&&(p.bearing=this._startBearing+y),this._gestureIntent!=="zoom"&&this._gestureIntent!=="rotate"||(p.zoom=s.transform.scaleZoom(this._startScale*S)),s.stop(),this._drainInertiaBuffer(),this._inertia.push([f.now(),S,h]),s.easeTo(p,{originalEvent:r})}else{var w=Math.abs(1-S)>.15;Math.abs(y)>10?this._gestureIntent="rotate":w&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=m,this._startScale=s.transform.scale,this._startBearing=s.transform.bearing)}r.preventDefault()}}},{key:"_onEnd",value:function(r){g.document.removeEventListener("touchmove",this._onMove),g.document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var l=this._inertia,d=this._map;if(l.length<2)d.snapToNorth({},{originalEvent:r});else{var h=l[l.length-1],m=l[0],S=d.transform.scaleZoom(this._startScale*h[1]),y=d.transform.scaleZoom(this._startScale*m[1]),s=S-y,p=(h[0]-m[0])/1e3,w=h[2];if(p!==0&&S!==y){var A=.15*s/p;Math.abs(A)>2.5&&(A=A>0?2.5:-2.5);var k=1e3*Math.abs(A/(12*.15)),v=S+A*k/2e3;v<0&&(v=0),d.easeTo({zoom:v,duration:k,easing:c,around:this._aroundCenter?d.getCenter():d.unproject(w)},{originalEvent:r})}else d.snapToNorth({},{originalEvent:r})}}},{key:"_drainInertiaBuffer",value:function(){for(var r=this._inertia,l=f.now();r.length>2&&l-r[0][0]>160;)r.shift()}}])&&_(a.prototype,n),t&&_(a,t),i}();O.exports=u},function(O,D,o){function _(d){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}function e(d,h){for(var m=0;m<h.length;m++){var S=h[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}function b(d,h){return!h||_(h)!=="object"&&typeof h!="function"?function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}(d):h}function g(d){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)})(d)}function f(d,h){return(f=Object.setPrototypeOf||function(m,S){return m.__proto__=S,m})(d,h)}var c=o(0),u=o(26).number,i=o(2),a=o(21),n=o(39),t=o(3),r=o(10),l=function(d){function h(s,p){var w;return function(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}(this,h),(w=b(this,g(h).call(this))).moving=!1,w.transform=s,w._bearingSnap=p.bearingSnap,w}var m,S,y;return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(p&&p.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),p&&f(s,p)}(h,r),m=h,(S=[{key:"getCenter",value:function(){return this.transform.center}},{key:"setCenter",value:function(s,p){return this.jumpTo({center:s},p)}},{key:"panBy",value:function(s,p,w){return s=t.convert(s).mult(-1),this.panTo(this.transform.center,c.extend({offset:s},p),w)}},{key:"panTo",value:function(s,p,w){return this.easeTo(c.extend({center:s},p),w)}},{key:"getZoom",value:function(){return this.transform.zoom}},{key:"setZoom",value:function(s,p){return this.jumpTo({zoom:s},p),this}},{key:"zoomTo",value:function(s,p,w){return this.easeTo(c.extend({zoom:s},p),w)}},{key:"zoomIn",value:function(s,p){return this.zoomTo(this.getZoom()+1,s,p),this}},{key:"zoomOut",value:function(s,p){return this.zoomTo(this.getZoom()-1,s,p),this}},{key:"getBearing",value:function(){return this.transform.bearing}},{key:"setBearing",value:function(s,p){return this.jumpTo({bearing:s},p),this}},{key:"rotateTo",value:function(s,p,w){return this.easeTo(c.extend({bearing:s},p),w)}},{key:"resetNorth",value:function(s,p){return this.rotateTo(0,c.extend({duration:1e3},s),p),this}},{key:"snapToNorth",value:function(s,p){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(s,p):this}},{key:"getPitch",value:function(){return this.transform.pitch}},{key:"setPitch",value:function(s,p){return this.jumpTo({pitch:s},p),this}},{key:"fitBounds",value:function(s,p,w){if(typeof(p=c.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},p)).padding=="number"){var A=p.padding;p.padding={top:A,bottom:A,right:A,left:A}}if(!c.deepEqual(Object.keys(p.padding).sort(function(Z,W){return Z<W?-1:Z>W?1:0}),["bottom","left","right","top"]))return c.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'"),this;s=n.convert(s);var k=[(p.padding.left-p.padding.right)/2,(p.padding.top-p.padding.bottom)/2],v=Math.min(p.padding.right,p.padding.left),x=Math.min(p.padding.top,p.padding.bottom);p.offset=[p.offset[0]+k[0],p.offset[1]+k[1]];var T=t.convert(p.offset),E=this.transform,C=E.project(s.getNorthWest()),z=E.project(s.getSouthEast()),P=z.sub(C),B=(E.width-2*v-2*Math.abs(T.x))/P.x,F=(E.height-2*x-2*Math.abs(T.y))/P.y;return F<0||B<0?(c.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset."),this):(p.center=E.unproject(C.add(z).div(2)),p.zoom=Math.min(E.scaleZoom(E.scale*Math.min(B,F)),p.maxZoom),p.bearing=0,p.linear?this.easeTo(p,w):this.flyTo(p,w))}},{key:"jumpTo",value:function(s,p){this.stop();var w=this.transform,A=!1,k=!1,v=!1;return"zoom"in s&&w.zoom!==+s.zoom&&(A=!0,w.zoom=+s.zoom),s.center!==void 0&&(w.center=a.convert(s.center)),"bearing"in s&&w.bearing!==+s.bearing&&(k=!0,w.bearing=+s.bearing),"pitch"in s&&w.pitch!==+s.pitch&&(v=!0,w.pitch=+s.pitch),this.fire("movestart",p).fire("move",p),A&&this.fire("zoomstart",p).fire("zoom",p).fire("zoomend",p),k&&this.fire("rotate",p),v&&this.fire("pitchstart",p).fire("pitch",p).fire("pitchend",p),this.fire("moveend",p)}},{key:"easeTo",value:function(s,p){var w=this;this.stop(),(s=c.extend({offset:[0,0],duration:500,easing:c.ease},s)).animate===!1&&(s.duration=0),s.smoothEasing&&s.duration!==0&&(s.easing=this._smoothOutEasing(s.duration));var A=this.transform,k=this.getZoom(),v=this.getBearing(),x=this.getPitch(),T="zoom"in s?+s.zoom:k,E="bearing"in s?this._normalizeBearing(s.bearing,v):v,C="pitch"in s?+s.pitch:x,z=A.centerPoint.add(t.convert(s.offset)),P=A.pointLocation(z),B=a.convert(s.center||P);this._normalizeCenter(B);var F,Z,W=A.project(P),J=A.project(B).sub(W),X=A.zoomScale(T-k);return s.around&&(F=a.convert(s.around),Z=A.locationPoint(F)),this.zooming=T!==k,this.rotating=v!==E,this.pitching=C!==x,this._prepareEase(p,s.noMoveStart),clearTimeout(this._onEaseEnd),this._ease(function(R){if(w.zooming&&(A.zoom=u(k,T,R)),w.rotating&&(A.bearing=u(v,E,R)),w.pitching&&(A.pitch=u(x,C,R)),F)A.setLocationAtPoint(F,Z);else{var U=A.zoomScale(A.zoom-k),K=T>k?Math.min(2,X):Math.max(.5,X),q=Math.pow(K,1-R),L=A.unproject(W.add(J.mult(R*q)).mult(U));A.setLocationAtPoint(A.renderWorldCopies?L.wrap():L,z)}w._fireMoveEvents(p)},function(){s.delayEndEvents?w._onEaseEnd=setTimeout(function(){return w._easeToEnd(p)},s.delayEndEvents):w._easeToEnd(p)},s),this}},{key:"_prepareEase",value:function(s,p){this.moving=!0,p||this.fire("movestart",s),this.zooming&&this.fire("zoomstart",s),this.pitching&&this.fire("pitchstart",s)}},{key:"_fireMoveEvents",value:function(s){this.fire("move",s),this.zooming&&this.fire("zoom",s),this.rotating&&this.fire("rotate",s),this.pitching&&this.fire("pitch",s)}},{key:"_easeToEnd",value:function(s){var p=this.zooming,w=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,p&&this.fire("zoomend",s),w&&this.fire("pitchend",s),this.fire("moveend",s)}},{key:"flyTo",value:function(s,p){var w=this;this.stop(),s=c.extend({offset:[0,0],speed:1.2,curve:1.42,easing:c.ease},s);var A=this.transform,k=this.getZoom(),v=this.getBearing(),x=this.getPitch(),T="zoom"in s?c.clamp(+s.zoom,A.minZoom,A.maxZoom):k,E="bearing"in s?this._normalizeBearing(s.bearing,v):v,C="pitch"in s?+s.pitch:x,z=A.zoomScale(T-k),P=A.centerPoint.add(t.convert(s.offset)),B=A.pointLocation(P),F=a.convert(s.center||B);this._normalizeCenter(F);var Z=A.project(B),W=A.project(F).sub(Z),J=s.curve,X=Math.max(A.width,A.height),R=X/z,U=W.mag();if("minZoom"in s){var K=c.clamp(Math.min(s.minZoom,k,T),A.minZoom,A.maxZoom),q=X/A.zoomScale(K-k);J=Math.sqrt(q/U*2)}var L=J*J;function I(Q){var tt=(R*R-X*X+(Q?-1:1)*L*L*U*U)/(2*(Q?R:X)*L*U);return Math.log(Math.sqrt(tt*tt+1)-tt)}function j(Q){return(Math.exp(Q)-Math.exp(-Q))/2}function M(Q){return(Math.exp(Q)+Math.exp(-Q))/2}var N=I(0),V=function(Q){return M(N)/M(N+J*Q)},G=function(Q){return X*((M(N)*(j(tt=N+J*Q)/M(tt))-j(N))/L)/U;var tt},H=(I(1)-N)/J;if(Math.abs(U)<1e-6||!isFinite(H)){if(Math.abs(X-R)<1e-6)return this.easeTo(s,p);var Y=R<X?-1:1;H=Math.abs(Math.log(R/X))/J,G=function(){return 0},V=function(Q){return Math.exp(Y*J*Q)}}if("duration"in s)s.duration=+s.duration;else{var $="screenSpeed"in s?+s.screenSpeed/J:+s.speed;s.duration=1e3*H/$}return s.maxDuration&&s.duration>s.maxDuration&&(s.duration=0),this.zooming=!0,this.rotating=v!==E,this.pitching=C!==x,this._prepareEase(p,!1),this._ease(function(Q){var tt=Q*H,et=1/V(tt);A.zoom=k+A.scaleZoom(et),w.rotating&&(A.bearing=u(v,E,Q)),w.pitching&&(A.pitch=u(x,C,Q));var nt=A.unproject(Z.add(W.mult(G(tt))).mult(et));A.setLocationAtPoint(A.renderWorldCopies?nt.wrap():nt,P),w._fireMoveEvents(p)},function(){return w._easeToEnd(p)},s),this}},{key:"isEasing",value:function(){return!!this._easeFn}},{key:"isMoving",value:function(){return this.moving}},{key:"stop",value:function(){return this._easeFn&&this._finishEase(),this}},{key:"_ease",value:function(s,p,w){w.animate===!1||w.duration===0?(s(1),p()):(this._easeStart=i.now(),this._easeFn=s,this._finishFn=p,this._easeOptions=w,this._update())}},{key:"_updateEase",value:function(){var s=Math.min((i.now()-this._easeStart)/this._easeOptions.duration,1);this._easeFn(this._easeOptions.easing(s)),s===1&&this._finishEase()}},{key:"_finishEase",value:function(){delete this._easeFn;var s=this._finishFn;delete this._finishFn,s.call(this)}},{key:"_normalizeBearing",value:function(s,p){s=c.wrap(s,-180,180);var w=Math.abs(s-p);return Math.abs(s-360-p)<w&&(s-=360),Math.abs(s+360-p)<w&&(s+=360),s}},{key:"_normalizeCenter",value:function(s){var p=this.transform;if(p.renderWorldCopies&&!p.lngRange){var w=s.lng-p.center.lng;s.lng+=w>180?-360:w<-180?360:0}}},{key:"_smoothOutEasing",value:function(s){var p=c.ease;if(this._prevEase){var w=this._prevEase,A=(i.now()-w.start)/w.duration,k=w.easing(A+.01)-w.easing(A),v=.27/Math.sqrt(k*k+1e-4)*.01,x=Math.sqrt(.0729-v*v);p=c.bezier(v,x,.25,1)}return this._prevEase={start:i.now(),duration:s,easing:p},p}}])&&e(m.prototype,S),y&&e(m,y),h}();O.exports=l},function(O,D,o){function _(f,c){for(var u=0;u<c.length;u++){var i=c[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}var e=o(9),b=o(0),g=function(){function f(){(function(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")})(this,f),b.bindAll(["_updateLogo"],this)}var c,u,i;return c=f,(u=[{key:"onAdd",value:function(a){this._map=a,this._container=e.create("div","mapboxgl-ctrl");var n=e.create("a","mapboxgl-ctrl-logo");return n.target="_blank",n.href="https://www.mapbox.com/",n.setAttribute("aria-label","Mapbox logo"),this._container.appendChild(n),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._container}},{key:"onRemove",value:function(){e.remove(this._container),this._map.off("sourcedata",this._updateLogo)}},{key:"getDefaultPosition",value:function(){return"bottom-left"}},{key:"_updateLogo",value:function(a){a&&a.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")}},{key:"_logoRequired",value:function(){if(this._map.style){var a=this._map.style.sourceCaches;for(var n in a)if(a[n].getSource().mapbox_logo)return!0;return!1}}}])&&_(c.prototype,u),i&&_(c,i),f}();O.exports=g},function(O,D){},function(O,D,o){function _(u,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}var e=o(9),b=o(0),g=o(127),f={showCompass:!0,showZoom:!0},c=function(){function u(t){var r=this;(function(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")})(this,u),this.options=b.extend({},f,t),this._container=e.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(l){return l.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",function(){return r._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",function(){return r._map.zoomOut()})),this.options.showCompass&&(b.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",function(){return r._map.resetNorth()}),this._compassArrow=e.create("span","mapboxgl-ctrl-compass-arrow",this._compass))}var i,a,n;return i=u,(a=[{key:"_rotateCompassArrow",value:function(){var t="rotate(".concat(this._map.transform.angle*(180/Math.PI),"deg)");this._compassArrow.style.transform=t}},{key:"onAdd",value:function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new g(t,{button:"left",element:this._compass}),this._handler.enable()),this._container}},{key:"onRemove",value:function(){e.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map}},{key:"_createButton",value:function(t,r,l){var d=e.create("button",t,this._container);return d.type="button",d.setAttribute("aria-label",r),d.addEventListener("click",l),d}}])&&_(i.prototype,a),n&&_(i,n),u}();O.exports=c},function(O,D,o){function _(m){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S})(m)}function e(m,S){for(var y=0;y<S.length;y++){var s=S[y];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(m,s.key,s)}}function b(m){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)})(m)}function g(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function f(m,S){return(f=Object.setPrototypeOf||function(y,s){return y.__proto__=s,y})(m,S)}var c,u=o(10),i=o(9),a=o(5),n=o(0),t=o(1),r=o(21),l=o(129),d={positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},h=function(m){function S(w){var A;return function(k,v){if(!(k instanceof v))throw new TypeError("Cannot call a class as a function")}(this,S),(A=function(k,v){return!v||_(v)!=="object"&&typeof v!="function"?g(k):v}(this,b(S).call(this))).options=n.extend({},d,w),n.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker","_onClickGeolocate"],g(A)),A}var y,s,p;return function(w,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(A&&A.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),A&&f(w,A)}(S,u),y=S,(s=[{key:"onAdd",value:function(w){var A;return this._map=w,this._container=i.create("div","".concat("mapboxgl-ctrl"," ").concat("mapboxgl-ctrl","-group")),A=this._setupUI,c!==void 0?A(c):a.navigator.permissions!==void 0?a.navigator.permissions.query({name:"geolocation"}).then(function(k){c=k.state!=="denied",A(c)}):(c=!!a.navigator.geolocation,A(c)),this._container}},{key:"onRemove",value:function(){this._geolocationWatchID!==void 0&&(a.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),i.remove(this._container),this._map=void 0}},{key:"_onSuccess",value:function(w){if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;default:t(!1,"Unexpected watchState ".concat(this._watchState))}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire("geolocate",w),this._finish()}},{key:"_updateCamera",value:function(w){var A=new r(w.coords.longitude,w.coords.latitude),k=w.coords.accuracy;this._map.fitBounds(A.toBounds(k),this.options.fitBoundsOptions,{geolocateSource:!0})}},{key:"_updateMarker",value:function(w){w?this._userLocationDotMarker.setLngLat([w.coords.longitude,w.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()}},{key:"_onError",value:function(w){if(this.options.trackUserLocation)if(w.code===1)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocationWatchID!==void 0&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:t(!1,"Unexpected watchState ".concat(this._watchState))}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire("error",w),this._finish()}},{key:"_finish",value:function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}},{key:"_setupUI",value:function(w){var A=this;w!==!1&&(this._container.addEventListener("contextmenu",function(k){return k.preventDefault()}),this._geolocateButton=i.create("button","".concat("mapboxgl-ctrl","-icon ").concat("mapboxgl-ctrl","-geolocate"),this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new l(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),this.options.trackUserLocation&&this._map.on("movestart",function(k){k.geolocateSource||A._watchState!=="ACTIVE_LOCK"||(A._watchState="BACKGROUND",A._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),A._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),A.fire("trackuserlocationend"))}))}},{key:"_onClickGeolocate",value:function(){if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire("trackuserlocationstart");break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire("trackuserlocationend");break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire("trackuserlocationstart");break;default:t(!1,"Unexpected watchState ".concat(this._watchState))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break;case"OFF":break;default:t(!1,"Unexpected watchState ".concat(this._watchState))}this._watchState==="OFF"&&this._geolocationWatchID!==void 0?this._clearWatch():this._geolocationWatchID===void 0&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=a.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else a.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4)}},{key:"_clearWatch",value:function(){a.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}])&&e(y.prototype,s),p&&e(y,p),S}();O.exports=h},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(9),b=o(0),g=function(){function c(n){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,c),this.options=n,b.bindAll(["_onMove"],this)}var u,i,a;return u=c,(i=[{key:"getDefaultPosition",value:function(){return"bottom-left"}},{key:"_onMove",value:function(){(function(n,t,r){var l=r&&r.maxWidth||100,d=n._container.clientHeight/2,h=(m=n.unproject([0,d]),S=n.unproject([l,d]),y=Math.PI/180,s=m.lat*y,p=S.lat*y,w=Math.sin(s)*Math.sin(p)+Math.cos(s)*Math.cos(p)*Math.cos((S.lng-m.lng)*y),6371e3*Math.acos(Math.min(w,1))),m,S,y,s,p,w;if(r&&r.unit==="imperial"){var A=3.2808*h;if(A>5280){var k=A/5280;f(t,l,k,"mi")}else f(t,l,A,"ft")}else if(r&&r.unit==="nautical"){var v=h/1852;f(t,l,v,"nm")}else f(t,l,h,"m")})(this._map,this._container,this.options)}},{key:"onAdd",value:function(n){return this._map=n,this._container=e.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",n.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}},{key:"onRemove",value:function(){e.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}}])&&_(u.prototype,i),a&&_(u,a),c}();function f(c,u,i,a){var n,t,r,l=(n=i,(t=Math.pow(10,"".concat(Math.floor(n)).length-1))*(r=(r=n/t)>=10?10:r>=5?5:r>=3?3:r>=2?2:1)),d=l/i;a==="m"&&l>=1e3&&(l/=1e3,a="km"),c.style.width="".concat(u*d,"px"),c.innerHTML=l+a}O.exports=g},function(O,D,o){function _(c,u){for(var i=0;i<u.length;i++){var a=u[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(c,a.key,a)}}var e=o(9),b=o(0),g=o(5),f=function(){function c(){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,c),this._fullscreen=!1,b.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in g.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in g.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in g.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in g.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"}var u,i,a;return u=c,(i=[{key:"onAdd",value:function(n){return this._map=n,this._mapContainer=this._map.getContainer(),this._container=e.create("div","".concat(this._className," mapboxgl-ctrl-group")),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",b.warnOnce("This device does not support fullscreen mode.")),this._container}},{key:"onRemove",value:function(){e.remove(this._container),this._map=null,g.document.removeEventListener(this._fullscreenchange,this._changeIcon)}},{key:"_checkFullscreenSupport",value:function(){return!!(g.document.fullscreenEnabled||g.document.mozFullScreenEnabled||g.document.msFullscreenEnabled||g.document.webkitFullscreenEnabled)}},{key:"_setupUI",value:function(){var n=this._fullscreenButton=e.create("button","".concat(this._className,"-icon ").concat(this._className,"-fullscreen"),this._container);n.setAttribute("aria-label","Toggle fullscreen"),n.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),g.document.addEventListener(this._fullscreenchange,this._changeIcon)}},{key:"_isFullscreen",value:function(){return this._fullscreen}},{key:"_changeIcon",value:function(){(g.document.fullscreenElement||g.document.mozFullScreenElement||g.document.webkitFullscreenElement||g.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("".concat(this._className,"-shrink")),this._fullscreenButton.classList.toggle("".concat(this._className,"-fullscreen")))}},{key:"_onClickFullscreen",value:function(){this._isFullscreen()?g.document.exitFullscreen?g.document.exitFullscreen():g.document.mozCancelFullScreen?g.document.mozCancelFullScreen():g.document.msExitFullscreen?g.document.msExitFullscreen():g.document.webkitCancelFullScreen&&g.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()}}])&&_(u.prototype,i),a&&_(u,a),c}();O.exports=f},function(O,D,o){function _(h){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(h)}function e(h,m){for(var S=0;S<m.length;S++){var y=m[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function b(h){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)})(h)}function g(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function f(h,m){return(f=Object.setPrototypeOf||function(S,y){return S.__proto__=y,S})(h,m)}var c=o(0),u=o(10),i=o(9),a=o(21),n=o(3),t=o(5),r=o(130),l={closeButton:!0,closeOnClick:!0},d=function(h){function m(p){var w;return function(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}(this,m),(w=function(A,k){return!k||_(k)!=="object"&&typeof k!="function"?g(A):k}(this,b(m).call(this))).options=c.extend(Object.create(l),p),c.bindAll(["_update","_onClickClose"],g(w)),w}var S,y,s;return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(w&&w.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),w&&f(p,w)}(m,u),S=m,(y=[{key:"addTo",value:function(p){return this._map=p,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this}},{key:"isOpen",value:function(){return!!this._map}},{key:"remove",value:function(){return this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this}},{key:"getLngLat",value:function(){return this._lngLat}},{key:"setLngLat",value:function(p){return this._lngLat=a.convert(p),this._pos=null,this._update(),this}},{key:"setText",value:function(p){return this.setDOMContent(t.document.createTextNode(p))}},{key:"setHTML",value:function(p){var w,A=t.document.createDocumentFragment(),k=t.document.createElement("body");for(k.innerHTML=p;w=k.firstChild;)A.appendChild(w);return this.setDOMContent(A)}},{key:"setDOMContent",value:function(p){return this._createContent(),this._content.appendChild(p),this._update(),this}},{key:"_createContent",value:function(){this._content&&i.remove(this._content),this._content=i.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=i.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))}},{key:"_update",value:function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=i.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=i.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=r(this._lngLat,this._pos,this._map.transform));var p=this._pos=this._map.project(this._lngLat),w=this.options.anchor,A=function z(P){if(P){if(typeof P=="number"){var B=Math.round(Math.sqrt(.5*Math.pow(P,2)));return{top:new n(0,P),"top-left":new n(B,B),"top-right":new n(-B,B),bottom:new n(0,-P),"bottom-left":new n(B,-B),"bottom-right":new n(-B,-B),left:new n(P,0),right:new n(-P,0)}}if(P instanceof n||Array.isArray(P)){var F=n.convert(P);return{top:F,"top-left":F,"top-right":F,bottom:F,"bottom-left":F,"bottom-right":F,left:F,right:F}}return{top:n.convert(P.top||[0,0]),"top-left":n.convert(P["top-left"]||[0,0]),"top-right":n.convert(P["top-right"]||[0,0]),bottom:n.convert(P.bottom||[0,0]),"bottom-left":n.convert(P["bottom-left"]||[0,0]),"bottom-right":n.convert(P["bottom-right"]||[0,0]),left:n.convert(P.left||[0,0]),right:n.convert(P.right||[0,0])}}return z(new n(0,0))}(this.options.offset);if(!w){var k=this._container.offsetWidth,v=this._container.offsetHeight;w=p.y+A.bottom.y<v?["top"]:p.y>this._map.transform.height-v?["bottom"]:[],p.x<k/2?w.push("left"):p.x>this._map.transform.width-k/2&&w.push("right"),w=w.length===0?"bottom":w.join("-")}var x=p.add(A[w]).round(),T={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},E=this._container.classList;for(var C in T)E.remove("mapboxgl-popup-anchor-".concat(C));E.add("mapboxgl-popup-anchor-".concat(w)),i.setTransform(this._container,"".concat(T[w]," translate(").concat(x.x,"px,").concat(x.y,"px)"))}}},{key:"_onClickClose",value:function(){this.remove()}}])&&e(S.prototype,y),s&&e(S,s),m}();O.exports=d},function(O,D,o){function _(y){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(y)}function e(y,s){for(var p=0;p<s.length;p++){var w=s[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}function b(y){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)})(y)}function g(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function f(y,s){return(f=Object.setPrototypeOf||function(p,w){return p.__proto__=w,p})(y,s)}var c=o(301),u=o(302),i=o(6),a=o(10),n=o(27).OverscaledTileID,t=o(22).mat4,r=(o(45),o(116)),l=o(61),d=(o(69),o(1)),h=o(306),m=1024,S=function(y){function s(k){var v;return function(x,T){if(!(x instanceof T))throw new TypeError("Cannot call a class as a function")}(this,s),(v=function(x,T){return!T||_(T)!=="object"&&typeof T!="function"?g(x):T}(this,b(s).call(this)))._canvas=document.createElement("canvas"),v._canvas.style.imageRendering="pixelated",v._canvas.addEventListener("webglcontextlost",function(){return console.log("webglcontextlost")},!1),v._canvas.addEventListener("webglcontextrestored",function(){return v._createGlContext()},!1),v._canvas.width=m,v._canvas.height=m,v.transform={zoom:0,angle:0,pitch:0,_pitch:0,scaleZoom:function(){return 0},cameraToCenterDistance:1,cameraToTileDistance:function(){return 1},clone:function(){return v.transform},width:m,height:m,pixelsToGLUnits:[2/m,-2/m],tileZoom:function(x){return x.tileID.canonical.z},calculatePosMatrix:function(x){return x.posMatrix}},h(k.style),v._initStyle=k.style,v._style=new u(Object.assign({},k.style,{transition:{duration:0}}),g(v)),v._style.setEventedParent(g(v),{style:v._style}),v._style.on("data",function(x){return x.dataType==="style"&&v._onReady()}),v._createGlContext(),v.painter.resize(m,m),v._pendingRenders=new Map,v._nextRenderId=0,v._configId=0,v._queuedConfigChanges=[],v}var p,w,A;return function(k,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(v&&v.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),v&&f(k,v)}(s,a),p=s,(w=[{key:"_onReady",value:function(){this._style.update(new l(16))}},{key:"_transformRequest",value:function(k,v){return{url:k,headers:{},credentials:""}}},{key:"_calculatePosMatrix",value:function(k,v,x){var T=this;this._tmpMat4f64=this._tmpMat4f64||new Float64Array(16),this._tmpMat4f32=new Float32Array(16),t.identity(this._tmpMat4f64);var E,C,z=x/m;return E=this._tmpMat4f64,C=[2/i*z,-2/i*z,1],T._tmpMat4f64b=T._tmpMat4f64b||new Float32Array(16),t.identity(T._tmpMat4f64b),t.scale(T._tmpMat4f64b,T._tmpMat4f64b,C),t.multiply(E,T._tmpMat4f64b,E),function(P,B){T._tmpMat4f64b=T._tmpMat4f64b||new Float32Array(16),t.identity(T._tmpMat4f64b),t.translate(T._tmpMat4f64b,T._tmpMat4f64b,B),t.multiply(P,T._tmpMat4f64b,P)}(this._tmpMat4f64,[2*k/m-1,1-2*v/m,0]),this._tmpMat4f32.set(this._tmpMat4f64),this._tmpMat4f32}},{key:"_createGlContext",value:function(){var k=Object.assign({failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1},o(307).webGLContextAttributes);if(this._gl=this._canvas.getContext("webgl",k)||this._canvas.getContext("experimental-webgl",k),!this._gl)throw new Error("Failed to initialize WebGL");this.painter=new c(this._gl,this.transform),this.painter.style=this._style}},{key:"setPaintProperty",value:function(k,v,x){var T=this,E=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return this._queuedConfigChanges.push(function(){return T._style.setPaintProperty(k,v,x)}),E?this._processConfigQueue(++this._configId):function(){return T._processConfigQueue(++T._configId)}}},{key:"setLayoutProperty",value:function(k,v,x){var T=this,E=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return this._queuedConfigChanges.push(function(){return T._style.setLayoutProperty(k,v,x)}),E?this._processConfigQueue(++this._configId):function(){return T._processConfigQueue(++T._configId)}}},{key:"setFilter",value:function(k,v){var x=this,T=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this._queuedConfigChanges.push(function(){return x._style.setFilter(k,v)}),T?this._processConfigQueue(++this._configId):function(){return x._processConfigQueue(++x._configId)}}},{key:"_processConfigQueue",value:function(k){var v=this;return this._style.loadedPromise.then(function(){if(v._configId!==k)return!1;for(v._cancelAllPendingRenders();v._queuedConfigChanges.length;)v._queuedConfigChanges.shift()();return v._style.update(new l(16)),v.fire("configChanged"),!0})}},{key:"getLayersVisible",value:function(k,v){var x=this;return Object.keys(this._style._layers).filter(function(T){return x._style.getLayoutProperty(T,"visibility")==="visible"}).filter(function(T){var E,C=(E=x._style._layers[T])&&E._eventedParent.stylesheet.layers.find(function(z){return z.id===E.id});return(!k||C&&(C.minzoom_===void 0||k>=C.minzoom_)&&(C.maxzoom_===void 0||k<=C.maxzoom_))&&(!v||C&&C.source===v)})}},{key:"getLayerOriginalFilter",value:function(k){var v=this._initStyle.layers.find(function(x){return x.id===k});return v&&v.filter}},{key:"getLayerOriginalPaint",value:function(k){var v=this._initStyle.layers.find(function(x){return x.id===k});return v&&v.paint}},{key:"getLayerOriginalLayout",value:function(k){var v=this._initStyle.layers.find(function(x){return x.id===k});return v&&v.layout}},{key:"getVisibleSources",value:function(k){var v=this;return Object.keys(this._style.sourceCaches).filter(function(x){return v.getLayersVisible(v.painter._filterForZoom,x).length>0})}},{key:"filterForZoom",value:function(k){k!==this.painter._filterForZoom&&(this.painter._filterForZoom=k)}},{key:"_cancelAllPendingRenders",value:function(){var k=this;this._pendingRenders.forEach(function(v){return k._finishRender(v.tileSetID,v.renderId,"canceled")}),this._pendingRenders.clear(),Object.values(this._style.sourceCaches).forEach(function(v){return v.invalidateAllLoadedTiles()})}},{key:"_finishRender",value:function(k,v,x){var T=this._pendingRenders.get(k);if(T&&T.renderId===v){for(;T.consumers.length;)T.consumers.shift().next(x);this._pendingRenders.delete(k)}}},{key:"_canonicalizeSpec",value:function(k,v){var x=k.map(function(E){return E.left}).reduce(function(E,C){return Math.min(E,C)},1/0),T=k.map(function(E){return E.top}).reduce(function(E,C){return Math.min(E,C)},1/0);return{tilesSpec:k.map(function(E){return{source:E.source,z:E.z,x:E.x,y:E.y,top:E.top-T,left:E.left-x,size:E.size}}),drawSpec:{srcLeft:v.srcLeft-x,srcTop:v.srcTop-T,width:v.width,height:v.height,destLeft:v.destLeft,destTop:v.destTop}}}},{key:"_tileSpecToString",value:function(k){return k.map(function(v){return"".concat(v.source," ").concat(v.z," ").concat(v.x," ").concat(v.y," ").concat(v.left," ").concat(v.top," ").concat(v.size)}).sort().join(" ")}},{key:"releaseRender",value:function(k){var v=this._pendingRenders.get(k.tileSetID);if(k.tiles.forEach(function(T){return T.cache.releaseTile(T)}),v&&v.renderId===k.renderId){k.consumer.next("canceled");var x=v.consumers.indexOf(k.consumer);x!==-1&&v.consumers.splice(x,1),v.consumers.length===0&&this._finishRender(v.tileSetID,k.renderId,"fully-canceled")}}},{key:"renderTiles",value:function(k,v,x,T){var E=this,C=this._canonicalizeSpec(x,v);v=C.drawSpec,x=C.tilesSpec;var z=this._tileSpecToString(x),P={ctx:k,drawSpec:v,tilesSpec:x,next:T},B=this._pendingRenders.get(z);if(B)return B.tiles.forEach(function(W){return W.uses++}),B.consumers.push(P),{renderId:B.renderId,consumer:P,tiles:B.tiles,tileSetID:z};var F=++this._nextRenderId;B={tileSetID:z,renderId:F,tiles:x.map(function(W){var J=new n(W.z,0,W.z,W.x,W.y,0);return E._style.sourceCaches[W.source].acquireTile(J,W.size)}),consumers:[P]},this._pendingRenders.set(z,B);var Z=[];return Promise.all(B.tiles.map(function(W,J){return W.loadedPromise.catch(function(X){return Z.push(J)})})).catch(function(W){return E._finishRender(z,F,W)}).then(function(){if((B=E._pendingRenders.get(z))&&B.renderId===F){var W=Z.length?"".concat(Z.length," of ").concat(x.length," tiles not available"):null;if(x.length-Z.length==0)return B.consumers.forEach(function(L){return L.ctx.clearRect(v.destLeft,v.destTop,v.width,v.height)}),void E._finishRender(z,F,W);Object.values(E._style.sourceCaches).forEach(function(L){return L.currentlyRenderingTiles=[]}),x.forEach(function(L,I){if(!Z.includes(I)){var j=B.tiles[I];j.tileSize=L.size,j.left=L.left,j.top=L.top,E._style.sourceCaches[L.source].currentlyRenderingTiles.push(j)}});for(var J=B.consumers.map(function(L){return L.drawSpec.srcLeft}).reduce(function(L,I){return Math.min(L,I)},1/0),X=B.consumers.map(function(L){return L.drawSpec.srcTop}).reduce(function(L,I){return Math.min(L,I)},1/0),R=B.consumers.map(function(L){return L.drawSpec.srcLeft+L.drawSpec.width}).reduce(function(L,I){return Math.max(L,I)},-1/0),U=B.consumers.map(function(L){return L.drawSpec.srcTop+L.drawSpec.height}).reduce(function(L,I){return Math.max(L,I)},-1/0),K=function(L){for(var I=function(M){var N=B.consumers.filter(function(V){return V.drawSpec.srcLeft+V.drawSpec.width>L&&V.drawSpec.srcLeft<L+m&&V.drawSpec.srcTop+V.drawSpec.height>M&&V.drawSpec.srcTop<M+m});if(N.length===0)return"continue";B.tiles.forEach(function(V){return V.tileID.posMatrix=E._calculatePosMatrix(V.left-L,V.top-M,V.tileSize)}),E.painter.render(E._style,{showTileBoundaries:!1,showOverdrawInspector:!1}),N.forEach(function(V){var G=0|Math.max(0,V.drawSpec.srcLeft-L),H=0|Math.min(m,V.drawSpec.srcLeft+V.drawSpec.width-L),Y=0|Math.max(0,V.drawSpec.srcTop-M),$=0|Math.min(m,V.drawSpec.srcTop+V.drawSpec.height-M),Q=V.drawSpec.destLeft+(V.drawSpec.srcLeft<L?L-V.drawSpec.srcLeft:0),tt=V.drawSpec.destTop+(V.drawSpec.srcTop<M?M-V.drawSpec.srcTop:0),et=H-G,nt=$-Y;V.ctx.drawImage(E._canvas,G,Y,et,nt,Q,tt,et,nt)})},j=X;j<U;j+=m)I(j)},q=J;q<R;q+=m)K(q);for(;B.consumers.length;)B.consumers.shift().next(W);E._pendingRenders.delete(z),Object.values(E._style.sourceCaches).forEach(function(L){return L.currentlyRenderingTiles=[]})}}),{renderId:B.renderId,consumer:P,tiles:B.tiles,tileSetID:z}}},{key:"queryRenderedFeatures",value:function(k){var v=this;d(k.source);var x={};this.getLayersVisible(k.renderedZoom,k.source).forEach(function(C){return x[C]=v._style._layers[C]});var T=r.rendered(this._style.sourceCaches[k.source],x,k,{},k.tileZ,0),E={};return Object.keys(T).forEach(function(C){return T[C].map(function(z){(E[z.layer["source-layer"]]=E[z.layer["source-layer"]]||[]).push(z._vectorTileFeature.properties)})}),E}},{key:"showCanvasForDebug",value:function(){document.body.appendChild(this._canvas),this._canvas.style.position="fixed",this._canvas.style.bottom="0px",this._canvas.style.right="0px",this._canvas.style.background="#ccc",this._canvas.style.opacity="0.7",this._canvas.style.transform="scale(0.5) translate(502px,502px)"}},{key:"destroyDebugCanvas",value:function(){renderer._canvas.parentElement&&document.body.removeChild(this._canvas)}}])&&e(p.prototype,w),A&&e(p,A),s}();O.exports=S},function(O,D,o){function _(a){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(a)}function e(a,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function b(a,n){return!n||_(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a):n}function g(a,n,t){return(g=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(r,l,d){var h=function(S,y){for(;!Object.prototype.hasOwnProperty.call(S,y)&&(S=f(S))!==null;);return S}(r,l);if(h){var m=Object.getOwnPropertyDescriptor(h,l);return m.get?m.get.call(d):m.value}})(a,n,t||a)}function f(a){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(a)}function c(a,n){return(c=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(a,n)}var u=o(124),i=function(a){function n(d,h){var m;return function(S,y){if(!(S instanceof y))throw new TypeError("Cannot call a class as a function")}(this,n),(m=b(this,f(n).call(this,d,h)))._filterForZoom=15,m}var t,r,l;return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(h&&h.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),h&&c(d,h)}(n,u),t=n,(r=[{key:"resize",value:function(d,h){var m=this.context.gl;this.width=d,this.height=h,m.viewport(0,0,this.width,this.height)}},{key:"renderLayer",value:function(d,h,m,S){var y=function(s){return s&&s._eventedParent.stylesheet.layers.find(function(p){return p.id===s.id})}(m);y&&y.minzoom_&&S[0].overscaledZ<y.minzoom_||y&&y.maxzoom_&&S[0].overscaledZ>=y.maxzoom_||g(f(n.prototype),"renderLayer",this).call(this,d,h,m,S)}}])&&e(t.prototype,r),l&&e(t,l),n}();O.exports=i},function(O,D,o){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function e(t,r){for(var l=0;l<r.length;l++){var d=r[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}function b(t,r){return!r||_(r)!=="object"&&typeof r!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(t):r}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}function f(t,r){return(f=Object.setPrototypeOf||function(l,d){return l.__proto__=d,l})(t,r)}var c=o(53),u=o(45),i=o(69),a=o(303),n=function(t){function r(m,S,y){var s;return function(p,w){if(!(p instanceof w))throw new TypeError("Cannot call a class as a function")}(this,r),(s=b(this,g(r).call(this,S,y))).loadedPromise=new Promise(function(p){return s.on("data",function(w){return w.dataType==="style"&&p()})}),s.loadedPromise.then(function(){return s.placement=new i(S.transform,0)}),s.loadJSON(m),s}var l,d,h;return function(m,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(S&&S.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),S&&f(m,S)}(r,c),l=r,(d=[{key:"addSource",value:function(m,S,y){var s=u.create(m,S,this.dispatcher,this);s.setEventedParent(this,{source:s}),s.map=this.map,s.tiles=S.tiles,s.load(),this.loadedPromise.then(function(){return new Promise(function(p){return s.on("data",function(w){return w.dataType==="source"&&p()})})}),this.sourceCaches[m]=new a(s)}},{key:"setLayers",value:function(m){var S=this;return Object.keys(this._layers).map(function(y){return S.setLayoutProperty(y,"visibility",m.includes(y)?"visible":"none")})}}])&&e(l.prototype,d),h&&e(l,h),r}();O.exports=n},function(O,D,o){function _(t,r){for(var l=0;l<r.length;l++){var d=r[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}function e(t,r,l){return r in t?Object.defineProperty(t,r,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[r]=l,t}var b=o(121),g=o(1),f=o(118),c=o(304),u=o(6),i=new(o(305)),a=20,n=function(){function t(h){var m=this;(function(S,y){if(!(S instanceof y))throw new TypeError("Cannot call a class as a function")})(this,t),e(this,"_tilesInUse",{}),e(this,"map",{}),this._source=h,this._tileCache=new b(a,function(S){return m._source.unloadTile(S)})}var r,l,d;return r=t,(l=[{key:"getSource",value:function(){return this._source}},{key:"getVisibleCoordinates",value:function(){return this.currentlyRenderingTiles.map(function(h){return h.tileID})}},{key:"getRenderableIds",value:function(){return this.getVisibleCoordinates()}},{key:"acquireTile",value:function(h,m){var S=this,y=this._tilesInUse[h.key]||this._tileCache.getAndRemove(h.key)||new f(h.wrapped(),m,h.canonical.z);return y.uses++,this._tilesInUse[h.key]=y,y.cache=this,y.loadedPromise||(y.loadedPromise=new Promise(function(s,p){var w=setTimeout(function(){S._source.abortTile(y),y.loadedPromise=null,p("timeout")},6e4);S._source.loadTile(y,function(A){clearTimeout(w),A?(y._isDud=!0,p(A)):s()})})),y}},{key:"getTileByID",value:function(h){return this.getTile(h)}},{key:"getTile",value:function(h){return this._tilesInUse[h.key]}},{key:"serialize",value:function(){return this._source.serialize()}},{key:"prepare",value:function(h){this.currentlyRenderingTiles.forEach(function(m){return m.upload(h)})}},{key:"releaseTile",value:function(h){g(h.uses>0),--h.uses>0||(delete this._tilesInUse[h.tileID.key],h.hasData()||this._isDud?this._tileCache.add(h.tileID.key,h):(this._source.abortTile(h),this._source.unloadTile(h)))}},{key:"invalidateAllLoadedTiles",value:function(){var h=this;Object.values(this._tilesInUse).forEach(function(m){return!m._isDud&&(m.loadedPromise=null)}),this._tileCache.keys().forEach(function(m){var S=h._tileCache.get(m);!S._isDud&&(S.loadedPromise=null)})}},{key:"tilesIn",value:function(h){var m=i.px([h.lng,h.lat],h.tileZ,!1).map(function(A){return A/256}),S=0|m[0],y=0|m[1],s=m.map(function(A){return(A-(0|A))*u}),p=s[0],w=s[1];return Object.values(this._tilesInUse).filter(function(A){return A.hasData()}).map(function(A){return{tile:A,tileID:A.tileID,queryGeometry:[[c.convert([p+u*(S-A.tileID.canonical.x),w+u*(y-A.tileID.canonical.y)])]],scale:1}})}},{key:"reload",value:function(){}},{key:"pause",value:function(){}},{key:"resume",value:function(){}}])&&_(r.prototype,l),d&&_(r,d),t}();O.exports=n},function(O,D,o){"use strict";function _(e,b){this.x=e,this.y=b}O.exports=_,_.prototype={clone:function(){return new _(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var b=e.x-this.x,g=e.y-this.y;return b*b+g*g},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,b){return Math.atan2(this.x*b-this.y*e,this.x*e+this.y*b)},_matMult:function(e){var b=e[0]*this.x+e[1]*this.y,g=e[2]*this.x+e[3]*this.y;return this.x=b,this.y=g,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var b=Math.cos(e),g=Math.sin(e),f=b*this.x-g*this.y,c=g*this.x+b*this.y;return this.x=f,this.y=c,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_.convert=function(e){return e instanceof _?e:Array.isArray(e)?new _(e[0],e[1]):e}},function(O,D,o){var _=function(){var e={},b=Math.PI/180,g=180/Math.PI,f=6378137,c=20037508342789244e-9;function u(i){if(i=i||{},this.size=i.size||256,!e[this.size]){var a=this.size,n=e[this.size]={};n.Bc=[],n.Cc=[],n.zc=[],n.Ac=[];for(var t=0;t<30;t++)n.Bc.push(a/360),n.Cc.push(a/(2*Math.PI)),n.zc.push(a/2),n.Ac.push(a),a*=2}this.Bc=e[this.size].Bc,this.Cc=e[this.size].Cc,this.zc=e[this.size].zc,this.Ac=e[this.size].Ac}return u.prototype.px=function(i,a,n){n===void 0&&(n=!0);var t=this.zc[a],r=Math.min(Math.max(Math.sin(b*i[1]),-.9999),.9999),l=t+i[0]*this.Bc[a],d=t+.5*Math.log((1+r)/(1-r))*-this.Cc[a];return n&&(l=Math.round(l),d=Math.round(d)),l>this.Ac[a]&&(l=this.Ac[a]),d>this.Ac[a]&&(d=this.Ac[a]),[l,d]},u.prototype.ll=function(i,a){var n=(i[1]-this.zc[a])/-this.Cc[a];return[(i[0]-this.zc[a])/this.Bc[a],g*(2*Math.atan(Math.exp(n))-.5*Math.PI)]},u.prototype.bbox=function(i,a,n,t,r){t&&(a=Math.pow(2,n)-1-a);var l=[i*this.size,(+a+1)*this.size],d=[(+i+1)*this.size,a*this.size],h=this.ll(l,n).concat(this.ll(d,n));return r==="900913"?this.convert(h,"900913"):h},u.prototype.xyz=function(i,a,n,t){t==="900913"&&(i=this.convert(i,"WGS84"));var r=[i[0],i[1]],l=[i[2],i[3]],d=this.px(r,a),h=this.px(l,a),m=[Math.floor(d[0]/this.size),Math.floor((h[0]-1)/this.size)],S=[Math.floor(h[1]/this.size),Math.floor((d[1]-1)/this.size)],y={minX:Math.min.apply(Math,m)<0?0:Math.min.apply(Math,m),minY:Math.min.apply(Math,S)<0?0:Math.min.apply(Math,S),maxX:Math.max.apply(Math,m),maxY:Math.max.apply(Math,S)};if(n){var s={minY:Math.pow(2,a)-1-y.maxY,maxY:Math.pow(2,a)-1-y.minY};y.minY=s.minY,y.maxY=s.maxY}return y},u.prototype.convert=function(i,a){return a==="900913"?this.forward(i.slice(0,2)).concat(this.forward(i.slice(2,4))):this.inverse(i.slice(0,2)).concat(this.inverse(i.slice(2,4)))},u.prototype.forward=function(i){var a=[f*i[0]*b,f*Math.log(Math.tan(.25*Math.PI+.5*i[1]*b))];return a[0]>c&&(a[0]=c),a[0]<-c&&(a[0]=-c),a[1]>c&&(a[1]=c),a[1]<-c&&(a[1]=-c),a},u.prototype.inverse=function(i){return[i[0]*g/f,(.5*Math.PI-2*Math.atan(Math.exp(-i[1]/f)))*g]},u}();O.exports=_},function(O,D){function o(_){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(_)}O.exports=function(_){o(_)==="object"&&Array.isArray(_.layers)&&(_.layers.forEach(function(e){typeof e.minzoom=="number"&&(e.minzoom_=e.minzoom,delete e.minzoom),typeof e.maxzoom=="number"&&(e.maxzoom_=e.maxzoom,delete e.maxzoom)}),_.layers=_.layers.filter(function(e){return e.type!=="raster"&&e.type!=="background"}))}},function(O,D,o){"use strict";function _(b){return!!(typeof window<"u"&&typeof document<"u"&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&"Worker"in window&&"Uint8ClampedArray"in window&&function(g){return e[g]===void 0&&(e[g]=function(f){var c=document.createElement("canvas"),u=Object.create(_.webGLContextAttributes);return u.failIfMajorPerformanceCaveat=f,c.probablySupportsContext?c.probablySupportsContext("webgl",u)||c.probablySupportsContext("experimental-webgl",u):c.supportsContext?c.supportsContext("webgl",u)||c.supportsContext("experimental-webgl",u):c.getContext("webgl",u)||c.getContext("experimental-webgl",u)}(g)),e[g]}(b&&b.failIfMajorPerformanceCaveat))}O.exports?O.exports=_:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=_);var e={};_.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}]),_t=xt;})();