svgmap 2.13.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,71 +74,72 @@ https://stephanwagner.me/create-world-map-charts-with-svgmap#svgMapDemoGDP
74
74
 
75
75
  You can pass the following options into svgMap:
76
76
 
77
- | Option | Type | Default | |
78
- |----------------------------------------------------------------|----------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
79
- | `targetElementID` | `string` | | The ID of the element where the world map will render (Required) |
80
- | `allowInteraction` | `boolean` | `true` | Allow users to zoom and pan around the map
81
-
82
- | `minZoom` | `float` | `1` | Minimal zoom level |
83
- | `maxZoom` | `float` | `25` | Maximal zoom level |
84
- | `initialZoom` | `float` | `1.06` | Initial zoom level |
85
- | `initialPan` | `object` | | Initial pan on x and y axis (e.g. `{ x: 30, y: 60 }`) |
86
- | `showContinentSelector` | `boolean` | `false` | Show continent selector |
87
- | `zoomScaleSensitivity` | `float` | `0.2` | Sensitivity when zooming |
88
- | `showZoomReset` | `boolean` | `false` | Show zoom reset button |
89
- | `mouseWheelZoomEnabled` | `boolean` | `true` | Enables or disables zooming with the scroll wheel |
90
- | `mouseWheelZoomWithKey` | `boolean` | `false` | Allow zooming only when one of the following keys is pressed: SHIFT, CONTROL, ALT, COMMAND, OPTION |
91
- | `mouseWheelKeyMessage` | `string` | `'Press the [ALT] key to zoom'` | The message when trying to scroll without a key |
92
- | `mouseWheelKeyMessageMac` | `string ` | `Press the [COMMAND] key to zoom` | The message when trying to scroll without a key on MacOS |
93
- | `colorMax` | `string` | `'#CC0033'` | Color for highest value. Accepts CSS vars, color names, rgb or hex values. |
94
- | `colorMin` | `string` | `'#FFE5D9'` | Color for lowest value. Accepts CSS vars, color names, rgb or hex values. |
95
- | `colorNoData` | `string` | `'#E2E2E2'` | Color when there is no data. Accepts CSS vars, color names, rgb or hex values. |
96
- | `flagType` | `'image'`, `'emoji'` | `'image'` | The type of the flag in the tooltip |
97
- | `flagURL` | `string` | | The URL to the flags when using flag type `'image'`. The placeholder `{0}` will get replaced with the lowercase [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. Default: `'https://cdn.jsdelivr.net/gh/hjnilsson/country-flags@latest/svg/{0}.svg'` |
98
- | `hideFlag` | `boolean` | `false` | Hide the flag in tooltips |
99
- | `noDataText` | `string` | `'No data available'` | The text to be shown when no data is present |
100
- | `touchLink` | `boolean` | `false` | Set to `true` to open the link (see `data.values.link`) on mobile devices, by default the tooltip will be shown |
101
- | `onGetTooltip` | `function` | | Called when a tooltip is created to custimize the tooltip content (`function (tooltipDiv, countryID, countryValues) { return 'Custom HTML'; }`) |
102
- | `countries` | `object` | | Additional options specific to countries: |
103
- |    `↳ EH` | `boolean` | `true` | When set to `false`, Western Sahara (EH) will be combined with Morocco (MA) |
104
- | `data` | `object` | | The chart data to use for coloring and to show in the tooltip. Use a unique data-id as key and provide following options as value: |
105
- |    `↳ name` | `string` | | The name of the data, it will be shown in the tooltip |
106
- |    `↳ format` | `string` | | The format for the data value, `{0}` will be replaced with the actual value |
107
- |    `↳ thousandSeparator` | `string` | `','` | The character to use as thousand separator |
108
- |    `↳ thresholdMax` | `number` | `null` | Maximal value to use for coloring calculations |
109
- |    `↳ thresholdMin` | `number` | `0` | Minimum value to use for coloring calculations |
110
- |    `↳ applyData` | `string` | | The ID (key) of the data that will be used for coloring |
111
- |    `↳ values` | `object` | | An object with the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code as key and the chart data for each country as value |
112
- |         `↳ color` | `string` | | Forces a color for this country |
113
- |         `↳ link` | `string` | | An URL to redirect to when clicking the country |
114
- |         `↳ linkTarget` | `string` | | The target of the link. By default the link will be opened in the same tab. Use `'_blank'` to open the link in a new tab |
115
- | `countryNames` | `object` | | An object with the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code as key and the country name as value |
77
+ | Option | Type | Default ||
78
+ |-|-|-|-|
79
+ | `targetElementID` | `string` | | The ID of the element where the world map will render (Required) |
80
+ | `allowInteraction` | `boolean` | `true` | Allow users to zoom and pan around the map
81
+ | `minZoom` | `float` | `1` | Minimal zoom level |
82
+ | `maxZoom` | `float` | `25` | Maximal zoom level |
83
+ | `initialZoom` | `float` | `1.06` | Initial zoom level |
84
+ | `initialPan` | `object` | | Initial pan on x and y axis (e.g. `{ x: 30, y: 60 }`) |
85
+ | `showContinentSelector` | `boolean` | `false` | Show continent selector |
86
+ | `zoomScaleSensitivity` | `float` | `0.2` | Sensitivity when zooming |
87
+ | `showZoomReset` | `boolean` | `false` | Show zoom reset button |
88
+ | `zoomButtonsPosition` | `string` | `'bottomLeft'` | Position of the zoom buttons. Possible values: `'topLeft'`, `'topRight'`, `'bottomLeft'`, `'bottomRight'` |
89
+ | `mouseWheelZoomEnabled` | `boolean` | `true` | Enables or disables zooming with the scroll wheel |
90
+ | `mouseWheelZoomWithKey` | `boolean` | `false` | Allow zooming only when one of the following keys is pressed: SHIFT, CONTROL, ALT, COMMAND, OPTION |
91
+ | `mouseWheelKeyMessage` | `string` | `'Press the [ALT] key to zoom'` | The message when trying to scroll without a key |
92
+ | `mouseWheelKeyMessageMac` | `string ` | `Press the [COMMAND] key to zoom` | The message when trying to scroll without a key on MacOS |
93
+ | `colorMax` | `string` | `'#CC0033'` | Color for highest value. Accepts CSS vars, color names, rgb or hex values. |
94
+ | `colorMin` | `string` | `'#FFE5D9'` | Color for lowest value. Accepts CSS vars, color names, rgb or hex values. |
95
+ | `colorNoData` | `string` | `'#E2E2E2'` | Color when there is no data. Accepts CSS vars, color names, rgb or hex values. |
96
+ | `flagType` | `'image'`, `'emoji'` | `'image'` | The type of the flag in the tooltip |
97
+ | `ratioType` | `'linear'`, `'log'`, `function` | `'linear'` | Ratio type for the color scale |
98
+ | `flagURL` | `string` | | The URL to the flags when using flag type `'image'`. The placeholder `{0}` will get replaced with the lowercase [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. Default: `'https://cdn.jsdelivr.net/gh/hjnilsson/country-flags@latest/svg/{0}.svg'` |
99
+ | `hideFlag` | `boolean` | `false` | Hide the flag in tooltips |
100
+ | `noDataText` | `string` | `'No data available'` | The text to be shown when no data is present |
101
+ | `touchLink` | `boolean` | `false` | Set to `true` to open the link (see `data.values.link`) on mobile devices, by default the tooltip will be shown |
102
+ | `onGetTooltip` | `function` | | Called when a tooltip is created to custimize the tooltip content (`function (tooltipDiv, countryID, countryValues) { return 'Custom HTML'; }`) |
103
+ | `countries` | `object` | | Additional options specific to countries: |
104
+ |    `↳ EH` | `boolean` | `true` | When set to `false`, Western Sahara (EH) will be combined with Morocco (MA) |
105
+ | `data` | `object` | | The chart data to use for coloring and to show in the tooltip. Use a unique data-id as key and provide following options as value: |
106
+ |    `↳ name` | `string` | | The name of the data, it will be shown in the tooltip |
107
+ |    `↳ format` | `string` | | The format for the data value, `{0}` will be replaced with the actual value |
108
+ |    `↳ thousandSeparator` | `string` | `','` | The character to use as thousand separator |
109
+ |    `↳ thresholdMax` | `number` | `null` | Maximal value to use for coloring calculations |
110
+ |    `↳ thresholdMin` | `number` | `0` | Minimum value to use for coloring calculations |
111
+ |    `↳ applyData` | `string` | | The ID (key) of the data that will be used for coloring |
112
+ |    `↳ values` | `object` | | An object with the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code as key and the chart data for each country as value |
113
+ |         `↳ color` | `string` | | Forces a color for this country |
114
+ |         `↳ link` | `string` | | An URL to redirect to when clicking the country |
115
+ |         `↳ linkTarget` | `string` | | The target of the link. By default the link will be opened in the same tab. Use `'_blank'` to open the link in a new tab |
116
+ | `countryNames` | `object` | | An object with the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code as key and the country name as value |
116
117
  ---
117
118
 
118
119
  ## Styling
119
120
  You can overwrite the following scss variables to customize the style of the map:
120
121
 
121
- | Variable | Default |
122
- |---------------------------------|------------------------------|
123
- | $textColor | #111 |
124
- | $textColorLight | #777 |
125
- | $oceanColor | #d9ecff |
126
- | $mapActiveStrokeColor | #333 |
127
- | $mapActiveStrokeWidth | 1.5 |
128
- | $blockZoomNoticeColor | #fff |
129
- | $blockZoomNoticeBackgroundColor | rgba(0, 0, 0, 0.8) |
130
- | $mapControlsColor | #fff |
131
- | $mapControlsBackgroundColor | #fff |
132
- | $mapControlsIconColor | #ccc |
133
- | $mapControlsIconColorActive | #000 |
134
- | $mapControlsDisabledColor | #eee |
135
- | $mapControlsBoxShadow | 0 0 0 2px rgba(0, 0, 0, 0.1) |
136
- | $mapTooltipColor | #111 |
137
- | $mapTooltipBackgroundColor | #fff |
138
- | $mapTooltipFlagBackgroundColor | rgba(0, 0, 0, 0.15) |
139
- | $mapTooltipBoxShadowColor | rgba(0, 0, 0, 0.2) |
140
- | $continentControlsBoxShadow | 0 0 0 2px rgba(0, 0, 0, 0.1) |
141
- | $countryStrokeColor | #fff |
122
+ | Variable | Default |
123
+ |-|-|
124
+ | $textColor | #111 |
125
+ | $textColorLight | #777 |
126
+ | $oceanColor | #d9ecff |
127
+ | $mapActiveStrokeColor | #333 |
128
+ | $mapActiveStrokeWidth | 1.5 |
129
+ | $blockZoomNoticeColor | #fff |
130
+ | $blockZoomNoticeBackgroundColor | rgba(0, 0, 0, 0.8) |
131
+ | $mapControlsColor | #fff |
132
+ | $mapControlsBackgroundColor | #fff |
133
+ | $mapControlsIconColor | #ccc |
134
+ | $mapControlsIconColorActive | #000 |
135
+ | $mapControlsDisabledColor | #eee |
136
+ | $mapControlsBoxShadow | 0 0 0 2px rgba(0, 0, 0, 0.1) |
137
+ | $mapTooltipColor | #111 |
138
+ | $mapTooltipBackgroundColor | #fff |
139
+ | $mapTooltipFlagBackgroundColor | rgba(0, 0, 0, 0.15) |
140
+ | $mapTooltipBoxShadowColor | rgba(0, 0, 0, 0.2) |
141
+ | $continentControlsBoxShadow | 0 0 0 2px rgba(0, 0, 0, 0.1) |
142
+ | $countryStrokeColor | #fff |
142
143
  ---
143
144
 
144
145
  ## Localize
@@ -72,6 +72,7 @@
72
72
  "version": "7.18.6",
73
73
  "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz",
74
74
  "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==",
75
+ "peer": true,
75
76
  "dependencies": {
76
77
  "@ampproject/remapping": "^2.1.0",
77
78
  "@babel/code-frame": "^7.18.6",
@@ -911,6 +912,7 @@
911
912
  "version": "7.18.6",
912
913
  "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz",
913
914
  "integrity": "sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A==",
915
+ "peer": true,
914
916
  "dependencies": {
915
917
  "@babel/helper-plugin-utils": "^7.18.6"
916
918
  },
@@ -1473,6 +1475,7 @@
1473
1475
  "version": "7.18.6",
1474
1476
  "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz",
1475
1477
  "integrity": "sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw==",
1478
+ "peer": true,
1476
1479
  "dependencies": {
1477
1480
  "@babel/helper-annotate-as-pure": "^7.18.6",
1478
1481
  "@babel/helper-module-imports": "^7.18.6",
@@ -2275,9 +2278,10 @@
2275
2278
  }
2276
2279
  },
2277
2280
  "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
2278
- "version": "4.1.0",
2279
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
2280
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
2281
+ "version": "4.1.1",
2282
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
2283
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
2284
+ "license": "MIT",
2281
2285
  "dependencies": {
2282
2286
  "argparse": "^2.0.1"
2283
2287
  },
@@ -4160,6 +4164,7 @@
4160
4164
  "version": "5.30.5",
4161
4165
  "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.5.tgz",
4162
4166
  "integrity": "sha512-lftkqRoBvc28VFXEoRgyZuztyVUQ04JvUnATSPtIRFAccbXTWL6DEtXGYMcbg998kXw1NLUJm7rTQ9eUt+q6Ig==",
4167
+ "peer": true,
4163
4168
  "dependencies": {
4164
4169
  "@typescript-eslint/scope-manager": "5.30.5",
4165
4170
  "@typescript-eslint/type-utils": "5.30.5",
@@ -4210,6 +4215,7 @@
4210
4215
  "version": "5.30.5",
4211
4216
  "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.5.tgz",
4212
4217
  "integrity": "sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q==",
4218
+ "peer": true,
4213
4219
  "dependencies": {
4214
4220
  "@typescript-eslint/scope-manager": "5.30.5",
4215
4221
  "@typescript-eslint/types": "5.30.5",
@@ -4402,6 +4408,7 @@
4402
4408
  "version": "8.7.1",
4403
4409
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz",
4404
4410
  "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==",
4411
+ "peer": true,
4405
4412
  "bin": {
4406
4413
  "acorn": "bin/acorn"
4407
4414
  },
@@ -4510,6 +4517,7 @@
4510
4517
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
4511
4518
  "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
4512
4519
  "license": "MIT",
4520
+ "peer": true,
4513
4521
  "dependencies": {
4514
4522
  "fast-deep-equal": "^3.1.3",
4515
4523
  "fast-uri": "^3.0.1",
@@ -4928,6 +4936,7 @@
4928
4936
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
4929
4937
  "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
4930
4938
  "license": "MIT",
4939
+ "peer": true,
4931
4940
  "dependencies": {
4932
4941
  "fast-deep-equal": "^3.1.1",
4933
4942
  "fast-json-stable-stringify": "^2.0.0",
@@ -5300,6 +5309,7 @@
5300
5309
  }
5301
5310
  ],
5302
5311
  "license": "MIT",
5312
+ "peer": true,
5303
5313
  "dependencies": {
5304
5314
  "caniuse-lite": "^1.0.30001733",
5305
5315
  "electron-to-chromium": "^1.5.199",
@@ -6929,6 +6939,7 @@
6929
6939
  "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz",
6930
6940
  "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==",
6931
6941
  "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
6942
+ "peer": true,
6932
6943
  "dependencies": {
6933
6944
  "@eslint/eslintrc": "^1.3.0",
6934
6945
  "@humanwhocodes/config-array": "^0.9.2",
@@ -7534,9 +7545,10 @@
7534
7545
  }
7535
7546
  },
7536
7547
  "node_modules/eslint/node_modules/js-yaml": {
7537
- "version": "4.1.0",
7538
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
7539
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
7548
+ "version": "4.1.1",
7549
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
7550
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
7551
+ "license": "MIT",
7540
7552
  "dependencies": {
7541
7553
  "argparse": "^2.0.1"
7542
7554
  },
@@ -8071,6 +8083,7 @@
8071
8083
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
8072
8084
  "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
8073
8085
  "license": "MIT",
8086
+ "peer": true,
8074
8087
  "dependencies": {
8075
8088
  "fast-deep-equal": "^3.1.1",
8076
8089
  "fast-json-stable-stringify": "^2.0.0",
@@ -11423,9 +11436,10 @@
11423
11436
  "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
11424
11437
  },
11425
11438
  "node_modules/js-yaml": {
11426
- "version": "3.14.1",
11427
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
11428
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
11439
+ "version": "3.14.2",
11440
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
11441
+ "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
11442
+ "license": "MIT",
11429
11443
  "dependencies": {
11430
11444
  "argparse": "^1.0.7",
11431
11445
  "esprima": "^4.0.0"
@@ -12035,9 +12049,9 @@
12035
12049
  "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
12036
12050
  },
12037
12051
  "node_modules/node-forge": {
12038
- "version": "1.3.1",
12039
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
12040
- "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
12052
+ "version": "1.3.2",
12053
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.2.tgz",
12054
+ "integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==",
12041
12055
  "license": "(BSD-3-Clause OR GPL-2.0)",
12042
12056
  "engines": {
12043
12057
  "node": ">= 6.13.0"
@@ -12644,6 +12658,7 @@
12644
12658
  }
12645
12659
  ],
12646
12660
  "license": "MIT",
12661
+ "peer": true,
12647
12662
  "dependencies": {
12648
12663
  "nanoid": "^3.3.11",
12649
12664
  "picocolors": "^1.1.1",
@@ -13709,6 +13724,7 @@
13709
13724
  "version": "6.0.10",
13710
13725
  "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
13711
13726
  "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
13727
+ "peer": true,
13712
13728
  "dependencies": {
13713
13729
  "cssesc": "^3.0.0",
13714
13730
  "util-deprecate": "^1.0.2"
@@ -14142,6 +14158,7 @@
14142
14158
  "version": "18.2.0",
14143
14159
  "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
14144
14160
  "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
14161
+ "peer": true,
14145
14162
  "dependencies": {
14146
14163
  "loose-envify": "^1.1.0"
14147
14164
  },
@@ -14286,6 +14303,7 @@
14286
14303
  "version": "18.2.0",
14287
14304
  "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
14288
14305
  "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
14306
+ "peer": true,
14289
14307
  "dependencies": {
14290
14308
  "loose-envify": "^1.1.0",
14291
14309
  "scheduler": "^0.23.0"
@@ -14308,6 +14326,7 @@
14308
14326
  "version": "0.11.0",
14309
14327
  "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
14310
14328
  "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==",
14329
+ "peer": true,
14311
14330
  "engines": {
14312
14331
  "node": ">=0.10.0"
14313
14332
  }
@@ -14799,6 +14818,7 @@
14799
14818
  "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz",
14800
14819
  "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==",
14801
14820
  "license": "MIT",
14821
+ "peer": true,
14802
14822
  "bin": {
14803
14823
  "rollup": "dist/bin/rollup"
14804
14824
  },
@@ -14984,6 +15004,7 @@
14984
15004
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
14985
15005
  "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
14986
15006
  "license": "MIT",
15007
+ "peer": true,
14987
15008
  "dependencies": {
14988
15009
  "fast-deep-equal": "^3.1.1",
14989
15010
  "fast-json-stable-stringify": "^2.0.0",
@@ -16049,6 +16070,7 @@
16049
16070
  "version": "0.20.2",
16050
16071
  "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
16051
16072
  "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
16073
+ "peer": true,
16052
16074
  "engines": {
16053
16075
  "node": ">=10"
16054
16076
  },
@@ -16348,6 +16370,7 @@
16348
16370
  "version": "5.94.0",
16349
16371
  "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz",
16350
16372
  "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==",
16373
+ "peer": true,
16351
16374
  "dependencies": {
16352
16375
  "@types/estree": "^1.0.5",
16353
16376
  "@webassemblyjs/ast": "^1.12.1",
@@ -16434,6 +16457,7 @@
16434
16457
  "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz",
16435
16458
  "integrity": "sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==",
16436
16459
  "license": "MIT",
16460
+ "peer": true,
16437
16461
  "dependencies": {
16438
16462
  "@types/bonjour": "^3.5.9",
16439
16463
  "@types/connect-history-api-fallback": "^1.3.5",
@@ -16750,6 +16774,7 @@
16750
16774
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
16751
16775
  "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
16752
16776
  "license": "MIT",
16777
+ "peer": true,
16753
16778
  "dependencies": {
16754
16779
  "fast-deep-equal": "^3.1.1",
16755
16780
  "fast-json-stable-stringify": "^2.0.0",
@@ -17324,9 +17349,10 @@
17324
17349
  }
17325
17350
  },
17326
17351
  "node_modules/ws": {
17327
- "version": "7.5.8",
17328
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.8.tgz",
17329
- "integrity": "sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw==",
17352
+ "version": "7.5.10",
17353
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
17354
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
17355
+ "license": "MIT",
17330
17356
  "engines": {
17331
17357
  "node": ">=8.3.0"
17332
17358
  },
package/dist/svgMap.css CHANGED
@@ -63,14 +63,28 @@
63
63
  }
64
64
  .svgMap-map-wrapper .svgMap-map-controls-wrapper {
65
65
  position: absolute;
66
- bottom: 10px;
67
- left: 10px;
68
66
  z-index: 1;
69
67
  display: flex;
70
68
  overflow: hidden;
71
69
  border-radius: 2px;
72
70
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
73
71
  }
72
+ .svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-bottomLeft {
73
+ bottom: 10px;
74
+ left: 10px;
75
+ }
76
+ .svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-bottomRight {
77
+ bottom: 10px;
78
+ right: 10px;
79
+ }
80
+ .svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-topLeft {
81
+ top: 10px;
82
+ left: 10px;
83
+ }
84
+ .svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-topRight {
85
+ top: 10px;
86
+ right: 10px;
87
+ }
74
88
  .svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-disabled {
75
89
  display: none;
76
90
  }
@@ -166,6 +180,7 @@
166
180
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
167
181
  }
168
182
  .svgMap-map-wrapper .svgMap-country {
183
+ fill: #E2E2E2;
169
184
  stroke: #fff;
170
185
  stroke-width: 1;
171
186
  stroke-linejoin: round;
package/dist/svgMap.js CHANGED
@@ -46,13 +46,16 @@ function svgMapWrapper(svgPanZoom) {
46
46
  // The message to show for MacOS
47
47
  mouseWheelKeyMessageMac: 'Press the [COMMAND] key to zoom',
48
48
 
49
+ // Position of the zoom buttons
50
+ zoomButtonsPosition: 'bottomLeft',
51
+
49
52
  // Data colors
50
53
  colorMax: '#CC0033',
51
54
  colorMin: '#FFE5D9',
52
55
  colorNoData: '#E2E2E2',
53
56
 
54
- // Color attribute for setting a manual color in the data object
55
- manualColorAttribute: 'color',
57
+ // Ratio type for the color scale, can be 'linear' or 'log' for logarithmic or a custom function (value, min, max) => ratio
58
+ ratioType: 'linear',
56
59
 
57
60
  // The flag type can be 'image' or 'emoji'
58
61
  flagType: 'image',
@@ -406,9 +409,9 @@ function svgMapWrapper(svgPanZoom) {
406
409
  });
407
410
 
408
411
  data.data[data.applyData].thresholdMax &&
409
- (max = Math.min(max, data.data[data.applyData].thresholdMax));
412
+ (max = Math.min(max, data.data[data.applyData].thresholdMax));
410
413
  data.data[data.applyData].thresholdMin &&
411
- (min = Math.max(min, data.data[data.applyData].thresholdMin));
414
+ (min = Math.max(min, data.data[data.applyData].thresholdMin));
412
415
 
413
416
  // Loop through countries and set colors
414
417
  Object.keys(this.countries).forEach(
@@ -431,17 +434,45 @@ function svgMapWrapper(svgPanZoom) {
431
434
  min,
432
435
  parseInt(data.values[countryID][data.applyData], 10)
433
436
  );
434
- var ratio = Math.max(0, Math.min(1, (value - min) / (max - min)));
437
+
435
438
  var color = this.getColor(
436
439
  this.toHex(this.options.colorMax),
437
440
  this.toHex(this.options.colorMin),
438
- ratio || ratio === 0 ? ratio : 1
441
+ this.calculateColorRatio(value, min, max, this.options.ratioType)
439
442
  );
440
443
  element.setAttribute('fill', color);
441
444
  }.bind(this)
442
445
  );
443
446
  };
444
447
 
448
+ svgMap.prototype.calculateColorRatio = function (value, min, max, ratioType) {
449
+ var range = max - min;
450
+ var positionInRange = value - min;
451
+
452
+ if (range === 0 || positionInRange === 0) {
453
+ return 0;
454
+ }
455
+
456
+ if (ratioType === 'log') {
457
+ var logValue = Math.log(positionInRange + 1);
458
+ var logMin = Math.log(1);
459
+ var logMax = Math.log(range + 1);
460
+ var ratio = Math.max(0, Math.min(1, (logValue - logMin) / (logMax - logMin)));
461
+ return ratio || ratio === 0 ? ratio : 1;
462
+ }
463
+
464
+ if (ratioType === 'linear') {
465
+ var ratio = Math.max(0, Math.min(1, positionInRange / range));
466
+ return ratio || ratio === 0 ? ratio : 1;
467
+ }
468
+
469
+ if (typeof ratioType === 'function') {
470
+ return ratioType(value, min, max);
471
+ }
472
+
473
+ return 1;
474
+ }
475
+
445
476
  // Emoji flags
446
477
 
447
478
  svgMap.prototype.emojiFlags = {
@@ -782,6 +813,7 @@ function svgMapWrapper(svgPanZoom) {
782
813
  'svgMap-map-controls-wrapper',
783
814
  this.mapWrapper
784
815
  );
816
+ mapControlsWrapper.classList.add('svgMap-controls-position-' + this.options.zoomButtonsPosition);
785
817
  var zoomContainer = this.createElement(
786
818
  'div',
787
819
  'svgMap-map-controls-zoom',
@@ -1144,7 +1176,7 @@ function svgMapWrapper(svgPanZoom) {
1144
1176
  if ((value !== undefined && this.options.hideMissingData === true) || this.options.hideMissingData === false) {
1145
1177
  item.floatingNumbers && (value = value.toFixed(1));
1146
1178
  item.thousandSeparator &&
1147
- (value = this.numberWithCommas(value, item.thousandSeparator));
1179
+ (value = this.numberWithCommas(value, item.thousandSeparator));
1148
1180
  value = item.format
1149
1181
  ? item.format.replace('{0}', '<span>' + value + '</span>')
1150
1182
  : '<span>' + value + '</span>';
@@ -1190,8 +1222,8 @@ function svgMapWrapper(svgPanZoom) {
1190
1222
  svgMap.prototype.zoomMap = function (direction) {
1191
1223
  if (
1192
1224
  this[
1193
- 'zoomControl' + direction.charAt(0).toUpperCase() + direction.slice(1)
1194
- ].classList.contains('svgMap-disabled')
1225
+ 'zoomControl' + direction.charAt(0).toUpperCase() + direction.slice(1)
1226
+ ].classList.contains('svgMap-disabled')
1195
1227
  ) {
1196
1228
  return false;
1197
1229
  }
@@ -1248,7 +1280,7 @@ function svgMapWrapper(svgPanZoom) {
1248
1280
  }
1249
1281
 
1250
1282
  this.autoHideMouseWheelNoticeTimeout &&
1251
- clearTimeout(this.autoHideMouseWheelNoticeTimeout);
1283
+ clearTimeout(this.autoHideMouseWheelNoticeTimeout);
1252
1284
  this.autoHideMouseWheelNoticeTimeout = setTimeout(
1253
1285
  function () {
1254
1286
  this.hideMouseWheelZoomNotice();
@@ -1264,7 +1296,7 @@ function svgMapWrapper(svgPanZoom) {
1264
1296
  svgMap.prototype.hideMouseWheelZoomNotice = function () {
1265
1297
  this.wrapper.classList.remove('svgMap-block-zoom-notice-active');
1266
1298
  this.autoHideMouseWheelNoticeTimeout &&
1267
- clearTimeout(this.autoHideMouseWheelNoticeTimeout);
1299
+ clearTimeout(this.autoHideMouseWheelNoticeTimeout);
1268
1300
  };
1269
1301
 
1270
1302
  // Block shing the zoom wheel notice for some time
@@ -1272,7 +1304,7 @@ function svgMapWrapper(svgPanZoom) {
1272
1304
  svgMap.prototype.blockMouseWheelZoomNotice = function (duration) {
1273
1305
  this.mouseWheelNoticeJustHidden = true;
1274
1306
  this.mouseWheelNoticeJustHiddenTimeout &&
1275
- clearTimeout(this.mouseWheelNoticeJustHiddenTimeout);
1307
+ clearTimeout(this.mouseWheelNoticeJustHiddenTimeout);
1276
1308
  this.mouseWheelNoticeJustHiddenTimeout = setTimeout(
1277
1309
  function () {
1278
1310
  this.mouseWheelNoticeJustHidden = false;
@@ -1,2 +1,2 @@
1
1
  /*! svgMap | https://github.com/StephanWagner/svgMap | MIT License | Copyright Stephan Wagner | https://stephanwagner.me */
2
- .svgMap-container,.svgMap-wrapper{position:relative}.svgMap-block-zoom-notice{position:absolute;z-index:2;top:100%;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);pointer-events:none;opacity:0;color:#fff;transition:opacity 250ms}.svgMap-block-zoom-notice-active .svgMap-block-zoom-notice{pointer-events:all;top:0;opacity:1}.svgMap-block-zoom-notice>div{position:absolute;top:50%;left:0;right:0;text-align:center;padding:0 32px;transform:translateY(-50%);font-size:28px}@media (max-width:900px){.svgMap-block-zoom-notice>div{font-size:22px}}.svgMap-map-wrapper{position:relative;width:100%;padding-top:50%;overflow:hidden;background:#d9ecff;color:#111}.svgMap-map-wrapper *{box-sizing:border-box}.svgMap-map-wrapper :focus:not(:focus-visible){outline:0}.svgMap-map-wrapper .svgMap-map-image{display:block;position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.svgMap-map-wrapper .svgMap-map-controls-wrapper{position:absolute;bottom:10px;left:10px;z-index:1;display:flex;overflow:hidden;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-disabled{display:none}.svgMap-map-wrapper .svgMap-map-controls-move,.svgMap-map-wrapper .svgMap-map-controls-zoom{display:flex;margin-right:5px;overflow:hidden;background:#fff}.svgMap-map-wrapper .svgMap-map-controls-move:last-child,.svgMap-map-wrapper .svgMap-map-controls-zoom:last-child{margin-right:0}.svgMap-map-wrapper .svgMap-control-button{background-color:#fff;border:none;border-radius:0;color:#fff;font:inherit;line-height:inherit;margin:0;padding:0;overflow:visible;text-transform:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;width:32px;height:32px;position:relative}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#ccc;transition:background-color 250ms}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button::before{width:11px;height:3px}@media (hover:hover){.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover::before{background:#000}}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active::before{background:#000}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button::before{width:11px;height:11px;background:0 0;border:2px solid #ccc;transition:border-color 250ms}@media (hover:hover){.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button:hover::before{background:0 0;border-color:#000}}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button:active::before{background:0 0;border-color:#000}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled::before{background:#eee}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button.svgMap-disabled{cursor:default}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button.svgMap-disabled::before{border:2px solid #eee;background:0 0}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button::after{width:3px;height:11px}.svgMap-map-wrapper .svgMap-map-continent-controls-wrapper{position:absolute;top:10px;right:10px;z-index:1;display:flex;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-country{stroke:#fff;stroke-width:1;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:fill 250ms,stroke 250ms}.svgMap-map-wrapper .svgMap-country[data-link]{cursor:pointer}@media (hover:hover){.svgMap-map-wrapper .svgMap-country:hover{stroke:#333;stroke-width:1.5}}.svgMap-map-wrapper .svgMap-country.svgMap-active{stroke:#333;stroke-width:1.5}.svgMap-tooltip{box-shadow:0 0 3px rgba(0,0,0,.2);position:absolute;z-index:2;border-radius:2px;background:#fff;transform:translate(-50%,-100%);border-bottom:1px solid #111;display:none;pointer-events:none;min-width:60px}.svgMap-tooltip.svgMap-tooltip-flipped{transform:translate(-50%,0);border-bottom:0;border-top:1px solid #111}.svgMap-tooltip.svgMap-active{display:block}.svgMap-tooltip .svgMap-tooltip-content-container{position:relative;padding:10px 20px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container{text-align:center;margin:2px 0 5px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container.svgMap-tooltip-flag-container-emoji{font-size:50px;line-height:0;padding:25px 0 15px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container .svgMap-tooltip-flag{display:block;margin:auto;width:auto;height:32px;padding:2px;background:rgba(0,0,0,.15);border-radius:2px}.svgMap-tooltip .svgMap-tooltip-title{white-space:nowrap;font-size:18px;line-height:28px;padding:0 0 8px;text-align:center}.svgMap-tooltip .svgMap-tooltip-content{white-space:nowrap;text-align:center;font-size:14px;color:#777;margin:-5px 0 0}.svgMap-tooltip .svgMap-tooltip-content table{padding:0;border-spacing:0;margin:auto}.svgMap-tooltip .svgMap-tooltip-content table td{padding:2px 0;text-align:left}.svgMap-tooltip .svgMap-tooltip-content table td span{color:#111}.svgMap-tooltip .svgMap-tooltip-content table td:first-child{padding-right:10px;text-align:right}.svgMap-tooltip .svgMap-tooltip-content table td sup{vertical-align:baseline;position:relative;top:-5px}.svgMap-tooltip .svgMap-tooltip-content .svgMap-tooltip-no-data{padding:2px 0;color:#777;font-style:italic}.svgMap-tooltip .svgMap-tooltip-pointer{position:absolute;top:100%;left:50%;transform:translateX(-50%);overflow:hidden;height:10px;width:30px}.svgMap-tooltip .svgMap-tooltip-pointer::after{content:"";width:20px;height:20px;background:#fff;border:1px solid #111;position:absolute;bottom:6px;left:50%;transform:translateX(-50%) rotate(45deg)}.svgMap-tooltip.svgMap-tooltip-flipped .svgMap-tooltip-pointer{bottom:auto;top:-10px;transform:translateX(-50%) scaleY(-1)}
2
+ .svgMap-container,.svgMap-wrapper{position:relative}.svgMap-block-zoom-notice{position:absolute;z-index:2;top:100%;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);pointer-events:none;opacity:0;color:#fff;transition:opacity 250ms}.svgMap-block-zoom-notice-active .svgMap-block-zoom-notice{pointer-events:all;top:0;opacity:1}.svgMap-block-zoom-notice>div{position:absolute;top:50%;left:0;right:0;text-align:center;padding:0 32px;transform:translateY(-50%);font-size:28px}@media (max-width:900px){.svgMap-block-zoom-notice>div{font-size:22px}}.svgMap-map-wrapper{position:relative;width:100%;padding-top:50%;overflow:hidden;background:#d9ecff;color:#111}.svgMap-map-wrapper *{box-sizing:border-box}.svgMap-map-wrapper :focus:not(:focus-visible){outline:0}.svgMap-map-wrapper .svgMap-map-image{display:block;position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.svgMap-map-wrapper .svgMap-map-controls-wrapper{position:absolute;z-index:1;display:flex;overflow:hidden;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-bottomLeft{bottom:10px;left:10px}.svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-bottomRight{bottom:10px;right:10px}.svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-topLeft{top:10px;left:10px}.svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-controls-position-topRight{top:10px;right:10px}.svgMap-map-wrapper .svgMap-map-controls-wrapper.svgMap-disabled{display:none}.svgMap-map-wrapper .svgMap-map-controls-move,.svgMap-map-wrapper .svgMap-map-controls-zoom{display:flex;margin-right:5px;overflow:hidden;background:#fff}.svgMap-map-wrapper .svgMap-map-controls-move:last-child,.svgMap-map-wrapper .svgMap-map-controls-zoom:last-child{margin-right:0}.svgMap-map-wrapper .svgMap-control-button{background-color:#fff;border:none;border-radius:0;color:#fff;font:inherit;line-height:inherit;margin:0;padding:0;overflow:visible;text-transform:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;width:32px;height:32px;position:relative}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#ccc;transition:background-color 250ms}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button::before{width:11px;height:3px}@media (hover:hover){.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover::before{background:#000}}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active::before{background:#000}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button::before{width:11px;height:11px;background:0 0;border:2px solid #ccc;transition:border-color 250ms}@media (hover:hover){.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button:hover::before{background:0 0;border-color:#000}}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button:active::before{background:0 0;border-color:#000}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled::after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled::before{background:#eee}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button.svgMap-disabled{cursor:default}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button.svgMap-disabled::before{border:2px solid #eee;background:0 0}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button::after{width:3px;height:11px}.svgMap-map-wrapper .svgMap-map-continent-controls-wrapper{position:absolute;top:10px;right:10px;z-index:1;display:flex;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-country{fill:#e2e2e2;stroke:#fff;stroke-width:1;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:fill 250ms,stroke 250ms}.svgMap-map-wrapper .svgMap-country[data-link]{cursor:pointer}@media (hover:hover){.svgMap-map-wrapper .svgMap-country:hover{stroke:#333;stroke-width:1.5}}.svgMap-map-wrapper .svgMap-country.svgMap-active{stroke:#333;stroke-width:1.5}.svgMap-tooltip{box-shadow:0 0 3px rgba(0,0,0,.2);position:absolute;z-index:2;border-radius:2px;background:#fff;transform:translate(-50%,-100%);border-bottom:1px solid #111;display:none;pointer-events:none;min-width:60px}.svgMap-tooltip.svgMap-tooltip-flipped{transform:translate(-50%,0);border-bottom:0;border-top:1px solid #111}.svgMap-tooltip.svgMap-active{display:block}.svgMap-tooltip .svgMap-tooltip-content-container{position:relative;padding:10px 20px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container{text-align:center;margin:2px 0 5px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container.svgMap-tooltip-flag-container-emoji{font-size:50px;line-height:0;padding:25px 0 15px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container .svgMap-tooltip-flag{display:block;margin:auto;width:auto;height:32px;padding:2px;background:rgba(0,0,0,.15);border-radius:2px}.svgMap-tooltip .svgMap-tooltip-title{white-space:nowrap;font-size:18px;line-height:28px;padding:0 0 8px;text-align:center}.svgMap-tooltip .svgMap-tooltip-content{white-space:nowrap;text-align:center;font-size:14px;color:#777;margin:-5px 0 0}.svgMap-tooltip .svgMap-tooltip-content table{padding:0;border-spacing:0;margin:auto}.svgMap-tooltip .svgMap-tooltip-content table td{padding:2px 0;text-align:left}.svgMap-tooltip .svgMap-tooltip-content table td span{color:#111}.svgMap-tooltip .svgMap-tooltip-content table td:first-child{padding-right:10px;text-align:right}.svgMap-tooltip .svgMap-tooltip-content table td sup{vertical-align:baseline;position:relative;top:-5px}.svgMap-tooltip .svgMap-tooltip-content .svgMap-tooltip-no-data{padding:2px 0;color:#777;font-style:italic}.svgMap-tooltip .svgMap-tooltip-pointer{position:absolute;top:100%;left:50%;transform:translateX(-50%);overflow:hidden;height:10px;width:30px}.svgMap-tooltip .svgMap-tooltip-pointer::after{content:"";width:20px;height:20px;background:#fff;border:1px solid #111;position:absolute;bottom:6px;left:50%;transform:translateX(-50%) rotate(45deg)}.svgMap-tooltip.svgMap-tooltip-flipped .svgMap-tooltip-pointer{bottom:auto;top:-10px;transform:translateX(-50%) scaleY(-1)}