[
  {
    "path": ".devcontainer/devcontainer.json",
    "content": "{\n  \"name\": \"formulaone-card Dev\",\n  \"image\": \"marcokreeft/hass-custom-devcontainer\",\n  \"postCreateCommand\": \"sudo -E container setup-dev && npm add && sudo hass -c /config -v\",\n  \"containerEnv\": {\n    \"DEVCONTAINER\": \"1\"\n  },\n  \"appPort\": \"8124:8123\",\n  \"forwardPorts\": [8123],\n  \"mounts\": [\n    \"source=${localWorkspaceFolder},target=/config/www/workspace,type=bind\",\n    \"source=${localWorkspaceFolder}/test,target=/config/test,type=bind\",\n    \"source=${localWorkspaceFolder}/test/configuration.yaml,target=/config/configuration.yaml,type=bind\"\n  ],\n  \"runArgs\": [\"--env-file\", \"${localWorkspaceFolder}/test/.env\"],\n  \"extensions\": [\n    \"github.vscode-pull-request-github\",\n    \"esbenp.prettier-vscode\",\n    \"spmeesseman.vscode-taskexplorer\"\n  ],\n  \"settings\": {\n    \"files.eol\": \"\\n\",\n    \"editor.tabSize\": 2,\n    \"editor.formatOnPaste\": false,\n    \"editor.formatOnSave\": true,\n    \"editor.formatOnType\": true,\n    \"[javascript]\": {\n      \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n    },\n    \"[typescript]\": {\n      \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n    },\n    \"files.trimTrailingWhitespace\": true\n  }\n}\n\n// {\n// \t\"image\": \"thomasloven/hass-custom-devcontainer\",\n// \t\"postCreateCommand\": \"container setup && npm add\",\n// \t\"forwardPorts\": [8123],\n// \t\"mounts\": [\n// \t  \"source=${localWorkspaceFolder},target=/config/www/workspace,type=bind\",\n// \t  \"source=${localWorkspaceFolder}/test,target=/config/test,type=bind\",\n// \t  \"source=${localWorkspaceFolder}/test/configuration.yaml,target=/config/configuration.yaml,type=bind\"\n// \t],\n// \t\"runArgs\": [\"--env-file\", \"${localWorkspaceFolder}/test/.env\"]\n// }\n"
  },
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n    \"env\": {\n        \"browser\": true,\n        \"commonjs\": true,\n        \"es2021\": true\n    },\n    \"extends\": [\n        \"eslint:recommended\",\n        \"plugin:@typescript-eslint/recommended\"\n    ],\n    \"overrides\": [\n    ],\n    \"parser\": \"@typescript-eslint/parser\",\n    \"parserOptions\": {\n        \"ecmaVersion\": \"latest\"\n    },\n    \"plugins\": [\n        \"@typescript-eslint\"\n    ],\n    \"rules\": {\n    }\n}\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n - OS: [e.g. iOS]\n - Browser [e.g. chrome, safari]\n - Version [e.g. 22]\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. iPhone6]\n - OS: [e.g. iOS8.1]\n - Browser [e.g. stock browser, safari]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: enhancement\nassignees: ''\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Have you tried if it is already a feature? Have you checked the wiki?**\nA lot of feature requests are closed because the functionality is already existing \n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/workflows/pr.yml",
    "content": "name: Tests\n\n# Controls when the workflow will run\non:\n  # Triggers the workflow on push or pull request events but only for the \"master\" branch\n  pull_request:\n    branches: [ \"main\" ]\n\n  # Allows you to run this workflow manually from the Actions tab\n  workflow_dispatch:\n\n# A workflow run is made up of one or more jobs that can run sequentially or in parallel\njobs:\n  hacs:\n    permissions: write-all\n    runs-on: \"ubuntu-latest\"\n    name: Test and validate\n    steps:\n      - name: Check out the repository\n        uses: actions/checkout@v3\n\n      - name: Set Timezone\n        uses: szenius/set-timezone@v1.0\n        with:\n          timezoneLinux: \"Europe/Amsterdam\"\n          timezoneMacos: \"Europe/Amsterdam\"\n          timezoneWindows: \"Central European Time\"\n\n      - name: Install dependencies\n        run: npm install\n\n      - name: Build project\n        run: npm run build\n"
  },
  {
    "path": ".github/workflows/push.yml",
    "content": "name: Tests\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - '**'\n      - '!README.md'\n  workflow_dispatch:\n\njobs:\n  hacs:\n    runs-on: \"ubuntu-latest\"\n    name: Test, Build, and Release\n    steps:\n      - name: Check out the repository\n        uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n\n      - name: Set Timezone\n        uses: szenius/set-timezone@v1.0\n        with:\n          timezoneLinux: \"Europe/Amsterdam\"\n          timezoneMacos: \"Europe/Amsterdam\"\n          timezoneWindows: \"Central European Time\"\n\n      - name: HACS validation\n        uses: hacs/action@main\n        with:\n          category: \"plugin\"\n          ignore: brands\n\n      - name: Set up Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: '20'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Build project\n        run: npm run build\n\n      - name: Get version from package.json\n        id: package_version\n        run: |\n          VERSION=$(node -p \"require('./package.json').version\")\n          echo \"version=$VERSION\" >> $GITHUB_OUTPUT\n\n      - name: Create Git tag from package.json version\n        run: |\n          git config user.name \"github-actions\"\n          git config user.email \"github-actions@github.com\"\n          git tag v${{ steps.package_version.outputs.version }}\n          git push origin v${{ steps.package_version.outputs.version }}\n\n      - name: Get commit messages since last tag\n        id: changelog\n        run: |\n          LAST_TAG=$(git describe --tags --abbrev=0)\n          LOG=$(git log ${LAST_TAG}..HEAD    --pretty=format:\"- %s\")\n          echo \"log<<EOF\" >> $GITHUB_ENV\n          echo \"$LOG\" >> $GITHUB_ENV\n          echo \"EOF\" >> $GITHUB_ENV\n\n      - name: Get latest commit message\n        id: get_commit\n        run: echo \"message=$(git log -1 --pretty=%B)\" >> \"$GITHUB_OUTPUT\"\n\n      - name: Create GitHub Release\n        id: create_release\n        uses: softprops/action-gh-release@v2\n        with:\n          body: ${{ env.log }}\n          tag_name: v${{ steps.package_version.outputs.version }}\n          name: v${{ steps.package_version.outputs.version }}\n          files: |\n            formulaone-card.js\n            formulaone-card.js.gz\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Print release ID\n        run: echo \"Release created with ID ${{ steps.create_release.outputs.id }}\"\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules/*\ncoverage/*\nformulaone-card.js\nformulaone-card.js.gz\n"
  },
  {
    "path": ".nvmrc",
    "content": "v18\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 Marco Kreeft\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# FormulaOne Card\n\n[![GH-release](https://img.shields.io/github/v/release/marcokreeft87/formulaone-card.svg?style=flat-square)](https://github.com/marcokreeft87/formulaone-card/releases)\n[![GH-last-commit](https://img.shields.io/github/last-commit/marcokreeft87/formulaone-card.svg?style=flat-square)](https://github.com/marcokreeft87/formulaone-card/commits/master)\n[![GH-code-size](https://img.shields.io/github/languages/code-size/marcokreeft87/formulaone-card.svg?color=red&style=flat-square)](https://github.com/marcokreeft87/formulaone-card)\n[![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg?style=flat-square)](https://github.com/hacs/default)\n[![Codecov Coverage](https://img.shields.io/codecov/c/github/marcokreeft87/formulaone-card/main.svg?style=flat-square)](https://codecov.io/gh/marcokreeft87/formulaone-card/)\n[![CodeFactor](https://www.codefactor.io/repository/github/marcokreeft87/formulaone-card/badge?style=flat-square)](https://www.codefactor.io/repository/github/marcokreeft87/formulaone-card)\n\n# This card just displays the data. Data related bugs will probably be closed immediately\n\nPresent the data of [Formula One](https://ergast.com/mrd/) in a pretty way\n\nWatch a demo of the card by BeardedTinker!\n\n[![Demo of BeardedTinker](https://img.youtube.com/vi/z7blY6D-Qmk/0.jpg)](https://www.youtube.com/watch?v=z7blY6D-Qmk)\n\n## Installation\n\n### HACS (recommended)\n\nMake sure you have [HACS](https://hacs.xyz/) (Home Assistant Community Store) installed.\n<br>\n<sub>_HACS is a third party community store and is not included in Home Assistant out of the box._</sub>\n\nJust click here to directly go to the repository in HACS and click \"Download\": [![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=marcokreeft87&repository=formulaone-card&category=plugin)\n\nOr:\n\n- Open HACS\n- Go to \"Frontend\" section\n- Click button with \"+\" icon\n- Search for \"formulaone-card\"\n- Click \"Download\" button and install repository in HACS\n\nIn both situations:\n\n- _If u are using YAML mode then add this to your_ [Lovelace resources](https://my.home-assistant.io/redirect/lovelace_resources/)\n\n  ```yaml\n  url: /hacsfiles/formulaone-card/formulaone-card.js\n  type: module\n  ```\n\n- Refresh your browser\n\n### Manual install\n\nManually download [formulaone-card.js](https://raw.githubusercontent.com/marcokreeft87/formulaone-card/master/formulaone-card.js) and add it\nto your `<config>/www/` folder and add the following to the `configuration.yaml` file:\n\n```yaml\nlovelace:\n  resources:\n    - url: /local/formulaone-card.js\n      type: module\n```\n\nThe above configuration can be managed directly in the Configuration -> Lovelace Dashboards -> Resources panel when not using YAML mode,\nor added by clicking the \"Add to lovelace\" button on the HACS dashboard after installing the plugin.\n\n> [!TIP]\n> If you don't want to use the data from the Jolpi API directy but want to use a Home Assistant integration instead. Use [F1 sensor](https://github.com/Nicxe/f1_sensor)\n\n## Configuration\n\n| Name              | Type          | Default                             | Description                                      |\n| ----------------- | ------------- | ----------------------------------- | ------------------------------------------------ |\n| type              | string        | **Required**                        | `custom:formulaonecard`                          |\n| source            | string        | 'jolpi'    |  The source you want to use for the card (jolpi/f1sensor). You will have to set the entity |\n| entity            | string        |            | Only required when using source: f1sensor. Set it to the entity that contains the data needed for the card. So for example when using driver_standings use entity: sensor.f1_driver_standings |\n| card_type         | string        | **Required**                        | The type of card you want to display (driver_standings,constructor_standings,next_race,schedule,last_result,results,countdown)            |\n| title             | string        |                                     | The header of the card ( hidden when null or empty)            |\n| date_locale       | string        |                                     | Override the locale used for the date and time formatting. [Available options listed here](https://www.w3.org/International/O-charset-lang.html)|\n| image_clickable   | boolean       | `false`                             | Click on image leads to wikipedia, or not   |\n| show_carnumber    | boolean       | `false`                             | Show the number of the car   |\n| show_raceinfo     | boolean       | `false`                             | Show the info of the race in the countdown and next_race card |\n| hide_tracklayout  | boolean       | `false`                             | Hide the track layout image in the card |\n| hide_racedatetimes | boolean       | `false`                        | Hide the race information (dates and times of the qualifications/race/sprint) in the card |\n| f1_font           | boolean       | `false`                             | Use the official F1 font for headers |\n| location_clickable| boolean       | `false`                             | Click on the location leads to wikipedia   |\n| previous_race     | enum          |                           |   Hide/strikethrough or make the past races italic options are (hide, strikethrough or italic) |\n| standings         | object        |                                     | Configuration for the driver standings card     |\n| translations      | dictionary    |  _[translations](#translations)_          | Dictionary to override the default translation  |\n| actions           | object        |  _[Actions](#actions)_                                    | The tap, double tap or hold actions set on the image of the countdown, last_result, results, qualifying_results and next-race cards |\n| row_limit         | number        |                                     | Limit the schedule, results, last_result, driver_standings and constructor_standings to this amount of row |\n| countdown_type    | string or array | 'race'                              | Set the event to countdown to (race,qualifying,practice1,practice2,practice3,sprint,sprint_qualifying) |\n| show_weather      | boolean       | `false`                             | Show the _[weather forecast](#Forecast)_ of the upcoming race |\n| next_race_delay   | number        |                                     | Delay (in hours) before the card switches to the next race |\n| show_lastyears_result | boolean   | `false`                             | Show the winner of last year (next_race, countdown) |\n| only_show_date    | boolean       | `false`                             | Show the date of the next race (next_race)          |\n| tabs_order        | array         |'results', 'qualifying', 'sprint'    | Determine the order of the tabs (result)    |\n| show_refresh      | boolean       |`false`                              | Show the refresh button (top right)    |\n| next_race_display | enum          |`date`                               | Show the date, time or both for the next race (date,time,datetime)    |\n| show_event_details | boolean      |`false`                              | Show the date of the next event (countdown) |\n| countdown_format | string         | d h m s                             | Determine which parts of the countdown is displayed, d (days), h (hours), m (minutes) or s (seconds) |\n\n### Actions\n\nThis card supports all the default HA actions, except from more-info and toggle. See [Lovelace Actions](https://www.home-assistant.io/lovelace/actions/)\nfor more detailed descriptions and examples.\n\n| Name            | Type        | Default      | Description                                                                                |\n| --------------- | ----------- | ------------ | ------------------------------------------------------------------------------------------ |\n| action          | string      | **Required** | `call-service`, `url`, `navigate`, `fire-dom-event`, `none`         |\n| service         | string      |              | Service to call when `action` is `call-service`                                            |\n| service_data    | object      |              | Optional data to include when `action` is `call-service`                                   |\n| url_path        | string      |              | URL to open when `action` is `url`                                                         |\n| navigation_path | string      |              | Path to navigate to when `action` is `navigate`                                            |\n| confirmation    | bool/object | `false`      | Enable confirmation dialog                                                                 |\n| haptic          | string      | `none`       | Haptic feedback (`success`, `warning`, `failure`, `light`, `medium`, `heavy`, `selection`) |\n\nActions example:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: next_race\nshow_raceinfo: true\nactions:\n  tap_action:\n    action: navigate\n    navigation_path: /lovelace/overview\n\n```\n\n## Example configurations\n\n### Next race\n\n```yaml\ntype: custom:formulaone-card\ncard_type: next_race\ntitle: Next Race\ndate_locale: nl\nimage_clickable: false\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120592-3df715bc-888d-460b-8743-ec1ab6017b96.png)\n\n### Constructor standings\n\n```yaml\ntype: custom:formulaone-card\ncard_type: constructor_standings\ntitle: Constructor Standings\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120698-b981aac2-8678-4f35-afc9-ca6bb8514566.png)\n\n```yaml\ntype: custom:formulaone-card\ncard_type: constructor_standings\ntitle: Constructor Standings\nstandings:\n  show_teamlogo: true\n```\n\n![image](https://user-images.githubusercontent.com/10223677/213992061-91ade5f2-68bb-4572-84a1-5d5cf38e0645.png)\n\n### Driver standings\n\n```yaml\ntype: custom:formulaone-card\ncard_type: driver_standings\ntitle: Driver Standings\n\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120796-28532a9d-a62d-44bb-8cb8-403bfa434a8b.png)\n\nThis card can also show the flags and team names of the driver:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: driver_standings\ntitle: Driver Standings\nstandings:\n  show_flag: true\n  show_team: true\n  show_teamlogo: true\n  \n```\n\n### Schedule\n\n```yaml\ntype: custom:formulaone-card\ncard_type: schedule\ntitle: Schedule\ndate_locale: nl\n\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120864-be0db0e9-dd0b-42aa-8829-d094c23ef0a5.png)\n\nThis card can also show the flags of the countries of the tracks:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: schedule\nstandings:\n  show_flag: true\n\n```\n\n### Last results\n\n```yaml\ntype: custom:formulaone-card\ncard_type: last_result\ntitle: Last Result\n\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120925-5fc6c1a7-8b2a-4c58-b89c-d0316d70efe9.png)\n\n### Results\n\n```yaml\ntype: custom:formulaone-card\ncard_type: results\ntitle: Results\n```\n\n![image](https://user-images.githubusercontent.com/10223677/216916869-4d2dc991-3429-45f8-b286-0b08d538031f.png)\n\nThis card can also show the flags and team names of the driver, alongside the logo of the teams:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: results\ntitle: Results\nstandings:\n  show_flag: true\n  show_team: true\n  show_teamlogo: true\n  \n```\n\n### Countdown\n\n```yaml\ntype: custom:formulaone-card\ncard_type: countdown\n```\n\n![image](https://user-images.githubusercontent.com/10223677/213435405-fdb2ff7c-3364-43d5-80b0-0f253d9b60c8.png)\n\n```yaml\ntype: custom:formulaone-card\ncard_type: countdown\nf1_font: true\n```\n\n![image](https://user-images.githubusercontent.com/10223677/215340692-898a03ef-2f66-46fd-92da-6e842d413500.png)\n\n```yaml\ntype: custom:formulaone-card\ncard_type: countdown\nf1_font: true\nshow_raceinfo: false\ncountdown_type:\n  - practice1\n  - practice2\n  - practice3\n  - qualifying\n  - sprint\n  - race\n```\n\n![Screenshot 2025-04-29 095323](https://github.com/user-attachments/assets/600c239d-a20a-4cb7-997d-99a103b237e8)\n\n## Icons\n\nThe following icons can be altered.\n\n| Card type(s)                        | Key           | Default value                       |\n| ----------------------------------- | ------------- | ----------------------------------- |\n| results                             | results       | mdi:trophy                          |\n| results                             | qualifying    | mdi:timer-outline                   |\n| results                             | sprint        | mdi:flag-checkered                  |\n\n\n## Standings\n\nThe display options for the standings can be altered\n\n\n| Name                     | Type          | Default                             | Description                                      |\n| ------------------       | ------------- | ----------------------------------- | ------------------------------------------------ |\n| show_team                | boolean       | `true`                              | Hide or show the team name                       |\n| show_flag                | boolean       | `true`                              | Hide or show the country flag                    |\n| show_teamlogo            | boolean       | `true`                              | Hide or show the team logo                       |\n| hide_season_selector     | boolean       | `false`                              | Hide or show the season selector                     |\n\n## Translations\n\nThe following texts can be translated or altered.\n\n| Card type(s) | Key | Default value |\n| ----------------------------------- | ------------- | ----------------------------------- |\n| next_race, schedule | date | 'Date' |\n| next_race, countdown | practice1 | 'Practice 1' |\n| next_race, countdown | practice2 | 'Practice 2' |\n| next_race, countdown | practice3 | 'Practice 3' |\n| next_race, countdown | race | 'Race' |\n| schedule | round | 'Race' |\n| next_race, countdown | racename | 'Race name' |\n| next_race, countdown | circuitname | 'Circuit name' |\n| next_race, countdown, schedule | location' | 'Location' |\n| next_race, countdown | city | 'City' |\n| next_race, countdown | sprint | 'Sprint' |\n| next_race, countdown | qualifying | 'Qualifying' |\n| next_race, countdown | sprint_qualifying : 'Sprint Qualifying' |\n| next_race, countdown, schedule | endofseason | 'Season is over. See you next year!' |\n| constructor_standings | constructor | 'Constructor' |\n| constructor_standings, driver_standings, last_result | points | 'Pts' |\n| constructor_standings, driver_standings | wins | 'Wins' |\n| driver_standings, results | team | 'Team' |\n| driver_standings, last_result, results | driver | 'Driver' |\n| last_result | grid | 'Grid' |\n| last_result | status | 'Status' |\n| schedule | time | 'Time' |\n| results | raceheader | 'Race' |\n| results | seasonheader | 'Season' |\n| results, driver_standings, constructor_standings | selectseason | 'Select season' |\n| results | selectrace | 'Select race' |\n| results | noresults | 'Please select a race thats already been run' |\n| countdown | days | 'd' |\n| countdown | hours | 'h' |\n| countdown | minutes | 'm' |\n| countdown | seconds | 's' |\n| countdown | until | 'Until' |\n| constructor_standings, driver_standings | no_standings | 'No standings available yet' |\n\nExample:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: next_race\ntitle: Next Race\ndate_locale: nl\nimage_clickable: true\ntranslations: \n  'date' : 'Date'  \n  'practice1' : 'Practice 1'\n  'practice2' : 'Practice 2'\n  'practice3' : 'Practice 3'\n  'race' : 'Race'\n  'racename' : 'Race name'\n  'circuitname' : 'Circuit name'\n  'location' : 'Location'\n  'racetime' : 'Race'\n  'sprint' : 'Sprint'\n  'qualifying' : 'Qualifying'\n  'endofseason' : 'Season is over. See you next year!!'\n\n```\n\n## Result card status translation\n\nYou can translate the status of the result and last_result card. But only the status column.\nIt works the same way as the other translations.\n\nThe possible values for the status column are:\n\nHere are all possible values for the status property with their default translation:\n\n```yaml\n'Finished' : 'Finished',\n'+1 Lap' : '+1 Lap',\n'Engine' : 'Engine',\n'+2 Laps' : '+2 Laps',\n'Accident' : 'Accident',\n'Collision' : 'Collision',\n'Gearbox' : 'Gearbox',\n'Spun off' : 'Spun off',\n'+3 Laps' : '+3 Laps',\n'Suspension' : 'Suspension',\n'+4 Laps' : '+4 Laps',\n'Transmission' : 'Transmission',\n'Electrical' : 'Electrical',\n'Brakes' : 'Brakes',\n'Withdrew' : 'Withdrew',\n'+5 Laps' : '+5 Laps',\n'Clutch' : 'Clutch',\n'Lapped' : 'Lapped',\n'Retired' : 'Retired',\n'Not classified' : 'Not classified',\n'Fuel system' : 'Fuel system',\n'+6 Laps' : '+6 Laps',\n'Disqualified' : 'Disqualified',\n'Turbo' : 'Turbo',\n'Hydraulics' : 'Hydraulics',\n'Overheating' : 'Overheating',\n'Ignition' : 'Ignition',\n'Oil leak' : 'Oil leak',\n'Throttle' : 'Throttle',\n'Out of fuel' : 'Out of fuel'\n```\n\n## Weather forecast\n\nFor this feature to work you have to get an API key [here](https://www.visualcrossing.com/sign-up) or use [F1 sensor](https://github.com/Nicxe/f1_sensor)\n\n```yaml\nshow_weather: true\nweather_options:\n  source: visualcrossing or f1sensor\n  unit: metric\n  api_key: [YOUR API KEY HERE]\n  entity: [f1sensor entity]\n```\n"
  },
  {
    "path": "formulaone-card.js.LICENSE.txt",
    "content": "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n"
  },
  {
    "path": "hacs.json",
    "content": "{\n    \"name\": \"Formula One Card\",\n    \"filename\": \"formulaone-card.js\",\n    \"render_readme\": true,\n    \"content_in_root\": true\n  }\n  "
  },
  {
    "path": "jest.config.js",
    "content": "module.exports = {\n    transform: {\n        '^.+\\\\.ts?$': ['ts-jest', { \"compiler\": \"ttypescript\" } ],\n        '^.+\\\\.(js|jsx)$': [\n            'babel-jest', {\n                'presets': ['@babel/preset-env'],\n                \"plugins\": [\n                    [\"@babel/plugin-transform-runtime\"]\n                ]\n            }]\n        },\n    testEnvironment: 'jsdom',\n    testRegex: '/tests/.*\\\\.(test|spec)?\\\\.(ts|tsx)$',\n    moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],\n    setupFiles: [ \"<rootDir>/tests/config.ts\" ],\n    collectCoverageFrom: [\"**/src/**/*.{js,jsx,ts}\", \"!**/node_modules/**\", \"!**/vendor/**\",\"!**/src/styles.ts\",\"!**/src/fonts.ts\", \"!**/src/editor.ts\"],\n    transformIgnorePatterns: [\"node_modules\\/(?!(lit|lit-element|lit-html|@lit)\\/)\"]\n};"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"formulaone-card\",\n  \"version\": \"1.14.6\",\n  \"description\": \"Frontend card for Home Assistant to display Formula One data\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"lint\": \"eslint src/**/*.ts\",\n    \"dev\": \"webpack -c webpack.config.js\",\n    \"build\": \"yarn lint && webpack -c webpack.config.js\",\n    \"test\": \"jest\",\n    \"coverage\": \"jest --coverage\",\n    \"workflow\": \"jest --coverage --json --outputFile=/home/runner/work/formulaone-card/formulaone-card/jest.results.json\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/marcokreeft87/formulaone-card.git\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"bugs\": {\n    \"url\": \"https://github.com/marcokreeft87/formulaone-card/issues\"\n  },\n  \"homepage\": \"https://github.com/marcokreeft87/formulaone-card#readme\",\n  \"devDependencies\": {\n    \"@types/jest\": \"^29.5.3\",\n    \"@typescript-eslint/eslint-plugin\": \"^5.59.8\",\n    \"@typescript-eslint/parser\": \"^5.62.0\",\n    \"codecov\": \"^3.8.3\",\n    \"eslint\": \"^8.52.0\",\n    \"home-assistant-js-websocket\": \"^9.1.0\",\n    \"lit\": \"^3.0.2\",\n    \"lit-element\": \"^3.3.3\",\n    \"minify-html-literals-loader\": \"^1.1.1\",\n    \"typescript\": \"^4.9.5\",\n    \"webpack\": \"^5.89.0\",\n    \"webpack-cli\": \"^5.1.4\"\n  },\n  \"dependencies\": {\n    \"@babel/plugin-transform-runtime\": \"^7.22.5\",\n    \"@babel/preset-env\": \"^7.23.8\",\n    \"@lit-labs/scoped-registry-mixin\": \"^1.0.1\",\n    \"@marcokreeft/ha-editor-formbuilder\": \"^2024.9.1\",\n    \"babel-jest\": \"^29.7.0\",\n    \"compression-webpack-plugin\": \"^10.0.0\",\n    \"custom-card-helpers\": \"^1.9.0\",\n    \"isomorphic-fetch\": \"^3.0.0\",\n    \"jest-environment-jsdom\": \"^29.6.2\",\n    \"jest-fetch-mock\": \"^3.0.3\",\n    \"jest-ts-auto-mock\": \"^2.1.0\",\n    \"minify-html-literals-loader\": \"^1.1.1\",\n    \"ts-auto-mock\": \"^3.6.4\",\n    \"ts-jest\": \"^29.1.1\",\n    \"ts-loader\": \"^9.5.1\",\n    \"ttypescript\": \"^1.5.15\",\n    \"yarn\": \"^1.22.21\"\n  }\n}\n"
  },
  {
    "path": "src/api/client-base.ts",
    "content": "import { LocalStorageItem } from \"../types/formulaone-card-types\";\nimport { ConstructorStanding, DriverStanding, Race } from \"./f1-models\";\n\nexport interface IClient {\n  GetConstructorStandings(): Promise<ConstructorStanding[]>;\n\n  GetConstructorStandingsForSeason(season: number | undefined) : Promise<ConstructorStanding[]>;\n\n  GetSchedule(season: number) : Promise<Race[]>;    \n  \n  GetLastResult() : Promise<Race>;\n  \n  GetDriverStandings() : Promise<DriverStanding[]>;\n\n  GetDriverStandingsForSeason(season: number | undefined) : Promise<DriverStanding[]>;\n\n  RefreshCache(): void;\n}\n\nexport abstract class ClientBase {  \n  abstract baseUrl: string;\n\n  async GetData<T>(endpoint: string, cacheResult: boolean, hoursBeforeInvalid: number): Promise<T> {\n    const localStorageData = localStorage.getItem(endpoint);\n\n    if (localStorageData && cacheResult) {\n      const item: LocalStorageItem = <LocalStorageItem>JSON.parse(localStorageData);\n\n      const checkDate = new Date();\n      checkDate.setHours(checkDate.getHours() - hoursBeforeInvalid);\n\n      if (new Date(item.created) > checkDate) {\n        return <T>JSON.parse(item.data);\n      }\n    }\n\n    const response = await fetch(`${this.baseUrl}/${endpoint}`, {\n      headers: {\n        Accept: 'application/json',\n      }\n    });\n\n    if (!response || !response.ok) {\n      return Promise.reject(response);\n    }\n\n    const data = await response.json();\n\n    const item: LocalStorageItem = {\n      data: JSON.stringify(data),\n      created: new Date()\n    }\n\n    if (cacheResult) {\n      localStorage.setItem(endpoint, JSON.stringify(item));\n    }\n\n    return data;\n  }\n}"
  },
  {
    "path": "src/api/ergast-client.ts",
    "content": "import { getRefreshTime } from '../utils';\nimport { ClientBase, IClient } from './client-base';\nimport { ConstructorStanding, DriverStanding, Race, RaceTable, Root, Season } from './f1-models';\n\nexport default class ErgastClient extends ClientBase implements IClient {\n\n    baseUrl = 'https://api.jolpi.ca/ergast/f1';\n\n    async GetSchedule(season: number) : Promise<Race[]> {      \n      const data = await this.GetData<Root>(`${season}.json`, true, 72);\n\n      return data.MRData.RaceTable.Races;\n    }\n\n    async GetLastResult() : Promise<Race> {      \n      const refreshCacheHours = getRefreshTime('current/last/results.json');\n      const data = await this.GetData<Root>('current/last/results.json', true, refreshCacheHours);\n      \n      return data.MRData.RaceTable.Races[0];\n    }\n\n    async GetDriverStandings() : Promise<DriverStanding[]> {      \n      const refreshCacheHours = getRefreshTime('current/driverStandings.json');\n      const data = await this.GetData<Root>('current/driverStandings.json', true, refreshCacheHours);\n\n      const standingsLists = data.MRData.StandingsTable.StandingsLists;\n      return standingsLists && standingsLists.length > 0 ? standingsLists[0].DriverStandings : [];\n    }\n\n    async GetDriverStandingsForSeason(selectedSeason: number | undefined) {\n      if (!selectedSeason || selectedSeason === 0) {\n        return this.GetDriverStandings();\n      }\n\n      const refreshCacheHours = getRefreshTime(`${selectedSeason}/driverStandings.json`);\n      const data = await this.GetData<Root>(`${selectedSeason}/driverStandings.json`, true, refreshCacheHours);\n\n      const standingsLists = data.MRData.StandingsTable.StandingsLists;\n      return standingsLists && standingsLists.length > 0 ? standingsLists[0].DriverStandings : [];\n    }\n\n    async GetConstructorStandings() : Promise<ConstructorStanding[]> {      \n      const refreshCacheHours = getRefreshTime('current/constructorStandings.json');\n      const data = await this.GetData<Root>('current/constructorStandings.json', true, refreshCacheHours);\n\n      const standingsLists = data.MRData.StandingsTable.StandingsLists;\n      return standingsLists && standingsLists.length > 0 ? standingsLists[0].ConstructorStandings : [];\n    }\n\n    async GetConstructorStandingsForSeason(selectedSeason: number | undefined) {\n      if (!selectedSeason || selectedSeason === 0) {\n        return this.GetConstructorStandings();\n      }\n\n      const refreshCacheHours = getRefreshTime(`${selectedSeason}/constructorStandings.json`);\n      const data = await this.GetData<Root>(`${selectedSeason}/constructorStandings.json`, true, refreshCacheHours);\n\n      const standingsLists = data.MRData.StandingsTable.StandingsLists;\n      return standingsLists && standingsLists.length > 0 ? standingsLists[0].ConstructorStandings : [];\n    }\n\n    async GetSprintResults(season: number, round: number) : Promise<RaceTable> {\n      const data = await this.GetData<Root>(`${season}/${round}/sprint.json`, false, 0);\n\n      return data.MRData.RaceTable;\n    }\n\n    async GetQualifyingResults(season: number, round: number) : Promise<RaceTable> {\n      const data = await this.GetData<Root>(`${season}/${round}/qualifying.json`, false, 0);\n\n      return data.MRData.RaceTable;\n    }\n    \n    async GetResults(season: number, round: number) : Promise<RaceTable> {      \n      const data = await this.GetData<Root>(`${season}/${round}/results.json`, false, 0);\n\n      return data.MRData.RaceTable;\n    }\n\n    async GetSeasons() : Promise<Season[]> {\n      const data = await this.GetData<Root>('seasons.json?limit=200', true, 72);\n      \n      return data.MRData.SeasonTable.Seasons;\n    }\n\n    async GetSeasonRaces(season: number) : Promise<Race[]> {\n      const data = await this.GetData<Root>(`${season}.json`, true, 72);\n\n      return data.MRData.RaceTable.Races;\n    }\n\n    async GetLastYearsResults(circuitName: string) : Promise<Race> {\n      \n      // Get schedule of last year\n      const lastYear = new Date().getFullYear() - 1;\n      const data = await this.GetData<Root>(`${lastYear}.json`, true, 72);\n\n      // Get the index of the circuit on the schedule of last year\n      const raceRound = data.MRData.RaceTable.Races.findIndex((race: Race) => {\n        return race.Circuit.circuitName === circuitName;\n      }) + 1; \n\n      // Get the results of the last year race\n      const results = await this.GetData<Root>(`${lastYear}/${raceRound}/results.json`, false, 0);\n\n      return results.MRData.RaceTable.Races[0];\n    }\n\n    async RefreshCache() {\n      await this.GetData<Root>('current.json', true, 0);\n      await this.GetData<Root>('current/last/results.json', true, 0);\n      await this.GetData<Root>('current/driverStandings.json', true, 0);\n      await this.GetData<Root>('current/constructorStandings.json', true, 0);\n    }\n}"
  },
  {
    "path": "src/api/f1-models.ts",
    "content": "export interface Root {\n    MRData: Mrdata\n  }\n  \n  export interface Mrdata {\n    xmlns: string\n    series: string\n    url: string\n    limit: string\n    offset: string\n    total: string\n    RaceTable?: RaceTable\n    SeasonTable?: SeasonTable\n    StandingsTable?: StandingsTable\n  }\n\n  export interface StandingsTable {\n    season: string\n    StandingsLists: StandingsList[]\n  }\n  \n  export interface StandingsList {\n    season: string\n    round: string\n    ConstructorStandings: ConstructorStanding[]\n    DriverStandings: DriverStanding[]\n  }\n  \n  export interface DriverStanding {\n    position: string\n    positionText: string\n    points: string\n    wins: string\n    Driver: Driver\n    Constructors: Constructor[]\n  }\n  \n  export interface ConstructorStanding {\n    position: string\n    positionText: string\n    points: string\n    wins: string\n    Constructor: Constructor\n  }\n  \n  export interface RaceTable {\n    season: string\n    round?: string\n    Races?: Race[]\n  }\n  \n  export interface Race {\n    season: string\n    round: string\n    url: string\n    raceName: string\n    Circuit: Circuit\n    date: string\n    time: string\n    Results?: Result[]\n    QualifyingResults?: QualifyingResult[]\n    SprintResults?: Result[]\n    FirstPractice: FirstPractice\n    SecondPractice: SecondPractice\n    ThirdPractice?: ThirdPractice\n    Qualifying?: Qualifying\n    Sprint?: Sprint\n    SprintQualifying?: Qualifying\n  }\n  \n  export interface Circuit {\n    circuitId: string\n    url: string\n    circuitName: string\n    Location: Location\n  }\n  \n  export interface Location {\n    lat: string\n    long: string\n    locality: string\n    country: string\n  }\n  \n  export interface Result {\n    number: string\n    position: string\n    positionText: string\n    points: string\n    Driver: Driver\n    Constructor: Constructor\n    grid: string\n    laps: string\n    status: string\n    Time?: Time\n    FastestLap?: FastestLap | undefined\n  }\n\n  export interface QualifyingResult {\n    number: string;\n    position: string;\n    Driver: Driver;\n    Constructor: Constructor;\n    Q1: string;\n    Q2: string;\n    Q3: string;\n }\n  \n  export interface Driver {\n    driverId: string\n    permanentNumber: string\n    code: string\n    url: string\n    givenName: string\n    familyName: string\n    dateOfBirth: string\n    nationality: string\n  }\n  \n  export interface Constructor {\n    constructorId: string\n    url: string\n    name: string\n    nationality: string\n  }\n  \n  export interface Time {\n    millis: string\n    time: string\n  }\n  \n  export interface FastestLap {\n    rank: string\n    lap: string\n    Time: Time2\n    AverageSpeed: AverageSpeed\n  }\n  \n  export interface Time2 {\n    time: string\n  }\n  \n  export interface AverageSpeed {\n    units: string\n    speed: string\n  }\n  export interface SeasonTable {\n    Seasons: Season[]\n  }\n  \n  export interface Season {\n    season: string\n    url: string\n  }\n  \n  export interface FirstPractice {\n    date: string\n    time: string\n  }\n  \n  export interface SecondPractice {\n    date: string\n    time: string\n  }\n  \n  export interface ThirdPractice {\n    date: string\n    time: string\n  }\n  \n  export interface Qualifying {\n    date: string\n    time: string\n  }\n  \n  export interface Sprint {\n    date: string\n    time: string\n  }\n  "
  },
  {
    "path": "src/api/f1sensor-client.ts",
    "content": "import { HomeAssistant } from 'custom-card-helpers';\nimport { ClientBase, IClient } from './client-base';\nimport { ConstructorStanding, DriverStanding, Race, RaceTable, Season } from './f1-models';\nimport { IWeatherClient, WeatherData } from './weather-models';\nimport { WeatherOptions } from '../types/formulaone-card-types';\n\nexport default class F1SensorClient extends ClientBase implements IClient, IWeatherClient {\n    baseUrl: string;\n    hass: HomeAssistant;\n    entity: string;\n\n    constructor(hass: HomeAssistant, entity: string) {\n        super();  \n        \n        this.hass = hass;\n        this.entity = entity;\n    } \n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    async getRaceWeatherData(options: WeatherOptions, race: Race) : Promise<WeatherData> {\n        const attributes = this.hass.states[options.entity]?.attributes;\n        if (!attributes) {\n            throw new Error('Weather data not found for the specified entity.');\n        }\n\n        return attributes as WeatherData;\n    }\n\n    async GetConstructorStandings() : Promise<ConstructorStanding[]> {   \n        return this.hass.states[this.entity]?.attributes?.constructor_standings ?? [];\n    }\n\n    async GetConstructorStandingsForSeason(season: number | undefined) : Promise<ConstructorStanding[]> {\n        const data = this.hass.states[this.entity]?.attributes;\n        if (season && season !== parseFloat(data?.season))\n            throw new Error('This entity is only valid for the current season. Please use source: jolpi for other seasons.');\n\n        return data?.constructor_standings ?? [];\n    }\n    \n    async GetDriverStandings(): Promise<DriverStanding[]> {\n        return this.hass.states[this.entity]?.attributes?.driver_standings ?? [];\n    }\n\n    async GetDriverStandingsForSeason(season: number | undefined): Promise<DriverStanding[]> {\n        const data = this.hass.states[this.entity]?.attributes;\n        if (season && season !== parseFloat(data?.season))\n            throw new Error('This entity is only valid for the current season. Please use source: jolpi for other seasons.');\n        return data?.driver_standings ?? [];\n    }   \n    \n    async GetSchedule(season: number): Promise<Race[]> {\n        const data = this.hass.states[this.entity]?.attributes;\n\n        if (season !== parseFloat(data?.season)) \n            throw new Error('This entity is only valid for the current season. Please use source: jolpi for other seasons.');\n\n        return data?.races ?? [];   \n    }\n\n    GetLastResult(): Promise<Race> {\n        throw new Error('Method not implemented.');\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    GetSprintResults(season: number, round: number): Promise<RaceTable> {\n        throw new Error('Method not implemented.');\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    GetQualifyingResults(season: number, round: number): Promise<RaceTable> {\n        throw new Error('Method not implemented.');\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    GetResults(season: number, round: number): Promise<RaceTable> {\n        throw new Error('Method not implemented.');\n    }\n    GetSeasons(): Promise<Season[]> {\n        throw new Error('Method not implemented.');\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    GetSeasonRaces(season: number): Promise<Race[]> {\n        throw new Error('Method not implemented.');\n    }\n    RefreshCache(): void {\n        throw new Error('Method not implemented.');\n    }\n}"
  },
  {
    "path": "src/api/image-client.ts",
    "content": "import { ImageConstants } from \"../lib/constants\";\nimport { LocalStorageItem } from \"../types/formulaone-card-types\";\nimport { getCircuitName, getCircuitNameLegacy } from \"../utils\";\nimport { Race } from \"./f1-models\";\n\nexport default class ImageClient {\n\n    // Get image by url with fetch and save to local storage for 24 hours base64 encoded\n    GetImage(url: string): string {\n        // Check local storage for image\n        const localStorageData = localStorage.getItem(url);\n\n        if (localStorageData) {\n            const item: LocalStorageItem = <LocalStorageItem>JSON.parse(localStorageData);\n\n            const checkDate = new Date();\n            checkDate.setHours(checkDate.getHours() - (24 * 7 * 4));\n\n            if (new Date(item.created) > checkDate) {\n                return item.data;\n            }\n        }\n\n        fetch(url)\n            .then(response => response.blob())\n            .then(imageBlob => {\n                const reader = new FileReader();\n                reader.readAsDataURL(imageBlob); \n                // istanbul ignore next\n                reader.onloadend = function() {\n                    const base64data = reader.result;\n\n                    const item: LocalStorageItem = {\n                        data: base64data as string,\n                        created: new Date()\n                    }\n    \n                    localStorage.setItem(url, JSON.stringify(item));\n    \n                    return item.data;\n                }                \n            });\n\n        return url;\n    }\n\n    GetTeamLogoImage(teamName: string, selectedSeason: number): string {\n        \n        teamName = teamName.toLocaleLowerCase().replace('_', '-');\n        if (selectedSeason < 2026) {\n            const exceptions = [{ teamName: 'red-bull', corrected: 'red-bull-racing'}, { teamName: 'alfa', corrected: 'alfa-romeo'}, { teamName: 'haas', corrected: 'haas-f1-team'}, { teamName: 'sauber', corrected: 'kick-sauber'}];\n\n            const exception = exceptions.filter(exception => exception.teamName == teamName);\n            if(exception.length > 0)\n            {\n                teamName = exception[0].corrected;\n            }\n\n            return this.GetImage(`${ImageConstants.TeamLogoCDNLegacy}/2024/${teamName.toLowerCase()}-logo.png.transform/2col-retina/image.png`);\n        }\n\n        const exceptions = [{ teamName: 'red-bull', corrected: 'redbullracing'}, { teamName: 'rb', corrected: 'racingbulls'}, { teamName: 'haas', corrected: 'haasf1team'}, { teamName: 'aston-martin', corrected: 'astonmartin'}];\n\n        const exception = exceptions.filter(exception => exception.teamName == teamName);\n        if(exception.length > 0)\n        {\n            teamName = exception[0].corrected;\n        }\n\n        return this.GetImage(`${ImageConstants.TeamLogoCDN}2026/${teamName.toLowerCase()}/2026${teamName.toLowerCase()}logo.webp`);\n    }\n\n    GetTrackLayoutImage(race: Race): string {\n        const circuitName = getCircuitNameLegacy(race.Circuit.Location);\n        const year = parseInt(race.season);\n\n        if (year < 2026) {\n            return this.GetImage(`${ImageConstants.F1CDNLegacy}/${circuitName}_Circuit`);\n        }\n\n        return this.GetImage(`${ImageConstants.F1CDN}${getCircuitName(race).toLowerCase()}detailed.webp`);\n    }\n}"
  },
  {
    "path": "src/api/restcountry-client.ts",
    "content": "import { LocalStorageItem } from \"../types/formulaone-card-types\";\nimport { Country } from \"../types/rest-country-types\";\nimport { ClientBase } from \"./client-base\";\n\nexport default class RestCountryClient extends ClientBase {\n    \n    baseUrl = 'https://restcountries.com/v2';\n    allEndpoint = 'all?fields=name,flag,flags,nativeName,demonym,population,altSpellings';\n\n    async GetAll() : Promise<Country[]> {   \n        return await this.GetData<Country[]>(this.allEndpoint, true, 730);\n    }\n    \n    GetCountriesFromLocalStorage() : Country[] {\n        const localStorageData = localStorage.getItem(this.allEndpoint);\n\n        if(localStorageData) {\n            const item: LocalStorageItem = <LocalStorageItem>JSON.parse(localStorageData);\n            return <Country[]>JSON.parse(item.data);\n        }\n        return [];\n    }\n}"
  },
  {
    "path": "src/api/vc-weather-client.ts",
    "content": "import { WeatherOptions, WeatherUnit } from '../types/formulaone-card-types';\nimport { ClientBase } from './client-base';\nimport { Race } from './f1-models';\nimport { IWeatherClient, WeatherData, WeatherResponse } from './weather-models';\n\nexport default class VCWeatherClient\n    extends ClientBase\n    implements IWeatherClient\n{\n    private readonly apiKey: string;\n    private readonly unitGroup: string = 'metric';\n    baseUrl =\n        'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline';\n\n    constructor(apiKey: string, unitGroup?: string) {\n        super();\n        this.apiKey = apiKey;\n        this.unitGroup = unitGroup ?? this.unitGroup;\n    }\n\n    async getRaceWeatherData(options: WeatherOptions, race: Race): Promise<WeatherData> {\n        const endpoint = `${race.Circuit.Location.lat}, ${ race.Circuit.Location.long}/${race.date}T${race.time}`;\n        const contentType = 'json';\n\n        const url = `${endpoint}?unitGroup=${this.unitGroup}&key=${this.apiKey}&contentType=${contentType}`;\n\n        const data = await this.GetData<WeatherResponse>(url, true, 1);   \n\n        const day = data?.days[0]\n\n        return { \n            race_temperature: day.temp,\n            race_temperature_unit: options.unit === WeatherUnit.Metric ? 'celsius' : 'fahrenheit',\n            race_humidity: day.humidity,\n            race_humidity_unit: '%',\n            race_cloud_cover: day.cloudcover,\n            race_cloud_cover_unit: '%',\n            race_precipitation: day.precip,\n            race_precipitation_unit : 'mm',\n            race_wind_speed : day.windspeed,\n            race_wind_speed_unit : 'm/s',\n            race_wind_direction: this.calculateWindDirection(day.winddir),  \n            race_wind_from_direction_degrees: day.winddir,\n            race_wind_from_direction_unit: 'degrees',\n            race_feelslike: day.feelslike,\n            race_feelslike_unit: options.unit === WeatherUnit.Metric ? 'celsius' : 'fahrenheit',\n            race_precipitation_prob: day.precipprob,\n            icon: '',\n            friendly_name: 'visualcrossing', \n        };\n    }\n\n    private calculateWindDirection = (windDirection: number) => {\n        const directions = [\n            { label: 'N', range: [0, 11.25] },\n            { label: 'NNE', range: [11.25, 33.75] },\n            { label: 'NE', range: [33.75, 56.25] },\n            { label: 'ENE', range: [56.25, 78.75] },\n            { label: 'E', range: [78.75, 101.25] },\n            { label: 'ESE', range: [101.25, 123.75] },\n            { label: 'SE', range: [123.75, 146.25] },\n            { label: 'SSE', range: [146.25, 168.75] },\n            { label: 'S', range: [168.75, 191.25] },\n            { label: 'SSW', range: [191.25, 213.75] },\n            { label: 'SW', range: [213.75, 236.25] },\n            { label: 'WSW', range: [236.25, 258.75] },\n            { label: 'W', range: [258.75, 281.25] },\n            { label: 'WNW', range: [281.25, 303.75] },\n            { label: 'NW', range: [303.75, 326.25] },\n            { label: 'NNW', range: [326.25, 348.75] },\n            { label: 'N', range: [348.75, 360] },\n        ];\n\n        for (const { label, range } of directions) {\n            if (windDirection >= range[0] && windDirection <= range[1]) {\n                return label;\n            }\n        }\n    };\n}\n"
  },
  {
    "path": "src/api/weather-models.ts",
    "content": "import { WeatherOptions } from \"../types/formulaone-card-types\";\nimport { Race } from \"./f1-models\";\n\nexport interface IWeatherClient {\n    getRaceWeatherData(options: WeatherOptions, race: Race) : Promise<WeatherData>; \n}\n\nexport interface WeatherData {\n    race_temperature: number;\n    race_temperature_unit: string;\n    race_feelslike: number;\n    race_feelslike_unit: string;\n    race_humidity: number;\n    race_humidity_unit: string;\n    race_cloud_cover: number;\n    race_cloud_cover_unit: string;\n    race_precipitation: number;\n    race_precipitation_prob: number;\n    race_precipitation_unit: string;\n    race_wind_speed: number;\n    race_wind_speed_unit: string;\n    race_wind_direction: string;\n    race_wind_from_direction_degrees: number;\n    race_wind_from_direction_unit: string;\n    icon: string;\n    friendly_name: string;\n  }\n  \n\nexport interface Hour {\n    datetime: string;\n    datetimeEpoch: number;\n    temp: number;\n    feelslike: number;\n    humidity: number;\n    dew: number;\n    precip: number;\n    precipprob: number;\n    snow: number;\n    snowdepth: number;\n    preciptype: string[];\n    windgust: number;\n    windspeed: number;\n    winddir: number;\n    pressure: number;\n    visibility: number;\n    cloudcover: number;\n    solarradiation: number;\n    solarenergy?: number;\n    uvindex: number;\n    severerisk: number;\n    conditions: string;\n    icon: string;\n    stations: string[];\n    source: string;\n    sunrise: string;\n    sunriseEpoch?: number;\n    sunset: string;\n    sunsetEpoch?: number;\n    moonphase?: number;\n}\n\nexport interface Day {\n    datetime: string;\n    datetimeEpoch: number;\n    tempmax: number;\n    tempmin: number;\n    temp: number;\n    feelslikemax: number;\n    feelslikemin: number;\n    feelslike: number;\n    dew: number;\n    humidity: number;\n    precip: number;\n    precipprob: number;\n    precipcover: number;\n    preciptype: string[];\n    snow: number;\n    snowdepth: number;\n    windgust: number;\n    windspeed: number;\n    winddir: number;\n    pressure: number;\n    cloudcover: number;\n    visibility: number;\n    solarradiation: number;\n    solarenergy: number;\n    uvindex: number;\n    severerisk: number;\n    sunrise: string;\n    sunriseEpoch: number;\n    sunset: string;\n    sunsetEpoch: number;\n    moonphase: number;\n    conditions: string;\n    description: string;\n    icon: string;\n    stations: string[];\n    source: string;\n    hours: Hour[];\n}\n\nexport interface CurrentConditions {\n    datetime: string;\n    datetimeEpoch: number;\n    temp: number;\n    feelslike: number;\n    humidity: number;\n    dew: number;\n    precip: number;\n    precipprob: number;\n    snow: number;\n    snowdepth: number;\n    //preciptype?: any;\n    windgust: number;\n    windspeed: number;\n    winddir: number;\n    pressure: number;\n    visibility: number;\n    cloudcover: number;\n    solarradiation: number;\n    //solarenergy?: any;\n    uvindex: number;\n    severerisk: number;\n    conditions: string;\n    icon: string;\n    //stations: any[];\n    source: string;\n    sunrise: string;\n    sunriseEpoch: number;\n    sunset: string;\n    sunsetEpoch: number;\n    moonphase: number;\n}\n\nexport interface WeatherResponse {\n    queryCost: number;\n    latitude: number;\n    longitude: number;\n    resolvedAddress: string;\n    address: string;\n    timezone: string;\n    tzoffset: number;\n    description: string;\n    days: Day[];\n    //alerts: any[];\n    currentConditions: CurrentConditions;\n}"
  },
  {
    "path": "src/cards/base-card.ts",
    "content": "import { HomeAssistant } from \"custom-card-helpers\";\nimport { HTMLTemplateResult } from \"lit-html\";\nimport FormulaOneCard from \"..\";\nimport JolpiClient from \"../api/ergast-client\";\nimport { Race } from \"../api/f1-models\";\nimport ImageClient from \"../api/image-client\";\nimport VCWeatherClient from \"../api/vc-weather-client\";\nimport { CardProperties, F1DataSource, FormulaOneCardConfig, Translation } from \"../types/formulaone-card-types\";\nimport { IClient } from \"../api/client-base\";\nimport F1SensorClient from \"../api/f1sensor-client\";\nimport { IWeatherClient } from \"../api/weather-models\";\n\nexport abstract class BaseCard {\n    parent: FormulaOneCard;\n    config: FormulaOneCardConfig;  \n    client: IClient;\n    resultsClient: JolpiClient;\n    hass: HomeAssistant;\n    weatherClient: IWeatherClient;\n    imageClient: ImageClient;\n\n    constructor(parent: FormulaOneCard) {     \n        this.config = parent.config;           \n        this.hass = parent._hass;\n        this.client = this.config.source === F1DataSource.F1Sensor ? new F1SensorClient(this.hass, this.config.entity) : new JolpiClient();\n        this.resultsClient = new JolpiClient();\n        this.parent = parent;\n        this.weatherClient = this.config.weather_options?.source ? new F1SensorClient(this.hass, this.config.entity) : new VCWeatherClient(this.config.weather_options?.api_key ?? '');\n        this.imageClient = new ImageClient();\n    }    \n\n    translation(key: string) : string {\n\n        if(!this.config.translations || Object.keys(this.config.translations).indexOf(key) < 0) {\n            return this.defaultTranslations[key];\n        }\n\n        return this.config.translations[key];\n    }\n\n    abstract render() : HTMLTemplateResult;\n\n    abstract cardSize() : number;\n\n    abstract defaultTranslations: Translation;\n\n    protected getProperties() {\n        const cardProperties = this.parent.properties?.get('cardValues') as CardProperties;\n        const races = cardProperties?.races as Race[];\n        const selectedRace = cardProperties?.selectedRace as Race;\n        const selectedSeason = cardProperties?.selectedSeason as number ?? new Date().getFullYear();\n        const selectedTabIndex = cardProperties?.selectedTabIndex as number ?? 0;\n        return { races, selectedRace, selectedSeason, selectedTabIndex };\n    }\n\n    protected getParentCardValues() {\n        const cardValues = this.parent.properties ?? new Map<string, unknown>();\n        const properties = cardValues.get('cardValues') as CardProperties ?? {} as CardProperties;\n        properties.selectedSeason = properties.selectedSeason ?? new Date().getFullYear();\n        return { properties, cardValues };\n    }\n}\n"
  },
  {
    "path": "src/cards/constructor-standings.ts",
    "content": "import { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport FormulaOneCard from \"..\";\nimport { ConstructorStanding } from \"../api/f1-models\";\nimport { getApiErrorMessage, getApiLoadingMessage, getEndOfSeasonMessage, getTeamImage, reduceArray } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\n\nexport default class ConstructorStandings extends BaseCard {    \n    defaultTranslations = {\n        'constructor' : 'Constructor',   \n        'points' : 'Pts',\n        'wins' : 'Wins',\n        'no_standings' : 'No standings available yet',\n        'selectseason' : 'Select season'\n    };\n\n    constructor(parent: FormulaOneCard) {\n        super(parent);\n    }    \n    \n    cardSize(): number {        \n        return 11;\n    }\n\n    renderStandingRow(standing: ConstructorStanding, selectedSeason: number): HTMLTemplateResult {\n        return html`\n            <tr>\n                <td class=\"width-40 text-center\">${standing.position}</td>\n                <td>\n                    ${(this.config.standings?.show_teamlogo ? html`<img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"${getTeamImage(this, standing.Constructor.constructorId, selectedSeason)}\">&nbsp;` : '')}\n                    ${standing.Constructor.name}\n                </td>\n                <td class=\"width-60 text-center\">${standing.points}</td>\n                <td class=\"text-center\">${standing.wins}</td>\n            </tr>`;\n    }\n\n    render() : HTMLTemplateResult {\n        const { selectedSeason } = this.getProperties ? this.getProperties() : { selectedSeason: new Date().getFullYear() };\n\n        const selectedSeasonChanged = (ev: any): void => {\n            this.setSeason(ev);\n        };\n\n        return html`\n            ${this.config.standings?.hide_season_selector ? '' : html`<table>\n                <tr>\n                    <td>\n                        Season<br />\n                        ${until(\n                            this.resultsClient.GetSeasons().then((response: any[]) => {\n                                const seasons = response.reverse();\n                                return html`<select name=\"selectedSeason\" @change=${selectedSeasonChanged}>\n                                    <option value=\"0\">${this.translation('selectseason')}</option>\n                                    ${seasons.map(season => html`<option value=\"${season.season}\" ?selected=${selectedSeason === parseInt(season.season)}>${season.season}</option>`)}\n                                </select>`;\n                            }).catch(() => html`${getApiErrorMessage('seasons')}`),\n                            html`${getApiLoadingMessage()}`\n                        )}\n                    </td>\n                </tr>\n            </table>`}\n            ${until(\n                this.resultsClient.GetConstructorStandingsForSeason(selectedSeason).then((response: ConstructorStanding[]) =>\n                    response.length === 0 ?\n                        html`${getEndOfSeasonMessage(this.translation('no_standings'))}` :\n                        html`\n                            <table>\n                                <thead>\n                                <tr>\n                                    <th class=\"width-50\">&nbsp;</th>\n                                    <th>${this.translation('constructor')}</th>\n                                    <th class=\"width-60 text-center\">${this.translation('points')}</th>\n                                    <th class=\"text-center\">${this.translation('wins')}</th>\n                                </tr>\n                                </thead>\n                                <tbody>\n                                    ${reduceArray(response, this.config.row_limit).map(standing => this.renderStandingRow(standing, selectedSeason))}\n                                </tbody>\n                            </table>\n                        `\n                ).catch(() => html`${getApiErrorMessage('standings')}`),\n                html`${getApiLoadingMessage()}`\n            )}\n        `;\n    }\n\n    setSeason(ev: any) {\n        const season = ev.target.value;\n        const { properties, cardValues } = this.getParentCardValues();\n        properties.selectedSeason = season;\n        cardValues.set('cardValues', properties);\n        this.parent.properties = cardValues;\n    }  \n}\n"
  },
  {
    "path": "src/cards/countdown.ts",
    "content": "import { ActionHandlerEvent, formatDateTime, hasAction, HomeAssistant } from \"custom-card-helpers\";\nimport { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport { asyncReplace } from 'lit/directives/async-replace.js';\nimport FormulaOneCard from \"..\";\nimport { Race } from \"../api/f1-models\";\nimport { actionHandler } from \"../directives/action-handler-directive\";\nimport { CountdownType } from \"../types/formulaone-card-types\";\nimport { clickHandler, getApiErrorMessage, getApiLoadingMessage, getCountryFlagByName, getEndOfSeasonMessage, renderHeader, renderRaceInfo } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\n\nexport default class Countdown extends BaseCard {\n    hass: HomeAssistant;\n    defaultTranslations = {\n        'days' : 'd',   \n        'hours' : 'h',\n        'minutes' : 'm',\n        'seconds' : 's',\n        'endofseason' : 'Season is over. See you next year!',\n        'racenow' : 'We are racing!',\n        'date' : 'Date',   \n        'practice1' : 'Practice 1',\n        'practice2' : 'Practice 2',\n        'practice3' : 'Practice 3',\n        'race' : 'Race',\n        'round' : 'Round',\n        'racename' : 'Race name',\n        'circuitname' : 'Circuit name',\n        'location' : 'Location',\n        'city': 'City',\n        'racetime' : 'Race',\n        'sprint' : 'Sprint',\n        'qualifying' : 'Qualifying',\n        'sprint_qualifying' : 'Sprint Qualifying',\n        'until' : 'Until'\n    };\n\n    constructor(parent: FormulaOneCard) {\n        super(parent);\n        \n        this.config.countdown_type = this.config.countdown_type ?? CountdownType.Race;\n    }\n    \n    cardSize(): number {\n        return this.config.show_raceinfo ? 12 : 6;\n    }\n\n    renderHeader(race: Race): HTMLTemplateResult {        \n        return this.config.show_raceinfo ? \n            html`<table><tr><td colspan=\"5\">${renderHeader(this, race)}</td></tr>\n            ${renderRaceInfo(this, race)}</table>`\n            : null;\n    }\n\n    async *countDownTillDate(raceDateTime: Date) {\n\n        while (raceDateTime > new Date()) {\n\n            const now = new Date().getTime();\n            const distance = raceDateTime.getTime() - now;\n\n            const days = Math.floor(distance / (1000 * 60 * 60 * 24));\n            const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));\n            const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));\n            const seconds = Math.floor((distance % (1000 * 60)) / 1000);\n\n            const countdown_format = this.config.countdown_format ?? 'd h m s';\n\n            let displayValue = '';\n            if (countdown_format.includes('d')) {   \n                displayValue += `${days}${this.translation('days')} `;\n            }\n            if (countdown_format.includes('h')) {\n                displayValue += `${hours}${this.translation('hours')} `;\n            }\n            if (countdown_format.includes('m')) {\n                displayValue += `${minutes}${this.translation('minutes')} `;\n            }\n            if (countdown_format.includes('s')) {\n                displayValue += `${seconds}${this.translation('seconds')} `;\n            }\n\n            yield displayValue;\n\n            /* istanbul ignore next */\n            await new Promise((r) => setTimeout(r, 1000));\n        }\n\n        yield this.translation('racenow');\n    }\n\n    render() : HTMLTemplateResult {\n\n        const _handleAction = (ev: ActionHandlerEvent): void => {\n            if (this.hass && this.config.actions && ev.detail.action) {\n                clickHandler(this.parent, this.config, this.hass, ev);\n            }\n        };\n\n        return html`${until(\n            this.client.GetSchedule(new Date().getFullYear()).then(response => {\n\n                const { nextRace, raceDateTime, countdownType } = this.getNextEvent(response);\n\n                if(!nextRace) {\n                    return getEndOfSeasonMessage(this.translation('endofseason'));\n                }\n\n                const timer = this.countDownTillDate(raceDateTime);                \n                const hasConfigAction = this.config.actions !== undefined;\n                \n                return html`<table @action=${_handleAction}\n                                .actionHandler=${actionHandler({\n                                    hasHold: hasAction(this.config.actions?.hold_action),\n                                    hasDoubleClick: hasAction(this.config.actions?.double_tap_action),\n                                })} class=\"${(hasConfigAction ? 'clickable' : null)}\">\n                                <tr>\n                                    <td>\n                                        <h2 class=\"${(this.config.f1_font ? 'formulaone-font' : '')}\"><img height=\"25\" src=\"${getCountryFlagByName(this, nextRace.Circuit.Location.country)}\">&nbsp;&nbsp;  ${nextRace.round} :  ${nextRace.raceName}</h2>\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td class=\"text-center\">\n                                        <h1 class=\"${(this.config.f1_font ? 'formulaone-font' : '')}\">${asyncReplace(timer)}</h1>\n                                    </td>\n                                </tr>\n                                ${(\n                                    Array.isArray(this.config.countdown_type) && this.config.countdown_type.length > 1 ?\n                                        html`<tr>\n                                                <td class=\"text-center\">\n                                                    <h1 class=\"${(this.config.f1_font ? 'formulaone-font' : '')}\">${this.translation('until')} ${this.translation(countdownType.toLowerCase())}</h1>\n                                                    <h3 class=\"${(this.config.f1_font ? 'formulaone-font' : '')}\">${this.config.show_event_details ? formatDateTime(raceDateTime, this.hass.locale) : ''}</h3>\n                                                </td>\n                                            </tr>`\n                                        : null\n                                )}\n                            </table>\n                            ${this.renderHeader(nextRace)}`; \n\n            }).catch(() => html`${getApiErrorMessage('next race')}`),\n            html`${getApiLoadingMessage()}`\n        )}`;\n    }\n\n    getNextEvent(response: Race[]) {\n\n        const nextRace = response.filter(race => {\n            const raceDateTime = new Date(race.date + 'T' + race.time);\n            raceDateTime.setHours(raceDateTime.getHours() + 3);\n            return raceDateTime >= new Date();\n        })[0];\n\n        let raceDateTime = null;\n        let countdownType = this.config.countdown_type as CountdownType;\n        if(nextRace) {\n            const countdownTypes = this.config.countdown_type as CountdownType[];\n\n            const raceEvents = [\n                { Date: nextRace.FirstPractice ? new Date(nextRace.FirstPractice.date + 'T' + nextRace.FirstPractice.time) : null, Type: CountdownType.Practice1 },\n                { Date: nextRace.SecondPractice ? new Date(nextRace.SecondPractice.date + 'T' + nextRace.SecondPractice.time) : null, Type: CountdownType.Practice2 },\n                { Date: nextRace.ThirdPractice ? new Date(nextRace.ThirdPractice.date + 'T' + nextRace.ThirdPractice.time) : null, Type: CountdownType.Practice3 },\n                { Date: nextRace.Sprint ? new Date(nextRace.Sprint.date + 'T' + nextRace.Sprint.time) : null, Type: CountdownType.Sprint },\n                { Date: nextRace.SprintQualifying ? new Date(nextRace.SprintQualifying.date + 'T' + nextRace.SprintQualifying.time) : null, Type: CountdownType.SprintQualifying },\n                { Date: nextRace.Qualifying ? new Date(nextRace.Qualifying.date + 'T' + nextRace.Qualifying.time) : null, Type: CountdownType.Qualifying },\n                { Date: new Date(nextRace.date + 'T' + nextRace.time), Type: CountdownType.Race }\n            ].filter(x => x.Date).filter(x => x.Date > new Date()).sort((a, b) => a.Date.getTime() - b.Date.getTime());\n\n            // Get the first countdown type that occurs in race events and get the date and time for that event\n            const nextEvent = raceEvents.filter(x => countdownTypes?.includes(x.Type))[0];\n\n            raceDateTime = nextEvent?.Date;\n            countdownType = nextEvent?.Type ?? countdownType;\n        }\n\n        return { nextRace, raceDateTime, countdownType };\n    }\n}\n"
  },
  {
    "path": "src/cards/driver-standings.ts",
    "content": "import { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport FormulaOneCard from \"..\";\nimport { DriverStanding } from \"../api/f1-models\";\nimport { getApiErrorMessage, getApiLoadingMessage, getCountryFlagByNationality, getDriverName, getEndOfSeasonMessage, reduceArray, renderConstructorColumn } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\n\nexport default class DriverStandings extends BaseCard {\n    defaultTranslations = {\n        'driver' : 'Driver',   \n        'team' : 'Team',\n        'points' : 'Pts',\n        'wins' : 'Wins',\n        'no_standings' : 'No standings available yet',\n        'selectseason' : 'Select season'\n    };\n\n    constructor(parent: FormulaOneCard) {\n        super(parent);    \n    }\n    \n    cardSize(): number {\n        return 12;\n    }  \n    \n    renderStandingRow(standing: DriverStanding, selectedSeason: number): HTMLTemplateResult {\n        return html`\n            <tr>\n                <td class=\"width-40 text-center\">${standing.position}</td>\n                <td>${(this.config.standings?.show_flag ? html`<img height=\"10\" width=\"20\" src=\"${getCountryFlagByNationality(this, standing.Driver.nationality)}\">&nbsp;` : '')}${standing.Driver.code}</td>\n                <td>${getDriverName(standing.Driver, this.config)}</td>\n                ${(this.config.standings?.show_team ? html`${renderConstructorColumn(this, standing.Constructors[standing.Constructors.length - 1], selectedSeason)}` : '')}\n                <td class=\"width-60 text-center\">${standing.points}</td>\n                <td class=\"text-center\">${standing.wins}</td>\n            </tr>`;\n    }\n\n    render() : HTMLTemplateResult {\n        const { selectedSeason } = this.getProperties ? this.getProperties() : { selectedSeason: new Date().getFullYear() };\n\n        const selectedSeasonChanged = (ev: any): void => {\n            this.setSeason(ev);\n        };\n\n        return html`\n            ${this.config.standings?.hide_season_selector ? '' : html`<table>\n                <tr>\n                    <td>\n                        Season<br />\n                        ${until(\n                            this.resultsClient.GetSeasons().then((response: any[]) => {\n                                const seasons = response.reverse();\n                                return this.config.standings?.hide_season_selector ? '' : html`<select name=\"selectedSeason\" @change=${selectedSeasonChanged}>\n                                    <option value=\"0\">${this.translation('selectseason')}</option>\n                                    ${seasons.map(season => html`<option value=\"${season.season}\" ?selected=${selectedSeason === parseInt(season.season)}>${season.season}</option>`)}\n                                </select>`;\n                            }).catch(() => html`${getApiErrorMessage('seasons')}`),\n                            html`${getApiLoadingMessage()}`\n                        )}\n                    </td>\n                </tr>\n            </table>`}\n            ${until(\n                this.resultsClient.GetDriverStandingsForSeason(selectedSeason).then((response: DriverStanding[]) =>\n                    response.length === 0 ?\n                        html`${getEndOfSeasonMessage(this.translation('no_standings'))}` :\n                        html`\n                            <table>\n                                <thead>\n                                <tr>\n                                    <th class=\"width-50\" colspan=\"2\">&nbsp;</th>\n                                    <th>${this.translation('driver')}</th>\n                                    ${(this.config.standings?.show_team ? html`<th>${this.translation('team')}</th>` : '')}\n                                    <th class=\"width-60 text-center\">${this.translation('points')}</th>\n                                    <th class=\"text-center\">${this.translation('wins')}</th>\n                                </tr>\n                                </thead>\n                                <tbody>\n                                    ${reduceArray(response, this.config.row_limit).map(standing => this.renderStandingRow(standing, selectedSeason))}\n                                </tbody>\n                            </table>\n                        `\n                ).catch(() => html`${getApiErrorMessage('standings')}`),\n                html`${getApiLoadingMessage()}`\n            )}\n        `;\n    }\n\n    setSeason(ev: any) {\n        const season = ev.target.value;\n        const { properties, cardValues } = this.getParentCardValues();\n        properties.selectedSeason = season;\n        cardValues.set('cardValues', properties);\n        this.parent.properties = cardValues;\n    }    \n}\n"
  },
  {
    "path": "src/cards/last-result.ts",
    "content": "import { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport FormulaOneCard from \"..\";\nimport { Result } from \"../api/f1-models\";\nimport { getApiErrorMessage, getApiLoadingMessage, getDriverName, getEndOfSeasonMessage, reduceArray, renderHeader, translateStatus } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\n\nexport default class LastResult extends BaseCard {\n    defaultTranslations = {\n        'driver' : 'Driver',   \n        'grid' : 'Grid',\n        'points' : 'Points',\n        'status' : 'Status',\n        'no_result' : 'No result available yet',\n    };\n\n    constructor(parent: FormulaOneCard) {\n        super(parent);    \n    }  \n    \n    cardSize(): number {\n        return 11;\n    }\n\n    renderResultRow(result: Result): HTMLTemplateResult {\n\n        return html`\n            <tr>\n                <td class=\"width-50 text-center\">${result.position}</td>\n                <td>${getDriverName(result.Driver, this.config)}</td>\n                <td>${result.grid}</td>\n                <td class=\"width-60 text-center\">${result.points}</td>\n                <td class=\"width-50 text-center\">${translateStatus(result.status, this.config)}</td>\n            </tr>`;\n    }   \n\n    render() : HTMLTemplateResult {\n\n        return html`${until(\n            this.client.GetLastResult().then(response => \n                !response ?\n                html`${getEndOfSeasonMessage(this.translation('no_result'))}` : \n                html` \n                    <table>\n                        <tr>\n                            <td>${renderHeader(this, response)}</td>\n                        </tr>\n                    </table>\n                    <table>\n                        <thead>                    \n                            <tr>\n                                <th>&nbsp;</th>\n                                <th>${this.translation('driver')}</th>\n                                <th class=\"text-center\">${this.translation('grid')}</th>\n                                <th class=\"text-center\">${this.translation('points')}</th>\n                                <th>${this.translation('status')}</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            ${reduceArray(response.Results, this.config.row_limit).map(result => this.renderResultRow(result))}\n                        </tbody>\n                    </table>`)\n                    .catch(() => html`${getApiErrorMessage('last result')}`),\n            html`${getApiLoadingMessage()}`,\n          )}`;\n    }\n}\n"
  },
  {
    "path": "src/cards/next-race.ts",
    "content": "import { HomeAssistant } from \"custom-card-helpers\";\nimport { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport { getApiErrorMessage, getApiLoadingMessage, getEndOfSeasonMessage, renderHeader, renderRaceInfo } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\nimport { formatDateNumeric } from \"../lib/format_date\";\nimport { NextRaceDisplay } from \"../types/formulaone-card-types\";\nimport { Race } from \"../api/f1-models\";\n\nexport default class NextRace extends BaseCard {\n    hass: HomeAssistant;\n    defaultTranslations = {\n        'date' : 'Date',   \n        'practice1' : 'Practice 1',\n        'practice2' : 'Practice 2',\n        'practice3' : 'Practice 3',\n        'race' : 'Race',\n        'round' : 'Round',\n        'racename' : 'Race name',\n        'circuitname' : 'Circuit name',\n        'location' : 'Location',\n        'city': 'City',\n        'racetime' : 'Race',\n        'sprint' : 'Sprint',\n        'qualifying' : 'Qualifying',        \n        'sprint_qualifying' : 'Sprint Qualifying',\n        'endofseason' : 'Season is over. See you next year!',\n    };\n    \n    cardSize(): number {\n        return 8;\n    }\n    \n    render() : HTMLTemplateResult {\n        return html`${until(\n            this.client.GetSchedule(new Date().getFullYear()).then(response => {\n                \n                const delay = this.config.next_race_delay || 0;\n                const nextRace = response.filter(race =>  {\n                    const nextRaceDate = new Date(race.date + 'T' + race.time);\n\n                    // Add the delay to the hours of the next race\n                    nextRaceDate.setHours(nextRaceDate.getHours() + delay);\n\n                    return nextRaceDate >= new Date();\n                })[0];\n\n                if(!nextRace) {\n                    return getEndOfSeasonMessage(this.translation('endofseason'));\n                }                \n                \n                return html`<table>\n                        <tbody>\n                            <tr>\n                                <td colspan=\"5\">${renderHeader(this, nextRace)}</td>\n                            </tr>\n                            ${this.config.show_raceinfo ? \n                                renderRaceInfo(this, nextRace) : \n                                this.config.only_show_date ? \n                                    html`<tr>\n                                        <td class=\"text-center\">\n                                            <h1 class=\"${(this.config.f1_font ? 'formulaone-font' : '')}\">${this.renderDateTime(nextRace)}</h1>\n                                        </td>\n                                    </tr>` : null\n                                }  \n                        </tbody>\n                    </table>`\n                }).catch(() => { \n                    return html`${getApiErrorMessage('next race')}`;\n                }),\n            html`${getApiLoadingMessage()}`\n        )}`;\n    }\n\n    private renderDateTime(nextRace: Race) {\n        switch(this.config.next_race_display) {\n            case NextRaceDisplay.DateOnly:\n                return formatDateNumeric(new Date(nextRace.date + 'T' + nextRace.time), this.hass.locale, this.config.date_locale);\n            case NextRaceDisplay.TimeOnly:\n                return new Date(nextRace.date + 'T' + nextRace.time).toLocaleTimeString(this.hass.locale.language, { hour: '2-digit', minute: '2-digit' });\n            case NextRaceDisplay.DateAndTime:\n                return formatDateNumeric(new Date(nextRace.date + 'T' + nextRace.time), this.hass.locale, this.config.date_locale) + ' ' + new Date(nextRace.date + 'T' + nextRace.time).toLocaleTimeString(this.hass.locale.language, { hour: '2-digit', minute: '2-digit' });\n            default:\n                return formatDateNumeric(new Date(nextRace.date + 'T' + nextRace.time), this.hass.locale, this.config.date_locale);\n        }\n\n        return null;\n    }\n}\n"
  },
  {
    "path": "src/cards/results.ts",
    "content": "import { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport FormulaOneCard from \"..\";\nimport { QualifyingResult, Race, Result, Season } from \"../api/f1-models\";\nimport { CustomIcons, F1DataSource, FormulaOneCardTab, mwcTabBarEvent, SelectChangeEvent } from \"../types/formulaone-card-types\";\nimport { getApiErrorMessage, getApiLoadingMessage, getCountryFlagByNationality, getDriverName, reduceArray, renderConstructorColumn, renderHeader, translateStatus } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\n\nexport default class Results extends BaseCard {    \n    \n    defaultTranslations = {\n        'driver' : 'Driver',   \n        'grid' : 'Grid',\n        'team' : 'Team',\n        'points' : 'Points',\n        'status' : 'Status',\n        'raceheader' : 'Race',\n        'seasonheader' : 'Season',\n        'selectseason' : 'Select season',\n        'selectrace' : 'Select race',\n        'noresults' : 'Please select a race thats already been run.',\n        'q1' : 'Q1',\n        'q2' : 'Q2',\n        'q3' : 'Q3',        \n        'finished' : 'Finished',\n        'retired' : 'Retired',\n        'disqualified' : 'Disqualified',\n        'notclassified' : 'Not classified'\n    };\n\n    icons: CustomIcons = {\n        'sprint' : 'mdi:flag-checkered',\n        'qualifying' : 'mdi:timer-outline',\n        'results' : 'mdi:trophy',\n    }\n\n    constructor(parent: FormulaOneCard) {\n        super(parent);    \n\n        if (this.config.source === F1DataSource.F1Sensor)\n            throw new Error('F1Sensor is not supported for this card type. Please use source: jolpi.');\n    } \n    \n    cardSize(): number {\n        return 12;\n    }\n\n    renderTabs(selectedRace: Race) : FormulaOneCardTab[] {\n        const tabs: FormulaOneCardTab[] = [{\n            title: 'Results',\n            icon: this.icon('results'),\n            content: this.renderResults(selectedRace),\n            order: this.tabOrder('results')\n        }, {\n            title: 'Qualifying',\n            icon: this.icon('qualifying'),\n            content: this.renderQualifying(selectedRace),\n            order: this.tabOrder('qualifying')\n        }, {\n            title: 'Sprint',\n            icon: this.icon('sprint'),\n            content: this.renderSprint(selectedRace),\n            hide: !selectedRace?.SprintResults,\n            order: this.tabOrder('sprint')\n        }];\n\n        return tabs.sort((a, b) => a.order - b.order);\n    }\n\n    renderSprint(selectedRace: Race) : HTMLTemplateResult {\n        return selectedRace?.SprintResults ? \n            html`<table class=\"nopadding\">\n                    <thead>                    \n                        <tr>\n                            <th>&nbsp;</th>\n                            <th>${this.translation('driver')}</th>\n                            ${(this.config.standings?.show_team ? html`<th>${this.translation('team')}</th>` : '')}\n                            <th class=\"text-center\">${this.translation('grid')}</th>\n                            <th class=\"text-center\">${this.translation('points')}</th>\n                            <th class=\"text-center\">${this.translation('status')}</th>\n                        </tr>\n                    </thead>\n                    <tbody>\n                        ${reduceArray(selectedRace.SprintResults, this.config.row_limit).map(result => this.renderResultRow(result, false, selectedRace.season))}\n                    </tbody>\n                </table>`\n            : null;\n    }\n\n    renderQualifying(selectedRace: Race): HTMLTemplateResult {\n        return selectedRace?.QualifyingResults ?\n            html`<table class=\"nopadding\">\n                    <thead>                   \n                        <tr>\n                            <th>&nbsp;</th>\n                            <th>${this.translation('driver')}</th>\n                            ${(this.config.standings?.show_team ? html`<th>${this.translation('team')}</th>` : '')}\n                            <th class=\"text-center\">${this.translation('q1')}</th>\n                            <th class=\"text-center\">${this.translation('q2')}</th>\n                            <th class=\"text-center\">${this.translation('q3')}</th>\n                        </tr>\n                    </thead>\n                    <tbody>\n                        ${reduceArray(selectedRace.QualifyingResults, this.config.row_limit).map(result => this.renderQualifyingResultRow(result, selectedRace.season))}\n                    </tbody>\n                </table>`            \n            : null;\n    }\n\n    renderResults(selectedRace: Race): HTMLTemplateResult {\n        const fastest = selectedRace?.Results?.filter((result) => result.FastestLap?.rank === '1')[0];\n        return selectedRace?.Results ?\n            html`<table class=\"nopadding\">\n                    <thead>                    \n                        <tr>\n                            <th>&nbsp;</th>\n                            <th>${this.translation('driver')}</th>\n                            ${(this.config.standings?.show_team ? html`<th>${this.translation('team')}</th>` : '')}\n                            <th class=\"text-center\">${this.translation('grid')}</th>\n                            <th class=\"text-center\">${this.translation('points')}</th>\n                            <th>${this.translation('status')}</th>\n                        </tr>\n                    </thead>\n                    <tbody>\n                        ${reduceArray(selectedRace.Results, this.config.row_limit).map(result => this.renderResultRow(result, result.position === fastest?.position, selectedRace.season))}\n                    </tbody>\n                    ${fastest ? html`\n                    <tfoot>\n                        <tr>\n                            <td colspan=\"6\" class=\"text-right\"><small>* Fastest lap: ${fastest.FastestLap.Time.time}</small></td>\n                        </tr>\n                    </tfoot>` : ''}\n                </table>` \n        : null;\n    }   \n\n    renderResultRow(result: Result, fastest: boolean, selectedSeason: string): HTMLTemplateResult {\n        return html`\n            <tr>\n                <td class=\"width-50 text-center\">${result.position}</td>\n                <td>${(this.config.standings?.show_flag ? html`<img height=\"10\" width=\"20\" src=\"${getCountryFlagByNationality(this, result.Driver.nationality)}\">&nbsp;` : '')}${getDriverName(result.Driver, this.config)}${fastest ? ' *' : ''}</td>\n                ${(this.config.standings?.show_team ? html`${renderConstructorColumn(this, result.Constructor, parseInt(selectedSeason))}` : '')}\n                <td>${result.grid}</td>\n                <td class=\"width-60 text-center\">${result.points}</td>\n                <td class=\"width-50 text-center\">${translateStatus(result.status, this.config)}</td>\n            </tr>`;\n    }\n\n    renderQualifyingResultRow(result: QualifyingResult, selectedSeason: string): HTMLTemplateResult {\n        return html`\n            <tr>\n                <td class=\"width-50 text-center\">${result.position}</td>\n                <td>${(this.config.standings?.show_flag ? html`<img height=\"10\" width=\"20\" src=\"${getCountryFlagByNationality(this, result.Driver.nationality)}\">&nbsp;` : '')}${getDriverName(result.Driver, this.config)}</td>\n                ${(this.config.standings?.show_team ? html`${renderConstructorColumn(this, result.Constructor, parseInt(selectedSeason))}` : '')}\n                <td>${result.Q1}</td>\n                <td>${result.Q2}</td>\n                <td>${result.Q3}</td>\n            </tr>`;\n    }\n\n    renderHeader(race?: Race): HTMLTemplateResult {\n        \n        if(race === null || race === undefined || parseInt(race.season) < 2018) {\n            return null;\n        }\n\n        return renderHeader(this, race);\n    }\n\n    render() : HTMLTemplateResult {\n        const { races, selectedRace, selectedSeason, selectedTabIndex } = this.getProperties();\n\n        if(selectedSeason === new Date().getFullYear() && !selectedRace) {\n            this.getLastResult();\n        }\n       \n        const selectedSeasonChanged = (ev: SelectChangeEvent): void => {\n            this.setRaces(ev);\n        }\n\n        const selectedRaceChanged = (ev: SelectChangeEvent): void => {\n            this.setSelectedRace(ev);\n        }\n\n        const tabs = this.renderTabs(selectedRace);\n\n        return html`\n        <table>\n            <tr>\n                <td> \n                    ${this.translation('seasonheader')}<br />                      \n                    ${until(\n                        this.resultsClient.GetSeasons().then((response: Season[]) => { \n                            const seasons = response.reverse();\n                                return html`<select name=\"selectedSeason\" @change=\"${selectedSeasonChanged}\">\n                                        <option value=\"0\">${this.translation('selectseason')}</option>\n                                        ${seasons.map(season => {\n                                            return html`<option value=\"${season.season}\" ?selected=${selectedSeason === parseInt(season.season)}>${season.season}</option>`;\n                                        })}\n                                    </select>`;\n                               \n                            }).catch(() => {\n                                return html`${getApiErrorMessage('seasons')}`;\n                            }),\n                            html`${getApiLoadingMessage()}`,\n                        )}                 \n                </td>\n                <td>\n                    ${this.translation('raceheader')}<br />\n                    <select name=\"selectedRace\" @change=\"${selectedRaceChanged}\">\n                        <option value=\"0\" ?selected=${selectedRace === undefined}>${this.translation('selectrace')}</option>\n                        ${races?.map(race => {\n                            return html`<option value=\"${race.round}\" ?selected=${selectedRace?.round == race.round}>${race.raceName}</option>`;\n                        })}\n                    </select>\n                </td>\n            </tr>\n        </table>\n        ${this.renderTabsHtml(tabs, selectedTabIndex, selectedRace)}`;       \n        \n    }\n\n    renderTabsHtml = (tabs: FormulaOneCardTab[], selectedTabIndex: number, selectedRace?: Race): HTMLTemplateResult => {\n        return selectedRace \n            ? html`<table>\n                        <tr><td colspan=\"2\">${this.renderHeader(selectedRace)}</td></tr>\n                        ${tabs.filter(tab => tab.content).length > 0 ?\n                            html`<tr class=\"transparent\">\n                                <td colspan=\"2\">\n                                    <mwc-tab-bar\n                                    @MDCTabBar:activated=${(ev: mwcTabBarEvent) => \n                                        (this.setSelectedTabIndex(ev.detail.index))}\n                                >\n                                ${tabs.filter(tab => !tab.hide).map(\n                                    (tab) =>  html`\n                                            <mwc-tab\n                                            ?hasImageIcon=${tab.icon}\n                                            ><ha-icon\n                                                    slot=\"icon\"\n                                                    icon=\"${tab.icon}\"\n                                                ></ha-icon>\n                                            </mwc-tab>\n                                        `,\n                                    )}                    \n                                </mwc-tab-bar>\n                                <section>\n                                    <article>\n                                    ${tabs.filter(tab => !tab.hide).find((_, index) => index == selectedTabIndex).content}\n                                    </article>\n                                </section>\n                                </td>\n                            </tr>` : html`<tr><td colspan=\"2\">${this.translation('noresults')}</td></tr>`}                    \n                    </table>` \n                : html``;\n    }\n\n    setSelectedRace(ev: SelectChangeEvent) {\n        const round = parseInt(ev.target.value);\n        const { properties, cardValues } = this.getParentCardValues();\n\n        properties.selectedRound = round;\n\n        const selectedSeason = properties.selectedSeason as number;\n\n        Promise.all([this.resultsClient.GetResults(selectedSeason, round), \n            this.resultsClient.GetQualifyingResults(selectedSeason, round),\n            this.resultsClient.GetSprintResults(selectedSeason, round),\n            this.resultsClient.GetSchedule(selectedSeason)])\n            .then(([results, qualifyingResults, sprintResults, schedule]) => {\n\n                let race = results.Races[0];\n                /* istanbul ignore next */\n                if(race) {\n                    race.QualifyingResults = qualifyingResults.Races[0].QualifyingResults;\n                    /* istanbul ignore next */\n                    race.SprintResults = sprintResults?.Races[0]?.SprintResults\n                    properties.selectedSeason = race.season;                    \n                /* istanbul ignore next */\n                } else {\n                    /* istanbul ignore next */\n                    race = schedule.filter((item: Race) => parseInt(item.round) == round)[0];\n                }\n\n                properties.selectedRace = race;\n                cardValues.set('cardValues', properties);\n                this.parent.properties = cardValues;\n            });\n    }\n\n    private setRaces(ev: SelectChangeEvent) {\n        const selectedSeason = ev.target.value;\n        const { properties, cardValues } = this.getParentCardValues();\n\n        this.resultsClient.GetSeasonRaces(parseInt(selectedSeason)).then((response: Race[]) => {            \n\n            properties.selectedSeason = selectedSeason;\n            properties.selectedRace = undefined;\n            properties.races = response;\n            cardValues.set('cardValues', properties);\n            this.parent.properties = cardValues;\n        });\n    }\n\n    private getUpcomingRace(now: Date, races: Race[]) : Race {\n        \n        const nextRaces = races.filter(race =>  {\n\n            const raceDateTime = new Date(race.date + 'T' + race.time);\n            const qualifyingDateTime = new Date(race.Qualifying.date + 'T' + race.Qualifying.time);\n            const sprintDateTime = race.Sprint ? new Date(race.Sprint.date + 'T' + race.Sprint.time) : null;\n\n            if(raceDateTime >= now && (qualifyingDateTime < now && (sprintDateTime === null || sprintDateTime < now))) {\n                return true;\n            }\n\n            return false;\n        });\n\n        return nextRaces.length > 0 ? nextRaces[0] : null;\n    }\n\n    private getLastResult() {\n\n        const now = new Date();\n\n        console.log('Getting last result, schedule and season');\n\n        Promise.all([this.client.GetSchedule(now.getFullYear()), this.client.GetLastResult()])\n            .then(([schedule, lastResult]) => {\n                \n                const upcomingRace = this.getUpcomingRace(now, schedule);\n\n                let season : number = new Date().getFullYear();\n                let round : number = upcomingRace !== null ? parseInt(upcomingRace.round) : 0;\n    \n                let race = { } as Race;\n                if(upcomingRace !== null) {\n                    race = upcomingRace;\n                    round = parseInt(race.round);\n                    season = parseInt(race.season);\n                } else if(lastResult !== null) {\n                    race = lastResult;\n                    round = parseInt(lastResult.round);\n                    season = parseInt(lastResult.season);\n                }\n                \n                Promise.all([this.resultsClient.GetQualifyingResults(season, round), \n                            this.resultsClient.GetSprintResults(season, round),\n                            this.resultsClient.GetSeasonRaces(season)])\n                    .then(([qualifyingResults, sprintResults, seasonRaces]) => {\n                                                \n                        const { properties, cardValues } = this.getParentCardValues();\n\n                        race.QualifyingResults = qualifyingResults.Races[0].QualifyingResults;\n                        race.SprintResults = sprintResults.Races[0]?.SprintResults;\n                        \n                        properties.races = seasonRaces;\n                        properties.selectedRace = race;\n                        properties.selectedSeason = season.toString();\n\n                        console.log('Selected race: ' + race.raceName);\n                        \n                        cardValues.set('cardValues', properties);\n                        this.parent.properties = cardValues;\n                    });\n        });        \n    }\n\n    setSelectedTabIndex(index: number) {        \n        const { properties, cardValues } = this.getParentCardValues();\n        properties.selectedTabIndex = index;\n        cardValues.set('cardValues', properties);\n        this.parent.properties = cardValues;\n    }       \n\n    icon(key: string) : string {\n\n        if(!this.config.icons || Object.keys(this.config.icons).indexOf(key) < 0) {\n            return this.icons[key];\n        }\n\n        return this.config.icons[key];\n    }\n\n    tabOrder(tab: string) : number {\n        const tabsOrder = this.config.tabs_order?.map(tab => tab.toLowerCase()) ?? ['results', 'qualifying', 'sprint'];\n\n        return tabsOrder.indexOf(tab);\n    }\n}\n"
  },
  {
    "path": "src/cards/schedule.ts",
    "content": "import { formatTime, HomeAssistant } from \"custom-card-helpers\";\nimport { html, HTMLTemplateResult } from \"lit-html\";\nimport { until } from 'lit-html/directives/until.js';\nimport FormulaOneCard from \"..\";\nimport { Circuit, Race } from \"../api/f1-models\";\nimport { formatDate } from \"../lib/format_date\";\nimport { PreviousRaceDisplay } from \"../types/formulaone-card-types\";\nimport { getApiErrorMessage, getApiLoadingMessage, getCountryFlagByName, getEndOfSeasonMessage, reduceArray } from \"../utils\";\nimport { BaseCard } from \"./base-card\";\n\nexport default class Schedule extends BaseCard {\n    hass: HomeAssistant;\n    defaultTranslations = {\n        'date' : 'Date',   \n        'round' : 'Race',\n        'time' : 'Time',\n        'location' : 'Location',\n        'endofseason' : 'Season is over. See you next year!'\n    };\n\n    constructor(parent: FormulaOneCard) {\n        super(parent);    \n    }    \n    \n    cardSize(): number {\n        return 12;\n    }\n\n    renderLocation(circuit: Circuit) {\n        const locationConcatted = html`${(this.config.standings?.show_flag ? html`<img height=\"10\" width=\"20\" src=\"${getCountryFlagByName(this, circuit.Location.country)}\">&nbsp;` : '')}${circuit.Location.locality}, ${circuit.Location.country}`;\n        return this.config.location_clickable ? html`<a href=\"${circuit.url}\" target=\"_blank\">${locationConcatted}</a>` : locationConcatted;\n    }\n\n    renderScheduleRow(race: Race): HTMLTemplateResult {\n        const raceDate = new Date(race.date + 'T' + race.time);\n        const renderClass = this.config.previous_race && raceDate < new Date() ? this.config.previous_race : '';\n\n        return html`\n            <tr class=\"${renderClass}\">\n                <td class=\"width-50 text-center\">${race.round}</td>\n                <td>${race.Circuit.circuitName}</td>\n                <td>${this.renderLocation(race.Circuit)}</td>\n                <td class=\"width-60 text-center\">${formatDate(raceDate, this.hass.locale, this.config.date_locale)}</td>\n                <td class=\"width-50 text-center\">${formatTime(raceDate, this.hass.locale)}</td>\n            </tr>`;\n    }\n\n    render() : HTMLTemplateResult {\n\n        return html`${until(\n            this.client.GetSchedule(new Date().getFullYear()).then(response => {\n\n                const schedule = this.config.previous_race === PreviousRaceDisplay.Hide ? response.filter(race => {\n                    return new Date(race.date + 'T' + race.time) >= new Date();\n                }) : response;\n\n                const next_race = schedule.filter(race =>  {\n                    return new Date(race.date + 'T' + race.time) >= new Date();\n                })[0];\n                if(!next_race) {\n                    return getEndOfSeasonMessage(this.translation('endofseason'));\n                }\n\n                return html`<table>\n                            <thead>\n                                <tr>\n                                    <th>&nbsp;</th>\n                                    <th>${this.translation('round')}</th>\n                                    <th>${this.translation('location')}</th>\n                                    <th class=\"text-center\">${this.translation('date')}</th>\n                                    <th class=\"text-center\">${this.translation('time')}</th>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                ${reduceArray(schedule, this.config.row_limit).map(race => this.renderScheduleRow(race))}\n                            </tbody>\n                        </table>`;\n            }).catch(() => html`${getApiErrorMessage('schedule')}`),\n            html`${getApiLoadingMessage()}`\n        )}`;\n    }\n}"
  },
  {
    "path": "src/consts.ts",
    "content": "export const CARD_NAME = 'formulaone-card';\nexport const CARD_EDITOR_NAME = `${CARD_NAME}-editor`;"
  },
  {
    "path": "src/directives/action-handler-directive.ts",
    "content": "/* istanbul ignore file */\nimport { AttributePart, directive, Directive, DirectiveParameters } from 'lit/directive.js';\nimport { ActionHandlerDetail, ActionHandlerOptions } from 'custom-card-helpers/dist/types';\nimport { fireEvent } from 'custom-card-helpers';\nimport { ActionHandlerElement } from '../types/formulaone-card-types';\nimport { noChange } from 'lit';\n\nconst isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0;\n\ndeclare global {\n  interface HASSDomEvents {\n    action: ActionHandlerDetail;\n  }\n}\n\nclass ActionHandler extends HTMLElement implements ActionHandler {\n  public holdTime = 500;\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public ripple: any;\n\n  protected timer?: number;\n\n  protected held = false;\n\n  private dblClickTimeout?: number;\n\n  constructor() {\n    super();\n    this.ripple = document.createElement('mwc-ripple');\n  }\n\n  public connectedCallback(): void {\n    Object.assign(this.style, {\n      position: 'absolute',\n      width: isTouch ? '100px' : '50px',\n      height: isTouch ? '100px' : '50px',\n      transform: 'translate(-50%, -50%)',\n      pointerEvents: 'none',\n      zIndex: '999',\n    });\n\n    this.appendChild(this.ripple);\n    this.ripple.primary = true;\n\n    ['touchcancel', 'mouseout', 'mouseup', 'touchmove', 'mousewheel', 'wheel', 'scroll'].forEach((ev) => {\n      document.addEventListener(\n        ev,\n        () => {\n          clearTimeout(this.timer);\n          this.stopAnimation();\n          this.timer = undefined;\n        },\n        { passive: true },\n      );\n    });\n  }\n\n  public bind(element: ActionHandlerElement, options: ActionHandlerOptions): void {\n    if (element.actionHandler) {\n      return;\n    }\n    element.actionHandler = true;\n\n    element.addEventListener('contextmenu', (ev: Event) => {\n      const e = ev || window.event;\n      if (e.preventDefault) {\n        e.preventDefault();\n      }\n      if (e.stopPropagation) {\n        e.stopPropagation();\n      }\n      e.cancelBubble = true;\n      e.returnValue = false;\n      return false;\n    });\n\n    const start = (ev: Event): void => {\n      this.held = false;\n      let x: number;\n      let y: number;\n      if ((ev as TouchEvent).touches) {\n        x = (ev as TouchEvent).touches[0].pageX;\n        y = (ev as TouchEvent).touches[0].pageY;\n      } else {\n        x = (ev as MouseEvent).pageX;\n        y = (ev as MouseEvent).pageY;\n      }\n\n      this.timer = window.setTimeout(() => {\n        this.startAnimation(x, y);\n        this.held = true;\n      }, this.holdTime);\n    };\n\n    const end = (ev: Event): void => {\n      // Prevent mouse event if touch event\n      ev.preventDefault();\n      if (['touchend', 'touchcancel'].includes(ev.type) && this.timer === undefined) {\n        return;\n      }\n      clearTimeout(this.timer);\n      this.stopAnimation();\n      this.timer = undefined;\n      if (this.held) {\n        fireEvent(element, 'action', { action: 'hold' });\n      } else if (options.hasDoubleClick) {\n        if ((ev.type === 'click' && (ev as MouseEvent).detail < 2) || !this.dblClickTimeout) {\n          this.dblClickTimeout = window.setTimeout(() => {\n            this.dblClickTimeout = undefined;\n            fireEvent(element, 'action', { action: 'tap' });\n          }, 250);\n        } else {\n          clearTimeout(this.dblClickTimeout);\n          this.dblClickTimeout = undefined;\n          fireEvent(element, 'action', { action: 'double_tap' });\n        }\n      } else {\n        fireEvent(element, 'action', { action: 'tap' });\n      }\n    };\n\n    const handleEnter = (ev: KeyboardEvent): void => {\n      if (ev.keyCode !== 13) {\n        return;\n      }\n      end(ev);\n    };\n\n    element.addEventListener('touchstart', start, { passive: true });\n    element.addEventListener('touchend', end);\n    element.addEventListener('touchcancel', end);\n\n    element.addEventListener('mousedown', start, { passive: true });\n    element.addEventListener('click', end);\n\n    element.addEventListener('keyup', handleEnter);\n  }\n\n  private startAnimation(x: number, y: number): void {\n    Object.assign(this.style, {\n      left: `${x}px`,\n      top: `${y}px`,\n      display: null,\n    });\n    this.ripple.disabled = false;\n    this.ripple.active = true;\n    this.ripple.unbounded = true;\n  }\n\n  private stopAnimation(): void {\n    this.ripple.active = false;\n    this.ripple.disabled = true;\n    this.style.display = 'none';\n  }\n}\n\n// TODO You need to replace all instances of \"action-handler-boilerplate\" with \"action-handler-<your card name>\"\ncustomElements.define('action-handler-formulaonecard', ActionHandler);\n\nconst getActionHandler = (): ActionHandler => {\n  const body = document.body;\n  if (body.querySelector('action-handler-formulaonecard')) {\n    return body.querySelector('action-handler-formulaonecard') as ActionHandler;\n  }\n\n  const actionhandler = document.createElement('action-handler-formulaonecard');\n  body.appendChild(actionhandler);\n\n  return actionhandler as ActionHandler;\n};\n\nexport const actionHandlerBind = (element: ActionHandlerElement, options?: ActionHandlerOptions): void => {\n  const actionhandler: ActionHandler = getActionHandler();\n  if (!actionhandler) {\n    return;\n  }\n  actionhandler.bind(element, options);\n};\n\nexport const actionHandler = directive(\n  class extends Directive {\n    update(part: AttributePart, [options]: DirectiveParameters<this>) {\n      actionHandlerBind(part.element as ActionHandlerElement, options);\n      return noChange;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars\n    render(_options?: ActionHandlerOptions) {}\n  },\n);"
  },
  {
    "path": "src/editor.ts",
    "content": "import EditorForm from '@marcokreeft/ha-editor-formbuilder';\nimport { FormControlType } from \"@marcokreeft/ha-editor-formbuilder/dist/interfaces\";\nimport { getDropdownOptionsFromEnum } from \"@marcokreeft/ha-editor-formbuilder/dist/utils/entities\";\nimport { css, CSSResult } from \"lit\";\nimport { html, TemplateResult } from \"lit-html\";\nimport { customElement } from 'lit/decorators.js';\nimport { CARD_EDITOR_NAME } from \"./consts\";\nimport { CountdownType, FormulaOneCardType, PreviousRaceDisplay, WeatherUnit } from \"./types/formulaone-card-types\";\n\n@customElement(CARD_EDITOR_NAME)\nexport class FormulaOneCardEditor extends EditorForm {\n\n    protected render(): TemplateResult {\n        if (!this._hass || !this._config) {\n            return html``;\n        }\n\n        return this.renderForm([\n            { controls: [{ label: \"Card Type (Required)\", configValue: \"card_type\", type: FormControlType.Dropdown, items: getDropdownOptionsFromEnum(FormulaOneCardType) }] },\n            { controls: [{ label: \"Title\", configValue: \"title\", type: FormControlType.Textbox }] },\n            {\n                label: \"Basic configuration\",\n                cssClass: 'side-by-side',\n                controls: [\n                    { label: \"Use F1 font\", configValue: \"f1_font\", type: FormControlType.Switch },\n                    { label: \"Image clickable\", configValue: \"image_clickable\", type: FormControlType.Switch },\n                    { label: \"Show carnumber\", configValue: \"show_carnumber\", type: FormControlType.Switch },\n                    { label: \"Location clickable\", configValue: \"location_clickable\", type: FormControlType.Switch },\n                    { label: \"Show race information\", configValue: \"show_raceinfo\", type: FormControlType.Switch },\n                    { label: \"Hide track layout\", configValue: \"hide_tracklayout\", type: FormControlType.Switch },\n                    { label: \"Hide race dates and times\", configValue: \"hide_racedatetimes\", type: FormControlType.Switch },\n                    { label: \"Show last years result\", configValue: \"show_lastyears_result\", type: FormControlType.Switch },\n                    { label: \"Only show date\", configValue: \"only_show_date\", type: FormControlType.Switch },\n                    { type: FormControlType.Filler },\n                    { label: \"Row limit\", configValue: \"row_limit\", type: FormControlType.Textbox },\n                    { label: \"Date locale\", configValue: \"date_locale\", type: FormControlType.Textbox }\n                ]\n            },\n            {\n                label: \"Countdown Type\",\n                hidden: this._config.card_type !== FormulaOneCardType.Countdown,\n                cssClass: 'side-by-side',\n                controls: [{ configValue: \"countdown_type\", type: FormControlType.Checkboxes, items: getDropdownOptionsFromEnum(CountdownType) }]\n            },\n            {\n                hidden: this._config.card_type !== FormulaOneCardType.NextRace,\n                controls: [\n                    { label: \"Next race delay\", configValue: \"next_race_delay\", type: FormControlType.Textbox },\n                ]\n            },\n            {\n                hidden: this._config.card_type !== FormulaOneCardType.Schedule,\n                controls: [{ label: \"Previous race\", configValue: \"previous_race\", type: FormControlType.Dropdown, items: getDropdownOptionsFromEnum(PreviousRaceDisplay) }]\n            },\n            {\n                label: \"Standings\",\n                hidden: this._config.card_type !== FormulaOneCardType.ConstructorStandings && this._config.card_type !== FormulaOneCardType.DriverStandings,\n                cssClass: 'side-by-side',\n                controls: [\n                    { label: \"Show team\", configValue: \"standings.show_team\", type: FormControlType.Switch },\n                    { label: \"Show flag\", configValue: \"standings.show_flag\", type: FormControlType.Switch },\n                    { label: \"Show teamlogo\", configValue: \"standings.show_teamlogo\", type: FormControlType.Switch }\n                ]\n            },\n            {\n                label: \"Weather\",\n                hidden: this._config.card_type !== FormulaOneCardType.NextRace && this._config.card_type !== FormulaOneCardType.Countdown,\n                controls: [\n                    { label: \"Show weather\", configValue: \"show_weather\", type: FormControlType.Switch }\n                ]\n            },\n            {\n                cssClass: 'side-by-side',\n                hidden: (this._config.card_type !== FormulaOneCardType.NextRace && this._config.card_type !== FormulaOneCardType.Countdown) || !this._config.show_weather,\n                controls: [\n                    { label: \"API key\", configValue: \"weather_options.api_key\", type: FormControlType.Textbox },\n                    { label: \"Unit\", configValue: \"weather_options.unit\", type: FormControlType.Dropdown, items: getDropdownOptionsFromEnum(WeatherUnit) },\n                    { label: \"Show icon\", configValue: \"weather_options.show_icon\", type: FormControlType.Switch },\n                    { label: \"Show precipitation\", configValue: \"weather_options.show_precipitation\", type: FormControlType.Switch },\n                    { label: \"Show wind\", configValue: \"weather_options.show_wind\", type: FormControlType.Switch },\n                    { label: \"Show temperature\", configValue: \"weather_options.show_temperature\", type: FormControlType.Switch },\n                    { label: \"Show cloud coverage\", configValue: \"weather_options.show_cloud_cover\", type: FormControlType.Switch },\n                    { label: \"Show visibility\", configValue: \"weather_options.show_visibility\", type: FormControlType.Switch }\n                ]\n            },\n            {\n                label: \"Tabs\",\n                hidden: this._config.card_type !== FormulaOneCardType.Results,\n                controls: [\n                    { label: \"Tabs order\", configValue: \"tabs_order\", type: FormControlType.Textbox }\n                ]\n            },\n        ]);\n    }\n\n    static get styles() : CSSResult {\n        return css`\n            .form-row {\n                margin-bottom: 10px;\n            }\n            .form-control {\n                display: flex;\n                align-items: center;\n            }\n            ha-switch {\n                padding: 16px 6px;\n            }\n            .side-by-side {\n                display: flex;\n                flex-flow: row wrap;\n            }            \n            .side-by-side > label {\n                width: 100%;\n            }\n            .side-by-side > .form-control {\n                width: 49%;\n                padding: 2px;\n            }\n            ha-textfield { \n                width: 100%;\n            }\n            .hidden {\n                display: none;\n            }\n            @media (max-width: 600px) {\n                .side-by-side > .form-control {\n                    width: 48%;\n                }\n            }\n        `;\n    }\n}"
  },
  {
    "path": "src/fonts.ts",
    "content": "export const loadCustomFonts = () => {\n    \n    if(window && document.fonts) {\n        // Load the F1 font using the CSS Font Loading API\n        const font = new FontFace(\"F1Bold\", \"url(https://www.formula1.com/etc/designs/fom-website/fonts/F1Bold/Formula1-Bold.woff)\");\n        document.fonts.add(font);\n        font.load();\n    }\n}\n"
  },
  {
    "path": "src/index.ts",
    "content": "import * as packageJson from '../package.json';\nimport { property, customElement } from 'lit/decorators.js';\nimport { HomeAssistant, LovelaceCardEditor } from 'custom-card-helpers';\nimport { FormulaOneCardConfig, FormulaOneCardType } from './types/formulaone-card-types';\nimport { CSSResult, html, HTMLTemplateResult, LitElement, PropertyValues } from 'lit';\nimport { checkConfig, hasConfigOrCardValuesChanged } from './utils';\nimport { loadCustomFonts } from './fonts';\nimport { styles } from './styles';\nimport ConstructorStandings from './cards/constructor-standings';\nimport DriverStandings from './cards/driver-standings';\nimport Schedule from './cards/schedule';\nimport NextRace from './cards/next-race';\nimport LastResult from './cards/last-result';\nimport { BaseCard } from './cards/base-card';\nimport Countdown from './cards/countdown';\nimport Results from './cards/results';\nimport RestCountryClient from './api/restcountry-client';\nimport { CARD_EDITOR_NAME, CARD_NAME } from './consts';\n\nconsole.info(\n    `%c ${CARD_NAME.toUpperCase()} %c ${packageJson.version}`,\n    'color: cyan; background: black; font-weight: bold;',\n    'color: darkblue; background: white; font-weight: bold;'\n);\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n(window as any).customCards = (window as any).customCards || [];\n(window as any).customCards.push({\n  type: 'formulaone-card',\n  name: 'FormulaOne card',\n  preview: false,\n  description: 'Present the data of Formula One in a pretty way',\n});\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n@customElement(CARD_NAME)\nexport default class FormulaOneCard extends LitElement {\n    @property() _hass?: HomeAssistant;\n    @property() config?: FormulaOneCardConfig;\n    @property() card: BaseCard;\n    @property() warning: string;\n    @property() set properties(values: Map<string, unknown>) {\n        this._cardValues = values;\n        this.update(values);\n    }\n    get properties() {\n        return this._cardValues;\n    }\n\n    constructor() {\n        super();\n        \n        this.setCountryCache();\n    }\n\n    private _cardValues?: Map<string, unknown>;\n\n    /* istanbul ignore next */\n    public static async getConfigElement(): Promise<LovelaceCardEditor> {\n        await import(\"./editor\");\n        return document.createElement(CARD_EDITOR_NAME) as LovelaceCardEditor;\n    }\n\n    setConfig(config: FormulaOneCardConfig) {\n\n        checkConfig(config);\n\n        this.config = { ...config };\n    }\n\n    setCountryCache() {\n        new RestCountryClient().GetAll().catch(() => { \n            this.warning = 'Country API is down, so flags are not available at the moment!'; \n            this.update(this._cardValues);\n        });\n    }\n\n    protected shouldUpdate(changedProps: PropertyValues): boolean {\n        return hasConfigOrCardValuesChanged(this, changedProps);\n    }\n\n    set hass(hass: HomeAssistant) {\n        this._hass = hass;\n\n        this.config.hass = hass;\n\n        switch(this.config.card_type) {\n            case FormulaOneCardType.ConstructorStandings:\n                this.card = new ConstructorStandings(this);\n                break;\n            case FormulaOneCardType.DriverStandings:\n                this.card = new DriverStandings(this);\n                break;\n            case FormulaOneCardType.Schedule:\n                this.card = new Schedule(this);\n                break;\n            case FormulaOneCardType.NextRace:\n                this.card = new NextRace(this);\n                break;\n            case FormulaOneCardType.LastResult:\n                this.card = new LastResult(this);\n                break;\n            case FormulaOneCardType.Countdown:\n                this.card = new Countdown(this);\n                break;\n            case FormulaOneCardType.Results:\n                this.card = new Results(this);\n                break;\n        }\n    }\n\n    static get styles(): CSSResult {\n        loadCustomFonts();\n        return styles;\n    }\n\n    render() : HTMLTemplateResult {\n        if (!this._hass || !this.config) return html``;\n\n        try {\n            return html`\n                <ha-card elevation=\"2\">\n                    ${this.renderRefreshButton()}\n                    ${this.warning ? html`<hui-warning>${this.warning}</hui-warning>` : ''}\n                    ${this.config.title ? html`<h1 class=\"card-header${(this.config.f1_font ? ' formulaone-font' : '')}\">${this.config.title}</h1>` : ''}\n                    ${this.card.render()}\n                </ha-card>\n            `;\n        } catch (error) {\n            return html`<hui-warning>${error.toString()}</hui-warning>`;\n        }\n    }\n\n    getCardSize() {\n        return this.card.cardSize();\n    }\n\n    /* istanbul ignore next */\n    renderRefreshButton() {\n        return this.config.show_refresh ? html`<div class=\"refresh-cache\" @click=${(e: Event) => this.refreshCache(e)}><ha-icon slot=\"icon\" icon=\"mdi:refresh\"></ha-icon></div>` : null;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    refreshCache(event: Event) {\n        console.log('Refreshing cache...');\n\n       this.card.client.RefreshCache();\n    }\n}"
  },
  {
    "path": "src/lib/constants.ts",
    "content": "export const ImageConstants = {\n    FlagCDN : 'https://flagcdn.com/w320/',\n    TeamLogoCDNLegacy : 'https://www.formula1.com/content/dam/fom-website/teams/',\n    TeamLogoCDN : 'https://media.formula1.com/image/upload/c_lfill,w_48/q_auto/v1740000000/common/f1/',\n    F1CDNLegacy : 'https://media.formula1.com/image/upload/f_auto,c_limit,q_auto,w_1320/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9',\n    F1CDN: 'https://media.formula1.com/image/upload/c_fit,h_704/q_auto/v1740000001/common/f1/2026/track/2026track'\n};\n\nexport const TIMESTAMP_FORMATS = ['relative', 'total', 'date', 'time', 'datetime'];\n\nexport const SECONDARY_INFO_VALUES = [\n    'entity-id',\n    'last-changed',\n    'last-updated',\n    'last-triggered',\n    'position',\n    'tilt-position',\n    'brightness',\n];\n\nexport const NumberFormat = {\n    language: 'language',\n    system: 'system',\n    comma_decimal: 'comma_decimal',\n    decimal_comma: 'decimal_comma',\n    space_comma: 'space_comma',\n    none: 'none',\n};\n\nexport const TimeFormat = {\n    language: 'language',\n    system: 'system',\n    am_pm: '12',\n    twenty_four: '24',\n};\n"
  },
  {
    "path": "src/lib/format_date.ts",
    "content": "// Source: https://github.com/home-assistant/frontend/blob/dev/src/common/datetime/format_date.ts\nimport { FrontendLocaleData } from 'custom-card-helpers';\n\nexport const formatDate = (dateObj: Date, locale: FrontendLocaleData, overrideLanguage?: string) => new Intl.DateTimeFormat(overrideLanguage ?? locale.language, {\n    month: '2-digit',\n    day: '2-digit',\n}).format(dateObj);\n\nexport const formatDateNumeric = (dateObj: Date, locale: FrontendLocaleData, overrideLanguage?: string) => new Intl.DateTimeFormat(overrideLanguage ?? locale.language, {\n    year: \"2-digit\",\n    month: \"2-digit\",\n    day: \"2-digit\",\n}).format(dateObj);"
  },
  {
    "path": "src/lib/format_date_time.ts",
    "content": "// Source: https://github.com/home-assistant/frontend/blob/dev/src/common/datetime/format_date_time.ts\n\nimport { FrontendLocaleData } from 'custom-card-helpers';\nimport { useAmPm } from './use_am_pm';\n\nexport const formatDateTime = (dateObj: Date, locale: FrontendLocaleData) => new Intl.DateTimeFormat(locale.language, {\n    year: 'numeric',\n    month: 'long',\n    day: 'numeric',\n    hour: useAmPm(locale) ? 'numeric' : '2-digit',\n    minute: '2-digit',\n    hour12: useAmPm(locale),\n}).format(dateObj);\n\nexport const formatDateTimeRaceInfo = (dateObj: Date, locale: FrontendLocaleData) => new Intl.DateTimeFormat(locale.language, {        \n    weekday: 'short',\n    hour: '2-digit',\n    minute: '2-digit',\n    hour12: useAmPm(locale),\n}).format(dateObj);"
  },
  {
    "path": "src/lib/format_time.ts",
    "content": "// Source: https://github.com/home-assistant/frontend/blob/dev/src/common/datetime/format_time.ts\nimport { FrontendLocaleData } from 'custom-card-helpers';\n\nexport const formatTime = (dateObj: Date, locale: FrontendLocaleData) => new Intl.DateTimeFormat(locale.language, {\n    hour: '2-digit',\n    minute: '2-digit',\n    hour12: false,\n}).format(dateObj);\n"
  },
  {
    "path": "src/lib/use_am_pm.ts",
    "content": "// Source: https://github.com/home-assistant/frontend/blob/dev/src/common/datetime/use_am_pm.ts\nimport { FrontendLocaleData } from 'custom-card-helpers';\nimport { TimeFormat } from './constants';\n\nexport const useAmPm = (locale: FrontendLocaleData) => {\n    if (locale.time_format === TimeFormat.language || locale.time_format === TimeFormat.system) {\n        const testLanguage = locale.time_format === TimeFormat.language ? locale.language : undefined;\n        const test = new Date().toLocaleString(testLanguage);\n        return test.includes('AM') || test.includes('PM');\n    }\n\n    return locale.time_format === TimeFormat.am_pm;\n};\n"
  },
  {
    "path": "src/styles.ts",
    "content": "import { css } from 'lit';\n\nexport const styles = css`   \n    table {\n        width: 100%;\n        border-spacing: 0;\n        border-collapse: separate;\n        padding: 0px 16px 16px;\n    }\n    table.nopadding {\n        padding: 0px;\n        width: 100%;\n        border-spacing: 0;\n        border-collapse: separate;\n    }\n    th {\n        background-color: var(--table-row-alternative-background-color, #eee);\n    }\n    th, td {\n        padding: 5px;\n        text-align: left;\n    }\n    tr {\n        color: var(--secondary-text-color);\n    }\n    tr:nth-child(even) {\n        background-color: var(--table-row-alternative-background-color, #eee);\n    }\n    .text-center {\n        text-align: center;\n    }\n    .width-40 {\n        width: 40px;\n    }\n    .width-50 {\n        width: 50px;\n    }\n    .width-60 {\n        width: 60px;\n    }\n    .hide {\n        display: none;\n    }\n    .strikethrough {\n        text-decoration: line-through;\n    }\n    .italic {\n        font-style: italic;\n    }\n    a {\n        text-decoration: none;\n        color: var(--secondary-text-color);\n    }\n    .constructor-logo {\n        width: 20px;\n        margin: auto;\n        display: block;\n        float: left;\n        background-color: white;\n        border-radius: 50%;\n        margin-right: 3px;\n    }\n    .clickable {\n        cursor: pointer;\n    }\n    .formulaone-font {\n        font-family: 'F1Bold';\n    }\n    ha-icon {\n        color: var(--secondary-text-color);\n    }\n    .transparent {\n        background-color: transparent !important;\n    }        \n    .weather-info {\n        padding: 10px;\n    }\n\n    .weather-info td {\n        width: 33%;\n    }\n    .refresh-cache {\n        position: absolute;\n        right: 10px;\n        top: 10px;\n    }\n`;\n"
  },
  {
    "path": "src/types/formulaone-card-types.ts",
    "content": "import { ActionConfig, ActionHandlerOptions, HomeAssistant, LovelaceCardConfig } from 'custom-card-helpers';\nimport { HTMLTemplateResult } from 'lit';\n\nexport interface FormulaOneCardConfig extends LovelaceCardConfig {\n    source: F1DataSource;\n    entity?: string;\n    show_icon?: boolean;\n    title?: string;\n    name?: string;\n    hass?: HomeAssistant;\n    card_type?: FormulaOneCardType;\n    date_locale?: string;\n    image_clickable?: boolean;\n    show_carnumber?: boolean;\n    location_clickable?: boolean;\n    previous_race?: PreviousRaceDisplay;\n    standings?: StandingDisplayOptions;\n    translations?: Translation;\n    show_raceinfo?: boolean;\n    hide_tracklayout?: boolean;\n    hide_racedatetimes?: boolean;\n    actions?: ActionOptions;\n    f1_font?: boolean; \n    row_limit?: number;\n    icons?: CustomIcons;\n    countdown_type?: CountdownType | CountdownType[] | undefined;\n    show_event_details?: boolean;\n    show_weather?: boolean;\n    weather_options?: WeatherOptions;\n    next_race_delay?: number;\n    show_lastyears_result?: boolean;\n    only_show_date?: boolean;\n    tabs_order?: string[];\n    show_refresh?: boolean;\n    next_race_display?: NextRaceDisplay | undefined;\n    countdown_format?: string;\n}\n\nexport enum F1DataSource {\n    Jolpi = 'jolpi',\n    F1Sensor = 'f1sensor'\n}\n\nexport interface ValueChangedEvent {\n    detail: {\n        value: {\n            itemValue: string;\n            parentElement: {\n                configValue: string;\n            };\n        }\n    };\n    target: {\n        value: string;\n        configValue: string;\n        checked?: boolean;\n    };    \n}\n\nexport interface WeatherOptions {\n    source: WeatherSource;\n    entity?: string;\n    api_key?: string;\n    unit?: WeatherUnit;\n    show_icon?: boolean;\n    show_precipitation?: boolean; \n    show_wind?: boolean;\n    show_temperature?: boolean;\n    show_cloud_cover?: boolean;\n    show_visibility?: boolean;\n}\n\nexport enum WeatherSource {\n    VisualCrossing = 'visualcrossing',\n    F1Sensor = 'f1sensor',\n}\n\nexport enum NextRaceDisplay {\n    DateOnly = 'date',\n    TimeOnly = 'time',\n    DateAndTime = 'datetime'\n}\n\nexport enum WeatherUnit {\n    Metric = 'metric',\n    MilesCelsius = 'uk',\n    MilesFahrenheit = 'us'\n}\n\nexport enum CountdownType {\n    Race = \"race\",\n    Qualifying = \"qualifying\",\n    Practice1 = \"practice1\",\n    Practice2 = \"practice2\",\n    Practice3 = \"practice3\",\n    Sprint = \"sprint\",\n    SprintQualifying = \"sprint_qualifying\"\n}\n\nexport interface ActionOptions {\n    tap_action?: ActionConfig;\n    hold_action?: ActionConfig;\n    double_tap_action?: ActionConfig;\n}\n\nexport interface Translation {\n    [key: string]: string;\n}\n\nexport interface CustomIcons {\n    [key: string]: string;\n}\n\nexport interface StandingDisplayOptions {\n    show_team?: boolean;\n    show_flag?: boolean;\n    show_teamlogo?: boolean;\n    hide_season_selector?: boolean;\n}\n\nexport enum PreviousRaceDisplay {\n    Strikethrough = 'strikethrough',\n    Italic = 'italic',\n    Hide = 'hide'\n}\n\nexport enum FormulaOneCardType {\n    DriverStandings = 'driver_standings',\n    ConstructorStandings = 'constructor_standings',\n    NextRace = 'next_race',\n    Schedule = 'schedule',\n    LastResult = 'last_result',\n    Results = 'results',\n    Countdown = 'countdown'\n}\n\nexport interface LocalStorageItem {\n    data: string,\n    created: Date\n}\n\nexport interface CardProperties {\n    [key: string]: unknown;\n}\n\nexport interface ActionHandler extends HTMLElement {\n    holdTime: number;\n    bind(element: Element, options: ActionHandlerOptions): void;\n}\n\nexport interface ActionHandlerElement extends HTMLElement {\n    actionHandler?: boolean;\n}\n\nexport interface FormulaOneCardTab {\n    title: string\n    icon: string\n    content: HTMLTemplateResult,\n    hide?: boolean,\n    order?: number\n}\n\nexport interface SelectChangeEvent {\n    target: {\n        value: string;\n    }\n}\n\nexport interface mwcTabBarEvent extends Event {\n    detail: {\n        index: number;\n    };\n}"
  },
  {
    "path": "src/types/rest-country-types.ts",
    "content": "export interface Flags {\n    svg: string;\n    png: string;\n}\n\nexport interface Currency {\n    code: string;\n    name: string;\n    symbol: string;\n}\n\nexport interface Language {\n    iso639_1: string;\n    iso639_2: string;\n    name: string;\n    nativeName: string;\n}\n\nexport interface Translations {\n    br: string;\n    pt: string;\n    nl: string;\n    hr: string;\n    fa: string;\n    de: string;\n    es: string;\n    fr: string;\n    ja: string;\n    it: string;\n    hu: string;\n}\n\nexport interface RegionalBloc {\n    acronym: string;\n    name: string;\n    otherNames: string[];\n    otherAcronyms: string[];\n}\n\nexport interface Country {\n    name: string;\n    topLevelDomain: string[];\n    alpha2Code: string;\n    alpha3Code: string;\n    callingCodes: string[];\n    capital: string;\n    altSpellings: string[];\n    subregion: string;\n    region: string;\n    population: number;\n    latlng: number[];\n    demonym: string;\n    area: number;\n    timezones: string[];\n    borders: string[];\n    nativeName: string;\n    numericCode: string;\n    flags: Flags;\n    currencies: Currency[];\n    languages: Language[];\n    translations: Translations;\n    flag: string;\n    regionalBlocs: RegionalBloc[];\n    cioc: string;\n    independent: boolean;\n    gini?: number;\n}"
  },
  {
    "path": "src/utils.ts",
    "content": "import { ActionHandlerEvent, handleAction, hasAction, HomeAssistant } from \"custom-card-helpers\";\nimport { html, HTMLTemplateResult, LitElement, PropertyValues } from \"lit\";\nimport { until } from 'lit-html/directives/until.js';\nimport FormulaOneCard from \".\";\nimport { Constructor, Driver, Location, Race, Root } from \"./api/f1-models\";\nimport RestCountryClient from \"./api/restcountry-client\";\nimport { WeatherData } from \"./api/weather-models\";\nimport { BaseCard } from \"./cards/base-card\";\nimport { actionHandler } from './directives/action-handler-directive';\nimport { ImageConstants } from \"./lib/constants\";\nimport { formatDateNumeric } from \"./lib/format_date\";\nimport { formatDateTimeRaceInfo } from \"./lib/format_date_time\";\nimport { FormulaOneCardConfig, FormulaOneCardType, LocalStorageItem, Translation } from \"./types/formulaone-card-types\";\n\nexport const hasConfigOrCardValuesChanged = (node: FormulaOneCard, changedProps: PropertyValues) => {\n    if (changedProps.has('config')) {\n        return true;\n    }\n\n    const card = changedProps.get('card') as BaseCard;\n    if (card && card.parent) {\n        return card.parent.properties !== node.properties;\n    }\n\n    const cardValues = changedProps.get('cardValues') as Map<string, unknown>;\n    if(cardValues) {\n        return cardValues != node.properties;\n    }\n\n    return false;\n};\n\nexport const getCountries = () => {\n    const countryClient = new RestCountryClient();\n    return countryClient.GetCountriesFromLocalStorage();\n}\n\nexport const getCountryFlagByNationality = (card: BaseCard, nationality: string) => {\n    const countries = getCountries();\n\n    nationality = nationality.trim();\n    const exceptions = [{ demonym: 'Argentinian', corrected: 'Argentinean'}, { demonym: 'Argentine', corrected: 'Argentinean'}];\n    const exception = exceptions.filter(exception => exception.demonym == nationality);\n    if(exception.length > 0)\n    {\n        nationality = exception[0].corrected;\n    }\n    \n    const country = countries.filter(x => x.demonym == nationality);\n    if(country.length > 1)\n    {\n        return card.imageClient.GetImage(country.sort((a, b) => (a.population > b.population) ? -1 : 1)[0].flags.png);\n    }    \n\n    return card.imageClient.GetImage(country[0].flags.png);\n}\n\nexport const getCountryFlagByName = (card: BaseCard, countryName: string) => {\n    const countries = getCountries();\n    \n    const country = countries.filter(x => x.name == countryName || x.nativeName == countryName ||\n        x.altSpellings?.includes(countryName))[0];\n\n    return card.imageClient.GetImage(country.flags.png);\n}\n\nexport const checkConfig = (config: FormulaOneCardConfig) => {\n    if (config.card_type === undefined) {\n        throw new Error('Please define FormulaOne card type (card_type).');\n    }\n};\n\nexport const getTeamImage = (card: BaseCard, teamName: string, selectedSeason: number) => {\n    return card.imageClient.GetTeamLogoImage(teamName, selectedSeason);\n}\n\nexport const getCircuitName = (race: Race) => {\n    \n    const exceptions = [{ countryDashed: 'Spain', name: 'Catalunya'}, { countryDashed: 'Belgium', name: 'SpaFrancorchamps'}, { countryDashed: 'Hungary', name: 'Hungaroring'}, \n    { countryDashed: 'Brazil', name: 'Interlagos'}, { countryDashed: 'USA', name: 'LasVegas'}, { countryDashed: 'USA', name: 'Miami'}, { countryDashed: 'UAE', name: 'YasMarina'}, { countryDashed: 'Singapore', name: 'singapore'}];\n\n    const exception = exceptions.filter(exception => exception.countryDashed == race.Circuit.Location.country);\n    if(exception.length > 0)\n    {\n        if (exception.length > 1) {\n            const circuitException = exception.filter(exception => exception.name.toLowerCase() == race.Circuit.Location.locality.toLowerCase());\n\n            if(circuitException.length > 0) {\n                return circuitException[0].name;\n            }\n        }\n\n        return exception[0].name;\n    }\n\n    return race.Circuit.Location.locality.replace(\" \",\"\");\n}\n\n\nexport const getCircuitNameLegacy = (location: Location) => {\n    \n    let circuitName = location.country.replace(\" \",\"-\")\n    const exceptions = [{ countryDashed: 'UAE', name: 'Abu_Dhabi'}, { countryDashed: 'UK', name: 'Great_Britain'}, \n    { countryDashed: 'Azerbaijan', name: 'Baku'}, { countryDashed: 'Saudi-Arabia', name: 'Saudi_Arabia'}];\n\n    const exception = exceptions.filter(exception => exception.countryDashed == circuitName);\n    if(exception.length > 0)\n    {\n        circuitName = exception[0].name; \n    }\n\n    if((location.country == 'USA' || location.country == 'United States') && location.locality != 'Austin')\n    {\n        circuitName = location.locality.replace(\" \",\"_\");\n    }\n\n    if(location.country == 'Italy' && location.locality == 'Imola')\n    {\n        circuitName = \"Emilia_Romagna\";\n    }\n\n    return circuitName;\n}\n\nexport const getDriverName = (driver: Driver, config: FormulaOneCardConfig) => {\n    const permanentNumber = driver.code == 'VER' ? 1 : driver.permanentNumber;\n    return `${driver.givenName} ${driver.familyName}${(config.show_carnumber ? ` #${permanentNumber}` : '')}`;\n}\n\nexport const getApiErrorMessage = (dataType: string) => {\n    return html`<table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:alert-circle\"></ha-icon> Error getting ${dataType} <ha-icon icon=\"mdi:alert-circle\"></ha-icon></td></tr></table>`\n}\n\nexport const getApiLoadingMessage = () => {\n    return html`<table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table>`\n}\n\nexport const getEndOfSeasonMessage = (message: string) => {\n    return html`<table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:flag-checkered\"></ha-icon><strong>${message}</strong><ha-icon icon=\"mdi:flag-checkered\"></ha-icon></td></tr></table>`;\n} \n\nexport const clickHandler = (node: LitElement, config: FormulaOneCardConfig, hass: HomeAssistant, ev: ActionHandlerEvent) => {\n    handleAction(node, hass, config.actions, ev.detail.action);\n}\n\nexport const renderHeader = (card: BaseCard, race: Race): HTMLTemplateResult => {\n    const _handleAction = (ev: ActionHandlerEvent): void => {\n        if (card.hass && card.config.actions && ev.detail.action && card.config.image_clickable) {\n            clickHandler(card.parent, card.config, card.hass, ev);\n        }\n    }\n    \n    const hasConfigAction = card.config.image_clickable || card.config.actions !== undefined;\n    const circuitUrl = race.Circuit.url;\n\n    if(card.config.image_clickable && !card.config.actions) {\n        card.config.actions = {\n            tap_action: {\n                action: 'url',\n                url_path: circuitUrl\n            }\n        };\n    }\n\n    const imageHtml = html`<img width=\"100%\" src=\"${card.imageClient.GetTrackLayoutImage(race)}\" @action=${_handleAction}\n    .actionHandler=${actionHandler({\n        hasHold: hasAction(card.config.actions?.hold_action),\n        hasDoubleClick: hasAction(card.config.actions?.double_tap_action),\n      })} class=\"${(hasConfigAction ? ' clickable' : null)}\" />`;\n    const raceName = html`<h2 class=\"${(card.config.f1_font ? 'formulaone-font' : '')}\"><img height=\"25\" src=\"${getCountryFlagByName(card, race.Circuit.Location.country)}\">&nbsp;  ${race.round} :  ${race.raceName}</h2>`;\n    \n    return html`${(card.config.card_type == FormulaOneCardType.Countdown ? html`` : raceName)} ${(card.config.hide_tracklayout ? html`` : imageHtml)}<br>`;\n}\n\nexport const renderRaceInfo = (card: BaseCard, race: Race) => {\n    const config = card.config;\n    const hass = card.hass;\n    const weatherPromise = config.show_weather ? card.weatherClient.getRaceWeatherData(card.config.weather_options, race) : Promise.resolve(null);\n    const lastYearPromise = config.show_lastyears_result ? card.resultsClient.GetLastYearsResults(race.Circuit.circuitName) : Promise.resolve(null);\n\n    const promises = Promise.all([weatherPromise, lastYearPromise]);\n    \n    return html`${until(promises.then(([weather, lastYearData]) => {\n        \n        const weatherInfo = renderWeatherInfo(weather);\n        const lastYearsResult = renderLastYearsResults(config, lastYearData)\n\n        if (config.hide_racedatetimes && (config.show_weather || config.show_lastyears_result)) \n             return html`${weatherInfo}${lastYearsResult}`;\n\n        const raceDate = new Date(race.date + 'T' + race.time);\n\n        const freePractice1Datetime = race.FirstPractice !== undefined ? new Date(race.FirstPractice.date + 'T' + race.FirstPractice.time) : null;\n        const freePractice2Datetime = race.SecondPractice !== undefined ? new Date(race.SecondPractice.date + 'T' + race.SecondPractice.time) : null;\n        const freePractice3Datetime = race.ThirdPractice !== undefined ? new Date(race.ThirdPractice.date + 'T' + race.ThirdPractice.time) : null;\n        const qualifyingDatetime = race.Qualifying !== undefined ? new Date(race.Qualifying.date + 'T' + race.Qualifying.time) : null;\n        const sprintQualifyingDatetime = race.SprintQualifying !== undefined ? new Date(race.SprintQualifying.date + 'T' + race.SprintQualifying.time) : null;\n        const sprintDatetime = race.Sprint !== undefined ? new Date(race.Sprint.date + 'T' + race.Sprint.time) : null;\n\n        const freePractice1 = race.FirstPractice !== undefined ? formatDateTimeRaceInfo(freePractice1Datetime, hass.locale) : '-';\n        const freePractice2 = race.SecondPractice !== undefined ? formatDateTimeRaceInfo(freePractice2Datetime, hass.locale) : '-';\n        const freePractice3 = race.ThirdPractice !== undefined ? formatDateTimeRaceInfo(freePractice3Datetime, hass.locale) : '-';\n        const raceDateFormatted = formatDateTimeRaceInfo(raceDate, hass.locale);\n        const qualifyingDate = formatDateTimeRaceInfo(qualifyingDatetime, hass.locale);\n        const sprintDate = race.Sprint !== undefined ? formatDateTimeRaceInfo(sprintDatetime, hass.locale) : '-';\n        const sprintQualifyingDate = race.SprintQualifying !== undefined ? formatDateTimeRaceInfo(sprintQualifyingDatetime, hass.locale) : '-';\n\n        const events: { date: Date, name: string, value: string }[] = [];\n        events.push({ date: freePractice1Datetime, name: card.translation('practice1'), value: freePractice1 });\n        events.push({ date: freePractice2Datetime, name: card.translation('practice2'), value: freePractice2 });\n        events.push({ date: freePractice3Datetime, name: card.translation('practice3'), value: freePractice3 });\n        events.push({ date: qualifyingDatetime, name: card.translation('qualifying'), value: qualifyingDate });\n        events.push({ date: sprintQualifyingDatetime, name: card.translation('sprint_qualifying'), value: sprintQualifyingDate });\n        events.push({ date: sprintDatetime, name: card.translation('sprint'), value: sprintDate });\n        events.push({ date: raceDate, name: card.translation('racetime'), value: raceDateFormatted });\n\n        const filteredEvents = events.filter(event => event.date !== null).sort((a, b) => a.date.getTime() - b.date.getTime()); \n        \n        return html`${lastYearsResult}${weatherInfo}<tr><td>${card.translation('date')}</td><td>${formatDateNumeric(raceDate, hass.locale, config.date_locale)}</td><td>&nbsp;</td><td>${renderEventColumn(0, 'name', filteredEvents)}</td><td align=\"right\">${renderEventColumn(0, 'value', filteredEvents)}</td></tr>\n                    <tr><td>${card.translation('round')}</td><td>${race.round}</td><td>&nbsp;</td><td>${renderEventColumn(1, 'name', filteredEvents)}</td><td align=\"right\">${renderEventColumn(1, 'value', filteredEvents)}</td></tr>\n                    <tr><td>${card.translation('racename')}</td><td>${race.raceName}</td><td>&nbsp;</td><td>${renderEventColumn(2, 'name', filteredEvents)}</td><td align=\"right\">${renderEventColumn(2, 'value', filteredEvents)}</td></tr>\n                    <tr><td>${card.translation('circuitname')}</td><td>${race.Circuit.circuitName}</td><td>&nbsp;</td><td>${renderEventColumn(3, 'name', filteredEvents)}</td><td align=\"right\">${renderEventColumn(3, 'value', filteredEvents)}</td></tr>\n                    <tr><td>${card.translation('location')}</td><td>${race.Circuit.Location.country}</td><td>&nbsp;</td><td>${renderEventColumn(4, 'name', filteredEvents)}</td><td align=\"right\">${renderEventColumn(4, 'value', filteredEvents)}</td></tr>        \n                    <tr><td>${card.translation('city')}</td><td>${race.Circuit.Location.locality}</td><td>&nbsp;</td><td>${renderEventColumn(5, 'name', filteredEvents)}</td><td align=\"right\">${renderEventColumn(5, 'value', filteredEvents)}</td></tr>`;\n    }))}`;\n}\n\nexport const renderEventColumn = (index: number, lookupKey: string, events: { date: Date, name: string, value: string }[]) => {\n \n    if (events.length > index) {\n        if(lookupKey === 'name') \n            return events[index].name;\n\n        if(lookupKey === 'value') \n            return events[index].value;\n    }\n\n    return '-';\n};\n\nexport const renderLastYearsResults = (config: FormulaOneCardConfig, raceData: Race) => {\n    if(!raceData) {\n        return html``;\n    }\n\n    const result = raceData.Results ? raceData.Results[0] : null;\n    const fastest = raceData.Results?.filter((result) => result.FastestLap?.rank === '1')[0];\n\n    return html`<tr>\n        <td colspan=\"5\">\n            <table class=\"weather-info\">\n                <tr>\n                    <td class=\"text-center\">\n                        <h1 class=\"${(config.f1_font ? 'formulaone-font' : '')}\">${new Date(raceData.date).getFullYear()}</h1>\n                        <h2 class=\"${(config.f1_font ? 'formulaone-font' : '')}\">\n                            <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> ${result?.Driver.givenName} ${result?.Driver.familyName} (${result?.Constructor.name})\n                        </h2>\n                        <h3 class=\"${(config.f1_font ? 'formulaone-font' : '')}\">\n                            <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> ${fastest?.Driver.givenName} ${fastest?.Driver.familyName} (${fastest?.FastestLap?.Time.time})\n                        </h3>\n                    </td>\n                </tr>\n            </table>\n        </td>\n        <tr><td colspan=\"5\">&nbsp;</td></tr>`;\n}\n\nexport const renderWeatherInfo = (weatherData: WeatherData) => { \n    if(!weatherData) {\n        return html``;\n    }\n\n    const tempUnit = weatherData.race_temperature_unit === 'fahrenheit' ? '°F' : '°C';\n\n    return html`<tr>\n                    <td colspan=\"5\">\n                        <table class=\"weather-info\">\n                            <tr>\n                                <td><ha-icon slot=\"icon\" icon=\"mdi:clouds\"></ha-icon>&nbsp;${weatherData.race_cloud_cover} ${weatherData.race_cloud_cover_unit}</td>\n                                <td><ha-icon slot=\"icon\" icon=\"mdi:thermometer-lines\"></ha-icon>&nbsp;${weatherData.race_temperature} ${tempUnit}</td>\n                                <td><ha-icon slot=\"icon\" icon=\"mdi:water-percent\"></ha-icon>&nbsp;${weatherData.race_humidity} ${weatherData.race_humidity_unit}</td>\n                            </tr>\n                            <tr>\n                                <td><ha-icon slot=\"icon\" icon=\"mdi:weather-windy\"></ha-icon>&nbsp;${weatherData.race_wind_direction} ${weatherData.race_wind_speed} ${weatherData.race_wind_speed_unit}</td>\n                                <td><ha-icon slot=\"icon\" icon=\"mdi:weather-pouring\"></ha-icon>&nbsp;${weatherData.race_precipitation} ${weatherData.race_precipitation_unit}</td>\n                                <td>${(weatherData.race_precipitation_prob ? html`<ha-icon slot=\"icon\" icon=\"mdi:cloud-percent-outline\"></ha-icon>&nbsp;${weatherData.race_precipitation_prob} %` : html``)}</td>\n                            </tr>\n                            \n                        </table>\n                    </td>\n                </tr>\n                <tr><td colspan=\"5\">&nbsp;</td></tr>`;\n}\n\nexport const getRefreshTime = (endpoint: string) => {\n    let refreshCacheHours = 24;\n    const now = new Date();\n    const scheduleLocalStorage = localStorage.getItem(`${now.getFullYear()}.json`);\n\n    if(scheduleLocalStorage) {\n        const item: LocalStorageItem = <LocalStorageItem>JSON.parse(scheduleLocalStorage);\n        const schedule = <Root>JSON.parse(item.data);\n        const filteredRaces = schedule.MRData.RaceTable.Races.filter(race => new Date(race.date).toLocaleDateString == now.toLocaleDateString);\n        \n        if(filteredRaces.length > 0) {\n            const todaysRace = filteredRaces[0];\n            const raceTime = new Date(todaysRace.date + 'T' + todaysRace.time);\n            \n            const lastResultLocalStorage = localStorage.getItem(endpoint);  \n            if(lastResultLocalStorage) {\n                const resultItem: LocalStorageItem = <LocalStorageItem>JSON.parse(lastResultLocalStorage);\n                \n                if(new Date(resultItem.created) < raceTime) {\n                    refreshCacheHours = 1;\n                }\n            }          \n        }\n    }\n\n    return refreshCacheHours;\n}\n\nexport const reduceArray = <T>(array?: T[], number?: number) => {\n    if(array === undefined) {\n        return [];\n    }\n\n    return number ? array.slice(0, number) : array;\n}\n\nexport const renderConstructorColumn = (card: BaseCard, constructor: Constructor, selectedSeason: number): HTMLTemplateResult => {\n    return html`<td>${(card.config.standings.show_teamlogo ? html`<img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"${getTeamImage(card, constructor.constructorId, selectedSeason)}\">&nbsp;` : '')}${constructor.name}</td>`;\n}\n\nexport const translateStatus = (status: string, config: FormulaOneCardConfig) => {\n    const defaultTranslations: Translation = {\n        'Finished' : 'Finished',\n        '+1 Lap' : '+1 Lap',\n        'Engine' : 'Engine',\n        '+2 Laps' : '+2 Laps',\n        'Accident' : 'Accident',\n        'Collision' : 'Collision',\n        'Gearbox' : 'Gearbox',\n        'Spun off' : 'Spun off',\n        '+3 Laps' : '+3 Laps',\n        'Suspension' : 'Suspension',\n        '+4 Laps' : '+4 Laps',\n        'Transmission' : 'Transmission',\n        'Electrical' : 'Electrical',\n        'Brakes' : 'Brakes',\n        'Withdrew' : 'Withdrew',\n        '+5 Laps' : '+5 Laps',\n        'Clutch' : 'Clutch',\n        'Lapped' : 'Lapped',\n        'Retired' : 'Retired',\n        'Not classified' : 'Not classified',\n        'Fuel system' : 'Fuel system',\n        '+6 Laps' : '+6 Laps',\n        'Disqualified' : 'Disqualified',\n        'Turbo' : 'Turbo',\n        'Hydraulics' : 'Hydraulics',\n        'Overheating' : 'Overheating',\n        'Ignition' : 'Ignition',\n        'Oil leak' : 'Oil leak',\n        'Throttle' : 'Throttle',\n        'Out of fuel' : 'Out of fuel'\n    };\n\n    if(!config.translations || Object.keys(config.translations).indexOf(status) < 0) {\n        return defaultTranslations[status];\n    }\n\n    return config.translations[status]\n}\n"
  },
  {
    "path": "test/configuration.yaml",
    "content": "homeassistant:\n  time_zone: Europe/Amsterdam\n  temperature_unit: C\n  unit_system: metric\n\ndefault_config:\n\nlovelace:\n  mode: storage\n  dashboards:\n    lovelace-yaml:\n      mode: yaml\n      title: yaml\n      filename: test/lovelace.yaml"
  },
  {
    "path": "test/lovelace.yaml",
    "content": "views:\n  - theme: Backend-selected\n    title: f1\n    path: f1\n    icon: mdi:car-sports\n    subview: false\n    badges: []\n    cards:\n      - type: custom:formulaone-card\n        card_type: countdown\n        show_raceinfo: true\n        f1_font: true\n        date_locale: en-US\n        show_weather: true\n        weather_options:\n          api_key: R69TG493HYLZWLP3UKKJDTPB2\n        title: null\n        show_lastyears_result: true\n        hide_tracklayout: false\n        show_refresh: false\n      - type: custom:formulaone-card\n        card_type: results\n        date_locale: nl\n        location_clickable: true\n        f1_font: true\n      - type: custom:formulaone-card\n        card_type: schedule\n        date_locale: nl\n        previous_race: hide\n        location_clickable: true\n      - type: custom:formulaone-card\n        card_type: constructor_standings\n        standings:\n          show_teamlogo: true\n      - type: custom:formulaone-card\n        card_type: driver_standings\n        standings:\n          show_flag: true\n          show_team: true\n          show_teamlogo: true\n"
  },
  {
    "path": "tests/api/ergast-client.test.ts",
    "content": "import ErgastClient from \"../../src/api/ergast-client\";\nimport LocalStorageMock from \"../testdata/localStorageMock\";\nimport fetchMock from \"jest-fetch-mock\";\n\n// Models\nimport { Mrdata } from \"../../src/api/f1-models\";\nimport { LocalStorageItem } from '../../src/types/formulaone-card-types';\n\n// Importing test data\nimport { MRData as scheduleData } from '../testdata/schedule.json'\nimport { MRData as resultData } from '../testdata/results.json'\nimport { MRData as driverStandingsData } from '../testdata/driverStandings.json'\nimport { MRData as constructorStandingsData } from '../testdata/constructorStandings.json'\nimport { MRData as seasonData } from '../testdata/seasons.json'\nimport { MRData as qualifyingData } from '../testdata/qualifying.json'\n\ndescribe('Testing ergast client file', () => {\n    const client = new ErgastClient();    \n    const localStorageMock = new LocalStorageMock();\n\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {        \n        localStorageMock.clear();     \n    });\n\n    test('Passing number to GetSchedule should return correct data', async () => { \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = await client.GetSchedule(2022);\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(scheduleData.RaceTable.Races));\n    }),\n    test('Calling GetLastResult should return correct data', async () => {       \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n\n        // Act\n        const result = await client.GetLastResult();\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(resultData.RaceTable.Races[0]));\n    }),\n    test('Calling GetDriverStandings should return correct data', async () => {       \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>driverStandingsData }));\n\n        // Act\n        const result = await client.GetDriverStandings();\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(driverStandingsData.StandingsTable.StandingsLists[0].DriverStandings));\n    }),\n    test('Calling GetConstructorStandings should return correct data', async () => {           \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>constructorStandingsData }));\n\n        // Act\n        const result = await client.GetConstructorStandings();\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(constructorStandingsData.StandingsTable.StandingsLists[0].ConstructorStandings));\n    }),\n    test('Calling GetResults should return correct data', async () => {  \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n\n        // Act\n        const result = await client.GetResults(2022, 2);\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(resultData.RaceTable));\n    }),\n    test('Calling GetSeasons should return correct data', async () => {           \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n\n        // Act\n        const result = await client.GetSeasons();\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(seasonData.SeasonTable.Seasons));\n    }),\n    test('Calling GetSeasonRaces should return correct data', async () => {     \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = await client.GetSeasonRaces(2022);\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(scheduleData.RaceTable.Races));\n    }),\n    test('Calling GetQualifyingResults should return correct data', async () => {    \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>qualifyingData }));\n\n        // Act\n        const result = await client.GetQualifyingResults(2022, 2);\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(qualifyingData.RaceTable));\n    }),\n    test('Calling GetData with data in localstorage and cacheResult true should return correct data', async () => {      \n        // Arrange\n        localStorageMock.setItem('2022.json', JSON.stringify({ data: JSON.stringify({ MRData: scheduleData }), created: new Date() }));    \n\n        // Act\n        const result = await client.GetData('2022.json', true, 24);\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(scheduleData));\n    }),\n    test('Calling GetData without data in localstorage and cacheResult true should return correct data', async () => {  \n        // Arrange \n        const endpoint = '2022.json';      \n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));  \n        \n        // Act\n        const result = await client.GetData(endpoint, true, 24);\n        const localStorageItem = <LocalStorageItem>JSON.parse(localStorageMock.getItem(endpoint));\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(scheduleData));\n        expect(localStorageItem.data).toMatch(JSON.stringify(scheduleData));\n    }),\n    test('Calling GetLastYearsResults without data in localstorage and cacheResult true should return correct data', async () => {  \n        // Arrange      \n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));  \n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        \n        // Act\n        const result = await client.GetLastYearsResults('Hungaroring');\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(resultData.RaceTable.Races[0]));\n    })\n});"
  },
  {
    "path": "tests/api/image-client.test.ts",
    "content": "// Mocks\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from \"../testdata/localStorageMock\";\n\n// Models\nimport ImageClient from \"../../src/api/image-client\";\n\nconst localStorageMock = new LocalStorageMock();\nObject.defineProperty(window, 'localStorage', { value: localStorageMock });\n\nbeforeEach(() => {    \n    \n    jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(jest.fn());\n});\n\ndescribe('Testing image client file', () => {\n\n    const client = new ImageClient();\n\n    test('Calling GetImage should return correct data', () => {   \n        // Arrange\n        fetchMock.mockResponseOnce(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAACgCAMAAABKfUWuAAAAQlBMVEUBIWn5wcoyS4bM0uHsRGMAIGlUapr////kACtDW5DBydtmeaWzvdL7ztaAkLQQLnLw8vYgPHugrMeQnr3f4+zxc4uUeOcyAAAGhklEQVR42u2dXZejIAyGMzKYAVzEj/3/f3UvrK1trQJhbOzmvZgz03OqzlMCCSQpfH/hg5oKklQjIuLPgxARsU67UtUgIv75vl3l+wu46+eHirAUwDV8iCcASEVYBuA6vpMApCEsAfAVvtMApCCkA3yN70QA8xFSAW7hOwHAr28qQhrAbXwnAIhIRUgBuIfvFACpCPMB7uM7AUBjqQhzAcbgUwbg4xHmAfwYfHSEOQA/Ch8VYTrAj8NHQ5gK8CPxURCmAfxYfPkIUwC+HV/X8kMYD5DB6HOO3yiMBcjBeHXT8DPkOIA85r4WsWU3F8YAfDc+PV1bO8SLDRs+CPcBMhh99Th0ANAgNgDQDWPNZxTuAWQx9+kGUbkOEbFzasLIBeE2QC5+XxuWdwxHzISxCLcA8nGbdb28Zw0HKQaheg1QcYo6msWnziw6eQmQVdBW3W5blQS0KzeNo7/fV/39Ewtw+12j3797sTnQL+/sy82BWEivRiBVhWZAF+4vG5wATLFe+3xhWwnA+Dik9n6wV4rWDt7XRgAm+NF6+b8uXxOACeslIoaAiEWX/h/mKhkPI6Jzpd3o/wigR3SgHaIXgFnq0YEG7bAXgFmyblo8nBWAeXMg6ImgzIGZzgwU9V/+P4C/IwEoAAWgABSAAlAACkABKAAFoGyolpATgDSl5X0IwOeNaycAafuujQDMyl1w3WTBlyzW1kWdHMemdiy1lrCxD/D5Xcodl9oRdWbS1NPZnQOo+0IpSM+H+neJRn9SRuDzOy2rihCFGIYeEe0wFsohjME3vgY4ngthhYVzCGPwKbOVYGnsqRAuM7iag/DtpfieC6EqlwQci28/yfxECDtVKvUzHl9MmcPvI9R1gRmrHe6esW8PwRdXaPPrCHt6tsFjDmZ2EmYavthSr19GGELxKSvTjlPxxRcb/ibCuoTXURnj5me03pgKjsCXUu76CwhdX03xKw4AAFVPyH3W+ubINJCTv5CDL63gujxChcq1MCKO0LoRFXEUWkTsEdHCUfhSS/6NKouwQkS01x/UzHGFOIDL2cTIxZfedCIGYcLsfV//Qd+g76eq2PYofDltT8oiXFyMasDQYQ8AWg9pedQUfHmNd0oiLFnCZWZ3sq+Pwpfb+qkYwuWFyKV3N8OtjsKX33ysCMK2x1LxV/asSf0n8tvfxSBMDL8KFsFlAcwxI0oDxn2E2/ysfbiAsta9D2DeLERrAbqHcC90AIBufme3ePENAHPXQWoT2m2EKctwBW8Q3Y2gt0HeQhgRwhpE7PvSNXBpACmObIlG3K8RxsUiPUBfuIQrBSAplCrUCv4Vwoi3DlPtVv8ugDR85b6MYB1hzA7K5QDN2ncApOIr+XUYawhjtvPb2akGESn+yohCqkr4kdTLqKUN3hBaoUDQrZ+gKHnweT/YgBjs4L0Mw3QtmhkFGYVZBKsLwVCBFhx5S8iBzRg/EuA0AgVgrg3XiON4YDvLj9OAQ9sO79mD+AyAFQBANQgJkUgk4qGuEwYUz0p7CStpUkoYkCz4kh4gypRsUFItuECW6H9uwWLDRAsWG6aoOfrLOs7u9tX+zl7XNig7/+HbbZokhY27/eUmgMtXGrT6eJ0Hf4WIob+kR+jmvli+6gNikDVlU1Od0OjamwVPNty5qeOELCn7nt807GpwM0AHdVOqdujjdasTCtcmJyrgW9OWz2jELyTnNQlGvFYyL3SSjPhJYsA0IxYDphmxGDDRiMWAo9Wv8ZPs41h1dn0EWoniYtRuOIKSOrsvN2450qOkju0sH3aviayVpWTDeoeYPrwDJzvmVJmknxsWrItTEvwwnMh6OdrxyMe7994/tXxYjUes9Z5LUMcxc6I1xnnfPHJrvHfGsJn+3FTDe82cMIymFb3su7fcSGB0uKO7MPpuzpzo/MjuqOZpPeaWue0Q0U4H/5bjUc3TimJZPyG7p4M5HgmzazOyi9gXThfDs9b5yaq5gg/ZPaK7AeR31jrvCF47wzPcDfSct8rN9ZO9JngYZk94t+kxGpafrruEePzMpHv2Uzt+AN3sFzpmZrK6ZRlYbVbeuVYTQV6eQmuMu2JkFSNNUncjTsPA7UxOa627W/ITuwS4pyOknqEfYxBRKX7rG8ztlx8IcnNWtUNUbas4uoFm5QizZ/c5ewwdQBcYuoFd9IvvHIFNmCrUg6TB56m5BEeVAMwbgdXjLyKRSCQSiUQikUgkEolEIpFIlKJ/+z5WV3uERkEAAAAASUVORK5CYII=\");\n\n        // Act\n        const image = client.GetImage('fakeurl');\n\n        // Assert\n        expect(JSON.stringify(image)).toMatch(JSON.stringify(`fakeurl`));\n    }),\n\n    test('Calling GetImage should return correct data with localstorage', async () => {\n\n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify('fakeurl'));\n        localStorageMock.setItem(`fakeurl`, JSON.stringify({ data: 'fakedata', created: new Date() }));\n\n        // Act\n        const image = client.GetImage('fakeurl');\n\n        // Assert\n        expect(JSON.stringify(image)).toMatch(JSON.stringify('fakedata'));\n    })\n});"
  },
  {
    "path": "tests/api/restcountry-client.test.ts",
    "content": "// Mocks\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from \"../testdata/localStorageMock\";\n\n// Models\nimport RestCountryClient from \"../../src/api/restcountry-client\";\nimport { LocalStorageItem } from \"../../src/types/formulaone-card-types\";\n\n// Importing test data\nimport * as countryData from '../testdata/countries.json'\n\ndescribe('Testing restcountry client file', () => {\n\n    const client = new RestCountryClient();    \n    const localStorageMock = new LocalStorageMock();\n\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    test('Calling GetCountriesFromLocalStorage should return correct data', () => {   \n         // Arrange\n        localStorageMock.clear();     \n        localStorageMock.setItem('all', JSON.stringify({ data: JSON.stringify(countryData), created: new Date() } as LocalStorageItem));\n\n        // Act\n        const countries = client.GetCountriesFromLocalStorage();\n\n        // Assert\n        expect(JSON.stringify(countries)).toMatch(JSON.stringify(countryData));\n    }),\n    test('Calling GetCountriesFromLocalStorage should return correct data without localstorage', () => {   \n        // Arrange\n        localStorageMock.clear();     \n\n        // Act\n        const countries = client.GetCountriesFromLocalStorage();\n\n        // Assert\n        expect(JSON.stringify(countries)).toMatch(JSON.stringify([]));\n    }),\n    test('Calling GetAll should return correct data', async () => { \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify(countryData));\n\n        // Act\n        const result = await client.GetAll();\n\n        // Assert\n        expect(JSON.stringify(result)).toMatch(JSON.stringify(countryData));\n    })\n})"
  },
  {
    "path": "tests/api/weather-client.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\n\n// Models\nimport WeatherClient from \"../../src/api/weather-client\";\nimport { WeatherResponse } from \"../../src/api/weather-models\";\n\ndescribe('Testing weather client file', () => {\n\n    const client = new WeatherClient('fakekey', 'metric');    \n    const weatherData = createMock<WeatherResponse>();\n\n    test('Calling GetWeatherFromLocalStorage should return correct data without localstorage', async () => {   \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify(weatherData));\n        \n        // Act\n        const weather = await client.getWeatherData(\"1\", \"2\", \"2023-01-01\");\n\n        // Assert\n        expect(JSON.stringify(weather)).toMatch(JSON.stringify(weatherData));\n    })\n});"
  },
  {
    "path": "tests/cards/base-card.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport FormulaOneCard from \"../../src\";\n\n// Models\nimport WeatherClient from \"../../src/api/weather-client\";\nimport { FormulaOneCardConfig } from \"../../src/types/formulaone-card-types\";\n\n// Importing test data\nimport ConstructorStandings from \"../../src/cards/constructor-standings\";\n\ndescribe('Testing base-card file', () => {\n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>()\n    });\n\n    test.each`\n    key | expected\n    ${'constructor'}, ${'Constructor'}\n    ${'points'}, ${'Punten'}\n    `('Calling translation should return correct translation', ({ key, expected }) => { \n        // Arrange\n        parent.config.translations = {  \n            \"points\" : \"Punten\"\n        };\n\n        // Act\n        const card = new ConstructorStandings(parent);\n\n        // Assert\n        expect(card.translation(key)).toBe(expected);\n    }),\n    test('Given config without weater_options when weatherOptions is called then default weatherOptions are returned', () => {\n        // Arrange\n        parent.config.weather_options = {};\n\n        // Act\n        const card = new ConstructorStandings(parent);\n\n        // Assert\n        expect(card.weatherClient).toMatchObject(new WeatherClient(''));\n\n    }),\n    test('Given config without weater_options when weatherOptions is called then default weatherOptions are returned', () => {\n        // Arrange\n        parent.config.weather_options = { api_key: 'undefined' };\n\n        // Act\n        const card = new ConstructorStandings(parent);\n\n        // Assert\n        expect(card.weatherClient).toMatchObject(new WeatherClient('undefined'));\n    })\n});"
  },
  {
    "path": "tests/cards/constructor-standings.test.ts",
    "content": "// Mocks\nimport { createMock } from 'ts-auto-mock';\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from '../testdata/localStorageMock';\n\n// Models\nimport ConstructorStandings from '../../src/cards/constructor-standings';\nimport { getRenderString, getRenderStringAsync } from '../utils';\nimport { FormulaOneCardConfig } from '../../src/types/formulaone-card-types';\nimport { Mrdata } from '../../src/api/f1-models';\nimport { getApiErrorMessage } from '../../src/utils';\nimport FormulaOneCard from '../../src';\nimport ImageClient from '../../src/api/image-client';\n\n// Importing test data\nimport { MRData } from '../testdata/constructorStandings.json'\n\ndescribe('Testing constructor-standings file', () => {\n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>()\n    });\n    const card = new ConstructorStandings(parent);\n    \n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n        \n        jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n        jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });  \n    });\n\n    test('Calling render with api returning data', async () => {   \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <thead> <tr> <th class=\"width-50\">&nbsp;</th> <th>Constructor</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td>Red Bull</td> <td class=\"width-60 text-center\">576</td> <td class=\"text-center\">13</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td>Ferrari</td> <td class=\"width-60 text-center\">439</td> <td class=\"text-center\">4</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td>Mercedes</td> <td class=\"width-60 text-center\">373</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td>McLaren</td> <td class=\"width-60 text-center\">129</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td>Alpine F1 Team</td> <td class=\"width-60 text-center\">125</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td>Alfa Romeo</td> <td class=\"width-60 text-center\">52</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td>Aston Martin</td> <td class=\"width-60 text-center\">37</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td>Haas F1 Team</td> <td class=\"width-60 text-center\">34</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td>AlphaTauri</td> <td class=\"width-60 text-center\">34</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td>Williams</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api and show_teamlogo returning data', async () => {   \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));        \n        card.config.standings = {\n            show_teamlogo: true\n        }\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toMatch('<table> <thead> <tr> <th class=\"width-50\">&nbsp;</th> <th>Constructor</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td class=\"width-60 text-center\">576</td> <td class=\"text-center\">13</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td class=\"width-60 text-center\">439</td> <td class=\"text-center\">4</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td class=\"width-60 text-center\">373</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td class=\"width-60 text-center\">129</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td class=\"width-60 text-center\">125</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td class=\"width-60 text-center\">52</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td class=\"width-60 text-center\">37</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td class=\"width-60 text-center\">34</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td class=\"width-60 text-center\">34</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api not returning data', async () => {   \n        // Arrange\n        fetchMock.mockRejectOnce(new Error('Error'));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getApiErrorMessage('standings'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling cardSize with hass and sensor', () => { \n        expect(card.cardSize()).toBe(11);\n    })    \n});"
  },
  {
    "path": "tests/cards/countdown.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from '../testdata/localStorageMock';\n\n// Models\nimport Countdown from \"../../src/cards/countdown\";\nimport { CountdownType, FormulaOneCardConfig } from \"../../src/types/formulaone-card-types\";\nimport { getRenderStringAsync } from \"../utils\";\nimport { Mrdata, Race } from \"../../src/api/f1-models\";\nimport { HTMLTemplateResult } from \"lit\";\nimport { HomeAssistant, NumberFormat, TimeFormat } from \"custom-card-helpers\";\nimport FormulaOneCard from \"../../src\";\nimport * as customCardHelper from \"custom-card-helpers\";\nimport RestCountryClient from \"../../src/api/restcountry-client\";\nimport { Country } from \"../../src/types/rest-country-types\";\nimport ImageClient from \"../../src/api/image-client\";\n\n// Importing test data\nimport * as countries from '../testdata/countries.json'\nimport { MRData as scheduleData } from '../testdata/schedule.json'\n\ndescribe('Testing countdown file', () => {\n        \n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>(),\n    });\n    const hass = createMock<HomeAssistant>();\n    hass.locale = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n    parent._hass = hass;\n    \n    const config = createMock<FormulaOneCardConfig>();\n    const card = new Countdown(parent);\n    const race: Race = {\n        season: '2022',\n        round: '22',\n        url: 'https://en.wikipedia.org/wiki/2022_Formula_One_World_Championship',\n        raceName: 'Season is over. See you next year!',\n        Circuit: {\n            circuitId: 'bahrain',\n            url: 'https://en.wikipedia.org/wiki/Bahrain_International_Circuit',\n            circuitName: 'Bahrain International Circuit',\n            Location: {\n                lat: '26.0325',\n                long: '50.5106',\n                locality: 'Sakhir',\n                country: 'Bahrain'\n            }\n        },\n        date: '2022-12-30',\n        time: '13:00:00Z',\n        FirstPractice: {\n            date: '2022-12-30',\n            time: '10:00:00Z'\n        },\n        SecondPractice: {\n            date: '2022-12-30',\n            time: '14:00:00Z'\n        },\n        ThirdPractice: {\n            date: '2022-12-31',\n            time: '11:00:00Z'\n        },\n        Qualifying:  {\n            date: '2022-12-31',\n            time: '14:00:00Z'                \n        }\n    };\n\n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n        jest.useFakeTimers();\n        \n        jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n        jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });  \n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    }); \n\n    afterEach (() => {        \n        jest.useRealTimers();  \n    });\n\n    test('Calling render with date in future should render countdown', async () => {   \n        // Arrange\n        card.config.countdown_type = CountdownType.Race;\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const { htmlResult, date } = await getHtmlResultAndDate(card);\n        \n        // Assert\n        expect(htmlResult).toMatch('<table @action=_handleAction .actionHandler= class=\"\"> <tr> <td> <h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;&nbsp; 1 : Bahrain Grand Prix</h2> </td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> </td> </tr> </table>');\n        expect(date.value).toMatch('19d 16h 0m 0s');\n    }),\n    test('Calling render with date equal to race start should render we are racing', async () => {   \n        // Arrange\n        jest.setSystemTime(new Date(2022, 2, 20, 16)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const { htmlResult, date } = await getHtmlResultAndDate(card);\n\n        // Assert      \n        expect(htmlResult).toMatch('<table @action=_handleAction .actionHandler= class=\"\"> <tr> <td> <h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;&nbsp; 1 : Bahrain Grand Prix</h2> </td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> </td> </tr> </table>');\n        expect(date.value).toMatch('We are racing!');\n    }),\n    test('Calling render with date an hour past race start render we are racing', async () => {   \n        // Arrange\n        jest.setSystemTime(new Date(2022, 2, 20, 17)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const { htmlResult, date } = await getHtmlResultAndDate(card);\n        \n        // Assert\n        expect(htmlResult).toMatch('<table @action=_handleAction .actionHandler= class=\"\"> <tr> <td> <h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;&nbsp; 1 : Bahrain Grand Prix</h2> </td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> </td> </tr> </table>');\n        expect(date.value).toMatch('We are racing!');\n    }),\n    test('Calling render with date an day past race start render countdown till next race', async () => {   \n        // Arrange\n        card.config.countdown_type = CountdownType.Race;\n        jest.setSystemTime(new Date(2022, 2, 21)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const { htmlResult, date } = await getHtmlResultAndDate(card);\n        \n        // Assert\n        expect(htmlResult).toMatch('<table @action=_handleAction .actionHandler= class=\"\"> <tr> <td> <h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sa.png\">&nbsp;&nbsp; 2 : Saudi Arabian Grand Prix</h2> </td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> </td> </tr> </table>');\n        expect(date.value).toMatch('6d 18h 0m 0s');\n    }),\n    test('Calling render with date end of season', async () => {   \n        // Arrange\n        jest.setSystemTime(new Date(2022, 11, 30)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toMatch('<table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:flag-checkered\"></ha-icon><strong>Season is over. See you next year!</strong><ha-icon icon=\"mdi:flag-checkered\"></ha-icon></td></tr></table><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table>');\n    }),\n    test('Calling render with api not returning data', async () => {   \n        // Arrange\n        jest.setSystemTime(new Date(2022, 11, 30)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockRejectOnce(new Error('API not available'));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toMatch('<table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:alert-circle\"></ha-icon> Error getting next race <ha-icon icon=\"mdi:alert-circle\"></ha-icon></td></tr></table>');\n    }),\n    test('Calling renderheader with date end of season and show_raceinfo = true', async () => {   \n        // Arrange\n        config.show_raceinfo = true;   \n        card.config = config; \n\n        // Act\n        const result = card.renderHeader(race, new Date(2022, 11, 30));\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table><tr><td colspan=\"5\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 22 : Season is over. See you next year!</h2><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /></td></tr> </table>');\n    }),\n    test('Calling renderheader with date end of season and show_raceinfo undefined', async () => {   \n        // Arrange\n        config.show_raceinfo = undefined;  \n        card.config = config;     \n\n        // Act\n        const result = card.renderHeader(race, new Date(2022, 11, 30));\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toBe('');\n    }),\n    test.each`\n    show_raceinfo | expected\n    ${undefined}, ${6}\n    ${true}, ${12}\n    ${false}, ${6}\n    `('Calling getCardSize with type should return card size', ({ show_raceinfo, expected }) => { \n        config.show_raceinfo = show_raceinfo; \n        card.config = config;      \n\n        expect(card.cardSize()).toBe(expected);\n    }),\n    test('Calling render with actions', async () => {   \n        // Arrange\n        const spy = jest.spyOn(customCardHelper, 'handleAction');\n\n        card.config.f1_font = true;\n        card.config.countdown_type = undefined;\n        card.config.actions = {\n            tap_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/0',\n            },\n            hold_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/1',\n            },\n            double_tap_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/2',\n            }\n        }\n\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const { htmlResult, date, handleAction } = await getHtmlResultAndDate(card);\n        \n        // Assert\n        expect(htmlResult).toMatch('<table @action=_handleAction .actionHandler= class=\"clickable\"> <tr> <td> <h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;&nbsp; 1 : Bahrain Grand Prix</h2> </td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"formulaone-font\"></h1> </td> </tr> </table>');\n        expect(date.value).toMatch('We are racing!');\n        \n        // eslint-disable-next-line @typescript-eslint/ban-types\n        handleAction({ detail: { action: 'tap' } });\n        handleAction({ detail: { action: 'double_tap' } });\n        handleAction({ detail: { action: 'hold' } });\n        \n        expect(customCardHelper.handleAction).toBeCalledTimes(3);\n\n        spy.mockClear();\n    }),    \n    test.each`\n    countdown_type | current_date | expected   \n    ${CountdownType.Practice1}, ${new Date(2022, 3, 19)}, ${new Date(\"2022-04-22T11:30:00.000Z\")}\n    ${CountdownType.Practice2}, ${new Date(2022, 3, 19)}, ${new Date(\"2022-04-23T10:30:00.000Z\")}\n    ${CountdownType.Practice3}, ${new Date(2022, 2, 1)}, ${new Date(\"2022-03-19T12:00:00.000Z\")}\n    ${CountdownType.Qualifying}, ${new Date(2022, 3, 19)}, ${new Date(\"2022-04-22T15:00:00.000Z\")}    \n    ${CountdownType.Race}, ${new Date(2022, 3, 19)}, ${new Date(\"2022-04-24T13:00:00.000Z\")}  \n    ${CountdownType.Sprint}, ${new Date(2022, 3, 19, 11, 0)}, ${new Date(\"2022-04-23T14:30:00.000Z\")}\n    `(`Calling render with countdown_type $countdown_type`, async ({ countdown_type, current_date, expected }) => {\n        // Arrange\n        config.countdown_type = countdown_type; \n        card.config = config;             \n        jest.setSystemTime(current_date); // Weird bug in jest setting this to the last of the month\n\n        // Act\n        const result = card.getNextEvent(scheduleData.RaceTable.Races);\n        \n        // Assert       \n        expect(result.raceDateTime).toMatchObject(expected);\n    }), \n    test.each`\n    current_date | expected | hasSprint\n    ${new Date(2022, 3, 22, 13, 0)}, ${new Date(\"2022-04-22T11:30:00.000Z\")}, ${true} // Practice 1\n    ${new Date(2022, 3, 22, 16, 30)}, ${new Date(\"2022-04-22T15:00:00.000Z\")}, ${true} // Qualifying\n    ${new Date(2022, 3, 23, 12, 0)}, ${new Date(\"2022-04-23T10:30:00.000Z\")}, ${true} // Practice 2\n    ${new Date(2022, 3, 23, 14, 20)}, ${new Date(\"2022-04-23T14:30:00.000Z\")}, ${true} // Sprint\n    ${new Date(2022, 3, 24, 10)}, ${new Date(\"2022-04-24T13:00:00.000Z\")}, ${true} // Race\n    ${new Date(2022, 3, 23, 14, 20)}, ${new Date(\"2022-04-24T13:00:00.000Z\")}, ${false} // Race\n    `(`Calling render with race, events in the future $current_date`, async ({ current_date, expected, hasSprint }) => {\n        // Arrange      \n        jest.setSystemTime(current_date); // Weird bug in jest setting this to the last of the month  \n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        config.countdown_type = [ CountdownType.Practice1, CountdownType.Practice2, CountdownType.Practice3, CountdownType.Qualifying, CountdownType.Sprint, CountdownType.Race ];\n        card.config = config;\n\n        const races = [{\n            season: '2022',\n            round: '1',\n            url: 'https://en.wikipedia.org/wiki/2022_Bahrain_Grand_Prix',\n            raceName: 'Bahrain Grand Prix',\n            Circuit: {\n                circuitId: 'bahrain',\n                url: 'http://en.wikipedia.org/wiki/Bahrain_International_Circuit',\n                circuitName: 'Bahrain International Circuit',\n                Location: {\n                    lat: '26.0325',\n                    long: '50.5106',\n                    locality: 'Sakhir',\n                    country: 'Bahrain'\n                }\n            },\n            date: '2022-04-24',\n            time: '13:00:00Z',\n            FirstPractice: { date: '2022-04-22', time: '11:30:00Z' },\n            SecondPractice: { date: '2022-04-23', time: '10:30:00Z' },\n            Qualifying: { date: '2022-04-22', time: '15:00:00Z' },\n            Sprint: hasSprint ? { date: '2022-04-23', time: '14:30:00Z' } : undefined\n        } as Race];\n\n        // Act\n        const result = card.getNextEvent(races);\n\n        // Assert\n        expect(result.raceDateTime).toMatchObject(expected);\n    }),\n    test.each`\n    current_date | expected | withFont\n    ${new Date(2022, 3, 22, 13, 0)}, ${\"0d 0h 30m 0s\"}, ${true} // Practice 1\n    ${new Date(2022, 3, 22, 16, 30)}, ${\"0d 0h 30m 0s\"}, ${true} // Qualifying\n    ${new Date(2022, 3, 23, 12, 0)}, ${\"0d 0h 30m 0s\"}, ${true} // Practice 2\n    ${new Date(2022, 3, 23, 14, 20)}, ${\"0d 2h 10m 0s\"}, ${true} // Sprint\n    ${new Date(2022, 3, 24, 10)}, ${\"0d 5h 0m 0s\"}, ${true} // Race\n    ${new Date(2022, 3, 23, 14, 20)}, ${\"0d 2h 10m 0s\"},${false}// Race\n    `(`Calling render with race, events in the future $current_date`, async ({ current_date, expected, withFont }) => {\n        // Arrange      \n        jest.setSystemTime(current_date); // Weird bug in jest setting this to the last of the month  \n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        config.countdown_type = [ CountdownType.Practice1, CountdownType.Practice2, CountdownType.Practice3, CountdownType.Qualifying, CountdownType.Sprint, CountdownType.Race ];\n        config.f1_font = withFont;\n        card.config = config;\n        \n        // Act\n        const { htmlResult, date } = await getHtmlResultAndDate(card);\n\n        // Assert\n        expect(htmlResult).toMatch(`<table @action=_handleAction .actionHandler= class=\"clickable\"> <tr> <td> <h2 class=\"${withFont ? 'formulaone-font' : ''}\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;&nbsp; 4 : Emilia Romagna Grand Prix</h2> </td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"${withFont ? 'formulaone-font' : ''}\"></h1> </td> </tr> </table>`);\n        expect(date.value).toMatch(expected);\n    }),\n    test('Calling constructor without countdown_type should set countdown_type',  () => {   \n        // Arrange\n        const config = createMock<FormulaOneCardConfig>();\n        config.countdown_type = undefined;\n        const parent = createMock<FormulaOneCard>();\n        parent.config = config;\n\n        // Act\n        const card = new Countdown(parent);\n\n        // Assert\n        expect(card.config.countdown_type).toBe(CountdownType.Race);\n    }),\n    test('Calling constructor with countdown_type should not change countdown_type',  () => {   \n        // Arrange\n        const config = createMock<FormulaOneCardConfig>();\n        config.countdown_type = CountdownType.Practice1;\n        const parent = createMock<FormulaOneCard>();\n        parent.config = config;\n\n        // Act\n        const card = new Countdown(parent);\n\n        // Assert\n        expect(card.config.countdown_type).toBe(CountdownType.Practice1);\n    });\n});\n\nasync function getHtmlResultAndDate(card: Countdown) {\n    const result = card.render();\n\n    const promise = (result.values[0] as HTMLTemplateResult).values[0] as Promise<HTMLTemplateResult>;\n    const promiseResult = await promise;\n\n    const iterator = (promiseResult.values[8] as HTMLTemplateResult).values[0] as AsyncIterableIterator<HTMLTemplateResult>;\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    const handleAction = promiseResult.values[0] as Function;\n\n    const date = await iterator.next();\n    \n    const htmlResult = await getRenderStringAsync(promiseResult);\n    return { htmlResult, date, handleAction };\n}\n"
  },
  {
    "path": "tests/cards/driver-standings.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from '../testdata/localStorageMock';\n\n// Models\nimport DriverStandings from '../../src/cards/driver-standings';\nimport { getRenderString, getRenderStringAsync } from '../utils';\nimport { MRData } from '../testdata/driverStandings.json'\nimport { FormulaOneCardConfig } from '../../src/types/formulaone-card-types';\nimport { Mrdata } from '../../src/api/f1-models';\nimport { getApiErrorMessage } from '../../src/utils';\nimport FormulaOneCard from '../../src';\nimport RestCountryClient from '../../src/api/restcountry-client';\nimport { Country } from '../../src/types/rest-country-types';\n\n// Importing test data\nimport * as countries from '../testdata/countries.json'\nimport ImageClient from \"../../src/api/image-client\";\n\nbeforeEach(() => {    \n    jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n    jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });\n});\n\ndescribe('Testing driver-standings file', () => {\n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>()\n    });\n\n    const card = new DriverStandings(parent);\n\n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    });\n\n    test('Calling render with api returning data', async () => {   \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <thead> <tr> <th class=\"width-50\" colspan=\"2\">&nbsp;</th> <th>Driver</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-40 text-center\">1</td> <td>VER</td> <td>Max Verstappen</td> <td class=\"width-60 text-center\">341</td> <td class=\"text-center\">11</td> </tr> <tr> <td class=\"width-40 text-center\">2</td> <td>LEC</td> <td>Charles Leclerc</td> <td class=\"width-60 text-center\">237</td> <td class=\"text-center\">3</td> </tr> <tr> <td class=\"width-40 text-center\">3</td> <td>PER</td> <td>Sergio Pérez</td> <td class=\"width-60 text-center\">235</td> <td class=\"text-center\">2</td> </tr> <tr> <td class=\"width-40 text-center\">4</td> <td>RUS</td> <td>George Russell</td> <td class=\"width-60 text-center\">203</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">5</td> <td>SAI</td> <td>Carlos Sainz</td> <td class=\"width-60 text-center\">202</td> <td class=\"text-center\">1</td> </tr> <tr> <td class=\"width-40 text-center\">6</td> <td>HAM</td> <td>Lewis Hamilton</td> <td class=\"width-60 text-center\">170</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">7</td> <td>NOR</td> <td>Lando Norris</td> <td class=\"width-60 text-center\">100</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">8</td> <td>OCO</td> <td>Esteban Ocon</td> <td class=\"width-60 text-center\">66</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">9</td> <td>ALO</td> <td>Fernando Alonso</td> <td class=\"width-60 text-center\">59</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">10</td> <td>BOT</td> <td>Valtteri Bottas</td> <td class=\"width-60 text-center\">46</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">11</td> <td>RIC</td> <td>Daniel Ricciardo</td> <td class=\"width-60 text-center\">29</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">12</td> <td>VET</td> <td>Sebastian Vettel</td> <td class=\"width-60 text-center\">24</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">13</td> <td>GAS</td> <td>Pierre Gasly</td> <td class=\"width-60 text-center\">23</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">14</td> <td>MAG</td> <td>Kevin Magnussen</td> <td class=\"width-60 text-center\">22</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">15</td> <td>STR</td> <td>Lance Stroll</td> <td class=\"width-60 text-center\">13</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">16</td> <td>MSC</td> <td>Mick Schumacher</td> <td class=\"width-60 text-center\">12</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">17</td> <td>TSU</td> <td>Yuki Tsunoda</td> <td class=\"width-60 text-center\">11</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">18</td> <td>ZHO</td> <td>Guanyu Zhou</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">19</td> <td>ALB</td> <td>Alexander Albon</td> <td class=\"width-60 text-center\">4</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">20</td> <td>DEV</td> <td>Nyck de Vries</td> <td class=\"width-60 text-center\">2</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">21</td> <td>LAT</td> <td>Nicholas Latifi</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">22</td> <td>HUL</td> <td>Nico Hülkenberg</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api returning data and showing flag and team', async () => {   \n        // Arrange\n        const flagCard = new DriverStandings(parent);\n        flagCard.config.standings = {\n            show_flag: true,\n            show_team: true\n        }\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = flagCard.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <thead> <tr> <th class=\"width-50\" colspan=\"2\">&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-40 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;VER</td> <td>Max Verstappen</td> <td>Red Bull</td> <td class=\"width-60 text-center\">341</td> <td class=\"text-center\">11</td> </tr> <tr> <td class=\"width-40 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;LEC</td> <td>Charles Leclerc</td> <td>Ferrari</td> <td class=\"width-60 text-center\">237</td> <td class=\"text-center\">3</td> </tr> <tr> <td class=\"width-40 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;PER</td> <td>Sergio Pérez</td> <td>Red Bull</td> <td class=\"width-60 text-center\">235</td> <td class=\"text-center\">2</td> </tr> <tr> <td class=\"width-40 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;RUS</td> <td>George Russell</td> <td>Mercedes</td> <td class=\"width-60 text-center\">203</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;SAI</td> <td>Carlos Sainz</td> <td>Ferrari</td> <td class=\"width-60 text-center\">202</td> <td class=\"text-center\">1</td> </tr> <tr> <td class=\"width-40 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;HAM</td> <td>Lewis Hamilton</td> <td>Mercedes</td> <td class=\"width-60 text-center\">170</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;NOR</td> <td>Lando Norris</td> <td>McLaren</td> <td class=\"width-60 text-center\">100</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;OCO</td> <td>Esteban Ocon</td> <td>Alpine F1 Team</td> <td class=\"width-60 text-center\">66</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;ALO</td> <td>Fernando Alonso</td> <td>Alpine F1 Team</td> <td class=\"width-60 text-center\">59</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;BOT</td> <td>Valtteri Bottas</td> <td>Alfa Romeo</td> <td class=\"width-60 text-center\">46</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;RIC</td> <td>Daniel Ricciardo</td> <td>McLaren</td> <td class=\"width-60 text-center\">29</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;VET</td> <td>Sebastian Vettel</td> <td>Aston Martin</td> <td class=\"width-60 text-center\">24</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;GAS</td> <td>Pierre Gasly</td> <td>AlphaTauri</td> <td class=\"width-60 text-center\">23</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;MAG</td> <td>Kevin Magnussen</td> <td>Haas F1 Team</td> <td class=\"width-60 text-center\">22</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;STR</td> <td>Lance Stroll</td> <td>Aston Martin</td> <td class=\"width-60 text-center\">13</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;MSC</td> <td>Mick Schumacher</td> <td>Haas F1 Team</td> <td class=\"width-60 text-center\">12</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;TSU</td> <td>Yuki Tsunoda</td> <td>AlphaTauri</td> <td class=\"width-60 text-center\">11</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;ZHO</td> <td>Guanyu Zhou</td> <td>Alfa Romeo</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;ALB</td> <td>Alexander Albon</td> <td>Williams</td> <td class=\"width-60 text-center\">4</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;DEV</td> <td>Nyck de Vries</td> <td>Williams</td> <td class=\"width-60 text-center\">2</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">21</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;LAT</td> <td>Nicholas Latifi</td> <td>Williams</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">22</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;HUL</td> <td>Nico Hülkenberg</td> <td>Aston Martin</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api returning data and showing flag, team and teamlogo', async () => {   \n        // Arrange\n        const flagCard = new DriverStandings(parent);\n        flagCard.config.standings = {\n            show_flag: true,\n            show_team: true,\n            show_teamlogo: true\n        }\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = flagCard.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <thead> <tr> <th class=\"width-50\" colspan=\"2\">&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-40 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;VER</td> <td>Max Verstappen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td class=\"width-60 text-center\">341</td> <td class=\"text-center\">11</td> </tr> <tr> <td class=\"width-40 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;LEC</td> <td>Charles Leclerc</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td class=\"width-60 text-center\">237</td> <td class=\"text-center\">3</td> </tr> <tr> <td class=\"width-40 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;PER</td> <td>Sergio Pérez</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td class=\"width-60 text-center\">235</td> <td class=\"text-center\">2</td> </tr> <tr> <td class=\"width-40 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;RUS</td> <td>George Russell</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td class=\"width-60 text-center\">203</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;SAI</td> <td>Carlos Sainz</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td class=\"width-60 text-center\">202</td> <td class=\"text-center\">1</td> </tr> <tr> <td class=\"width-40 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;HAM</td> <td>Lewis Hamilton</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td class=\"width-60 text-center\">170</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;NOR</td> <td>Lando Norris</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td class=\"width-60 text-center\">100</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;OCO</td> <td>Esteban Ocon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td class=\"width-60 text-center\">66</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;ALO</td> <td>Fernando Alonso</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td class=\"width-60 text-center\">59</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;BOT</td> <td>Valtteri Bottas</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td class=\"width-60 text-center\">46</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;RIC</td> <td>Daniel Ricciardo</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td class=\"width-60 text-center\">29</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;VET</td> <td>Sebastian Vettel</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td class=\"width-60 text-center\">24</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;GAS</td> <td>Pierre Gasly</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td class=\"width-60 text-center\">23</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;MAG</td> <td>Kevin Magnussen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td class=\"width-60 text-center\">22</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;STR</td> <td>Lance Stroll</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td class=\"width-60 text-center\">13</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;MSC</td> <td>Mick Schumacher</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td class=\"width-60 text-center\">12</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;TSU</td> <td>Yuki Tsunoda</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td class=\"width-60 text-center\">11</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;ZHO</td> <td>Guanyu Zhou</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;ALB</td> <td>Alexander Albon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td class=\"width-60 text-center\">4</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;DEV</td> <td>Nyck de Vries</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td class=\"width-60 text-center\">2</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">21</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;LAT</td> <td>Nicholas Latifi</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">22</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;HUL</td> <td>Nico Hülkenberg</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api not returning data', async () => {   \n        // Arrange\n        fetchMock.mockRejectOnce(new Error('API is down'));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getApiErrorMessage('standings'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling cardSize with hass and sensor', () => { \n        expect(card.cardSize()).toBe(12);\n    })\n});"
  },
  {
    "path": "tests/cards/last-result.test.ts",
    "content": "// Mocks\nimport { createMock } from 'ts-auto-mock';\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from '../testdata/localStorageMock';\n\n// Models\nimport LastResult from '../../src/cards/last-result';\nimport { getRenderString, getRenderStringAsync } from '../utils';\nimport { MRData } from '../testdata/results.json'\nimport { FormulaOneCardConfig } from '../../src/types/formulaone-card-types';\nimport { Mrdata } from '../../src/api/f1-models';\nimport { getApiErrorMessage } from '../../src/utils';\nimport FormulaOneCard from '../../src';\nimport RestCountryClient from '../../src/api/restcountry-client';\nimport { Country } from '../../src/types/rest-country-types';\nimport ImageClient from '../../src/api/image-client';\n\n// Importing test data\nimport * as countries from '../testdata/countries.json'\n\nbeforeEach(() => {    \n    jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n    jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });\n});\n\ndescribe('Testing last-result file', () => {\n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>(),\n    });\n    \n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    });\n\n    test('Calling render with api returning data', async () => {   \n        // Arrange\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        const card = new LastResult(parent);\n\n        // Act        \n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td> </tr> </table> <table> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td>Sergio Pérez</td> <td>2</td> <td class=\"width-60 text-center\">25</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td>Charles Leclerc</td> <td>1</td> <td class=\"width-60 text-center\">18</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td>Carlos Sainz</td> <td>4</td> <td class=\"width-60 text-center\">15</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td>Lando Norris</td> <td>6</td> <td class=\"width-60 text-center\">12</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td>Daniel Ricciardo</td> <td>16</td> <td class=\"width-60 text-center\">10</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td>Lance Stroll</td> <td>11</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td>Max Verstappen</td> <td>8</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td>Sebastian Vettel</td> <td>13</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td>Lewis Hamilton</td> <td>3</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td>Pierre Gasly</td> <td>7</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td>Valtteri Bottas</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td>Kevin Magnussen</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td>Mick Schumacher</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+1 Lap</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td>George Russell</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+2 Laps</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td>Yuki Tsunoda</td> <td>10</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Accident</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td>Esteban Ocon</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td>Alexander Albon</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td>Fernando Alonso</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td>Nicholas Latifi</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td>Guanyu Zhou</td> <td>14</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api not returning data', async () => {   \n        // Arrange\n        fetchMock.mockRejectOnce(new Error('API is down'));\n        const card = new LastResult(parent);\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getApiErrorMessage('last result'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling cardSize with hass and sensor', () => { \n        const card = new LastResult(parent);\n        expect(card.cardSize()).toBe(11);\n    })\n});"
  },
  {
    "path": "tests/cards/next-race.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from '../testdata/localStorageMock';\n\n// Models\nimport NextRace from '../../src/cards/next-race';\nimport { HomeAssistant, NumberFormat, TimeFormat } from 'custom-card-helpers';\nimport { getRenderString, getRenderStringAsync, getRenderStringAsyncIndex } from '../utils';\nimport { FormulaOneCardConfig, NextRaceDisplay } from '../../src/types/formulaone-card-types';\nimport { Mrdata } from '../../src/api/f1-models';\nimport { getApiErrorMessage, getEndOfSeasonMessage } from '../../src/utils';\nimport FormulaOneCard from '../../src';\nimport RestCountryClient from '../../src/api/restcountry-client';\nimport { Country } from '../../src/types/rest-country-types';\nimport ImageClient from \"../../src/api/image-client\";\n\n// Importing test data\nimport * as countries from '../testdata/countries.json'\nimport { MRData } from '../testdata/schedule.json'\n\ndescribe('Testing next-race file', () => {\n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>(),\n    });\n\n    const hass = createMock<HomeAssistant>();\n    hass.locale = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n\n    parent._hass = hass;    \n    \n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n        jest.useFakeTimers();\n        \n        jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n        jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });  \n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    }); \n\n    afterEach(() => {\n        jest.useRealTimers();\n    });\n\n    test('Calling render with api returning data', async () => {  \n        // Arrange \n        const card = new NextRace(parent);\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp; 1 : Bahrain Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Bahrain_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api not returning data', async () => {   \n        // Arrange\n        const card = new NextRace(parent);\n        fetchMock.mockResponseOnce('{}', { status: 500 });\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getApiErrorMessage('next race'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling render with api returning data', async () => {   \n        // Arrange\n        const card = new NextRace(parent);\n        jest.setSystemTime(new Date(2022, 11, 30)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getEndOfSeasonMessage('Season is over. See you next year!'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling render with api returning data sprint race', async () => {  \n        // Arrange \n        const card = new NextRace(parent);\n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with only_show_date true and api returning data sprint race', async () => {  \n        // Arrange \n        const card = new NextRace(parent);\n        card.config.only_show_date = true;\n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"\">24-04-22</h1> </td> </tr><tr> <td class=\"text-center\"> <h1 class=\"\">24-04-22</h1> </td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with only_show_date true and f1 font and api returning data sprint race', async () => {  \n        // Arrange \n        const card = new NextRace(parent);\n        card.config.only_show_date = true;\n        card.config.f1_font = true;\n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr> <td class=\"text-center\"> <h1 class=\"formulaone-font\">24-04-22</h1> </td> </tr><tr> <td class=\"text-center\"> <h1 class=\"formulaone-font\">24-04-22</h1> </td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with show_raceinfo true and f1 font and api returning data sprint race', async () => {  \n        // Arrange \n        const card = new NextRace(parent);\n        card.config.show_raceinfo = true;\n        card.config.f1_font = true;\n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr><td>Date</td><td>24-04-22</td><td>&nbsp;</td><td>Practice 1</td><td align=\"right\">vr 13:30</td></tr> <tr><td>Race</td><td>4</td><td>&nbsp;</td><td>Practice 2</td><td align=\"right\">za 12:30</td></tr> <tr><td>Race name</td><td>Emilia Romagna Grand Prix</td><td>&nbsp;</td><td>Practice 3</td><td align=\"right\">-</td></tr> <tr><td>Circuit name</td><td>Autodromo Enzo e Dino Ferrari</td><td>&nbsp;</td><td>Qualifying</td><td align=\"right\">vr 17:00</td></tr> <tr><td>Location</td><td>Italy</td><td>&nbsp;</td><td>Sprint</td><td align=\"right\">za 16:30</td></tr> <tr><td>City</td><td>Imola</td><td>&nbsp;</td><td>Race</td><td align=\"right\">zo 15:00</td></tr> </tbody> </table>');\n    }),\n    test('Calling cardSize with hass and sensor without data', () => { \n        const card = new NextRace(parent);\n        expect(card.cardSize()).toBe(8);\n    }),\n    test('Calling render with next_race_display DateAndTime', async () => {\n         // Arrange \n         const card = new NextRace(parent);\n         card.config.next_race_display = NextRaceDisplay.DateAndTime;\n         card.config.show_raceinfo = true;\n         card.config.f1_font = true;\n         jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n         fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n         \n         // Act\n         const result = card.render();\n \n         // Assert\n         const htmlResult = await getRenderStringAsyncIndex(result);\n\n         console.log(htmlResult);\n         expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr><td>Date</td><td>24-04-22</td><td>&nbsp;</td><td>Practice 1</td><td align=\"right\">vr 13:30</td></tr> <tr><td>Race</td><td>4</td><td>&nbsp;</td><td>Practice 2</td><td align=\"right\">za 12:30</td></tr> <tr><td>Race name</td><td>Emilia Romagna Grand Prix</td><td>&nbsp;</td><td>Practice 3</td><td align=\"right\">-</td></tr> <tr><td>Circuit name</td><td>Autodromo Enzo e Dino Ferrari</td><td>&nbsp;</td><td>Qualifying</td><td align=\"right\">vr 17:00</td></tr> <tr><td>Location</td><td>Italy</td><td>&nbsp;</td><td>Sprint</td><td align=\"right\">za 16:30</td></tr> <tr><td>City</td><td>Imola</td><td>&nbsp;</td><td>Race</td><td align=\"right\">zo 15:00</td></tr> </tbody> </table>');\n    }),\n    test('Calling render with next_race_display DateOnly', async () => {\n        // Arrange \n        const card = new NextRace(parent);\n        card.config.next_race_display = NextRaceDisplay.DateOnly;\n        card.config.show_raceinfo = true;\n        card.config.f1_font = true;\n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        console.log(htmlResult);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr><td>Date</td><td>24-04-22</td><td>&nbsp;</td><td>Practice 1</td><td align=\"right\">vr 13:30</td></tr> <tr><td>Race</td><td>4</td><td>&nbsp;</td><td>Practice 2</td><td align=\"right\">za 12:30</td></tr> <tr><td>Race name</td><td>Emilia Romagna Grand Prix</td><td>&nbsp;</td><td>Practice 3</td><td align=\"right\">-</td></tr> <tr><td>Circuit name</td><td>Autodromo Enzo e Dino Ferrari</td><td>&nbsp;</td><td>Qualifying</td><td align=\"right\">vr 17:00</td></tr> <tr><td>Location</td><td>Italy</td><td>&nbsp;</td><td>Sprint</td><td align=\"right\">za 16:30</td></tr> <tr><td>City</td><td>Imola</td><td>&nbsp;</td><td>Race</td><td align=\"right\">zo 15:00</td></tr> </tbody> </table>');\n   }),\n   test('Calling render with next_race_display TimeOnly', async () => {\n        // Arrange \n        const card = new NextRace(parent);\n        card.config.next_race_display = NextRaceDisplay.TimeOnly;\n        card.config.show_raceinfo = true;\n        card.config.f1_font = true;\n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        console.log(htmlResult);\n        expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr><td>Date</td><td>24-04-22</td><td>&nbsp;</td><td>Practice 1</td><td align=\"right\">vr 13:30</td></tr> <tr><td>Race</td><td>4</td><td>&nbsp;</td><td>Practice 2</td><td align=\"right\">za 12:30</td></tr> <tr><td>Race name</td><td>Emilia Romagna Grand Prix</td><td>&nbsp;</td><td>Practice 3</td><td align=\"right\">-</td></tr> <tr><td>Circuit name</td><td>Autodromo Enzo e Dino Ferrari</td><td>&nbsp;</td><td>Qualifying</td><td align=\"right\">vr 17:00</td></tr> <tr><td>Location</td><td>Italy</td><td>&nbsp;</td><td>Sprint</td><td align=\"right\">za 16:30</td></tr> <tr><td>City</td><td>Imola</td><td>&nbsp;</td><td>Race</td><td align=\"right\">zo 15:00</td></tr> </tbody> </table>');\n    }),\n    test('Calling render with next_race_display null', async () => {\n         // Arrange \n         const card = new NextRace(parent);\n         card.config.next_race_display = undefined;\n         card.config.show_raceinfo = true;\n         card.config.f1_font = true;\n         jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n         fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n         \n         // Act\n         const result = card.render();\n \n         // Assert\n         const htmlResult = await getRenderStringAsyncIndex(result);\n \n         console.log(htmlResult);\n         expect(htmlResult).toMatch('<table> <tbody> <tr> <td colspan=\"5\"><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2><h2 class=\"formulaone-font\"><img height=\"25\" src=\"https://flagcdn.com/w320/it.png\">&nbsp; 4 : Emilia Romagna Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Emilia_Romagna_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> <tr><td>Date</td><td>24-04-22</td><td>&nbsp;</td><td>Practice 1</td><td align=\"right\">vr 13:30</td></tr> <tr><td>Race</td><td>4</td><td>&nbsp;</td><td>Practice 2</td><td align=\"right\">za 12:30</td></tr> <tr><td>Race name</td><td>Emilia Romagna Grand Prix</td><td>&nbsp;</td><td>Practice 3</td><td align=\"right\">-</td></tr> <tr><td>Circuit name</td><td>Autodromo Enzo e Dino Ferrari</td><td>&nbsp;</td><td>Qualifying</td><td align=\"right\">vr 17:00</td></tr> <tr><td>Location</td><td>Italy</td><td>&nbsp;</td><td>Sprint</td><td align=\"right\">za 16:30</td></tr> <tr><td>City</td><td>Imola</td><td>&nbsp;</td><td>Race</td><td align=\"right\">zo 15:00</td></tr> </tbody> </table>');\n     });\n});"
  },
  {
    "path": "tests/cards/results.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\n\n// Models\nimport FormulaOneCard from \"../../src\";\nimport { FastestLap, Mrdata, QualifyingResult, Race, Result } from \"../../src/api/f1-models\";\nimport Results from \"../../src/cards/results\";\nimport { CardProperties, FormulaOneCardConfig, FormulaOneCardTab, mwcTabBarEvent } from \"../../src/types/formulaone-card-types\";\nimport { getRenderString, getRenderStringAsync, getRenderStringAsyncIndex } from \"../utils\";\nimport { HTMLTemplateResult, html } from \"lit\";\nimport RestCountryClient from \"../../src/api/restcountry-client\";\nimport { Country } from \"../../src/types/rest-country-types\";\nimport ImageClient from \"../../src/api/image-client\";\nimport LocalStorageMock from \"../testdata/localStorageMock\";\n\n// Importing test data\nimport { MRData as resultData } from '../testdata/results.json'\nimport { MRData as seasonData } from '../testdata/seasons.json'\nimport { MRData as scheduleData } from '../testdata/schedule.json'\nimport { MRData as qualifyingData } from '../testdata/qualifying.json'\nimport { MRData as sprintData } from '../testdata/sprint.json'\nimport * as countries from '../testdata/countries.json'\n\ndescribe('Testing results file', () => {\n    const parent = createMock<FormulaOneCard>({\n        config: createMock<FormulaOneCardConfig>(),\n    });\n    const lastRace = <Race>resultData.RaceTable.Races[0];\n    \n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n        jest.useFakeTimers();\n        \n        jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n        jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });  \n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });   \n    });\n\n    parent.properties = new Map<string, unknown>();\n\n    test('Calling render without selecting season', async () => {\n        // Arrange\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"selectedSeasonChanged\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season', async () => {\n        // Arrange\n        parent.properties.set('cardValues', { selectedSeason: '1979', races: scheduleData.RaceTable.Races, selectedRace: undefined });\n        const card = new Results(parent);\n        \n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season and selected race', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0];\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, selectedTabIndex: 0 });\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td>Sergio Pérez</td> <td>2</td> <td class=\"width-60 text-center\">25</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td>Charles Leclerc</td> <td>1</td> <td class=\"width-60 text-center\">18</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td>Carlos Sainz</td> <td>4</td> <td class=\"width-60 text-center\">15</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td>Lando Norris</td> <td>6</td> <td class=\"width-60 text-center\">12</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td>Daniel Ricciardo</td> <td>16</td> <td class=\"width-60 text-center\">10</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td>Lance Stroll</td> <td>11</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td>Max Verstappen</td> <td>8</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td>Sebastian Vettel</td> <td>13</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td>Lewis Hamilton</td> <td>3</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td>Pierre Gasly</td> <td>7</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td>Valtteri Bottas</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td>Kevin Magnussen</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td>Mick Schumacher</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+1 Lap</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td>George Russell *</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+2 Laps</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td>Yuki Tsunoda</td> <td>10</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Accident</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td>Esteban Ocon</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td>Alexander Albon</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td>Fernando Alonso</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td>Nicholas Latifi</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td>Guanyu Zhou</td> <td>14</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision</td> </tr> </tbody> <tfoot> <tr> <td colspan=\"6\" class=\"text-right\"><small>* Fastest lap: 1:46.458</small></td> </tr> </tfoot> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season and selected race', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0];\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, results: race.Results, selectedTabIndex: 0 });\n        const card = new Results(parent);\n        // Act\n        const result = card.render();\n\n        // Assert\n        // eslint-disable-next-line @typescript-eslint/ban-types\n        const func = ((result.values[7] as HTMLTemplateResult).values[1] as HTMLTemplateResult).values[0] as Function;\n        func({ detail: { index: 23 }  } as mwcTabBarEvent);\n\n        const cardValues = card.parent.properties.get('cardValues') as CardProperties;\n\n        expect(cardValues.selectedTabIndex).toBe(23);\n    }),\n    test('Calling render with selected season and selected race with standings', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, results: race.Results, selectedTabIndex: 0 });\n\n        if(parent?.config)\n            parent.config.standings = { show_flag: true, show_team: true, show_teamlogo: true };\n\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Sergio Pérez</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>2</td> <td class=\"width-60 text-center\">25</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Charles Leclerc</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>1</td> <td class=\"width-60 text-center\">18</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Carlos Sainz</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>4</td> <td class=\"width-60 text-center\">15</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lando Norris</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>6</td> <td class=\"width-60 text-center\">12</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Daniel Ricciardo</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>16</td> <td class=\"width-60 text-center\">10</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Lance Stroll</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>11</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Max Verstappen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>8</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Sebastian Vettel</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>13</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lewis Hamilton</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>3</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Pierre Gasly</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>7</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;Valtteri Bottas</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;Kevin Magnussen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Mick Schumacher</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+1 Lap</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;George Russell *</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+2 Laps</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Yuki Tsunoda</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>10</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Accident</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Esteban Ocon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;Alexander Albon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Fernando Alonso</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Nicholas Latifi</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;Guanyu Zhou</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>14</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision</td> </tr> </tbody> <tfoot> <tr> <td colspan=\"6\" class=\"text-right\"><small>* Fastest lap: 1:46.458</small></td> </tr> </tfoot> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season and selected race with standings', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        race.QualifyingResults = qualifyingData.RaceTable.Races[0].QualifyingResults as QualifyingResult[];\n        race.SprintResults = sprintData.RaceTable.Races[0].SprintResults as Result[];\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, selectedTabIndex: 1 });\n\n        if(parent?.config)\n            parent.config.standings = undefined\n\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:flag-checkered ><ha-icon slot=\"icon\" icon=\"mdi:flag-checkered\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th class=\"text-center\">Q1</th> <th class=\"text-center\">Q2</th> <th class=\"text-center\">Q3</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td>Max Verstappen</td> <td>1:19.222</td> <td>1:18.566</td> <td>1:17.775</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td>George Russell</td> <td>1:19.583</td> <td>1:18.565</td> <td>1:18.079</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td>Lewis Hamilton</td> <td>1:19.169</td> <td>1:18.552</td> <td>1:18.084</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td>Sergio Pérez</td> <td>1:19.706</td> <td>1:18.615</td> <td>1:18.128</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td>Carlos Sainz</td> <td>1:19.566</td> <td>1:18.560</td> <td>1:18.351</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td>Valtteri Bottas</td> <td>1:19.523</td> <td>1:18.762</td> <td>1:18.401</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td>Charles Leclerc</td> <td>1:19.505</td> <td>1:19.109</td> <td>1:18.555</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td>Lando Norris</td> <td>1:19.857</td> <td>1:19.119</td> <td>1:18.721</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td>Fernando Alonso</td> <td>1:20.006</td> <td>1:19.272</td> <td>1:18.939</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td>Esteban Ocon</td> <td>1:19.945</td> <td>1:19.081</td> <td>1:19.010</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td>Daniel Ricciardo</td> <td>1:20.279</td> <td>1:19.325</td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td>Guanyu Zhou</td> <td>1:20.283</td> <td>1:19.476</td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td>Yuki Tsunoda</td> <td>1:19.907</td> <td>1:19.589</td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td>Pierre Gasly</td> <td>1:20.256</td> <td>1:19.672</td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td>Kevin Magnussen</td> <td>1:20.293</td> <td>1:19.833</td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td>Mick Schumacher</td> <td>1:20.419</td> <td></td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td>Sebastian Vettel</td> <td>1:20.419</td> <td></td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td>Lance Stroll</td> <td>1:20.520</td> <td></td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td>Alexander Albon</td> <td>1:20.859</td> <td></td> <td></td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td>Nicholas Latifi</td> <td>1:21.167</td> <td></td> <td></td> </tr> </tbody> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season and selected race with standings and qualifying results with sprint', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        race.QualifyingResults = qualifyingData.RaceTable.Races[0].QualifyingResults as QualifyingResult[];\n        race.SprintResults = sprintData.RaceTable.Races[0].SprintResults as Result[];\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, selectedTabIndex: 0 });\n\n        if(parent?.config)\n            parent.config.standings = { show_flag: true, show_team: true, show_teamlogo: true };\n\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:flag-checkered ><ha-icon slot=\"icon\" icon=\"mdi:flag-checkered\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Sergio Pérez</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>2</td> <td class=\"width-60 text-center\">25</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Charles Leclerc</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>1</td> <td class=\"width-60 text-center\">18</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Carlos Sainz</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>4</td> <td class=\"width-60 text-center\">15</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lando Norris</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>6</td> <td class=\"width-60 text-center\">12</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Daniel Ricciardo</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>16</td> <td class=\"width-60 text-center\">10</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Lance Stroll</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>11</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Max Verstappen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>8</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Sebastian Vettel</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>13</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lewis Hamilton</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>3</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Pierre Gasly</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>7</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;Valtteri Bottas</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;Kevin Magnussen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Mick Schumacher</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+1 Lap</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;George Russell *</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+2 Laps</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Yuki Tsunoda</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>10</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Accident</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Esteban Ocon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;Alexander Albon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Fernando Alonso</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Nicholas Latifi</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;Guanyu Zhou</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>14</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision</td> </tr> </tbody> <tfoot> <tr> <td colspan=\"6\" class=\"text-right\"><small>* Fastest lap: 1:46.458</small></td> </tr> </tfoot> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season and selected race with standings and qualifying results with sprint', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        race.QualifyingResults = qualifyingData.RaceTable.Races[0].QualifyingResults as QualifyingResult[];\n        race.SprintResults = sprintData.RaceTable.Races[0].SprintResults as Result[];\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, selectedTabIndex: 2 });\n\n        if(parent?.config)\n            parent.config.standings = { show_flag: true, show_team: true, show_teamlogo: true };\n\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:flag-checkered ><ha-icon slot=\"icon\" icon=\"mdi:flag-checkered\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th class=\"text-center\">Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Max Verstappen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>1</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Charles Leclerc</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>2</td> <td class=\"width-60 text-center\">7</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Sergio Pérez</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>7</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Carlos Sainz</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>10</td> <td class=\"width-60 text-center\">5</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lando Norris</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>3</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Daniel Ricciardo</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>6</td> <td class=\"width-60 text-center\">3</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;Valtteri Bottas</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>8</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;Kevin Magnussen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>4</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Fernando Alonso</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Mick Schumacher</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;George Russell</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>11</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Yuki Tsunoda</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>16</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Sebastian Vettel</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lewis Hamilton</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>13</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Lance Stroll</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Esteban Ocon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Pierre Gasly</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;Alexander Albon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>20</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Nicholas Latifi</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;Guanyu Zhou</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Retired</td> </tr> </tbody> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling render with selected season and selected race with standings and qualifying results with sprint failing service', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        race.QualifyingResults = qualifyingData.RaceTable.Races[0].QualifyingResults as QualifyingResult[];\n        race.SprintResults = sprintData.RaceTable.Races[0].SprintResults as Result[];\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, selectedTabIndex: 2 });\n\n        if(parent?.config)\n            parent.config.standings = { show_flag: true, show_team: true, show_teamlogo: true };\n\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:flag-checkered ><ha-icon slot=\"icon\" icon=\"mdi:flag-checkered\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th class=\"text-center\">Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Max Verstappen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>1</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Charles Leclerc</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>2</td> <td class=\"width-60 text-center\">7</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Sergio Pérez</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>7</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Carlos Sainz</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>10</td> <td class=\"width-60 text-center\">5</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lando Norris</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>3</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Daniel Ricciardo</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>6</td> <td class=\"width-60 text-center\">3</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;Valtteri Bottas</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>8</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;Kevin Magnussen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>4</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Fernando Alonso</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Mick Schumacher</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;George Russell</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>11</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Yuki Tsunoda</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>16</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Sebastian Vettel</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lewis Hamilton</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>13</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Lance Stroll</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Esteban Ocon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Pierre Gasly</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;Alexander Albon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>20</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Nicholas Latifi</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;Guanyu Zhou</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Retired</td> </tr> </tbody> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling selectedSeasonChanged should change parent properties', async () => {\n        // Arrange\n        parent.properties.set('cardValues', { selectedSeason: '1979' });\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const directive = result.values[1] as HTMLTemplateResult;\n\n        const promise = directive.values[0] as Promise<unknown>;\n        const promiseResult = await promise;\n\n        // eslint-disable-next-line @typescript-eslint/ban-types\n        const selectedSeasonChangedFn = (promiseResult as HTMLTemplateResult).values[0] as Function;\n        selectedSeasonChangedFn({ target: { value: '2022' } });\n\n        const properties = card.parent.properties.get('cardValues') as CardProperties;\n        expect(properties).toMatchObject({ selectedSeason: '1979' } as CardProperties);\n    }),\n    test('Calling selectedRaceChanged should set parent properties', async () => {\n        // Arrange\n        const parentNew = createMock<FormulaOneCard>({\n            config: createMock<FormulaOneCardConfig>(),\n        });\n        const card = new Results(parentNew);\n        \n        setFetchMock();\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        // eslint-disable-next-line @typescript-eslint/ban-types\n        const selectedRaceChangedFn = result.values[3] as Function;\n        selectedRaceChangedFn({ target: { value: '17' } });\n    }),\n    test('Calling renderHeader with image not clickable', async () => {\n        // Arrange\n        const card = new Results(parent);\n        card.config.image_clickable = undefined;\n\n        // Act\n        const result = card.renderHeader(lastRace);\n\n        // Assert\n        const htmlResult = getRenderString(result);\n        expect(htmlResult).toMatch('<h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\"\" /><br>');\n    }),\n    test('Calling renderHeader with clickable image ', () => {\n        // Arrange\n        const card = new Results(parent);\n        card.config.image_clickable = true;\n\n        // Act\n        const result = card.renderHeader(lastRace);\n\n        // Assert\n        const htmlResult = getRenderString(result);\n        expect(htmlResult).toMatch('<h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\" clickable\" /><br>');\n    }),\n    test('Calling renderHeader with undefined race', async () => {\n        // Arrange\n        const card = new Results(parent);\n        card.config.image_clickable = undefined;\n\n        // Act\n        const result = card.renderHeader(undefined);\n        \n        // Assert\n        const htmlResult = getRenderString(result);\n        expect(htmlResult).toBe('');\n    }),\n    test('Calling cardSize with hass and sensor', () => {\n        const card = new Results(parent);\n        expect(card.cardSize()).toBe(12);\n    }),\n    test('Calling icon', () => {        \n        const card = new Results(parent);\n        card.config.icons = {\n            'sprint': 'mdi:car-sports',\n        }\n\n        expect(card.icon('sprint')).toBe('mdi:car-sports');\n        expect(card.icon('qualifying')).toBe('mdi:timer-outline');\n    }),\n    test('Calling render with api not returning data', async () => {\n        // Arrange\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: undefined });\n        const card = new Results(parent);\n\n        fetchMock.mockRejectOnce(new Error('Error getting data'));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:alert-circle\"></ha-icon> Error getting seasons <ha-icon icon=\"mdi:alert-circle\"></ha-icon></td></tr></table><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table>');\n    }),    \n    test('Calling render with selectedSeason undefined', async () => {\n        // Arrange\n        jest.useFakeTimers();\n        jest.setSystemTime(new Date(2022, 2, 27, 15, 10, 0)); // Weird bug in jest setting this to the last of the month\n\n        parent.properties.set('cardValues', { selectedSeason: undefined, selectedRace: undefined });\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"selectedSeasonChanged\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table>');\n    }),\n    test('Calling render with selectedSeason undefined and sprint in past', async () => {\n        // Arrange\n        jest.useFakeTimers();\n        jest.setSystemTime(new Date(2022, 3, 24, 10)); // Weird bug in jest setting this to the last of the month\n\n        parent.properties.set('cardValues', { selectedSeason: undefined, selectedRace: undefined });\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"selectedSeasonChanged\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table>');\n    }),\n    test('Calling render with selectedSeason undefined and no sprintdata', async () => {\n        // Arrange\n        jest.useFakeTimers();\n        jest.setSystemTime(new Date(2022, 2, 27, 15, 10, 0)); // Weird bug in jest setting this to the last of the month\n\n        parent.properties.set('cardValues', { selectedSeason: undefined, selectedRace: undefined });\n        const card = new Results(parent);\n\n        const sprintDataCopy = sprintData;\n        sprintDataCopy.RaceTable.Races = [];\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>qualifyingData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>sprintDataCopy }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"selectedSeasonChanged\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table>');\n    }),\n    test('Calling render with selectedSeason undefined no results', async () => {\n        // Arrange\n        jest.setSystemTime(new Date(2022, 2, 27, 15, 10, 0)); // Weird bug in jest setting this to the last of the month\n\n        parent.properties.set('cardValues', { selectedSeason: undefined, selectedRace: undefined });\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"selectedSeasonChanged\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table>');\n    }),\n    test('Calling setSelectedRace with selectedSeason undefined no results', async () => {\n        // Arrange\n        parent.properties.set('cardValues', { selectedSeason: '2022', selectedRace: undefined });\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        card.setSelectedRace({ target: { value: '6' } });\n\n        // Assert\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/6/results.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/6/qualifying.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/6/sprint.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n    }),   \n    test('Calling setSelectedRace with selectedSeason undefined no results', async () => {\n        // Arrange\n        parent.properties.set('cardValues', { selectedSeason: '2022', selectedRace: undefined });\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        card.setSelectedRace({ target: { value: '5' } });\n\n        // Assert\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/5/results.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/5/qualifying.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/5/sprint.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n    }),    \n    test('Calling setSelectedRace with selectedSeason undefined no results', async () => {\n        // Arrange\n        parent.properties.set('cardValues', { selectedSeason: '2022', selectedRace: undefined });\n        const card = new Results(parent);\n\n        setFetchMock();\n\n        // Act\n        card.setSelectedRace({ target: { value: '5' } });\n\n        // Assert\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/5/results.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/5/qualifying.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n        expect(fetchMock).toHaveBeenCalledWith(\"https://api.jolpi.ca/ergast/f1/2022/5/sprint.json\", {\"headers\": {\"Accept\": \"application/json\"}});\n    }),\n    test('Calling render without tab_order should arrange tabs in default order', async () => {\n        // Arrange\n        const card = new Results(parent);\n\n        // Act\n        const tabs = card.renderTabs(lastRace);\n\n        // Assert\n        expect(tabs[0].title).toBe('Results');\n        expect(tabs[1].title).toBe('Qualifying');\n        expect(tabs[2].title).toBe('Sprint');\n    }),\n    test('Calling render with selected season and selected race without fastest lap', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0];\n        race.Results.forEach(result => {\n            result.FastestLap = undefined as unknown as FastestLap;\n        });\n        race.round = \"1\";\n        parent.properties.set('cardValues', { selectedSeason: '1979', selectedRace: race, races: scheduleData.RaceTable.Races, selectedTabIndex: 0 });\n        const card = new Results(parent);\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n        expect(htmlResult).toMatch('<table> <tr> <td> Season<br /> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"selectedRaceChanged\"> <option value=\"0\" ?selected=>Select race</option> <option value=\"1\" ?selected=>Bahrain Grand Prix</option><option value=\"2\" ?selected=>Saudi Arabian Grand Prix</option><option value=\"3\" ?selected=>Australian Grand Prix</option><option value=\"4\" ?selected=>Emilia Romagna Grand Prix</option><option value=\"5\" ?selected=>Miami Grand Prix</option><option value=\"6\" ?selected=>Spanish Grand Prix</option><option value=\"7\" ?selected=>Monaco Grand Prix</option><option value=\"8\" ?selected=>Azerbaijan Grand Prix</option><option value=\"9\" ?selected=>Canadian Grand Prix</option><option value=\"10\" ?selected=>British Grand Prix</option><option value=\"11\" ?selected=>Austrian Grand Prix</option><option value=\"12\" ?selected=>French Grand Prix</option><option value=\"13\" ?selected=>Hungarian Grand Prix</option><option value=\"14\" ?selected=>Belgian Grand Prix</option><option value=\"15\" ?selected=>Dutch Grand Prix</option><option value=\"16\" ?selected=>Italian Grand Prix</option><option value=\"17\" ?selected=>Singapore Grand Prix</option><option value=\"18\" ?selected=>Japanese Grand Prix</option><option value=\"19\" ?selected=>United States Grand Prix</option><option value=\"20\" ?selected=>Mexico City Grand Prix</option><option value=\"21\" ?selected=>Brazilian Grand Prix</option><option value=\"22\" ?selected=>Abu Dhabi Grand Prix</option> </select> </td> </tr> </table> <table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\" clickable\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=mdi:trophy ><ha-icon slot=\"icon\" icon=\"mdi:trophy\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:timer-outline ><ha-icon slot=\"icon\" icon=\"mdi:timer-outline\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=mdi:car-sports ><ha-icon slot=\"icon\" icon=\"mdi:car-sports\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> <table class=\"nopadding\"> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th>Team</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Sergio Pérez</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>2</td> <td class=\"width-60 text-center\">25</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Charles Leclerc</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>1</td> <td class=\"width-60 text-center\">18</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Carlos Sainz</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/ferrari-logo.png.transform/2col-retina/image.png\">&nbsp;Ferrari</td> <td>4</td> <td class=\"width-60 text-center\">15</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lando Norris</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>6</td> <td class=\"width-60 text-center\">12</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Daniel Ricciardo</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mclaren-logo.png.transform/2col-retina/image.png\">&nbsp;McLaren</td> <td>16</td> <td class=\"width-60 text-center\">10</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Lance Stroll</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>11</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Max Verstappen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/red-bull-racing-logo.png.transform/2col-retina/image.png\">&nbsp;Red Bull</td> <td>8</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Sebastian Vettel</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/aston-martin-logo.png.transform/2col-retina/image.png\">&nbsp;Aston Martin</td> <td>13</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Lewis Hamilton</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>3</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Pierre Gasly</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>7</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fi.png\">&nbsp;Valtteri Bottas</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/dk.png\">&nbsp;Kevin Magnussen</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/de.png\">&nbsp;Mick Schumacher</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/haas-f1-team-logo.png.transform/2col-retina/image.png\">&nbsp;Haas F1 Team</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+1 Lap</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;George Russell</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/mercedes-logo.png.transform/2col-retina/image.png\">&nbsp;Mercedes</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+2 Laps</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Yuki Tsunoda</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alphatauri-logo.png.transform/2col-retina/image.png\">&nbsp;AlphaTauri</td> <td>10</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Accident</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Esteban Ocon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/th.png\">&nbsp;Alexander Albon</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Fernando Alonso</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alpine-logo.png.transform/2col-retina/image.png\">&nbsp;Alpine F1 Team</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Nicholas Latifi</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/williams-logo.png.transform/2col-retina/image.png\">&nbsp;Williams</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/cn.png\">&nbsp;Guanyu Zhou</td> <td><img class=\"constructor-logo\" height=\"20\" width=\"20\" src=\"https://www.formula1.com/content/dam/fom-website/teams//2024/alfa-romeo-logo.png.transform/2col-retina/image.png\">&nbsp;Alfa Romeo</td> <td>14</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision</td> </tr> </tbody> </table> </article> </section> </td> </tr> </table>');\n    }),\n    test('Calling render without tab_order should arrange tabs in given order', async () => {\n        // Arrange\n        const card = new Results(parent);\n        card.config.tabs_order = ['Qualifying', 'Sprint', 'Results'];\n\n        // Act\n        const tabs = card.renderTabs(lastRace);\n\n        // Assert\n        expect(tabs[0].title).toBe('Qualifying');\n        expect(tabs[1].title).toBe('Sprint');\n        expect(tabs[2].title).toBe('Results');\n    }),    \n    test('Calling renderTabsHtml with race, tabs and selected index should return expected html', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        \n        const card = new Results(parent);\n        const tabs: FormulaOneCardTab[] = [\n            { title: 'Qualifying', content: html`Qualifying`, icon: 'speed' },\n            { title: 'Sprint', content: html`Sprint`, icon: 'speed' },\n            { title: 'Results', content: html`Results`, icon: 'speed' }\n        ];\n\n        // Act\n        const result = card.renderTabsHtml(tabs, 1, race);        \n        const htmlResult = await getRenderString(result);\n\n        // Assert\n        expect(htmlResult).toBe('<table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\" clickable\" /><br></td></tr> <tr class=\"transparent\"> <td colspan=\"2\"> <mwc-tab-bar @MDCTabBar:activated= > <mwc-tab ?hasImageIcon=speed ><ha-icon slot=\"icon\" icon=\"speed\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=speed ><ha-icon slot=\"icon\" icon=\"speed\" ></ha-icon> </mwc-tab> <mwc-tab ?hasImageIcon=speed ><ha-icon slot=\"icon\" icon=\"speed\" ></ha-icon> </mwc-tab> </mwc-tab-bar> <section> <article> Sprint </article> </section> </td> </tr> </table>');\n    }),  \n    test('Calling renderTabsHtml with race, tabs and selected index should return expected html', async () => {\n        // Arrange\n        const race = resultData.RaceTable.Races[0] as Race;\n        \n        const card = new Results(parent);\n        const tabs: FormulaOneCardTab[] = [\n            { title: 'Qualifying', content: null as unknown as HTMLTemplateResult, icon: 'speed' },\n            { title: 'Sprint', content: null as unknown as HTMLTemplateResult, icon: 'speed' },\n            { title: 'Results', content: null as unknown as HTMLTemplateResult, icon: 'speed' }\n        ];\n\n        // Act\n        const result = card.renderTabsHtml(tabs, 1, race);        \n        const htmlResult = await getRenderString(result);\n        \n        // Assert\n        expect(htmlResult).toBe('<table> <tr><td colspan=\"2\"><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 1 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action=_handleAction .actionHandler= class=\" clickable\" /><br></td></tr> <tr><td colspan=\"2\">Please select a race thats already been run.</td></tr> </table>');\n    }),\n    test('Calling renderTabsHtml with race undefined, tabs and selected index should return expected html', async () => {\n        // Arrange        \n        const card = new Results(parent);\n        const tabs: FormulaOneCardTab[] = [\n            { title: 'Qualifying', content: html`Qualifying`, icon: 'speed' },\n            { title: 'Sprint', content: html`Sprint`, icon: 'speed' },\n            { title: 'Results', content: html`Results`, icon: 'speed' }\n        ];\n\n        // Act\n        const result = card.renderTabsHtml(tabs, 1, undefined);        \n        const htmlResult = await getRenderString(result);\n\n        // Assert\n        expect(htmlResult).toBe('');\n    })\n\n    function setFetchMock() {\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>seasonData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>qualifyingData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>sprintData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n    }\n});"
  },
  {
    "path": "tests/cards/schedule.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from '../testdata/localStorageMock';\n\n// Models\nimport Schedule from '../../src/cards/schedule';\nimport { HomeAssistant, NumberFormat, TimeFormat } from 'custom-card-helpers';\nimport { getRenderString, getRenderStringAsync } from '../utils';\nimport { FormulaOneCardConfig, PreviousRaceDisplay } from '../../src/types/formulaone-card-types';\nimport { Mrdata } from '../../src/api/f1-models';\nimport { getApiErrorMessage, getEndOfSeasonMessage } from '../../src/utils';\nimport FormulaOneCard from '../../src';\nimport RestCountryClient from '../../src/api/restcountry-client';\nimport { Country } from '../../src/types/rest-country-types';\nimport ImageClient from \"../../src/api/image-client\";\n\n// Importing test data\nimport * as countries from '../testdata/countries.json'\nimport { MRData } from '../testdata/schedule.json'\n\ndescribe('Testing schedule file', () => {\n    const parent = createMock<FormulaOneCard>({ \n        config: createMock<FormulaOneCardConfig>(),\n    });\n    const hass = createMock<HomeAssistant>();\n    hass.locale = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n    parent._hass = hass;\n    \n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n        jest.useFakeTimers();\n        \n        jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n        jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });    \n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    });\n\n    afterEach (() => {        \n        jest.useRealTimers();  \n    });\n\n    test('Calling render with api returning data', async () => {  \n        // Arrange \n        const card = new Schedule(parent);\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n        \n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toMatch('<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td>Sakhir, Bahrain</td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td>Jeddah, Saudi Arabia</td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">3</td> <td>Albert Park Grand Prix Circuit</td> <td>Melbourne, Australia</td> <td class=\"width-60 text-center\">10-04</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">4</td> <td>Autodromo Enzo e Dino Ferrari</td> <td>Imola, Italy</td> <td class=\"width-60 text-center\">24-04</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">5</td> <td>Miami International Autodrome</td> <td>Miami, USA</td> <td class=\"width-60 text-center\">08-05</td> <td class=\"width-50 text-center\">21:30</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">6</td> <td>Circuit de Barcelona-Catalunya</td> <td>Montmeló, Spain</td> <td class=\"width-60 text-center\">22-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">7</td> <td>Circuit de Monaco</td> <td>Monte-Carlo, Monaco</td> <td class=\"width-60 text-center\">29-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">8</td> <td>Baku City Circuit</td> <td>Baku, Azerbaijan</td> <td class=\"width-60 text-center\">12-06</td> <td class=\"width-50 text-center\">13:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">9</td> <td>Circuit Gilles Villeneuve</td> <td>Montreal, Canada</td> <td class=\"width-60 text-center\">19-06</td> <td class=\"width-50 text-center\">20:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">10</td> <td>Silverstone Circuit</td> <td>Silverstone, UK</td> <td class=\"width-60 text-center\">03-07</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">11</td> <td>Red Bull Ring</td> <td>Spielberg, Austria</td> <td class=\"width-60 text-center\">10-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">12</td> <td>Circuit Paul Ricard</td> <td>Le Castellet, France</td> <td class=\"width-60 text-center\">24-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">13</td> <td>Hungaroring</td> <td>Budapest, Hungary</td> <td class=\"width-60 text-center\">31-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">14</td> <td>Circuit de Spa-Francorchamps</td> <td>Spa, Belgium</td> <td class=\"width-60 text-center\">28-08</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">15</td> <td>Circuit Park Zandvoort</td> <td>Zandvoort, Netherlands</td> <td class=\"width-60 text-center\">04-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">16</td> <td>Autodromo Nazionale di Monza</td> <td>Monza, Italy</td> <td class=\"width-60 text-center\">11-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">17</td> <td>Marina Bay Street Circuit</td> <td>Marina Bay, Singapore</td> <td class=\"width-60 text-center\">02-10</td> <td class=\"width-50 text-center\">14:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">18</td> <td>Suzuka Circuit</td> <td>Suzuka, Japan</td> <td class=\"width-60 text-center\">09-10</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">19</td> <td>Circuit of the Americas</td> <td>Austin, USA</td> <td class=\"width-60 text-center\">23-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">20</td> <td>Autódromo Hermanos Rodríguez</td> <td>Mexico City, Mexico</td> <td class=\"width-60 text-center\">30-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">21</td> <td>Autódromo José Carlos Pace</td> <td>São Paulo, Brazil</td> <td class=\"width-60 text-center\">13-11</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">22</td> <td>Yas Marina Circuit</td> <td>Abu Dhabi, UAE</td> <td class=\"width-60 text-center\">20-11</td> <td class=\"width-50 text-center\">14:00</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api returning data and standings config', async () => {   \n        // Arrange\n        const card = new Schedule(parent);\n        card.config.standings = { show_flag: true };\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;Sakhir, Bahrain</td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sa.png\">&nbsp;Jeddah, Saudi Arabia</td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">3</td> <td>Albert Park Grand Prix Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Melbourne, Australia</td> <td class=\"width-60 text-center\">10-04</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">4</td> <td>Autodromo Enzo e Dino Ferrari</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Imola, Italy</td> <td class=\"width-60 text-center\">24-04</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">5</td> <td>Miami International Autodrome</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/us.png\">&nbsp;Miami, USA</td> <td class=\"width-60 text-center\">08-05</td> <td class=\"width-50 text-center\">21:30</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">6</td> <td>Circuit de Barcelona-Catalunya</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Montmeló, Spain</td> <td class=\"width-60 text-center\">22-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">7</td> <td>Circuit de Monaco</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Monte-Carlo, Monaco</td> <td class=\"width-60 text-center\">29-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">8</td> <td>Baku City Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/az.png\">&nbsp;Baku, Azerbaijan</td> <td class=\"width-60 text-center\">12-06</td> <td class=\"width-50 text-center\">13:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">9</td> <td>Circuit Gilles Villeneuve</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Montreal, Canada</td> <td class=\"width-60 text-center\">19-06</td> <td class=\"width-50 text-center\">20:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">10</td> <td>Silverstone Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Silverstone, UK</td> <td class=\"width-60 text-center\">03-07</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">11</td> <td>Red Bull Ring</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/at.png\">&nbsp;Spielberg, Austria</td> <td class=\"width-60 text-center\">10-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">12</td> <td>Circuit Paul Ricard</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Le Castellet, France</td> <td class=\"width-60 text-center\">24-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">13</td> <td>Hungaroring</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/hu.png\">&nbsp;Budapest, Hungary</td> <td class=\"width-60 text-center\">31-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">14</td> <td>Circuit de Spa-Francorchamps</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/be.png\">&nbsp;Spa, Belgium</td> <td class=\"width-60 text-center\">28-08</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">15</td> <td>Circuit Park Zandvoort</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Zandvoort, Netherlands</td> <td class=\"width-60 text-center\">04-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">16</td> <td>Autodromo Nazionale di Monza</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Monza, Italy</td> <td class=\"width-60 text-center\">11-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">17</td> <td>Marina Bay Street Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp;Marina Bay, Singapore</td> <td class=\"width-60 text-center\">02-10</td> <td class=\"width-50 text-center\">14:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">18</td> <td>Suzuka Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Suzuka, Japan</td> <td class=\"width-60 text-center\">09-10</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">19</td> <td>Circuit of the Americas</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/us.png\">&nbsp;Austin, USA</td> <td class=\"width-60 text-center\">23-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">20</td> <td>Autódromo Hermanos Rodríguez</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Mexico City, Mexico</td> <td class=\"width-60 text-center\">30-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">21</td> <td>Autódromo José Carlos Pace</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/br.png\">&nbsp;São Paulo, Brazil</td> <td class=\"width-60 text-center\">13-11</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">22</td> <td>Yas Marina Circuit</td> <td><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ae.png\">&nbsp;Abu Dhabi, UAE</td> <td class=\"width-60 text-center\">20-11</td> <td class=\"width-50 text-center\">14:00</td> </tr> </tbody> </table>');\n    }),\n    test('Calling render with api not returning data', async () => {   \n        // Arrange\n        const card = new Schedule(parent);\n        fetchMock.mockResponseOnce('{}', { status: 500 });\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getApiErrorMessage('schedule'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling render with api returning data at end of season', async () => {           const card = new Schedule(parent);\n        // Arrange\n        jest.setSystemTime(new Date(2022, 11, 30)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        const expectedResult = getRenderString(getEndOfSeasonMessage('Season is over. See you next year!'));\n        expect(htmlResult).toMatch(expectedResult);\n    }),\n    test('Calling render with api returning data and location clickable', async () => {           \n        // Arrange\n        const card = new Schedule(parent);\n        card.config.location_clickable = true;\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);\n        expect(htmlResult).toMatch('<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Bahrain_International_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;Sakhir, Bahrain</a></td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Jeddah_Street_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sa.png\">&nbsp;Jeddah, Saudi Arabia</a></td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">3</td> <td>Albert Park Grand Prix Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Melbourne, Australia</a></td> <td class=\"width-60 text-center\">10-04</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">4</td> <td>Autodromo Enzo e Dino Ferrari</td> <td><a href=\"http://en.wikipedia.org/wiki/Autodromo_Enzo_e_Dino_Ferrari\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Imola, Italy</a></td> <td class=\"width-60 text-center\">24-04</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">5</td> <td>Miami International Autodrome</td> <td><a href=\"http://en.wikipedia.org/wiki/Miami_International_Autodrome\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/us.png\">&nbsp;Miami, USA</a></td> <td class=\"width-60 text-center\">08-05</td> <td class=\"width-50 text-center\">21:30</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">6</td> <td>Circuit de Barcelona-Catalunya</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_de_Barcelona-Catalunya\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Montmeló, Spain</a></td> <td class=\"width-60 text-center\">22-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">7</td> <td>Circuit de Monaco</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_de_Monaco\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Monte-Carlo, Monaco</a></td> <td class=\"width-60 text-center\">29-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">8</td> <td>Baku City Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Baku_City_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/az.png\">&nbsp;Baku, Azerbaijan</a></td> <td class=\"width-60 text-center\">12-06</td> <td class=\"width-50 text-center\">13:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">9</td> <td>Circuit Gilles Villeneuve</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_Gilles_Villeneuve\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Montreal, Canada</a></td> <td class=\"width-60 text-center\">19-06</td> <td class=\"width-50 text-center\">20:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">10</td> <td>Silverstone Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Silverstone_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Silverstone, UK</a></td> <td class=\"width-60 text-center\">03-07</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">11</td> <td>Red Bull Ring</td> <td><a href=\"http://en.wikipedia.org/wiki/Red_Bull_Ring\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/at.png\">&nbsp;Spielberg, Austria</a></td> <td class=\"width-60 text-center\">10-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">12</td> <td>Circuit Paul Ricard</td> <td><a href=\"http://en.wikipedia.org/wiki/Paul_Ricard_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Le Castellet, France</a></td> <td class=\"width-60 text-center\">24-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">13</td> <td>Hungaroring</td> <td><a href=\"http://en.wikipedia.org/wiki/Hungaroring\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/hu.png\">&nbsp;Budapest, Hungary</a></td> <td class=\"width-60 text-center\">31-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">14</td> <td>Circuit de Spa-Francorchamps</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_de_Spa-Francorchamps\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/be.png\">&nbsp;Spa, Belgium</a></td> <td class=\"width-60 text-center\">28-08</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">15</td> <td>Circuit Park Zandvoort</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_Zandvoort\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Zandvoort, Netherlands</a></td> <td class=\"width-60 text-center\">04-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">16</td> <td>Autodromo Nazionale di Monza</td> <td><a href=\"http://en.wikipedia.org/wiki/Autodromo_Nazionale_Monza\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Monza, Italy</a></td> <td class=\"width-60 text-center\">11-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">17</td> <td>Marina Bay Street Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Marina_Bay_Street_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp;Marina Bay, Singapore</a></td> <td class=\"width-60 text-center\">02-10</td> <td class=\"width-50 text-center\">14:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">18</td> <td>Suzuka Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Suzuka_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Suzuka, Japan</a></td> <td class=\"width-60 text-center\">09-10</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">19</td> <td>Circuit of the Americas</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_of_the_Americas\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/us.png\">&nbsp;Austin, USA</a></td> <td class=\"width-60 text-center\">23-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">20</td> <td>Autódromo Hermanos Rodríguez</td> <td><a href=\"http://en.wikipedia.org/wiki/Aut%C3%B3dromo_Hermanos_Rodr%C3%ADguez\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Mexico City, Mexico</a></td> <td class=\"width-60 text-center\">30-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">21</td> <td>Autódromo José Carlos Pace</td> <td><a href=\"http://en.wikipedia.org/wiki/Aut%C3%B3dromo_Jos%C3%A9_Carlos_Pace\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/br.png\">&nbsp;São Paulo, Brazil</a></td> <td class=\"width-60 text-center\">13-11</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">22</td> <td>Yas Marina Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Yas_Marina_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ae.png\">&nbsp;Abu Dhabi, UAE</a></td> <td class=\"width-60 text-center\">20-11</td> <td class=\"width-50 text-center\">14:00</td> </tr> </tbody> </table>');\n    }),\n    test.each`\n    previous_race\n    ${PreviousRaceDisplay.Strikethrough}\n    ${PreviousRaceDisplay.Italic}\n    `('Calling render with api returning data and previous race', async ({  previous_race }) => {          \n        // Arrange\n        const card = new Schedule(parent);\n        card.config.previous_race = previous_race;\n        jest.setSystemTime(new Date(2022, 3, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toMatch(`<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"${previous_race}\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Bahrain_International_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;Sakhir, Bahrain</a></td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"${previous_race}\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Jeddah_Street_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sa.png\">&nbsp;Jeddah, Saudi Arabia</a></td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">3</td> <td>Albert Park Grand Prix Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Melbourne, Australia</a></td> <td class=\"width-60 text-center\">10-04</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">4</td> <td>Autodromo Enzo e Dino Ferrari</td> <td><a href=\"http://en.wikipedia.org/wiki/Autodromo_Enzo_e_Dino_Ferrari\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Imola, Italy</a></td> <td class=\"width-60 text-center\">24-04</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">5</td> <td>Miami International Autodrome</td> <td><a href=\"http://en.wikipedia.org/wiki/Miami_International_Autodrome\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/us.png\">&nbsp;Miami, USA</a></td> <td class=\"width-60 text-center\">08-05</td> <td class=\"width-50 text-center\">21:30</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">6</td> <td>Circuit de Barcelona-Catalunya</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_de_Barcelona-Catalunya\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/es.png\">&nbsp;Montmeló, Spain</a></td> <td class=\"width-60 text-center\">22-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">7</td> <td>Circuit de Monaco</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_de_Monaco\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mc.png\">&nbsp;Monte-Carlo, Monaco</a></td> <td class=\"width-60 text-center\">29-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">8</td> <td>Baku City Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Baku_City_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/az.png\">&nbsp;Baku, Azerbaijan</a></td> <td class=\"width-60 text-center\">12-06</td> <td class=\"width-50 text-center\">13:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">9</td> <td>Circuit Gilles Villeneuve</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_Gilles_Villeneuve\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ca.png\">&nbsp;Montreal, Canada</a></td> <td class=\"width-60 text-center\">19-06</td> <td class=\"width-50 text-center\">20:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">10</td> <td>Silverstone Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Silverstone_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/gb.png\">&nbsp;Silverstone, UK</a></td> <td class=\"width-60 text-center\">03-07</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">11</td> <td>Red Bull Ring</td> <td><a href=\"http://en.wikipedia.org/wiki/Red_Bull_Ring\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/at.png\">&nbsp;Spielberg, Austria</a></td> <td class=\"width-60 text-center\">10-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">12</td> <td>Circuit Paul Ricard</td> <td><a href=\"http://en.wikipedia.org/wiki/Paul_Ricard_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/fr.png\">&nbsp;Le Castellet, France</a></td> <td class=\"width-60 text-center\">24-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">13</td> <td>Hungaroring</td> <td><a href=\"http://en.wikipedia.org/wiki/Hungaroring\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/hu.png\">&nbsp;Budapest, Hungary</a></td> <td class=\"width-60 text-center\">31-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">14</td> <td>Circuit de Spa-Francorchamps</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_de_Spa-Francorchamps\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/be.png\">&nbsp;Spa, Belgium</a></td> <td class=\"width-60 text-center\">28-08</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">15</td> <td>Circuit Park Zandvoort</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_Zandvoort\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/nl.png\">&nbsp;Zandvoort, Netherlands</a></td> <td class=\"width-60 text-center\">04-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">16</td> <td>Autodromo Nazionale di Monza</td> <td><a href=\"http://en.wikipedia.org/wiki/Autodromo_Nazionale_Monza\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Monza, Italy</a></td> <td class=\"width-60 text-center\">11-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">17</td> <td>Marina Bay Street Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Marina_Bay_Street_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp;Marina Bay, Singapore</a></td> <td class=\"width-60 text-center\">02-10</td> <td class=\"width-50 text-center\">14:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">18</td> <td>Suzuka Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Suzuka_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/jp.png\">&nbsp;Suzuka, Japan</a></td> <td class=\"width-60 text-center\">09-10</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">19</td> <td>Circuit of the Americas</td> <td><a href=\"http://en.wikipedia.org/wiki/Circuit_of_the_Americas\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/us.png\">&nbsp;Austin, USA</a></td> <td class=\"width-60 text-center\">23-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">20</td> <td>Autódromo Hermanos Rodríguez</td> <td><a href=\"http://en.wikipedia.org/wiki/Aut%C3%B3dromo_Hermanos_Rodr%C3%ADguez\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/mx.png\">&nbsp;Mexico City, Mexico</a></td> <td class=\"width-60 text-center\">30-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">21</td> <td>Autódromo José Carlos Pace</td> <td><a href=\"http://en.wikipedia.org/wiki/Aut%C3%B3dromo_Jos%C3%A9_Carlos_Pace\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/br.png\">&nbsp;São Paulo, Brazil</a></td> <td class=\"width-60 text-center\">13-11</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">22</td> <td>Yas Marina Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Yas_Marina_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/ae.png\">&nbsp;Abu Dhabi, UAE</a></td> <td class=\"width-60 text-center\">20-11</td> <td class=\"width-50 text-center\">14:00</td> </tr> </tbody> </table>`);\n    }),\n    test.each`\n    previous_race | expected\n    ${PreviousRaceDisplay.Hide}, ${'<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"\"> <td class=\"width-50 text-center\">3</td> <td>Albert Park Grand Prix Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/au.png\">&nbsp;Melbourne, Australia</a></td> <td class=\"width-60 text-center\">10-04</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">4</td> <td>Autodromo Enzo e Dino Ferrari</td> <td><a href=\"http://en.wikipedia.org/wiki/Autodromo_Enzo_e_Dino_Ferrari\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/it.png\">&nbsp;Imola, Italy</a></td> <td class=\"width-60 text-center\">24-04</td> <td class=\"width-50 text-center\">15:00</td> </tr> </tbody> </table><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table>'}\n    ${PreviousRaceDisplay.Strikethrough}, ${'<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"strikethrough\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Bahrain_International_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;Sakhir, Bahrain</a></td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"strikethrough\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Jeddah_Street_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sa.png\">&nbsp;Jeddah, Saudi Arabia</a></td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> </tbody> </table><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table>'}\n    ${PreviousRaceDisplay.Italic}, ${'<table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"italic\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Bahrain_International_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/bh.png\">&nbsp;Sakhir, Bahrain</a></td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"italic\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td><a href=\"http://en.wikipedia.org/wiki/Jeddah_Street_Circuit\" target=\"_blank\"><img height=\"10\" width=\"20\" src=\"https://flagcdn.com/w320/sa.png\">&nbsp;Jeddah, Saudi Arabia</a></td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> </tbody> </table><table><tr><td class=\"text-center\"><ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon> Loading... <ha-icon icon=\"mdi:car-speed-limiter\"></ha-icon></td></tr></table>'}\n    `('Calling render with api returning data and previous race and row_limit', async ({  previous_race, expected }) => {          \n        // Arrange\n        const card = new Schedule(parent);\n        card.config.previous_race = previous_race;\n        card.config.row_limit = 2;\n        jest.setSystemTime(new Date(2022, 3, 1)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>MRData }));\n        \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsync(result);        \n        expect(htmlResult).toMatch(expected);\n    }),\n    test('Calling cardSize', () => { \n        const card = new Schedule(parent);\n        expect(card.cardSize()).toBe(12);\n    })\n});"
  },
  {
    "path": "tests/config.ts",
    "content": "import 'jest-ts-auto-mock';\nimport fetchMock from \"jest-fetch-mock\";\n\nfetchMock.enableMocks();"
  },
  {
    "path": "tests/index.test.ts",
    "content": "// Mocks\nimport { createMock } from \"ts-auto-mock\";\nimport fetchMock from \"jest-fetch-mock\";\nimport LocalStorageMock from './testdata/localStorageMock';\n\n// Models\nimport { HomeAssistant, NumberFormat, TimeFormat } from 'custom-card-helpers';\nimport FormulaOneCard from '../src/index';\nimport { FormulaOneCardConfig, FormulaOneCardType } from '../src/types/formulaone-card-types';\nimport { getRenderString, getRenderStringAsyncIndex } from './utils';\nimport { LitElement, PropertyValues } from 'lit';\nimport { Mrdata, Root } from '../src/api/f1-models';\nimport ErgastClient from '../src/api/ergast-client';\nimport RestCountryClient from '../src/api/restcountry-client';\nimport { Country } from '../src/types/rest-country-types';\nimport ImageClient from \"../src/api/image-client\";\n\n// Importing test data\nimport { MRData as scheduleData } from './testdata/schedule.json'\nimport { MRData as constructorStandingsData } from './testdata/constructorStandings.json'\nimport { MRData as driverStandingsData } from './testdata/driverStandings.json'\nimport { MRData as resultData } from './testdata/results.json'\nimport { MRData as seasonData } from './testdata/seasons.json'\nimport * as countries from './testdata/countries.json'\n\nbeforeEach(() => {    \n    jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n    jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => { return url; });\n});\n\ndescribe('Testing index file function setConfig', () => {\n    jest.spyOn(RestCountryClient.prototype, 'GetData').mockImplementation(() => {\n        return new Promise<Country[]>((resolve) => {                \n            resolve(countries as Country[]);\n        });\n    });\n\n    const card = new FormulaOneCard();\n    const hass = createMock<HomeAssistant>();\n    hass.locale = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n\n    const localStorageMock = new LocalStorageMock();\n    Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n\n    beforeEach(() => {\n        localStorageMock.clear();     \n        fetchMock.resetMocks();\n        jest.useFakeTimers();\n    });\n\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    }); \n\n    afterEach (() => {        \n        jest.useRealTimers();  \n    });\n\n    test('Calling render without hass and config should return empty html', () => {   \n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = getRenderString(result);\n        expect(htmlResult).toMatch('');\n    }),\n    test('Passing empty config should throw error', () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: ''\n        }\n        \n        // Act & Assert\n        expect(() => card.setConfig(config)).toThrowError('Please define FormulaOne card type (card_type).');\n    }),\n    test('Calling render ConstructorStandings should return expected html', async () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.ConstructorStandings\n        }\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>constructorStandingsData }));\n\n        card.setConfig(config);\n        card.hass = hass;\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <h1 class=\"card-header\">Test</h1><h1 class=\"card-header\">Test</h1> <table> <thead> <tr> <th class=\"width-50\">&nbsp;</th> <th>Constructor</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td>Red Bull</td> <td class=\"width-60 text-center\">576</td> <td class=\"text-center\">13</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td>Ferrari</td> <td class=\"width-60 text-center\">439</td> <td class=\"text-center\">4</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td>Mercedes</td> <td class=\"width-60 text-center\">373</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td>McLaren</td> <td class=\"width-60 text-center\">129</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td>Alpine F1 Team</td> <td class=\"width-60 text-center\">125</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td>Alfa Romeo</td> <td class=\"width-60 text-center\">52</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td>Aston Martin</td> <td class=\"width-60 text-center\">37</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td>Haas F1 Team</td> <td class=\"width-60 text-center\">34</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td>AlphaTauri</td> <td class=\"width-60 text-center\">34</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td>Williams</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> </tbody> </table> </ha-card>');\n    }),    \n    test('Calling render with hass and config DriverStanding should return expected html', async () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            card_type: FormulaOneCardType.DriverStandings\n        }\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>driverStandingsData }));\n        card.setConfig(config);\n        card.hass = hass;\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <table> <thead> <tr> <th class=\"width-50\" colspan=\"2\">&nbsp;</th> <th>Driver</th> <th class=\"width-60 text-center\">Pts</th> <th class=\"text-center\">Wins</th> </tr> </thead> <tbody> <tr> <td class=\"width-40 text-center\">1</td> <td>VER</td> <td>Max Verstappen</td> <td class=\"width-60 text-center\">341</td> <td class=\"text-center\">11</td> </tr> <tr> <td class=\"width-40 text-center\">2</td> <td>LEC</td> <td>Charles Leclerc</td> <td class=\"width-60 text-center\">237</td> <td class=\"text-center\">3</td> </tr> <tr> <td class=\"width-40 text-center\">3</td> <td>PER</td> <td>Sergio Pérez</td> <td class=\"width-60 text-center\">235</td> <td class=\"text-center\">2</td> </tr> <tr> <td class=\"width-40 text-center\">4</td> <td>RUS</td> <td>George Russell</td> <td class=\"width-60 text-center\">203</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">5</td> <td>SAI</td> <td>Carlos Sainz</td> <td class=\"width-60 text-center\">202</td> <td class=\"text-center\">1</td> </tr> <tr> <td class=\"width-40 text-center\">6</td> <td>HAM</td> <td>Lewis Hamilton</td> <td class=\"width-60 text-center\">170</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">7</td> <td>NOR</td> <td>Lando Norris</td> <td class=\"width-60 text-center\">100</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">8</td> <td>OCO</td> <td>Esteban Ocon</td> <td class=\"width-60 text-center\">66</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">9</td> <td>ALO</td> <td>Fernando Alonso</td> <td class=\"width-60 text-center\">59</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">10</td> <td>BOT</td> <td>Valtteri Bottas</td> <td class=\"width-60 text-center\">46</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">11</td> <td>RIC</td> <td>Daniel Ricciardo</td> <td class=\"width-60 text-center\">29</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">12</td> <td>VET</td> <td>Sebastian Vettel</td> <td class=\"width-60 text-center\">24</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">13</td> <td>GAS</td> <td>Pierre Gasly</td> <td class=\"width-60 text-center\">23</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">14</td> <td>MAG</td> <td>Kevin Magnussen</td> <td class=\"width-60 text-center\">22</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">15</td> <td>STR</td> <td>Lance Stroll</td> <td class=\"width-60 text-center\">13</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">16</td> <td>MSC</td> <td>Mick Schumacher</td> <td class=\"width-60 text-center\">12</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">17</td> <td>TSU</td> <td>Yuki Tsunoda</td> <td class=\"width-60 text-center\">11</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">18</td> <td>ZHO</td> <td>Guanyu Zhou</td> <td class=\"width-60 text-center\">6</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">19</td> <td>ALB</td> <td>Alexander Albon</td> <td class=\"width-60 text-center\">4</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">20</td> <td>DEV</td> <td>Nyck de Vries</td> <td class=\"width-60 text-center\">2</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">21</td> <td>LAT</td> <td>Nicholas Latifi</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> <tr> <td class=\"width-40 text-center\">22</td> <td>HUL</td> <td>Nico Hülkenberg</td> <td class=\"width-60 text-center\">0</td> <td class=\"text-center\">0</td> </tr> </tbody> </table> </ha-card>');\n    }),    \n    test('Calling render with hass and config LastResult should return expected html', async () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.LastResult\n        }        \n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n\n        card.setConfig(config);\n        card.hass = hass;\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <h1 class=\"card-header\">Test</h1><h1 class=\"card-header\">Test</h1> <table> <tr> <td><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2><h2 class=\"\"><img height=\"25\" src=\"https://flagcdn.com/w320/sg.png\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><img width=\"100%\" src=\"https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/Singapore_Circuit.png.transform/7col/image.png\" @action= .actionHandler= class=\"\" /><br></td> </tr> </table> <table> <thead> <tr> <th>&nbsp;</th> <th>Driver</th> <th class=\"text-center\">Grid</th> <th class=\"text-center\">Points</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td class=\"width-50 text-center\">1</td> <td>Sergio Pérez</td> <td>2</td> <td class=\"width-60 text-center\">25</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">2</td> <td>Charles Leclerc</td> <td>1</td> <td class=\"width-60 text-center\">18</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">3</td> <td>Carlos Sainz</td> <td>4</td> <td class=\"width-60 text-center\">15</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">4</td> <td>Lando Norris</td> <td>6</td> <td class=\"width-60 text-center\">12</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">5</td> <td>Daniel Ricciardo</td> <td>16</td> <td class=\"width-60 text-center\">10</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">6</td> <td>Lance Stroll</td> <td>11</td> <td class=\"width-60 text-center\">8</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">7</td> <td>Max Verstappen</td> <td>8</td> <td class=\"width-60 text-center\">6</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">8</td> <td>Sebastian Vettel</td> <td>13</td> <td class=\"width-60 text-center\">4</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">9</td> <td>Lewis Hamilton</td> <td>3</td> <td class=\"width-60 text-center\">2</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">10</td> <td>Pierre Gasly</td> <td>7</td> <td class=\"width-60 text-center\">1</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">11</td> <td>Valtteri Bottas</td> <td>15</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">12</td> <td>Kevin Magnussen</td> <td>9</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Finished</td> </tr> <tr> <td class=\"width-50 text-center\">13</td> <td>Mick Schumacher</td> <td>12</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+1 Lap</td> </tr> <tr> <td class=\"width-50 text-center\">14</td> <td>George Russell</td> <td>0</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">+2 Laps</td> </tr> <tr> <td class=\"width-50 text-center\">15</td> <td>Yuki Tsunoda</td> <td>10</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Accident</td> </tr> <tr> <td class=\"width-50 text-center\">16</td> <td>Esteban Ocon</td> <td>17</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">17</td> <td>Alexander Albon</td> <td>18</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">18</td> <td>Fernando Alonso</td> <td>5</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Engine</td> </tr> <tr> <td class=\"width-50 text-center\">19</td> <td>Nicholas Latifi</td> <td>19</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision damage</td> </tr> <tr> <td class=\"width-50 text-center\">20</td> <td>Guanyu Zhou</td> <td>14</td> <td class=\"width-60 text-center\">0</td> <td class=\"width-50 text-center\">Collision</td> </tr> </tbody> </table> </ha-card>');\n    }),\n    test('Calling render with hass and config Results should return expected html', async () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.Results\n        }                \n        // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n        jest.spyOn(LitElement.prototype as any, 'update').mockImplementationOnce(() => { });\n\n        jest.spyOn(ErgastClient.prototype, 'GetData').mockImplementation((_endpoint) => {\n            if(_endpoint === '2022/2/results.json`') {\n                return new Promise<Root>((resolve) => {\n                    resolve({ MRData : <Mrdata>resultData });\n                });\n            }\n\n            if(_endpoint === 'seasons.json?limit=200') {\n                return new Promise<Root>((resolve) => {\n                    resolve({ MRData : <Mrdata>seasonData });\n                });\n            }\n    \n            return new Promise<Root>((resolve) => {\n                resolve({ MRData : <Mrdata>scheduleData });\n            });\n        });\n\n        card.setConfig(config);\n        card.hass = hass;\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <h1 class=\"card-header\">Test</h1><h1 class=\"card-header\">Test</h1> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> <table> <tr> <td> Season<br /> <select name=\"selectedSeason\" @change=\"\"> <option value=\"0\">Select season</option> <option value=\"1979\" ?selected=>1979</option><option value=\"1978\" ?selected=>1978</option><option value=\"1977\" ?selected=>1977</option><option value=\"1976\" ?selected=>1976</option><option value=\"1975\" ?selected=>1975</option><option value=\"1974\" ?selected=>1974</option><option value=\"1973\" ?selected=>1973</option><option value=\"1972\" ?selected=>1972</option><option value=\"1971\" ?selected=>1971</option><option value=\"1970\" ?selected=>1970</option><option value=\"1969\" ?selected=>1969</option><option value=\"1968\" ?selected=>1968</option><option value=\"1967\" ?selected=>1967</option><option value=\"1966\" ?selected=>1966</option><option value=\"1965\" ?selected=>1965</option><option value=\"1964\" ?selected=>1964</option><option value=\"1963\" ?selected=>1963</option><option value=\"1962\" ?selected=>1962</option><option value=\"1961\" ?selected=>1961</option><option value=\"1960\" ?selected=>1960</option><option value=\"1959\" ?selected=>1959</option><option value=\"1958\" ?selected=>1958</option><option value=\"1957\" ?selected=>1957</option><option value=\"1956\" ?selected=>1956</option><option value=\"1955\" ?selected=>1955</option><option value=\"1954\" ?selected=>1954</option><option value=\"1953\" ?selected=>1953</option><option value=\"1952\" ?selected=>1952</option><option value=\"1951\" ?selected=>1951</option><option value=\"1950\" ?selected=>1950</option> </select> </td> <td> Race<br /> <select name=\"selectedRace\" @change=\"\"> <option value=\"0\" ?selected=>Select race</option> </select> </td> </tr> </table> </ha-card>');\n    }),\n    test('Calling render with hass and config NextRace should return expected html', async () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.NextRace,\n            f1_font: true\n        }\n\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n\n        card.setConfig(config);\n        card.hass = hass;\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderString(result);\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <h1 class=\"card-header formulaone-font\">Test</h1> </ha-card>');\n    }),    \n    test('Calling render with hass and config Schedule should return expected html', async () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.Schedule\n        }\n        \n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n        \n        card.setConfig(config);\n        card.hass = hass;\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = await getRenderStringAsyncIndex(result);\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <h1 class=\"card-header\">Test</h1><h1 class=\"card-header\">Test</h1> <table> <thead> <tr> <th>&nbsp;</th> <th>Race</th> <th>Location</th> <th class=\"text-center\">Date</th> <th class=\"text-center\">Time</th> </tr> </thead> <tbody> <tr class=\"\"> <td class=\"width-50 text-center\">1</td> <td>Bahrain International Circuit</td> <td>Sakhir, BahrainSakhir, BahrainSakhir, Bahrain</td> <td class=\"width-60 text-center\">20-03</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">2</td> <td>Jeddah Corniche Circuit</td> <td>Jeddah, Saudi ArabiaJeddah, Saudi ArabiaJeddah, Saudi Arabia</td> <td class=\"width-60 text-center\">27-03</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">3</td> <td>Albert Park Grand Prix Circuit</td> <td>Melbourne, AustraliaMelbourne, AustraliaMelbourne, Australia</td> <td class=\"width-60 text-center\">10-04</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">4</td> <td>Autodromo Enzo e Dino Ferrari</td> <td>Imola, ItalyImola, ItalyImola, Italy</td> <td class=\"width-60 text-center\">24-04</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">5</td> <td>Miami International Autodrome</td> <td>Miami, USAMiami, USAMiami, USA</td> <td class=\"width-60 text-center\">08-05</td> <td class=\"width-50 text-center\">21:30</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">6</td> <td>Circuit de Barcelona-Catalunya</td> <td>Montmeló, SpainMontmeló, SpainMontmeló, Spain</td> <td class=\"width-60 text-center\">22-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">7</td> <td>Circuit de Monaco</td> <td>Monte-Carlo, MonacoMonte-Carlo, MonacoMonte-Carlo, Monaco</td> <td class=\"width-60 text-center\">29-05</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">8</td> <td>Baku City Circuit</td> <td>Baku, AzerbaijanBaku, AzerbaijanBaku, Azerbaijan</td> <td class=\"width-60 text-center\">12-06</td> <td class=\"width-50 text-center\">13:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">9</td> <td>Circuit Gilles Villeneuve</td> <td>Montreal, CanadaMontreal, CanadaMontreal, Canada</td> <td class=\"width-60 text-center\">19-06</td> <td class=\"width-50 text-center\">20:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">10</td> <td>Silverstone Circuit</td> <td>Silverstone, UKSilverstone, UKSilverstone, UK</td> <td class=\"width-60 text-center\">03-07</td> <td class=\"width-50 text-center\">16:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">11</td> <td>Red Bull Ring</td> <td>Spielberg, AustriaSpielberg, AustriaSpielberg, Austria</td> <td class=\"width-60 text-center\">10-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">12</td> <td>Circuit Paul Ricard</td> <td>Le Castellet, FranceLe Castellet, FranceLe Castellet, France</td> <td class=\"width-60 text-center\">24-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">13</td> <td>Hungaroring</td> <td>Budapest, HungaryBudapest, HungaryBudapest, Hungary</td> <td class=\"width-60 text-center\">31-07</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">14</td> <td>Circuit de Spa-Francorchamps</td> <td>Spa, BelgiumSpa, BelgiumSpa, Belgium</td> <td class=\"width-60 text-center\">28-08</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">15</td> <td>Circuit Park Zandvoort</td> <td>Zandvoort, NetherlandsZandvoort, NetherlandsZandvoort, Netherlands</td> <td class=\"width-60 text-center\">04-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">16</td> <td>Autodromo Nazionale di Monza</td> <td>Monza, ItalyMonza, ItalyMonza, Italy</td> <td class=\"width-60 text-center\">11-09</td> <td class=\"width-50 text-center\">15:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">17</td> <td>Marina Bay Street Circuit</td> <td>Marina Bay, SingaporeMarina Bay, SingaporeMarina Bay, Singapore</td> <td class=\"width-60 text-center\">02-10</td> <td class=\"width-50 text-center\">14:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">18</td> <td>Suzuka Circuit</td> <td>Suzuka, JapanSuzuka, JapanSuzuka, Japan</td> <td class=\"width-60 text-center\">09-10</td> <td class=\"width-50 text-center\">7:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">19</td> <td>Circuit of the Americas</td> <td>Austin, USAAustin, USAAustin, USA</td> <td class=\"width-60 text-center\">23-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">20</td> <td>Autódromo Hermanos Rodríguez</td> <td>Mexico City, MexicoMexico City, MexicoMexico City, Mexico</td> <td class=\"width-60 text-center\">30-10</td> <td class=\"width-50 text-center\">21:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">21</td> <td>Autódromo José Carlos Pace</td> <td>São Paulo, BrazilSão Paulo, BrazilSão Paulo, Brazil</td> <td class=\"width-60 text-center\">13-11</td> <td class=\"width-50 text-center\">19:00</td> </tr> <tr class=\"\"> <td class=\"width-50 text-center\">22</td> <td>Yas Marina Circuit</td> <td>Abu Dhabi, UAEAbu Dhabi, UAEAbu Dhabi, UAE</td> <td class=\"width-60 text-center\">20-11</td> <td class=\"width-50 text-center\">14:00</td> </tr> </tbody> </table> </ha-card>');\n    }),    \n    test('Calling shouldUpdate with config should return true', () => {   \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.Schedule\n        }\n        const props : PropertyValues = new Map([['config', config]]);        \n\n        // Act\n        const result = card['shouldUpdate'](props);\n\n        // Assert\n        expect(result).toBeTruthy();\n    }),\n    test.each`\n    type | expected\n    ${FormulaOneCardType.ConstructorStandings}, ${11}\n    ${FormulaOneCardType.DriverStandings}, ${12}\n    ${FormulaOneCardType.LastResult}, ${11}\n    ${FormulaOneCardType.NextRace}, ${8}\n    ${FormulaOneCardType.Schedule}, ${12}\n    ${FormulaOneCardType.Results}, ${12}\n    ${FormulaOneCardType.Countdown}, ${6}\n    `('Calling getCardSize with type should return card size', ({ type, expected }) => {  \n        // Arrange\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: type.toString()\n        }\n\n        // Act\n        card.setConfig(config);\n        card.hass = hass;\n\n        // Assert\n        expect(card.getCardSize()).toBe(expected);\n    }),\n    test('Passing empty config should throw warning', () => {   \n        // Arrange\n        card.card.render = jest.fn().mockImplementationOnce(() => { throw new Error('Error for warning'); });\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = getRenderString(result);\n        expect(htmlResult).toMatch('<hui-warning>Error: Error for warning</hui-warning>');\n    }),\n    test('Setting cardValues should trigger update and values should be set', () => {           \n        // Arrange\n        // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n        const updateSpy = jest.spyOn(LitElement.prototype as any, 'update').mockImplementationOnce(() => { });\n\n        // Act\n        card.properties = new Map([['races', []]]);\n\n        // Assert\n        expect(updateSpy).toHaveBeenCalled();\n        expect(card.properties).toEqual(new Map([['races', []]]));\n    }),\n    test('Calling constructor should set warning', async () => {\n        // Arrange       \n        fetchMock.mockReject(new Error('Error for warning'));\n        // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n        const updateSpy = jest.spyOn(LitElement.prototype as any, 'update').mockImplementationOnce(() => { });\n        jest.spyOn(RestCountryClient.prototype, 'GetAll').mockImplementationOnce(() => { return Promise.reject(new Error()); });\n\n        // Act\n        const formulaOneCard = new FormulaOneCard();\n        formulaOneCard.setCountryCache();\n\n        // Assert\n        expect(updateSpy).toHaveBeenCalled();\n    }),\n    test('Calling render with warning should show warning', async () => {\n        // Arrange\n        card.warning = 'Error for warning';\n\n        // Act\n        const result = card.render();\n\n        // Assert\n        const htmlResult = getRenderString(result);\n        expect(htmlResult).toMatch('<ha-card elevation=\"2\"> <hui-warning>Error for warning</hui-warning> <h1 class=\"card-header\">Test</h1> </ha-card>');\n    }),\n    test('Calling refresh cache should set cache', async () => {\n        // Arrange\n        const event = new Event('refresh-cache');\n        const config: FormulaOneCardConfig = {\n            type: '',\n            title: 'Test',\n            card_type: FormulaOneCardType.Countdown,\n            show_refresh: true\n        }\n        card.setConfig(config);\n\n        // Act\n        card.refreshCache(event);\n\n        // Assert\n    })\n})\n\n"
  },
  {
    "path": "tests/lib/formate_date.test.ts",
    "content": "import { FrontendLocaleData, NumberFormat, TimeFormat } from \"custom-card-helpers\";\nimport { formatDate, formatDateNumeric } from \"../../src/lib/format_date\";\n\ndescribe('Testing formate_date file', () => {\n    const locale: FrontendLocaleData = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n\n    test('Passing date, locale and en locale', () => {           \n        const date = new Date('2022-01-01')\n\n        expect(formatDate(date, locale, 'en')).toBe('01/01');\n    }),\n    test('Passing date and locale', () => {           \n        const date = new Date('2022-01-01')\n\n        expect(formatDate(date, locale)).toBe('01-01');\n    }),\n    test('Passing date, locale and en locale', () => {           \n        const date = new Date('2022-01-01')\n\n        expect(formatDateNumeric(date, locale, 'en')).toBe('01/01/22');\n    }),\n    test('Passing date and locale', () => {           \n        const date = new Date('2022-01-01')\n\n        expect(formatDateNumeric(date, locale)).toBe('01-01-22');\n    })\n    \n})\n\n"
  },
  {
    "path": "tests/lib/formate_date_time.test.ts",
    "content": "import { FrontendLocaleData, NumberFormat, TimeFormat } from \"custom-card-helpers\";\nimport { formatDateTime, formatDateTimeRaceInfo } from \"../../src/lib/format_date_time\";\n\ndescribe('Testing formate_date_time file', () => {\n    const locale: FrontendLocaleData = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n\n    test('Passing date, locale formatDateTime', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n\n        const result = formatDateTime(date, locale).split(' ');\n        '1 januari 2022 10:00'.split(' ').forEach((x: string) => expect(result).toContain(x));\n    }),\n    test('Passing date and locale formatDateTimeRaceInfo', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n        \n        const result = formatDateTimeRaceInfo(date, locale).split(' ');\n        'za 10:00'.split(' ').forEach((x: string) => expect(result).toContain(x));\n    }),\n    test('Passing date, locale and en locale formatDateTime', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n        locale.time_format = TimeFormat.am_pm;\n        \n        const result = formatDateTime(date, locale).split(' ');\n        '1 januari 2022 10:00 a.m.'.split(' ').forEach((x: string) => expect(result).toContain(x));\n    }),\n    test('Passing date and locale en locale formatDateTimeRaceInfo', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n        locale.time_format = TimeFormat.am_pm;\n\n        const result = formatDateTimeRaceInfo(date, locale).split(' ');\n        'za 10:00 a.m.'.split(' ').forEach((x: string) => expect(result).toContain(x));\n    }),\n    test('Passing date, locale and timeformat system formatDateTime', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n        locale.time_format = TimeFormat.system;\n\n        const result = formatDateTime(date, locale).split(' ');\n        '1 januari 2022 10:00'.split(' ').forEach((x: string) => expect(result).toContain(x));\n    }),\n    test('Passing date and locale timeformat system formatDateTimeRaceInfo', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n        locale.time_format = TimeFormat.system;\n\n        const result = formatDateTimeRaceInfo(date, locale).split(' ');\n        'za 10:00'.split(' ').forEach((x: string) => expect(result).toContain(x));\n    }) \n})\n\n"
  },
  {
    "path": "tests/lib/formate_time.test.ts",
    "content": "import { FrontendLocaleData, NumberFormat, TimeFormat } from \"custom-card-helpers\";\nimport { formatTime } from \"../../src/lib/format_time\";\n\ndescribe('Testing formate_time file', () => {\n    const locale: FrontendLocaleData = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n\n    test('Passing date, locale', () => {           \n        const date = new Date('2022-01-01 10:00:00')\n\n        expect(formatTime(date, locale)).toBe('10:00');\n    })\n})\n\n"
  },
  {
    "path": "tests/testdata/constructorStandings.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/2022/constructorstandings.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"10\",\"StandingsTable\":{\"season\":\"2022\",\"StandingsLists\":[{\"season\":\"2022\",\"round\":\"17\",\"ConstructorStandings\":[{\"position\":\"1\",\"positionText\":\"1\",\"points\":\"576\",\"wins\":\"13\",\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http://en.wikipedia.org/wiki/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"}},{\"position\":\"2\",\"positionText\":\"2\",\"points\":\"439\",\"wins\":\"4\",\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http://en.wikipedia.org/wiki/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"}},{\"position\":\"3\",\"positionText\":\"3\",\"points\":\"373\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http://en.wikipedia.org/wiki/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"}},{\"position\":\"4\",\"positionText\":\"4\",\"points\":\"129\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http://en.wikipedia.org/wiki/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"}},{\"position\":\"5\",\"positionText\":\"5\",\"points\":\"125\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http://en.wikipedia.org/wiki/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"}},{\"position\":\"6\",\"positionText\":\"6\",\"points\":\"52\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http://en.wikipedia.org/wiki/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"}},{\"position\":\"7\",\"positionText\":\"7\",\"points\":\"37\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http://en.wikipedia.org/wiki/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"}},{\"position\":\"8\",\"positionText\":\"8\",\"points\":\"34\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http://en.wikipedia.org/wiki/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"}},{\"position\":\"9\",\"positionText\":\"9\",\"points\":\"34\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http://en.wikipedia.org/wiki/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"}},{\"position\":\"10\",\"positionText\":\"10\",\"points\":\"6\",\"wins\":\"0\",\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http://en.wikipedia.org/wiki/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"}}]}]}}}"
  },
  {
    "path": "tests/testdata/countries.json",
    "content": "[{\"name\":\"Afghanistan\",\"topLevelDomain\":[\".af\"],\"alpha2Code\":\"AF\",\"alpha3Code\":\"AFG\",\"callingCodes\":[\"93\"],\"capital\":\"Kabul\",\"altSpellings\":[\"AF\",\"Afġānistān\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":40218234,\"latlng\":[33.0,65.0],\"demonym\":\"Afghan\",\"area\":652230.0,\"timezones\":[\"UTC+04:30\"],\"borders\":[\"IRN\",\"PAK\",\"TKM\",\"UZB\",\"TJK\",\"CHN\"],\"nativeName\":\"افغانستان\",\"numericCode\":\"004\",\"flags\":{\"svg\":\"https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_the_Taliban.svg\",\"png\":\"https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_the_Taliban.svg/320px-Flag_of_the_Taliban.svg.png\"},\"currencies\":[{\"code\":\"AFN\",\"name\":\"Afghan afghani\",\"symbol\":\"؋\"}],\"languages\":[{\"iso639_1\":\"ps\",\"iso639_2\":\"pus\",\"name\":\"Pashto\",\"nativeName\":\"پښتو\"},{\"iso639_1\":\"uz\",\"iso639_2\":\"uzb\",\"name\":\"Uzbek\",\"nativeName\":\"Oʻzbek\"},{\"iso639_1\":\"tk\",\"iso639_2\":\"tuk\",\"name\":\"Turkmen\",\"nativeName\":\"Türkmen\"}],\"translations\":{\"br\":\"Afghanistan\",\"pt\":\"Afeganistão\",\"nl\":\"Afghanistan\",\"hr\":\"Afganistan\",\"fa\":\"افغانستان\",\"de\":\"Afghanistan\",\"es\":\"Afganistán\",\"fr\":\"Afghanistan\",\"ja\":\"アフガニスタン\",\"it\":\"Afghanistan\",\"hu\":\"Afganisztán\"},\"flag\":\"https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_the_Taliban.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"AFG\",\"independent\":true},{\"name\":\"Åland Islands\",\"topLevelDomain\":[\".ax\"],\"alpha2Code\":\"AX\",\"alpha3Code\":\"ALA\",\"callingCodes\":[\"358\"],\"capital\":\"Mariehamn\",\"altSpellings\":[\"AX\",\"Aaland\",\"Aland\",\"Ahvenanmaa\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":28875,\"latlng\":[60.116667,19.9],\"demonym\":\"Ålandish\",\"area\":1580.0,\"timezones\":[\"UTC+02:00\"],\"nativeName\":\"Åland\",\"numericCode\":\"248\",\"flags\":{\"svg\":\"https://flagcdn.com/ax.svg\",\"png\":\"https://flagcdn.com/w320/ax.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"sv\",\"iso639_2\":\"swe\",\"name\":\"Swedish\",\"nativeName\":\"svenska\"}],\"translations\":{\"br\":\"Åland\",\"pt\":\"Ilhas de Aland\",\"nl\":\"Ålandeilanden\",\"hr\":\"Ålandski otoci\",\"fa\":\"جزایر الند\",\"de\":\"Åland\",\"es\":\"Alandia\",\"fr\":\"Åland\",\"ja\":\"オーランド諸島\",\"it\":\"Isole Aland\",\"hu\":\"Åland-szigetek\"},\"flag\":\"https://flagcdn.com/ax.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"independent\":false},{\"name\":\"Albania\",\"topLevelDomain\":[\".al\"],\"alpha2Code\":\"AL\",\"alpha3Code\":\"ALB\",\"callingCodes\":[\"355\"],\"capital\":\"Tirana\",\"altSpellings\":[\"AL\",\"Shqipëri\",\"Shqipëria\",\"Shqipnia\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":2837743,\"latlng\":[41.0,20.0],\"demonym\":\"Albanian\",\"area\":28748.0,\"gini\":33.2,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"MNE\",\"GRC\",\"MKD\",\"UNK\"],\"nativeName\":\"Shqipëria\",\"numericCode\":\"008\",\"flags\":{\"svg\":\"https://flagcdn.com/al.svg\",\"png\":\"https://flagcdn.com/w320/al.png\"},\"currencies\":[{\"code\":\"ALL\",\"name\":\"Albanian lek\",\"symbol\":\"L\"}],\"languages\":[{\"iso639_1\":\"sq\",\"iso639_2\":\"sqi\",\"name\":\"Albanian\",\"nativeName\":\"Shqip\"}],\"translations\":{\"br\":\"Albania\",\"pt\":\"Albânia\",\"nl\":\"Albanië\",\"hr\":\"Albanija\",\"fa\":\"آلبانی\",\"de\":\"Albanien\",\"es\":\"Albania\",\"fr\":\"Albanie\",\"ja\":\"アルバニア\",\"it\":\"Albania\",\"hu\":\"Albánia\"},\"flag\":\"https://flagcdn.com/al.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"cioc\":\"ALB\",\"independent\":true},{\"name\":\"Algeria\",\"topLevelDomain\":[\".dz\"],\"alpha2Code\":\"DZ\",\"alpha3Code\":\"DZA\",\"callingCodes\":[\"213\"],\"capital\":\"Algiers\",\"altSpellings\":[\"DZ\",\"Dzayer\",\"Algérie\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":44700000,\"latlng\":[28.0,3.0],\"demonym\":\"Algerian\",\"area\":2381741.0,\"gini\":27.6,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"TUN\",\"LBY\",\"NER\",\"ESH\",\"MRT\",\"MLI\",\"MAR\"],\"nativeName\":\"الجزائر\",\"numericCode\":\"012\",\"flags\":{\"svg\":\"https://flagcdn.com/dz.svg\",\"png\":\"https://flagcdn.com/w320/dz.png\"},\"currencies\":[{\"code\":\"DZD\",\"name\":\"Algerian dinar\",\"symbol\":\"د.ج\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Aljeria\",\"pt\":\"Argélia\",\"nl\":\"Algerije\",\"hr\":\"Alžir\",\"fa\":\"الجزایر\",\"de\":\"Algerien\",\"es\":\"Argelia\",\"fr\":\"Algérie\",\"ja\":\"アルジェリア\",\"it\":\"Algeria\",\"hu\":\"Algéria\"},\"flag\":\"https://flagcdn.com/dz.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"ALG\",\"independent\":true},{\"name\":\"American Samoa\",\"topLevelDomain\":[\".as\"],\"alpha2Code\":\"AS\",\"alpha3Code\":\"ASM\",\"callingCodes\":[\"1\"],\"capital\":\"Pago Pago\",\"altSpellings\":[\"AS\",\"Amerika Sāmoa\",\"Amelika Sāmoa\",\"Sāmoa Amelika\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":55197,\"latlng\":[-14.33333333,-170.0],\"demonym\":\"American Samoan\",\"area\":199.0,\"timezones\":[\"UTC-11:00\"],\"nativeName\":\"American Samoa\",\"numericCode\":\"016\",\"flags\":{\"svg\":\"https://flagcdn.com/as.svg\",\"png\":\"https://flagcdn.com/w320/as.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States Dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"sm\",\"iso639_2\":\"smo\",\"name\":\"Samoan\",\"nativeName\":\"gagana fa'a Samoa\"}],\"translations\":{\"br\":\"Samoa Amerikan\",\"pt\":\"Samoa Americana\",\"nl\":\"Amerikaans Samoa\",\"hr\":\"Američka Samoa\",\"fa\":\"ساموآی آمریکا\",\"de\":\"Amerikanisch-Samoa\",\"es\":\"Samoa Americana\",\"fr\":\"Samoa américaines\",\"ja\":\"アメリカ領サモア\",\"it\":\"Samoa Americane\",\"hu\":\"Amerikai Szamoa\"},\"flag\":\"https://flagcdn.com/as.svg\",\"cioc\":\"ASA\",\"independent\":false},{\"name\":\"Andorra\",\"topLevelDomain\":[\".ad\"],\"alpha2Code\":\"AD\",\"alpha3Code\":\"AND\",\"callingCodes\":[\"376\"],\"capital\":\"Andorra la Vella\",\"altSpellings\":[\"AD\",\"Principality of Andorra\",\"Principat d'Andorra\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":77265,\"latlng\":[42.5,1.5],\"demonym\":\"Andorran\",\"area\":468.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"FRA\",\"ESP\"],\"nativeName\":\"Andorra\",\"numericCode\":\"020\",\"flags\":{\"svg\":\"https://flagcdn.com/ad.svg\",\"png\":\"https://flagcdn.com/w320/ad.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"ca\",\"iso639_2\":\"cat\",\"name\":\"Catalan\",\"nativeName\":\"català\"}],\"translations\":{\"br\":\"Andorra\",\"pt\":\"Andorra\",\"nl\":\"Andorra\",\"hr\":\"Andora\",\"fa\":\"آندورا\",\"de\":\"Andorra\",\"es\":\"Andorra\",\"fr\":\"Andorre\",\"ja\":\"アンドラ\",\"it\":\"Andorra\",\"hu\":\"Andorra\"},\"flag\":\"https://flagcdn.com/ad.svg\",\"cioc\":\"AND\",\"independent\":true},{\"name\":\"Angola\",\"topLevelDomain\":[\".ao\"],\"alpha2Code\":\"AO\",\"alpha3Code\":\"AGO\",\"callingCodes\":[\"244\"],\"capital\":\"Luanda\",\"altSpellings\":[\"AO\",\"República de Angola\",\"ʁɛpublika de an'ɡɔla\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":32866268,\"latlng\":[-12.5,18.5],\"demonym\":\"Angolan\",\"area\":1246700.0,\"gini\":51.3,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"COG\",\"COD\",\"ZMB\",\"NAM\"],\"nativeName\":\"Angola\",\"numericCode\":\"024\",\"flags\":{\"svg\":\"https://flagcdn.com/ao.svg\",\"png\":\"https://flagcdn.com/w320/ao.png\"},\"currencies\":[{\"code\":\"AOA\",\"name\":\"Angolan kwanza\",\"symbol\":\"Kz\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Angola\",\"pt\":\"Angola\",\"nl\":\"Angola\",\"hr\":\"Angola\",\"fa\":\"آنگولا\",\"de\":\"Angola\",\"es\":\"Angola\",\"fr\":\"Angola\",\"ja\":\"アンゴラ\",\"it\":\"Angola\",\"hu\":\"Angola\"},\"flag\":\"https://flagcdn.com/ao.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"ANG\",\"independent\":true},{\"name\":\"Anguilla\",\"topLevelDomain\":[\".ai\"],\"alpha2Code\":\"AI\",\"alpha3Code\":\"AIA\",\"callingCodes\":[\"1\"],\"capital\":\"The Valley\",\"altSpellings\":[\"AI\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":13452,\"latlng\":[18.25,-63.16666666],\"demonym\":\"Anguillian\",\"area\":91.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Anguilla\",\"numericCode\":\"660\",\"flags\":{\"svg\":\"https://flagcdn.com/ai.svg\",\"png\":\"https://flagcdn.com/w320/ai.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Anguilla\",\"pt\":\"Anguila\",\"nl\":\"Anguilla\",\"hr\":\"Angvila\",\"fa\":\"آنگویلا\",\"de\":\"Anguilla\",\"es\":\"Anguilla\",\"fr\":\"Anguilla\",\"ja\":\"アンギラ\",\"it\":\"Anguilla\",\"hu\":\"Anguilla\"},\"flag\":\"https://flagcdn.com/ai.svg\",\"independent\":false},{\"name\":\"Antarctica\",\"topLevelDomain\":[\".aq\"],\"alpha2Code\":\"AQ\",\"alpha3Code\":\"ATA\",\"callingCodes\":[\"672\"],\"subregion\":\"Antarctica\",\"region\":\"Polar\",\"population\":1000,\"latlng\":[-74.65,4.48],\"demonym\":\"Antarctic\",\"area\":1.4E7,\"timezones\":[\"UTC-03:00\",\"UTC+03:00\",\"UTC+05:00\",\"UTC+06:00\",\"UTC+07:00\",\"UTC+08:00\",\"UTC+10:00\",\"UTC+12:00\"],\"nativeName\":\"Antarctica\",\"numericCode\":\"010\",\"flags\":{\"svg\":\"https://flagcdn.com/aq.svg\",\"png\":\"https://flagcdn.com/w320/aq.png\"},\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Antarktika\",\"pt\":\"Antárctida\",\"nl\":\"Antarctica\",\"hr\":\"Antarktika\",\"fa\":\"جنوبگان\",\"de\":\"Antarktika\",\"es\":\"Antártida\",\"fr\":\"Antarctique\",\"ja\":\"南極大陸\",\"it\":\"Antartide\",\"hu\":\"Antarktisz\"},\"flag\":\"https://flagcdn.com/aq.svg\",\"independent\":false},{\"name\":\"Antigua and Barbuda\",\"topLevelDomain\":[\".ag\"],\"alpha2Code\":\"AG\",\"alpha3Code\":\"ATG\",\"callingCodes\":[\"1\"],\"capital\":\"Saint John's\",\"altSpellings\":[\"AG\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":97928,\"latlng\":[17.05,-61.8],\"demonym\":\"Antiguan, Barbudan\",\"area\":442.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Antigua and Barbuda\",\"numericCode\":\"028\",\"flags\":{\"svg\":\"https://flagcdn.com/ag.svg\",\"png\":\"https://flagcdn.com/w320/ag.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Antigua ha Barbuda\",\"pt\":\"Antígua e Barbuda\",\"nl\":\"Antigua en Barbuda\",\"hr\":\"Antigva i Barbuda\",\"fa\":\"آنتیگوا و باربودا\",\"de\":\"Antigua und Barbuda\",\"es\":\"Antigua y Barbuda\",\"fr\":\"Antigua-et-Barbuda\",\"ja\":\"アンティグア・バーブーダ\",\"it\":\"Antigua e Barbuda\",\"hu\":\"Antigua és Barbuda\"},\"flag\":\"https://flagcdn.com/ag.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"ANT\",\"independent\":true},{\"name\":\"Argentina\",\"topLevelDomain\":[\".ar\"],\"alpha2Code\":\"AR\",\"alpha3Code\":\"ARG\",\"callingCodes\":[\"54\"],\"capital\":\"Buenos Aires\",\"altSpellings\":[\"AR\",\"Argentine Republic\",\"República Argentina\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":45376763,\"latlng\":[-34.0,-64.0],\"demonym\":\"Argentinean\",\"area\":2780400.0,\"gini\":42.9,\"timezones\":[\"UTC-03:00\"],\"borders\":[\"BOL\",\"BRA\",\"CHL\",\"PRY\",\"URY\"],\"nativeName\":\"Argentina\",\"numericCode\":\"032\",\"flags\":{\"svg\":\"https://flagcdn.com/ar.svg\",\"png\":\"https://flagcdn.com/w320/ar.png\"},\"currencies\":[{\"code\":\"ARS\",\"name\":\"Argentine peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"},{\"iso639_1\":\"gn\",\"iso639_2\":\"grn\",\"name\":\"Guaraní\",\"nativeName\":\"Avañe'ẽ\"}],\"translations\":{\"br\":\"Arc'hantina\",\"pt\":\"Argentina\",\"nl\":\"Argentinië\",\"hr\":\"Argentina\",\"fa\":\"آرژانتین\",\"de\":\"Argentinien\",\"es\":\"Argentina\",\"fr\":\"Argentine\",\"ja\":\"アルゼンチン\",\"it\":\"Argentina\",\"hu\":\"Argentína\"},\"flag\":\"https://flagcdn.com/ar.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"ARG\",\"independent\":true},{\"name\":\"Armenia\",\"topLevelDomain\":[\".am\"],\"alpha2Code\":\"AM\",\"alpha3Code\":\"ARM\",\"callingCodes\":[\"374\"],\"capital\":\"Yerevan\",\"altSpellings\":[\"AM\",\"Hayastan\",\"Republic of Armenia\",\"Հայաստանի Հանրապետություն\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":2963234,\"latlng\":[40.0,45.0],\"demonym\":\"Armenian\",\"area\":29743.0,\"gini\":29.9,\"timezones\":[\"UTC+04:00\"],\"borders\":[\"AZE\",\"GEO\",\"IRN\",\"TUR\"],\"nativeName\":\"Հայաստան\",\"numericCode\":\"051\",\"flags\":{\"svg\":\"https://flagcdn.com/am.svg\",\"png\":\"https://flagcdn.com/w320/am.png\"},\"currencies\":[{\"code\":\"AMD\",\"name\":\"Armenian dram\",\"symbol\":\"֏\"}],\"languages\":[{\"iso639_1\":\"hy\",\"iso639_2\":\"hye\",\"name\":\"Armenian\",\"nativeName\":\"Հայերեն\"}],\"translations\":{\"br\":\"Armenia\",\"pt\":\"Arménia\",\"nl\":\"Armenië\",\"hr\":\"Armenija\",\"fa\":\"ارمنستان\",\"de\":\"Armenien\",\"es\":\"Armenia\",\"fr\":\"Arménie\",\"ja\":\"アルメニア\",\"it\":\"Armenia\",\"hu\":\"Örményország\"},\"flag\":\"https://flagcdn.com/am.svg\",\"regionalBlocs\":[{\"acronym\":\"EEU\",\"name\":\"Eurasian Economic Union\",\"otherAcronyms\":[\"EAEU\"]}],\"cioc\":\"ARM\",\"independent\":true},{\"name\":\"Aruba\",\"topLevelDomain\":[\".aw\"],\"alpha2Code\":\"AW\",\"alpha3Code\":\"ABW\",\"callingCodes\":[\"297\"],\"capital\":\"Oranjestad\",\"altSpellings\":[\"AW\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":106766,\"latlng\":[12.5,-69.96666666],\"demonym\":\"Aruban\",\"area\":180.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Aruba\",\"numericCode\":\"533\",\"flags\":{\"svg\":\"https://flagcdn.com/aw.svg\",\"png\":\"https://flagcdn.com/w320/aw.png\"},\"currencies\":[{\"code\":\"AWG\",\"name\":\"Aruban florin\",\"symbol\":\"ƒ\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"},{\"iso639_1\":\"pa\",\"iso639_2\":\"pan\",\"name\":\"(Eastern) Punjabi\",\"nativeName\":\"ਪੰਜਾਬੀ\"}],\"translations\":{\"br\":\"Aruba\",\"pt\":\"Aruba\",\"nl\":\"Aruba\",\"hr\":\"Aruba\",\"fa\":\"آروبا\",\"de\":\"Aruba\",\"es\":\"Aruba\",\"fr\":\"Aruba\",\"ja\":\"アルバ\",\"it\":\"Aruba\",\"hu\":\"Aruba\"},\"flag\":\"https://flagcdn.com/aw.svg\",\"cioc\":\"ARU\",\"independent\":true},{\"name\":\"Australia\",\"topLevelDomain\":[\".au\"],\"alpha2Code\":\"AU\",\"alpha3Code\":\"AUS\",\"callingCodes\":[\"61\"],\"capital\":\"Canberra\",\"altSpellings\":[\"AU\"],\"subregion\":\"Australia and New Zealand\",\"region\":\"Oceania\",\"population\":25687041,\"latlng\":[-27.0,133.0],\"demonym\":\"Australian\",\"area\":7692024.0,\"gini\":34.4,\"timezones\":[\"UTC+05:00\",\"UTC+06:30\",\"UTC+07:00\",\"UTC+08:00\",\"UTC+09:30\",\"UTC+10:00\",\"UTC+10:30\",\"UTC+11:30\"],\"nativeName\":\"Australia\",\"numericCode\":\"036\",\"flags\":{\"svg\":\"https://flagcdn.com/au.svg\",\"png\":\"https://flagcdn.com/w320/au.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Aostralia\",\"pt\":\"Austrália\",\"nl\":\"Australië\",\"hr\":\"Australija\",\"fa\":\"استرالیا\",\"de\":\"Australien\",\"es\":\"Australia\",\"fr\":\"Australie\",\"ja\":\"オーストラリア\",\"it\":\"Australia\",\"hu\":\"Ausztrália\"},\"flag\":\"https://flagcdn.com/au.svg\",\"cioc\":\"AUS\",\"independent\":true},{\"name\":\"Austria\",\"topLevelDomain\":[\".at\"],\"alpha2Code\":\"AT\",\"alpha3Code\":\"AUT\",\"callingCodes\":[\"43\"],\"capital\":\"Vienna\",\"altSpellings\":[\"AT\",\"Österreich\",\"Osterreich\",\"Oesterreich\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":8917205,\"latlng\":[47.33333333,13.33333333],\"demonym\":\"Austrian\",\"area\":83871.0,\"gini\":30.8,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"CZE\",\"DEU\",\"HUN\",\"ITA\",\"LIE\",\"SVK\",\"SVN\",\"CHE\"],\"nativeName\":\"Österreich\",\"numericCode\":\"040\",\"flags\":{\"svg\":\"https://flagcdn.com/at.svg\",\"png\":\"https://flagcdn.com/w320/at.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"}],\"translations\":{\"br\":\"Aostria\",\"pt\":\"Áustria\",\"nl\":\"Oostenrijk\",\"hr\":\"Austrija\",\"fa\":\"اتریش\",\"de\":\"Österreich\",\"es\":\"Austria\",\"fr\":\"Autriche\",\"ja\":\"オーストリア\",\"it\":\"Austria\",\"hu\":\"Ausztria\"},\"flag\":\"https://flagcdn.com/at.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"AUT\",\"independent\":true},{\"name\":\"Azerbaijan\",\"topLevelDomain\":[\".az\"],\"alpha2Code\":\"AZ\",\"alpha3Code\":\"AZE\",\"callingCodes\":[\"994\"],\"capital\":\"Baku\",\"altSpellings\":[\"AZ\",\"Republic of Azerbaijan\",\"Azərbaycan Respublikası\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":10110116,\"latlng\":[40.5,47.5],\"demonym\":\"Azerbaijani\",\"area\":86600.0,\"gini\":26.6,\"timezones\":[\"UTC+04:00\"],\"borders\":[\"ARM\",\"GEO\",\"IRN\",\"RUS\",\"TUR\"],\"nativeName\":\"Azərbaycan\",\"numericCode\":\"031\",\"flags\":{\"svg\":\"https://flagcdn.com/az.svg\",\"png\":\"https://flagcdn.com/w320/az.png\"},\"currencies\":[{\"code\":\"AZN\",\"name\":\"Azerbaijani manat\",\"symbol\":\"₼\"}],\"languages\":[{\"iso639_1\":\"az\",\"iso639_2\":\"aze\",\"name\":\"Azerbaijani\",\"nativeName\":\"azərbaycan dili\"}],\"translations\":{\"br\":\"Azerbaidjan\",\"pt\":\"Azerbaijão\",\"nl\":\"Azerbeidzjan\",\"hr\":\"Azerbajdžan\",\"fa\":\"آذربایجان\",\"de\":\"Aserbaidschan\",\"es\":\"Azerbaiyán\",\"fr\":\"Azerbaïdjan\",\"ja\":\"アゼルバイジャン\",\"it\":\"Azerbaijan\",\"hu\":\"Azerbajdzsán\"},\"flag\":\"https://flagcdn.com/az.svg\",\"cioc\":\"AZE\",\"independent\":true},{\"name\":\"Bahamas\",\"topLevelDomain\":[\".bs\"],\"alpha2Code\":\"BS\",\"alpha3Code\":\"BHS\",\"callingCodes\":[\"1\"],\"capital\":\"Nassau\",\"altSpellings\":[\"BS\",\"Commonwealth of the Bahamas\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":393248,\"latlng\":[24.25,-76.0],\"demonym\":\"Bahamian\",\"area\":13943.0,\"timezones\":[\"UTC-05:00\"],\"nativeName\":\"Bahamas\",\"numericCode\":\"044\",\"flags\":{\"svg\":\"https://flagcdn.com/bs.svg\",\"png\":\"https://flagcdn.com/w320/bs.png\"},\"currencies\":[{\"code\":\"BSD\",\"name\":\"Bahamian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Bahamas\",\"pt\":\"Baamas\",\"nl\":\"Bahama’s\",\"hr\":\"Bahami\",\"fa\":\"باهاما\",\"de\":\"Bahamas\",\"es\":\"Bahamas\",\"fr\":\"Bahamas\",\"ja\":\"バハマ\",\"it\":\"Bahamas\",\"hu\":\"Bahama-szigetek\"},\"flag\":\"https://flagcdn.com/bs.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"BAH\",\"independent\":true},{\"name\":\"Bahrain\",\"topLevelDomain\":[\".bh\"],\"alpha2Code\":\"BH\",\"alpha3Code\":\"BHR\",\"callingCodes\":[\"973\"],\"capital\":\"Manama\",\"altSpellings\":[\"BH\",\"Kingdom of Bahrain\",\"Mamlakat al-Baḥrayn\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":1701583,\"latlng\":[26.0,50.55],\"demonym\":\"Bahraini\",\"area\":765.0,\"timezones\":[\"UTC+03:00\"],\"nativeName\":\"‏البحرين\",\"numericCode\":\"048\",\"flags\":{\"svg\":\"https://flagcdn.com/bh.svg\",\"png\":\"https://flagcdn.com/w320/bh.png\"},\"currencies\":[{\"code\":\"BHD\",\"name\":\"Bahraini dinar\",\"symbol\":\".د.ب\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Bahrein\",\"pt\":\"Barém\",\"nl\":\"Bahrein\",\"hr\":\"Bahrein\",\"fa\":\"بحرین\",\"de\":\"Bahrain\",\"es\":\"Bahrein\",\"fr\":\"Bahreïn\",\"ja\":\"バーレーン\",\"it\":\"Bahrein\",\"hu\":\"Bahrein\"},\"flag\":\"https://flagcdn.com/bh.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"BRN\",\"independent\":true},{\"name\":\"Bangladesh\",\"topLevelDomain\":[\".bd\"],\"alpha2Code\":\"BD\",\"alpha3Code\":\"BGD\",\"callingCodes\":[\"880\"],\"capital\":\"Dhaka\",\"altSpellings\":[\"BD\",\"People's Republic of Bangladesh\",\"Gônôprôjatôntri Bangladesh\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":164689383,\"latlng\":[24.0,90.0],\"demonym\":\"Bangladeshi\",\"area\":147570.0,\"gini\":32.4,\"timezones\":[\"UTC+06:00\"],\"borders\":[\"MMR\",\"IND\"],\"nativeName\":\"Bangladesh\",\"numericCode\":\"050\",\"flags\":{\"svg\":\"https://flagcdn.com/bd.svg\",\"png\":\"https://flagcdn.com/w320/bd.png\"},\"currencies\":[{\"code\":\"BDT\",\"name\":\"Bangladeshi taka\",\"symbol\":\"৳\"}],\"languages\":[{\"iso639_1\":\"bn\",\"iso639_2\":\"ben\",\"name\":\"Bengali\",\"nativeName\":\"বাংলা\"}],\"translations\":{\"br\":\"Bangladesh\",\"pt\":\"Bangladeche\",\"nl\":\"Bangladesh\",\"hr\":\"Bangladeš\",\"fa\":\"بنگلادش\",\"de\":\"Bangladesch\",\"es\":\"Bangladesh\",\"fr\":\"Bangladesh\",\"ja\":\"バングラデシュ\",\"it\":\"Bangladesh\",\"hu\":\"Banglades\"},\"flag\":\"https://flagcdn.com/bd.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"BAN\",\"independent\":true},{\"name\":\"Barbados\",\"topLevelDomain\":[\".bb\"],\"alpha2Code\":\"BB\",\"alpha3Code\":\"BRB\",\"callingCodes\":[\"1\"],\"capital\":\"Bridgetown\",\"altSpellings\":[\"BB\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":287371,\"latlng\":[13.16666666,-59.53333333],\"demonym\":\"Barbadian\",\"area\":430.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Barbados\",\"numericCode\":\"052\",\"flags\":{\"svg\":\"https://flagcdn.com/bb.svg\",\"png\":\"https://flagcdn.com/w320/bb.png\"},\"currencies\":[{\"code\":\"BBD\",\"name\":\"Barbadian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Barbados\",\"pt\":\"Barbados\",\"nl\":\"Barbados\",\"hr\":\"Barbados\",\"fa\":\"باربادوس\",\"de\":\"Barbados\",\"es\":\"Barbados\",\"fr\":\"Barbade\",\"ja\":\"バルバドス\",\"it\":\"Barbados\",\"hu\":\"Barbados\"},\"flag\":\"https://flagcdn.com/bb.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"BAR\",\"independent\":true},{\"name\":\"Belarus\",\"topLevelDomain\":[\".by\"],\"alpha2Code\":\"BY\",\"alpha3Code\":\"BLR\",\"callingCodes\":[\"375\"],\"capital\":\"Minsk\",\"altSpellings\":[\"BY\",\"Bielaruś\",\"Republic of Belarus\",\"Белоруссия\",\"Республика Беларусь\",\"Belorussiya\",\"Respublika Belarus’\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":9398861,\"latlng\":[53.0,28.0],\"demonym\":\"Belarusian\",\"area\":207600.0,\"gini\":25.3,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"LVA\",\"LTU\",\"POL\",\"RUS\",\"UKR\"],\"nativeName\":\"Белару́сь\",\"numericCode\":\"112\",\"flags\":{\"svg\":\"https://flagcdn.com/by.svg\",\"png\":\"https://flagcdn.com/w320/by.png\"},\"currencies\":[{\"code\":\"BYN\",\"name\":\"New Belarusian ruble\",\"symbol\":\"Br\"},{\"code\":\"BYR\",\"name\":\"Old Belarusian ruble\",\"symbol\":\"Br\"}],\"languages\":[{\"iso639_1\":\"be\",\"iso639_2\":\"bel\",\"name\":\"Belarusian\",\"nativeName\":\"беларуская мова\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Belarus\",\"pt\":\"Bielorrússia\",\"nl\":\"Wit-Rusland\",\"hr\":\"Bjelorusija\",\"fa\":\"بلاروس\",\"de\":\"Weißrussland\",\"es\":\"Bielorrusia\",\"fr\":\"Biélorussie\",\"ja\":\"ベラルーシ\",\"it\":\"Bielorussia\",\"hu\":\"Fehéroroszország\"},\"flag\":\"https://flagcdn.com/by.svg\",\"regionalBlocs\":[{\"acronym\":\"EEU\",\"name\":\"Eurasian Economic Union\",\"otherAcronyms\":[\"EAEU\"]}],\"cioc\":\"BLR\",\"independent\":true},{\"name\":\"Belgium\",\"topLevelDomain\":[\".be\"],\"alpha2Code\":\"BE\",\"alpha3Code\":\"BEL\",\"callingCodes\":[\"32\"],\"capital\":\"Brussels\",\"altSpellings\":[\"BE\",\"België\",\"Belgie\",\"Belgien\",\"Belgique\",\"Kingdom of Belgium\",\"Koninkrijk België\",\"Royaume de Belgique\",\"Königreich Belgien\"],\"subregion\":\"Western Europe\",\"region\":\"Europe\",\"population\":11555997,\"latlng\":[50.83333333,4.0],\"demonym\":\"Belgian\",\"area\":30528.0,\"gini\":27.2,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"FRA\",\"DEU\",\"LUX\",\"NLD\"],\"nativeName\":\"België\",\"numericCode\":\"056\",\"flags\":{\"svg\":\"https://flagcdn.com/be.svg\",\"png\":\"https://flagcdn.com/w320/be.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"}],\"translations\":{\"br\":\"Belgia\",\"pt\":\"Bélgica\",\"nl\":\"België\",\"hr\":\"Belgija\",\"fa\":\"بلژیک\",\"de\":\"Belgien\",\"es\":\"Bélgica\",\"fr\":\"Belgique\",\"ja\":\"ベルギー\",\"it\":\"Belgio\",\"hu\":\"Belgium\"},\"flag\":\"https://flagcdn.com/be.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"BEL\",\"independent\":true},{\"name\":\"Belize\",\"topLevelDomain\":[\".bz\"],\"alpha2Code\":\"BZ\",\"alpha3Code\":\"BLZ\",\"callingCodes\":[\"501\"],\"capital\":\"Belmopan\",\"altSpellings\":[\"BZ\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":397621,\"latlng\":[17.25,-88.75],\"demonym\":\"Belizean\",\"area\":22966.0,\"gini\":53.3,\"timezones\":[\"UTC-06:00\"],\"borders\":[\"GTM\",\"MEX\"],\"nativeName\":\"Belize\",\"numericCode\":\"084\",\"flags\":{\"svg\":\"https://flagcdn.com/bz.svg\",\"png\":\"https://flagcdn.com/w320/bz.png\"},\"currencies\":[{\"code\":\"BZD\",\"name\":\"Belize dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Belize\",\"pt\":\"Belize\",\"nl\":\"Belize\",\"hr\":\"Belize\",\"fa\":\"بلیز\",\"de\":\"Belize\",\"es\":\"Belice\",\"fr\":\"Belize\",\"ja\":\"ベリーズ\",\"it\":\"Belize\",\"hu\":\"Belize\"},\"flag\":\"https://flagcdn.com/bz.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]},{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"BIZ\",\"independent\":true},{\"name\":\"Benin\",\"topLevelDomain\":[\".bj\"],\"alpha2Code\":\"BJ\",\"alpha3Code\":\"BEN\",\"callingCodes\":[\"229\"],\"capital\":\"Porto-Novo\",\"altSpellings\":[\"BJ\",\"Republic of Benin\",\"République du Bénin\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":12123198,\"latlng\":[9.5,2.25],\"demonym\":\"Beninese\",\"area\":112622.0,\"gini\":47.8,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"BFA\",\"NER\",\"NGA\",\"TGO\"],\"nativeName\":\"Bénin\",\"numericCode\":\"204\",\"flags\":{\"svg\":\"https://flagcdn.com/bj.svg\",\"png\":\"https://flagcdn.com/w320/bj.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Benin\",\"pt\":\"Benim\",\"nl\":\"Benin\",\"hr\":\"Benin\",\"fa\":\"بنین\",\"de\":\"Benin\",\"es\":\"Benín\",\"fr\":\"Bénin\",\"ja\":\"ベナン\",\"it\":\"Benin\",\"hu\":\"Benin\"},\"flag\":\"https://flagcdn.com/bj.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"BEN\",\"independent\":true},{\"name\":\"Bermuda\",\"topLevelDomain\":[\".bm\"],\"alpha2Code\":\"BM\",\"alpha3Code\":\"BMU\",\"callingCodes\":[\"1\"],\"capital\":\"Hamilton\",\"altSpellings\":[\"BM\",\"The Islands of Bermuda\",\"The Bermudas\",\"Somers Isles\"],\"subregion\":\"Northern America\",\"region\":\"Americas\",\"population\":63903,\"latlng\":[32.33333333,-64.75],\"demonym\":\"Bermudian\",\"area\":54.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Bermuda\",\"numericCode\":\"060\",\"flags\":{\"svg\":\"https://flagcdn.com/bm.svg\",\"png\":\"https://flagcdn.com/w320/bm.png\"},\"currencies\":[{\"code\":\"BMD\",\"name\":\"Bermudian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Bermuda\",\"pt\":\"Bermudas\",\"nl\":\"Bermuda\",\"hr\":\"Bermudi\",\"fa\":\"برمودا\",\"de\":\"Bermuda\",\"es\":\"Bermudas\",\"fr\":\"Bermudes\",\"ja\":\"バミューダ\",\"it\":\"Bermuda\",\"hu\":\"Bermuda\"},\"flag\":\"https://flagcdn.com/bm.svg\",\"cioc\":\"BER\",\"independent\":false},{\"name\":\"Bhutan\",\"topLevelDomain\":[\".bt\"],\"alpha2Code\":\"BT\",\"alpha3Code\":\"BTN\",\"callingCodes\":[\"975\"],\"capital\":\"Thimphu\",\"altSpellings\":[\"BT\",\"Kingdom of Bhutan\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":771612,\"latlng\":[27.5,90.5],\"demonym\":\"Bhutanese\",\"area\":38394.0,\"gini\":37.4,\"timezones\":[\"UTC+06:00\"],\"borders\":[\"CHN\",\"IND\"],\"nativeName\":\"ʼbrug-yul\",\"numericCode\":\"064\",\"flags\":{\"svg\":\"https://flagcdn.com/bt.svg\",\"png\":\"https://flagcdn.com/w320/bt.png\"},\"currencies\":[{\"code\":\"BTN\",\"name\":\"Bhutanese ngultrum\",\"symbol\":\"Nu.\"},{\"code\":\"INR\",\"name\":\"Indian rupee\",\"symbol\":\"₹\"}],\"languages\":[{\"iso639_1\":\"dz\",\"iso639_2\":\"dzo\",\"name\":\"Dzongkha\",\"nativeName\":\"རྫོང་ཁ\"}],\"translations\":{\"br\":\"Bhoutan\",\"pt\":\"Butão\",\"nl\":\"Bhutan\",\"hr\":\"Butan\",\"fa\":\"بوتان\",\"de\":\"Bhutan\",\"es\":\"Bután\",\"fr\":\"Bhoutan\",\"ja\":\"ブータン\",\"it\":\"Bhutan\",\"hu\":\"Bhután\"},\"flag\":\"https://flagcdn.com/bt.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"BHU\",\"independent\":true},{\"name\":\"Bolivia (Plurinational State of)\",\"topLevelDomain\":[\".bo\"],\"alpha2Code\":\"BO\",\"alpha3Code\":\"BOL\",\"callingCodes\":[\"591\"],\"capital\":\"Sucre\",\"altSpellings\":[\"BO\",\"Buliwya\",\"Wuliwya\",\"Plurinational State of Bolivia\",\"Estado Plurinacional de Bolivia\",\"Buliwya Mamallaqta\",\"Wuliwya Suyu\",\"Tetã Volívia\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":11673029,\"latlng\":[-17.0,-65.0],\"demonym\":\"Bolivian\",\"area\":1098581.0,\"gini\":41.6,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"ARG\",\"BRA\",\"CHL\",\"PRY\",\"PER\"],\"nativeName\":\"Bolivia\",\"numericCode\":\"068\",\"flags\":{\"svg\":\"https://flagcdn.com/bo.svg\",\"png\":\"https://flagcdn.com/w320/bo.png\"},\"currencies\":[{\"code\":\"BOB\",\"name\":\"Bolivian boliviano\",\"symbol\":\"Bs.\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"},{\"iso639_1\":\"ay\",\"iso639_2\":\"aym\",\"name\":\"Aymara\",\"nativeName\":\"aymar aru\"},{\"iso639_1\":\"qu\",\"iso639_2\":\"que\",\"name\":\"Quechua\",\"nativeName\":\"Runa Simi\"}],\"translations\":{\"br\":\"Bolivia\",\"pt\":\"Bolívia\",\"nl\":\"Bolivia\",\"hr\":\"Bolivija\",\"fa\":\"بولیوی\",\"de\":\"Bolivien\",\"es\":\"Bolivia\",\"fr\":\"Bolivie\",\"ja\":\"ボリビア多民族国\",\"it\":\"Bolivia\",\"hu\":\"Bolívia\"},\"flag\":\"https://flagcdn.com/bo.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"BOL\",\"independent\":true},{\"name\":\"Bonaire, Sint Eustatius and Saba\",\"topLevelDomain\":[\".an\",\".nl\"],\"alpha2Code\":\"BQ\",\"alpha3Code\":\"BES\",\"callingCodes\":[\"599\"],\"capital\":\"Kralendijk\",\"altSpellings\":[\"BQ\",\"Boneiru\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":17408,\"latlng\":[12.15,-68.266667],\"demonym\":\"Dutch\",\"area\":294.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Bonaire\",\"numericCode\":\"535\",\"flags\":{\"svg\":\"https://flagcdn.com/bq.svg\",\"png\":\"https://flagcdn.com/w320/bq.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"}],\"translations\":{\"br\":\"Bonaire, Sint Eustatius ha Saba\",\"pt\":\"Bonaire\",\"nl\":\"Caribisch Nederland\",\"hr\":\"Bonaire, Sint Eustatius and Saba\",\"fa\":\"بونیر\",\"de\":\"Bonaire, Sint Eustatius und Saba\",\"es\":\"Bonaire, Sint Eustatius and Saba\",\"fr\":\"Bonaire, Saint-Eustache et Saba\",\"ja\":\"Bonaire, Sint Eustatius and Saba\",\"it\":\"Bonaire, Saint-Eustache e Saba\",\"hu\":\"Bonaire\"},\"flag\":\"https://flagcdn.com/bq.svg\",\"independent\":true},{\"name\":\"Bosnia and Herzegovina\",\"topLevelDomain\":[\".ba\"],\"alpha2Code\":\"BA\",\"alpha3Code\":\"BIH\",\"callingCodes\":[\"387\"],\"capital\":\"Sarajevo\",\"altSpellings\":[\"BA\",\"Bosnia-Herzegovina\",\"Босна и Херцеговина\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":3280815,\"latlng\":[44.0,18.0],\"demonym\":\"Bosnian, Herzegovinian\",\"area\":51209.0,\"gini\":33.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"HRV\",\"MNE\",\"SRB\"],\"nativeName\":\"Bosna i Hercegovina\",\"numericCode\":\"070\",\"flags\":{\"svg\":\"https://flagcdn.com/ba.svg\",\"png\":\"https://flagcdn.com/w320/ba.png\"},\"currencies\":[{\"code\":\"BAM\",\"name\":\"Bosnia and Herzegovina convertible mark\",\"symbol\":\"KM\"}],\"languages\":[{\"iso639_1\":\"bs\",\"iso639_2\":\"bos\",\"name\":\"Bosnian\",\"nativeName\":\"bosanski jezik\"},{\"iso639_1\":\"hr\",\"iso639_2\":\"hrv\",\"name\":\"Croatian\",\"nativeName\":\"hrvatski jezik\"},{\"iso639_1\":\"sr\",\"iso639_2\":\"srp\",\"name\":\"Serbian\",\"nativeName\":\"српски језик\"}],\"translations\":{\"br\":\"Bosnia-ha-Herzegovina\",\"pt\":\"Bósnia e Herzegovina\",\"nl\":\"Bosnië en Herzegovina\",\"hr\":\"Bosna i Hercegovina\",\"fa\":\"بوسنی و هرزگوین\",\"de\":\"Bosnien und Herzegowina\",\"es\":\"Bosnia y Herzegovina\",\"fr\":\"Bosnie-Herzégovine\",\"ja\":\"ボスニア・ヘルツェゴビナ\",\"it\":\"Bosnia ed Erzegovina\",\"hu\":\"Bosznia-Hercegovina\"},\"flag\":\"https://flagcdn.com/ba.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"cioc\":\"BIH\",\"independent\":true},{\"name\":\"Botswana\",\"topLevelDomain\":[\".bw\"],\"alpha2Code\":\"BW\",\"alpha3Code\":\"BWA\",\"callingCodes\":[\"267\"],\"capital\":\"Gaborone\",\"altSpellings\":[\"BW\",\"Republic of Botswana\",\"Lefatshe la Botswana\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":2351625,\"latlng\":[-22.0,24.0],\"demonym\":\"Motswana\",\"area\":582000.0,\"gini\":53.3,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"NAM\",\"ZAF\",\"ZMB\",\"ZWE\"],\"nativeName\":\"Botswana\",\"numericCode\":\"072\",\"flags\":{\"svg\":\"https://flagcdn.com/bw.svg\",\"png\":\"https://flagcdn.com/w320/bw.png\"},\"currencies\":[{\"code\":\"BWP\",\"name\":\"Botswana pula\",\"symbol\":\"P\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"tn\",\"iso639_2\":\"tsn\",\"name\":\"Tswana\",\"nativeName\":\"Setswana\"}],\"translations\":{\"br\":\"Botswana\",\"pt\":\"Botsuana\",\"nl\":\"Botswana\",\"hr\":\"Bocvana\",\"fa\":\"بوتسوانا\",\"de\":\"Botswana\",\"es\":\"Botswana\",\"fr\":\"Botswana\",\"ja\":\"ボツワナ\",\"it\":\"Botswana\",\"hu\":\"Botswana\"},\"flag\":\"https://flagcdn.com/bw.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"BOT\",\"independent\":true},{\"name\":\"Bouvet Island\",\"topLevelDomain\":[\".bv\"],\"alpha2Code\":\"BV\",\"alpha3Code\":\"BVT\",\"callingCodes\":[\"47\"],\"altSpellings\":[\"BV\",\"Bouvetøya\",\"Bouvet-øya\"],\"subregion\":\"South Antarctic Ocean\",\"region\":\"Antarctic Ocean\",\"population\":0,\"latlng\":[-54.43333333,3.4],\"demonym\":\"Norwegian\",\"area\":49.0,\"timezones\":[\"UTC+01:00\"],\"nativeName\":\"Bouvetøya\",\"numericCode\":\"074\",\"flags\":{\"svg\":\"https://flagcdn.com/bv.svg\",\"png\":\"https://flagcdn.com/w320/bv.png\"},\"currencies\":[{\"code\":\"NOK\",\"name\":\"Norwegian krone\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"no\",\"iso639_2\":\"nor\",\"name\":\"Norwegian\",\"nativeName\":\"Norsk\"},{\"iso639_1\":\"nb\",\"iso639_2\":\"nob\",\"name\":\"Norwegian Bokmål\",\"nativeName\":\"Norsk bokmål\"},{\"iso639_1\":\"nn\",\"iso639_2\":\"nno\",\"name\":\"Norwegian Nynorsk\",\"nativeName\":\"Norsk nynorsk\"}],\"translations\":{\"br\":\"Enez Bouvet\",\"pt\":\"Ilha Bouvet\",\"nl\":\"Bouveteiland\",\"hr\":\"Otok Bouvet\",\"fa\":\"جزیره بووه\",\"de\":\"Bouvetinsel\",\"es\":\"Isla Bouvet\",\"fr\":\"Île Bouvet\",\"ja\":\"ブーベ島\",\"it\":\"Isola Bouvet\",\"hu\":\"Bouvet-sziget\"},\"flag\":\"https://flagcdn.com/bv.svg\",\"independent\":false},{\"name\":\"Brazil\",\"topLevelDomain\":[\".br\"],\"alpha2Code\":\"BR\",\"alpha3Code\":\"BRA\",\"callingCodes\":[\"55\"],\"capital\":\"Brasília\",\"altSpellings\":[\"BR\",\"Brasil\",\"Federative Republic of Brazil\",\"República Federativa do Brasil\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":212559409,\"latlng\":[-10.0,-55.0],\"demonym\":\"Brazilian\",\"area\":8515767.0,\"gini\":53.4,\"timezones\":[\"UTC-05:00\",\"UTC-04:00\",\"UTC-03:00\",\"UTC-02:00\"],\"borders\":[\"ARG\",\"BOL\",\"COL\",\"FRA\",\"GUF\",\"GUY\",\"PRY\",\"PER\",\"SUR\",\"URY\",\"VEN\"],\"nativeName\":\"Brasil\",\"numericCode\":\"076\",\"flags\":{\"svg\":\"https://flagcdn.com/br.svg\",\"png\":\"https://flagcdn.com/w320/br.png\"},\"currencies\":[{\"code\":\"BRL\",\"name\":\"Brazilian real\",\"symbol\":\"R$\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Brazil\",\"pt\":\"Brasil\",\"nl\":\"Brazilië\",\"hr\":\"Brazil\",\"fa\":\"برزیل\",\"de\":\"Brasilien\",\"es\":\"Brasil\",\"fr\":\"Brésil\",\"ja\":\"ブラジル\",\"it\":\"Brasile\",\"hu\":\"Brazília\"},\"flag\":\"https://flagcdn.com/br.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"BRA\",\"independent\":true},{\"name\":\"British Indian Ocean Territory\",\"topLevelDomain\":[\".io\"],\"alpha2Code\":\"IO\",\"alpha3Code\":\"IOT\",\"callingCodes\":[\"246\"],\"capital\":\"Diego Garcia\",\"altSpellings\":[\"IO\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":3000,\"latlng\":[-6.0,71.5],\"demonym\":\"Indian\",\"area\":60.0,\"timezones\":[\"UTC+06:00\"],\"nativeName\":\"British Indian Ocean Territory\",\"numericCode\":\"086\",\"flags\":{\"svg\":\"https://flagcdn.com/io.svg\",\"png\":\"https://flagcdn.com/w320/io.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Tiriad breizhveurat Meurvor Indez\",\"pt\":\"Território Britânico do Oceano Índico\",\"nl\":\"Britse Gebieden in de Indische Oceaan\",\"hr\":\"Britanski Indijskooceanski teritorij\",\"fa\":\"قلمرو بریتانیا در اقیانوس هند\",\"de\":\"Britisches Territorium im Indischen Ozean\",\"es\":\"Territorio Británico del Océano Índico\",\"fr\":\"Territoire britannique de l'océan Indien\",\"ja\":\"イギリス領インド洋地域\",\"it\":\"Territorio britannico dell'oceano indiano\",\"hu\":\"Brit Indiai-óceáni Terület\"},\"flag\":\"https://flagcdn.com/io.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"independent\":true},{\"name\":\"United States Minor Outlying Islands\",\"topLevelDomain\":[\".us\"],\"alpha2Code\":\"UM\",\"alpha3Code\":\"UMI\",\"callingCodes\":[\"246\"],\"altSpellings\":[\"UM\"],\"subregion\":\"Northern America\",\"region\":\"Americas\",\"population\":300,\"demonym\":\"American\",\"timezones\":[\"UTC-11:00\",\"UTC-10:00\",\"UTC+12:00\"],\"nativeName\":\"United States Minor Outlying Islands\",\"numericCode\":\"581\",\"flags\":{\"svg\":\"https://flagcdn.com/um.svg\",\"png\":\"https://flagcdn.com/w320/um.png\"},\"currencies\":[{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Minor A-bell Stadoù-Unanet\",\"pt\":\"Ilhas Menores Distantes dos Estados Unidos\",\"nl\":\"Kleine afgelegen eilanden van de Verenigde Staten\",\"hr\":\"Mali udaljeni otoci SAD-a\",\"fa\":\"جزایر کوچک حاشیه‌ای ایالات متحده آمریکا\",\"de\":\"Kleinere Inselbesitzungen der Vereinigten Staaten\",\"es\":\"Islas Ultramarinas Menores de Estados Unidos\",\"fr\":\"Îles mineures éloignées des États-Unis\",\"ja\":\"合衆国領有小離島\",\"it\":\"Isole minori esterne degli Stati Uniti d'America\",\"hu\":\"Amerikai Egyesült Államok lakatlan külbirtokai\"},\"flag\":\"https://flagcdn.com/um.svg\",\"independent\":false},{\"name\":\"Virgin Islands (British)\",\"topLevelDomain\":[\".vg\"],\"alpha2Code\":\"VG\",\"alpha3Code\":\"VGB\",\"callingCodes\":[\"1\"],\"capital\":\"Road Town\",\"altSpellings\":[\"VG\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":30237,\"latlng\":[18.431383,-64.62305],\"demonym\":\"Virgin Islander\",\"area\":151.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"British Virgin Islands\",\"numericCode\":\"092\",\"flags\":{\"svg\":\"https://flagcdn.com/vg.svg\",\"png\":\"https://flagcdn.com/w320/vg.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Gwerc'h Breizhveurat\",\"pt\":\"Ilhas Virgens Britânicas\",\"nl\":\"Britse Maagdeneilanden\",\"hr\":\"Britanski Djevičanski Otoci\",\"fa\":\"جزایر ویرجین بریتانیا\",\"de\":\"Britische Jungferninseln\",\"es\":\"Islas Vírgenes del Reino Unido\",\"fr\":\"Îles Vierges britanniques\",\"ja\":\"イギリス領ヴァージン諸島\",\"it\":\"Isole Vergini Britanniche\",\"hu\":\"Brit Virgin-szigetek\"},\"flag\":\"https://flagcdn.com/vg.svg\",\"cioc\":\"IVB\",\"independent\":false},{\"name\":\"Virgin Islands (U.S.)\",\"topLevelDomain\":[\".vi\"],\"alpha2Code\":\"VI\",\"alpha3Code\":\"VIR\",\"callingCodes\":[\"1 340\"],\"capital\":\"Charlotte Amalie\",\"altSpellings\":[\"VI\",\"USVI\",\"American Virgin Islands\",\"U.S. Virgin Islands\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":106290,\"latlng\":[18.34,-64.93],\"demonym\":\"Virgin Islander\",\"area\":346.36,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Virgin Islands of the United States\",\"numericCode\":\"850\",\"flags\":{\"svg\":\"https://flagcdn.com/vi.svg\",\"png\":\"https://flagcdn.com/w320/vi.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Gwerc'h ar Stadoù-Unanet\",\"pt\":\"Ilhas Virgens Americanas\",\"nl\":\"Verenigde Staten Maagdeneilanden\",\"hr\":\"Virgin Islands (U.S.)\",\"fa\":\"جزایر ویرجین آمریکا\",\"de\":\"Amerikanische Jungferninseln\",\"es\":\"Islas Vírgenes de los Estados Unidos\",\"fr\":\"Îles Vierges des États-Unis\",\"ja\":\"アメリカ領ヴァージン諸島\",\"it\":\"Isole Vergini americane\",\"hu\":\"Amerikai Virgin-szigetek\"},\"flag\":\"https://flagcdn.com/vi.svg\",\"cioc\":\"ISV\",\"independent\":false},{\"name\":\"Brunei Darussalam\",\"topLevelDomain\":[\".bn\"],\"alpha2Code\":\"BN\",\"alpha3Code\":\"BRN\",\"callingCodes\":[\"673\"],\"capital\":\"Bandar Seri Begawan\",\"altSpellings\":[\"BN\",\"Nation of Brunei\",\" the Abode of Peace\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":437483,\"latlng\":[4.5,114.66666666],\"demonym\":\"Bruneian\",\"area\":5765.0,\"timezones\":[\"UTC+08:00\"],\"borders\":[\"MYS\"],\"nativeName\":\"Negara Brunei Darussalam\",\"numericCode\":\"096\",\"flags\":{\"svg\":\"https://flagcdn.com/bn.svg\",\"png\":\"https://flagcdn.com/w320/bn.png\"},\"currencies\":[{\"code\":\"BND\",\"name\":\"Brunei dollar\",\"symbol\":\"$\"},{\"code\":\"SGD\",\"name\":\"Singapore dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"ms\",\"iso639_2\":\"msa\",\"name\":\"Malay\",\"nativeName\":\"bahasa Melayu\"}],\"translations\":{\"br\":\"Brunei\",\"pt\":\"Brunei\",\"nl\":\"Brunei\",\"hr\":\"Brunej\",\"fa\":\"برونئی\",\"de\":\"Brunei\",\"es\":\"Brunei\",\"fr\":\"Brunei\",\"ja\":\"ブルネイ・ダルサラーム\",\"it\":\"Brunei\",\"hu\":\"Brunei\"},\"flag\":\"https://flagcdn.com/bn.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"BRU\",\"independent\":true},{\"name\":\"Bulgaria\",\"topLevelDomain\":[\".bg\"],\"alpha2Code\":\"BG\",\"alpha3Code\":\"BGR\",\"callingCodes\":[\"359\"],\"capital\":\"Sofia\",\"altSpellings\":[\"BG\",\"Republic of Bulgaria\",\"Република България\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":6927288,\"latlng\":[43.0,25.0],\"demonym\":\"Bulgarian\",\"area\":110879.0,\"gini\":41.3,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"GRC\",\"MKD\",\"ROU\",\"SRB\",\"TUR\"],\"nativeName\":\"България\",\"numericCode\":\"100\",\"flags\":{\"svg\":\"https://flagcdn.com/bg.svg\",\"png\":\"https://flagcdn.com/w320/bg.png\"},\"currencies\":[{\"code\":\"BGN\",\"name\":\"Bulgarian lev\",\"symbol\":\"лв\"}],\"languages\":[{\"iso639_1\":\"bg\",\"iso639_2\":\"bul\",\"name\":\"Bulgarian\",\"nativeName\":\"български език\"}],\"translations\":{\"br\":\"Bulgaria\",\"pt\":\"Bulgária\",\"nl\":\"Bulgarije\",\"hr\":\"Bugarska\",\"fa\":\"بلغارستان\",\"de\":\"Bulgarien\",\"es\":\"Bulgaria\",\"fr\":\"Bulgarie\",\"ja\":\"ブルガリア\",\"it\":\"Bulgaria\",\"hu\":\"Bulgária\"},\"flag\":\"https://flagcdn.com/bg.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"BUL\",\"independent\":true},{\"name\":\"Burkina Faso\",\"topLevelDomain\":[\".bf\"],\"alpha2Code\":\"BF\",\"alpha3Code\":\"BFA\",\"callingCodes\":[\"226\"],\"capital\":\"Ouagadougou\",\"altSpellings\":[\"BF\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":20903278,\"latlng\":[13.0,-2.0],\"demonym\":\"Burkinabe\",\"area\":272967.0,\"gini\":35.3,\"timezones\":[\"UTC\"],\"borders\":[\"BEN\",\"CIV\",\"GHA\",\"MLI\",\"NER\",\"TGO\"],\"nativeName\":\"Burkina Faso\",\"numericCode\":\"854\",\"flags\":{\"svg\":\"https://flagcdn.com/bf.svg\",\"png\":\"https://flagcdn.com/w320/bf.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ff\",\"iso639_2\":\"ful\",\"name\":\"Fula\",\"nativeName\":\"Fulfulde\"}],\"translations\":{\"br\":\"Burkina Faso\",\"pt\":\"Burquina Faso\",\"nl\":\"Burkina Faso\",\"hr\":\"Burkina Faso\",\"fa\":\"بورکینافاسو\",\"de\":\"Burkina Faso\",\"es\":\"Burkina Faso\",\"fr\":\"Burkina Faso\",\"ja\":\"ブルキナファソ\",\"it\":\"Burkina Faso\",\"hu\":\"Burkina Faso\"},\"flag\":\"https://flagcdn.com/bf.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"BUR\",\"independent\":true},{\"name\":\"Burundi\",\"topLevelDomain\":[\".bi\"],\"alpha2Code\":\"BI\",\"alpha3Code\":\"BDI\",\"callingCodes\":[\"257\"],\"capital\":\"Gitega\",\"altSpellings\":[\"BI\",\"Republic of Burundi\",\"Republika y'Uburundi\",\"République du Burundi\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":11890781,\"latlng\":[-3.5,30.0],\"demonym\":\"Burundian\",\"area\":27834.0,\"gini\":38.6,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"COD\",\"RWA\",\"TZA\"],\"nativeName\":\"Burundi\",\"numericCode\":\"108\",\"flags\":{\"svg\":\"https://flagcdn.com/bi.svg\",\"png\":\"https://flagcdn.com/w320/bi.png\"},\"currencies\":[{\"code\":\"BIF\",\"name\":\"Burundian franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"rn\",\"iso639_2\":\"run\",\"name\":\"Kirundi\",\"nativeName\":\"Ikirundi\"}],\"translations\":{\"br\":\"Burundi\",\"pt\":\"Burúndi\",\"nl\":\"Burundi\",\"hr\":\"Burundi\",\"fa\":\"بوروندی\",\"de\":\"Burundi\",\"es\":\"Burundi\",\"fr\":\"Burundi\",\"ja\":\"ブルンジ\",\"it\":\"Burundi\",\"hu\":\"Burundi\"},\"flag\":\"https://flagcdn.com/bi.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"BDI\",\"independent\":true},{\"name\":\"Cambodia\",\"topLevelDomain\":[\".kh\"],\"alpha2Code\":\"KH\",\"alpha3Code\":\"KHM\",\"callingCodes\":[\"855\"],\"capital\":\"Phnom Penh\",\"altSpellings\":[\"KH\",\"Kingdom of Cambodia\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":16718971,\"latlng\":[13.0,105.0],\"demonym\":\"Cambodian\",\"area\":181035.0,\"timezones\":[\"UTC+07:00\"],\"borders\":[\"LAO\",\"THA\",\"VNM\"],\"nativeName\":\"Kâmpŭchéa\",\"numericCode\":\"116\",\"flags\":{\"svg\":\"https://flagcdn.com/kh.svg\",\"png\":\"https://flagcdn.com/w320/kh.png\"},\"currencies\":[{\"code\":\"KHR\",\"name\":\"Cambodian riel\",\"symbol\":\"៛\"},{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"km\",\"iso639_2\":\"khm\",\"name\":\"Khmer\",\"nativeName\":\"ខ្មែរ\"}],\"translations\":{\"br\":\"Kambodja\",\"pt\":\"Camboja\",\"nl\":\"Cambodja\",\"hr\":\"Kambodža\",\"fa\":\"کامبوج\",\"de\":\"Kambodscha\",\"es\":\"Camboya\",\"fr\":\"Cambodge\",\"ja\":\"カンボジア\",\"it\":\"Cambogia\",\"hu\":\"Kambodzsa\"},\"flag\":\"https://flagcdn.com/kh.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"CAM\",\"independent\":true},{\"name\":\"Cameroon\",\"topLevelDomain\":[\".cm\"],\"alpha2Code\":\"CM\",\"alpha3Code\":\"CMR\",\"callingCodes\":[\"237\"],\"capital\":\"Yaoundé\",\"altSpellings\":[\"CM\",\"Republic of Cameroon\",\"République du Cameroun\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":26545864,\"latlng\":[6.0,12.0],\"demonym\":\"Cameroonian\",\"area\":475442.0,\"gini\":46.6,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"CAF\",\"TCD\",\"COG\",\"GNQ\",\"GAB\",\"NGA\"],\"nativeName\":\"Cameroon\",\"numericCode\":\"120\",\"flags\":{\"svg\":\"https://flagcdn.com/cm.svg\",\"png\":\"https://flagcdn.com/w320/cm.png\"},\"currencies\":[{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Kameroun\",\"pt\":\"Camarões\",\"nl\":\"Kameroen\",\"hr\":\"Kamerun\",\"fa\":\"کامرون\",\"de\":\"Kamerun\",\"es\":\"Camerún\",\"fr\":\"Cameroun\",\"ja\":\"カメルーン\",\"it\":\"Camerun\",\"hu\":\"Kamerun\"},\"flag\":\"https://flagcdn.com/cm.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"CMR\",\"independent\":true},{\"name\":\"Canada\",\"topLevelDomain\":[\".ca\"],\"alpha2Code\":\"CA\",\"alpha3Code\":\"CAN\",\"callingCodes\":[\"1\"],\"capital\":\"Ottawa\",\"altSpellings\":[\"CA\"],\"subregion\":\"Northern America\",\"region\":\"Americas\",\"population\":38005238,\"latlng\":[60.0,-95.0],\"demonym\":\"Canadian\",\"area\":9984670.0,\"gini\":33.3,\"timezones\":[\"UTC-08:00\",\"UTC-07:00\",\"UTC-06:00\",\"UTC-05:00\",\"UTC-04:00\",\"UTC-03:30\"],\"borders\":[\"USA\"],\"nativeName\":\"Canada\",\"numericCode\":\"124\",\"flags\":{\"svg\":\"https://flagcdn.com/ca.svg\",\"png\":\"https://flagcdn.com/w320/ca.png\"},\"currencies\":[{\"code\":\"CAD\",\"name\":\"Canadian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Kanada\",\"pt\":\"Canadá\",\"nl\":\"Canada\",\"hr\":\"Kanada\",\"fa\":\"کانادا\",\"de\":\"Kanada\",\"es\":\"Canadá\",\"fr\":\"Canada\",\"ja\":\"カナダ\",\"it\":\"Canada\",\"hu\":\"Kanada\"},\"flag\":\"https://flagcdn.com/ca.svg\",\"regionalBlocs\":[{\"acronym\":\"NAFTA\",\"name\":\"North American Free Trade Agreement\",\"otherNames\":[\"Tratado de Libre Comercio de América del Norte\",\"Accord de Libre-échange Nord-Américain\"]}],\"cioc\":\"CAN\",\"independent\":true},{\"name\":\"Cabo Verde\",\"topLevelDomain\":[\".cv\"],\"alpha2Code\":\"CV\",\"alpha3Code\":\"CPV\",\"callingCodes\":[\"238\"],\"capital\":\"Praia\",\"altSpellings\":[\"CV\",\"Republic of Cabo Verde\",\"República de Cabo Verde\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":555988,\"latlng\":[16.0,-24.0],\"demonym\":\"Cape Verdian\",\"area\":4033.0,\"gini\":42.4,\"timezones\":[\"UTC-01:00\"],\"nativeName\":\"Cabo Verde\",\"numericCode\":\"132\",\"flags\":{\"svg\":\"https://flagcdn.com/cv.svg\",\"png\":\"https://flagcdn.com/w320/cv.png\"},\"currencies\":[{\"code\":\"CVE\",\"name\":\"Cape Verdean escudo\",\"symbol\":\"Esc\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Kab Glas\",\"pt\":\"Cabo Verde\",\"nl\":\"Kaapverdië\",\"hr\":\"Zelenortska Republika\",\"fa\":\"کیپ ورد\",\"de\":\"Kap Verde\",\"es\":\"Cabo Verde\",\"fr\":\"Cap Vert\",\"ja\":\"カーボベルデ\",\"it\":\"Capo Verde\",\"hu\":\"Zöld-foki Köztársaság\"},\"flag\":\"https://flagcdn.com/cv.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"CPV\",\"independent\":true},{\"name\":\"Cayman Islands\",\"topLevelDomain\":[\".ky\"],\"alpha2Code\":\"KY\",\"alpha3Code\":\"CYM\",\"callingCodes\":[\"1\"],\"capital\":\"George Town\",\"altSpellings\":[\"KY\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":65720,\"latlng\":[19.5,-80.5],\"demonym\":\"Caymanian\",\"area\":264.0,\"timezones\":[\"UTC-05:00\"],\"nativeName\":\"Cayman Islands\",\"numericCode\":\"136\",\"flags\":{\"svg\":\"https://flagcdn.com/ky.svg\",\"png\":\"https://flagcdn.com/w320/ky.png\"},\"currencies\":[{\"code\":\"KYD\",\"name\":\"Cayman Islands dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Cayman\",\"pt\":\"Ilhas Caimão\",\"nl\":\"Caymaneilanden\",\"hr\":\"Kajmanski otoci\",\"fa\":\"جزایر کیمن\",\"de\":\"Kaimaninseln\",\"es\":\"Islas Caimán\",\"fr\":\"Îles Caïmans\",\"ja\":\"ケイマン諸島\",\"it\":\"Isole Cayman\",\"hu\":\"Kajmán-szigetek\"},\"flag\":\"https://flagcdn.com/ky.svg\",\"cioc\":\"CAY\",\"independent\":false},{\"name\":\"Central African Republic\",\"topLevelDomain\":[\".cf\"],\"alpha2Code\":\"CF\",\"alpha3Code\":\"CAF\",\"callingCodes\":[\"236\"],\"capital\":\"Bangui\",\"altSpellings\":[\"CF\",\"Central African Republic\",\"République centrafricaine\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":4829764,\"latlng\":[7.0,21.0],\"demonym\":\"Central African\",\"area\":622984.0,\"gini\":56.2,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"CMR\",\"TCD\",\"COD\",\"COG\",\"SSD\",\"SDN\"],\"nativeName\":\"Ködörösêse tî Bêafrîka\",\"numericCode\":\"140\",\"flags\":{\"svg\":\"https://flagcdn.com/cf.svg\",\"png\":\"https://flagcdn.com/w320/cf.png\"},\"currencies\":[{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"sg\",\"iso639_2\":\"sag\",\"name\":\"Sango\",\"nativeName\":\"yângâ tî sängö\"}],\"translations\":{\"br\":\"Republik Kreizafrikan\",\"pt\":\"República Centro-Africana\",\"nl\":\"Centraal-Afrikaanse Republiek\",\"hr\":\"Srednjoafrička Republika\",\"fa\":\"جمهوری آفریقای مرکزی\",\"de\":\"Zentralafrikanische Republik\",\"es\":\"República Centroafricana\",\"fr\":\"République centrafricaine\",\"ja\":\"中央アフリカ共和国\",\"it\":\"Repubblica Centrafricana\",\"hu\":\"Közép-afrikai Köztársaság\"},\"flag\":\"https://flagcdn.com/cf.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"CAF\",\"independent\":true},{\"name\":\"Chad\",\"topLevelDomain\":[\".td\"],\"alpha2Code\":\"TD\",\"alpha3Code\":\"TCD\",\"callingCodes\":[\"235\"],\"capital\":\"N'Djamena\",\"altSpellings\":[\"TD\",\"Tchad\",\"Republic of Chad\",\"République du Tchad\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":16425859,\"latlng\":[15.0,19.0],\"demonym\":\"Chadian\",\"area\":1284000.0,\"gini\":43.3,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"CMR\",\"CAF\",\"LBY\",\"NER\",\"NGA\",\"SDN\"],\"nativeName\":\"Tchad\",\"numericCode\":\"148\",\"flags\":{\"svg\":\"https://flagcdn.com/td.svg\",\"png\":\"https://flagcdn.com/w320/td.png\"},\"currencies\":[{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Tchad\",\"pt\":\"Chade\",\"nl\":\"Tsjaad\",\"hr\":\"Čad\",\"fa\":\"چاد\",\"de\":\"Tschad\",\"es\":\"Chad\",\"fr\":\"Tchad\",\"ja\":\"チャド\",\"it\":\"Ciad\",\"hu\":\"Csád\"},\"flag\":\"https://flagcdn.com/td.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"CHA\",\"independent\":true},{\"name\":\"Chile\",\"topLevelDomain\":[\".cl\"],\"alpha2Code\":\"CL\",\"alpha3Code\":\"CHL\",\"callingCodes\":[\"56\"],\"capital\":\"Santiago\",\"altSpellings\":[\"CL\",\"Republic of Chile\",\"República de Chile\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":19116209,\"latlng\":[-30.0,-71.0],\"demonym\":\"Chilean\",\"area\":756102.0,\"gini\":44.4,\"timezones\":[\"UTC-06:00\",\"UTC-04:00\"],\"borders\":[\"ARG\",\"BOL\",\"PER\"],\"nativeName\":\"Chile\",\"numericCode\":\"152\",\"flags\":{\"svg\":\"https://flagcdn.com/cl.svg\",\"png\":\"https://flagcdn.com/w320/cl.png\"},\"currencies\":[{\"code\":\"CLP\",\"name\":\"Chilean peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Chile\",\"pt\":\"Chile\",\"nl\":\"Chili\",\"hr\":\"Čile\",\"fa\":\"شیلی\",\"de\":\"Chile\",\"es\":\"Chile\",\"fr\":\"Chili\",\"ja\":\"チリ\",\"it\":\"Cile\",\"hu\":\"Chile\"},\"flag\":\"https://flagcdn.com/cl.svg\",\"regionalBlocs\":[{\"acronym\":\"PA\",\"name\":\"Pacific Alliance\",\"otherNames\":[\"Alianza del Pacífico\"]},{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"CHI\",\"independent\":true},{\"name\":\"China\",\"topLevelDomain\":[\".cn\"],\"alpha2Code\":\"CN\",\"alpha3Code\":\"CHN\",\"callingCodes\":[\"86\"],\"capital\":\"Beijing\",\"altSpellings\":[\"CN\",\"Zhōngguó\",\"Zhongguo\",\"Zhonghua\",\"People's Republic of China\",\"中华人民共和国\",\"Zhōnghuá Rénmín Gònghéguó\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":1402112000,\"latlng\":[35.0,105.0],\"demonym\":\"Chinese\",\"area\":9640011.0,\"gini\":38.5,\"timezones\":[\"UTC+08:00\"],\"borders\":[\"AFG\",\"BTN\",\"MMR\",\"HKG\",\"IND\",\"KAZ\",\"PRK\",\"KGZ\",\"LAO\",\"MAC\",\"MNG\",\"PAK\",\"RUS\",\"TJK\",\"VNM\",\"NPL\"],\"nativeName\":\"中国\",\"numericCode\":\"156\",\"flags\":{\"svg\":\"https://flagcdn.com/cn.svg\",\"png\":\"https://flagcdn.com/w320/cn.png\"},\"currencies\":[{\"code\":\"CNY\",\"name\":\"Chinese yuan\",\"symbol\":\"¥\"}],\"languages\":[{\"iso639_1\":\"zh\",\"iso639_2\":\"zho\",\"name\":\"Chinese\",\"nativeName\":\"中文 (Zhōngwén)\"}],\"translations\":{\"br\":\"Sina\",\"pt\":\"China\",\"nl\":\"China\",\"hr\":\"Kina\",\"fa\":\"چین\",\"de\":\"China\",\"es\":\"China\",\"fr\":\"Chine\",\"ja\":\"中国\",\"it\":\"Cina\",\"hu\":\"Kína\"},\"flag\":\"https://flagcdn.com/cn.svg\",\"cioc\":\"CHN\",\"independent\":true},{\"name\":\"Christmas Island\",\"topLevelDomain\":[\".cx\"],\"alpha2Code\":\"CX\",\"alpha3Code\":\"CXR\",\"callingCodes\":[\"61\"],\"capital\":\"Flying Fish Cove\",\"altSpellings\":[\"CX\",\"Territory of Christmas Island\"],\"subregion\":\"Australia and New Zealand\",\"region\":\"Oceania\",\"population\":2072,\"latlng\":[-10.5,105.66666666],\"demonym\":\"Christmas Island\",\"area\":135.0,\"timezones\":[\"UTC+07:00\"],\"nativeName\":\"Christmas Island\",\"numericCode\":\"162\",\"flags\":{\"svg\":\"https://flagcdn.com/cx.svg\",\"png\":\"https://flagcdn.com/w320/cx.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Enez Christmas\",\"pt\":\"Ilha do Natal\",\"nl\":\"Christmaseiland\",\"hr\":\"Božićni otok\",\"fa\":\"جزیره کریسمس\",\"de\":\"Weihnachtsinsel\",\"es\":\"Isla de Navidad\",\"fr\":\"Île Christmas\",\"ja\":\"クリスマス島\",\"it\":\"Isola di Natale\",\"hu\":\"Karácsony-sziget\"},\"flag\":\"https://flagcdn.com/cx.svg\",\"independent\":false},{\"name\":\"Cocos (Keeling) Islands\",\"topLevelDomain\":[\".cc\"],\"alpha2Code\":\"CC\",\"alpha3Code\":\"CCK\",\"callingCodes\":[\"61\"],\"capital\":\"West Island\",\"altSpellings\":[\"CC\",\"Territory of the Cocos (Keeling) Islands\",\"Keeling Islands\"],\"subregion\":\"Australia and New Zealand\",\"region\":\"Oceania\",\"population\":550,\"latlng\":[-12.5,96.83333333],\"demonym\":\"Cocos Islander\",\"area\":14.0,\"timezones\":[\"UTC+06:30\"],\"nativeName\":\"Cocos (Keeling) Islands\",\"numericCode\":\"166\",\"flags\":{\"svg\":\"https://flagcdn.com/cc.svg\",\"png\":\"https://flagcdn.com/w320/cc.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Cocos (Keeling)\",\"pt\":\"Ilhas dos Cocos\",\"nl\":\"Cocoseilanden\",\"hr\":\"Kokosovi Otoci\",\"fa\":\"جزایر کوکوس\",\"de\":\"Kokosinseln\",\"es\":\"Islas Cocos o Islas Keeling\",\"fr\":\"Îles Cocos\",\"ja\":\"ココス（キーリング）諸島\",\"it\":\"Isole Cocos e Keeling\",\"hu\":\"Kókusz-szigetek\"},\"flag\":\"https://flagcdn.com/cc.svg\",\"independent\":false},{\"name\":\"Colombia\",\"topLevelDomain\":[\".co\"],\"alpha2Code\":\"CO\",\"alpha3Code\":\"COL\",\"callingCodes\":[\"57\"],\"capital\":\"Bogotá\",\"altSpellings\":[\"CO\",\"Republic of Colombia\",\"República de Colombia\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":50882884,\"latlng\":[4.0,-72.0],\"demonym\":\"Colombian\",\"area\":1141748.0,\"gini\":51.3,\"timezones\":[\"UTC-05:00\"],\"borders\":[\"BRA\",\"ECU\",\"PAN\",\"PER\",\"VEN\"],\"nativeName\":\"Colombia\",\"numericCode\":\"170\",\"flags\":{\"svg\":\"https://flagcdn.com/co.svg\",\"png\":\"https://flagcdn.com/w320/co.png\"},\"currencies\":[{\"code\":\"COP\",\"name\":\"Colombian peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Kolombia\",\"pt\":\"Colômbia\",\"nl\":\"Colombia\",\"hr\":\"Kolumbija\",\"fa\":\"کلمبیا\",\"de\":\"Kolumbien\",\"es\":\"Colombia\",\"fr\":\"Colombie\",\"ja\":\"コロンビア\",\"it\":\"Colombia\",\"hu\":\"Kolumbia\"},\"flag\":\"https://flagcdn.com/co.svg\",\"regionalBlocs\":[{\"acronym\":\"PA\",\"name\":\"Pacific Alliance\",\"otherNames\":[\"Alianza del Pacífico\"]},{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"COL\",\"independent\":true},{\"name\":\"Comoros\",\"topLevelDomain\":[\".km\"],\"alpha2Code\":\"KM\",\"alpha3Code\":\"COM\",\"callingCodes\":[\"269\"],\"capital\":\"Moroni\",\"altSpellings\":[\"KM\",\"Union of the Comoros\",\"Union des Comores\",\"Udzima wa Komori\",\"al-Ittiḥād al-Qumurī\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":869595,\"latlng\":[-12.16666666,44.25],\"demonym\":\"Comoran\",\"area\":1862.0,\"gini\":45.3,\"timezones\":[\"UTC+03:00\"],\"nativeName\":\"Komori\",\"numericCode\":\"174\",\"flags\":{\"svg\":\"https://flagcdn.com/km.svg\",\"png\":\"https://flagcdn.com/w320/km.png\"},\"currencies\":[{\"code\":\"KMF\",\"name\":\"Comorian franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Komorez\",\"pt\":\"Comores\",\"nl\":\"Comoren\",\"hr\":\"Komori\",\"fa\":\"کومور\",\"de\":\"Union der Komoren\",\"es\":\"Comoras\",\"fr\":\"Comores\",\"ja\":\"コモロ\",\"it\":\"Comore\",\"hu\":\"Comore-szigetek\"},\"flag\":\"https://flagcdn.com/km.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"COM\",\"independent\":true},{\"name\":\"Congo\",\"topLevelDomain\":[\".cg\"],\"alpha2Code\":\"CG\",\"alpha3Code\":\"COG\",\"callingCodes\":[\"242\"],\"capital\":\"Brazzaville\",\"altSpellings\":[\"CG\",\"Congo-Brazzaville\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":5518092,\"latlng\":[-1.0,15.0],\"demonym\":\"Congolese\",\"area\":342000.0,\"gini\":48.9,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AGO\",\"CMR\",\"CAF\",\"COD\",\"GAB\"],\"nativeName\":\"République du Congo\",\"numericCode\":\"178\",\"flags\":{\"svg\":\"https://flagcdn.com/cg.svg\",\"png\":\"https://flagcdn.com/w320/cg.png\"},\"currencies\":[{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ln\",\"iso639_2\":\"lin\",\"name\":\"Lingala\",\"nativeName\":\"Lingála\"}],\"translations\":{\"br\":\"Kongo-Brazzaville\",\"pt\":\"Congo\",\"nl\":\"Congo [Republiek]\",\"hr\":\"Kongo\",\"fa\":\"کنگو\",\"de\":\"Kongo\",\"es\":\"Congo\",\"fr\":\"Congo\",\"ja\":\"コンゴ共和国\",\"it\":\"Congo\",\"hu\":\"Kongói Köztársaság\"},\"flag\":\"https://flagcdn.com/cg.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"CGO\",\"independent\":true},{\"name\":\"Congo (Democratic Republic of the)\",\"topLevelDomain\":[\".cd\"],\"alpha2Code\":\"CD\",\"alpha3Code\":\"COD\",\"callingCodes\":[\"243\"],\"capital\":\"Kinshasa\",\"altSpellings\":[\"CD\",\"DR Congo\",\"Congo-Kinshasa\",\"DRC\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":89561404,\"latlng\":[0.0,25.0],\"demonym\":\"Congolese\",\"area\":2344858.0,\"gini\":42.1,\"timezones\":[\"UTC+01:00\",\"UTC+02:00\"],\"borders\":[\"AGO\",\"BDI\",\"CAF\",\"COG\",\"RWA\",\"SSD\",\"TZA\",\"UGA\",\"ZMB\"],\"nativeName\":\"République démocratique du Congo\",\"numericCode\":\"180\",\"flags\":{\"svg\":\"https://flagcdn.com/cd.svg\",\"png\":\"https://flagcdn.com/w320/cd.png\"},\"currencies\":[{\"code\":\"CDF\",\"name\":\"Congolese franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ln\",\"iso639_2\":\"lin\",\"name\":\"Lingala\",\"nativeName\":\"Lingála\"},{\"iso639_1\":\"kg\",\"iso639_2\":\"kon\",\"name\":\"Kongo\",\"nativeName\":\"Kikongo\"},{\"iso639_1\":\"sw\",\"iso639_2\":\"swa\",\"name\":\"Swahili\",\"nativeName\":\"Kiswahili\"},{\"iso639_1\":\"lu\",\"iso639_2\":\"lub\",\"name\":\"Luba-Katanga\",\"nativeName\":\"Tshiluba\"}],\"translations\":{\"br\":\"Kongo-Kinshasa\",\"pt\":\"RD Congo\",\"nl\":\"Congo [DRC]\",\"hr\":\"Kongo, Demokratska Republika\",\"fa\":\"جمهوری کنگو\",\"de\":\"Kongo (Dem. Rep.)\",\"es\":\"Congo (Rep. Dem.)\",\"fr\":\"Congo (Rép. dém.)\",\"ja\":\"コンゴ民主共和国\",\"it\":\"Congo (Rep. Dem.)\",\"hu\":\"Kongói Demokratikus Köztársaság\"},\"flag\":\"https://flagcdn.com/cd.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"COD\",\"independent\":true},{\"name\":\"Cook Islands\",\"topLevelDomain\":[\".ck\"],\"alpha2Code\":\"CK\",\"alpha3Code\":\"COK\",\"callingCodes\":[\"682\"],\"capital\":\"Avarua\",\"altSpellings\":[\"CK\",\"Kūki 'Āirani\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":18100,\"latlng\":[-21.23333333,-159.76666666],\"demonym\":\"Cook Islander\",\"area\":236.0,\"timezones\":[\"UTC-10:00\"],\"nativeName\":\"Cook Islands\",\"numericCode\":\"184\",\"flags\":{\"svg\":\"https://flagcdn.com/ck.svg\",\"png\":\"https://flagcdn.com/w320/ck.png\"},\"currencies\":[{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"},{\"code\":\"CKD\",\"name\":\"Cook Islands dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_2\":\"rar\",\"name\":\"Cook Islands Māori\",\"nativeName\":\"Māori\"}],\"translations\":{\"br\":\"Inizi Cook\",\"pt\":\"Ilhas Cook\",\"nl\":\"Cookeilanden\",\"hr\":\"Cookovo Otočje\",\"fa\":\"جزایر کوک\",\"de\":\"Cookinseln\",\"es\":\"Islas Cook\",\"fr\":\"Îles Cook\",\"ja\":\"クック諸島\",\"it\":\"Isole Cook\",\"hu\":\"Cook-szigetek\"},\"flag\":\"https://flagcdn.com/ck.svg\",\"cioc\":\"COK\",\"independent\":true},{\"name\":\"Costa Rica\",\"topLevelDomain\":[\".cr\"],\"alpha2Code\":\"CR\",\"alpha3Code\":\"CRI\",\"callingCodes\":[\"506\"],\"capital\":\"San José\",\"altSpellings\":[\"CR\",\"Republic of Costa Rica\",\"República de Costa Rica\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":5094114,\"latlng\":[10.0,-84.0],\"demonym\":\"Costa Rican\",\"area\":51100.0,\"gini\":48.2,\"timezones\":[\"UTC-06:00\"],\"borders\":[\"NIC\",\"PAN\"],\"nativeName\":\"Costa Rica\",\"numericCode\":\"188\",\"flags\":{\"svg\":\"https://flagcdn.com/cr.svg\",\"png\":\"https://flagcdn.com/w320/cr.png\"},\"currencies\":[{\"code\":\"CRC\",\"name\":\"Costa Rican colón\",\"symbol\":\"₡\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Costa Rica\",\"pt\":\"Costa Rica\",\"nl\":\"Costa Rica\",\"hr\":\"Kostarika\",\"fa\":\"کاستاریکا\",\"de\":\"Costa Rica\",\"es\":\"Costa Rica\",\"fr\":\"Costa Rica\",\"ja\":\"コスタリカ\",\"it\":\"Costa Rica\",\"hu\":\"Costa Rica\"},\"flag\":\"https://flagcdn.com/cr.svg\",\"regionalBlocs\":[{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"CRC\",\"independent\":true},{\"name\":\"Croatia\",\"topLevelDomain\":[\".hr\"],\"alpha2Code\":\"HR\",\"alpha3Code\":\"HRV\",\"callingCodes\":[\"385\"],\"capital\":\"Zagreb\",\"altSpellings\":[\"HR\",\"Hrvatska\",\"Republic of Croatia\",\"Republika Hrvatska\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":4047200,\"latlng\":[45.16666666,15.5],\"demonym\":\"Croatian\",\"area\":56594.0,\"gini\":29.7,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"BIH\",\"HUN\",\"MNE\",\"SRB\",\"SVN\"],\"nativeName\":\"Hrvatska\",\"numericCode\":\"191\",\"flags\":{\"svg\":\"https://flagcdn.com/hr.svg\",\"png\":\"https://flagcdn.com/w320/hr.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"hr\",\"iso639_2\":\"hrv\",\"name\":\"Croatian\",\"nativeName\":\"hrvatski jezik\"}],\"translations\":{\"br\":\"Kroatia\",\"pt\":\"Croácia\",\"nl\":\"Kroatië\",\"hr\":\"Hrvatska\",\"fa\":\"کرواسی\",\"de\":\"Kroatien\",\"es\":\"Croacia\",\"fr\":\"Croatie\",\"ja\":\"クロアチア\",\"it\":\"Croazia\",\"hu\":\"Horvátország\"},\"flag\":\"https://flagcdn.com/hr.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"CRO\",\"independent\":true},{\"name\":\"Cuba\",\"topLevelDomain\":[\".cu\"],\"alpha2Code\":\"CU\",\"alpha3Code\":\"CUB\",\"callingCodes\":[\"53\"],\"capital\":\"Havana\",\"altSpellings\":[\"CU\",\"Republic of Cuba\",\"República de Cuba\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":11326616,\"latlng\":[21.5,-80.0],\"demonym\":\"Cuban\",\"area\":109884.0,\"timezones\":[\"UTC-05:00\"],\"nativeName\":\"Cuba\",\"numericCode\":\"192\",\"flags\":{\"svg\":\"https://flagcdn.com/cu.svg\",\"png\":\"https://flagcdn.com/w320/cu.png\"},\"currencies\":[{\"code\":\"CUC\",\"name\":\"Cuban convertible peso\",\"symbol\":\"$\"},{\"code\":\"CUP\",\"name\":\"Cuban peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Kuba\",\"pt\":\"Cuba\",\"nl\":\"Cuba\",\"hr\":\"Kuba\",\"fa\":\"کوبا\",\"de\":\"Kuba\",\"es\":\"Cuba\",\"fr\":\"Cuba\",\"ja\":\"キューバ\",\"it\":\"Cuba\",\"hu\":\"Kuba\"},\"flag\":\"https://flagcdn.com/cu.svg\",\"cioc\":\"CUB\",\"independent\":true},{\"name\":\"Curaçao\",\"topLevelDomain\":[\".cw\"],\"alpha2Code\":\"CW\",\"alpha3Code\":\"CUW\",\"callingCodes\":[\"599\"],\"capital\":\"Willemstad\",\"altSpellings\":[\"CW\",\"Curacao\",\"Kòrsou\",\"Country of Curaçao\",\"Land Curaçao\",\"Pais Kòrsou\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":155014,\"latlng\":[12.116667,-68.933333],\"demonym\":\"Dutch\",\"area\":444.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Curaçao\",\"numericCode\":\"531\",\"flags\":{\"svg\":\"https://flagcdn.com/cw.svg\",\"png\":\"https://flagcdn.com/w320/cw.png\"},\"currencies\":[{\"code\":\"ANG\",\"name\":\"Netherlands Antillean guilder\",\"symbol\":\"ƒ\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"},{\"iso639_1\":\"pa\",\"iso639_2\":\"pan\",\"name\":\"(Eastern) Punjabi\",\"nativeName\":\"ਪੰਜਾਬੀ\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Curaçao\",\"pt\":\"Curaçao\",\"nl\":\"Curaçao\",\"hr\":\"Curaçao\",\"fa\":\"کوراسائو\",\"de\":\"Curaçao\",\"es\":\"Curaçao\",\"fr\":\"Curaçao\",\"ja\":\"Curaçao\",\"it\":\"Curaçao\",\"hu\":\"Curaçao\"},\"flag\":\"https://flagcdn.com/cw.svg\",\"independent\":false},{\"name\":\"Cyprus\",\"topLevelDomain\":[\".cy\"],\"alpha2Code\":\"CY\",\"alpha3Code\":\"CYP\",\"callingCodes\":[\"357\"],\"capital\":\"Nicosia\",\"altSpellings\":[\"CY\",\"Kýpros\",\"Kıbrıs\",\"Republic of Cyprus\",\"Κυπριακή Δημοκρατία\",\"Kıbrıs Cumhuriyeti\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":1207361,\"latlng\":[35.0,33.0],\"demonym\":\"Cypriot\",\"area\":9251.0,\"gini\":32.7,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"GBR\"],\"nativeName\":\"Κύπρος\",\"numericCode\":\"196\",\"flags\":{\"svg\":\"https://flagcdn.com/cy.svg\",\"png\":\"https://flagcdn.com/w320/cy.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"el\",\"iso639_2\":\"ell\",\"name\":\"Greek (modern)\",\"nativeName\":\"ελληνικά\"},{\"iso639_1\":\"tr\",\"iso639_2\":\"tur\",\"name\":\"Turkish\",\"nativeName\":\"Türkçe\"},{\"iso639_1\":\"hy\",\"iso639_2\":\"hye\",\"name\":\"Armenian\",\"nativeName\":\"Հայերեն\"}],\"translations\":{\"br\":\"Kiprenez\",\"pt\":\"Chipre\",\"nl\":\"Cyprus\",\"hr\":\"Cipar\",\"fa\":\"قبرس\",\"de\":\"Zypern\",\"es\":\"Chipre\",\"fr\":\"Chypre\",\"ja\":\"キプロス\",\"it\":\"Cipro\",\"hu\":\"Ciprus\"},\"flag\":\"https://flagcdn.com/cy.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"CYP\",\"independent\":true},{\"name\":\"Czech Republic\",\"topLevelDomain\":[\".cz\"],\"alpha2Code\":\"CZ\",\"alpha3Code\":\"CZE\",\"callingCodes\":[\"420\"],\"capital\":\"Prague\",\"altSpellings\":[\"CZ\",\"Česká republika\",\"Česko\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":10698896,\"latlng\":[49.75,15.5],\"demonym\":\"Czech\",\"area\":78865.0,\"gini\":25.0,\"timezones\":[\"UTC+01:00\"],\"nativeName\":\"Česká republika\",\"numericCode\":\"203\",\"flags\":{\"svg\":\"https://flagcdn.com/cz.svg\",\"png\":\"https://flagcdn.com/w320/cz.png\"},\"currencies\":[{\"code\":\"CZK\",\"name\":\"Czech koruna\",\"symbol\":\"Kč\"}],\"languages\":[{\"iso639_1\":\"cs\",\"iso639_2\":\"ces\",\"name\":\"Czech\",\"nativeName\":\"čeština\"},{\"iso639_1\":\"sk\",\"iso639_2\":\"slk\",\"name\":\"Slovak\",\"nativeName\":\"slovenčina\"}],\"translations\":{\"br\":\"Tchekia\",\"pt\":\"República Checa\",\"nl\":\"Tsjechië\",\"hr\":\"Češka\",\"fa\":\"جمهوری چک\",\"de\":\"Tschechische Republik\",\"es\":\"República Checa\",\"fr\":\"République tchèque\",\"ja\":\"チェコ\",\"it\":\"Repubblica Ceca\",\"hu\":\"Csehország\"},\"flag\":\"https://flagcdn.com/cz.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"CZE\",\"independent\":true},{\"name\":\"Denmark\",\"topLevelDomain\":[\".dk\"],\"alpha2Code\":\"DK\",\"alpha3Code\":\"DNK\",\"callingCodes\":[\"45\"],\"capital\":\"Copenhagen\",\"altSpellings\":[\"DK\",\"Danmark\",\"Kingdom of Denmark\",\"Kongeriget Danmark\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":5831404,\"latlng\":[56.0,10.0],\"demonym\":\"Danish\",\"area\":43094.0,\"gini\":28.2,\"timezones\":[\"UTC-04:00\",\"UTC-03:00\",\"UTC-01:00\",\"UTC\",\"UTC+01:00\"],\"borders\":[\"DEU\"],\"nativeName\":\"Danmark\",\"numericCode\":\"208\",\"flags\":{\"svg\":\"https://flagcdn.com/dk.svg\",\"png\":\"https://flagcdn.com/w320/dk.png\"},\"currencies\":[{\"code\":\"DKK\",\"name\":\"Danish krone\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"da\",\"iso639_2\":\"dan\",\"name\":\"Danish\",\"nativeName\":\"dansk\"}],\"translations\":{\"br\":\"Danmark\",\"pt\":\"Dinamarca\",\"nl\":\"Denemarken\",\"hr\":\"Danska\",\"fa\":\"دانمارک\",\"de\":\"Dänemark\",\"es\":\"Dinamarca\",\"fr\":\"Danemark\",\"ja\":\"デンマーク\",\"it\":\"Danimarca\",\"hu\":\"Dánia\"},\"flag\":\"https://flagcdn.com/dk.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"DEN\",\"independent\":true},{\"name\":\"Djibouti\",\"topLevelDomain\":[\".dj\"],\"alpha2Code\":\"DJ\",\"alpha3Code\":\"DJI\",\"callingCodes\":[\"253\"],\"capital\":\"Djibouti\",\"altSpellings\":[\"DJ\",\"Jabuuti\",\"Gabuuti\",\"Republic of Djibouti\",\"République de Djibouti\",\"Gabuutih Ummuuno\",\"Jamhuuriyadda Jabuuti\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":988002,\"latlng\":[11.5,43.0],\"demonym\":\"Djibouti\",\"area\":23200.0,\"gini\":41.6,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"ERI\",\"ETH\",\"SOM\"],\"nativeName\":\"Djibouti\",\"numericCode\":\"262\",\"flags\":{\"svg\":\"https://flagcdn.com/dj.svg\",\"png\":\"https://flagcdn.com/w320/dj.png\"},\"currencies\":[{\"code\":\"DJF\",\"name\":\"Djiboutian franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Djibouti\",\"pt\":\"Djibuti\",\"nl\":\"Djibouti\",\"hr\":\"Džibuti\",\"fa\":\"جیبوتی\",\"de\":\"Dschibuti\",\"es\":\"Yibuti\",\"fr\":\"Djibouti\",\"ja\":\"ジブチ\",\"it\":\"Gibuti\",\"hu\":\"Dzsibuti\"},\"flag\":\"https://flagcdn.com/dj.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"DJI\",\"independent\":true},{\"name\":\"Dominica\",\"topLevelDomain\":[\".dm\"],\"alpha2Code\":\"DM\",\"alpha3Code\":\"DMA\",\"callingCodes\":[\"1\"],\"capital\":\"Roseau\",\"altSpellings\":[\"DM\",\"Dominique\",\"Wai‘tu kubuli\",\"Commonwealth of Dominica\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":71991,\"latlng\":[15.41666666,-61.33333333],\"demonym\":\"Dominican\",\"area\":751.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Dominica\",\"numericCode\":\"212\",\"flags\":{\"svg\":\"https://flagcdn.com/dm.svg\",\"png\":\"https://flagcdn.com/w320/dm.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Dominika\",\"pt\":\"Dominica\",\"nl\":\"Dominica\",\"hr\":\"Dominika\",\"fa\":\"دومینیکا\",\"de\":\"Dominica\",\"es\":\"Dominica\",\"fr\":\"Dominique\",\"ja\":\"ドミニカ国\",\"it\":\"Dominica\",\"hu\":\"Dominikai Közösség\"},\"flag\":\"https://flagcdn.com/dm.svg\",\"cioc\":\"DMA\",\"independent\":true},{\"name\":\"Dominican Republic\",\"topLevelDomain\":[\".do\"],\"alpha2Code\":\"DO\",\"alpha3Code\":\"DOM\",\"callingCodes\":[\"1\"],\"capital\":\"Santo Domingo\",\"altSpellings\":[\"DO\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":10847904,\"latlng\":[19.0,-70.66666666],\"demonym\":\"Dominican\",\"area\":48671.0,\"gini\":41.9,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"HTI\"],\"nativeName\":\"República Dominicana\",\"numericCode\":\"214\",\"flags\":{\"svg\":\"https://flagcdn.com/do.svg\",\"png\":\"https://flagcdn.com/w320/do.png\"},\"currencies\":[{\"code\":\"DOP\",\"name\":\"Dominican peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Republik Dominikan\",\"pt\":\"República Dominicana\",\"nl\":\"Dominicaanse Republiek\",\"hr\":\"Dominikanska Republika\",\"fa\":\"جمهوری دومینیکن\",\"de\":\"Dominikanische Republik\",\"es\":\"República Dominicana\",\"fr\":\"République dominicaine\",\"ja\":\"ドミニカ共和国\",\"it\":\"Repubblica Dominicana\",\"hu\":\"Dominikai Köztársaság\"},\"flag\":\"https://flagcdn.com/do.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]},{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"DOM\",\"independent\":true},{\"name\":\"Ecuador\",\"topLevelDomain\":[\".ec\"],\"alpha2Code\":\"EC\",\"alpha3Code\":\"ECU\",\"callingCodes\":[\"593\"],\"capital\":\"Quito\",\"altSpellings\":[\"EC\",\"Republic of Ecuador\",\"República del Ecuador\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":17643060,\"latlng\":[-2.0,-77.5],\"demonym\":\"Ecuadorean\",\"area\":276841.0,\"gini\":45.7,\"timezones\":[\"UTC-06:00\",\"UTC-05:00\"],\"borders\":[\"COL\",\"PER\"],\"nativeName\":\"Ecuador\",\"numericCode\":\"218\",\"flags\":{\"svg\":\"https://flagcdn.com/ec.svg\",\"png\":\"https://flagcdn.com/w320/ec.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Ecuador\",\"pt\":\"Equador\",\"nl\":\"Ecuador\",\"hr\":\"Ekvador\",\"fa\":\"اکوادور\",\"de\":\"Ecuador\",\"es\":\"Ecuador\",\"fr\":\"Équateur\",\"ja\":\"エクアドル\",\"it\":\"Ecuador\",\"hu\":\"Ecuador\"},\"flag\":\"https://flagcdn.com/ec.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"ECU\",\"independent\":true},{\"name\":\"Egypt\",\"topLevelDomain\":[\".eg\"],\"alpha2Code\":\"EG\",\"alpha3Code\":\"EGY\",\"callingCodes\":[\"20\"],\"capital\":\"Cairo\",\"altSpellings\":[\"EG\",\"Arab Republic of Egypt\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":102334403,\"latlng\":[27.0,30.0],\"demonym\":\"Egyptian\",\"area\":1002450.0,\"gini\":31.5,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"ISR\",\"LBY\",\"SDN\"],\"nativeName\":\"مصر‎\",\"numericCode\":\"818\",\"flags\":{\"svg\":\"https://flagcdn.com/eg.svg\",\"png\":\"https://flagcdn.com/w320/eg.png\"},\"currencies\":[{\"code\":\"EGP\",\"name\":\"Egyptian pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Egipt\",\"pt\":\"Egipto\",\"nl\":\"Egypte\",\"hr\":\"Egipat\",\"fa\":\"مصر\",\"de\":\"Ägypten\",\"es\":\"Egipto\",\"fr\":\"Égypte\",\"ja\":\"エジプト\",\"it\":\"Egitto\",\"hu\":\"Egyiptom\"},\"flag\":\"https://flagcdn.com/eg.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"EGY\",\"independent\":true},{\"name\":\"El Salvador\",\"topLevelDomain\":[\".sv\"],\"alpha2Code\":\"SV\",\"alpha3Code\":\"SLV\",\"callingCodes\":[\"503\"],\"capital\":\"San Salvador\",\"altSpellings\":[\"SV\",\"Republic of El Salvador\",\"República de El Salvador\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":6486201,\"latlng\":[13.83333333,-88.91666666],\"demonym\":\"Salvadoran\",\"area\":21041.0,\"gini\":38.8,\"timezones\":[\"UTC-06:00\"],\"borders\":[\"GTM\",\"HND\"],\"nativeName\":\"El Salvador\",\"numericCode\":\"222\",\"flags\":{\"svg\":\"https://flagcdn.com/sv.svg\",\"png\":\"https://flagcdn.com/w320/sv.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"El Salvador\",\"pt\":\"El Salvador\",\"nl\":\"El Salvador\",\"hr\":\"Salvador\",\"fa\":\"السالوادور\",\"de\":\"El Salvador\",\"es\":\"El Salvador\",\"fr\":\"Salvador\",\"ja\":\"エルサルバドル\",\"it\":\"El Salvador\",\"hu\":\"Salvador\"},\"flag\":\"https://flagcdn.com/sv.svg\",\"regionalBlocs\":[{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"ESA\",\"independent\":true},{\"name\":\"Equatorial Guinea\",\"topLevelDomain\":[\".gq\"],\"alpha2Code\":\"GQ\",\"alpha3Code\":\"GNQ\",\"callingCodes\":[\"240\"],\"capital\":\"Malabo\",\"altSpellings\":[\"GQ\",\"Republic of Equatorial Guinea\",\"República de Guinea Ecuatorial\",\"République de Guinée équatoriale\",\"República da Guiné Equatorial\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":1402985,\"latlng\":[2.0,10.0],\"demonym\":\"Equatorial Guinean\",\"area\":28051.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"CMR\",\"GAB\"],\"nativeName\":\"Guinea Ecuatorial\",\"numericCode\":\"226\",\"flags\":{\"svg\":\"https://flagcdn.com/gq.svg\",\"png\":\"https://flagcdn.com/w320/gq.png\"},\"currencies\":[{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"},{\"iso639_2\":\"fan\",\"name\":\"Fang\",\"nativeName\":\"Fang\"}],\"translations\":{\"br\":\"Ginea ar C'heheder\",\"pt\":\"Guiné Equatorial\",\"nl\":\"Equatoriaal-Guinea\",\"hr\":\"Ekvatorijalna Gvineja\",\"fa\":\"گینه استوایی\",\"de\":\"Äquatorial-Guinea\",\"es\":\"Guinea Ecuatorial\",\"fr\":\"Guinée-Équatoriale\",\"ja\":\"赤道ギニア\",\"it\":\"Guinea Equatoriale\",\"hu\":\"Egyenlítői-Guinea\"},\"flag\":\"https://flagcdn.com/gq.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"GEQ\",\"independent\":true},{\"name\":\"Eritrea\",\"topLevelDomain\":[\".er\"],\"alpha2Code\":\"ER\",\"alpha3Code\":\"ERI\",\"callingCodes\":[\"291\"],\"capital\":\"Asmara\",\"altSpellings\":[\"ER\",\"State of Eritrea\",\"ሃገረ ኤርትራ\",\"Dawlat Iritriyá\",\"ʾErtrā\",\"Iritriyā\",\"\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":5352000,\"latlng\":[15.0,39.0],\"demonym\":\"Eritrean\",\"area\":117600.0,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"DJI\",\"ETH\",\"SDN\"],\"nativeName\":\"ኤርትራ\",\"numericCode\":\"232\",\"flags\":{\"svg\":\"https://flagcdn.com/er.svg\",\"png\":\"https://flagcdn.com/w320/er.png\"},\"currencies\":[{\"code\":\"ERN\",\"name\":\"Eritrean nakfa\",\"symbol\":\"Nfk\"}],\"languages\":[{\"iso639_1\":\"ti\",\"iso639_2\":\"tir\",\"name\":\"Tigrinya\",\"nativeName\":\"ትግርኛ\"},{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_2\":\"tig\",\"name\":\"Tigre\",\"nativeName\":\"ትግረ\"},{\"iso639_2\":\"kun\",\"name\":\"Kunama\",\"nativeName\":\"Kunama\"},{\"iso639_2\":\"ssy\",\"name\":\"Saho\",\"nativeName\":\"Saho\"},{\"iso639_2\":\"byn\",\"name\":\"Bilen\",\"nativeName\":\"ብሊና\"},{\"iso639_2\":\"nrb\",\"name\":\"Nara\",\"nativeName\":\"Nara\"},{\"iso639_1\":\"aa\",\"iso639_2\":\"aar\",\"name\":\"Afar\",\"nativeName\":\"Afar\"}],\"translations\":{\"br\":\"Eritrea\",\"pt\":\"Eritreia\",\"nl\":\"Eritrea\",\"hr\":\"Eritreja\",\"fa\":\"اریتره\",\"de\":\"Eritrea\",\"es\":\"Eritrea\",\"fr\":\"Érythrée\",\"ja\":\"エリトリア\",\"it\":\"Eritrea\",\"hu\":\"Eritrea\"},\"flag\":\"https://flagcdn.com/er.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"ERI\",\"independent\":true},{\"name\":\"Estonia\",\"topLevelDomain\":[\".ee\"],\"alpha2Code\":\"EE\",\"alpha3Code\":\"EST\",\"callingCodes\":[\"372\"],\"capital\":\"Tallinn\",\"altSpellings\":[\"EE\",\"Eesti\",\"Republic of Estonia\",\"Eesti Vabariik\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":1331057,\"latlng\":[59.0,26.0],\"demonym\":\"Estonian\",\"area\":45227.0,\"gini\":30.3,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"LVA\",\"RUS\"],\"nativeName\":\"Eesti\",\"numericCode\":\"233\",\"flags\":{\"svg\":\"https://flagcdn.com/ee.svg\",\"png\":\"https://flagcdn.com/w320/ee.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"et\",\"iso639_2\":\"est\",\"name\":\"Estonian\",\"nativeName\":\"eesti\"}],\"translations\":{\"br\":\"Estonia\",\"pt\":\"Estónia\",\"nl\":\"Estland\",\"hr\":\"Estonija\",\"fa\":\"استونی\",\"de\":\"Estland\",\"es\":\"Estonia\",\"fr\":\"Estonie\",\"ja\":\"エストニア\",\"it\":\"Estonia\",\"hu\":\"Észtország\"},\"flag\":\"https://flagcdn.com/ee.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"EST\",\"independent\":true},{\"name\":\"Ethiopia\",\"topLevelDomain\":[\".et\"],\"alpha2Code\":\"ET\",\"alpha3Code\":\"ETH\",\"callingCodes\":[\"251\"],\"capital\":\"Addis Ababa\",\"altSpellings\":[\"ET\",\"ʾĪtyōṗṗyā\",\"Federal Democratic Republic of Ethiopia\",\"የኢትዮጵያ ፌዴራላዊ ዲሞክራሲያዊ ሪፐብሊክ\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":114963583,\"latlng\":[8.0,38.0],\"demonym\":\"Ethiopian\",\"area\":1104300.0,\"gini\":35.0,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"DJI\",\"ERI\",\"KEN\",\"SOM\",\"SSD\",\"SDN\"],\"nativeName\":\"ኢትዮጵያ\",\"numericCode\":\"231\",\"flags\":{\"svg\":\"https://flagcdn.com/et.svg\",\"png\":\"https://flagcdn.com/w320/et.png\"},\"currencies\":[{\"code\":\"ETB\",\"name\":\"Ethiopian birr\",\"symbol\":\"Br\"}],\"languages\":[{\"iso639_1\":\"am\",\"iso639_2\":\"amh\",\"name\":\"Amharic\",\"nativeName\":\"አማርኛ\"}],\"translations\":{\"br\":\"Etiopia\",\"pt\":\"Etiópia\",\"nl\":\"Ethiopië\",\"hr\":\"Etiopija\",\"fa\":\"اتیوپی\",\"de\":\"Äthiopien\",\"es\":\"Etiopía\",\"fr\":\"Éthiopie\",\"ja\":\"エチオピア\",\"it\":\"Etiopia\",\"hu\":\"Etiópia\"},\"flag\":\"https://flagcdn.com/et.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"ETH\",\"independent\":true},{\"name\":\"Falkland Islands (Malvinas)\",\"topLevelDomain\":[\".fk\"],\"alpha2Code\":\"FK\",\"alpha3Code\":\"FLK\",\"callingCodes\":[\"500\"],\"capital\":\"Stanley\",\"altSpellings\":[\"FK\",\"Islas Malvinas\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":2563,\"latlng\":[-51.75,-59.0],\"demonym\":\"Falkland Islander\",\"area\":12173.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Falkland Islands\",\"numericCode\":\"238\",\"flags\":{\"svg\":\"https://flagcdn.com/fk.svg\",\"png\":\"https://flagcdn.com/w320/fk.png\"},\"currencies\":[{\"code\":\"FKP\",\"name\":\"Falkland Islands pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Maloù\",\"pt\":\"Ilhas Falkland\",\"nl\":\"Falklandeilanden [Islas Malvinas]\",\"hr\":\"Falklandski Otoci\",\"fa\":\"جزایر فالکلند\",\"de\":\"Falklandinseln\",\"es\":\"Islas Malvinas\",\"fr\":\"Îles Malouines\",\"ja\":\"フォークランド（マルビナス）諸島\",\"it\":\"Isole Falkland o Isole Malvine\",\"hu\":\"Falkland-szigetek\"},\"flag\":\"https://flagcdn.com/fk.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"independent\":false},{\"name\":\"Faroe Islands\",\"topLevelDomain\":[\".fo\"],\"alpha2Code\":\"FO\",\"alpha3Code\":\"FRO\",\"callingCodes\":[\"298\"],\"capital\":\"Tórshavn\",\"altSpellings\":[\"FO\",\"Føroyar\",\"Færøerne\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":48865,\"latlng\":[62.0,-7.0],\"demonym\":\"Faroese\",\"area\":1393.0,\"timezones\":[\"UTC+00:00\"],\"nativeName\":\"Føroyar\",\"numericCode\":\"234\",\"flags\":{\"svg\":\"https://flagcdn.com/fo.svg\",\"png\":\"https://flagcdn.com/w320/fo.png\"},\"currencies\":[{\"code\":\"DKK\",\"name\":\"Danish krone\",\"symbol\":\"kr\"},{\"code\":\"FOK\",\"name\":\"Faroese króna\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"fo\",\"iso639_2\":\"fao\",\"name\":\"Faroese\",\"nativeName\":\"føroyskt\"}],\"translations\":{\"br\":\"Inizi Faero\",\"pt\":\"Ilhas Faroé\",\"nl\":\"Faeröer\",\"hr\":\"Farski Otoci\",\"fa\":\"جزایر فارو\",\"de\":\"Färöer-Inseln\",\"es\":\"Islas Faroe\",\"fr\":\"Îles Féroé\",\"ja\":\"フェロー諸島\",\"it\":\"Isole Far Oer\",\"hu\":\"Feröer\"},\"flag\":\"https://flagcdn.com/fo.svg\",\"independent\":false},{\"name\":\"Fiji\",\"topLevelDomain\":[\".fj\"],\"alpha2Code\":\"FJ\",\"alpha3Code\":\"FJI\",\"callingCodes\":[\"679\"],\"capital\":\"Suva\",\"altSpellings\":[\"FJ\",\"Viti\",\"Republic of Fiji\",\"Matanitu ko Viti\",\"Fijī Gaṇarājya\"],\"subregion\":\"Melanesia\",\"region\":\"Oceania\",\"population\":896444,\"latlng\":[-18.0,175.0],\"demonym\":\"Fijian\",\"area\":18272.0,\"gini\":36.7,\"timezones\":[\"UTC+12:00\"],\"nativeName\":\"Fiji\",\"numericCode\":\"242\",\"flags\":{\"svg\":\"https://flagcdn.com/fj.svg\",\"png\":\"https://flagcdn.com/w320/fj.png\"},\"currencies\":[{\"code\":\"FJD\",\"name\":\"Fijian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fj\",\"iso639_2\":\"fij\",\"name\":\"Fijian\",\"nativeName\":\"vosa Vakaviti\"},{\"iso639_2\":\"hif\",\"name\":\"Fiji Hindi\",\"nativeName\":\"फ़िजी बात\"},{\"iso639_2\":\"rtm\",\"name\":\"Rotuman\",\"nativeName\":\"Fäeag Rotuma\"}],\"translations\":{\"br\":\"Fidji\",\"pt\":\"Fiji\",\"nl\":\"Fiji\",\"hr\":\"Fiđi\",\"fa\":\"فیجی\",\"de\":\"Fidschi\",\"es\":\"Fiyi\",\"fr\":\"Fidji\",\"ja\":\"フィジー\",\"it\":\"Figi\",\"hu\":\"Fidzsi-szigetek\"},\"flag\":\"https://flagcdn.com/fj.svg\",\"cioc\":\"FIJ\",\"independent\":true},{\"name\":\"Finland\",\"topLevelDomain\":[\".fi\"],\"alpha2Code\":\"FI\",\"alpha3Code\":\"FIN\",\"callingCodes\":[\"358\"],\"capital\":\"Helsinki\",\"altSpellings\":[\"FI\",\"Suomi\",\"Republic of Finland\",\"Suomen tasavalta\",\"Republiken Finland\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":5530719,\"latlng\":[64.0,26.0],\"demonym\":\"Finnish\",\"area\":338424.0,\"gini\":27.3,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"NOR\",\"SWE\",\"RUS\"],\"nativeName\":\"Suomi\",\"numericCode\":\"246\",\"flags\":{\"svg\":\"https://flagcdn.com/fi.svg\",\"png\":\"https://flagcdn.com/w320/fi.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fi\",\"iso639_2\":\"fin\",\"name\":\"Finnish\",\"nativeName\":\"suomi\"},{\"iso639_1\":\"sv\",\"iso639_2\":\"swe\",\"name\":\"Swedish\",\"nativeName\":\"svenska\"}],\"translations\":{\"br\":\"Finland\",\"pt\":\"Finlândia\",\"nl\":\"Finland\",\"hr\":\"Finska\",\"fa\":\"فنلاند\",\"de\":\"Finnland\",\"es\":\"Finlandia\",\"fr\":\"Finlande\",\"ja\":\"フィンランド\",\"it\":\"Finlandia\",\"hu\":\"Finnország\"},\"flag\":\"https://flagcdn.com/fi.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"FIN\",\"independent\":true},{\"name\":\"France\",\"topLevelDomain\":[\".fr\"],\"alpha2Code\":\"FR\",\"alpha3Code\":\"FRA\",\"callingCodes\":[\"33\"],\"capital\":\"Paris\",\"altSpellings\":[\"FR\",\"French Republic\",\"République française\"],\"subregion\":\"Western Europe\",\"region\":\"Europe\",\"population\":67391582,\"latlng\":[46.0,2.0],\"demonym\":\"French\",\"area\":640679.0,\"gini\":32.4,\"timezones\":[\"UTC-10:00\",\"UTC-09:30\",\"UTC-09:00\",\"UTC-08:00\",\"UTC-04:00\",\"UTC-03:00\",\"UTC+01:00\",\"UTC+02:00\",\"UTC+03:00\",\"UTC+04:00\",\"UTC+05:00\",\"UTC+10:00\",\"UTC+11:00\",\"UTC+12:00\"],\"borders\":[\"AND\",\"BEL\",\"DEU\",\"ITA\",\"LUX\",\"MCO\",\"ESP\",\"CHE\"],\"nativeName\":\"France\",\"numericCode\":\"250\",\"flags\":{\"svg\":\"https://flagcdn.com/fr.svg\",\"png\":\"https://flagcdn.com/w320/fr.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Frañs\",\"pt\":\"França\",\"nl\":\"Frankrijk\",\"hr\":\"Francuska\",\"fa\":\"فرانسه\",\"de\":\"Frankreich\",\"es\":\"Francia\",\"fr\":\"France\",\"ja\":\"フランス\",\"it\":\"Francia\",\"hu\":\"Franciaország\"},\"flag\":\"https://flagcdn.com/fr.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"FRA\",\"independent\":true},{\"name\":\"French Guiana\",\"topLevelDomain\":[\".gf\"],\"alpha2Code\":\"GF\",\"alpha3Code\":\"GUF\",\"callingCodes\":[\"594\"],\"capital\":\"Cayenne\",\"altSpellings\":[\"GF\",\"Guiana\",\"Guyane\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":254541,\"latlng\":[4.0,-53.0],\"demonym\":\"French Guianan\",\"timezones\":[\"UTC-03:00\"],\"borders\":[\"BRA\",\"SUR\"],\"nativeName\":\"Guyane française\",\"numericCode\":\"254\",\"flags\":{\"svg\":\"https://flagcdn.com/gf.svg\",\"png\":\"https://flagcdn.com/w320/gf.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Gwiana C'hall\",\"pt\":\"Guiana Francesa\",\"nl\":\"Frans-Guyana\",\"hr\":\"Francuska Gvajana\",\"fa\":\"گویان فرانسه\",\"de\":\"Französisch Guyana\",\"es\":\"Guayana Francesa\",\"fr\":\"Guayane\",\"ja\":\"フランス領ギアナ\",\"it\":\"Guyana francese\",\"hu\":\"Francia Guyana\"},\"flag\":\"https://flagcdn.com/gf.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]},{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"independent\":false},{\"name\":\"French Polynesia\",\"topLevelDomain\":[\".pf\"],\"alpha2Code\":\"PF\",\"alpha3Code\":\"PYF\",\"callingCodes\":[\"689\"],\"capital\":\"Papeetē\",\"altSpellings\":[\"PF\",\"Polynésie française\",\"French Polynesia\",\"Pōrīnetia Farāni\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":280904,\"latlng\":[-15.0,-140.0],\"demonym\":\"French Polynesian\",\"area\":4167.0,\"timezones\":[\"UTC-10:00\",\"UTC-09:30\",\"UTC-09:00\"],\"nativeName\":\"Polynésie française\",\"numericCode\":\"258\",\"flags\":{\"svg\":\"https://flagcdn.com/pf.svg\",\"png\":\"https://flagcdn.com/w320/pf.png\"},\"currencies\":[{\"code\":\"XPF\",\"name\":\"CFP franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Polinezia C'hall\",\"pt\":\"Polinésia Francesa\",\"nl\":\"Frans-Polynesië\",\"hr\":\"Francuska Polinezija\",\"fa\":\"پلی‌نزی فرانسه\",\"de\":\"Französisch-Polynesien\",\"es\":\"Polinesia Francesa\",\"fr\":\"Polynésie française\",\"ja\":\"フランス領ポリネシア\",\"it\":\"Polinesia Francese\",\"hu\":\"Francia Polinézia\"},\"flag\":\"https://flagcdn.com/pf.svg\",\"independent\":false},{\"name\":\"French Southern Territories\",\"topLevelDomain\":[\".tf\"],\"alpha2Code\":\"TF\",\"alpha3Code\":\"ATF\",\"callingCodes\":[\"262\"],\"capital\":\"Port-aux-Français\",\"altSpellings\":[\"TF\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":140,\"latlng\":[-49.25,69.167],\"demonym\":\"French\",\"area\":7747.0,\"timezones\":[\"UTC+05:00\"],\"nativeName\":\"Territoire des Terres australes et antarctiques françaises\",\"numericCode\":\"260\",\"flags\":{\"svg\":\"https://flagcdn.com/tf.svg\",\"png\":\"https://flagcdn.com/w320/tf.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Douaroù Aostral hag Antarktikel Frañs\",\"pt\":\"Terras Austrais e Antárticas Francesas\",\"nl\":\"Franse Gebieden in de zuidelijke Indische Oceaan\",\"hr\":\"Francuski južni i antarktički teritoriji\",\"fa\":\"سرزمین‌های جنوبی و جنوبگانی فرانسه\",\"de\":\"Französische Süd- und Antarktisgebiete\",\"es\":\"Tierras Australes y Antárticas Francesas\",\"fr\":\"Terres australes et antarctiques françaises\",\"ja\":\"フランス領南方・南極地域\",\"it\":\"Territori Francesi del Sud\",\"hu\":\"Francia déli és antarktiszi területek\"},\"flag\":\"https://flagcdn.com/tf.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"independent\":false},{\"name\":\"Gabon\",\"topLevelDomain\":[\".ga\"],\"alpha2Code\":\"GA\",\"alpha3Code\":\"GAB\",\"callingCodes\":[\"241\"],\"capital\":\"Libreville\",\"altSpellings\":[\"GA\",\"Gabonese Republic\",\"République Gabonaise\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":2225728,\"latlng\":[-1.0,11.75],\"demonym\":\"Gabonese\",\"area\":267668.0,\"gini\":38.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"CMR\",\"COG\",\"GNQ\"],\"nativeName\":\"Gabon\",\"numericCode\":\"266\",\"flags\":{\"svg\":\"https://flagcdn.com/ga.svg\",\"png\":\"https://flagcdn.com/w320/ga.png\"},\"currencies\":[{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Gabon\",\"pt\":\"Gabão\",\"nl\":\"Gabon\",\"hr\":\"Gabon\",\"fa\":\"گابن\",\"de\":\"Gabun\",\"es\":\"Gabón\",\"fr\":\"Gabon\",\"ja\":\"ガボン\",\"it\":\"Gabon\",\"hu\":\"Gabon\"},\"flag\":\"https://flagcdn.com/ga.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"GAB\",\"independent\":true},{\"name\":\"Gambia\",\"topLevelDomain\":[\".gm\"],\"alpha2Code\":\"GM\",\"alpha3Code\":\"GMB\",\"callingCodes\":[\"220\"],\"capital\":\"Banjul\",\"altSpellings\":[\"GM\",\"Republic of the Gambia\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":2416664,\"latlng\":[13.46666666,-16.56666666],\"demonym\":\"Gambian\",\"area\":11295.0,\"gini\":35.9,\"timezones\":[\"UTC+00:00\"],\"borders\":[\"SEN\"],\"nativeName\":\"Gambia\",\"numericCode\":\"270\",\"flags\":{\"svg\":\"https://flagcdn.com/gm.svg\",\"png\":\"https://flagcdn.com/w320/gm.png\"},\"currencies\":[{\"code\":\"GMD\",\"name\":\"Gambian dalasi\",\"symbol\":\"D\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Gambia\",\"pt\":\"Gâmbia\",\"nl\":\"Gambia\",\"hr\":\"Gambija\",\"fa\":\"گامبیا\",\"de\":\"Gambia\",\"es\":\"Gambia\",\"fr\":\"Gambie\",\"ja\":\"ガンビア\",\"it\":\"Gambia\",\"hu\":\"Gambia\"},\"flag\":\"https://flagcdn.com/gm.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"GAM\",\"independent\":true},{\"name\":\"Georgia\",\"topLevelDomain\":[\".ge\"],\"alpha2Code\":\"GE\",\"alpha3Code\":\"GEO\",\"callingCodes\":[\"995\"],\"capital\":\"Tbilisi\",\"altSpellings\":[\"GE\",\"Sakartvelo\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":3714000,\"latlng\":[42.0,43.5],\"demonym\":\"Georgian\",\"area\":69700.0,\"gini\":35.9,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"ARM\",\"AZE\",\"RUS\",\"TUR\"],\"nativeName\":\"საქართველო\",\"numericCode\":\"268\",\"flags\":{\"svg\":\"https://flagcdn.com/ge.svg\",\"png\":\"https://flagcdn.com/w320/ge.png\"},\"currencies\":[{\"code\":\"GEL\",\"name\":\"Georgian Lari\",\"symbol\":\"ლ\"}],\"languages\":[{\"iso639_1\":\"ka\",\"iso639_2\":\"kat\",\"name\":\"Georgian\",\"nativeName\":\"ქართული\"}],\"translations\":{\"br\":\"Jorjia\",\"pt\":\"Geórgia\",\"nl\":\"Georgië\",\"hr\":\"Németország\",\"fa\":\"گرجستان\",\"de\":\"Georgien\",\"es\":\"Georgia\",\"fr\":\"Géorgie\",\"ja\":\"グルジア\",\"it\":\"Georgia\",\"hu\":\"Grúzia\"},\"flag\":\"https://flagcdn.com/ge.svg\",\"cioc\":\"GEO\",\"independent\":true},{\"name\":\"Germany\",\"topLevelDomain\":[\".de\"],\"alpha2Code\":\"DE\",\"alpha3Code\":\"DEU\",\"callingCodes\":[\"49\"],\"capital\":\"Berlin\",\"altSpellings\":[\"DE\",\"Federal Republic of Germany\",\"Bundesrepublik Deutschland\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":83240525,\"latlng\":[51.0,9.0],\"demonym\":\"German\",\"area\":357114.0,\"gini\":31.9,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"BEL\",\"CZE\",\"DNK\",\"FRA\",\"LUX\",\"NLD\",\"POL\",\"CHE\"],\"nativeName\":\"Deutschland\",\"numericCode\":\"276\",\"flags\":{\"svg\":\"https://flagcdn.com/de.svg\",\"png\":\"https://flagcdn.com/w320/de.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"}],\"translations\":{\"br\":\"Alamagn\",\"pt\":\"Alemanha\",\"nl\":\"Duitsland\",\"hr\":\"Njemačka\",\"fa\":\"آلمان\",\"de\":\"Deutschland\",\"es\":\"Alemania\",\"fr\":\"Allemagne\",\"ja\":\"ドイツ\",\"it\":\"Germania\",\"hu\":\"Grúzia\"},\"flag\":\"https://flagcdn.com/de.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"GER\",\"independent\":true},{\"name\":\"Ghana\",\"topLevelDomain\":[\".gh\"],\"alpha2Code\":\"GH\",\"alpha3Code\":\"GHA\",\"callingCodes\":[\"233\"],\"capital\":\"Accra\",\"altSpellings\":[\"GH\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":31072945,\"latlng\":[8.0,-2.0],\"demonym\":\"Ghanaian\",\"area\":238533.0,\"gini\":43.5,\"timezones\":[\"UTC\"],\"borders\":[\"BFA\",\"CIV\",\"TGO\"],\"nativeName\":\"Ghana\",\"numericCode\":\"288\",\"flags\":{\"svg\":\"https://flagcdn.com/gh.svg\",\"png\":\"https://flagcdn.com/w320/gh.png\"},\"currencies\":[{\"code\":\"GHS\",\"name\":\"Ghanaian cedi\",\"symbol\":\"₵\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Ghana\",\"pt\":\"Gana\",\"nl\":\"Ghana\",\"hr\":\"Gana\",\"fa\":\"غنا\",\"de\":\"Ghana\",\"es\":\"Ghana\",\"fr\":\"Ghana\",\"ja\":\"ガーナ\",\"it\":\"Ghana\",\"hu\":\"Ghána\"},\"flag\":\"https://flagcdn.com/gh.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"GHA\",\"independent\":true},{\"name\":\"Gibraltar\",\"topLevelDomain\":[\".gi\"],\"alpha2Code\":\"GI\",\"alpha3Code\":\"GIB\",\"callingCodes\":[\"350\"],\"capital\":\"Gibraltar\",\"altSpellings\":[\"GI\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":33691,\"latlng\":[36.13333333,-5.35],\"demonym\":\"Gibraltar\",\"area\":6.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"ESP\"],\"nativeName\":\"Gibraltar\",\"numericCode\":\"292\",\"flags\":{\"svg\":\"https://flagcdn.com/gi.svg\",\"png\":\"https://flagcdn.com/w320/gi.png\"},\"currencies\":[{\"code\":\"GIP\",\"name\":\"Gibraltar pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Jibraltar\",\"pt\":\"Gibraltar\",\"nl\":\"Gibraltar\",\"hr\":\"Gibraltar\",\"fa\":\"جبل‌طارق\",\"de\":\"Gibraltar\",\"es\":\"Gibraltar\",\"fr\":\"Gibraltar\",\"ja\":\"ジブラルタル\",\"it\":\"Gibilterra\",\"hu\":\"Gibraltár\"},\"flag\":\"https://flagcdn.com/gi.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"independent\":false},{\"name\":\"Greece\",\"topLevelDomain\":[\".gr\"],\"alpha2Code\":\"GR\",\"alpha3Code\":\"GRC\",\"callingCodes\":[\"30\"],\"capital\":\"Athens\",\"altSpellings\":[\"GR\",\"Elláda\",\"Hellenic Republic\",\"Ελληνική Δημοκρατία\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":10715549,\"latlng\":[39.0,22.0],\"demonym\":\"Greek\",\"area\":131990.0,\"gini\":32.9,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"ALB\",\"BGR\",\"TUR\",\"MKD\"],\"nativeName\":\"Ελλάδα\",\"numericCode\":\"300\",\"flags\":{\"svg\":\"https://flagcdn.com/gr.svg\",\"png\":\"https://flagcdn.com/w320/gr.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"el\",\"iso639_2\":\"ell\",\"name\":\"Greek (modern)\",\"nativeName\":\"ελληνικά\"}],\"translations\":{\"br\":\"Gres\",\"pt\":\"Grécia\",\"nl\":\"Griekenland\",\"hr\":\"Grčka\",\"fa\":\"یونان\",\"de\":\"Griechenland\",\"es\":\"Grecia\",\"fr\":\"Grèce\",\"ja\":\"ギリシャ\",\"it\":\"Grecia\",\"hu\":\"Görögország\"},\"flag\":\"https://flagcdn.com/gr.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"GRE\",\"independent\":true},{\"name\":\"Greenland\",\"topLevelDomain\":[\".gl\"],\"alpha2Code\":\"GL\",\"alpha3Code\":\"GRL\",\"callingCodes\":[\"299\"],\"capital\":\"Nuuk\",\"altSpellings\":[\"GL\",\"Grønland\"],\"subregion\":\"Northern America\",\"region\":\"Americas\",\"population\":56367,\"latlng\":[72.0,-40.0],\"demonym\":\"Greenlandic\",\"area\":2166086.0,\"timezones\":[\"UTC-04:00\",\"UTC-03:00\",\"UTC-01:00\",\"UTC+00:00\"],\"nativeName\":\"Kalaallit Nunaat\",\"numericCode\":\"304\",\"flags\":{\"svg\":\"https://flagcdn.com/gl.svg\",\"png\":\"https://flagcdn.com/w320/gl.png\"},\"currencies\":[{\"code\":\"DKK\",\"name\":\"Danish krone\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"kl\",\"iso639_2\":\"kal\",\"name\":\"Greenlandic\",\"nativeName\":\"kalaallisut\"}],\"translations\":{\"br\":\"Greunland\",\"pt\":\"Gronelândia\",\"nl\":\"Groenland\",\"hr\":\"Grenland\",\"fa\":\"گرینلند\",\"de\":\"Grönland\",\"es\":\"Groenlandia\",\"fr\":\"Groenland\",\"ja\":\"グリーンランド\",\"it\":\"Groenlandia\",\"hu\":\"Grönland\"},\"flag\":\"https://flagcdn.com/gl.svg\",\"independent\":false},{\"name\":\"Grenada\",\"topLevelDomain\":[\".gd\"],\"alpha2Code\":\"GD\",\"alpha3Code\":\"GRD\",\"callingCodes\":[\"1\"],\"capital\":\"St. George's\",\"altSpellings\":[\"GD\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":112519,\"latlng\":[12.11666666,-61.66666666],\"demonym\":\"Grenadian\",\"area\":344.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Grenada\",\"numericCode\":\"308\",\"flags\":{\"svg\":\"https://flagcdn.com/gd.svg\",\"png\":\"https://flagcdn.com/w320/gd.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Grenada\",\"pt\":\"Granada\",\"nl\":\"Grenada\",\"hr\":\"Grenada\",\"fa\":\"گرنادا\",\"de\":\"Grenada\",\"es\":\"Grenada\",\"fr\":\"Grenade\",\"ja\":\"グレナダ\",\"it\":\"Grenada\",\"hu\":\"Grenada\"},\"flag\":\"https://flagcdn.com/gd.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"GRN\",\"independent\":true},{\"name\":\"Guadeloupe\",\"topLevelDomain\":[\".gp\"],\"alpha2Code\":\"GP\",\"alpha3Code\":\"GLP\",\"callingCodes\":[\"590\"],\"capital\":\"Basse-Terre\",\"altSpellings\":[\"GP\",\"Gwadloup\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":400132,\"latlng\":[16.25,-61.583333],\"demonym\":\"Guadeloupian\",\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Guadeloupe\",\"numericCode\":\"312\",\"flags\":{\"svg\":\"https://flagcdn.com/gp.svg\",\"png\":\"https://flagcdn.com/w320/gp.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Gwadeloup\",\"pt\":\"Guadalupe\",\"nl\":\"Guadeloupe\",\"hr\":\"Gvadalupa\",\"fa\":\"جزیره گوادلوپ\",\"de\":\"Guadeloupe\",\"es\":\"Guadalupe\",\"fr\":\"Guadeloupe\",\"ja\":\"グアドループ\",\"it\":\"Guadeloupa\",\"hu\":\"Guadeloupe\"},\"flag\":\"https://flagcdn.com/gp.svg\",\"independent\":false},{\"name\":\"Guam\",\"topLevelDomain\":[\".gu\"],\"alpha2Code\":\"GU\",\"alpha3Code\":\"GUM\",\"callingCodes\":[\"1\"],\"capital\":\"Hagåtña\",\"altSpellings\":[\"GU\",\"Guåhån\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":168783,\"latlng\":[13.46666666,144.78333333],\"demonym\":\"Guamanian\",\"area\":549.0,\"timezones\":[\"UTC+10:00\"],\"nativeName\":\"Guam\",\"numericCode\":\"316\",\"flags\":{\"svg\":\"https://flagcdn.com/gu.svg\",\"png\":\"https://flagcdn.com/w320/gu.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"ch\",\"iso639_2\":\"cha\",\"name\":\"Chamorro\",\"nativeName\":\"Chamoru\"},{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Guam\",\"pt\":\"Guame\",\"nl\":\"Guam\",\"hr\":\"Guam\",\"fa\":\"گوام\",\"de\":\"Guam\",\"es\":\"Guam\",\"fr\":\"Guam\",\"ja\":\"グアム\",\"it\":\"Guam\",\"hu\":\"Guam\"},\"flag\":\"https://flagcdn.com/gu.svg\",\"cioc\":\"GUM\",\"independent\":false},{\"name\":\"Guatemala\",\"topLevelDomain\":[\".gt\"],\"alpha2Code\":\"GT\",\"alpha3Code\":\"GTM\",\"callingCodes\":[\"502\"],\"capital\":\"Guatemala City\",\"altSpellings\":[\"GT\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":16858333,\"latlng\":[15.5,-90.25],\"demonym\":\"Guatemalan\",\"area\":108889.0,\"gini\":48.3,\"timezones\":[\"UTC-06:00\"],\"borders\":[\"BLZ\",\"SLV\",\"HND\",\"MEX\"],\"nativeName\":\"Guatemala\",\"numericCode\":\"320\",\"flags\":{\"svg\":\"https://flagcdn.com/gt.svg\",\"png\":\"https://flagcdn.com/w320/gt.png\"},\"currencies\":[{\"code\":\"GTQ\",\"name\":\"Guatemalan quetzal\",\"symbol\":\"Q\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Guatemala\",\"pt\":\"Guatemala\",\"nl\":\"Guatemala\",\"hr\":\"Gvatemala\",\"fa\":\"گواتمالا\",\"de\":\"Guatemala\",\"es\":\"Guatemala\",\"fr\":\"Guatemala\",\"ja\":\"グアテマラ\",\"it\":\"Guatemala\",\"hu\":\"Guatemala\"},\"flag\":\"https://flagcdn.com/gt.svg\",\"regionalBlocs\":[{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"GUA\",\"independent\":true},{\"name\":\"Guernsey\",\"topLevelDomain\":[\".gg\"],\"alpha2Code\":\"GG\",\"alpha3Code\":\"GGY\",\"callingCodes\":[\"44\"],\"capital\":\"St. Peter Port\",\"altSpellings\":[\"GG\",\"Bailiwick of Guernsey\",\"Bailliage de Guernesey\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":62999,\"latlng\":[49.46666666,-2.58333333],\"demonym\":\"Channel Islander\",\"area\":78.0,\"timezones\":[\"UTC+00:00\"],\"nativeName\":\"Guernsey\",\"numericCode\":\"831\",\"flags\":{\"svg\":\"https://flagcdn.com/gg.svg\",\"png\":\"https://flagcdn.com/w320/gg.png\"},\"currencies\":[{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"£\"},{\"code\":\"GGP\",\"name\":\"Guernsey pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Gwernenez\",\"pt\":\"Guernsey\",\"nl\":\"Guernsey\",\"hr\":\"Guernsey\",\"fa\":\"گرنزی\",\"de\":\"Guernsey\",\"es\":\"Guernsey\",\"fr\":\"Guernesey\",\"ja\":\"ガーンジー\",\"it\":\"Guernsey\",\"hu\":\"Guernsey\"},\"flag\":\"https://flagcdn.com/gg.svg\",\"independent\":false},{\"name\":\"Guinea\",\"topLevelDomain\":[\".gn\"],\"alpha2Code\":\"GN\",\"alpha3Code\":\"GIN\",\"callingCodes\":[\"224\"],\"capital\":\"Conakry\",\"altSpellings\":[\"GN\",\"Republic of Guinea\",\"République de Guinée\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":13132792,\"latlng\":[11.0,-10.0],\"demonym\":\"Guinean\",\"area\":245857.0,\"gini\":33.7,\"timezones\":[\"UTC\"],\"borders\":[\"CIV\",\"GNB\",\"LBR\",\"MLI\",\"SEN\",\"SLE\"],\"nativeName\":\"Guinée\",\"numericCode\":\"324\",\"flags\":{\"svg\":\"https://flagcdn.com/gn.svg\",\"png\":\"https://flagcdn.com/w320/gn.png\"},\"currencies\":[{\"code\":\"GNF\",\"name\":\"Guinean franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ff\",\"iso639_2\":\"ful\",\"name\":\"Fula\",\"nativeName\":\"Fulfulde\"}],\"translations\":{\"br\":\"Ginea\",\"pt\":\"Guiné\",\"nl\":\"Guinee\",\"hr\":\"Gvineja\",\"fa\":\"گینه\",\"de\":\"Guinea\",\"es\":\"Guinea\",\"fr\":\"Guinée\",\"ja\":\"ギニア\",\"it\":\"Guinea\",\"hu\":\"Guinea\"},\"flag\":\"https://flagcdn.com/gn.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"GUI\",\"independent\":true},{\"name\":\"Guinea-Bissau\",\"topLevelDomain\":[\".gw\"],\"alpha2Code\":\"GW\",\"alpha3Code\":\"GNB\",\"callingCodes\":[\"245\"],\"capital\":\"Bissau\",\"altSpellings\":[\"GW\",\"Republic of Guinea-Bissau\",\"República da Guiné-Bissau\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":1967998,\"latlng\":[12.0,-15.0],\"demonym\":\"Guinea-Bissauan\",\"area\":36125.0,\"gini\":50.7,\"timezones\":[\"UTC\"],\"borders\":[\"GIN\",\"SEN\"],\"nativeName\":\"Guiné-Bissau\",\"numericCode\":\"624\",\"flags\":{\"svg\":\"https://flagcdn.com/gw.svg\",\"png\":\"https://flagcdn.com/w320/gw.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Ginea-Bissau\",\"pt\":\"Guiné-Bissau\",\"nl\":\"Guinee-Bissau\",\"hr\":\"Gvineja Bisau\",\"fa\":\"گینه بیسائو\",\"de\":\"Guinea-Bissau\",\"es\":\"Guinea-Bisáu\",\"fr\":\"Guinée-Bissau\",\"ja\":\"ギニアビサウ\",\"it\":\"Guinea-Bissau\",\"hu\":\"Bissau-Guinea\"},\"flag\":\"https://flagcdn.com/gw.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"GBS\",\"independent\":true},{\"name\":\"Guyana\",\"topLevelDomain\":[\".gy\"],\"alpha2Code\":\"GY\",\"alpha3Code\":\"GUY\",\"callingCodes\":[\"592\"],\"capital\":\"Georgetown\",\"altSpellings\":[\"GY\",\"Co-operative Republic of Guyana\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":786559,\"latlng\":[5.0,-59.0],\"demonym\":\"Guyanese\",\"area\":214969.0,\"gini\":45.1,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"BRA\",\"SUR\",\"VEN\"],\"nativeName\":\"Guyana\",\"numericCode\":\"328\",\"flags\":{\"svg\":\"https://flagcdn.com/gy.svg\",\"png\":\"https://flagcdn.com/w320/gy.png\"},\"currencies\":[{\"code\":\"GYD\",\"name\":\"Guyanese dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Guyana\",\"pt\":\"Guiana\",\"nl\":\"Guyana\",\"hr\":\"Gvajana\",\"fa\":\"گویان\",\"de\":\"Guyana\",\"es\":\"Guyana\",\"fr\":\"Guyane\",\"ja\":\"ガイアナ\",\"it\":\"Guyana\",\"hu\":\"Guyana\"},\"flag\":\"https://flagcdn.com/gy.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]},{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"GUY\",\"independent\":true},{\"name\":\"Haiti\",\"topLevelDomain\":[\".ht\"],\"alpha2Code\":\"HT\",\"alpha3Code\":\"HTI\",\"callingCodes\":[\"509\"],\"capital\":\"Port-au-Prince\",\"altSpellings\":[\"HT\",\"Republic of Haiti\",\"République d'Haïti\",\"Repiblik Ayiti\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":11402533,\"latlng\":[19.0,-72.41666666],\"demonym\":\"Haitian\",\"area\":27750.0,\"gini\":41.1,\"timezones\":[\"UTC-05:00\"],\"borders\":[\"DOM\"],\"nativeName\":\"Haïti\",\"numericCode\":\"332\",\"flags\":{\"svg\":\"https://flagcdn.com/ht.svg\",\"png\":\"https://flagcdn.com/w320/ht.png\"},\"currencies\":[{\"code\":\"HTG\",\"name\":\"Haitian gourde\",\"symbol\":\"G\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"ht\",\"iso639_2\":\"hat\",\"name\":\"Haitian\",\"nativeName\":\"Kreyòl ayisyen\"}],\"translations\":{\"br\":\"Haiti\",\"pt\":\"Haiti\",\"nl\":\"Haïti\",\"hr\":\"Haiti\",\"fa\":\"هائیتی\",\"de\":\"Haiti\",\"es\":\"Haiti\",\"fr\":\"Haïti\",\"ja\":\"ハイチ\",\"it\":\"Haiti\",\"hu\":\"Haiti\"},\"flag\":\"https://flagcdn.com/ht.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"HAI\",\"independent\":true},{\"name\":\"Heard Island and McDonald Islands\",\"topLevelDomain\":[\".hm\",\".aq\"],\"alpha2Code\":\"HM\",\"alpha3Code\":\"HMD\",\"callingCodes\":[\"672\"],\"altSpellings\":[\"HM\"],\"subregion\":\"Antarctic\",\"region\":\"Antarctic\",\"population\":0,\"latlng\":[-53.1,72.51666666],\"demonym\":\"Heard and McDonald Islander\",\"area\":412.0,\"timezones\":[\"UTC+05:00\"],\"nativeName\":\"Heard Island and McDonald Islands\",\"numericCode\":\"334\",\"flags\":{\"svg\":\"https://flagcdn.com/hm.svg\",\"png\":\"https://flagcdn.com/w320/hm.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Heard ha McDonald\",\"pt\":\"Ilha Heard e Ilhas McDonald\",\"nl\":\"Heard- en McDonaldeilanden\",\"hr\":\"Otok Heard i otočje McDonald\",\"fa\":\"جزیره هرد و جزایر مک‌دونالد\",\"de\":\"Heard und die McDonaldinseln\",\"es\":\"Islas Heard y McDonald\",\"fr\":\"Îles Heard-et-MacDonald\",\"ja\":\"ハード島とマクドナルド諸島\",\"it\":\"Isole Heard e McDonald\",\"hu\":\"Heard-sziget és McDonald-szigetek\"},\"flag\":\"https://flagcdn.com/hm.svg\",\"independent\":false},{\"name\":\"Vatican City\",\"topLevelDomain\":[\".va\"],\"alpha2Code\":\"VA\",\"alpha3Code\":\"VAT\",\"callingCodes\":[\"379\"],\"capital\":\"Vatican City\",\"altSpellings\":[\"Vatican\",\"The Vatican\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":451,\"latlng\":[41.9,12.45],\"demonym\":\"Vatican\",\"area\":0.44,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"ITA\"],\"nativeName\":\"Status Civitatis Vaticanae\",\"numericCode\":\"336\",\"flags\":{\"svg\":\"https://flagcdn.com/va.svg\",\"png\":\"https://flagcdn.com/w320/va.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"la\",\"iso639_2\":\"lat\",\"name\":\"Latin\",\"nativeName\":\"latine\"},{\"iso639_1\":\"it\",\"iso639_2\":\"ita\",\"name\":\"Italian\",\"nativeName\":\"Italiano\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"Français\"},{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"}],\"translations\":{\"br\":\"Vatikan\",\"pt\":\"Vaticano\",\"nl\":\"Heilige Stoel\",\"hr\":\"Sveta Stolica\",\"fa\":\"سریر مقدس\",\"de\":\"Heiliger Stuhl\",\"es\":\"Santa Sede\",\"fr\":\"Saint-Siège\",\"ja\":\"聖座\",\"it\":\"Santa Sede\",\"hu\":\"Vatikán\"},\"flag\":\"https://flagcdn.com/va.svg\",\"independent\":true},{\"name\":\"Honduras\",\"topLevelDomain\":[\".hn\"],\"alpha2Code\":\"HN\",\"alpha3Code\":\"HND\",\"callingCodes\":[\"504\"],\"capital\":\"Tegucigalpa\",\"altSpellings\":[\"HN\",\"Republic of Honduras\",\"República de Honduras\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":9904608,\"latlng\":[15.0,-86.5],\"demonym\":\"Honduran\",\"area\":112492.0,\"gini\":48.2,\"timezones\":[\"UTC-06:00\"],\"borders\":[\"GTM\",\"SLV\",\"NIC\"],\"nativeName\":\"Honduras\",\"numericCode\":\"340\",\"flags\":{\"svg\":\"https://flagcdn.com/hn.svg\",\"png\":\"https://flagcdn.com/w320/hn.png\"},\"currencies\":[{\"code\":\"HNL\",\"name\":\"Honduran lempira\",\"symbol\":\"L\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Honduras\",\"pt\":\"Honduras\",\"nl\":\"Honduras\",\"hr\":\"Honduras\",\"fa\":\"هندوراس\",\"de\":\"Honduras\",\"es\":\"Honduras\",\"fr\":\"Honduras\",\"ja\":\"ホンジュラス\",\"it\":\"Honduras\",\"hu\":\"Honduras\"},\"flag\":\"https://flagcdn.com/hn.svg\",\"regionalBlocs\":[{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"HON\",\"independent\":true},{\"name\":\"Hungary\",\"topLevelDomain\":[\".hu\"],\"alpha2Code\":\"HU\",\"alpha3Code\":\"HUN\",\"callingCodes\":[\"36\"],\"capital\":\"Budapest\",\"altSpellings\":[\"HU\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":9749763,\"latlng\":[47.0,20.0],\"demonym\":\"Hungarian\",\"area\":93028.0,\"gini\":29.6,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"HRV\",\"ROU\",\"SRB\",\"SVK\",\"SVN\",\"UKR\"],\"nativeName\":\"Magyarország\",\"numericCode\":\"348\",\"flags\":{\"svg\":\"https://flagcdn.com/hu.svg\",\"png\":\"https://flagcdn.com/w320/hu.png\"},\"currencies\":[{\"code\":\"HUF\",\"name\":\"Hungarian forint\",\"symbol\":\"Ft\"}],\"languages\":[{\"iso639_1\":\"hu\",\"iso639_2\":\"hun\",\"name\":\"Hungarian\",\"nativeName\":\"magyar\"}],\"translations\":{\"br\":\"Hungaria\",\"pt\":\"Hungria\",\"nl\":\"Hongarije\",\"hr\":\"Mađarska\",\"fa\":\"مجارستان\",\"de\":\"Ungarn\",\"es\":\"Hungría\",\"fr\":\"Hongrie\",\"ja\":\"ハンガリー\",\"it\":\"Ungheria\",\"hu\":\"Magyarország\"},\"flag\":\"https://flagcdn.com/hu.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"HUN\",\"independent\":true},{\"name\":\"Hong Kong\",\"topLevelDomain\":[\".hk\"],\"alpha2Code\":\"HK\",\"alpha3Code\":\"HKG\",\"callingCodes\":[\"852\"],\"capital\":\"City of Victoria\",\"altSpellings\":[\"HK\",\"香港\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":7481800,\"latlng\":[22.25,114.16666666],\"demonym\":\"Chinese\",\"area\":1104.0,\"timezones\":[\"UTC+08:00\"],\"borders\":[\"CHN\"],\"nativeName\":\"香港\",\"numericCode\":\"344\",\"flags\":{\"svg\":\"https://flagcdn.com/hk.svg\",\"png\":\"https://flagcdn.com/w320/hk.png\"},\"currencies\":[{\"code\":\"HKD\",\"name\":\"Hong Kong dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"zh\",\"iso639_2\":\"zho\",\"name\":\"Chinese\",\"nativeName\":\"中文 (Zhōngwén)\"}],\"translations\":{\"br\":\"Hong Kong\",\"pt\":\"Hong Kong\",\"nl\":\"Hongkong\",\"hr\":\"Hong Kong\",\"fa\":\"هنگ‌کنگ\",\"de\":\"Hong Kong\",\"es\":\"Hong Kong\",\"fr\":\"Hong Kong\",\"ja\":\"香港\",\"it\":\"Hong Kong\",\"hu\":\"Hong Kong\"},\"flag\":\"https://flagcdn.com/hk.svg\",\"cioc\":\"HKG\",\"independent\":false},{\"name\":\"Iceland\",\"topLevelDomain\":[\".is\"],\"alpha2Code\":\"IS\",\"alpha3Code\":\"ISL\",\"callingCodes\":[\"354\"],\"capital\":\"Reykjavík\",\"altSpellings\":[\"IS\",\"Island\",\"Republic of Iceland\",\"Lýðveldið Ísland\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":366425,\"latlng\":[65.0,-18.0],\"demonym\":\"Icelander\",\"area\":103000.0,\"gini\":26.1,\"timezones\":[\"UTC\"],\"nativeName\":\"Ísland\",\"numericCode\":\"352\",\"flags\":{\"svg\":\"https://flagcdn.com/is.svg\",\"png\":\"https://flagcdn.com/w320/is.png\"},\"currencies\":[{\"code\":\"ISK\",\"name\":\"Icelandic króna\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"is\",\"iso639_2\":\"isl\",\"name\":\"Icelandic\",\"nativeName\":\"Íslenska\"}],\"translations\":{\"br\":\"Island\",\"pt\":\"Islândia\",\"nl\":\"IJsland\",\"hr\":\"Island\",\"fa\":\"ایسلند\",\"de\":\"Island\",\"es\":\"Islandia\",\"fr\":\"Islande\",\"ja\":\"アイスランド\",\"it\":\"Islanda\",\"hu\":\"Izland\"},\"flag\":\"https://flagcdn.com/is.svg\",\"regionalBlocs\":[{\"acronym\":\"EFTA\",\"name\":\"European Free Trade Association\"}],\"cioc\":\"ISL\",\"independent\":true},{\"name\":\"India\",\"topLevelDomain\":[\".in\"],\"alpha2Code\":\"IN\",\"alpha3Code\":\"IND\",\"callingCodes\":[\"91\"],\"capital\":\"New Delhi\",\"altSpellings\":[\"IN\",\"Bhārat\",\"Republic of India\",\"Bharat Ganrajya\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":1380004385,\"latlng\":[20.0,77.0],\"demonym\":\"Indian\",\"area\":3287590.0,\"gini\":35.7,\"timezones\":[\"UTC+05:30\"],\"borders\":[\"AFG\",\"BGD\",\"BTN\",\"MMR\",\"CHN\",\"NPL\",\"PAK\",\"LKA\"],\"nativeName\":\"भारत\",\"numericCode\":\"356\",\"flags\":{\"svg\":\"https://flagcdn.com/in.svg\",\"png\":\"https://flagcdn.com/w320/in.png\"},\"currencies\":[{\"code\":\"INR\",\"name\":\"Indian rupee\",\"symbol\":\"₹\"}],\"languages\":[{\"iso639_1\":\"hi\",\"iso639_2\":\"hin\",\"name\":\"Hindi\",\"nativeName\":\"हिन्दी\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"India\",\"pt\":\"Índia\",\"nl\":\"India\",\"hr\":\"Indija\",\"fa\":\"هند\",\"de\":\"Indien\",\"es\":\"India\",\"fr\":\"Inde\",\"ja\":\"インド\",\"it\":\"India\",\"hu\":\"India\"},\"flag\":\"https://flagcdn.com/in.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"IND\",\"independent\":true},{\"name\":\"Indonesia\",\"topLevelDomain\":[\".id\"],\"alpha2Code\":\"ID\",\"alpha3Code\":\"IDN\",\"callingCodes\":[\"62\"],\"capital\":\"Jakarta\",\"altSpellings\":[\"ID\",\"Republic of Indonesia\",\"Republik Indonesia\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":273523621,\"latlng\":[-5.0,120.0],\"demonym\":\"Indonesian\",\"area\":1904569.0,\"gini\":38.2,\"timezones\":[\"UTC+07:00\",\"UTC+08:00\",\"UTC+09:00\"],\"borders\":[\"TLS\",\"MYS\",\"PNG\"],\"nativeName\":\"Indonesia\",\"numericCode\":\"360\",\"flags\":{\"svg\":\"https://flagcdn.com/id.svg\",\"png\":\"https://flagcdn.com/w320/id.png\"},\"currencies\":[{\"code\":\"IDR\",\"name\":\"Indonesian rupiah\",\"symbol\":\"Rp\"}],\"languages\":[{\"iso639_1\":\"id\",\"iso639_2\":\"ind\",\"name\":\"Indonesian\",\"nativeName\":\"Bahasa Indonesia\"}],\"translations\":{\"br\":\"Indonezia\",\"pt\":\"Indonésia\",\"nl\":\"Indonesië\",\"hr\":\"Indonezija\",\"fa\":\"اندونزی\",\"de\":\"Indonesien\",\"es\":\"Indonesia\",\"fr\":\"Indonésie\",\"ja\":\"インドネシア\",\"it\":\"Indonesia\",\"hu\":\"Indonézia\"},\"flag\":\"https://flagcdn.com/id.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"INA\",\"independent\":true},{\"name\":\"Ivory Coast\",\"topLevelDomain\":[\".ci\"],\"alpha2Code\":\"CI\",\"alpha3Code\":\"CIV\",\"callingCodes\":[\"225\"],\"capital\":\"Yamoussoukro\",\"altSpellings\":[\"CI\",\"Ivory Coast\",\"Republic of Côte d'Ivoire\",\"République de Côte d'Ivoire\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":26378275,\"latlng\":[8.0,-5.0],\"demonym\":\"Ivorian\",\"area\":322463.0,\"gini\":41.5,\"timezones\":[\"UTC\"],\"borders\":[\"BFA\",\"GHA\",\"GIN\",\"LBR\",\"MLI\"],\"nativeName\":\"Côte d'Ivoire\",\"numericCode\":\"384\",\"flags\":{\"svg\":\"https://flagcdn.com/ci.svg\",\"png\":\"https://flagcdn.com/w320/ci.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Aod an Olifant\",\"pt\":\"Costa do Marfim\",\"nl\":\"Ivoorkust\",\"hr\":\"Obala Bjelokosti\",\"fa\":\"ساحل عاج\",\"de\":\"Elfenbeinküste\",\"es\":\"Costa de Marfil\",\"fr\":\"Côte d'Ivoire\",\"ja\":\"コートジボワール\",\"it\":\"Costa D'Avorio\",\"hu\":\"Elefántcsontpart\"},\"flag\":\"https://flagcdn.com/ci.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"CIV\",\"independent\":true},{\"name\":\"Iran (Islamic Republic of)\",\"topLevelDomain\":[\".ir\"],\"alpha2Code\":\"IR\",\"alpha3Code\":\"IRN\",\"callingCodes\":[\"98\"],\"capital\":\"Tehran\",\"altSpellings\":[\"IR\",\"Islamic Republic of Iran\",\"Jomhuri-ye Eslāmi-ye Irān\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":83992953,\"latlng\":[32.0,53.0],\"demonym\":\"Iranian\",\"area\":1648195.0,\"gini\":42.0,\"timezones\":[\"UTC+03:30\"],\"borders\":[\"AFG\",\"ARM\",\"AZE\",\"IRQ\",\"PAK\",\"TUR\",\"TKM\"],\"nativeName\":\"ایران\",\"numericCode\":\"364\",\"flags\":{\"svg\":\"https://flagcdn.com/ir.svg\",\"png\":\"https://flagcdn.com/w320/ir.png\"},\"currencies\":[{\"code\":\"IRR\",\"name\":\"Iranian rial\",\"symbol\":\"﷼\"}],\"languages\":[{\"iso639_1\":\"fa\",\"iso639_2\":\"fas\",\"name\":\"Persian (Farsi)\",\"nativeName\":\"فارسی\"}],\"translations\":{\"br\":\"Iran\",\"pt\":\"Irão\",\"nl\":\"Iran\",\"hr\":\"Iran\",\"fa\":\"ایران\",\"de\":\"Iran\",\"es\":\"Iran\",\"fr\":\"Iran\",\"ja\":\"イラン・イスラム共和国\",\"it\":\"Iran (Islamic Republic of)\",\"hu\":\"Irán\"},\"flag\":\"https://flagcdn.com/ir.svg\",\"cioc\":\"IRI\",\"independent\":true},{\"name\":\"Iraq\",\"topLevelDomain\":[\".iq\"],\"alpha2Code\":\"IQ\",\"alpha3Code\":\"IRQ\",\"callingCodes\":[\"964\"],\"capital\":\"Baghdad\",\"altSpellings\":[\"IQ\",\"Republic of Iraq\",\"Jumhūriyyat al-‘Irāq\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":40222503,\"latlng\":[33.0,44.0],\"demonym\":\"Iraqi\",\"area\":438317.0,\"gini\":29.5,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"IRN\",\"JOR\",\"KWT\",\"SAU\",\"SYR\",\"TUR\"],\"nativeName\":\"العراق\",\"numericCode\":\"368\",\"flags\":{\"svg\":\"https://flagcdn.com/iq.svg\",\"png\":\"https://flagcdn.com/w320/iq.png\"},\"currencies\":[{\"code\":\"IQD\",\"name\":\"Iraqi dinar\",\"symbol\":\"ع.د\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"},{\"iso639_1\":\"ku\",\"iso639_2\":\"kur\",\"name\":\"Kurdish\",\"nativeName\":\"Kurdî\"}],\"translations\":{\"br\":\"Irak\",\"pt\":\"Iraque\",\"nl\":\"Irak\",\"hr\":\"Irak\",\"fa\":\"عراق\",\"de\":\"Irak\",\"es\":\"Irak\",\"fr\":\"Irak\",\"ja\":\"イラク\",\"it\":\"Iraq\",\"hu\":\"Irak\"},\"flag\":\"https://flagcdn.com/iq.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"IRQ\",\"independent\":true},{\"name\":\"Ireland\",\"topLevelDomain\":[\".ie\"],\"alpha2Code\":\"IE\",\"alpha3Code\":\"IRL\",\"callingCodes\":[\"353\"],\"capital\":\"Dublin\",\"altSpellings\":[\"IE\",\"Éire\",\"Republic of Ireland\",\"Poblacht na hÉireann\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":4994724,\"latlng\":[53.0,-8.0],\"demonym\":\"Irish\",\"area\":70273.0,\"gini\":31.4,\"timezones\":[\"UTC\"],\"borders\":[\"GBR\"],\"nativeName\":\"Éire\",\"numericCode\":\"372\",\"flags\":{\"svg\":\"https://flagcdn.com/ie.svg\",\"png\":\"https://flagcdn.com/w320/ie.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"ga\",\"iso639_2\":\"gle\",\"name\":\"Irish\",\"nativeName\":\"Gaeilge\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Iwerzhon\",\"pt\":\"Irlanda\",\"nl\":\"Ierland\",\"hr\":\"Irska\",\"fa\":\"ایرلند\",\"de\":\"Irland\",\"es\":\"Irlanda\",\"fr\":\"Irlande\",\"ja\":\"アイルランド\",\"it\":\"Irlanda\",\"hu\":\"Írország\"},\"flag\":\"https://flagcdn.com/ie.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"IRL\",\"independent\":true},{\"name\":\"Isle of Man\",\"topLevelDomain\":[\".im\"],\"alpha2Code\":\"IM\",\"alpha3Code\":\"IMN\",\"callingCodes\":[\"44\"],\"capital\":\"Douglas\",\"altSpellings\":[\"IM\",\"Ellan Vannin\",\"Mann\",\"Mannin\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":85032,\"latlng\":[54.25,-4.5],\"demonym\":\"Manx\",\"area\":572.0,\"timezones\":[\"UTC+00:00\"],\"nativeName\":\"Isle of Man\",\"numericCode\":\"833\",\"flags\":{\"svg\":\"https://flagcdn.com/im.svg\",\"png\":\"https://flagcdn.com/w320/im.png\"},\"currencies\":[{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"£\"},{\"code\":\"IMP[G]\",\"name\":\"Manx pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"gv\",\"iso639_2\":\"glv\",\"name\":\"Manx\",\"nativeName\":\"Gaelg\"}],\"translations\":{\"br\":\"Enez Vanav\",\"pt\":\"Ilha de Man\",\"nl\":\"Isle of Man\",\"hr\":\"Otok Man\",\"fa\":\"جزیره من\",\"de\":\"Insel Man\",\"es\":\"Isla de Man\",\"fr\":\"Île de Man\",\"ja\":\"マン島\",\"it\":\"Isola di Man\",\"hu\":\"Man\"},\"flag\":\"https://flagcdn.com/im.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"independent\":false},{\"name\":\"Israel\",\"topLevelDomain\":[\".il\"],\"alpha2Code\":\"IL\",\"alpha3Code\":\"ISR\",\"callingCodes\":[\"972\"],\"capital\":\"Jerusalem\",\"altSpellings\":[\"IL\",\"State of Israel\",\"Medīnat Yisrā'el\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":9216900,\"latlng\":[31.5,34.75],\"demonym\":\"Israeli\",\"area\":20770.0,\"gini\":39.0,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"EGY\",\"JOR\",\"LBN\",\"SYR\"],\"nativeName\":\"יִשְׂרָאֵל\",\"numericCode\":\"376\",\"flags\":{\"svg\":\"https://flagcdn.com/il.svg\",\"png\":\"https://flagcdn.com/w320/il.png\"},\"currencies\":[{\"code\":\"ILS\",\"name\":\"Israeli new shekel\",\"symbol\":\"₪\"}],\"languages\":[{\"iso639_1\":\"he\",\"iso639_2\":\"heb\",\"name\":\"Hebrew (modern)\",\"nativeName\":\"עברית\"},{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Israel\",\"pt\":\"Israel\",\"nl\":\"Israël\",\"hr\":\"Izrael\",\"fa\":\"اسرائیل\",\"de\":\"Israel\",\"es\":\"Israel\",\"fr\":\"Israël\",\"ja\":\"イスラエル\",\"it\":\"Israele\",\"hu\":\"Izrael\"},\"flag\":\"https://flagcdn.com/il.svg\",\"cioc\":\"ISR\",\"independent\":true},{\"name\":\"Italy\",\"topLevelDomain\":[\".it\"],\"alpha2Code\":\"IT\",\"alpha3Code\":\"ITA\",\"callingCodes\":[\"39\"],\"capital\":\"Rome\",\"altSpellings\":[\"IT\",\"Italian Republic\",\"Repubblica italiana\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":59554023,\"latlng\":[42.83333333,12.83333333],\"demonym\":\"Italian\",\"area\":301336.0,\"gini\":35.9,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"FRA\",\"SMR\",\"SVN\",\"CHE\",\"VAT\"],\"nativeName\":\"Italia\",\"numericCode\":\"380\",\"flags\":{\"svg\":\"https://flagcdn.com/it.svg\",\"png\":\"https://flagcdn.com/w320/it.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"it\",\"iso639_2\":\"ita\",\"name\":\"Italian\",\"nativeName\":\"Italiano\"}],\"translations\":{\"br\":\"Italia\",\"pt\":\"Itália\",\"nl\":\"Italië\",\"hr\":\"Italija\",\"fa\":\"ایتالیا\",\"de\":\"Italien\",\"es\":\"Italia\",\"fr\":\"Italie\",\"ja\":\"イタリア\",\"it\":\"Italia\",\"hu\":\"Olaszország\"},\"flag\":\"https://flagcdn.com/it.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"ITA\",\"independent\":true},{\"name\":\"Jamaica\",\"topLevelDomain\":[\".jm\"],\"alpha2Code\":\"JM\",\"alpha3Code\":\"JAM\",\"callingCodes\":[\"1\"],\"capital\":\"Kingston\",\"altSpellings\":[\"JM\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":2961161,\"latlng\":[18.25,-77.5],\"demonym\":\"Jamaican\",\"area\":10991.0,\"gini\":45.5,\"timezones\":[\"UTC-05:00\"],\"nativeName\":\"Jamaica\",\"numericCode\":\"388\",\"flags\":{\"svg\":\"https://flagcdn.com/jm.svg\",\"png\":\"https://flagcdn.com/w320/jm.png\"},\"currencies\":[{\"code\":\"JMD\",\"name\":\"Jamaican dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Jamaika\",\"pt\":\"Jamaica\",\"nl\":\"Jamaica\",\"hr\":\"Jamajka\",\"fa\":\"جامائیکا\",\"de\":\"Jamaika\",\"es\":\"Jamaica\",\"fr\":\"Jamaïque\",\"ja\":\"ジャマイカ\",\"it\":\"Giamaica\",\"hu\":\"Jamaica\"},\"flag\":\"https://flagcdn.com/jm.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"JAM\",\"independent\":true},{\"name\":\"Japan\",\"topLevelDomain\":[\".jp\"],\"alpha2Code\":\"JP\",\"alpha3Code\":\"JPN\",\"callingCodes\":[\"81\"],\"capital\":\"Tokyo\",\"altSpellings\":[\"JP\",\"Nippon\",\"Nihon\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":125836021,\"latlng\":[36.0,138.0],\"demonym\":\"Japanese\",\"area\":377930.0,\"gini\":32.9,\"timezones\":[\"UTC+09:00\"],\"nativeName\":\"日本\",\"numericCode\":\"392\",\"flags\":{\"svg\":\"https://flagcdn.com/jp.svg\",\"png\":\"https://flagcdn.com/w320/jp.png\"},\"currencies\":[{\"code\":\"JPY\",\"name\":\"Japanese yen\",\"symbol\":\"¥\"}],\"languages\":[{\"iso639_1\":\"ja\",\"iso639_2\":\"jpn\",\"name\":\"Japanese\",\"nativeName\":\"日本語 (にほんご)\"}],\"translations\":{\"br\":\"Japan\",\"pt\":\"Japão\",\"nl\":\"Japan\",\"hr\":\"Japan\",\"fa\":\"ژاپن\",\"de\":\"Japan\",\"es\":\"Japón\",\"fr\":\"Japon\",\"ja\":\"日本\",\"it\":\"Giappone\",\"hu\":\"Japán\"},\"flag\":\"https://flagcdn.com/jp.svg\",\"cioc\":\"JPN\",\"independent\":true},{\"name\":\"Jersey\",\"topLevelDomain\":[\".je\"],\"alpha2Code\":\"JE\",\"alpha3Code\":\"JEY\",\"callingCodes\":[\"44\"],\"capital\":\"Saint Helier\",\"altSpellings\":[\"JE\",\"Bailiwick of Jersey\",\"Bailliage de Jersey\",\"Bailliage dé Jèrri\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":100800,\"latlng\":[49.25,-2.16666666],\"demonym\":\"Channel Islander\",\"area\":116.0,\"timezones\":[\"UTC+01:00\"],\"nativeName\":\"Jersey\",\"numericCode\":\"832\",\"flags\":{\"svg\":\"https://flagcdn.com/je.svg\",\"png\":\"https://flagcdn.com/w320/je.png\"},\"currencies\":[{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"£\"},{\"code\":\"JEP[G]\",\"name\":\"Jersey pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Jerzenez\",\"pt\":\"Jersey\",\"nl\":\"Jersey\",\"hr\":\"Jersey\",\"fa\":\"جرزی\",\"de\":\"Jersey\",\"es\":\"Jersey\",\"fr\":\"Jersey\",\"ja\":\"ジャージー\",\"it\":\"Isola di Jersey\",\"hu\":\"Jersey\"},\"flag\":\"https://flagcdn.com/je.svg\",\"independent\":false},{\"name\":\"Jordan\",\"topLevelDomain\":[\".jo\"],\"alpha2Code\":\"JO\",\"alpha3Code\":\"JOR\",\"callingCodes\":[\"962\"],\"capital\":\"Amman\",\"altSpellings\":[\"JO\",\"Hashemite Kingdom of Jordan\",\"al-Mamlakah al-Urdunīyah al-Hāshimīyah\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":10203140,\"latlng\":[31.0,36.0],\"demonym\":\"Jordanian\",\"area\":89342.0,\"gini\":33.7,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"IRQ\",\"ISR\",\"SAU\",\"SYR\"],\"nativeName\":\"الأردن\",\"numericCode\":\"400\",\"flags\":{\"svg\":\"https://flagcdn.com/jo.svg\",\"png\":\"https://flagcdn.com/w320/jo.png\"},\"currencies\":[{\"code\":\"JOD\",\"name\":\"Jordanian dinar\",\"symbol\":\"د.ا\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Jordania\",\"pt\":\"Jordânia\",\"nl\":\"Jordanië\",\"hr\":\"Jordan\",\"fa\":\"اردن\",\"de\":\"Jordanien\",\"es\":\"Jordania\",\"fr\":\"Jordanie\",\"ja\":\"ヨルダン\",\"it\":\"Giordania\",\"hu\":\"Jordánia\"},\"flag\":\"https://flagcdn.com/jo.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"JOR\",\"independent\":true},{\"name\":\"Kazakhstan\",\"topLevelDomain\":[\".kz\",\".қаз\"],\"alpha2Code\":\"KZ\",\"alpha3Code\":\"KAZ\",\"callingCodes\":[\"76\",\"77\"],\"capital\":\"Nur-Sultan\",\"altSpellings\":[\"KZ\",\"Qazaqstan\",\"Казахстан\",\"Republic of Kazakhstan\",\"Қазақстан Республикасы\",\"Qazaqstan Respublïkası\",\"Республика Казахстан\",\"Respublika Kazakhstan\"],\"subregion\":\"Central Asia\",\"region\":\"Asia\",\"population\":18754440,\"latlng\":[48.0,68.0],\"demonym\":\"Kazakhstani\",\"area\":2724900.0,\"gini\":27.8,\"timezones\":[\"UTC+05:00\",\"UTC+06:00\"],\"borders\":[\"CHN\",\"KGZ\",\"RUS\",\"TKM\",\"UZB\"],\"nativeName\":\"Қазақстан\",\"numericCode\":\"398\",\"flags\":{\"svg\":\"https://flagcdn.com/kz.svg\",\"png\":\"https://flagcdn.com/w320/kz.png\"},\"currencies\":[{\"code\":\"KZT\",\"name\":\"Kazakhstani tenge\",\"symbol\":\"₸\"}],\"languages\":[{\"iso639_1\":\"kk\",\"iso639_2\":\"kaz\",\"name\":\"Kazakh\",\"nativeName\":\"қазақ тілі\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Kazakstan\",\"pt\":\"Cazaquistão\",\"nl\":\"Kazachstan\",\"hr\":\"Kazahstan\",\"fa\":\"قزاقستان\",\"de\":\"Kasachstan\",\"es\":\"Kazajistán\",\"fr\":\"Kazakhstan\",\"ja\":\"カザフスタン\",\"it\":\"Kazakistan\",\"hu\":\"Kazahsztán\"},\"flag\":\"https://flagcdn.com/kz.svg\",\"regionalBlocs\":[{\"acronym\":\"EEU\",\"name\":\"Eurasian Economic Union\",\"otherAcronyms\":[\"EAEU\"]}],\"cioc\":\"KAZ\",\"independent\":true},{\"name\":\"Kenya\",\"topLevelDomain\":[\".ke\"],\"alpha2Code\":\"KE\",\"alpha3Code\":\"KEN\",\"callingCodes\":[\"254\"],\"capital\":\"Nairobi\",\"altSpellings\":[\"KE\",\"Republic of Kenya\",\"Jamhuri ya Kenya\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":53771300,\"latlng\":[1.0,38.0],\"demonym\":\"Kenyan\",\"area\":580367.0,\"gini\":40.8,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"ETH\",\"SOM\",\"SSD\",\"TZA\",\"UGA\"],\"nativeName\":\"Kenya\",\"numericCode\":\"404\",\"flags\":{\"svg\":\"https://flagcdn.com/ke.svg\",\"png\":\"https://flagcdn.com/w320/ke.png\"},\"currencies\":[{\"code\":\"KES\",\"name\":\"Kenyan shilling\",\"symbol\":\"Sh\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"sw\",\"iso639_2\":\"swa\",\"name\":\"Swahili\",\"nativeName\":\"Kiswahili\"}],\"translations\":{\"br\":\"Kenya\",\"pt\":\"Quénia\",\"nl\":\"Kenia\",\"hr\":\"Kenija\",\"fa\":\"کنیا\",\"de\":\"Kenia\",\"es\":\"Kenia\",\"fr\":\"Kenya\",\"ja\":\"ケニア\",\"it\":\"Kenya\",\"hu\":\"Kenya\"},\"flag\":\"https://flagcdn.com/ke.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"KEN\",\"independent\":true},{\"name\":\"Kiribati\",\"topLevelDomain\":[\".ki\"],\"alpha2Code\":\"KI\",\"alpha3Code\":\"KIR\",\"callingCodes\":[\"686\"],\"capital\":\"South Tarawa\",\"altSpellings\":[\"KI\",\"Republic of Kiribati\",\"Ribaberiki Kiribati\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":119446,\"latlng\":[1.41666666,173.0],\"demonym\":\"I-Kiribati\",\"area\":811.0,\"gini\":37.0,\"timezones\":[\"UTC+12:00\",\"UTC+13:00\",\"UTC+14:00\"],\"nativeName\":\"Kiribati\",\"numericCode\":\"296\",\"flags\":{\"svg\":\"https://flagcdn.com/ki.svg\",\"png\":\"https://flagcdn.com/w320/ki.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"},{\"code\":\"KID\",\"name\":\"Kiribati dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Kiribati\",\"pt\":\"Quiribáti\",\"nl\":\"Kiribati\",\"hr\":\"Kiribati\",\"fa\":\"کیریباتی\",\"de\":\"Kiribati\",\"es\":\"Kiribati\",\"fr\":\"Kiribati\",\"ja\":\"キリバス\",\"it\":\"Kiribati\",\"hu\":\"Kiribati\"},\"flag\":\"https://flagcdn.com/ki.svg\",\"cioc\":\"KIR\",\"independent\":true},{\"name\":\"Kuwait\",\"topLevelDomain\":[\".kw\"],\"alpha2Code\":\"KW\",\"alpha3Code\":\"KWT\",\"callingCodes\":[\"965\"],\"capital\":\"Kuwait City\",\"altSpellings\":[\"KW\",\"State of Kuwait\",\"Dawlat al-Kuwait\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":4270563,\"latlng\":[29.5,45.75],\"demonym\":\"Kuwaiti\",\"area\":17818.0,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"IRQ\",\"SAU\"],\"nativeName\":\"الكويت\",\"numericCode\":\"414\",\"flags\":{\"svg\":\"https://flagcdn.com/kw.svg\",\"png\":\"https://flagcdn.com/w320/kw.png\"},\"currencies\":[{\"code\":\"KWD\",\"name\":\"Kuwaiti dinar\",\"symbol\":\"د.ك\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Koweit\",\"pt\":\"Kuwait\",\"nl\":\"Koeweit\",\"hr\":\"Kuvajt\",\"fa\":\"کویت\",\"de\":\"Kuwait\",\"es\":\"Kuwait\",\"fr\":\"Koweït\",\"ja\":\"クウェート\",\"it\":\"Kuwait\",\"hu\":\"Kuvait\"},\"flag\":\"https://flagcdn.com/kw.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"KUW\",\"independent\":true},{\"name\":\"Kyrgyzstan\",\"topLevelDomain\":[\".kg\"],\"alpha2Code\":\"KG\",\"alpha3Code\":\"KGZ\",\"callingCodes\":[\"996\"],\"capital\":\"Bishkek\",\"altSpellings\":[\"KG\",\"Киргизия\",\"Kyrgyz Republic\",\"Кыргыз Республикасы\",\"Kyrgyz Respublikasy\"],\"subregion\":\"Central Asia\",\"region\":\"Asia\",\"population\":6591600,\"latlng\":[41.0,75.0],\"demonym\":\"Kirghiz\",\"area\":199951.0,\"gini\":29.7,\"timezones\":[\"UTC+06:00\"],\"borders\":[\"CHN\",\"KAZ\",\"TJK\",\"UZB\"],\"nativeName\":\"Кыргызстан\",\"numericCode\":\"417\",\"flags\":{\"svg\":\"https://flagcdn.com/kg.svg\",\"png\":\"https://flagcdn.com/w320/kg.png\"},\"currencies\":[{\"code\":\"KGS\",\"name\":\"Kyrgyzstani som\",\"symbol\":\"с\"}],\"languages\":[{\"iso639_1\":\"ky\",\"iso639_2\":\"kir\",\"name\":\"Kyrgyz\",\"nativeName\":\"Кыргызча\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Kirgizstan\",\"pt\":\"Quirguizistão\",\"nl\":\"Kirgizië\",\"hr\":\"Kirgistan\",\"fa\":\"قرقیزستان\",\"de\":\"Kirgisistan\",\"es\":\"Kirguizistán\",\"fr\":\"Kirghizistan\",\"ja\":\"キルギス\",\"it\":\"Kirghizistan\",\"hu\":\"Kirgizisztán\"},\"flag\":\"https://flagcdn.com/kg.svg\",\"regionalBlocs\":[{\"acronym\":\"EEU\",\"name\":\"Eurasian Economic Union\",\"otherAcronyms\":[\"EAEU\"]}],\"cioc\":\"KGZ\",\"independent\":true},{\"name\":\"Lao People's Democratic Republic\",\"topLevelDomain\":[\".la\"],\"alpha2Code\":\"LA\",\"alpha3Code\":\"LAO\",\"callingCodes\":[\"856\"],\"capital\":\"Vientiane\",\"altSpellings\":[\"LA\",\"Lao\",\"Laos\",\"Lao People's Democratic Republic\",\"Sathalanalat Paxathipatai Paxaxon Lao\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":7275556,\"latlng\":[18.0,105.0],\"demonym\":\"Laotian\",\"area\":236800.0,\"gini\":38.8,\"timezones\":[\"UTC+07:00\"],\"borders\":[\"MMR\",\"KHM\",\"CHN\",\"THA\",\"VNM\"],\"nativeName\":\"ສາທາລະນະລັດ ປະຊາທິປະໄຕ ປະຊາຊົນລາວ\",\"numericCode\":\"418\",\"flags\":{\"svg\":\"https://flagcdn.com/la.svg\",\"png\":\"https://flagcdn.com/w320/la.png\"},\"currencies\":[{\"code\":\"LAK\",\"name\":\"Lao kip\",\"symbol\":\"₭\"}],\"languages\":[{\"iso639_1\":\"lo\",\"iso639_2\":\"lao\",\"name\":\"Lao\",\"nativeName\":\"ພາສາລາວ\"}],\"translations\":{\"br\":\"Laos\",\"pt\":\"Laos\",\"nl\":\"Laos\",\"hr\":\"Laos\",\"fa\":\"لائوس\",\"de\":\"Laos\",\"es\":\"Laos\",\"fr\":\"Laos\",\"ja\":\"ラオス人民民主共和国\",\"it\":\"Laos\",\"hu\":\"Laosz\"},\"flag\":\"https://flagcdn.com/la.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"LAO\",\"independent\":true},{\"name\":\"Latvia\",\"topLevelDomain\":[\".lv\"],\"alpha2Code\":\"LV\",\"alpha3Code\":\"LVA\",\"callingCodes\":[\"371\"],\"capital\":\"Riga\",\"altSpellings\":[\"LV\",\"Republic of Latvia\",\"Latvijas Republika\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":1901548,\"latlng\":[57.0,25.0],\"demonym\":\"Latvian\",\"area\":64559.0,\"gini\":35.1,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BLR\",\"EST\",\"LTU\",\"RUS\"],\"nativeName\":\"Latvija\",\"numericCode\":\"428\",\"flags\":{\"svg\":\"https://flagcdn.com/lv.svg\",\"png\":\"https://flagcdn.com/w320/lv.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"lv\",\"iso639_2\":\"lav\",\"name\":\"Latvian\",\"nativeName\":\"latviešu valoda\"}],\"translations\":{\"br\":\"Latvia\",\"pt\":\"Letónia\",\"nl\":\"Letland\",\"hr\":\"Latvija\",\"fa\":\"لتونی\",\"de\":\"Lettland\",\"es\":\"Letonia\",\"fr\":\"Lettonie\",\"ja\":\"ラトビア\",\"it\":\"Lettonia\",\"hu\":\"Lettország\"},\"flag\":\"https://flagcdn.com/lv.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"LAT\",\"independent\":true},{\"name\":\"Lebanon\",\"topLevelDomain\":[\".lb\"],\"alpha2Code\":\"LB\",\"alpha3Code\":\"LBN\",\"callingCodes\":[\"961\"],\"capital\":\"Beirut\",\"altSpellings\":[\"LB\",\"Lebanese Republic\",\"Al-Jumhūrīyah Al-Libnānīyah\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":6825442,\"latlng\":[33.83333333,35.83333333],\"demonym\":\"Lebanese\",\"area\":10452.0,\"gini\":31.8,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"ISR\",\"SYR\"],\"nativeName\":\"لبنان\",\"numericCode\":\"422\",\"flags\":{\"svg\":\"https://flagcdn.com/lb.svg\",\"png\":\"https://flagcdn.com/w320/lb.png\"},\"currencies\":[{\"code\":\"LBP\",\"name\":\"Lebanese pound\",\"symbol\":\"ل.ل\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Liban\",\"pt\":\"Líbano\",\"nl\":\"Libanon\",\"hr\":\"Libanon\",\"fa\":\"لبنان\",\"de\":\"Libanon\",\"es\":\"Líbano\",\"fr\":\"Liban\",\"ja\":\"レバノン\",\"it\":\"Libano\",\"hu\":\"Libanon\"},\"flag\":\"https://flagcdn.com/lb.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"LIB\",\"independent\":true},{\"name\":\"Lesotho\",\"topLevelDomain\":[\".ls\"],\"alpha2Code\":\"LS\",\"alpha3Code\":\"LSO\",\"callingCodes\":[\"266\"],\"capital\":\"Maseru\",\"altSpellings\":[\"LS\",\"Kingdom of Lesotho\",\"Muso oa Lesotho\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":2142252,\"latlng\":[-29.5,28.5],\"demonym\":\"Mosotho\",\"area\":30355.0,\"gini\":44.9,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"ZAF\"],\"nativeName\":\"Lesotho\",\"numericCode\":\"426\",\"flags\":{\"svg\":\"https://flagcdn.com/ls.svg\",\"png\":\"https://flagcdn.com/w320/ls.png\"},\"currencies\":[{\"code\":\"LSL\",\"name\":\"Lesotho loti\",\"symbol\":\"L\"},{\"code\":\"ZAR\",\"name\":\"South African rand\",\"symbol\":\"R\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"st\",\"iso639_2\":\"sot\",\"name\":\"Southern Sotho\",\"nativeName\":\"Sesotho\"}],\"translations\":{\"br\":\"Lesotho\",\"pt\":\"Lesoto\",\"nl\":\"Lesotho\",\"hr\":\"Lesoto\",\"fa\":\"لسوتو\",\"de\":\"Lesotho\",\"es\":\"Lesotho\",\"fr\":\"Lesotho\",\"ja\":\"レソト\",\"it\":\"Lesotho\",\"hu\":\"Lesotho\"},\"flag\":\"https://flagcdn.com/ls.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"LES\",\"independent\":true},{\"name\":\"Liberia\",\"topLevelDomain\":[\".lr\"],\"alpha2Code\":\"LR\",\"alpha3Code\":\"LBR\",\"callingCodes\":[\"231\"],\"capital\":\"Monrovia\",\"altSpellings\":[\"LR\",\"Republic of Liberia\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":5057677,\"latlng\":[6.5,-9.5],\"demonym\":\"Liberian\",\"area\":111369.0,\"gini\":35.3,\"timezones\":[\"UTC\"],\"borders\":[\"GIN\",\"CIV\",\"SLE\"],\"nativeName\":\"Liberia\",\"numericCode\":\"430\",\"flags\":{\"svg\":\"https://flagcdn.com/lr.svg\",\"png\":\"https://flagcdn.com/w320/lr.png\"},\"currencies\":[{\"code\":\"LRD\",\"name\":\"Liberian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Liberia\",\"pt\":\"Libéria\",\"nl\":\"Liberia\",\"hr\":\"Liberija\",\"fa\":\"لیبریا\",\"de\":\"Liberia\",\"es\":\"Liberia\",\"fr\":\"Liberia\",\"ja\":\"リベリア\",\"it\":\"Liberia\",\"hu\":\"Libéria\"},\"flag\":\"https://flagcdn.com/lr.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"LBR\",\"independent\":true},{\"name\":\"Libya\",\"topLevelDomain\":[\".ly\"],\"alpha2Code\":\"LY\",\"alpha3Code\":\"LBY\",\"callingCodes\":[\"218\"],\"capital\":\"Tripoli\",\"altSpellings\":[\"LY\",\"State of Libya\",\"Dawlat Libya\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":6871287,\"latlng\":[25.0,17.0],\"demonym\":\"Libyan\",\"area\":1759540.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"DZA\",\"TCD\",\"EGY\",\"NER\",\"SDN\",\"TUN\"],\"nativeName\":\"‏ليبيا\",\"numericCode\":\"434\",\"flags\":{\"svg\":\"https://flagcdn.com/ly.svg\",\"png\":\"https://flagcdn.com/w320/ly.png\"},\"currencies\":[{\"code\":\"LYD\",\"name\":\"Libyan dinar\",\"symbol\":\"ل.د\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Libia\",\"pt\":\"Líbia\",\"nl\":\"Libië\",\"hr\":\"Libija\",\"fa\":\"لیبی\",\"de\":\"Libyen\",\"es\":\"Libia\",\"fr\":\"Libye\",\"ja\":\"リビア\",\"it\":\"Libia\",\"hu\":\"Líbia\"},\"flag\":\"https://flagcdn.com/ly.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"LBA\",\"independent\":true},{\"name\":\"Liechtenstein\",\"topLevelDomain\":[\".li\"],\"alpha2Code\":\"LI\",\"alpha3Code\":\"LIE\",\"callingCodes\":[\"423\"],\"capital\":\"Vaduz\",\"altSpellings\":[\"LI\",\"Principality of Liechtenstein\",\"Fürstentum Liechtenstein\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":38137,\"latlng\":[47.26666666,9.53333333],\"demonym\":\"Liechtensteiner\",\"area\":160.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"CHE\"],\"nativeName\":\"Liechtenstein\",\"numericCode\":\"438\",\"flags\":{\"svg\":\"https://flagcdn.com/li.svg\",\"png\":\"https://flagcdn.com/w320/li.png\"},\"currencies\":[{\"code\":\"CHF\",\"name\":\"Swiss franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"}],\"translations\":{\"br\":\"Liechtenstein\",\"pt\":\"Listenstaine\",\"nl\":\"Liechtenstein\",\"hr\":\"Lihtenštajn\",\"fa\":\"لیختن‌اشتاین\",\"de\":\"Liechtenstein\",\"es\":\"Liechtenstein\",\"fr\":\"Liechtenstein\",\"ja\":\"リヒテンシュタイン\",\"it\":\"Liechtenstein\",\"hu\":\"Liechtenstein\"},\"flag\":\"https://flagcdn.com/li.svg\",\"regionalBlocs\":[{\"acronym\":\"EFTA\",\"name\":\"European Free Trade Association\"}],\"cioc\":\"LIE\",\"independent\":true},{\"name\":\"Lithuania\",\"topLevelDomain\":[\".lt\"],\"alpha2Code\":\"LT\",\"alpha3Code\":\"LTU\",\"callingCodes\":[\"370\"],\"capital\":\"Vilnius\",\"altSpellings\":[\"LT\",\"Republic of Lithuania\",\"Lietuvos Respublika\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":2794700,\"latlng\":[56.0,24.0],\"demonym\":\"Lithuanian\",\"area\":65300.0,\"gini\":35.7,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BLR\",\"LVA\",\"POL\",\"RUS\"],\"nativeName\":\"Lietuva\",\"numericCode\":\"440\",\"flags\":{\"svg\":\"https://flagcdn.com/lt.svg\",\"png\":\"https://flagcdn.com/w320/lt.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"lt\",\"iso639_2\":\"lit\",\"name\":\"Lithuanian\",\"nativeName\":\"lietuvių kalba\"}],\"translations\":{\"br\":\"Lituania\",\"pt\":\"Lituânia\",\"nl\":\"Litouwen\",\"hr\":\"Litva\",\"fa\":\"لیتوانی\",\"de\":\"Litauen\",\"es\":\"Lituania\",\"fr\":\"Lituanie\",\"ja\":\"リトアニア\",\"it\":\"Lituania\",\"hu\":\"Litvánia\"},\"flag\":\"https://flagcdn.com/lt.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"LTU\",\"independent\":true},{\"name\":\"Luxembourg\",\"topLevelDomain\":[\".lu\"],\"alpha2Code\":\"LU\",\"alpha3Code\":\"LUX\",\"callingCodes\":[\"352\"],\"capital\":\"Luxembourg\",\"altSpellings\":[\"LU\",\"Grand Duchy of Luxembourg\",\"Grand-Duché de Luxembourg\",\"Großherzogtum Luxemburg\",\"Groussherzogtum Lëtzebuerg\"],\"subregion\":\"Western Europe\",\"region\":\"Europe\",\"population\":632275,\"latlng\":[49.75,6.16666666],\"demonym\":\"Luxembourger\",\"area\":2586.0,\"gini\":35.4,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"BEL\",\"FRA\",\"DEU\"],\"nativeName\":\"Lëtzebuerg\",\"numericCode\":\"442\",\"flags\":{\"svg\":\"https://flagcdn.com/lu.svg\",\"png\":\"https://flagcdn.com/w320/lu.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"},{\"iso639_1\":\"lb\",\"iso639_2\":\"ltz\",\"name\":\"Luxembourgish\",\"nativeName\":\"Lëtzebuergesch\"}],\"translations\":{\"br\":\"Luksembourg\",\"pt\":\"Luxemburgo\",\"nl\":\"Luxemburg\",\"hr\":\"Luksemburg\",\"fa\":\"لوکزامبورگ\",\"de\":\"Luxemburg\",\"es\":\"Luxemburgo\",\"fr\":\"Luxembourg\",\"ja\":\"ルクセンブルク\",\"it\":\"Lussemburgo\",\"hu\":\"Luxemburg\"},\"flag\":\"https://flagcdn.com/lu.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"LUX\",\"independent\":true},{\"name\":\"Macao\",\"topLevelDomain\":[\".mo\"],\"alpha2Code\":\"MO\",\"alpha3Code\":\"MAC\",\"callingCodes\":[\"853\"],\"altSpellings\":[\"MO\",\"澳门\",\"Macao Special Administrative Region of the People's Republic of China\",\"中華人民共和國澳門特別行政區\",\"Região Administrativa Especial de Macau da República Popular da China\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":649342,\"latlng\":[22.16666666,113.55],\"demonym\":\"Chinese\",\"area\":30.0,\"timezones\":[\"UTC+08:00\"],\"borders\":[\"CHN\"],\"nativeName\":\"澳門\",\"numericCode\":\"446\",\"flags\":{\"svg\":\"https://flagcdn.com/mo.svg\",\"png\":\"https://flagcdn.com/w320/mo.png\"},\"currencies\":[{\"code\":\"MOP\",\"name\":\"Macanese pataca\",\"symbol\":\"P\"}],\"languages\":[{\"iso639_1\":\"zh\",\"iso639_2\":\"zho\",\"name\":\"Chinese\",\"nativeName\":\"中文 (Zhōngwén)\"},{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Makao\",\"pt\":\"Macau\",\"nl\":\"Macao\",\"hr\":\"Makao\",\"fa\":\"مکائو\",\"de\":\"Macao\",\"es\":\"Macao\",\"fr\":\"Macao\",\"ja\":\"マカオ\",\"it\":\"Macao\",\"hu\":\"Makaó\"},\"flag\":\"https://flagcdn.com/mo.svg\",\"independent\":false},{\"name\":\"North Macedonia\",\"topLevelDomain\":[\".mk\"],\"alpha2Code\":\"MK\",\"alpha3Code\":\"MKD\",\"callingCodes\":[\"389\"],\"capital\":\"Skopje\",\"altSpellings\":[\"MK\",\"Republic of Macedonia\",\"Република Македонија\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":2083380,\"latlng\":[41.83333333,22.0],\"demonym\":\"Macedonian\",\"area\":25713.0,\"gini\":33.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"ALB\",\"BGR\",\"GRC\",\"UNK\",\"SRB\"],\"nativeName\":\"Македонија\",\"numericCode\":\"807\",\"flags\":{\"svg\":\"https://flagcdn.com/mk.svg\",\"png\":\"https://flagcdn.com/w320/mk.png\"},\"currencies\":[{\"code\":\"MKD\",\"name\":\"Macedonian denar\",\"symbol\":\"ден\"}],\"languages\":[{\"iso639_1\":\"mk\",\"iso639_2\":\"mkd\",\"name\":\"Macedonian\",\"nativeName\":\"македонски јазик\"}],\"translations\":{\"br\":\"Makedonia an Norzh\",\"pt\":\"Macedónia\",\"nl\":\"Macedonië\",\"hr\":\"Makedonija\",\"de\":\"Mazedonien\",\"es\":\"Macedonia\",\"fr\":\"Macédoine\",\"ja\":\"マケドニア旧ユーゴスラビア共和国\",\"it\":\"Macedonia\",\"hu\":\"Macedónia\"},\"flag\":\"https://flagcdn.com/mk.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"cioc\":\"MKD\",\"independent\":true},{\"name\":\"Madagascar\",\"topLevelDomain\":[\".mg\"],\"alpha2Code\":\"MG\",\"alpha3Code\":\"MDG\",\"callingCodes\":[\"261\"],\"capital\":\"Antananarivo\",\"altSpellings\":[\"MG\",\"Republic of Madagascar\",\"Repoblikan'i Madagasikara\",\"République de Madagascar\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":27691019,\"latlng\":[-20.0,47.0],\"demonym\":\"Malagasy\",\"area\":587041.0,\"gini\":42.6,\"timezones\":[\"UTC+03:00\"],\"nativeName\":\"Madagasikara\",\"numericCode\":\"450\",\"flags\":{\"svg\":\"https://flagcdn.com/mg.svg\",\"png\":\"https://flagcdn.com/w320/mg.png\"},\"currencies\":[{\"code\":\"MGA\",\"name\":\"Malagasy ariary\",\"symbol\":\"Ar\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"mg\",\"iso639_2\":\"mlg\",\"name\":\"Malagasy\",\"nativeName\":\"fiteny malagasy\"}],\"translations\":{\"br\":\"Madagaskar\",\"pt\":\"Madagáscar\",\"nl\":\"Madagaskar\",\"hr\":\"Madagaskar\",\"fa\":\"ماداگاسکار\",\"de\":\"Madagaskar\",\"es\":\"Madagascar\",\"fr\":\"Madagascar\",\"ja\":\"マダガスカル\",\"it\":\"Madagascar\",\"hu\":\"Madagaszkár\"},\"flag\":\"https://flagcdn.com/mg.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"MAD\",\"independent\":true},{\"name\":\"Malawi\",\"topLevelDomain\":[\".mw\"],\"alpha2Code\":\"MW\",\"alpha3Code\":\"MWI\",\"callingCodes\":[\"265\"],\"capital\":\"Lilongwe\",\"altSpellings\":[\"MW\",\"Republic of Malawi\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":19129955,\"latlng\":[-13.5,34.0],\"demonym\":\"Malawian\",\"area\":118484.0,\"gini\":44.7,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"MOZ\",\"TZA\",\"ZMB\"],\"nativeName\":\"Malawi\",\"numericCode\":\"454\",\"flags\":{\"svg\":\"https://flagcdn.com/mw.svg\",\"png\":\"https://flagcdn.com/w320/mw.png\"},\"currencies\":[{\"code\":\"MWK\",\"name\":\"Malawian kwacha\",\"symbol\":\"MK\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"ny\",\"iso639_2\":\"nya\",\"name\":\"Chichewa\",\"nativeName\":\"chiCheŵa\"}],\"translations\":{\"br\":\"Malawi\",\"pt\":\"Malávi\",\"nl\":\"Malawi\",\"hr\":\"Malavi\",\"fa\":\"مالاوی\",\"de\":\"Malawi\",\"es\":\"Malawi\",\"fr\":\"Malawi\",\"ja\":\"マラウイ\",\"it\":\"Malawi\",\"hu\":\"Malawi\"},\"flag\":\"https://flagcdn.com/mw.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"MAW\",\"independent\":true},{\"name\":\"Malaysia\",\"topLevelDomain\":[\".my\"],\"alpha2Code\":\"MY\",\"alpha3Code\":\"MYS\",\"callingCodes\":[\"60\"],\"capital\":\"Kuala Lumpur\",\"altSpellings\":[\"MY\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":32365998,\"latlng\":[2.5,112.5],\"demonym\":\"Malaysian\",\"area\":330803.0,\"gini\":41.1,\"timezones\":[\"UTC+08:00\"],\"borders\":[\"BRN\",\"IDN\",\"THA\"],\"nativeName\":\"Malaysia\",\"numericCode\":\"458\",\"flags\":{\"svg\":\"https://flagcdn.com/my.svg\",\"png\":\"https://flagcdn.com/w320/my.png\"},\"currencies\":[{\"code\":\"MYR\",\"name\":\"Malaysian ringgit\",\"symbol\":\"RM\"}],\"languages\":[{\"iso639_1\":\"ms\",\"iso639_2\":\"zsm\",\"name\":\"Malaysian\",\"nativeName\":\"بهاس مليسيا\"}],\"translations\":{\"br\":\"Malaysia\",\"pt\":\"Malásia\",\"nl\":\"Maleisië\",\"hr\":\"Malezija\",\"fa\":\"مالزی\",\"de\":\"Malaysia\",\"es\":\"Malasia\",\"fr\":\"Malaisie\",\"ja\":\"マレーシア\",\"it\":\"Malesia\",\"hu\":\"Malajzia\"},\"flag\":\"https://flagcdn.com/my.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"MAS\",\"independent\":true},{\"name\":\"Maldives\",\"topLevelDomain\":[\".mv\"],\"alpha2Code\":\"MV\",\"alpha3Code\":\"MDV\",\"callingCodes\":[\"960\"],\"capital\":\"Malé\",\"altSpellings\":[\"MV\",\"Maldive Islands\",\"Republic of the Maldives\",\"Dhivehi Raajjeyge Jumhooriyya\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":540542,\"latlng\":[3.25,73.0],\"demonym\":\"Maldivan\",\"area\":300.0,\"gini\":31.3,\"timezones\":[\"UTC+05:00\"],\"nativeName\":\"Maldives\",\"numericCode\":\"462\",\"flags\":{\"svg\":\"https://flagcdn.com/mv.svg\",\"png\":\"https://flagcdn.com/w320/mv.png\"},\"currencies\":[{\"code\":\"MVR\",\"name\":\"Maldivian rufiyaa\",\"symbol\":\".ރ\"}],\"languages\":[{\"iso639_1\":\"dv\",\"iso639_2\":\"div\",\"name\":\"Divehi\",\"nativeName\":\"ދިވެހި\"}],\"translations\":{\"br\":\"Maldivez\",\"pt\":\"Maldivas\",\"nl\":\"Maldiven\",\"hr\":\"Maldivi\",\"fa\":\"مالدیو\",\"de\":\"Malediven\",\"es\":\"Maldivas\",\"fr\":\"Maldives\",\"ja\":\"モルディブ\",\"it\":\"Maldive\",\"hu\":\"Maldív-szigetek\"},\"flag\":\"https://flagcdn.com/mv.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"MDV\",\"independent\":true},{\"name\":\"Mali\",\"topLevelDomain\":[\".ml\"],\"alpha2Code\":\"ML\",\"alpha3Code\":\"MLI\",\"callingCodes\":[\"223\"],\"capital\":\"Bamako\",\"altSpellings\":[\"ML\",\"Republic of Mali\",\"République du Mali\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":20250834,\"latlng\":[17.0,-4.0],\"demonym\":\"Malian\",\"area\":1240192.0,\"gini\":33.0,\"timezones\":[\"UTC\"],\"borders\":[\"DZA\",\"BFA\",\"GIN\",\"CIV\",\"MRT\",\"NER\",\"SEN\"],\"nativeName\":\"Mali\",\"numericCode\":\"466\",\"flags\":{\"svg\":\"https://flagcdn.com/ml.svg\",\"png\":\"https://flagcdn.com/w320/ml.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Mali\",\"pt\":\"Mali\",\"nl\":\"Mali\",\"hr\":\"Mali\",\"fa\":\"مالی\",\"de\":\"Mali\",\"es\":\"Mali\",\"fr\":\"Mali\",\"ja\":\"マリ\",\"it\":\"Mali\",\"hu\":\"Mali\"},\"flag\":\"https://flagcdn.com/ml.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"MLI\",\"independent\":true},{\"name\":\"Malta\",\"topLevelDomain\":[\".mt\"],\"alpha2Code\":\"MT\",\"alpha3Code\":\"MLT\",\"callingCodes\":[\"356\"],\"capital\":\"Valletta\",\"altSpellings\":[\"MT\",\"Republic of Malta\",\"Repubblika ta' Malta\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":525285,\"latlng\":[35.83333333,14.58333333],\"demonym\":\"Maltese\",\"area\":316.0,\"gini\":28.7,\"timezones\":[\"UTC+01:00\"],\"nativeName\":\"Malta\",\"numericCode\":\"470\",\"flags\":{\"svg\":\"https://flagcdn.com/mt.svg\",\"png\":\"https://flagcdn.com/w320/mt.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"mt\",\"iso639_2\":\"mlt\",\"name\":\"Maltese\",\"nativeName\":\"Malti\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Malta\",\"pt\":\"Malta\",\"nl\":\"Malta\",\"hr\":\"Malta\",\"fa\":\"مالت\",\"de\":\"Malta\",\"es\":\"Malta\",\"fr\":\"Malte\",\"ja\":\"マルタ\",\"it\":\"Malta\",\"hu\":\"Málta\"},\"flag\":\"https://flagcdn.com/mt.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"MLT\",\"independent\":true},{\"name\":\"Marshall Islands\",\"topLevelDomain\":[\".mh\"],\"alpha2Code\":\"MH\",\"alpha3Code\":\"MHL\",\"callingCodes\":[\"692\"],\"capital\":\"Majuro\",\"altSpellings\":[\"MH\",\"Republic of the Marshall Islands\",\"Aolepān Aorōkin M̧ajeļ\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":59194,\"latlng\":[9.0,168.0],\"demonym\":\"Marshallese\",\"area\":181.0,\"timezones\":[\"UTC+12:00\"],\"nativeName\":\"M̧ajeļ\",\"numericCode\":\"584\",\"flags\":{\"svg\":\"https://flagcdn.com/mh.svg\",\"png\":\"https://flagcdn.com/w320/mh.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"mh\",\"iso639_2\":\"mah\",\"name\":\"Marshallese\",\"nativeName\":\"Kajin M̧ajeļ\"}],\"translations\":{\"br\":\"Inizi Marshall\",\"pt\":\"Ilhas Marshall\",\"nl\":\"Marshalleilanden\",\"hr\":\"Maršalovi Otoci\",\"fa\":\"جزایر مارشال\",\"de\":\"Marshallinseln\",\"es\":\"Islas Marshall\",\"fr\":\"Îles Marshall\",\"ja\":\"マーシャル諸島\",\"it\":\"Isole Marshall\",\"hu\":\"Marshall-szigetek\"},\"flag\":\"https://flagcdn.com/mh.svg\",\"cioc\":\"MHL\",\"independent\":true},{\"name\":\"Martinique\",\"topLevelDomain\":[\".mq\"],\"alpha2Code\":\"MQ\",\"alpha3Code\":\"MTQ\",\"callingCodes\":[\"596\"],\"capital\":\"Fort-de-France\",\"altSpellings\":[\"MQ\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":378243,\"latlng\":[14.666667,-61.0],\"demonym\":\"French\",\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Martinique\",\"numericCode\":\"474\",\"flags\":{\"svg\":\"https://flagcdn.com/mq.svg\",\"png\":\"https://flagcdn.com/w320/mq.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Martinik\",\"pt\":\"Martinica\",\"nl\":\"Martinique\",\"hr\":\"Martinique\",\"fa\":\"مونتسرات\",\"de\":\"Martinique\",\"es\":\"Martinica\",\"fr\":\"Martinique\",\"ja\":\"マルティニーク\",\"it\":\"Martinica\",\"hu\":\"Martinique\"},\"flag\":\"https://flagcdn.com/mq.svg\",\"independent\":false},{\"name\":\"Mauritania\",\"topLevelDomain\":[\".mr\"],\"alpha2Code\":\"MR\",\"alpha3Code\":\"MRT\",\"callingCodes\":[\"222\"],\"capital\":\"Nouakchott\",\"altSpellings\":[\"MR\",\"Islamic Republic of Mauritania\",\"al-Jumhūriyyah al-ʾIslāmiyyah al-Mūrītāniyyah\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":4649660,\"latlng\":[20.0,-12.0],\"demonym\":\"Mauritanian\",\"area\":1030700.0,\"gini\":32.6,\"timezones\":[\"UTC\"],\"borders\":[\"DZA\",\"MLI\",\"SEN\",\"ESH\"],\"nativeName\":\"موريتانيا\",\"numericCode\":\"478\",\"flags\":{\"svg\":\"https://flagcdn.com/mr.svg\",\"png\":\"https://flagcdn.com/w320/mr.png\"},\"currencies\":[{\"code\":\"MRO\",\"name\":\"Mauritanian ouguiya\",\"symbol\":\"UM\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Maouritania\",\"pt\":\"Mauritânia\",\"nl\":\"Mauritanië\",\"hr\":\"Mauritanija\",\"fa\":\"موریتانی\",\"de\":\"Mauretanien\",\"es\":\"Mauritania\",\"fr\":\"Mauritanie\",\"ja\":\"モーリタニア\",\"it\":\"Mauritania\",\"hu\":\"Mauritánia\"},\"flag\":\"https://flagcdn.com/mr.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"MTN\",\"independent\":true},{\"name\":\"Mauritius\",\"topLevelDomain\":[\".mu\"],\"alpha2Code\":\"MU\",\"alpha3Code\":\"MUS\",\"callingCodes\":[\"230\"],\"capital\":\"Port Louis\",\"altSpellings\":[\"MU\",\"Republic of Mauritius\",\"République de Maurice\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":1265740,\"latlng\":[-20.28333333,57.55],\"demonym\":\"Mauritian\",\"area\":2040.0,\"gini\":36.8,\"timezones\":[\"UTC+04:00\"],\"nativeName\":\"Maurice\",\"numericCode\":\"480\",\"flags\":{\"svg\":\"https://flagcdn.com/mu.svg\",\"png\":\"https://flagcdn.com/w320/mu.png\"},\"currencies\":[{\"code\":\"MUR\",\"name\":\"Mauritian rupee\",\"symbol\":\"₨\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Moris\",\"pt\":\"Maurícia\",\"nl\":\"Mauritius\",\"hr\":\"Mauricijus\",\"fa\":\"موریس\",\"de\":\"Mauritius\",\"es\":\"Mauricio\",\"fr\":\"Île Maurice\",\"ja\":\"モーリシャス\",\"it\":\"Mauritius\",\"hu\":\"Mauritius\"},\"flag\":\"https://flagcdn.com/mu.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"MRI\",\"independent\":true},{\"name\":\"Mayotte\",\"topLevelDomain\":[\".yt\"],\"alpha2Code\":\"YT\",\"alpha3Code\":\"MYT\",\"callingCodes\":[\"262\"],\"capital\":\"Mamoudzou\",\"altSpellings\":[\"YT\",\"Department of Mayotte\",\"Département de Mayotte\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":226915,\"latlng\":[-12.83333333,45.16666666],\"demonym\":\"French\",\"timezones\":[\"UTC+03:00\"],\"nativeName\":\"Mayotte\",\"numericCode\":\"175\",\"flags\":{\"svg\":\"https://flagcdn.com/yt.svg\",\"png\":\"https://flagcdn.com/w320/yt.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Mayotte\",\"pt\":\"Mayotte\",\"nl\":\"Mayotte\",\"hr\":\"Mayotte\",\"fa\":\"مایوت\",\"de\":\"Mayotte\",\"es\":\"Mayotte\",\"fr\":\"Mayotte\",\"ja\":\"マヨット\",\"it\":\"Mayotte\",\"hu\":\"Mayotte\"},\"flag\":\"https://flagcdn.com/yt.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"independent\":false},{\"name\":\"Mexico\",\"topLevelDomain\":[\".mx\"],\"alpha2Code\":\"MX\",\"alpha3Code\":\"MEX\",\"callingCodes\":[\"52\"],\"capital\":\"Mexico City\",\"altSpellings\":[\"MX\",\"Mexicanos\",\"United Mexican States\",\"Estados Unidos Mexicanos\"],\"subregion\":\"North America\",\"region\":\"Americas\",\"population\":128932753,\"latlng\":[23.0,-102.0],\"demonym\":\"Mexican\",\"area\":1964375.0,\"gini\":45.4,\"timezones\":[\"UTC-08:00\",\"UTC-07:00\",\"UTC-06:00\"],\"borders\":[\"BLZ\",\"GTM\",\"USA\"],\"nativeName\":\"México\",\"numericCode\":\"484\",\"flags\":{\"svg\":\"https://flagcdn.com/mx.svg\",\"png\":\"https://flagcdn.com/w320/mx.png\"},\"currencies\":[{\"code\":\"MXN\",\"name\":\"Mexican peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Mec'hiko\",\"pt\":\"México\",\"nl\":\"Mexico\",\"hr\":\"Meksiko\",\"fa\":\"مکزیک\",\"de\":\"Mexiko\",\"es\":\"México\",\"fr\":\"Mexique\",\"ja\":\"メキシコ\",\"it\":\"Messico\",\"hu\":\"Mexikó\"},\"flag\":\"https://flagcdn.com/mx.svg\",\"regionalBlocs\":[{\"acronym\":\"PA\",\"name\":\"Pacific Alliance\",\"otherNames\":[\"Alianza del Pacífico\"]},{\"acronym\":\"NAFTA\",\"name\":\"North American Free Trade Agreement\",\"otherNames\":[\"Tratado de Libre Comercio de América del Norte\",\"Accord de Libre-échange Nord-Américain\"]}],\"cioc\":\"MEX\",\"independent\":true},{\"name\":\"Micronesia (Federated States of)\",\"topLevelDomain\":[\".fm\"],\"alpha2Code\":\"FM\",\"alpha3Code\":\"FSM\",\"callingCodes\":[\"691\"],\"capital\":\"Palikir\",\"altSpellings\":[\"FM\",\"Federated States of Micronesia\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":115021,\"latlng\":[6.91666666,158.25],\"demonym\":\"Micronesian\",\"area\":702.0,\"gini\":40.1,\"timezones\":[\"UTC+10:00\",\"UTC+11:00\"],\"nativeName\":\"Micronesia\",\"numericCode\":\"583\",\"flags\":{\"svg\":\"https://flagcdn.com/fm.svg\",\"png\":\"https://flagcdn.com/w320/fm.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Mikronezia\",\"pt\":\"Micronésia\",\"nl\":\"Micronesië\",\"hr\":\"Mikronezija\",\"fa\":\"ایالات فدرال میکرونزی\",\"de\":\"Mikronesien\",\"es\":\"Micronesia\",\"fr\":\"Micronésie\",\"ja\":\"ミクロネシア連邦\",\"it\":\"Micronesia\",\"hu\":\"Mikronézia\"},\"flag\":\"https://flagcdn.com/fm.svg\",\"cioc\":\"FSM\",\"independent\":true},{\"name\":\"Moldova (Republic of)\",\"topLevelDomain\":[\".md\"],\"alpha2Code\":\"MD\",\"alpha3Code\":\"MDA\",\"callingCodes\":[\"373\"],\"capital\":\"Chișinău\",\"altSpellings\":[\"MD\",\"Republic of Moldova\",\"Republica Moldova\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":2617820,\"latlng\":[47.0,29.0],\"demonym\":\"Moldovan\",\"area\":33846.0,\"gini\":25.7,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"ROU\",\"UKR\"],\"nativeName\":\"Moldova\",\"numericCode\":\"498\",\"flags\":{\"svg\":\"https://flagcdn.com/md.svg\",\"png\":\"https://flagcdn.com/w320/md.png\"},\"currencies\":[{\"code\":\"MDL\",\"name\":\"Moldovan leu\",\"symbol\":\"L\"}],\"languages\":[{\"iso639_1\":\"ro\",\"iso639_2\":\"ron\",\"name\":\"Romanian\",\"nativeName\":\"Română\"}],\"translations\":{\"br\":\"Moldova\",\"pt\":\"Moldávia\",\"nl\":\"Moldavië\",\"hr\":\"Moldova\",\"fa\":\"مولداوی\",\"de\":\"Moldawie\",\"es\":\"Moldavia\",\"fr\":\"Moldavie\",\"ja\":\"モルドバ共和国\",\"it\":\"Moldavia\",\"hu\":\"Moldova\"},\"flag\":\"https://flagcdn.com/md.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"cioc\":\"MDA\",\"independent\":true},{\"name\":\"Monaco\",\"topLevelDomain\":[\".mc\"],\"alpha2Code\":\"MC\",\"alpha3Code\":\"MCO\",\"callingCodes\":[\"377\"],\"capital\":\"Monaco\",\"altSpellings\":[\"MC\",\"Principality of Monaco\",\"Principauté de Monaco\"],\"subregion\":\"Western Europe\",\"region\":\"Europe\",\"population\":39244,\"latlng\":[43.73333333,7.4],\"demonym\":\"Monegasque\",\"area\":2.02,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"FRA\"],\"nativeName\":\"Monaco\",\"numericCode\":\"492\",\"flags\":{\"svg\":\"https://flagcdn.com/mc.svg\",\"png\":\"https://flagcdn.com/w320/mc.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Monako\",\"pt\":\"Mónaco\",\"nl\":\"Monaco\",\"hr\":\"Monako\",\"fa\":\"موناکو\",\"de\":\"Monaco\",\"es\":\"Mónaco\",\"fr\":\"Monaco\",\"ja\":\"モナコ\",\"it\":\"Principato di Monaco\",\"hu\":\"Monaco\"},\"flag\":\"https://flagcdn.com/mc.svg\",\"cioc\":\"MON\",\"independent\":true},{\"name\":\"Mongolia\",\"topLevelDomain\":[\".mn\"],\"alpha2Code\":\"MN\",\"alpha3Code\":\"MNG\",\"callingCodes\":[\"976\"],\"capital\":\"Ulan Bator\",\"altSpellings\":[\"MN\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":3278292,\"latlng\":[46.0,105.0],\"demonym\":\"Mongolian\",\"area\":1564110.0,\"gini\":32.7,\"timezones\":[\"UTC+07:00\",\"UTC+08:00\"],\"borders\":[\"CHN\",\"RUS\"],\"nativeName\":\"Монгол улс\",\"numericCode\":\"496\",\"flags\":{\"svg\":\"https://flagcdn.com/mn.svg\",\"png\":\"https://flagcdn.com/w320/mn.png\"},\"currencies\":[{\"code\":\"MNT\",\"name\":\"Mongolian tögrög\",\"symbol\":\"₮\"}],\"languages\":[{\"iso639_1\":\"mn\",\"iso639_2\":\"mon\",\"name\":\"Mongolian\",\"nativeName\":\"Монгол хэл\"}],\"translations\":{\"br\":\"Mongolia\",\"pt\":\"Mongólia\",\"nl\":\"Mongolië\",\"hr\":\"Mongolija\",\"fa\":\"مغولستان\",\"de\":\"Mongolei\",\"es\":\"Mongolia\",\"fr\":\"Mongolie\",\"ja\":\"モンゴル\",\"it\":\"Mongolia\",\"hu\":\"Mongólia\"},\"flag\":\"https://flagcdn.com/mn.svg\",\"cioc\":\"MGL\",\"independent\":true},{\"name\":\"Montenegro\",\"topLevelDomain\":[\".me\"],\"alpha2Code\":\"ME\",\"alpha3Code\":\"MNE\",\"callingCodes\":[\"382\"],\"capital\":\"Podgorica\",\"altSpellings\":[\"ME\",\"Crna Gora\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":621718,\"latlng\":[42.5,19.3],\"demonym\":\"Montenegrin\",\"area\":13812.0,\"gini\":38.5,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"ALB\",\"BIH\",\"HRV\",\"UNK\",\"SRB\"],\"nativeName\":\"Црна Гора\",\"numericCode\":\"499\",\"flags\":{\"svg\":\"https://flagcdn.com/me.svg\",\"png\":\"https://flagcdn.com/w320/me.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"sr\",\"iso639_2\":\"srp\",\"name\":\"Serbian\",\"nativeName\":\"српски језик\"},{\"iso639_1\":\"bs\",\"iso639_2\":\"bos\",\"name\":\"Bosnian\",\"nativeName\":\"bosanski jezik\"},{\"iso639_1\":\"sq\",\"iso639_2\":\"sqi\",\"name\":\"Albanian\",\"nativeName\":\"Shqip\"},{\"iso639_1\":\"hr\",\"iso639_2\":\"hrv\",\"name\":\"Croatian\",\"nativeName\":\"hrvatski jezik\"}],\"translations\":{\"br\":\"Montenegro\",\"pt\":\"Montenegro\",\"nl\":\"Montenegro\",\"hr\":\"Crna Gora\",\"fa\":\"مونته‌نگرو\",\"de\":\"Montenegro\",\"es\":\"Montenegro\",\"fr\":\"Monténégro\",\"ja\":\"モンテネグロ\",\"it\":\"Montenegro\",\"hu\":\"Montenegró\"},\"flag\":\"https://flagcdn.com/me.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"cioc\":\"MNE\",\"independent\":true},{\"name\":\"Montserrat\",\"topLevelDomain\":[\".ms\"],\"alpha2Code\":\"MS\",\"alpha3Code\":\"MSR\",\"callingCodes\":[\"1\"],\"capital\":\"Plymouth\",\"altSpellings\":[\"MS\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":4922,\"latlng\":[16.75,-62.2],\"demonym\":\"Montserratian\",\"area\":102.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Montserrat\",\"numericCode\":\"500\",\"flags\":{\"svg\":\"https://flagcdn.com/ms.svg\",\"png\":\"https://flagcdn.com/w320/ms.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Montserrat\",\"pt\":\"Monserrate\",\"nl\":\"Montserrat\",\"hr\":\"Montserrat\",\"fa\":\"مایوت\",\"de\":\"Montserrat\",\"es\":\"Montserrat\",\"fr\":\"Montserrat\",\"ja\":\"モントセラト\",\"it\":\"Montserrat\",\"hu\":\"Montserrat\"},\"flag\":\"https://flagcdn.com/ms.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"independent\":false},{\"name\":\"Morocco\",\"topLevelDomain\":[\".ma\"],\"alpha2Code\":\"MA\",\"alpha3Code\":\"MAR\",\"callingCodes\":[\"212\"],\"capital\":\"Rabat\",\"altSpellings\":[\"MA\",\"Kingdom of Morocco\",\"Al-Mamlakah al-Maġribiyah\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":36910558,\"latlng\":[32.0,-5.0],\"demonym\":\"Moroccan\",\"area\":446550.0,\"gini\":39.5,\"timezones\":[\"UTC\"],\"borders\":[\"DZA\",\"ESH\",\"ESP\"],\"nativeName\":\"المغرب\",\"numericCode\":\"504\",\"flags\":{\"svg\":\"https://flagcdn.com/ma.svg\",\"png\":\"https://flagcdn.com/w320/ma.png\"},\"currencies\":[{\"code\":\"MAD\",\"name\":\"Moroccan dirham\",\"symbol\":\"د.م.\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Maroko\",\"pt\":\"Marrocos\",\"nl\":\"Marokko\",\"hr\":\"Maroko\",\"fa\":\"المغرب\",\"de\":\"Marokko\",\"es\":\"Marruecos\",\"fr\":\"Maroc\",\"ja\":\"モロッコ\",\"it\":\"Marocco\",\"hu\":\"Marokkó\"},\"flag\":\"https://flagcdn.com/ma.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"MAR\",\"independent\":true},{\"name\":\"Mozambique\",\"topLevelDomain\":[\".mz\"],\"alpha2Code\":\"MZ\",\"alpha3Code\":\"MOZ\",\"callingCodes\":[\"258\"],\"capital\":\"Maputo\",\"altSpellings\":[\"MZ\",\"Republic of Mozambique\",\"República de Moçambique\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":31255435,\"latlng\":[-18.25,35.0],\"demonym\":\"Mozambican\",\"area\":801590.0,\"gini\":54.0,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"MWI\",\"ZAF\",\"SWZ\",\"TZA\",\"ZMB\",\"ZWE\"],\"nativeName\":\"Moçambique\",\"numericCode\":\"508\",\"flags\":{\"svg\":\"https://flagcdn.com/mz.svg\",\"png\":\"https://flagcdn.com/w320/mz.png\"},\"currencies\":[{\"code\":\"MZN\",\"name\":\"Mozambican metical\",\"symbol\":\"MT\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Mozambik\",\"pt\":\"Moçambique\",\"nl\":\"Mozambique\",\"hr\":\"Mozambik\",\"fa\":\"موزامبیک\",\"de\":\"Mosambik\",\"es\":\"Mozambique\",\"fr\":\"Mozambique\",\"ja\":\"モザンビーク\",\"it\":\"Mozambico\",\"hu\":\"Mozambik\"},\"flag\":\"https://flagcdn.com/mz.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"MOZ\",\"independent\":true},{\"name\":\"Myanmar\",\"topLevelDomain\":[\".mm\"],\"alpha2Code\":\"MM\",\"alpha3Code\":\"MMR\",\"callingCodes\":[\"95\"],\"capital\":\"Naypyidaw\",\"altSpellings\":[\"MM\",\"Burma\",\"Republic of the Union of Myanmar\",\"Pyidaunzu Thanmăda Myăma Nainngandaw\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":54409794,\"latlng\":[22.0,98.0],\"demonym\":\"Burmese\",\"area\":676578.0,\"gini\":30.7,\"timezones\":[\"UTC+06:30\"],\"borders\":[\"BGD\",\"CHN\",\"IND\",\"LAO\",\"THA\"],\"nativeName\":\"Myanma\",\"numericCode\":\"104\",\"flags\":{\"svg\":\"https://flagcdn.com/mm.svg\",\"png\":\"https://flagcdn.com/w320/mm.png\"},\"currencies\":[{\"code\":\"MMK\",\"name\":\"Burmese kyat\",\"symbol\":\"Ks\"}],\"languages\":[{\"iso639_1\":\"my\",\"iso639_2\":\"mya\",\"name\":\"Burmese\",\"nativeName\":\"ဗမာစာ\"}],\"translations\":{\"br\":\"Myanmar\",\"pt\":\"Myanmar\",\"nl\":\"Myanmar\",\"hr\":\"Mijanmar\",\"fa\":\"میانمار\",\"de\":\"Myanmar\",\"es\":\"Myanmar\",\"fr\":\"Myanmar\",\"ja\":\"ミャンマー\",\"it\":\"Birmania\",\"hu\":\"Mianmar\"},\"flag\":\"https://flagcdn.com/mm.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"MYA\",\"independent\":true},{\"name\":\"Namibia\",\"topLevelDomain\":[\".na\"],\"alpha2Code\":\"NA\",\"alpha3Code\":\"NAM\",\"callingCodes\":[\"264\"],\"capital\":\"Windhoek\",\"altSpellings\":[\"NA\",\"Namibië\",\"Republic of Namibia\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":2540916,\"latlng\":[-22.0,17.0],\"demonym\":\"Namibian\",\"area\":825615.0,\"gini\":59.1,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AGO\",\"BWA\",\"ZAF\",\"ZMB\"],\"nativeName\":\"Namibia\",\"numericCode\":\"516\",\"flags\":{\"svg\":\"https://flagcdn.com/na.svg\",\"png\":\"https://flagcdn.com/w320/na.png\"},\"currencies\":[{\"code\":\"NAD\",\"name\":\"Namibian dollar\",\"symbol\":\"$\"},{\"code\":\"ZAR\",\"name\":\"South African rand\",\"symbol\":\"R\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"af\",\"iso639_2\":\"afr\",\"name\":\"Afrikaans\",\"nativeName\":\"Afrikaans\"}],\"translations\":{\"br\":\"Namibia\",\"pt\":\"Namíbia\",\"nl\":\"Namibië\",\"hr\":\"Namibija\",\"fa\":\"نامیبیا\",\"de\":\"Namibia\",\"es\":\"Namibia\",\"fr\":\"Namibie\",\"ja\":\"ナミビア\",\"it\":\"Namibia\",\"hu\":\"Namíbia\"},\"flag\":\"https://flagcdn.com/na.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"NAM\",\"independent\":true},{\"name\":\"Nauru\",\"topLevelDomain\":[\".nr\"],\"alpha2Code\":\"NR\",\"alpha3Code\":\"NRU\",\"callingCodes\":[\"674\"],\"capital\":\"Yaren\",\"altSpellings\":[\"NR\",\"Naoero\",\"Pleasant Island\",\"Republic of Nauru\",\"Ripublik Naoero\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":10834,\"latlng\":[-0.53333333,166.91666666],\"demonym\":\"Nauruan\",\"area\":21.0,\"gini\":34.8,\"timezones\":[\"UTC+12:00\"],\"nativeName\":\"Nauru\",\"numericCode\":\"520\",\"flags\":{\"svg\":\"https://flagcdn.com/nr.svg\",\"png\":\"https://flagcdn.com/w320/nr.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"na\",\"iso639_2\":\"nau\",\"name\":\"Nauruan\",\"nativeName\":\"Dorerin Naoero\"}],\"translations\":{\"br\":\"Nauru\",\"pt\":\"Nauru\",\"nl\":\"Nauru\",\"hr\":\"Nauru\",\"fa\":\"نائورو\",\"de\":\"Nauru\",\"es\":\"Nauru\",\"fr\":\"Nauru\",\"ja\":\"ナウル\",\"it\":\"Nauru\",\"hu\":\"Nauru\"},\"flag\":\"https://flagcdn.com/nr.svg\",\"cioc\":\"NRU\",\"independent\":true},{\"name\":\"Nepal\",\"topLevelDomain\":[\".np\"],\"alpha2Code\":\"NP\",\"alpha3Code\":\"NPL\",\"callingCodes\":[\"977\"],\"capital\":\"Kathmandu\",\"altSpellings\":[\"NP\",\"Federal Democratic Republic of Nepal\",\"Loktāntrik Ganatantra Nepāl\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":29136808,\"latlng\":[28.0,84.0],\"demonym\":\"Nepalese\",\"area\":147181.0,\"gini\":32.8,\"timezones\":[\"UTC+05:45\"],\"borders\":[\"CHN\",\"IND\"],\"nativeName\":\"नेपाल\",\"numericCode\":\"524\",\"flags\":{\"svg\":\"https://flagcdn.com/np.svg\",\"png\":\"https://flagcdn.com/w320/np.png\"},\"currencies\":[{\"code\":\"NPR\",\"name\":\"Nepalese rupee\",\"symbol\":\"₨\"}],\"languages\":[{\"iso639_1\":\"ne\",\"iso639_2\":\"nep\",\"name\":\"Nepali\",\"nativeName\":\"नेपाली\"}],\"translations\":{\"br\":\"Nepal\",\"pt\":\"Nepal\",\"nl\":\"Nepal\",\"hr\":\"Nepal\",\"fa\":\"نپال\",\"de\":\"Népal\",\"es\":\"Nepal\",\"fr\":\"Népal\",\"ja\":\"ネパール\",\"it\":\"Nepal\",\"hu\":\"Nepál\"},\"flag\":\"https://flagcdn.com/np.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"NEP\",\"independent\":true},{\"name\":\"Netherlands\",\"topLevelDomain\":[\".nl\"],\"alpha2Code\":\"NL\",\"alpha3Code\":\"NLD\",\"callingCodes\":[\"31\"],\"capital\":\"Amsterdam\",\"altSpellings\":[\"NL\",\"Holland\",\"Nederland\"],\"subregion\":\"Western Europe\",\"region\":\"Europe\",\"population\":17441139,\"latlng\":[52.5,5.75],\"demonym\":\"Dutch\",\"area\":41850.0,\"gini\":28.1,\"timezones\":[\"UTC-04:00\",\"UTC+01:00\"],\"borders\":[\"BEL\",\"DEU\"],\"nativeName\":\"Nederland\",\"numericCode\":\"528\",\"flags\":{\"svg\":\"https://flagcdn.com/nl.svg\",\"png\":\"https://flagcdn.com/w320/nl.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"}],\"translations\":{\"br\":\"Izelvroioù\",\"pt\":\"Países Baixos\",\"nl\":\"Nederland\",\"hr\":\"Nizozemska\",\"fa\":\"پادشاهی هلند\",\"de\":\"Niederlande\",\"es\":\"Países Bajos\",\"fr\":\"Pays-Bas\",\"ja\":\"オランダ\",\"it\":\"Paesi Bassi\",\"hu\":\"Hollandia\"},\"flag\":\"https://flagcdn.com/nl.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"NED\",\"independent\":true},{\"name\":\"New Caledonia\",\"topLevelDomain\":[\".nc\"],\"alpha2Code\":\"NC\",\"alpha3Code\":\"NCL\",\"callingCodes\":[\"687\"],\"capital\":\"Nouméa\",\"altSpellings\":[\"NC\"],\"subregion\":\"Melanesia\",\"region\":\"Oceania\",\"population\":271960,\"latlng\":[-21.5,165.5],\"demonym\":\"New Caledonian\",\"area\":18575.0,\"timezones\":[\"UTC+11:00\"],\"nativeName\":\"Nouvelle-Calédonie\",\"numericCode\":\"540\",\"flags\":{\"svg\":\"https://flagcdn.com/nc.svg\",\"png\":\"https://flagcdn.com/w320/nc.png\"},\"currencies\":[{\"code\":\"XPF\",\"name\":\"CFP franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Kaledonia-Nevez\",\"pt\":\"Nova Caledónia\",\"nl\":\"Nieuw-Caledonië\",\"hr\":\"Nova Kaledonija\",\"fa\":\"کالدونیای جدید\",\"de\":\"Neukaledonien\",\"es\":\"Nueva Caledonia\",\"fr\":\"Nouvelle-Calédonie\",\"ja\":\"ニューカレドニア\",\"it\":\"Nuova Caledonia\",\"hu\":\"Új-Kaledónia\"},\"flag\":\"https://flagcdn.com/nc.svg\",\"independent\":false},{\"name\":\"New Zealand\",\"topLevelDomain\":[\".nz\"],\"alpha2Code\":\"NZ\",\"alpha3Code\":\"NZL\",\"callingCodes\":[\"64\"],\"capital\":\"Wellington\",\"altSpellings\":[\"NZ\",\"Aotearoa\"],\"subregion\":\"Australia and New Zealand\",\"region\":\"Oceania\",\"population\":5084300,\"latlng\":[-41.0,174.0],\"demonym\":\"New Zealander\",\"area\":270467.0,\"timezones\":[\"UTC-11:00\",\"UTC-10:00\",\"UTC+12:00\",\"UTC+12:45\",\"UTC+13:00\"],\"nativeName\":\"New Zealand\",\"numericCode\":\"554\",\"flags\":{\"svg\":\"https://flagcdn.com/nz.svg\",\"png\":\"https://flagcdn.com/w320/nz.png\"},\"currencies\":[{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"mi\",\"iso639_2\":\"mri\",\"name\":\"Māori\",\"nativeName\":\"te reo Māori\"}],\"translations\":{\"br\":\"Zeland-Nevez\",\"pt\":\"Nova Zelândia\",\"nl\":\"Nieuw-Zeeland\",\"hr\":\"Novi Zeland\",\"fa\":\"نیوزیلند\",\"de\":\"Neuseeland\",\"es\":\"Nueva Zelanda\",\"fr\":\"Nouvelle-Zélande\",\"ja\":\"ニュージーランド\",\"it\":\"Nuova Zelanda\",\"hu\":\"Új-Zéland\"},\"flag\":\"https://flagcdn.com/nz.svg\",\"cioc\":\"NZL\",\"independent\":true},{\"name\":\"Nicaragua\",\"topLevelDomain\":[\".ni\"],\"alpha2Code\":\"NI\",\"alpha3Code\":\"NIC\",\"callingCodes\":[\"505\"],\"capital\":\"Managua\",\"altSpellings\":[\"NI\",\"Republic of Nicaragua\",\"República de Nicaragua\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":6624554,\"latlng\":[13.0,-85.0],\"demonym\":\"Nicaraguan\",\"area\":130373.0,\"gini\":46.2,\"timezones\":[\"UTC-06:00\"],\"borders\":[\"CRI\",\"HND\"],\"nativeName\":\"Nicaragua\",\"numericCode\":\"558\",\"flags\":{\"svg\":\"https://flagcdn.com/ni.svg\",\"png\":\"https://flagcdn.com/w320/ni.png\"},\"currencies\":[{\"code\":\"NIO\",\"name\":\"Nicaraguan córdoba\",\"symbol\":\"C$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Nicaragua\",\"pt\":\"Nicarágua\",\"nl\":\"Nicaragua\",\"hr\":\"Nikaragva\",\"fa\":\"نیکاراگوئه\",\"de\":\"Nicaragua\",\"es\":\"Nicaragua\",\"fr\":\"Nicaragua\",\"ja\":\"ニカラグア\",\"it\":\"Nicaragua\",\"hu\":\"Nicaragua\"},\"flag\":\"https://flagcdn.com/ni.svg\",\"regionalBlocs\":[{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"NCA\",\"independent\":true},{\"name\":\"Niger\",\"topLevelDomain\":[\".ne\"],\"alpha2Code\":\"NE\",\"alpha3Code\":\"NER\",\"callingCodes\":[\"227\"],\"capital\":\"Niamey\",\"altSpellings\":[\"NE\",\"Nijar\",\"Republic of Niger\",\"République du Niger\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":24206636,\"latlng\":[16.0,8.0],\"demonym\":\"Nigerien\",\"area\":1267000.0,\"gini\":34.3,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"DZA\",\"BEN\",\"BFA\",\"TCD\",\"LBY\",\"MLI\",\"NGA\"],\"nativeName\":\"Niger\",\"numericCode\":\"562\",\"flags\":{\"svg\":\"https://flagcdn.com/ne.svg\",\"png\":\"https://flagcdn.com/w320/ne.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Niger\",\"pt\":\"Níger\",\"nl\":\"Niger\",\"hr\":\"Niger\",\"fa\":\"نیجر\",\"de\":\"Niger\",\"es\":\"Níger\",\"fr\":\"Niger\",\"ja\":\"ニジェール\",\"it\":\"Niger\",\"hu\":\"Niger\"},\"flag\":\"https://flagcdn.com/ne.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"NIG\",\"independent\":true},{\"name\":\"Nigeria\",\"topLevelDomain\":[\".ng\"],\"alpha2Code\":\"NG\",\"alpha3Code\":\"NGA\",\"callingCodes\":[\"234\"],\"capital\":\"Abuja\",\"altSpellings\":[\"NG\",\"Nijeriya\",\"Naíjíríà\",\"Federal Republic of Nigeria\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":206139587,\"latlng\":[10.0,8.0],\"demonym\":\"Nigerian\",\"area\":923768.0,\"gini\":35.1,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"BEN\",\"CMR\",\"TCD\",\"NER\"],\"nativeName\":\"Nigeria\",\"numericCode\":\"566\",\"flags\":{\"svg\":\"https://flagcdn.com/ng.svg\",\"png\":\"https://flagcdn.com/w320/ng.png\"},\"currencies\":[{\"code\":\"NGN\",\"name\":\"Nigerian naira\",\"symbol\":\"₦\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Nigeria\",\"pt\":\"Nigéria\",\"nl\":\"Nigeria\",\"hr\":\"Nigerija\",\"fa\":\"نیجریه\",\"de\":\"Nigeria\",\"es\":\"Nigeria\",\"fr\":\"Nigéria\",\"ja\":\"ナイジェリア\",\"it\":\"Nigeria\",\"hu\":\"Nigéria\"},\"flag\":\"https://flagcdn.com/ng.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"NGR\",\"independent\":true},{\"name\":\"Niue\",\"topLevelDomain\":[\".nu\"],\"alpha2Code\":\"NU\",\"alpha3Code\":\"NIU\",\"callingCodes\":[\"683\"],\"capital\":\"Alofi\",\"altSpellings\":[\"NU\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":1470,\"latlng\":[-19.03333333,-169.86666666],\"demonym\":\"Niuean\",\"area\":260.0,\"timezones\":[\"UTC-11:00\"],\"nativeName\":\"Niuē\",\"numericCode\":\"570\",\"flags\":{\"svg\":\"https://flagcdn.com/nu.svg\",\"png\":\"https://flagcdn.com/w320/nu.png\"},\"currencies\":[{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"},{\"code\":\"NZD\",\"name\":\"Niue dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Niue\",\"pt\":\"Niue\",\"nl\":\"Niue\",\"hr\":\"Niue\",\"fa\":\"نیووی\",\"de\":\"Niue\",\"es\":\"Niue\",\"fr\":\"Niue\",\"ja\":\"ニウエ\",\"it\":\"Niue\",\"hu\":\"Niue\"},\"flag\":\"https://flagcdn.com/nu.svg\",\"independent\":true},{\"name\":\"Norfolk Island\",\"topLevelDomain\":[\".nf\"],\"alpha2Code\":\"NF\",\"alpha3Code\":\"NFK\",\"callingCodes\":[\"672\"],\"capital\":\"Kingston\",\"altSpellings\":[\"NF\",\"Territory of Norfolk Island\",\"Teratri of Norf'k Ailen\"],\"subregion\":\"Australia and New Zealand\",\"region\":\"Oceania\",\"population\":2302,\"latlng\":[-29.03333333,167.95],\"demonym\":\"Norfolk Islander\",\"area\":36.0,\"timezones\":[\"UTC+11:30\"],\"nativeName\":\"Norfolk Island\",\"numericCode\":\"574\",\"flags\":{\"svg\":\"https://flagcdn.com/nf.svg\",\"png\":\"https://flagcdn.com/w320/nf.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Enez Norfolk\",\"pt\":\"Ilha Norfolk\",\"nl\":\"Norfolkeiland\",\"hr\":\"Otok Norfolk\",\"fa\":\"جزیره نورفک\",\"de\":\"Norfolkinsel\",\"es\":\"Isla de Norfolk\",\"fr\":\"Île de Norfolk\",\"ja\":\"ノーフォーク島\",\"it\":\"Isola Norfolk\",\"hu\":\"Norfolk-sziget\"},\"flag\":\"https://flagcdn.com/nf.svg\",\"independent\":false},{\"name\":\"Korea (Democratic People's Republic of)\",\"topLevelDomain\":[\".kp\"],\"alpha2Code\":\"KP\",\"alpha3Code\":\"PRK\",\"callingCodes\":[\"850\"],\"capital\":\"Pyongyang\",\"altSpellings\":[\"KP\",\"Democratic People's Republic of Korea\",\"조선민주주의인민공화국\",\"Chosŏn Minjujuŭi Inmin Konghwaguk\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":25778815,\"latlng\":[40.0,127.0],\"demonym\":\"North Korean\",\"area\":120538.0,\"timezones\":[\"UTC+09:00\"],\"borders\":[\"CHN\",\"KOR\",\"RUS\"],\"nativeName\":\"북한\",\"numericCode\":\"408\",\"flags\":{\"svg\":\"https://flagcdn.com/kp.svg\",\"png\":\"https://flagcdn.com/w320/kp.png\"},\"currencies\":[{\"code\":\"KPW\",\"name\":\"North Korean won\",\"symbol\":\"₩\"}],\"languages\":[{\"iso639_1\":\"ko\",\"iso639_2\":\"kor\",\"name\":\"Korean\",\"nativeName\":\"한국어\"}],\"translations\":{\"br\":\"Korea an Norzh\",\"pt\":\"Coreia do Norte\",\"nl\":\"Noord-Korea\",\"hr\":\"Sjeverna Koreja\",\"fa\":\"کره جنوبی\",\"de\":\"Nordkorea\",\"es\":\"Corea del Norte\",\"fr\":\"Corée du Nord\",\"ja\":\"朝鮮民主主義人民共和国\",\"it\":\"Corea del Nord\",\"hu\":\"Észak-Korea\"},\"flag\":\"https://flagcdn.com/kp.svg\",\"cioc\":\"PRK\",\"independent\":true},{\"name\":\"Northern Mariana Islands\",\"topLevelDomain\":[\".mp\"],\"alpha2Code\":\"MP\",\"alpha3Code\":\"MNP\",\"callingCodes\":[\"1\"],\"capital\":\"Saipan\",\"altSpellings\":[\"MP\",\"Commonwealth of the Northern Mariana Islands\",\"Sankattan Siha Na Islas Mariånas\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":57557,\"latlng\":[15.2,145.75],\"demonym\":\"American\",\"area\":464.0,\"timezones\":[\"UTC+10:00\"],\"nativeName\":\"Northern Mariana Islands\",\"numericCode\":\"580\",\"flags\":{\"svg\":\"https://flagcdn.com/mp.svg\",\"png\":\"https://flagcdn.com/w320/mp.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"ch\",\"iso639_2\":\"cha\",\"name\":\"Chamorro\",\"nativeName\":\"Chamoru\"}],\"translations\":{\"br\":\"Inizi Mariana an Norzh\",\"pt\":\"Ilhas Marianas\",\"nl\":\"Noordelijke Marianeneilanden\",\"hr\":\"Sjevernomarijanski otoci\",\"fa\":\"جزایر ماریانای شمالی\",\"de\":\"Nördliche Marianen\",\"es\":\"Islas Marianas del Norte\",\"fr\":\"Îles Mariannes du Nord\",\"ja\":\"北マリアナ諸島\",\"it\":\"Isole Marianne Settentrionali\",\"hu\":\"Északi-Mariana-szigetek\"},\"flag\":\"https://flagcdn.com/mp.svg\",\"independent\":false},{\"name\":\"Norway\",\"topLevelDomain\":[\".no\"],\"alpha2Code\":\"NO\",\"alpha3Code\":\"NOR\",\"callingCodes\":[\"47\"],\"capital\":\"Oslo\",\"altSpellings\":[\"NO\",\"Norge\",\"Noreg\",\"Kingdom of Norway\",\"Kongeriket Norge\",\"Kongeriket Noreg\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":5379475,\"latlng\":[62.0,10.0],\"demonym\":\"Norwegian\",\"area\":323802.0,\"gini\":27.6,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"FIN\",\"SWE\",\"RUS\"],\"nativeName\":\"Norge\",\"numericCode\":\"578\",\"flags\":{\"svg\":\"https://flagcdn.com/no.svg\",\"png\":\"https://flagcdn.com/w320/no.png\"},\"currencies\":[{\"code\":\"NOK\",\"name\":\"Norwegian krone\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"no\",\"iso639_2\":\"nor\",\"name\":\"Norwegian\",\"nativeName\":\"Norsk\"},{\"iso639_1\":\"nb\",\"iso639_2\":\"nob\",\"name\":\"Norwegian Bokmål\",\"nativeName\":\"Norsk bokmål\"},{\"iso639_1\":\"nn\",\"iso639_2\":\"nno\",\"name\":\"Norwegian Nynorsk\",\"nativeName\":\"Norsk nynorsk\"}],\"translations\":{\"br\":\"Norvegia\",\"pt\":\"Noruega\",\"nl\":\"Noorwegen\",\"hr\":\"Norveška\",\"fa\":\"نروژ\",\"de\":\"Norwegen\",\"es\":\"Noruega\",\"fr\":\"Norvège\",\"ja\":\"ノルウェー\",\"it\":\"Norvegia\",\"hu\":\"Norvégia\"},\"flag\":\"https://flagcdn.com/no.svg\",\"regionalBlocs\":[{\"acronym\":\"EFTA\",\"name\":\"European Free Trade Association\"}],\"cioc\":\"NOR\",\"independent\":true},{\"name\":\"Oman\",\"topLevelDomain\":[\".om\"],\"alpha2Code\":\"OM\",\"alpha3Code\":\"OMN\",\"callingCodes\":[\"968\"],\"capital\":\"Muscat\",\"altSpellings\":[\"OM\",\"Sultanate of Oman\",\"Salṭanat ʻUmān\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":5106622,\"latlng\":[21.0,57.0],\"demonym\":\"Omani\",\"area\":309500.0,\"timezones\":[\"UTC+04:00\"],\"borders\":[\"SAU\",\"ARE\",\"YEM\"],\"nativeName\":\"عمان\",\"numericCode\":\"512\",\"flags\":{\"svg\":\"https://flagcdn.com/om.svg\",\"png\":\"https://flagcdn.com/w320/om.png\"},\"currencies\":[{\"code\":\"OMR\",\"name\":\"Omani rial\",\"symbol\":\"ر.ع.\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Oman\",\"pt\":\"Omã\",\"nl\":\"Oman\",\"hr\":\"Oman\",\"fa\":\"عمان\",\"de\":\"Oman\",\"es\":\"Omán\",\"fr\":\"Oman\",\"ja\":\"オマーン\",\"it\":\"oman\",\"hu\":\"Omán\"},\"flag\":\"https://flagcdn.com/om.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"OMA\",\"independent\":true},{\"name\":\"Pakistan\",\"topLevelDomain\":[\".pk\"],\"alpha2Code\":\"PK\",\"alpha3Code\":\"PAK\",\"callingCodes\":[\"92\"],\"capital\":\"Islamabad\",\"altSpellings\":[\"PK\",\"Pākistān\",\"Islamic Republic of Pakistan\",\"Islāmī Jumhūriya'eh Pākistān\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":220892331,\"latlng\":[30.0,70.0],\"demonym\":\"Pakistani\",\"area\":881912.0,\"gini\":31.6,\"timezones\":[\"UTC+05:00\"],\"borders\":[\"AFG\",\"CHN\",\"IND\",\"IRN\"],\"nativeName\":\"Pakistan\",\"numericCode\":\"586\",\"flags\":{\"svg\":\"https://flagcdn.com/pk.svg\",\"png\":\"https://flagcdn.com/w320/pk.png\"},\"currencies\":[{\"code\":\"PKR\",\"name\":\"Pakistani rupee\",\"symbol\":\"₨\"}],\"languages\":[{\"iso639_1\":\"ur\",\"iso639_2\":\"urd\",\"name\":\"Urdu\",\"nativeName\":\"اردو\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Pakistan\",\"pt\":\"Paquistão\",\"nl\":\"Pakistan\",\"hr\":\"Pakistan\",\"fa\":\"پاکستان\",\"de\":\"Pakistan\",\"es\":\"Pakistán\",\"fr\":\"Pakistan\",\"ja\":\"パキスタン\",\"it\":\"Pakistan\",\"hu\":\"Pakisztán\"},\"flag\":\"https://flagcdn.com/pk.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"PAK\",\"independent\":true},{\"name\":\"Palau\",\"topLevelDomain\":[\".pw\"],\"alpha2Code\":\"PW\",\"alpha3Code\":\"PLW\",\"callingCodes\":[\"680\"],\"capital\":\"Ngerulmud\",\"altSpellings\":[\"PW\",\"Republic of Palau\",\"Beluu er a Belau\"],\"subregion\":\"Micronesia\",\"region\":\"Oceania\",\"population\":18092,\"latlng\":[7.5,134.5],\"demonym\":\"Palauan\",\"area\":459.0,\"timezones\":[\"UTC+09:00\"],\"nativeName\":\"Palau\",\"numericCode\":\"585\",\"flags\":{\"svg\":\"https://flagcdn.com/pw.svg\",\"png\":\"https://flagcdn.com/w320/pw.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Palau\",\"pt\":\"Palau\",\"nl\":\"Palau\",\"hr\":\"Palau\",\"fa\":\"پالائو\",\"de\":\"Palau\",\"es\":\"Palau\",\"fr\":\"Palaos\",\"ja\":\"パラオ\",\"it\":\"Palau\",\"hu\":\"Palau\"},\"flag\":\"https://flagcdn.com/pw.svg\",\"cioc\":\"PLW\",\"independent\":true},{\"name\":\"Palestine, State of\",\"topLevelDomain\":[\".ps\"],\"alpha2Code\":\"PS\",\"alpha3Code\":\"PSE\",\"callingCodes\":[\"970\"],\"capital\":\"Ramallah\",\"altSpellings\":[\"PS\",\"State of Palestine\",\"Dawlat Filasṭin\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":4803269,\"latlng\":[31.9,35.2],\"demonym\":\"Palestinian\",\"gini\":33.7,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"ISR\",\"EGY\",\"JOR\"],\"nativeName\":\"فلسطين\",\"numericCode\":\"275\",\"flags\":{\"svg\":\"https://flagcdn.com/ps.svg\",\"png\":\"https://flagcdn.com/w320/ps.png\"},\"currencies\":[{\"code\":\"EGP\",\"name\":\"Egyptian pound\",\"symbol\":\"E£\"},{\"code\":\"ILS\",\"name\":\"Israeli new shekel\",\"symbol\":\"₪\"},{\"code\":\"JOD\",\"name\":\"Jordanian dinar\",\"symbol\":\"د.أ\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Palestina\",\"pt\":\"Palestina\",\"nl\":\"Palestijnse gebieden\",\"hr\":\"Palestina\",\"fa\":\"فلسطین\",\"de\":\"Palästina\",\"es\":\"Palestina\",\"fr\":\"Palestine\",\"ja\":\"パレスチナ\",\"it\":\"Palestina\",\"hu\":\"Palesztina\"},\"flag\":\"https://flagcdn.com/ps.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"PLE\",\"independent\":true},{\"name\":\"Panama\",\"topLevelDomain\":[\".pa\"],\"alpha2Code\":\"PA\",\"alpha3Code\":\"PAN\",\"callingCodes\":[\"507\"],\"capital\":\"Panama City\",\"altSpellings\":[\"PA\",\"Republic of Panama\",\"República de Panamá\"],\"subregion\":\"Central America\",\"region\":\"Americas\",\"population\":4314768,\"latlng\":[9.0,-80.0],\"demonym\":\"Panamanian\",\"area\":75417.0,\"gini\":49.8,\"timezones\":[\"UTC-05:00\"],\"borders\":[\"COL\",\"CRI\"],\"nativeName\":\"Panamá\",\"numericCode\":\"591\",\"flags\":{\"svg\":\"https://flagcdn.com/pa.svg\",\"png\":\"https://flagcdn.com/w320/pa.png\"},\"currencies\":[{\"code\":\"PAB\",\"name\":\"Panamanian balboa\",\"symbol\":\"B/.\"},{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Panama\",\"pt\":\"Panamá\",\"nl\":\"Panama\",\"hr\":\"Panama\",\"fa\":\"پاناما\",\"de\":\"Panama\",\"es\":\"Panamá\",\"fr\":\"Panama\",\"ja\":\"パナマ\",\"it\":\"Panama\",\"hu\":\"Panama\"},\"flag\":\"https://flagcdn.com/pa.svg\",\"regionalBlocs\":[{\"acronym\":\"CAIS\",\"name\":\"Central American Integration System\",\"otherAcronyms\":[\"SICA\"],\"otherNames\":[\"Sistema de la Integración Centroamericana,\"]}],\"cioc\":\"PAN\",\"independent\":true},{\"name\":\"Papua New Guinea\",\"topLevelDomain\":[\".pg\"],\"alpha2Code\":\"PG\",\"alpha3Code\":\"PNG\",\"callingCodes\":[\"675\"],\"capital\":\"Port Moresby\",\"altSpellings\":[\"PG\",\"Independent State of Papua New Guinea\",\"Independen Stet bilong Papua Niugini\"],\"subregion\":\"Melanesia\",\"region\":\"Oceania\",\"population\":8947027,\"latlng\":[-6.0,147.0],\"demonym\":\"Papua New Guinean\",\"area\":462840.0,\"gini\":41.9,\"timezones\":[\"UTC+10:00\"],\"borders\":[\"IDN\"],\"nativeName\":\"Papua Niugini\",\"numericCode\":\"598\",\"flags\":{\"svg\":\"https://flagcdn.com/pg.svg\",\"png\":\"https://flagcdn.com/w320/pg.png\"},\"currencies\":[{\"code\":\"PGK\",\"name\":\"Papua New Guinean kina\",\"symbol\":\"K\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Papoua-Ginea Nevez\",\"pt\":\"Papua Nova Guiné\",\"nl\":\"Papoea-Nieuw-Guinea\",\"hr\":\"Papua Nova Gvineja\",\"fa\":\"پاپوآ گینه نو\",\"de\":\"Papua-Neuguinea\",\"es\":\"Papúa Nueva Guinea\",\"fr\":\"Papouasie-Nouvelle-Guinée\",\"ja\":\"パプアニューギニア\",\"it\":\"Papua Nuova Guinea\",\"hu\":\"Pápua Új-Guinea\"},\"flag\":\"https://flagcdn.com/pg.svg\",\"cioc\":\"PNG\",\"independent\":true},{\"name\":\"Paraguay\",\"topLevelDomain\":[\".py\"],\"alpha2Code\":\"PY\",\"alpha3Code\":\"PRY\",\"callingCodes\":[\"595\"],\"capital\":\"Asunción\",\"altSpellings\":[\"PY\",\"Republic of Paraguay\",\"República del Paraguay\",\"Tetã Paraguái\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":7132530,\"latlng\":[-23.0,-58.0],\"demonym\":\"Paraguayan\",\"area\":406752.0,\"gini\":45.7,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"ARG\",\"BOL\",\"BRA\"],\"nativeName\":\"Paraguay\",\"numericCode\":\"600\",\"flags\":{\"svg\":\"https://flagcdn.com/py.svg\",\"png\":\"https://flagcdn.com/w320/py.png\"},\"currencies\":[{\"code\":\"PYG\",\"name\":\"Paraguayan guaraní\",\"symbol\":\"₲\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"},{\"iso639_1\":\"gn\",\"iso639_2\":\"grn\",\"name\":\"Guaraní\",\"nativeName\":\"Avañe'ẽ\"}],\"translations\":{\"br\":\"Paraguay\",\"pt\":\"Paraguai\",\"nl\":\"Paraguay\",\"hr\":\"Paragvaj\",\"fa\":\"پاراگوئه\",\"de\":\"Paraguay\",\"es\":\"Paraguay\",\"fr\":\"Paraguay\",\"ja\":\"パラグアイ\",\"it\":\"Paraguay\",\"hu\":\"Paraguay\"},\"flag\":\"https://flagcdn.com/py.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"PAR\",\"independent\":true},{\"name\":\"Peru\",\"topLevelDomain\":[\".pe\"],\"alpha2Code\":\"PE\",\"alpha3Code\":\"PER\",\"callingCodes\":[\"51\"],\"capital\":\"Lima\",\"altSpellings\":[\"PE\",\"Republic of Peru\",\" República del Perú\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":32971846,\"latlng\":[-10.0,-76.0],\"demonym\":\"Peruvian\",\"area\":1285216.0,\"gini\":41.5,\"timezones\":[\"UTC-05:00\"],\"borders\":[\"BOL\",\"BRA\",\"CHL\",\"COL\",\"ECU\"],\"nativeName\":\"Perú\",\"numericCode\":\"604\",\"flags\":{\"svg\":\"https://flagcdn.com/pe.svg\",\"png\":\"https://flagcdn.com/w320/pe.png\"},\"currencies\":[{\"code\":\"PEN\",\"name\":\"Peruvian sol\",\"symbol\":\"S/.\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Perou\",\"pt\":\"Peru\",\"nl\":\"Peru\",\"hr\":\"Peru\",\"fa\":\"پرو\",\"de\":\"Peru\",\"es\":\"Perú\",\"fr\":\"Pérou\",\"ja\":\"ペルー\",\"it\":\"Perù\",\"hu\":\"Peru\"},\"flag\":\"https://flagcdn.com/pe.svg\",\"regionalBlocs\":[{\"acronym\":\"PA\",\"name\":\"Pacific Alliance\",\"otherNames\":[\"Alianza del Pacífico\"]},{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"PER\",\"independent\":true},{\"name\":\"Philippines\",\"topLevelDomain\":[\".ph\"],\"alpha2Code\":\"PH\",\"alpha3Code\":\"PHL\",\"callingCodes\":[\"63\"],\"capital\":\"Manila\",\"altSpellings\":[\"PH\",\"Republic of the Philippines\",\"Repúblika ng Pilipinas\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":109581085,\"latlng\":[13.0,122.0],\"demonym\":\"Filipino\",\"area\":342353.0,\"gini\":42.3,\"timezones\":[\"UTC+08:00\"],\"nativeName\":\"Pilipinas\",\"numericCode\":\"608\",\"flags\":{\"svg\":\"https://flagcdn.com/ph.svg\",\"png\":\"https://flagcdn.com/w320/ph.png\"},\"currencies\":[{\"code\":\"PHP\",\"name\":\"Philippine peso\",\"symbol\":\"₱\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Filipinez\",\"pt\":\"Filipinas\",\"nl\":\"Filipijnen\",\"hr\":\"Filipini\",\"fa\":\"جزایر الندفیلیپین\",\"de\":\"Philippinen\",\"es\":\"Filipinas\",\"fr\":\"Philippines\",\"ja\":\"フィリピン\",\"it\":\"Filippine\",\"hu\":\"Fülöp-szigetek\"},\"flag\":\"https://flagcdn.com/ph.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"PHI\",\"independent\":true},{\"name\":\"Pitcairn\",\"topLevelDomain\":[\".pn\"],\"alpha2Code\":\"PN\",\"alpha3Code\":\"PCN\",\"callingCodes\":[\"64\"],\"capital\":\"Adamstown\",\"altSpellings\":[\"PN\",\"Pitcairn Henderson Ducie and Oeno Islands\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":56,\"latlng\":[-25.06666666,-130.1],\"demonym\":\"Pitcairn Islander\",\"area\":47.0,\"timezones\":[\"UTC-08:00\"],\"nativeName\":\"Pitcairn Islands\",\"numericCode\":\"612\",\"flags\":{\"svg\":\"https://flagcdn.com/pn.svg\",\"png\":\"https://flagcdn.com/w320/pn.png\"},\"currencies\":[{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"},{\"code\":\"PND\",\"name\":\"Pitcairn Islands dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Pitcairn\",\"pt\":\"Ilhas Picárnia\",\"nl\":\"Pitcairneilanden\",\"hr\":\"Pitcairnovo otočje\",\"fa\":\"پیتکرن\",\"de\":\"Pitcairn\",\"es\":\"Islas Pitcairn\",\"fr\":\"Îles Pitcairn\",\"ja\":\"ピトケアン\",\"it\":\"Isole Pitcairn\",\"hu\":\"Pitcairn-szigetek\"},\"flag\":\"https://flagcdn.com/pn.svg\",\"independent\":true},{\"name\":\"Poland\",\"topLevelDomain\":[\".pl\"],\"alpha2Code\":\"PL\",\"alpha3Code\":\"POL\",\"callingCodes\":[\"48\"],\"capital\":\"Warsaw\",\"altSpellings\":[\"PL\",\"Republic of Poland\",\"Rzeczpospolita Polska\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":37950802,\"latlng\":[52.0,20.0],\"demonym\":\"Polish\",\"area\":312679.0,\"gini\":30.2,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"BLR\",\"CZE\",\"DEU\",\"LTU\",\"RUS\",\"SVK\",\"UKR\"],\"nativeName\":\"Polska\",\"numericCode\":\"616\",\"flags\":{\"svg\":\"https://flagcdn.com/pl.svg\",\"png\":\"https://flagcdn.com/w320/pl.png\"},\"currencies\":[{\"code\":\"PLN\",\"name\":\"Polish złoty\",\"symbol\":\"zł\"}],\"languages\":[{\"iso639_1\":\"pl\",\"iso639_2\":\"pol\",\"name\":\"Polish\",\"nativeName\":\"język polski\"}],\"translations\":{\"br\":\"Polonia\",\"pt\":\"Polónia\",\"nl\":\"Polen\",\"hr\":\"Poljska\",\"fa\":\"لهستان\",\"de\":\"Polen\",\"es\":\"Polonia\",\"fr\":\"Pologne\",\"ja\":\"ポーランド\",\"it\":\"Polonia\",\"hu\":\"Lengyelország\"},\"flag\":\"https://flagcdn.com/pl.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"POL\",\"independent\":true},{\"name\":\"Portugal\",\"topLevelDomain\":[\".pt\"],\"alpha2Code\":\"PT\",\"alpha3Code\":\"PRT\",\"callingCodes\":[\"351\"],\"capital\":\"Lisbon\",\"altSpellings\":[\"PT\",\"Portuguesa\",\"Portuguese Republic\",\"República Portuguesa\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":10305564,\"latlng\":[39.5,-8.0],\"demonym\":\"Portuguese\",\"area\":92090.0,\"gini\":33.5,\"timezones\":[\"UTC-01:00\",\"UTC\"],\"borders\":[\"ESP\"],\"nativeName\":\"Portugal\",\"numericCode\":\"620\",\"flags\":{\"svg\":\"https://flagcdn.com/pt.svg\",\"png\":\"https://flagcdn.com/w320/pt.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Portugal\",\"pt\":\"Portugal\",\"nl\":\"Portugal\",\"hr\":\"Portugal\",\"fa\":\"پرتغال\",\"de\":\"Portugal\",\"es\":\"Portugal\",\"fr\":\"Portugal\",\"ja\":\"ポルトガル\",\"it\":\"Portogallo\",\"hu\":\"Portugália\"},\"flag\":\"https://flagcdn.com/pt.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"POR\",\"independent\":true},{\"name\":\"Puerto Rico\",\"topLevelDomain\":[\".pr\"],\"alpha2Code\":\"PR\",\"alpha3Code\":\"PRI\",\"callingCodes\":[\"1\"],\"capital\":\"San Juan\",\"altSpellings\":[\"PR\",\"Commonwealth of Puerto Rico\",\"Estado Libre Asociado de Puerto Rico\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":3194034,\"latlng\":[18.25,-66.5],\"demonym\":\"Puerto Rican\",\"area\":8870.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Puerto Rico\",\"numericCode\":\"630\",\"flags\":{\"svg\":\"https://flagcdn.com/pr.svg\",\"png\":\"https://flagcdn.com/w320/pr.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Puerto Rico\",\"pt\":\"Porto Rico\",\"nl\":\"Puerto Rico\",\"hr\":\"Portoriko\",\"fa\":\"پورتو ریکو\",\"de\":\"Puerto Rico\",\"es\":\"Puerto Rico\",\"fr\":\"Porto Rico\",\"ja\":\"プエルトリコ\",\"it\":\"Porto Rico\",\"hu\":\"Puerto Rico\"},\"flag\":\"https://flagcdn.com/pr.svg\",\"cioc\":\"PUR\",\"independent\":false},{\"name\":\"Qatar\",\"topLevelDomain\":[\".qa\"],\"alpha2Code\":\"QA\",\"alpha3Code\":\"QAT\",\"callingCodes\":[\"974\"],\"capital\":\"Doha\",\"altSpellings\":[\"QA\",\"State of Qatar\",\"Dawlat Qaṭar\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":2881060,\"latlng\":[25.5,51.25],\"demonym\":\"Qatari\",\"area\":11586.0,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"SAU\"],\"nativeName\":\"قطر\",\"numericCode\":\"634\",\"flags\":{\"svg\":\"https://flagcdn.com/qa.svg\",\"png\":\"https://flagcdn.com/w320/qa.png\"},\"currencies\":[{\"code\":\"QAR\",\"name\":\"Qatari riyal\",\"symbol\":\"ر.ق\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Katar\",\"pt\":\"Catar\",\"nl\":\"Qatar\",\"hr\":\"Katar\",\"fa\":\"قطر\",\"de\":\"Katar\",\"es\":\"Catar\",\"fr\":\"Qatar\",\"ja\":\"カタール\",\"it\":\"Qatar\",\"hu\":\"Katar\"},\"flag\":\"https://flagcdn.com/qa.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"QAT\",\"independent\":true},{\"name\":\"Republic of Kosovo\",\"topLevelDomain\":[\"\"],\"alpha2Code\":\"XK\",\"alpha3Code\":\"UNK\",\"callingCodes\":[\"383\"],\"capital\":\"Pristina\",\"altSpellings\":[\"XK\",\"Република Косово\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":1775378,\"latlng\":[42.666667,21.166667],\"demonym\":\"Kosovar\",\"area\":10908.0,\"gini\":29.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"ALB\",\"MKD\",\"MNE\",\"SRB\"],\"nativeName\":\"Republika e Kosovës\",\"numericCode\":\"926\",\"flags\":{\"svg\":\"https://flagcdn.com/xk.svg\",\"png\":\"https://flagcdn.com/w320/xk.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"sq\",\"iso639_2\":\"sqi\",\"name\":\"Albanian\",\"nativeName\":\"Shqip\"},{\"iso639_1\":\"sr\",\"iso639_2\":\"srp\",\"name\":\"Serbian\",\"nativeName\":\"српски језик\"}],\"translations\":{\"br\":\"Kosovo\",\"pt\":\"Kosovo\",\"nl\":\"Republiek van Kosovo\",\"hr\":\"Kosovo\",\"fa\":\"کوزوو\",\"de\":\"Republic of Kosovo\",\"es\":\"Kosovo\",\"fr\":\"Kosovo\",\"ja\":\"Republic of Kosovo\",\"it\":\"Republic of Kosovo\",\"hu\":\"Koszovó\"},\"flag\":\"https://flagcdn.com/xk.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"independent\":true},{\"name\":\"Réunion\",\"topLevelDomain\":[\".re\"],\"alpha2Code\":\"RE\",\"alpha3Code\":\"REU\",\"callingCodes\":[\"262\"],\"capital\":\"Saint-Denis\",\"altSpellings\":[\"RE\",\"Reunion\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":840974,\"latlng\":[-21.15,55.5],\"demonym\":\"French\",\"timezones\":[\"UTC+04:00\"],\"nativeName\":\"La Réunion\",\"numericCode\":\"638\",\"flags\":{\"svg\":\"https://flagcdn.com/re.svg\",\"png\":\"https://flagcdn.com/w320/re.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Reünion\",\"pt\":\"Reunião\",\"nl\":\"Réunion\",\"hr\":\"Réunion\",\"fa\":\"رئونیون\",\"de\":\"Réunion\",\"es\":\"Reunión\",\"fr\":\"Réunion\",\"ja\":\"レユニオン\",\"it\":\"Riunione\",\"hu\":\"Réunion\"},\"flag\":\"https://flagcdn.com/re.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"independent\":false},{\"name\":\"Romania\",\"topLevelDomain\":[\".ro\"],\"alpha2Code\":\"RO\",\"alpha3Code\":\"ROU\",\"callingCodes\":[\"40\"],\"capital\":\"Bucharest\",\"altSpellings\":[\"RO\",\"Rumania\",\"Roumania\",\"România\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":19286123,\"latlng\":[46.0,25.0],\"demonym\":\"Romanian\",\"area\":238391.0,\"gini\":35.8,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BGR\",\"HUN\",\"MDA\",\"SRB\",\"UKR\"],\"nativeName\":\"România\",\"numericCode\":\"642\",\"flags\":{\"svg\":\"https://flagcdn.com/ro.svg\",\"png\":\"https://flagcdn.com/w320/ro.png\"},\"currencies\":[{\"code\":\"RON\",\"name\":\"Romanian leu\",\"symbol\":\"lei\"}],\"languages\":[{\"iso639_1\":\"ro\",\"iso639_2\":\"ron\",\"name\":\"Romanian\",\"nativeName\":\"Română\"}],\"translations\":{\"br\":\"Roumania\",\"pt\":\"Roménia\",\"nl\":\"Roemenië\",\"hr\":\"Rumunjska\",\"fa\":\"رومانی\",\"de\":\"Rumänien\",\"es\":\"Rumania\",\"fr\":\"Roumanie\",\"ja\":\"ルーマニア\",\"it\":\"Romania\",\"hu\":\"Románia\"},\"flag\":\"https://flagcdn.com/ro.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"ROU\",\"independent\":true},{\"name\":\"Russian Federation\",\"topLevelDomain\":[\".ru\"],\"alpha2Code\":\"RU\",\"alpha3Code\":\"RUS\",\"callingCodes\":[\"7\"],\"capital\":\"Moscow\",\"altSpellings\":[\"RU\",\"Rossiya\",\"Russian Federation\",\"Российская Федерация\",\"Rossiyskaya Federatsiya\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":144104080,\"latlng\":[60.0,100.0],\"demonym\":\"Russian\",\"area\":1.7124442E7,\"gini\":37.5,\"timezones\":[\"UTC+03:00\",\"UTC+04:00\",\"UTC+06:00\",\"UTC+07:00\",\"UTC+08:00\",\"UTC+09:00\",\"UTC+10:00\",\"UTC+11:00\",\"UTC+12:00\"],\"borders\":[\"AZE\",\"BLR\",\"CHN\",\"EST\",\"FIN\",\"GEO\",\"KAZ\",\"PRK\",\"LVA\",\"LTU\",\"MNG\",\"NOR\",\"POL\",\"UKR\"],\"nativeName\":\"Россия\",\"numericCode\":\"643\",\"flags\":{\"svg\":\"https://flagcdn.com/ru.svg\",\"png\":\"https://flagcdn.com/w320/ru.png\"},\"currencies\":[{\"code\":\"RUB\",\"name\":\"Russian ruble\",\"symbol\":\"₽\"}],\"languages\":[{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Rusia\",\"pt\":\"Rússia\",\"nl\":\"Rusland\",\"hr\":\"Rusija\",\"fa\":\"روسیه\",\"de\":\"Russland\",\"es\":\"Rusia\",\"fr\":\"Russie\",\"ja\":\"ロシア連邦\",\"it\":\"Russia\",\"hu\":\"Oroszország\"},\"flag\":\"https://flagcdn.com/ru.svg\",\"regionalBlocs\":[{\"acronym\":\"EEU\",\"name\":\"Eurasian Economic Union\",\"otherAcronyms\":[\"EAEU\"]}],\"cioc\":\"RUS\",\"independent\":true},{\"name\":\"Rwanda\",\"topLevelDomain\":[\".rw\"],\"alpha2Code\":\"RW\",\"alpha3Code\":\"RWA\",\"callingCodes\":[\"250\"],\"capital\":\"Kigali\",\"altSpellings\":[\"RW\",\"Republic of Rwanda\",\"Repubulika y'u Rwanda\",\"République du Rwanda\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":12952209,\"latlng\":[-2.0,30.0],\"demonym\":\"Rwandan\",\"area\":26338.0,\"gini\":43.7,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BDI\",\"COD\",\"TZA\",\"UGA\"],\"nativeName\":\"Rwanda\",\"numericCode\":\"646\",\"flags\":{\"svg\":\"https://flagcdn.com/rw.svg\",\"png\":\"https://flagcdn.com/w320/rw.png\"},\"currencies\":[{\"code\":\"RWF\",\"name\":\"Rwandan franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"rw\",\"iso639_2\":\"kin\",\"name\":\"Kinyarwanda\",\"nativeName\":\"Ikinyarwanda\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Rwanda\",\"pt\":\"Ruanda\",\"nl\":\"Rwanda\",\"hr\":\"Ruanda\",\"fa\":\"رواندا\",\"de\":\"Ruanda\",\"es\":\"Ruanda\",\"fr\":\"Rwanda\",\"ja\":\"ルワンダ\",\"it\":\"Ruanda\",\"hu\":\"Ruanda\"},\"flag\":\"https://flagcdn.com/rw.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"RWA\",\"independent\":true},{\"name\":\"Saint Barthélemy\",\"topLevelDomain\":[\".bl\"],\"alpha2Code\":\"BL\",\"alpha3Code\":\"BLM\",\"callingCodes\":[\"590\"],\"capital\":\"Gustavia\",\"altSpellings\":[\"BL\",\"St. Barthelemy\",\"Collectivity of Saint Barthélemy\",\"Collectivité de Saint-Barthélemy\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":9417,\"latlng\":[18.5,-63.41666666],\"demonym\":\"Saint Barthélemy Islander\",\"area\":21.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Saint-Barthélemy\",\"numericCode\":\"652\",\"flags\":{\"svg\":\"https://flagcdn.com/bl.svg\",\"png\":\"https://flagcdn.com/w320/bl.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Saint-Barthélemy\",\"pt\":\"São Bartolomeu\",\"nl\":\"Saint Barthélemy\",\"hr\":\"Saint Barthélemy\",\"fa\":\"سن-بارتلمی\",\"de\":\"Saint-Barthélemy\",\"es\":\"San Bartolomé\",\"fr\":\"Saint-Barthélemy\",\"ja\":\"サン・バルテルミー\",\"it\":\"Antille Francesi\",\"hu\":\"Saint-Barthélemy\"},\"flag\":\"https://flagcdn.com/bl.svg\",\"independent\":false},{\"name\":\"Saint Helena, Ascension and Tristan da Cunha\",\"topLevelDomain\":[\".sh\"],\"alpha2Code\":\"SH\",\"alpha3Code\":\"SHN\",\"callingCodes\":[\"290\"],\"capital\":\"Jamestown\",\"altSpellings\":[\"SH\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":4255,\"latlng\":[-15.95,-5.7],\"demonym\":\"Saint Helenian\",\"timezones\":[\"UTC+00:00\"],\"nativeName\":\"Saint Helena\",\"numericCode\":\"654\",\"flags\":{\"svg\":\"https://flagcdn.com/sh.svg\",\"png\":\"https://flagcdn.com/w320/sh.png\"},\"currencies\":[{\"code\":\"SHP\",\"name\":\"Saint Helena pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Saint Helena, Ascension ha Tristan da Cunha\",\"pt\":\"Santa Helena\",\"nl\":\"Sint-Helena\",\"hr\":\"Sveta Helena\",\"fa\":\"سنت هلنا، اسنشن و تریستان دا کونا\",\"de\":\"Sankt Helena\",\"es\":\"Santa Helena\",\"fr\":\"Sainte-Hélène\",\"ja\":\"セントヘレナ・アセンションおよびトリスタンダクーニャ\",\"it\":\"Sant'Elena\",\"hu\":\"Szent Ilona\"},\"flag\":\"https://flagcdn.com/sh.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"independent\":false},{\"name\":\"Saint Kitts and Nevis\",\"topLevelDomain\":[\".kn\"],\"alpha2Code\":\"KN\",\"alpha3Code\":\"KNA\",\"callingCodes\":[\"1\"],\"capital\":\"Basseterre\",\"altSpellings\":[\"KN\",\"Federation of Saint Christopher and Nevis\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":53192,\"latlng\":[17.33333333,-62.75],\"demonym\":\"Kittian and Nevisian\",\"area\":261.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Saint Kitts and Nevis\",\"numericCode\":\"659\",\"flags\":{\"svg\":\"https://flagcdn.com/kn.svg\",\"png\":\"https://flagcdn.com/w320/kn.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Saint Kitts ha Nevis\",\"pt\":\"São Cristóvão e Neves\",\"nl\":\"Saint Kitts en Nevis\",\"hr\":\"Sveti Kristof i Nevis\",\"fa\":\"سنت کیتس و نویس\",\"de\":\"St. Kitts und Nevis\",\"es\":\"San Cristóbal y Nieves\",\"fr\":\"Saint-Christophe-et-Niévès\",\"ja\":\"セントクリストファー・ネイビス\",\"it\":\"Saint Kitts e Nevis\",\"hu\":\"Saint Kitts és Nevis\"},\"flag\":\"https://flagcdn.com/kn.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"SKN\",\"independent\":true},{\"name\":\"Saint Lucia\",\"topLevelDomain\":[\".lc\"],\"alpha2Code\":\"LC\",\"alpha3Code\":\"LCA\",\"callingCodes\":[\"1\"],\"capital\":\"Castries\",\"altSpellings\":[\"LC\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":183629,\"latlng\":[13.88333333,-60.96666666],\"demonym\":\"Saint Lucian\",\"area\":616.0,\"gini\":51.2,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Saint Lucia\",\"numericCode\":\"662\",\"flags\":{\"svg\":\"https://flagcdn.com/lc.svg\",\"png\":\"https://flagcdn.com/w320/lc.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Santez-Lusia\",\"pt\":\"Santa Lúcia\",\"nl\":\"Saint Lucia\",\"hr\":\"Sveta Lucija\",\"fa\":\"سنت لوسیا\",\"de\":\"Saint Lucia\",\"es\":\"Santa Lucía\",\"fr\":\"Saint-Lucie\",\"ja\":\"セントルシア\",\"it\":\"Santa Lucia\",\"hu\":\"Saint Lucia\"},\"flag\":\"https://flagcdn.com/lc.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"LCA\",\"independent\":true},{\"name\":\"Saint Martin (French part)\",\"topLevelDomain\":[\".mf\",\".fr\",\".gp\"],\"alpha2Code\":\"MF\",\"alpha3Code\":\"MAF\",\"callingCodes\":[\"590\"],\"capital\":\"Marigot\",\"altSpellings\":[\"MF\",\"Collectivity of Saint Martin\",\"Collectivité de Saint-Martin\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":38659,\"latlng\":[18.08333333,-63.95],\"demonym\":\"Saint Martin Islander\",\"area\":53.0,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"SXM\",\"NLD\"],\"nativeName\":\"Saint-Martin\",\"numericCode\":\"663\",\"flags\":{\"svg\":\"https://flagcdn.com/mf.svg\",\"png\":\"https://flagcdn.com/w320/mf.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"}],\"translations\":{\"br\":\"Saint-Martin\",\"pt\":\"Ilha São Martinho\",\"nl\":\"Saint-Martin\",\"hr\":\"Sveti Martin\",\"fa\":\"سینت مارتن\",\"de\":\"Saint Martin\",\"es\":\"Saint Martin\",\"fr\":\"Saint-Martin\",\"ja\":\"サン・マルタン（フランス領）\",\"it\":\"Saint Martin\",\"hu\":\"Saint-Martin\"},\"flag\":\"https://flagcdn.com/mf.svg\",\"independent\":false},{\"name\":\"Saint Pierre and Miquelon\",\"topLevelDomain\":[\".pm\"],\"alpha2Code\":\"PM\",\"alpha3Code\":\"SPM\",\"callingCodes\":[\"508\"],\"capital\":\"Saint-Pierre\",\"altSpellings\":[\"PM\",\"Collectivité territoriale de Saint-Pierre-et-Miquelon\"],\"subregion\":\"Northern America\",\"region\":\"Americas\",\"population\":6069,\"latlng\":[46.83333333,-56.33333333],\"demonym\":\"French\",\"area\":242.0,\"timezones\":[\"UTC-03:00\"],\"nativeName\":\"Saint-Pierre-et-Miquelon\",\"numericCode\":\"666\",\"flags\":{\"svg\":\"https://flagcdn.com/pm.svg\",\"png\":\"https://flagcdn.com/w320/pm.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Sant-Pêr-ha-Mikelon\",\"pt\":\"São Pedro e Miquelon\",\"nl\":\"Saint Pierre en Miquelon\",\"hr\":\"Sveti Petar i Mikelon\",\"fa\":\"سن پیر و میکلن\",\"de\":\"Saint-Pierre und Miquelon\",\"es\":\"San Pedro y Miquelón\",\"fr\":\"Saint-Pierre-et-Miquelon\",\"ja\":\"サンピエール島・ミクロン島\",\"it\":\"Saint-Pierre e Miquelon\",\"hu\":\"Saint-Pierre és Miquelon\"},\"flag\":\"https://flagcdn.com/pm.svg\",\"independent\":false},{\"name\":\"Saint Vincent and the Grenadines\",\"topLevelDomain\":[\".vc\"],\"alpha2Code\":\"VC\",\"alpha3Code\":\"VCT\",\"callingCodes\":[\"1\"],\"capital\":\"Kingstown\",\"altSpellings\":[\"VC\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":110947,\"latlng\":[13.25,-61.2],\"demonym\":\"Saint Vincentian\",\"area\":389.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Saint Vincent and the Grenadines\",\"numericCode\":\"670\",\"flags\":{\"svg\":\"https://flagcdn.com/vc.svg\",\"png\":\"https://flagcdn.com/w320/vc.png\"},\"currencies\":[{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Sant-Visant hag ar Grenadinez\",\"pt\":\"São Vicente e Granadinas\",\"nl\":\"Saint Vincent en de Grenadines\",\"hr\":\"Sveti Vincent i Grenadini\",\"fa\":\"سنت وینسنت و گرنادین‌ها\",\"de\":\"Saint Vincent und die Grenadinen\",\"es\":\"San Vicente y Granadinas\",\"fr\":\"Saint-Vincent-et-les-Grenadines\",\"ja\":\"セントビンセントおよびグレナディーン諸島\",\"it\":\"Saint Vincent e Grenadine\",\"hu\":\"Saint Vincent és a Grenadine-szigetek\"},\"flag\":\"https://flagcdn.com/vc.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"VIN\",\"independent\":true},{\"name\":\"Samoa\",\"topLevelDomain\":[\".ws\"],\"alpha2Code\":\"WS\",\"alpha3Code\":\"WSM\",\"callingCodes\":[\"685\"],\"capital\":\"Apia\",\"altSpellings\":[\"WS\",\"Independent State of Samoa\",\"Malo Saʻoloto Tutoʻatasi o Sāmoa\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":198410,\"latlng\":[-13.58333333,-172.33333333],\"demonym\":\"Samoan\",\"area\":2842.0,\"gini\":38.7,\"timezones\":[\"UTC+13:00\"],\"nativeName\":\"Samoa\",\"numericCode\":\"882\",\"flags\":{\"svg\":\"https://flagcdn.com/ws.svg\",\"png\":\"https://flagcdn.com/w320/ws.png\"},\"currencies\":[{\"code\":\"WST\",\"name\":\"Samoan tālā\",\"symbol\":\"T\"}],\"languages\":[{\"iso639_1\":\"sm\",\"iso639_2\":\"smo\",\"name\":\"Samoan\",\"nativeName\":\"gagana fa'a Samoa\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Samoa\",\"pt\":\"Samoa\",\"nl\":\"Samoa\",\"hr\":\"Samoa\",\"fa\":\"ساموآ\",\"de\":\"Samoa\",\"es\":\"Samoa\",\"fr\":\"Samoa\",\"ja\":\"サモア\",\"it\":\"Samoa\",\"hu\":\"Szamoa\"},\"flag\":\"https://flagcdn.com/ws.svg\",\"cioc\":\"SAM\",\"independent\":true},{\"name\":\"San Marino\",\"topLevelDomain\":[\".sm\"],\"alpha2Code\":\"SM\",\"alpha3Code\":\"SMR\",\"callingCodes\":[\"378\"],\"capital\":\"City of San Marino\",\"altSpellings\":[\"SM\",\"Republic of San Marino\",\"Repubblica di San Marino\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":33938,\"latlng\":[43.76666666,12.41666666],\"demonym\":\"Sammarinese\",\"area\":61.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"ITA\"],\"nativeName\":\"San Marino\",\"numericCode\":\"674\",\"flags\":{\"svg\":\"https://flagcdn.com/sm.svg\",\"png\":\"https://flagcdn.com/w320/sm.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"it\",\"iso639_2\":\"ita\",\"name\":\"Italian\",\"nativeName\":\"Italiano\"}],\"translations\":{\"br\":\"San Marino\",\"pt\":\"São Marinho\",\"nl\":\"San Marino\",\"hr\":\"San Marino\",\"fa\":\"سان مارینو\",\"de\":\"San Marino\",\"es\":\"San Marino\",\"fr\":\"Saint-Marin\",\"ja\":\"サンマリノ\",\"it\":\"San Marino\",\"hu\":\"San Marino\"},\"flag\":\"https://flagcdn.com/sm.svg\",\"cioc\":\"SMR\",\"independent\":true},{\"name\":\"Sao Tome and Principe\",\"topLevelDomain\":[\".st\"],\"alpha2Code\":\"ST\",\"alpha3Code\":\"STP\",\"callingCodes\":[\"239\"],\"capital\":\"São Tomé\",\"altSpellings\":[\"ST\",\"Democratic Republic of São Tomé and Príncipe\",\"República Democrática de São Tomé e Príncipe\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":219161,\"latlng\":[1.0,7.0],\"demonym\":\"Sao Tomean\",\"area\":964.0,\"gini\":56.3,\"timezones\":[\"UTC\"],\"nativeName\":\"São Tomé e Príncipe\",\"numericCode\":\"678\",\"flags\":{\"svg\":\"https://flagcdn.com/st.svg\",\"png\":\"https://flagcdn.com/w320/st.png\"},\"currencies\":[{\"code\":\"STD\",\"name\":\"São Tomé and Príncipe dobra\",\"symbol\":\"Db\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"São Tomé ha Príncipe\",\"pt\":\"São Tomé e Príncipe\",\"nl\":\"Sao Tomé en Principe\",\"hr\":\"Sveti Toma i Princip\",\"fa\":\"کواترو دو فرویرو\",\"de\":\"São Tomé und Príncipe\",\"es\":\"Santo Tomé y Príncipe\",\"fr\":\"Sao Tomé-et-Principe\",\"ja\":\"サントメ・プリンシペ\",\"it\":\"São Tomé e Príncipe\",\"hu\":\"São Tomé és Príncipe\"},\"flag\":\"https://flagcdn.com/st.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"STP\",\"independent\":true},{\"name\":\"Saudi Arabia\",\"topLevelDomain\":[\".sa\"],\"alpha2Code\":\"SA\",\"alpha3Code\":\"SAU\",\"callingCodes\":[\"966\"],\"capital\":\"Riyadh\",\"altSpellings\":[\"SA\",\"Kingdom of Saudi Arabia\",\"Al-Mamlakah al-‘Arabiyyah as-Su‘ūdiyyah\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":34813867,\"latlng\":[25.0,45.0],\"demonym\":\"Saudi Arabian\",\"area\":2149690.0,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"IRQ\",\"JOR\",\"KWT\",\"OMN\",\"QAT\",\"ARE\",\"YEM\"],\"nativeName\":\"العربية السعودية\",\"numericCode\":\"682\",\"flags\":{\"svg\":\"https://flagcdn.com/sa.svg\",\"png\":\"https://flagcdn.com/w320/sa.png\"},\"currencies\":[{\"code\":\"SAR\",\"name\":\"Saudi riyal\",\"symbol\":\"ر.س\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Arabia Saoudat\",\"pt\":\"Arábia Saudita\",\"nl\":\"Saoedi-Arabië\",\"hr\":\"Saudijska Arabija\",\"fa\":\"عربستان سعودی\",\"de\":\"Saudi-Arabien\",\"es\":\"Arabia Saudí\",\"fr\":\"Arabie Saoudite\",\"ja\":\"サウジアラビア\",\"it\":\"Arabia Saudita\",\"hu\":\"Szaúd-Arábia\"},\"flag\":\"https://flagcdn.com/sa.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"KSA\",\"independent\":true},{\"name\":\"Senegal\",\"topLevelDomain\":[\".sn\"],\"alpha2Code\":\"SN\",\"alpha3Code\":\"SEN\",\"callingCodes\":[\"221\"],\"capital\":\"Dakar\",\"altSpellings\":[\"SN\",\"Republic of Senegal\",\"République du Sénégal\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":16743930,\"latlng\":[14.0,-14.0],\"demonym\":\"Senegalese\",\"area\":196722.0,\"gini\":40.3,\"timezones\":[\"UTC\"],\"borders\":[\"GMB\",\"GIN\",\"GNB\",\"MLI\",\"MRT\"],\"nativeName\":\"Sénégal\",\"numericCode\":\"686\",\"flags\":{\"svg\":\"https://flagcdn.com/sn.svg\",\"png\":\"https://flagcdn.com/w320/sn.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Senegal\",\"pt\":\"Senegal\",\"nl\":\"Senegal\",\"hr\":\"Senegal\",\"fa\":\"سنگال\",\"de\":\"Senegal\",\"es\":\"Senegal\",\"fr\":\"Sénégal\",\"ja\":\"セネガル\",\"it\":\"Senegal\",\"hu\":\"Szenegál\"},\"flag\":\"https://flagcdn.com/sn.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"SEN\",\"independent\":true},{\"name\":\"Serbia\",\"topLevelDomain\":[\".rs\"],\"alpha2Code\":\"RS\",\"alpha3Code\":\"SRB\",\"callingCodes\":[\"381\"],\"capital\":\"Belgrade\",\"altSpellings\":[\"RS\",\"Srbija\",\"Republic of Serbia\",\"Република Србија\",\"Republika Srbija\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":6908224,\"latlng\":[44.0,21.0],\"demonym\":\"Serbian\",\"area\":88361.0,\"gini\":36.2,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"BIH\",\"BGR\",\"HRV\",\"HUN\",\"UNK\",\"MKD\",\"MNE\",\"ROU\"],\"nativeName\":\"Србија\",\"numericCode\":\"688\",\"flags\":{\"svg\":\"https://flagcdn.com/rs.svg\",\"png\":\"https://flagcdn.com/w320/rs.png\"},\"currencies\":[{\"code\":\"RSD\",\"name\":\"Serbian dinar\",\"symbol\":\"дин.\"}],\"languages\":[{\"iso639_1\":\"sr\",\"iso639_2\":\"srp\",\"name\":\"Serbian\",\"nativeName\":\"српски језик\"}],\"translations\":{\"br\":\"Serbia\",\"pt\":\"Sérvia\",\"nl\":\"Servië\",\"hr\":\"Srbija\",\"fa\":\"صربستان\",\"de\":\"Serbien\",\"es\":\"Serbia\",\"fr\":\"Serbie\",\"ja\":\"セルビア\",\"it\":\"Serbia\",\"hu\":\"Szerbia\"},\"flag\":\"https://flagcdn.com/rs.svg\",\"regionalBlocs\":[{\"acronym\":\"CEFTA\",\"name\":\"Central European Free Trade Agreement\"}],\"cioc\":\"SRB\",\"independent\":true},{\"name\":\"Seychelles\",\"topLevelDomain\":[\".sc\"],\"alpha2Code\":\"SC\",\"alpha3Code\":\"SYC\",\"callingCodes\":[\"248\"],\"capital\":\"Victoria\",\"altSpellings\":[\"SC\",\"Republic of Seychelles\",\"Repiblik Sesel\",\"République des Seychelles\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":98462,\"latlng\":[-4.58333333,55.66666666],\"demonym\":\"Seychellois\",\"area\":452.0,\"gini\":32.1,\"timezones\":[\"UTC+04:00\"],\"nativeName\":\"Seychelles\",\"numericCode\":\"690\",\"flags\":{\"svg\":\"https://flagcdn.com/sc.svg\",\"png\":\"https://flagcdn.com/w320/sc.png\"},\"currencies\":[{\"code\":\"SCR\",\"name\":\"Seychellois rupee\",\"symbol\":\"₨\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Sechelez\",\"pt\":\"Seicheles\",\"nl\":\"Seychellen\",\"hr\":\"Sejšeli\",\"fa\":\"سیشل\",\"de\":\"Seychellen\",\"es\":\"Seychelles\",\"fr\":\"Seychelles\",\"ja\":\"セーシェル\",\"it\":\"Seychelles\",\"hu\":\"Seychelle-szigetek\"},\"flag\":\"https://flagcdn.com/sc.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"SEY\",\"independent\":true},{\"name\":\"Sierra Leone\",\"topLevelDomain\":[\".sl\"],\"alpha2Code\":\"SL\",\"alpha3Code\":\"SLE\",\"callingCodes\":[\"232\"],\"capital\":\"Freetown\",\"altSpellings\":[\"SL\",\"Republic of Sierra Leone\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":7976985,\"latlng\":[8.5,-11.5],\"demonym\":\"Sierra Leonean\",\"area\":71740.0,\"gini\":35.7,\"timezones\":[\"UTC\"],\"borders\":[\"GIN\",\"LBR\"],\"nativeName\":\"Sierra Leone\",\"numericCode\":\"694\",\"flags\":{\"svg\":\"https://flagcdn.com/sl.svg\",\"png\":\"https://flagcdn.com/w320/sl.png\"},\"currencies\":[{\"code\":\"SLL\",\"name\":\"Sierra Leonean leone\",\"symbol\":\"Le\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Sierra Leone\",\"pt\":\"Serra Leoa\",\"nl\":\"Sierra Leone\",\"hr\":\"Sijera Leone\",\"fa\":\"سیرالئون\",\"de\":\"Sierra Leone\",\"es\":\"Sierra Leone\",\"fr\":\"Sierra Leone\",\"ja\":\"シエラレオネ\",\"it\":\"Sierra Leone\",\"hu\":\"Sierra Leone\"},\"flag\":\"https://flagcdn.com/sl.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"SLE\",\"independent\":true},{\"name\":\"Singapore\",\"topLevelDomain\":[\".sg\"],\"alpha2Code\":\"SG\",\"alpha3Code\":\"SGP\",\"callingCodes\":[\"65\"],\"capital\":\"Singapore\",\"altSpellings\":[\"SG\",\"Singapura\",\"Republik Singapura\",\"新加坡共和国\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":5685807,\"latlng\":[1.36666666,103.8],\"demonym\":\"Singaporean\",\"area\":710.0,\"timezones\":[\"UTC+08:00\"],\"nativeName\":\"Singapore\",\"numericCode\":\"702\",\"flags\":{\"svg\":\"https://flagcdn.com/sg.svg\",\"png\":\"https://flagcdn.com/w320/sg.png\"},\"currencies\":[{\"code\":\"SGD\",\"name\":\"Singapore dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"ms\",\"iso639_2\":\"msa\",\"name\":\"Malay\",\"nativeName\":\"bahasa Melayu\"},{\"iso639_1\":\"ta\",\"iso639_2\":\"tam\",\"name\":\"Tamil\",\"nativeName\":\"தமிழ்\"},{\"iso639_1\":\"zh\",\"iso639_2\":\"zho\",\"name\":\"Chinese\",\"nativeName\":\"中文 (Zhōngwén)\"}],\"translations\":{\"br\":\"Singapour\",\"pt\":\"Singapura\",\"nl\":\"Singapore\",\"hr\":\"Singapur\",\"fa\":\"سنگاپور\",\"de\":\"Singapur\",\"es\":\"Singapur\",\"fr\":\"Singapour\",\"ja\":\"シンガポール\",\"it\":\"Singapore\",\"hu\":\"Szingapúr\"},\"flag\":\"https://flagcdn.com/sg.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"SIN\",\"independent\":true},{\"name\":\"Sint Maarten (Dutch part)\",\"topLevelDomain\":[\".sx\"],\"alpha2Code\":\"SX\",\"alpha3Code\":\"SXM\",\"callingCodes\":[\"1\"],\"capital\":\"Philipsburg\",\"altSpellings\":[\"SX\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":40812,\"latlng\":[18.033333,-63.05],\"demonym\":\"Dutch\",\"area\":34.0,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"MAF\"],\"nativeName\":\"Sint Maarten\",\"numericCode\":\"534\",\"flags\":{\"svg\":\"https://flagcdn.com/sx.svg\",\"png\":\"https://flagcdn.com/w320/sx.png\"},\"currencies\":[{\"code\":\"ANG\",\"name\":\"Netherlands Antillean guilder\",\"symbol\":\"ƒ\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Sint Maarten\",\"pt\":\"São Martinho\",\"nl\":\"Sint Maarten\",\"hr\":\"Sint Maarten (Dutch part)\",\"fa\":\"سینت مارتن\",\"de\":\"Sint Maarten (niederl. Teil)\",\"es\":\"Sint Maarten (Dutch part)\",\"fr\":\"Saint Martin (partie néerlandaise)\",\"ja\":\"Sint Maarten (Dutch part)\",\"it\":\"Saint Martin (parte olandese)\",\"hu\":\"Sint Maarten\"},\"flag\":\"https://flagcdn.com/sx.svg\",\"independent\":false},{\"name\":\"Slovakia\",\"topLevelDomain\":[\".sk\"],\"alpha2Code\":\"SK\",\"alpha3Code\":\"SVK\",\"callingCodes\":[\"421\"],\"capital\":\"Bratislava\",\"altSpellings\":[\"SK\",\"Slovak Republic\",\"Slovenská republika\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":5458827,\"latlng\":[48.66666666,19.5],\"demonym\":\"Slovak\",\"area\":49037.0,\"gini\":25.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"CZE\",\"HUN\",\"POL\",\"UKR\"],\"nativeName\":\"Slovensko\",\"numericCode\":\"703\",\"flags\":{\"svg\":\"https://flagcdn.com/sk.svg\",\"png\":\"https://flagcdn.com/w320/sk.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"sk\",\"iso639_2\":\"slk\",\"name\":\"Slovak\",\"nativeName\":\"slovenčina\"}],\"translations\":{\"br\":\"Slovakia\",\"pt\":\"Eslováquia\",\"nl\":\"Slowakije\",\"hr\":\"Slovačka\",\"fa\":\"اسلواکی\",\"de\":\"Slowakei\",\"es\":\"República Eslovaca\",\"fr\":\"Slovaquie\",\"ja\":\"スロバキア\",\"it\":\"Slovacchia\",\"hu\":\"Szlovákia\"},\"flag\":\"https://flagcdn.com/sk.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"SVK\",\"independent\":true},{\"name\":\"Slovenia\",\"topLevelDomain\":[\".si\"],\"alpha2Code\":\"SI\",\"alpha3Code\":\"SVN\",\"callingCodes\":[\"386\"],\"capital\":\"Ljubljana\",\"altSpellings\":[\"SI\",\"Republic of Slovenia\",\"Republika Slovenija\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":2100126,\"latlng\":[46.11666666,14.81666666],\"demonym\":\"Slovene\",\"area\":20273.0,\"gini\":24.6,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"HRV\",\"ITA\",\"HUN\"],\"nativeName\":\"Slovenija\",\"numericCode\":\"705\",\"flags\":{\"svg\":\"https://flagcdn.com/si.svg\",\"png\":\"https://flagcdn.com/w320/si.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"sl\",\"iso639_2\":\"slv\",\"name\":\"Slovene\",\"nativeName\":\"slovenski jezik\"}],\"translations\":{\"br\":\"Slovenia\",\"pt\":\"Eslovénia\",\"nl\":\"Slovenië\",\"hr\":\"Slovenija\",\"fa\":\"اسلوونی\",\"de\":\"Slowenien\",\"es\":\"Eslovenia\",\"fr\":\"Slovénie\",\"ja\":\"スロベニア\",\"it\":\"Slovenia\",\"hu\":\"Szlovénia\"},\"flag\":\"https://flagcdn.com/si.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"SLO\",\"independent\":true},{\"name\":\"Solomon Islands\",\"topLevelDomain\":[\".sb\"],\"alpha2Code\":\"SB\",\"alpha3Code\":\"SLB\",\"callingCodes\":[\"677\"],\"capital\":\"Honiara\",\"altSpellings\":[\"SB\"],\"subregion\":\"Melanesia\",\"region\":\"Oceania\",\"population\":686878,\"latlng\":[-8.0,159.0],\"demonym\":\"Solomon Islander\",\"area\":28896.0,\"gini\":37.1,\"timezones\":[\"UTC+11:00\"],\"nativeName\":\"Solomon Islands\",\"numericCode\":\"090\",\"flags\":{\"svg\":\"https://flagcdn.com/sb.svg\",\"png\":\"https://flagcdn.com/w320/sb.png\"},\"currencies\":[{\"code\":\"SBD\",\"name\":\"Solomon Islands dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Salomon\",\"pt\":\"Ilhas Salomão\",\"nl\":\"Salomonseilanden\",\"hr\":\"Solomonski Otoci\",\"fa\":\"جزایر سلیمان\",\"de\":\"Salomonen\",\"es\":\"Islas Salomón\",\"fr\":\"Îles Salomon\",\"ja\":\"ソロモン諸島\",\"it\":\"Isole Salomone\",\"hu\":\"Salamon-szigetek\"},\"flag\":\"https://flagcdn.com/sb.svg\",\"cioc\":\"SOL\",\"independent\":true},{\"name\":\"Somalia\",\"topLevelDomain\":[\".so\"],\"alpha2Code\":\"SO\",\"alpha3Code\":\"SOM\",\"callingCodes\":[\"252\"],\"capital\":\"Mogadishu\",\"altSpellings\":[\"SO\",\"aṣ-Ṣūmāl\",\"Federal Republic of Somalia\",\"Jamhuuriyadda Federaalka Soomaaliya\",\"Jumhūriyyat aṣ-Ṣūmāl al-Fiderāliyya\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":15893219,\"latlng\":[10.0,49.0],\"demonym\":\"Somali\",\"area\":637657.0,\"gini\":36.8,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"DJI\",\"ETH\",\"KEN\"],\"nativeName\":\"Soomaaliya\",\"numericCode\":\"706\",\"flags\":{\"svg\":\"https://flagcdn.com/so.svg\",\"png\":\"https://flagcdn.com/w320/so.png\"},\"currencies\":[{\"code\":\"SOS\",\"name\":\"Somali shilling\",\"symbol\":\"Sh\"}],\"languages\":[{\"iso639_1\":\"so\",\"iso639_2\":\"som\",\"name\":\"Somali\",\"nativeName\":\"Soomaaliga\"},{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Somalia\",\"pt\":\"Somália\",\"nl\":\"Somalië\",\"hr\":\"Somalija\",\"fa\":\"سومالی\",\"de\":\"Somalia\",\"es\":\"Somalia\",\"fr\":\"Somalie\",\"ja\":\"ソマリア\",\"it\":\"Somalia\",\"hu\":\"Szomália\"},\"flag\":\"https://flagcdn.com/so.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"SOM\",\"independent\":true},{\"name\":\"South Africa\",\"topLevelDomain\":[\".za\"],\"alpha2Code\":\"ZA\",\"alpha3Code\":\"ZAF\",\"callingCodes\":[\"27\"],\"capital\":\"Pretoria\",\"altSpellings\":[\"ZA\",\"RSA\",\"Suid-Afrika\",\"Republic of South Africa\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":59308690,\"latlng\":[-29.0,24.0],\"demonym\":\"South African\",\"area\":1221037.0,\"gini\":63.0,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BWA\",\"LSO\",\"MOZ\",\"NAM\",\"SWZ\",\"ZWE\"],\"nativeName\":\"South Africa\",\"numericCode\":\"710\",\"flags\":{\"svg\":\"https://flagcdn.com/za.svg\",\"png\":\"https://flagcdn.com/w320/za.png\"},\"currencies\":[{\"code\":\"ZAR\",\"name\":\"South African rand\",\"symbol\":\"R\"}],\"languages\":[{\"iso639_1\":\"af\",\"iso639_2\":\"afr\",\"name\":\"Afrikaans\",\"nativeName\":\"Afrikaans\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"nr\",\"iso639_2\":\"nbl\",\"name\":\"Southern Ndebele\",\"nativeName\":\"isiNdebele\"},{\"iso639_1\":\"st\",\"iso639_2\":\"sot\",\"name\":\"Southern Sotho\",\"nativeName\":\"Sesotho\"},{\"iso639_1\":\"ss\",\"iso639_2\":\"ssw\",\"name\":\"Swati\",\"nativeName\":\"SiSwati\"},{\"iso639_1\":\"tn\",\"iso639_2\":\"tsn\",\"name\":\"Tswana\",\"nativeName\":\"Setswana\"},{\"iso639_1\":\"ts\",\"iso639_2\":\"tso\",\"name\":\"Tsonga\",\"nativeName\":\"Xitsonga\"},{\"iso639_1\":\"ve\",\"iso639_2\":\"ven\",\"name\":\"Venda\",\"nativeName\":\"Tshivenḓa\"},{\"iso639_1\":\"xh\",\"iso639_2\":\"xho\",\"name\":\"Xhosa\",\"nativeName\":\"isiXhosa\"},{\"iso639_1\":\"zu\",\"iso639_2\":\"zul\",\"name\":\"Zulu\",\"nativeName\":\"isiZulu\"}],\"translations\":{\"br\":\"Suafrika\",\"pt\":\"República Sul-Africana\",\"nl\":\"Zuid-Afrika\",\"hr\":\"Južnoafrička Republika\",\"fa\":\"آفریقای جنوبی\",\"de\":\"Republik Südafrika\",\"es\":\"República de Sudáfrica\",\"fr\":\"Afrique du Sud\",\"ja\":\"南アフリカ\",\"it\":\"Sud Africa\",\"hu\":\"Dél-afrikai Köztársaság\"},\"flag\":\"https://flagcdn.com/za.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"RSA\",\"independent\":true},{\"name\":\"South Georgia and the South Sandwich Islands\",\"topLevelDomain\":[\".gs\"],\"alpha2Code\":\"GS\",\"alpha3Code\":\"SGS\",\"callingCodes\":[\"500\"],\"capital\":\"King Edward Point\",\"altSpellings\":[\"GS\",\"South Georgia and the South Sandwich Islands\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":30,\"latlng\":[-54.5,-37.0],\"demonym\":\"South Georgia and the South Sandwich Islander\",\"timezones\":[\"UTC-02:00\"],\"nativeName\":\"South Georgia\",\"numericCode\":\"239\",\"flags\":{\"svg\":\"https://flagcdn.com/gs.svg\",\"png\":\"https://flagcdn.com/w320/gs.png\"},\"currencies\":[{\"code\":\"FKP\",\"name\":\"Falkland Islands Pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Georgia ar Su hag Inizi Sandwich ar Su\",\"pt\":\"Ilhas Geórgia do Sul e Sanduíche do Sul\",\"nl\":\"Zuid-Georgia en Zuidelijke Sandwicheilanden\",\"hr\":\"Južna Georgija i otočje Južni Sandwich\",\"fa\":\"جزایر جورجیای جنوبی و ساندویچ جنوبی\",\"de\":\"Südgeorgien und die Südlichen Sandwichinseln\",\"es\":\"Islas Georgias del Sur y Sandwich del Sur\",\"fr\":\"Géorgie du Sud-et-les Îles Sandwich du Sud\",\"ja\":\"サウスジョージア・サウスサンドウィッチ諸島\",\"it\":\"Georgia del Sud e Isole Sandwich Meridionali\",\"hu\":\"Déli-Georgia és Déli-Sandwich-szigetek\"},\"flag\":\"https://flagcdn.com/gs.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"independent\":false},{\"name\":\"Korea (Republic of)\",\"topLevelDomain\":[\".kr\"],\"alpha2Code\":\"KR\",\"alpha3Code\":\"KOR\",\"callingCodes\":[\"82\"],\"capital\":\"Seoul\",\"altSpellings\":[\"KR\",\"Republic of Korea\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":51780579,\"latlng\":[37.0,127.5],\"demonym\":\"South Korean\",\"area\":100210.0,\"gini\":31.4,\"timezones\":[\"UTC+09:00\"],\"borders\":[\"PRK\"],\"nativeName\":\"대한민국\",\"numericCode\":\"410\",\"flags\":{\"svg\":\"https://flagcdn.com/kr.svg\",\"png\":\"https://flagcdn.com/w320/kr.png\"},\"currencies\":[{\"code\":\"KRW\",\"name\":\"South Korean won\",\"symbol\":\"₩\"}],\"languages\":[{\"iso639_1\":\"ko\",\"iso639_2\":\"kor\",\"name\":\"Korean\",\"nativeName\":\"한국어\"}],\"translations\":{\"br\":\"Korea ar Su\",\"pt\":\"Coreia do Sul\",\"nl\":\"Zuid-Korea\",\"hr\":\"Južna Koreja\",\"fa\":\"کره شمالی\",\"de\":\"Südkorea\",\"es\":\"Corea del Sur\",\"fr\":\"Corée du Sud\",\"ja\":\"大韓民国\",\"it\":\"Corea del Sud\",\"hu\":\"Dél-Korea\"},\"flag\":\"https://flagcdn.com/kr.svg\",\"cioc\":\"KOR\",\"independent\":true},{\"name\":\"Spain\",\"topLevelDomain\":[\".es\"],\"alpha2Code\":\"ES\",\"alpha3Code\":\"ESP\",\"callingCodes\":[\"34\"],\"capital\":\"Madrid\",\"altSpellings\":[\"ES\",\"Kingdom of Spain\",\"Reino de España\"],\"subregion\":\"Southern Europe\",\"region\":\"Europe\",\"population\":47351567,\"latlng\":[40.0,-4.0],\"demonym\":\"Spanish\",\"area\":505992.0,\"gini\":34.7,\"timezones\":[\"UTC\",\"UTC+01:00\"],\"borders\":[\"AND\",\"FRA\",\"GIB\",\"PRT\",\"MAR\"],\"nativeName\":\"España\",\"numericCode\":\"724\",\"flags\":{\"svg\":\"https://flagcdn.com/es.svg\",\"png\":\"https://flagcdn.com/w320/es.png\"},\"currencies\":[{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"€\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Spagn\",\"pt\":\"Espanha\",\"nl\":\"Spanje\",\"hr\":\"Španjolska\",\"fa\":\"اسپانیا\",\"de\":\"Spanien\",\"es\":\"España\",\"fr\":\"Espagne\",\"ja\":\"スペイン\",\"it\":\"Spagna\",\"hu\":\"Spanyolország\"},\"flag\":\"https://flagcdn.com/es.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"ESP\",\"independent\":true},{\"name\":\"Sri Lanka\",\"topLevelDomain\":[\".lk\"],\"alpha2Code\":\"LK\",\"alpha3Code\":\"LKA\",\"callingCodes\":[\"94\"],\"capital\":\"Sri Jayawardenepura Kotte\",\"altSpellings\":[\"LK\",\"ilaṅkai\",\"Democratic Socialist Republic of Sri Lanka\"],\"subregion\":\"Southern Asia\",\"region\":\"Asia\",\"population\":21919000,\"latlng\":[7.0,81.0],\"demonym\":\"Sri Lankan\",\"area\":65610.0,\"gini\":39.3,\"timezones\":[\"UTC+05:30\"],\"borders\":[\"IND\"],\"nativeName\":\"śrī laṃkāva\",\"numericCode\":\"144\",\"flags\":{\"svg\":\"https://flagcdn.com/lk.svg\",\"png\":\"https://flagcdn.com/w320/lk.png\"},\"currencies\":[{\"code\":\"LKR\",\"name\":\"Sri Lankan rupee\",\"symbol\":\"Rs\"}],\"languages\":[{\"iso639_1\":\"si\",\"iso639_2\":\"sin\",\"name\":\"Sinhalese\",\"nativeName\":\"සිංහල\"},{\"iso639_1\":\"ta\",\"iso639_2\":\"tam\",\"name\":\"Tamil\",\"nativeName\":\"தமிழ்\"}],\"translations\":{\"br\":\"Sri Lanka\",\"pt\":\"Sri Lanka\",\"nl\":\"Sri Lanka\",\"hr\":\"Šri Lanka\",\"fa\":\"سری‌لانکا\",\"de\":\"Sri Lanka\",\"es\":\"Sri Lanka\",\"fr\":\"Sri Lanka\",\"ja\":\"スリランカ\",\"it\":\"Sri Lanka\",\"hu\":\"Srí Lanka\"},\"flag\":\"https://flagcdn.com/lk.svg\",\"regionalBlocs\":[{\"acronym\":\"SAARC\",\"name\":\"South Asian Association for Regional Cooperation\"}],\"cioc\":\"SRI\",\"independent\":true},{\"name\":\"Sudan\",\"topLevelDomain\":[\".sd\"],\"alpha2Code\":\"SD\",\"alpha3Code\":\"SDN\",\"callingCodes\":[\"249\"],\"capital\":\"Khartoum\",\"altSpellings\":[\"SD\",\"Republic of the Sudan\",\"Jumhūrīyat as-Sūdān\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":43849269,\"latlng\":[15.0,30.0],\"demonym\":\"Sudanese\",\"area\":1886068.0,\"gini\":34.2,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"CAF\",\"TCD\",\"EGY\",\"ERI\",\"ETH\",\"LBY\",\"SSD\"],\"nativeName\":\"السودان\",\"numericCode\":\"729\",\"flags\":{\"svg\":\"https://flagcdn.com/sd.svg\",\"png\":\"https://flagcdn.com/w320/sd.png\"},\"currencies\":[{\"code\":\"SDG\",\"name\":\"Sudanese pound\",\"symbol\":\"ج.س.\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Soudan\",\"pt\":\"Sudão\",\"nl\":\"Soedan\",\"hr\":\"Sudan\",\"fa\":\"سودان\",\"de\":\"Sudan\",\"es\":\"Sudán\",\"fr\":\"Soudan\",\"ja\":\"スーダン\",\"it\":\"Sudan\",\"hu\":\"Szudán\"},\"flag\":\"https://flagcdn.com/sd.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"SUD\",\"independent\":true},{\"name\":\"South Sudan\",\"topLevelDomain\":[\".ss\"],\"alpha2Code\":\"SS\",\"alpha3Code\":\"SSD\",\"callingCodes\":[\"211\"],\"capital\":\"Juba\",\"altSpellings\":[\"SS\"],\"subregion\":\"Middle Africa\",\"region\":\"Africa\",\"population\":11193729,\"latlng\":[7.0,30.0],\"demonym\":\"South Sudanese\",\"area\":619745.0,\"gini\":44.1,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"CAF\",\"COD\",\"ETH\",\"KEN\",\"SDN\",\"UGA\"],\"nativeName\":\"South Sudan\",\"numericCode\":\"728\",\"flags\":{\"svg\":\"https://flagcdn.com/ss.svg\",\"png\":\"https://flagcdn.com/w320/ss.png\"},\"currencies\":[{\"code\":\"SSP\",\"name\":\"South Sudanese pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Soudan ar Su\",\"pt\":\"Sudão do Sul\",\"nl\":\"Zuid-Soedan\",\"hr\":\"Južni Sudan\",\"fa\":\"سودان جنوبی\",\"de\":\"Südsudan\",\"es\":\"Sudán del Sur\",\"fr\":\"Soudan du Sud\",\"ja\":\"南スーダン\",\"it\":\"Sudan del sud\",\"hu\":\"Dél-Szudán\"},\"flag\":\"https://flagcdn.com/ss.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"SSD\",\"independent\":true},{\"name\":\"Suriname\",\"topLevelDomain\":[\".sr\"],\"alpha2Code\":\"SR\",\"alpha3Code\":\"SUR\",\"callingCodes\":[\"597\"],\"capital\":\"Paramaribo\",\"altSpellings\":[\"SR\",\"Sarnam\",\"Sranangron\",\"Republic of Suriname\",\"Republiek Suriname\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":586634,\"latlng\":[4.0,-56.0],\"demonym\":\"Surinamer\",\"area\":163820.0,\"gini\":57.9,\"timezones\":[\"UTC-03:00\"],\"borders\":[\"BRA\",\"FRA\",\"GUF\",\"GUY\"],\"nativeName\":\"Suriname\",\"numericCode\":\"740\",\"flags\":{\"svg\":\"https://flagcdn.com/sr.svg\",\"png\":\"https://flagcdn.com/w320/sr.png\"},\"currencies\":[{\"code\":\"SRD\",\"name\":\"Surinamese dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"nl\",\"iso639_2\":\"nld\",\"name\":\"Dutch\",\"nativeName\":\"Nederlands\"}],\"translations\":{\"br\":\"Surinam\",\"pt\":\"Suriname\",\"nl\":\"Suriname\",\"hr\":\"Surinam\",\"fa\":\"سورینام\",\"de\":\"Suriname\",\"es\":\"Surinam\",\"fr\":\"Surinam\",\"ja\":\"スリナム\",\"it\":\"Suriname\",\"hu\":\"Suriname\"},\"flag\":\"https://flagcdn.com/sr.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]},{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"SUR\",\"independent\":true},{\"name\":\"Svalbard and Jan Mayen\",\"topLevelDomain\":[\".sj\"],\"alpha2Code\":\"SJ\",\"alpha3Code\":\"SJM\",\"callingCodes\":[\"47\"],\"capital\":\"Longyearbyen\",\"altSpellings\":[\"SJ\",\"Svalbard and Jan Mayen Islands\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":2562,\"latlng\":[78.0,20.0],\"demonym\":\"Norwegian\",\"timezones\":[\"UTC+01:00\"],\"nativeName\":\"Svalbard og Jan Mayen\",\"numericCode\":\"744\",\"flags\":{\"svg\":\"https://flagcdn.com/sj.svg\",\"png\":\"https://flagcdn.com/w320/sj.png\"},\"currencies\":[{\"code\":\"NOK\",\"name\":\"Norwegian krone\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"no\",\"iso639_2\":\"nor\",\"name\":\"Norwegian\",\"nativeName\":\"Norsk\"}],\"translations\":{\"br\":\"Svalbard ha Jan Mayen\",\"pt\":\"Svalbard\",\"nl\":\"Svalbard en Jan Mayen\",\"hr\":\"Svalbard i Jan Mayen\",\"fa\":\"سوالبارد و یان ماین\",\"de\":\"Svalbard und Jan Mayen\",\"es\":\"Islas Svalbard y Jan Mayen\",\"fr\":\"Svalbard et Jan Mayen\",\"ja\":\"スヴァールバル諸島およびヤンマイエン島\",\"it\":\"Svalbard e Jan Mayen\",\"hu\":\"Spitzbergák és Jan Mayen-szigetek\"},\"flag\":\"https://flagcdn.com/sj.svg\",\"independent\":false},{\"name\":\"Swaziland\",\"topLevelDomain\":[\".sz\"],\"alpha2Code\":\"SZ\",\"alpha3Code\":\"SWZ\",\"callingCodes\":[\"268\"],\"capital\":\"Mbabane\",\"altSpellings\":[\"SZ\",\"weSwatini\",\"Swatini\",\"Ngwane\",\"Kingdom of Swaziland\",\"Umbuso waseSwatini\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":1160164,\"latlng\":[-26.5,31.5],\"demonym\":\"Swazi\",\"area\":17364.0,\"gini\":54.6,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"MOZ\",\"ZAF\"],\"nativeName\":\"Swaziland\",\"numericCode\":\"748\",\"flags\":{\"svg\":\"https://flagcdn.com/sz.svg\",\"png\":\"https://flagcdn.com/w320/sz.png\"},\"currencies\":[{\"code\":\"SZL\",\"name\":\"Swazi lilangeni\",\"symbol\":\"L\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"ss\",\"iso639_2\":\"ssw\",\"name\":\"Swati\",\"nativeName\":\"SiSwati\"}],\"translations\":{\"br\":\"Eswatini\",\"pt\":\"Suazilândia\",\"nl\":\"Swaziland\",\"hr\":\"Svazi\",\"fa\":\"سوازیلند\",\"de\":\"Swasiland\",\"es\":\"Suazilandia\",\"fr\":\"Swaziland\",\"ja\":\"スワジランド\",\"it\":\"Swaziland\",\"hu\":\"Szváziföld\"},\"flag\":\"https://flagcdn.com/sz.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"SWZ\",\"independent\":true},{\"name\":\"Sweden\",\"topLevelDomain\":[\".se\"],\"alpha2Code\":\"SE\",\"alpha3Code\":\"SWE\",\"callingCodes\":[\"46\"],\"capital\":\"Stockholm\",\"altSpellings\":[\"SE\",\"Kingdom of Sweden\",\"Konungariket Sverige\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":10353442,\"latlng\":[62.0,15.0],\"demonym\":\"Swedish\",\"area\":450295.0,\"gini\":30.0,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"FIN\",\"NOR\"],\"nativeName\":\"Sverige\",\"numericCode\":\"752\",\"flags\":{\"svg\":\"https://flagcdn.com/se.svg\",\"png\":\"https://flagcdn.com/w320/se.png\"},\"currencies\":[{\"code\":\"SEK\",\"name\":\"Swedish krona\",\"symbol\":\"kr\"}],\"languages\":[{\"iso639_1\":\"sv\",\"iso639_2\":\"swe\",\"name\":\"Swedish\",\"nativeName\":\"svenska\"}],\"translations\":{\"br\":\"Sveden\",\"pt\":\"Suécia\",\"nl\":\"Zweden\",\"hr\":\"Švedska\",\"fa\":\"سوئد\",\"de\":\"Schweden\",\"es\":\"Suecia\",\"fr\":\"Suède\",\"ja\":\"スウェーデン\",\"it\":\"Svezia\",\"hu\":\"Svédország\"},\"flag\":\"https://flagcdn.com/se.svg\",\"regionalBlocs\":[{\"acronym\":\"EU\",\"name\":\"European Union\"}],\"cioc\":\"SWE\",\"independent\":true},{\"name\":\"Switzerland\",\"topLevelDomain\":[\".ch\"],\"alpha2Code\":\"CH\",\"alpha3Code\":\"CHE\",\"callingCodes\":[\"41\"],\"capital\":\"Bern\",\"altSpellings\":[\"CH\",\"Swiss Confederation\",\"Schweiz\",\"Suisse\",\"Svizzera\",\"Svizra\"],\"subregion\":\"Central Europe\",\"region\":\"Europe\",\"population\":8636896,\"latlng\":[47.0,8.0],\"demonym\":\"Swiss\",\"area\":41284.0,\"gini\":33.1,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"AUT\",\"FRA\",\"ITA\",\"LIE\",\"DEU\"],\"nativeName\":\"Schweiz\",\"numericCode\":\"756\",\"flags\":{\"svg\":\"https://flagcdn.com/ch.svg\",\"png\":\"https://flagcdn.com/w320/ch.png\"},\"currencies\":[{\"code\":\"CHF\",\"name\":\"Swiss franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"de\",\"iso639_2\":\"deu\",\"name\":\"German\",\"nativeName\":\"Deutsch\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"},{\"iso639_1\":\"it\",\"iso639_2\":\"ita\",\"name\":\"Italian\",\"nativeName\":\"Italiano\"},{\"iso639_2\":\"roh\",\"name\":\"Romansh\"}],\"translations\":{\"br\":\"Suis\",\"pt\":\"Suíça\",\"nl\":\"Zwitserland\",\"hr\":\"Švicarska\",\"fa\":\"سوئیس\",\"de\":\"Schweiz\",\"es\":\"Suiza\",\"fr\":\"Suisse\",\"ja\":\"スイス\",\"it\":\"Svizzera\",\"hu\":\"Svájc\"},\"flag\":\"https://flagcdn.com/ch.svg\",\"regionalBlocs\":[{\"acronym\":\"EFTA\",\"name\":\"European Free Trade Association\"}],\"cioc\":\"SUI\",\"independent\":true},{\"name\":\"Syrian Arab Republic\",\"topLevelDomain\":[\".sy\"],\"alpha2Code\":\"SY\",\"alpha3Code\":\"SYR\",\"callingCodes\":[\"963\"],\"capital\":\"Damascus\",\"altSpellings\":[\"SY\",\"Syrian Arab Republic\",\"Al-Jumhūrīyah Al-ʻArabīyah As-Sūrīyah\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":17500657,\"latlng\":[35.0,38.0],\"demonym\":\"Syrian\",\"area\":185180.0,\"gini\":37.5,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"IRQ\",\"ISR\",\"JOR\",\"LBN\",\"TUR\"],\"nativeName\":\"سوريا\",\"numericCode\":\"760\",\"flags\":{\"svg\":\"https://flagcdn.com/sy.svg\",\"png\":\"https://flagcdn.com/w320/sy.png\"},\"currencies\":[{\"code\":\"SYP\",\"name\":\"Syrian pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Siria\",\"pt\":\"Síria\",\"nl\":\"Syrië\",\"hr\":\"Sirija\",\"fa\":\"سوریه\",\"de\":\"Syrien\",\"es\":\"Siria\",\"fr\":\"Syrie\",\"ja\":\"シリア・アラブ共和国\",\"it\":\"Siria\",\"hu\":\"Szíria\"},\"flag\":\"https://flagcdn.com/sy.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"SYR\",\"independent\":true},{\"name\":\"Taiwan\",\"topLevelDomain\":[\".tw\"],\"alpha2Code\":\"TW\",\"alpha3Code\":\"TWN\",\"callingCodes\":[\"886\"],\"capital\":\"Taipei\",\"altSpellings\":[\"TW\",\"Táiwān\",\"Republic of China\",\"中華民國\",\"Zhōnghuá Mínguó\"],\"subregion\":\"Eastern Asia\",\"region\":\"Asia\",\"population\":23503349,\"latlng\":[23.5,121.0],\"demonym\":\"Taiwanese\",\"area\":36193.0,\"timezones\":[\"UTC+08:00\"],\"nativeName\":\"臺灣\",\"numericCode\":\"158\",\"flags\":{\"svg\":\"https://flagcdn.com/tw.svg\",\"png\":\"https://flagcdn.com/w320/tw.png\"},\"currencies\":[{\"code\":\"TWD\",\"name\":\"New Taiwan dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"zh\",\"iso639_2\":\"zho\",\"name\":\"Chinese\",\"nativeName\":\"中文 (Zhōngwén)\"}],\"translations\":{\"br\":\"Taiwan\",\"pt\":\"Taiwan\",\"nl\":\"Taiwan\",\"hr\":\"Tajvan\",\"fa\":\"تایوان\",\"de\":\"Taiwan\",\"es\":\"Taiwán\",\"fr\":\"Taïwan\",\"ja\":\"台湾（中華民国）\",\"it\":\"Taiwan\",\"hu\":\"Tajvan\"},\"flag\":\"https://flagcdn.com/tw.svg\",\"cioc\":\"TPE\",\"independent\":true},{\"name\":\"Tajikistan\",\"topLevelDomain\":[\".tj\"],\"alpha2Code\":\"TJ\",\"alpha3Code\":\"TJK\",\"callingCodes\":[\"992\"],\"capital\":\"Dushanbe\",\"altSpellings\":[\"TJ\",\"Toçikiston\",\"Republic of Tajikistan\",\"Ҷумҳурии Тоҷикистон\",\"Çumhuriyi Toçikiston\"],\"subregion\":\"Central Asia\",\"region\":\"Asia\",\"population\":9537642,\"latlng\":[39.0,71.0],\"demonym\":\"Tadzhik\",\"area\":143100.0,\"gini\":34.0,\"timezones\":[\"UTC+05:00\"],\"borders\":[\"AFG\",\"CHN\",\"KGZ\",\"UZB\"],\"nativeName\":\"Тоҷикистон\",\"numericCode\":\"762\",\"flags\":{\"svg\":\"https://flagcdn.com/tj.svg\",\"png\":\"https://flagcdn.com/w320/tj.png\"},\"currencies\":[{\"code\":\"TJS\",\"name\":\"Tajikistani somoni\",\"symbol\":\"ЅМ\"}],\"languages\":[{\"iso639_1\":\"tg\",\"iso639_2\":\"tgk\",\"name\":\"Tajik\",\"nativeName\":\"тоҷикӣ\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Tadjikistan\",\"pt\":\"Tajiquistão\",\"nl\":\"Tadzjikistan\",\"hr\":\"Tađikistan\",\"fa\":\"تاجیکستان\",\"de\":\"Tadschikistan\",\"es\":\"Tayikistán\",\"fr\":\"Tadjikistan\",\"ja\":\"タジキスタン\",\"it\":\"Tagikistan\",\"hu\":\"Tádzsikisztán\"},\"flag\":\"https://flagcdn.com/tj.svg\",\"cioc\":\"TJK\",\"independent\":true},{\"name\":\"Tanzania, United Republic of\",\"topLevelDomain\":[\".tz\"],\"alpha2Code\":\"TZ\",\"alpha3Code\":\"TZA\",\"callingCodes\":[\"255\"],\"capital\":\"Dodoma\",\"altSpellings\":[\"TZ\",\"United Republic of Tanzania\",\"Jamhuri ya Muungano wa Tanzania\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":59734213,\"latlng\":[-6.0,35.0],\"demonym\":\"Tanzanian\",\"area\":945087.0,\"gini\":40.5,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"BDI\",\"COD\",\"KEN\",\"MWI\",\"MOZ\",\"RWA\",\"UGA\",\"ZMB\"],\"nativeName\":\"Tanzania\",\"numericCode\":\"834\",\"flags\":{\"svg\":\"https://flagcdn.com/tz.svg\",\"png\":\"https://flagcdn.com/w320/tz.png\"},\"currencies\":[{\"code\":\"TZS\",\"name\":\"Tanzanian shilling\",\"symbol\":\"Sh\"}],\"languages\":[{\"iso639_1\":\"sw\",\"iso639_2\":\"swa\",\"name\":\"Swahili\",\"nativeName\":\"Kiswahili\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Tanzania\",\"pt\":\"Tanzânia\",\"nl\":\"Tanzania\",\"hr\":\"Tanzanija\",\"fa\":\"تانزانیا\",\"de\":\"Tansania\",\"es\":\"Tanzania\",\"fr\":\"Tanzanie\",\"ja\":\"タンザニア\",\"it\":\"Tanzania\",\"hu\":\"Tanzánia\"},\"flag\":\"https://flagcdn.com/tz.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"TAN\",\"independent\":true},{\"name\":\"Thailand\",\"topLevelDomain\":[\".th\"],\"alpha2Code\":\"TH\",\"alpha3Code\":\"THA\",\"callingCodes\":[\"66\"],\"capital\":\"Bangkok\",\"altSpellings\":[\"TH\",\"Prathet\",\"Thai\",\"Kingdom of Thailand\",\"ราชอาณาจักรไทย\",\"Ratcha Anachak Thai\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":69799978,\"latlng\":[15.0,100.0],\"demonym\":\"Thai\",\"area\":513120.0,\"gini\":34.9,\"timezones\":[\"UTC+07:00\"],\"borders\":[\"MMR\",\"KHM\",\"LAO\",\"MYS\"],\"nativeName\":\"ประเทศไทย\",\"numericCode\":\"764\",\"flags\":{\"svg\":\"https://flagcdn.com/th.svg\",\"png\":\"https://flagcdn.com/w320/th.png\"},\"currencies\":[{\"code\":\"THB\",\"name\":\"Thai baht\",\"symbol\":\"฿\"}],\"languages\":[{\"iso639_1\":\"th\",\"iso639_2\":\"tha\",\"name\":\"Thai\",\"nativeName\":\"ไทย\"}],\"translations\":{\"br\":\"Thailand\",\"pt\":\"Tailândia\",\"nl\":\"Thailand\",\"hr\":\"Tajland\",\"fa\":\"تایلند\",\"de\":\"Thailand\",\"es\":\"Tailandia\",\"fr\":\"Thaïlande\",\"ja\":\"タイ\",\"it\":\"Tailandia\",\"hu\":\"Thaiföld\"},\"flag\":\"https://flagcdn.com/th.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"THA\",\"independent\":true},{\"name\":\"Timor-Leste\",\"topLevelDomain\":[\".tl\"],\"alpha2Code\":\"TL\",\"alpha3Code\":\"TLS\",\"callingCodes\":[\"670\"],\"capital\":\"Dili\",\"altSpellings\":[\"TL\",\"East Timor\",\"Democratic Republic of Timor-Leste\",\"República Democrática de Timor-Leste\",\"Repúblika Demokrátika Timór-Leste\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":1318442,\"latlng\":[-8.83333333,125.91666666],\"demonym\":\"East Timorese\",\"area\":14874.0,\"gini\":28.7,\"timezones\":[\"UTC+09:00\"],\"borders\":[\"IDN\"],\"nativeName\":\"Timor-Leste\",\"numericCode\":\"626\",\"flags\":{\"svg\":\"https://flagcdn.com/tl.svg\",\"png\":\"https://flagcdn.com/w320/tl.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States Dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"pt\",\"iso639_2\":\"por\",\"name\":\"Portuguese\",\"nativeName\":\"Português\"}],\"translations\":{\"br\":\"Timor ar Reter\",\"pt\":\"Timor Leste\",\"nl\":\"Oost-Timor\",\"hr\":\"Istočni Timor\",\"fa\":\"تیمور شرقی\",\"de\":\"Timor-Leste\",\"es\":\"Timor Oriental\",\"fr\":\"Timor oriental\",\"ja\":\"東ティモール\",\"it\":\"Timor Est\",\"hu\":\"Kelet-Timor\"},\"flag\":\"https://flagcdn.com/tl.svg\",\"cioc\":\"TLS\",\"independent\":true},{\"name\":\"Togo\",\"topLevelDomain\":[\".tg\"],\"alpha2Code\":\"TG\",\"alpha3Code\":\"TGO\",\"callingCodes\":[\"228\"],\"capital\":\"Lomé\",\"altSpellings\":[\"TG\",\"Togolese\",\"Togolese Republic\",\"République Togolaise\"],\"subregion\":\"Western Africa\",\"region\":\"Africa\",\"population\":8278737,\"latlng\":[8.0,1.16666666],\"demonym\":\"Togolese\",\"area\":56785.0,\"gini\":43.1,\"timezones\":[\"UTC\"],\"borders\":[\"BEN\",\"BFA\",\"GHA\"],\"nativeName\":\"Togo\",\"numericCode\":\"768\",\"flags\":{\"svg\":\"https://flagcdn.com/tg.svg\",\"png\":\"https://flagcdn.com/w320/tg.png\"},\"currencies\":[{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Togo\",\"pt\":\"Togo\",\"nl\":\"Togo\",\"hr\":\"Togo\",\"fa\":\"توگو\",\"de\":\"Togo\",\"es\":\"Togo\",\"fr\":\"Togo\",\"ja\":\"トーゴ\",\"it\":\"Togo\",\"hu\":\"Togo\"},\"flag\":\"https://flagcdn.com/tg.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"TOG\",\"independent\":true},{\"name\":\"Tokelau\",\"topLevelDomain\":[\".tk\"],\"alpha2Code\":\"TK\",\"alpha3Code\":\"TKL\",\"callingCodes\":[\"690\"],\"capital\":\"Fakaofo\",\"altSpellings\":[\"TK\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":1411,\"latlng\":[-9.0,-172.0],\"demonym\":\"Tokelauan\",\"area\":12.0,\"timezones\":[\"UTC+13:00\"],\"nativeName\":\"Tokelau\",\"numericCode\":\"772\",\"flags\":{\"svg\":\"https://flagcdn.com/tk.svg\",\"png\":\"https://flagcdn.com/w320/tk.png\"},\"currencies\":[{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Tokelau\",\"pt\":\"Toquelau\",\"nl\":\"Tokelau\",\"hr\":\"Tokelau\",\"fa\":\"توکلائو\",\"de\":\"Tokelau\",\"es\":\"Islas Tokelau\",\"fr\":\"Tokelau\",\"ja\":\"トケラウ\",\"it\":\"Isole Tokelau\",\"hu\":\"Tokelau-szigetek\"},\"flag\":\"https://flagcdn.com/tk.svg\",\"independent\":false},{\"name\":\"Tonga\",\"topLevelDomain\":[\".to\"],\"alpha2Code\":\"TO\",\"alpha3Code\":\"TON\",\"callingCodes\":[\"676\"],\"capital\":\"Nuku'alofa\",\"altSpellings\":[\"TO\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":105697,\"latlng\":[-20.0,-175.0],\"demonym\":\"Tongan\",\"area\":747.0,\"gini\":37.6,\"timezones\":[\"UTC+13:00\"],\"nativeName\":\"Tonga\",\"numericCode\":\"776\",\"flags\":{\"svg\":\"https://flagcdn.com/to.svg\",\"png\":\"https://flagcdn.com/w320/to.png\"},\"currencies\":[{\"code\":\"TOP\",\"name\":\"Tongan paʻanga\",\"symbol\":\"T$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"to\",\"iso639_2\":\"ton\",\"name\":\"Tonga (Tonga Islands)\",\"nativeName\":\"faka Tonga\"}],\"translations\":{\"br\":\"Tonga\",\"pt\":\"Tonga\",\"nl\":\"Tonga\",\"hr\":\"Tonga\",\"fa\":\"تونگا\",\"de\":\"Tonga\",\"es\":\"Tonga\",\"fr\":\"Tonga\",\"ja\":\"トンガ\",\"it\":\"Tonga\",\"hu\":\"Tonga\"},\"flag\":\"https://flagcdn.com/to.svg\",\"cioc\":\"TGA\",\"independent\":true},{\"name\":\"Trinidad and Tobago\",\"topLevelDomain\":[\".tt\"],\"alpha2Code\":\"TT\",\"alpha3Code\":\"TTO\",\"callingCodes\":[\"1\"],\"capital\":\"Port of Spain\",\"altSpellings\":[\"TT\",\"Republic of Trinidad and Tobago\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":1399491,\"latlng\":[11.0,-61.0],\"demonym\":\"Trinidadian\",\"area\":5130.0,\"gini\":40.3,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Trinidad and Tobago\",\"numericCode\":\"780\",\"flags\":{\"svg\":\"https://flagcdn.com/tt.svg\",\"png\":\"https://flagcdn.com/w320/tt.png\"},\"currencies\":[{\"code\":\"TTD\",\"name\":\"Trinidad and Tobago dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Trinidad ha Tobago\",\"pt\":\"Trindade e Tobago\",\"nl\":\"Trinidad en Tobago\",\"hr\":\"Trinidad i Tobago\",\"fa\":\"ترینیداد و توباگو\",\"de\":\"Trinidad und Tobago\",\"es\":\"Trinidad y Tobago\",\"fr\":\"Trinité et Tobago\",\"ja\":\"トリニダード・トバゴ\",\"it\":\"Trinidad e Tobago\",\"hu\":\"Trinidad és Tobago\"},\"flag\":\"https://flagcdn.com/tt.svg\",\"regionalBlocs\":[{\"acronym\":\"CARICOM\",\"name\":\"Caribbean Community\",\"otherNames\":[\"Comunidad del Caribe\",\"Communauté Caribéenne\",\"Caribische Gemeenschap\"]}],\"cioc\":\"TTO\",\"independent\":true},{\"name\":\"Tunisia\",\"topLevelDomain\":[\".tn\"],\"alpha2Code\":\"TN\",\"alpha3Code\":\"TUN\",\"callingCodes\":[\"216\"],\"capital\":\"Tunis\",\"altSpellings\":[\"TN\",\"Republic of Tunisia\",\"al-Jumhūriyyah at-Tūnisiyyah\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":11818618,\"latlng\":[34.0,9.0],\"demonym\":\"Tunisian\",\"area\":163610.0,\"gini\":32.8,\"timezones\":[\"UTC+01:00\"],\"borders\":[\"DZA\",\"LBY\"],\"nativeName\":\"تونس\",\"numericCode\":\"788\",\"flags\":{\"svg\":\"https://flagcdn.com/tn.svg\",\"png\":\"https://flagcdn.com/w320/tn.png\"},\"currencies\":[{\"code\":\"TND\",\"name\":\"Tunisian dinar\",\"symbol\":\"د.ت\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Tunizia\",\"pt\":\"Tunísia\",\"nl\":\"Tunesië\",\"hr\":\"Tunis\",\"fa\":\"تونس\",\"de\":\"Tunesien\",\"es\":\"Túnez\",\"fr\":\"Tunisie\",\"ja\":\"チュニジア\",\"it\":\"Tunisia\",\"hu\":\"Tunézia\"},\"flag\":\"https://flagcdn.com/tn.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]},{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"TUN\",\"independent\":true},{\"name\":\"Turkey\",\"topLevelDomain\":[\".tr\"],\"alpha2Code\":\"TR\",\"alpha3Code\":\"TUR\",\"callingCodes\":[\"90\"],\"capital\":\"Ankara\",\"altSpellings\":[\"TR\",\"Turkiye\",\"Republic of Turkey\",\"Türkiye Cumhuriyeti\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":84339067,\"latlng\":[39.0,35.0],\"demonym\":\"Turkish\",\"area\":783562.0,\"gini\":41.9,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"ARM\",\"AZE\",\"BGR\",\"GEO\",\"GRC\",\"IRN\",\"IRQ\",\"SYR\"],\"nativeName\":\"Türkiye\",\"numericCode\":\"792\",\"flags\":{\"svg\":\"https://flagcdn.com/tr.svg\",\"png\":\"https://flagcdn.com/w320/tr.png\"},\"currencies\":[{\"code\":\"TRY\",\"name\":\"Turkish lira\",\"symbol\":\"₺\"}],\"languages\":[{\"iso639_1\":\"tr\",\"iso639_2\":\"tur\",\"name\":\"Turkish\",\"nativeName\":\"Türkçe\"}],\"translations\":{\"br\":\"Turkia\",\"pt\":\"Turquia\",\"nl\":\"Turkije\",\"hr\":\"Turska\",\"fa\":\"ترکیه\",\"de\":\"Türkei\",\"es\":\"Turquía\",\"fr\":\"Turquie\",\"ja\":\"トルコ\",\"it\":\"Turchia\",\"hu\":\"Törökország\"},\"flag\":\"https://flagcdn.com/tr.svg\",\"cioc\":\"TUR\",\"independent\":true},{\"name\":\"Turkmenistan\",\"topLevelDomain\":[\".tm\"],\"alpha2Code\":\"TM\",\"alpha3Code\":\"TKM\",\"callingCodes\":[\"993\"],\"capital\":\"Ashgabat\",\"altSpellings\":[\"TM\"],\"subregion\":\"Central Asia\",\"region\":\"Asia\",\"population\":6031187,\"latlng\":[40.0,60.0],\"demonym\":\"Turkmen\",\"area\":488100.0,\"gini\":40.8,\"timezones\":[\"UTC+05:00\"],\"borders\":[\"AFG\",\"IRN\",\"KAZ\",\"UZB\"],\"nativeName\":\"Türkmenistan\",\"numericCode\":\"795\",\"flags\":{\"svg\":\"https://flagcdn.com/tm.svg\",\"png\":\"https://flagcdn.com/w320/tm.png\"},\"currencies\":[{\"code\":\"TMT\",\"name\":\"Turkmenistan manat\",\"symbol\":\"m\"}],\"languages\":[{\"iso639_1\":\"tk\",\"iso639_2\":\"tuk\",\"name\":\"Turkmen\",\"nativeName\":\"Türkmen\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Turkmenistan\",\"pt\":\"Turquemenistão\",\"nl\":\"Turkmenistan\",\"hr\":\"Turkmenistan\",\"fa\":\"ترکمنستان\",\"de\":\"Turkmenistan\",\"es\":\"Turkmenistán\",\"fr\":\"Turkménistan\",\"ja\":\"トルクメニスタン\",\"it\":\"Turkmenistan\",\"hu\":\"Türkmenisztán\"},\"flag\":\"https://flagcdn.com/tm.svg\",\"cioc\":\"TKM\",\"independent\":true},{\"name\":\"Turks and Caicos Islands\",\"topLevelDomain\":[\".tc\"],\"alpha2Code\":\"TC\",\"alpha3Code\":\"TCA\",\"callingCodes\":[\"1\"],\"capital\":\"Cockburn Town\",\"altSpellings\":[\"TC\"],\"subregion\":\"Caribbean\",\"region\":\"Americas\",\"population\":38718,\"latlng\":[21.75,-71.58333333],\"demonym\":\"Turks and Caicos Islander\",\"area\":948.0,\"timezones\":[\"UTC-04:00\"],\"nativeName\":\"Turks and Caicos Islands\",\"numericCode\":\"796\",\"flags\":{\"svg\":\"https://flagcdn.com/tc.svg\",\"png\":\"https://flagcdn.com/w320/tc.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Inizi Turks ha Caicos\",\"pt\":\"Ilhas Turcas e Caicos\",\"nl\":\"Turks- en Caicoseilanden\",\"hr\":\"Otoci Turks i Caicos\",\"fa\":\"جزایر تورکس و کایکوس\",\"de\":\"Turks- und Caicosinseln\",\"es\":\"Islas Turks y Caicos\",\"fr\":\"Îles Turques-et-Caïques\",\"ja\":\"タークス・カイコス諸島\",\"it\":\"Isole Turks e Caicos\",\"hu\":\"Turks- és Caicos-szigetek\"},\"flag\":\"https://flagcdn.com/tc.svg\",\"independent\":false},{\"name\":\"Tuvalu\",\"topLevelDomain\":[\".tv\"],\"alpha2Code\":\"TV\",\"alpha3Code\":\"TUV\",\"callingCodes\":[\"688\"],\"capital\":\"Funafuti\",\"altSpellings\":[\"TV\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":11792,\"latlng\":[-8.0,178.0],\"demonym\":\"Tuvaluan\",\"area\":26.0,\"gini\":39.1,\"timezones\":[\"UTC+12:00\"],\"nativeName\":\"Tuvalu\",\"numericCode\":\"798\",\"flags\":{\"svg\":\"https://flagcdn.com/tv.svg\",\"png\":\"https://flagcdn.com/w320/tv.png\"},\"currencies\":[{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"},{\"code\":\"TVD[G]\",\"name\":\"Tuvaluan dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Tuvalu\",\"pt\":\"Tuvalu\",\"nl\":\"Tuvalu\",\"hr\":\"Tuvalu\",\"fa\":\"تووالو\",\"de\":\"Tuvalu\",\"es\":\"Tuvalu\",\"fr\":\"Tuvalu\",\"ja\":\"ツバル\",\"it\":\"Tuvalu\",\"hu\":\"Tuvalu\"},\"flag\":\"https://flagcdn.com/tv.svg\",\"cioc\":\"TUV\",\"independent\":true},{\"name\":\"Uganda\",\"topLevelDomain\":[\".ug\"],\"alpha2Code\":\"UG\",\"alpha3Code\":\"UGA\",\"callingCodes\":[\"256\"],\"capital\":\"Kampala\",\"altSpellings\":[\"UG\",\"Republic of Uganda\",\"Jamhuri ya Uganda\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":45741000,\"latlng\":[1.0,32.0],\"demonym\":\"Ugandan\",\"area\":241550.0,\"gini\":42.8,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"COD\",\"KEN\",\"RWA\",\"SSD\",\"TZA\"],\"nativeName\":\"Uganda\",\"numericCode\":\"800\",\"flags\":{\"svg\":\"https://flagcdn.com/ug.svg\",\"png\":\"https://flagcdn.com/w320/ug.png\"},\"currencies\":[{\"code\":\"UGX\",\"name\":\"Ugandan shilling\",\"symbol\":\"Sh\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"sw\",\"iso639_2\":\"swa\",\"name\":\"Swahili\",\"nativeName\":\"Kiswahili\"}],\"translations\":{\"br\":\"Ouganda\",\"pt\":\"Uganda\",\"nl\":\"Oeganda\",\"hr\":\"Uganda\",\"fa\":\"اوگاندا\",\"de\":\"Uganda\",\"es\":\"Uganda\",\"fr\":\"Uganda\",\"ja\":\"ウガンダ\",\"it\":\"Uganda\",\"hu\":\"Uganda\"},\"flag\":\"https://flagcdn.com/ug.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"UGA\",\"independent\":true},{\"name\":\"Ukraine\",\"topLevelDomain\":[\".ua\"],\"alpha2Code\":\"UA\",\"alpha3Code\":\"UKR\",\"callingCodes\":[\"380\"],\"capital\":\"Kyiv\",\"altSpellings\":[\"UA\",\"Ukrayina\"],\"subregion\":\"Eastern Europe\",\"region\":\"Europe\",\"population\":44134693,\"latlng\":[49.0,32.0],\"demonym\":\"Ukrainian\",\"area\":603700.0,\"gini\":26.6,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BLR\",\"HUN\",\"MDA\",\"POL\",\"ROU\",\"RUS\",\"SVK\"],\"nativeName\":\"Україна\",\"numericCode\":\"804\",\"flags\":{\"svg\":\"https://flagcdn.com/ua.svg\",\"png\":\"https://flagcdn.com/w320/ua.png\"},\"currencies\":[{\"code\":\"UAH\",\"name\":\"Ukrainian hryvnia\",\"symbol\":\"₴\"}],\"languages\":[{\"iso639_1\":\"uk\",\"iso639_2\":\"ukr\",\"name\":\"Ukrainian\",\"nativeName\":\"Українська\"}],\"translations\":{\"br\":\"Ukraina\",\"pt\":\"Ucrânia\",\"nl\":\"Oekraïne\",\"hr\":\"Ukrajina\",\"fa\":\"وکراین\",\"de\":\"Ukraine\",\"es\":\"Ucrania\",\"fr\":\"Ukraine\",\"ja\":\"ウクライナ\",\"it\":\"Ucraina\",\"hu\":\"Ukrajna\"},\"flag\":\"https://flagcdn.com/ua.svg\",\"cioc\":\"UKR\",\"independent\":true},{\"name\":\"United Arab Emirates\",\"topLevelDomain\":[\".ae\"],\"alpha2Code\":\"AE\",\"alpha3Code\":\"ARE\",\"callingCodes\":[\"971\"],\"capital\":\"Abu Dhabi\",\"altSpellings\":[\"AE\",\"UAE\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":9890400,\"latlng\":[24.0,54.0],\"demonym\":\"Emirati\",\"area\":83600.0,\"gini\":26.0,\"timezones\":[\"UTC+04:00\"],\"borders\":[\"OMN\",\"SAU\"],\"nativeName\":\"دولة الإمارات العربية المتحدة\",\"numericCode\":\"784\",\"flags\":{\"svg\":\"https://flagcdn.com/ae.svg\",\"png\":\"https://flagcdn.com/w320/ae.png\"},\"currencies\":[{\"code\":\"AED\",\"name\":\"United Arab Emirates dirham\",\"symbol\":\"د.إ\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Emirelezhioù Arab Unanet\",\"pt\":\"Emirados árabes Unidos\",\"nl\":\"Verenigde Arabische Emiraten\",\"hr\":\"Ujedinjeni Arapski Emirati\",\"fa\":\"امارات متحده عربی\",\"de\":\"Vereinigte Arabische Emirate\",\"es\":\"Emiratos Árabes Unidos\",\"fr\":\"Émirats arabes unis\",\"ja\":\"アラブ首長国連邦\",\"it\":\"Emirati Arabi Uniti\",\"hu\":\"Egyesült Arab Emírségek\"},\"flag\":\"https://flagcdn.com/ae.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"UAE\",\"independent\":true},{\"name\":\"United Kingdom of Great Britain and Northern Ireland\",\"topLevelDomain\":[\".uk\"],\"alpha2Code\":\"GB\",\"alpha3Code\":\"GBR\",\"callingCodes\":[\"44\"],\"capital\":\"London\",\"altSpellings\":[\"GB\",\"UK\",\"Great Britain\"],\"subregion\":\"Northern Europe\",\"region\":\"Europe\",\"population\":67215293,\"latlng\":[54.0,-2.0],\"demonym\":\"British\",\"area\":242900.0,\"gini\":35.1,\"timezones\":[\"UTC-08:00\",\"UTC-05:00\",\"UTC-04:00\",\"UTC-03:00\",\"UTC-02:00\",\"UTC\",\"UTC+01:00\",\"UTC+02:00\",\"UTC+06:00\"],\"borders\":[\"IRL\"],\"nativeName\":\"United Kingdom\",\"numericCode\":\"826\",\"flags\":{\"svg\":\"https://flagcdn.com/gb.svg\",\"png\":\"https://flagcdn.com/w320/gb.png\"},\"currencies\":[{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"£\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Rouantelezh-Unanet\",\"pt\":\"Reino Unido\",\"nl\":\"Verenigd Koninkrijk\",\"hr\":\"Ujedinjeno Kraljevstvo\",\"fa\":\"بریتانیای کبیر و ایرلند شمالی\",\"de\":\"Vereinigtes Königreich\",\"es\":\"Reino Unido\",\"fr\":\"Royaume-Uni\",\"ja\":\"イギリス\",\"it\":\"Regno Unito\",\"hu\":\"Nagy-Britannia\"},\"flag\":\"https://flagcdn.com/gb.svg\",\"cioc\":\"GBR\",\"independent\":true},{\"name\":\"United States of America\",\"topLevelDomain\":[\".us\"],\"alpha2Code\":\"US\",\"alpha3Code\":\"USA\",\"callingCodes\":[\"1\"],\"capital\":\"Washington, D.C.\",\"altSpellings\":[\"US\",\"USA\",\"United States of America\"],\"subregion\":\"Northern America\",\"region\":\"Americas\",\"population\":329484123,\"latlng\":[38.0,-97.0],\"demonym\":\"American\",\"area\":9629091.0,\"gini\":41.4,\"timezones\":[\"UTC-12:00\",\"UTC-11:00\",\"UTC-10:00\",\"UTC-09:00\",\"UTC-08:00\",\"UTC-07:00\",\"UTC-06:00\",\"UTC-05:00\",\"UTC-04:00\",\"UTC+10:00\",\"UTC+12:00\"],\"borders\":[\"CAN\",\"MEX\"],\"nativeName\":\"United States\",\"numericCode\":\"840\",\"flags\":{\"svg\":\"https://flagcdn.com/us.svg\",\"png\":\"https://flagcdn.com/w320/us.png\"},\"currencies\":[{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Stadoù-Unanet\",\"pt\":\"Estados Unidos\",\"nl\":\"Verenigde Staten\",\"hr\":\"Sjedinjene Američke Države\",\"fa\":\"ایالات متحده آمریکا\",\"de\":\"Vereinigte Staaten von Amerika\",\"es\":\"Estados Unidos\",\"fr\":\"États-Unis\",\"ja\":\"アメリカ合衆国\",\"it\":\"Stati Uniti D'America\",\"hu\":\"Amerikai Egyesült Államok\"},\"flag\":\"https://flagcdn.com/us.svg\",\"regionalBlocs\":[{\"acronym\":\"NAFTA\",\"name\":\"North American Free Trade Agreement\",\"otherNames\":[\"Tratado de Libre Comercio de América del Norte\",\"Accord de Libre-échange Nord-Américain\"]}],\"cioc\":\"USA\",\"independent\":true},{\"name\":\"Uruguay\",\"topLevelDomain\":[\".uy\"],\"alpha2Code\":\"UY\",\"alpha3Code\":\"URY\",\"callingCodes\":[\"598\"],\"capital\":\"Montevideo\",\"altSpellings\":[\"UY\",\"Oriental Republic of Uruguay\",\"República Oriental del Uruguay\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":3473727,\"latlng\":[-33.0,-56.0],\"demonym\":\"Uruguayan\",\"area\":181034.0,\"gini\":39.7,\"timezones\":[\"UTC-03:00\"],\"borders\":[\"ARG\",\"BRA\"],\"nativeName\":\"Uruguay\",\"numericCode\":\"858\",\"flags\":{\"svg\":\"https://flagcdn.com/uy.svg\",\"png\":\"https://flagcdn.com/w320/uy.png\"},\"currencies\":[{\"code\":\"UYU\",\"name\":\"Uruguayan peso\",\"symbol\":\"$\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Uruguay\",\"pt\":\"Uruguai\",\"nl\":\"Uruguay\",\"hr\":\"Urugvaj\",\"fa\":\"اروگوئه\",\"de\":\"Uruguay\",\"es\":\"Uruguay\",\"fr\":\"Uruguay\",\"ja\":\"ウルグアイ\",\"it\":\"Uruguay\",\"hu\":\"Uruguay\"},\"flag\":\"https://flagcdn.com/uy.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"URU\",\"independent\":true},{\"name\":\"Uzbekistan\",\"topLevelDomain\":[\".uz\"],\"alpha2Code\":\"UZ\",\"alpha3Code\":\"UZB\",\"callingCodes\":[\"998\"],\"capital\":\"Tashkent\",\"altSpellings\":[\"UZ\",\"Republic of Uzbekistan\",\"O‘zbekiston Respublikasi\",\"Ўзбекистон Республикаси\"],\"subregion\":\"Central Asia\",\"region\":\"Asia\",\"population\":34232050,\"latlng\":[41.0,64.0],\"demonym\":\"Uzbekistani\",\"area\":447400.0,\"gini\":35.3,\"timezones\":[\"UTC+05:00\"],\"borders\":[\"AFG\",\"KAZ\",\"KGZ\",\"TJK\",\"TKM\"],\"nativeName\":\"O‘zbekiston\",\"numericCode\":\"860\",\"flags\":{\"svg\":\"https://flagcdn.com/uz.svg\",\"png\":\"https://flagcdn.com/w320/uz.png\"},\"currencies\":[{\"code\":\"UZS\",\"name\":\"Uzbekistani so'm\",\"symbol\":\"so'm\"}],\"languages\":[{\"iso639_1\":\"uz\",\"iso639_2\":\"uzb\",\"name\":\"Uzbek\",\"nativeName\":\"Oʻzbek\"},{\"iso639_1\":\"ru\",\"iso639_2\":\"rus\",\"name\":\"Russian\",\"nativeName\":\"Русский\"}],\"translations\":{\"br\":\"Ouzbekistan\",\"pt\":\"Usbequistão\",\"nl\":\"Oezbekistan\",\"hr\":\"Uzbekistan\",\"fa\":\"ازبکستان\",\"de\":\"Usbekistan\",\"es\":\"Uzbekistán\",\"fr\":\"Ouzbékistan\",\"ja\":\"ウズベキスタン\",\"it\":\"Uzbekistan\",\"hu\":\"Üzbegisztán\"},\"flag\":\"https://flagcdn.com/uz.svg\",\"cioc\":\"UZB\",\"independent\":false},{\"name\":\"Vanuatu\",\"topLevelDomain\":[\".vu\"],\"alpha2Code\":\"VU\",\"alpha3Code\":\"VUT\",\"callingCodes\":[\"678\"],\"capital\":\"Port Vila\",\"altSpellings\":[\"VU\",\"Republic of Vanuatu\",\"Ripablik blong Vanuatu\",\"République de Vanuatu\"],\"subregion\":\"Melanesia\",\"region\":\"Oceania\",\"population\":307150,\"latlng\":[-16.0,167.0],\"demonym\":\"Ni-Vanuatu\",\"area\":12189.0,\"gini\":37.6,\"timezones\":[\"UTC+11:00\"],\"nativeName\":\"Vanuatu\",\"numericCode\":\"548\",\"flags\":{\"svg\":\"https://flagcdn.com/vu.svg\",\"png\":\"https://flagcdn.com/w320/vu.png\"},\"currencies\":[{\"code\":\"VUV\",\"name\":\"Vanuatu vatu\",\"symbol\":\"Vt\"}],\"languages\":[{\"iso639_1\":\"bi\",\"iso639_2\":\"bis\",\"name\":\"Bislama\",\"nativeName\":\"Bislama\"},{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Vanuatu\",\"pt\":\"Vanuatu\",\"nl\":\"Vanuatu\",\"hr\":\"Vanuatu\",\"fa\":\"وانواتو\",\"de\":\"Vanuatu\",\"es\":\"Vanuatu\",\"fr\":\"Vanuatu\",\"ja\":\"バヌアツ\",\"it\":\"Vanuatu\",\"hu\":\"Vanuatu\"},\"flag\":\"https://flagcdn.com/vu.svg\",\"cioc\":\"VAN\",\"independent\":true},{\"name\":\"Venezuela (Bolivarian Republic of)\",\"topLevelDomain\":[\".ve\"],\"alpha2Code\":\"VE\",\"alpha3Code\":\"VEN\",\"callingCodes\":[\"58\"],\"capital\":\"Caracas\",\"altSpellings\":[\"VE\",\"Bolivarian Republic of Venezuela\",\"República Bolivariana de Venezuela\"],\"subregion\":\"South America\",\"region\":\"Americas\",\"population\":28435943,\"latlng\":[8.0,-66.0],\"demonym\":\"Venezuelan\",\"area\":916445.0,\"gini\":44.8,\"timezones\":[\"UTC-04:00\"],\"borders\":[\"BRA\",\"COL\",\"GUY\"],\"nativeName\":\"Venezuela\",\"numericCode\":\"862\",\"flags\":{\"svg\":\"https://flagcdn.com/ve.svg\",\"png\":\"https://flagcdn.com/w320/ve.png\"},\"currencies\":[{\"code\":\"VEF\",\"name\":\"Venezuelan bolívar\",\"symbol\":\"Bs S\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Venezuela\",\"pt\":\"Venezuela\",\"nl\":\"Venezuela\",\"hr\":\"Venezuela\",\"fa\":\"ونزوئلا\",\"de\":\"Venezuela\",\"es\":\"Venezuela\",\"fr\":\"Venezuela\",\"ja\":\"ベネズエラ・ボリバル共和国\",\"it\":\"Venezuela\",\"hu\":\"Venezuela\"},\"flag\":\"https://flagcdn.com/ve.svg\",\"regionalBlocs\":[{\"acronym\":\"USAN\",\"name\":\"Union of South American Nations\",\"otherAcronyms\":[\"UNASUR\",\"UNASUL\",\"UZAN\"],\"otherNames\":[\"Unión de Naciones Suramericanas\",\"União de Nações Sul-Americanas\",\"Unie van Zuid-Amerikaanse Naties\",\"South American Union\"]}],\"cioc\":\"VEN\",\"independent\":true},{\"name\":\"Vietnam\",\"topLevelDomain\":[\".vn\"],\"alpha2Code\":\"VN\",\"alpha3Code\":\"VNM\",\"callingCodes\":[\"84\"],\"capital\":\"Hanoi\",\"altSpellings\":[\"VN\",\"Socialist Republic of Vietnam\",\"Cộng hòa Xã hội chủ nghĩa Việt Nam\"],\"subregion\":\"South-Eastern Asia\",\"region\":\"Asia\",\"population\":97338583,\"latlng\":[16.16666666,107.83333333],\"demonym\":\"Vietnamese\",\"area\":331212.0,\"gini\":35.7,\"timezones\":[\"UTC+07:00\"],\"borders\":[\"KHM\",\"CHN\",\"LAO\"],\"nativeName\":\"Việt Nam\",\"numericCode\":\"704\",\"flags\":{\"svg\":\"https://flagcdn.com/vn.svg\",\"png\":\"https://flagcdn.com/w320/vn.png\"},\"currencies\":[{\"code\":\"VND\",\"name\":\"Vietnamese đồng\",\"symbol\":\"₫\"}],\"languages\":[{\"iso639_1\":\"vi\",\"iso639_2\":\"vie\",\"name\":\"Vietnamese\",\"nativeName\":\"Tiếng Việt\"}],\"translations\":{\"br\":\"Viêt Nam\",\"pt\":\"Vietname\",\"nl\":\"Vietnam\",\"hr\":\"Vijetnam\",\"fa\":\"ویتنام\",\"de\":\"Vietnam\",\"es\":\"Vietnam\",\"fr\":\"Viêt Nam\",\"ja\":\"ベトナム\",\"it\":\"Vietnam\",\"hu\":\"Vietnám\"},\"flag\":\"https://flagcdn.com/vn.svg\",\"regionalBlocs\":[{\"acronym\":\"ASEAN\",\"name\":\"Association of Southeast Asian Nations\"}],\"cioc\":\"VIE\",\"independent\":true},{\"name\":\"Wallis and Futuna\",\"topLevelDomain\":[\".wf\"],\"alpha2Code\":\"WF\",\"alpha3Code\":\"WLF\",\"callingCodes\":[\"681\"],\"capital\":\"Mata-Utu\",\"altSpellings\":[\"WF\",\"Territory of the Wallis and Futuna Islands\",\"Territoire des îles Wallis et Futuna\"],\"subregion\":\"Polynesia\",\"region\":\"Oceania\",\"population\":11750,\"latlng\":[-13.3,-176.2],\"demonym\":\"Wallis and Futuna Islander\",\"area\":142.0,\"timezones\":[\"UTC+12:00\"],\"nativeName\":\"Wallis et Futuna\",\"numericCode\":\"876\",\"flags\":{\"svg\":\"https://flagcdn.com/wf.svg\",\"png\":\"https://flagcdn.com/w320/wf.png\"},\"currencies\":[{\"code\":\"XPF\",\"name\":\"CFP franc\",\"symbol\":\"Fr\"}],\"languages\":[{\"iso639_1\":\"fr\",\"iso639_2\":\"fra\",\"name\":\"French\",\"nativeName\":\"français\"}],\"translations\":{\"br\":\"Wallis ha Futuna\",\"pt\":\"Wallis e Futuna\",\"nl\":\"Wallis en Futuna\",\"hr\":\"Wallis i Fortuna\",\"fa\":\"والیس و فوتونا\",\"de\":\"Wallis und Futuna\",\"es\":\"Wallis y Futuna\",\"fr\":\"Wallis-et-Futuna\",\"ja\":\"ウォリス・フツナ\",\"it\":\"Wallis e Futuna\",\"hu\":\"Wallis és Futuna\"},\"flag\":\"https://flagcdn.com/wf.svg\",\"independent\":false},{\"name\":\"Western Sahara\",\"topLevelDomain\":[\".eh\"],\"alpha2Code\":\"EH\",\"alpha3Code\":\"ESH\",\"callingCodes\":[\"212\"],\"capital\":\"El Aaiún\",\"altSpellings\":[\"EH\",\"Taneẓroft Tutrimt\"],\"subregion\":\"Northern Africa\",\"region\":\"Africa\",\"population\":510713,\"latlng\":[24.5,-13.0],\"demonym\":\"Sahrawi\",\"area\":266000.0,\"timezones\":[\"UTC+00:00\"],\"borders\":[\"DZA\",\"MRT\",\"MAR\"],\"nativeName\":\"الصحراء الغربية\",\"numericCode\":\"732\",\"flags\":{\"svg\":\"https://flagcdn.com/eh.svg\",\"png\":\"https://flagcdn.com/w320/eh.png\"},\"currencies\":[{\"code\":\"MAD\",\"name\":\"Moroccan dirham\",\"symbol\":\"د.م.\"},{\"code\":\"DZD\",\"name\":\"Algerian dinar\",\"symbol\":\"د.ج\"}],\"languages\":[{\"iso639_1\":\"es\",\"iso639_2\":\"spa\",\"name\":\"Spanish\",\"nativeName\":\"Español\"}],\"translations\":{\"br\":\"Sahara ar C'hornôg\",\"pt\":\"Saara Ocidental\",\"nl\":\"Westelijke Sahara\",\"hr\":\"Zapadna Sahara\",\"fa\":\"جمهوری دموکراتیک عربی صحرا\",\"de\":\"Westsahara\",\"es\":\"Sahara Occidental\",\"fr\":\"Sahara Occidental\",\"ja\":\"西サハラ\",\"it\":\"Sahara Occidentale\",\"hu\":\"Nyugat-Szahara\"},\"flag\":\"https://flagcdn.com/eh.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"independent\":false},{\"name\":\"Yemen\",\"topLevelDomain\":[\".ye\"],\"alpha2Code\":\"YE\",\"alpha3Code\":\"YEM\",\"callingCodes\":[\"967\"],\"capital\":\"Sana'a\",\"altSpellings\":[\"YE\",\"Yemeni Republic\",\"al-Jumhūriyyah al-Yamaniyyah\"],\"subregion\":\"Western Asia\",\"region\":\"Asia\",\"population\":29825968,\"latlng\":[15.0,48.0],\"demonym\":\"Yemeni\",\"area\":527968.0,\"gini\":36.7,\"timezones\":[\"UTC+03:00\"],\"borders\":[\"OMN\",\"SAU\"],\"nativeName\":\"اليَمَن\",\"numericCode\":\"887\",\"flags\":{\"svg\":\"https://flagcdn.com/ye.svg\",\"png\":\"https://flagcdn.com/w320/ye.png\"},\"currencies\":[{\"code\":\"YER\",\"name\":\"Yemeni rial\",\"symbol\":\"﷼\"}],\"languages\":[{\"iso639_1\":\"ar\",\"iso639_2\":\"ara\",\"name\":\"Arabic\",\"nativeName\":\"العربية\"}],\"translations\":{\"br\":\"Yemen\",\"pt\":\"Iémen\",\"nl\":\"Jemen\",\"hr\":\"Jemen\",\"fa\":\"یمن\",\"de\":\"Jemen\",\"es\":\"Yemen\",\"fr\":\"Yémen\",\"ja\":\"イエメン\",\"it\":\"Yemen\",\"hu\":\"Jemen\"},\"flag\":\"https://flagcdn.com/ye.svg\",\"regionalBlocs\":[{\"acronym\":\"AL\",\"name\":\"Arab League\",\"otherNames\":[\"جامعة الدول العربية\",\"Jāmiʻat ad-Duwal al-ʻArabīyah\",\"League of Arab States\"]}],\"cioc\":\"YEM\",\"independent\":true},{\"name\":\"Zambia\",\"topLevelDomain\":[\".zm\"],\"alpha2Code\":\"ZM\",\"alpha3Code\":\"ZMB\",\"callingCodes\":[\"260\"],\"capital\":\"Lusaka\",\"altSpellings\":[\"ZM\",\"Republic of Zambia\"],\"subregion\":\"Eastern Africa\",\"region\":\"Africa\",\"population\":18383956,\"latlng\":[-15.0,30.0],\"demonym\":\"Zambian\",\"area\":752618.0,\"gini\":57.1,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"AGO\",\"BWA\",\"COD\",\"MWI\",\"MOZ\",\"NAM\",\"TZA\",\"ZWE\"],\"nativeName\":\"Zambia\",\"numericCode\":\"894\",\"flags\":{\"svg\":\"https://flagcdn.com/zm.svg\",\"png\":\"https://flagcdn.com/w320/zm.png\"},\"currencies\":[{\"code\":\"ZMW\",\"name\":\"Zambian kwacha\",\"symbol\":\"ZK\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"}],\"translations\":{\"br\":\"Zambia\",\"pt\":\"Zâmbia\",\"nl\":\"Zambia\",\"hr\":\"Zambija\",\"fa\":\"زامبیا\",\"de\":\"Sambia\",\"es\":\"Zambia\",\"fr\":\"Zambie\",\"ja\":\"ザンビア\",\"it\":\"Zambia\",\"hu\":\"Zambia\"},\"flag\":\"https://flagcdn.com/zm.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"ZAM\",\"independent\":true},{\"name\":\"Zimbabwe\",\"topLevelDomain\":[\".zw\"],\"alpha2Code\":\"ZW\",\"alpha3Code\":\"ZWE\",\"callingCodes\":[\"263\"],\"capital\":\"Harare\",\"altSpellings\":[\"ZW\",\"Republic of Zimbabwe\"],\"subregion\":\"Southern Africa\",\"region\":\"Africa\",\"population\":14862927,\"latlng\":[-20.0,30.0],\"demonym\":\"Zimbabwean\",\"area\":390757.0,\"gini\":50.3,\"timezones\":[\"UTC+02:00\"],\"borders\":[\"BWA\",\"MOZ\",\"ZAF\",\"ZMB\"],\"nativeName\":\"Zimbabwe\",\"numericCode\":\"716\",\"flags\":{\"svg\":\"https://flagcdn.com/zw.svg\",\"png\":\"https://flagcdn.com/w320/zw.png\"},\"currencies\":[{\"code\":\"ZMW\",\"name\":\"Zambian kwacha\",\"symbol\":\"K\"}],\"languages\":[{\"iso639_1\":\"en\",\"iso639_2\":\"eng\",\"name\":\"English\",\"nativeName\":\"English\"},{\"iso639_1\":\"sn\",\"iso639_2\":\"sna\",\"name\":\"Shona\",\"nativeName\":\"chiShona\"},{\"iso639_1\":\"nd\",\"iso639_2\":\"nde\",\"name\":\"Northern Ndebele\",\"nativeName\":\"isiNdebele\"}],\"translations\":{\"br\":\"Zimbabwe\",\"pt\":\"Zimbabué\",\"nl\":\"Zimbabwe\",\"hr\":\"Zimbabve\",\"fa\":\"زیمباوه\",\"de\":\"Simbabwe\",\"es\":\"Zimbabue\",\"fr\":\"Zimbabwe\",\"ja\":\"ジンバブエ\",\"it\":\"Zimbabwe\",\"hu\":\"Zimbabwe\"},\"flag\":\"https://flagcdn.com/zw.svg\",\"regionalBlocs\":[{\"acronym\":\"AU\",\"name\":\"African Union\",\"otherNames\":[\"الاتحاد الأفريقي\",\"Union africaine\",\"União Africana\",\"Unión Africana\",\"Umoja wa Afrika\"]}],\"cioc\":\"ZIM\",\"independent\":true}]"
  },
  {
    "path": "tests/testdata/driverStandings.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/2022/driverstandings.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"22\",\"StandingsTable\":{\"season\":\"2022\",\"StandingsLists\":[{\"season\":\"2022\",\"round\":\"17\",\"DriverStandings\":[{\"position\":\"1\",\"positionText\":\"1\",\"points\":\"341\",\"wins\":\"11\",\"Driver\":{\"driverId\":\"max_verstappen\",\"permanentNumber\":\"33\",\"code\":\"VER\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Max_Verstappen\",\"givenName\":\"Max\",\"familyName\":\"Verstappen\",\"dateOfBirth\":\"1997-09-30\",\"nationality\":\"Dutch\"},              \"Constructors\":[{\"constructorId\":\"red_bull\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"}]},{\"position\":\"2\",\"positionText\":\"2\",\"points\":\"237\",\"wins\":\"3\",\"Driver\":{\"driverId\":\"leclerc\",\"permanentNumber\":\"16\",\"code\":\"LEC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Charles_Leclerc\",\"givenName\":\"Charles\",\"familyName\":\"Leclerc\",\"dateOfBirth\":\"1997-10-16\",\"nationality\":\"Monegasque\"},              \"Constructors\":[{\"constructorId\":\"ferrari\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"}]},{\"position\":\"3\",\"positionText\":\"3\",\"points\":\"235\",\"wins\":\"2\",\"Driver\":{\"driverId\":\"perez\",\"permanentNumber\":\"11\",\"code\":\"PER\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Sergio_P%C3%A9rez\",\"givenName\":\"Sergio\",\"familyName\":\"Pérez\",\"dateOfBirth\":\"1990-01-26\",\"nationality\":\"Mexican\"},              \"Constructors\":[{\"constructorId\":\"red_bull\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"}]},{\"position\":\"4\",\"positionText\":\"4\",\"points\":\"203\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"russell\",\"permanentNumber\":\"63\",\"code\":\"RUS\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/George_Russell_%28racing_driver%29\",\"givenName\":\"George\",\"familyName\":\"Russell\",\"dateOfBirth\":\"1998-02-15\",\"nationality\":\"British\"},              \"Constructors\":[{\"constructorId\":\"mercedes\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"}]},{\"position\":\"5\",\"positionText\":\"5\",\"points\":\"202\",\"wins\":\"1\",\"Driver\":{\"driverId\":\"sainz\",\"permanentNumber\":\"55\",\"code\":\"SAI\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Carlos_Sainz_Jr.\",\"givenName\":\"Carlos\",\"familyName\":\"Sainz\",\"dateOfBirth\":\"1994-09-01\",\"nationality\":\"Spanish\"},              \"Constructors\":[{\"constructorId\":\"ferrari\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"}]},{\"position\":\"6\",\"positionText\":\"6\",\"points\":\"170\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"hamilton\",\"permanentNumber\":\"44\",\"code\":\"HAM\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lewis_Hamilton\",\"givenName\":\"Lewis\",\"familyName\":\"Hamilton\",\"dateOfBirth\":\"1985-01-07\",\"nationality\":\"British\"},              \"Constructors\":[{\"constructorId\":\"mercedes\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"}]},{\"position\":\"7\",\"positionText\":\"7\",\"points\":\"100\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"norris\",\"permanentNumber\":\"4\",\"code\":\"NOR\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lando_Norris\",\"givenName\":\"Lando\",\"familyName\":\"Norris\",\"dateOfBirth\":\"1999-11-13\",\"nationality\":\"British\"},              \"Constructors\":[{\"constructorId\":\"mclaren\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"}]},{\"position\":\"8\",\"positionText\":\"8\",\"points\":\"66\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"ocon\",\"permanentNumber\":\"31\",\"code\":\"OCO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Esteban_Ocon\",\"givenName\":\"Esteban\",\"familyName\":\"Ocon\",\"dateOfBirth\":\"1996-09-17\",\"nationality\":\"French\"},              \"Constructors\":[{\"constructorId\":\"alpine\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"}]},{\"position\":\"9\",\"positionText\":\"9\",\"points\":\"59\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"alonso\",\"permanentNumber\":\"14\",\"code\":\"ALO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Fernando_Alonso\",\"givenName\":\"Fernando\",\"familyName\":\"Alonso\",\"dateOfBirth\":\"1981-07-29\",\"nationality\":\"Spanish\"},              \"Constructors\":[{\"constructorId\":\"alpine\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"}]},{\"position\":\"10\",\"positionText\":\"10\",\"points\":\"46\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"bottas\",\"permanentNumber\":\"77\",\"code\":\"BOT\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Valtteri_Bottas\",\"givenName\":\"Valtteri\",\"familyName\":\"Bottas\",\"dateOfBirth\":\"1989-08-28\",\"nationality\":\"Finnish\"},              \"Constructors\":[{\"constructorId\":\"alfa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"}]},{\"position\":\"11\",\"positionText\":\"11\",\"points\":\"29\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"ricciardo\",\"permanentNumber\":\"3\",\"code\":\"RIC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Daniel_Ricciardo\",\"givenName\":\"Daniel\",\"familyName\":\"Ricciardo\",\"dateOfBirth\":\"1989-07-01\",\"nationality\":\"Australian\"},              \"Constructors\":[{\"constructorId\":\"mclaren\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"}]},{\"position\":\"12\",\"positionText\":\"12\",\"points\":\"24\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"vettel\",\"permanentNumber\":\"5\",\"code\":\"VET\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Sebastian_Vettel\",\"givenName\":\"Sebastian\",\"familyName\":\"Vettel\",\"dateOfBirth\":\"1987-07-03\",\"nationality\":\"German\"},              \"Constructors\":[{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"}]},{\"position\":\"13\",\"positionText\":\"13\",\"points\":\"23\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"gasly\",\"permanentNumber\":\"10\",\"code\":\"GAS\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Pierre_Gasly\",\"givenName\":\"Pierre\",\"familyName\":\"Gasly\",\"dateOfBirth\":\"1996-02-07\",\"nationality\":\"French\"},              \"Constructors\":[{\"constructorId\":\"alphatauri\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"}]},{\"position\":\"14\",\"positionText\":\"14\",\"points\":\"22\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"kevin_magnussen\",\"permanentNumber\":\"20\",\"code\":\"MAG\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Kevin_Magnussen\",\"givenName\":\"Kevin\",\"familyName\":\"Magnussen\",\"dateOfBirth\":\"1992-10-05\",\"nationality\":\"Danish\"},              \"Constructors\":[{\"constructorId\":\"haas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"}]},{\"position\":\"15\",\"positionText\":\"15\",\"points\":\"13\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"stroll\",\"permanentNumber\":\"18\",\"code\":\"STR\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lance_Stroll\",\"givenName\":\"Lance\",\"familyName\":\"Stroll\",\"dateOfBirth\":\"1998-10-29\",\"nationality\":\"Canadian\"},              \"Constructors\":[{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"}]},{\"position\":\"16\",\"positionText\":\"16\",\"points\":\"12\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"mick_schumacher\",\"permanentNumber\":\"47\",\"code\":\"MSC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mick_Schumacher\",\"givenName\":\"Mick\",\"familyName\":\"Schumacher\",\"dateOfBirth\":\"1999-03-22\",\"nationality\":\"German\"},              \"Constructors\":[{\"constructorId\":\"haas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"}]},{\"position\":\"17\",\"positionText\":\"17\",\"points\":\"11\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"tsunoda\",\"permanentNumber\":\"22\",\"code\":\"TSU\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Yuki_Tsunoda\",\"givenName\":\"Yuki\",\"familyName\":\"Tsunoda\",\"dateOfBirth\":\"2000-05-11\",\"nationality\":\"Japanese\"},              \"Constructors\":[{\"constructorId\":\"alphatauri\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"}]},{\"position\":\"18\",\"positionText\":\"18\",\"points\":\"6\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"zhou\",\"permanentNumber\":\"24\",\"code\":\"ZHO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Guanyu_Zhou\",\"givenName\":\"Guanyu\",\"familyName\":\"Zhou\",\"dateOfBirth\":\"1999-05-30\",\"nationality\":\"Chinese\"},              \"Constructors\":[{\"constructorId\":\"alfa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"}]},{\"position\":\"19\",\"positionText\":\"19\",\"points\":\"4\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"albon\",\"permanentNumber\":\"23\",\"code\":\"ALB\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alexander_Albon\",\"givenName\":\"Alexander\",\"familyName\":\"Albon\",\"dateOfBirth\":\"1996-03-23\",\"nationality\":\"Thai\"},              \"Constructors\":[{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"}]},{\"position\":\"20\",\"positionText\":\"20\",\"points\":\"2\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"de_vries\",\"permanentNumber\":\"45\",\"code\":\"DEV\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Nyck_de_Vries\",\"givenName\":\"Nyck\",\"familyName\":\"de Vries\",\"dateOfBirth\":\"1995-02-06\",\"nationality\":\"Dutch\"},              \"Constructors\":[{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"}]},{\"position\":\"21\",\"positionText\":\"21\",\"points\":\"0\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"latifi\",\"permanentNumber\":\"6\",\"code\":\"LAT\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Nicholas_Latifi\",\"givenName\":\"Nicholas\",\"familyName\":\"Latifi\",\"dateOfBirth\":\"1995-06-29\",\"nationality\":\"Canadian\"},              \"Constructors\":[{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"}]},{\"position\":\"22\",\"positionText\":\"22\",\"points\":\"0\",\"wins\":\"0\",\"Driver\":{\"driverId\":\"hulkenberg\",\"permanentNumber\":\"27\",\"code\":\"HUL\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Nico_H%C3%BClkenberg\",\"givenName\":\"Nico\",\"familyName\":\"Hülkenberg\",\"dateOfBirth\":\"1987-08-19\",\"nationality\":\"German\"},              \"Constructors\":[{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"}]}]}]}}}"
  },
  {
    "path": "tests/testdata/localStorageMock.ts",
    "content": "export default class LocalStorageMock {\n    store: { [key: string]: string };\n\n    constructor() {\n        this.store = {};\n    }\n\n    clear() {\n        this.store = {};\n    }\n\n    getItem(key: string): string {\n        return this.store[key];\n    }\n\n    setItem(key: string, value: string) {\n        this.store[key] = value;\n    }\n\n    removeItem(key: string) {\n        delete this.store[key];\n    }\n}\n"
  },
  {
    "path": "tests/testdata/qualifying.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/2022/20/qualifying.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"20\",\"RaceTable\":{\"season\":\"2022\",\"round\":\"20\",\"Races\":[{\"season\":\"2022\",\"round\":\"20\",\"url\":\"http://en.wikipedia.org/wiki/2022_Mexican_Grand_Prix\",\"raceName\":\"Mexico City Grand Prix\",\"Circuit\":{\"circuitId\":\"rodriguez\",\"url\":\"http://en.wikipedia.org/wiki/Aut%C3%B3dromo_Hermanos_Rodr%C3%ADguez\",\"circuitName\":\"Autódromo Hermanos Rodríguez\",\"Location\":{\"lat\":\"19.4042\",\"long\":\"-99.0907\",\"locality\":\"Mexico City\",\"country\":\"Mexico\"}},\"date\":\"2022-10-30\",\"time\":\"20:00:00Z\",\"QualifyingResults\":[{\"number\":\"1\",\"position\":\"1\",\"Driver\":{\"driverId\":\"max_verstappen\",\"permanentNumber\":\"33\",\"code\":\"VER\",\"url\":\"http://en.wikipedia.org/wiki/Max_Verstappen\",\"givenName\":\"Max\",\"familyName\":\"Verstappen\",\"dateOfBirth\":\"1997-09-30\",\"nationality\":\"Dutch\"},\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http://en.wikipedia.org/wiki/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"},\"Q1\":\"1:19.222\",\"Q2\":\"1:18.566\",\"Q3\":\"1:17.775\"},{\"number\":\"63\",\"position\":\"2\",\"Driver\":{\"driverId\":\"russell\",\"permanentNumber\":\"63\",\"code\":\"RUS\",\"url\":\"http://en.wikipedia.org/wiki/George_Russell_%28racing_driver%29\",\"givenName\":\"George\",\"familyName\":\"Russell\",\"dateOfBirth\":\"1998-02-15\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http://en.wikipedia.org/wiki/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"},\"Q1\":\"1:19.583\",\"Q2\":\"1:18.565\",\"Q3\":\"1:18.079\"},{\"number\":\"44\",\"position\":\"3\",\"Driver\":{\"driverId\":\"hamilton\",\"permanentNumber\":\"44\",\"code\":\"HAM\",\"url\":\"http://en.wikipedia.org/wiki/Lewis_Hamilton\",\"givenName\":\"Lewis\",\"familyName\":\"Hamilton\",\"dateOfBirth\":\"1985-01-07\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http://en.wikipedia.org/wiki/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"},\"Q1\":\"1:19.169\",\"Q2\":\"1:18.552\",\"Q3\":\"1:18.084\"},{\"number\":\"11\",\"position\":\"4\",\"Driver\":{\"driverId\":\"perez\",\"permanentNumber\":\"11\",\"code\":\"PER\",\"url\":\"http://en.wikipedia.org/wiki/Sergio_P%C3%A9rez\",\"givenName\":\"Sergio\",\"familyName\":\"Pérez\",\"dateOfBirth\":\"1990-01-26\",\"nationality\":\"Mexican\"},\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http://en.wikipedia.org/wiki/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"},\"Q1\":\"1:19.706\",\"Q2\":\"1:18.615\",\"Q3\":\"1:18.128\"},{\"number\":\"55\",\"position\":\"5\",\"Driver\":{\"driverId\":\"sainz\",\"permanentNumber\":\"55\",\"code\":\"SAI\",\"url\":\"http://en.wikipedia.org/wiki/Carlos_Sainz_Jr.\",\"givenName\":\"Carlos\",\"familyName\":\"Sainz\",\"dateOfBirth\":\"1994-09-01\",\"nationality\":\"Spanish\"},\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http://en.wikipedia.org/wiki/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"},\"Q1\":\"1:19.566\",\"Q2\":\"1:18.560\",\"Q3\":\"1:18.351\"},{\"number\":\"77\",\"position\":\"6\",\"Driver\":{\"driverId\":\"bottas\",\"permanentNumber\":\"77\",\"code\":\"BOT\",\"url\":\"http://en.wikipedia.org/wiki/Valtteri_Bottas\",\"givenName\":\"Valtteri\",\"familyName\":\"Bottas\",\"dateOfBirth\":\"1989-08-28\",\"nationality\":\"Finnish\"},\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http://en.wikipedia.org/wiki/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"},\"Q1\":\"1:19.523\",\"Q2\":\"1:18.762\",\"Q3\":\"1:18.401\"},{\"number\":\"16\",\"position\":\"7\",\"Driver\":{\"driverId\":\"leclerc\",\"permanentNumber\":\"16\",\"code\":\"LEC\",\"url\":\"http://en.wikipedia.org/wiki/Charles_Leclerc\",\"givenName\":\"Charles\",\"familyName\":\"Leclerc\",\"dateOfBirth\":\"1997-10-16\",\"nationality\":\"Monegasque\"},\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http://en.wikipedia.org/wiki/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"},\"Q1\":\"1:19.505\",\"Q2\":\"1:19.109\",\"Q3\":\"1:18.555\"},{\"number\":\"4\",\"position\":\"8\",\"Driver\":{\"driverId\":\"norris\",\"permanentNumber\":\"4\",\"code\":\"NOR\",\"url\":\"http://en.wikipedia.org/wiki/Lando_Norris\",\"givenName\":\"Lando\",\"familyName\":\"Norris\",\"dateOfBirth\":\"1999-11-13\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http://en.wikipedia.org/wiki/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"},\"Q1\":\"1:19.857\",\"Q2\":\"1:19.119\",\"Q3\":\"1:18.721\"},{\"number\":\"14\",\"position\":\"9\",\"Driver\":{\"driverId\":\"alonso\",\"permanentNumber\":\"14\",\"code\":\"ALO\",\"url\":\"http://en.wikipedia.org/wiki/Fernando_Alonso\",\"givenName\":\"Fernando\",\"familyName\":\"Alonso\",\"dateOfBirth\":\"1981-07-29\",\"nationality\":\"Spanish\"},\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http://en.wikipedia.org/wiki/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"},\"Q1\":\"1:20.006\",\"Q2\":\"1:19.272\",\"Q3\":\"1:18.939\"},{\"number\":\"31\",\"position\":\"10\",\"Driver\":{\"driverId\":\"ocon\",\"permanentNumber\":\"31\",\"code\":\"OCO\",\"url\":\"http://en.wikipedia.org/wiki/Esteban_Ocon\",\"givenName\":\"Esteban\",\"familyName\":\"Ocon\",\"dateOfBirth\":\"1996-09-17\",\"nationality\":\"French\"},\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http://en.wikipedia.org/wiki/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"},\"Q1\":\"1:19.945\",\"Q2\":\"1:19.081\",\"Q3\":\"1:19.010\"},{\"number\":\"3\",\"position\":\"11\",\"Driver\":{\"driverId\":\"ricciardo\",\"permanentNumber\":\"3\",\"code\":\"RIC\",\"url\":\"http://en.wikipedia.org/wiki/Daniel_Ricciardo\",\"givenName\":\"Daniel\",\"familyName\":\"Ricciardo\",\"dateOfBirth\":\"1989-07-01\",\"nationality\":\"Australian\"},\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http://en.wikipedia.org/wiki/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"},\"Q1\":\"1:20.279\",\"Q2\":\"1:19.325\"},{\"number\":\"24\",\"position\":\"12\",\"Driver\":{\"driverId\":\"zhou\",\"permanentNumber\":\"24\",\"code\":\"ZHO\",\"url\":\"http://en.wikipedia.org/wiki/Guanyu_Zhou\",\"givenName\":\"Guanyu\",\"familyName\":\"Zhou\",\"dateOfBirth\":\"1999-05-30\",\"nationality\":\"Chinese\"},\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http://en.wikipedia.org/wiki/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"},\"Q1\":\"1:20.283\",\"Q2\":\"1:19.476\"},{\"number\":\"22\",\"position\":\"13\",\"Driver\":{\"driverId\":\"tsunoda\",\"permanentNumber\":\"22\",\"code\":\"TSU\",\"url\":\"http://en.wikipedia.org/wiki/Yuki_Tsunoda\",\"givenName\":\"Yuki\",\"familyName\":\"Tsunoda\",\"dateOfBirth\":\"2000-05-11\",\"nationality\":\"Japanese\"},\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http://en.wikipedia.org/wiki/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"},\"Q1\":\"1:19.907\",\"Q2\":\"1:19.589\"},{\"number\":\"10\",\"position\":\"14\",\"Driver\":{\"driverId\":\"gasly\",\"permanentNumber\":\"10\",\"code\":\"GAS\",\"url\":\"http://en.wikipedia.org/wiki/Pierre_Gasly\",\"givenName\":\"Pierre\",\"familyName\":\"Gasly\",\"dateOfBirth\":\"1996-02-07\",\"nationality\":\"French\"},\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http://en.wikipedia.org/wiki/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"},\"Q1\":\"1:20.256\",\"Q2\":\"1:19.672\"},{\"number\":\"20\",\"position\":\"15\",\"Driver\":{\"driverId\":\"kevin_magnussen\",\"permanentNumber\":\"20\",\"code\":\"MAG\",\"url\":\"http://en.wikipedia.org/wiki/Kevin_Magnussen\",\"givenName\":\"Kevin\",\"familyName\":\"Magnussen\",\"dateOfBirth\":\"1992-10-05\",\"nationality\":\"Danish\"},\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http://en.wikipedia.org/wiki/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"},\"Q1\":\"1:20.293\",\"Q2\":\"1:19.833\"},{\"number\":\"47\",\"position\":\"16\",\"Driver\":{\"driverId\":\"mick_schumacher\",\"permanentNumber\":\"47\",\"code\":\"MSC\",\"url\":\"http://en.wikipedia.org/wiki/Mick_Schumacher\",\"givenName\":\"Mick\",\"familyName\":\"Schumacher\",\"dateOfBirth\":\"1999-03-22\",\"nationality\":\"German\"},\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http://en.wikipedia.org/wiki/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"},\"Q1\":\"1:20.419\"},{\"number\":\"5\",\"position\":\"17\",\"Driver\":{\"driverId\":\"vettel\",\"permanentNumber\":\"5\",\"code\":\"VET\",\"url\":\"http://en.wikipedia.org/wiki/Sebastian_Vettel\",\"givenName\":\"Sebastian\",\"familyName\":\"Vettel\",\"dateOfBirth\":\"1987-07-03\",\"nationality\":\"German\"},\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http://en.wikipedia.org/wiki/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"},\"Q1\":\"1:20.419\"},{\"number\":\"18\",\"position\":\"18\",\"Driver\":{\"driverId\":\"stroll\",\"permanentNumber\":\"18\",\"code\":\"STR\",\"url\":\"http://en.wikipedia.org/wiki/Lance_Stroll\",\"givenName\":\"Lance\",\"familyName\":\"Stroll\",\"dateOfBirth\":\"1998-10-29\",\"nationality\":\"Canadian\"},\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http://en.wikipedia.org/wiki/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"},\"Q1\":\"1:20.520\"},{\"number\":\"23\",\"position\":\"19\",\"Driver\":{\"driverId\":\"albon\",\"permanentNumber\":\"23\",\"code\":\"ALB\",\"url\":\"http://en.wikipedia.org/wiki/Alexander_Albon\",\"givenName\":\"Alexander\",\"familyName\":\"Albon\",\"dateOfBirth\":\"1996-03-23\",\"nationality\":\"Thai\"},\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http://en.wikipedia.org/wiki/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"},\"Q1\":\"1:20.859\"},{\"number\":\"6\",\"position\":\"20\",\"Driver\":{\"driverId\":\"latifi\",\"permanentNumber\":\"6\",\"code\":\"LAT\",\"url\":\"http://en.wikipedia.org/wiki/Nicholas_Latifi\",\"givenName\":\"Nicholas\",\"familyName\":\"Latifi\",\"dateOfBirth\":\"1995-06-29\",\"nationality\":\"Canadian\"},\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http://en.wikipedia.org/wiki/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"},\"Q1\":\"1:21.167\"}]}]}}}"
  },
  {
    "path": "tests/testdata/results.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/current/last/results.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"20\",\"RaceTable\":{\"season\":\"2022\",\"round\":\"17\",\"Races\":[{\"season\":\"2022\",\"round\":\"17\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Singapore_Grand_Prix\",\"raceName\":\"Singapore Grand Prix\",\"Circuit\":{\"circuitId\":\"marina_bay\",\"url\":\"http://en.wikipedia.org/wiki/Marina_Bay_Street_Circuit\",\"circuitName\":\"Marina Bay Street Circuit\",\"Location\":{\"lat\":\"1.2914\",\"long\":\"103.864\",\"locality\":\"Marina Bay\",\"country\":\"Singapore\"}},\"date\":\"2022-10-02\",\"time\":\"12:00:00Z\",\"Results\":[{\"number\":\"11\",\"position\":\"1\",\"positionText\":\"1\",\"points\":\"25\",\"Driver\":{\"driverId\":\"perez\",\"permanentNumber\":\"11\",\"code\":\"PER\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Sergio_P%C3%A9rez\",\"givenName\":\"Sergio\",\"familyName\":\"Pérez\",\"dateOfBirth\":\"1990-01-26\",\"nationality\":\"Mexican\"},\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"},\"grid\":\"2\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7340238\",\"time\":\"2:02:20.238\"},\"FastestLap\":{\"rank\":\"2\",\"lap\":\"57\",\"Time\":{\"time\":\"1:48.165\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"168.509\"}}},{\"number\":\"16\",\"position\":\"2\",\"positionText\":\"2\",\"points\":\"18\",\"Driver\":{\"driverId\":\"leclerc\",\"permanentNumber\":\"16\",\"code\":\"LEC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Charles_Leclerc\",\"givenName\":\"Charles\",\"familyName\":\"Leclerc\",\"dateOfBirth\":\"1997-10-16\",\"nationality\":\"Monegasque\"},\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"},\"grid\":\"1\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7342833\",\"time\":\"+2.595\"},\"FastestLap\":{\"rank\":\"4\",\"lap\":\"54\",\"Time\":{\"time\":\"1:48.753\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"167.598\"}}},{\"number\":\"55\",\"position\":\"3\",\"positionText\":\"3\",\"points\":\"15\",\"Driver\":{\"driverId\":\"sainz\",\"permanentNumber\":\"55\",\"code\":\"SAI\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Carlos_Sainz_Jr.\",\"givenName\":\"Carlos\",\"familyName\":\"Sainz\",\"dateOfBirth\":\"1994-09-01\",\"nationality\":\"Spanish\"},\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"},\"grid\":\"4\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7350543\",\"time\":\"+10.305\"},\"FastestLap\":{\"rank\":\"3\",\"lap\":\"59\",\"Time\":{\"time\":\"1:48.414\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"168.122\"}}},{\"number\":\"4\",\"position\":\"4\",\"positionText\":\"4\",\"points\":\"12\",\"Driver\":{\"driverId\":\"norris\",\"permanentNumber\":\"4\",\"code\":\"NOR\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lando_Norris\",\"givenName\":\"Lando\",\"familyName\":\"Norris\",\"dateOfBirth\":\"1999-11-13\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"},\"grid\":\"6\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7361371\",\"time\":\"+21.133\"},\"FastestLap\":{\"rank\":\"6\",\"lap\":\"56\",\"Time\":{\"time\":\"1:49.212\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"166.893\"}}},{\"number\":\"3\",\"position\":\"5\",\"positionText\":\"5\",\"points\":\"10\",\"Driver\":{\"driverId\":\"ricciardo\",\"permanentNumber\":\"3\",\"code\":\"RIC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Daniel_Ricciardo\",\"givenName\":\"Daniel\",\"familyName\":\"Ricciardo\",\"dateOfBirth\":\"1989-07-01\",\"nationality\":\"Australian\"},\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"},\"grid\":\"16\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7393520\",\"time\":\"+53.282\"},\"FastestLap\":{\"rank\":\"12\",\"lap\":\"57\",\"Time\":{\"time\":\"1:51.006\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"164.196\"}}},{\"number\":\"18\",\"position\":\"6\",\"positionText\":\"6\",\"points\":\"8\",\"Driver\":{\"driverId\":\"stroll\",\"permanentNumber\":\"18\",\"code\":\"STR\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lance_Stroll\",\"givenName\":\"Lance\",\"familyName\":\"Stroll\",\"dateOfBirth\":\"1998-10-29\",\"nationality\":\"Canadian\"},\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"},\"grid\":\"11\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7396568\",\"time\":\"+56.330\"},\"FastestLap\":{\"rank\":\"7\",\"lap\":\"58\",\"Time\":{\"time\":\"1:50.283\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"165.272\"}}},{\"number\":\"1\",\"position\":\"7\",\"positionText\":\"7\",\"points\":\"6\",\"Driver\":{\"driverId\":\"max_verstappen\",\"permanentNumber\":\"33\",\"code\":\"VER\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Max_Verstappen\",\"givenName\":\"Max\",\"familyName\":\"Verstappen\",\"dateOfBirth\":\"1997-09-30\",\"nationality\":\"Dutch\"},\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"},\"grid\":\"8\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7399063\",\"time\":\"+58.825\"},\"FastestLap\":{\"rank\":\"5\",\"lap\":\"52\",\"Time\":{\"time\":\"1:49.142\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"167.000\"}}},{\"number\":\"5\",\"position\":\"8\",\"positionText\":\"8\",\"points\":\"4\",\"Driver\":{\"driverId\":\"vettel\",\"permanentNumber\":\"5\",\"code\":\"VET\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Sebastian_Vettel\",\"givenName\":\"Sebastian\",\"familyName\":\"Vettel\",\"dateOfBirth\":\"1987-07-03\",\"nationality\":\"German\"},\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"},\"grid\":\"13\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7400270\",\"time\":\"+1:00.032\"},\"FastestLap\":{\"rank\":\"11\",\"lap\":\"58\",\"Time\":{\"time\":\"1:50.669\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"164.696\"}}},{\"number\":\"44\",\"position\":\"9\",\"positionText\":\"9\",\"points\":\"2\",\"Driver\":{\"driverId\":\"hamilton\",\"permanentNumber\":\"44\",\"code\":\"HAM\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lewis_Hamilton\",\"givenName\":\"Lewis\",\"familyName\":\"Hamilton\",\"dateOfBirth\":\"1985-01-07\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"},\"grid\":\"3\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7401753\",\"time\":\"+1:01.515\"},\"FastestLap\":{\"rank\":\"10\",\"lap\":\"58\",\"Time\":{\"time\":\"1:50.622\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"164.766\"}}},{\"number\":\"10\",\"position\":\"10\",\"positionText\":\"10\",\"points\":\"1\",\"Driver\":{\"driverId\":\"gasly\",\"permanentNumber\":\"10\",\"code\":\"GAS\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Pierre_Gasly\",\"givenName\":\"Pierre\",\"familyName\":\"Gasly\",\"dateOfBirth\":\"1996-02-07\",\"nationality\":\"French\"},\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"},\"grid\":\"7\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7409814\",\"time\":\"+1:09.576\"},\"FastestLap\":{\"rank\":\"9\",\"lap\":\"56\",\"Time\":{\"time\":\"1:50.569\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"164.845\"}}},{\"number\":\"77\",\"position\":\"11\",\"positionText\":\"11\",\"points\":\"0\",\"Driver\":{\"driverId\":\"bottas\",\"permanentNumber\":\"77\",\"code\":\"BOT\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Valtteri_Bottas\",\"givenName\":\"Valtteri\",\"familyName\":\"Bottas\",\"dateOfBirth\":\"1989-08-28\",\"nationality\":\"Finnish\"},\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"},\"grid\":\"15\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7429082\",\"time\":\"+1:28.844\"},\"FastestLap\":{\"rank\":\"13\",\"lap\":\"52\",\"Time\":{\"time\":\"1:51.864\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"162.937\"}}},{\"number\":\"20\",\"position\":\"12\",\"positionText\":\"12\",\"points\":\"0\",\"Driver\":{\"driverId\":\"kevin_magnussen\",\"permanentNumber\":\"20\",\"code\":\"MAG\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Kevin_Magnussen\",\"givenName\":\"Kevin\",\"familyName\":\"Magnussen\",\"dateOfBirth\":\"1992-10-05\",\"nationality\":\"Danish\"},\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"},\"grid\":\"9\",\"laps\":\"59\",\"status\":\"Finished\",\"Time\":{\"millis\":\"7432848\",\"time\":\"+1:32.610\"},\"FastestLap\":{\"rank\":\"14\",\"lap\":\"59\",\"Time\":{\"time\":\"1:52.067\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"162.641\"}}},{\"number\":\"47\",\"position\":\"13\",\"positionText\":\"13\",\"points\":\"0\",\"Driver\":{\"driverId\":\"mick_schumacher\",\"permanentNumber\":\"47\",\"code\":\"MSC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mick_Schumacher\",\"givenName\":\"Mick\",\"familyName\":\"Schumacher\",\"dateOfBirth\":\"1999-03-22\",\"nationality\":\"German\"},\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"},\"grid\":\"12\",\"laps\":\"58\",\"status\":\"+1 Lap\",\"FastestLap\":{\"rank\":\"8\",\"lap\":\"58\",\"Time\":{\"time\":\"1:50.290\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"165.262\"}}},{\"number\":\"63\",\"position\":\"14\",\"positionText\":\"14\",\"points\":\"0\",\"Driver\":{\"driverId\":\"russell\",\"permanentNumber\":\"63\",\"code\":\"RUS\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/George_Russell_%28racing_driver%29\",\"givenName\":\"George\",\"familyName\":\"Russell\",\"dateOfBirth\":\"1998-02-15\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"},\"grid\":\"0\",\"laps\":\"57\",\"status\":\"+2 Laps\",\"FastestLap\":{\"rank\":\"1\",\"lap\":\"54\",\"Time\":{\"time\":\"1:46.458\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"171.211\"}}},{\"number\":\"22\",\"position\":\"15\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"tsunoda\",\"permanentNumber\":\"22\",\"code\":\"TSU\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Yuki_Tsunoda\",\"givenName\":\"Yuki\",\"familyName\":\"Tsunoda\",\"dateOfBirth\":\"2000-05-11\",\"nationality\":\"Japanese\"},\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"},\"grid\":\"10\",\"laps\":\"34\",\"status\":\"Accident\",\"FastestLap\":{\"rank\":\"15\",\"lap\":\"32\",\"Time\":{\"time\":\"1:58.716\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"153.532\"}}},{\"number\":\"31\",\"position\":\"16\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"ocon\",\"permanentNumber\":\"31\",\"code\":\"OCO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Esteban_Ocon\",\"givenName\":\"Esteban\",\"familyName\":\"Ocon\",\"dateOfBirth\":\"1996-09-17\",\"nationality\":\"French\"},\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"},\"grid\":\"17\",\"laps\":\"26\",\"status\":\"Engine\",\"FastestLap\":{\"rank\":\"17\",\"lap\":\"24\",\"Time\":{\"time\":\"2:01.105\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"150.504\"}}},{\"number\":\"23\",\"position\":\"17\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"albon\",\"permanentNumber\":\"23\",\"code\":\"ALB\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alexander_Albon\",\"givenName\":\"Alexander\",\"familyName\":\"Albon\",\"dateOfBirth\":\"1996-03-23\",\"nationality\":\"Thai\"},\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"},\"grid\":\"18\",\"laps\":\"25\",\"status\":\"Collision damage\",\"FastestLap\":{\"rank\":\"18\",\"lap\":\"24\",\"Time\":{\"time\":\"2:02.121\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"149.251\"}}},{\"number\":\"14\",\"position\":\"18\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"alonso\",\"permanentNumber\":\"14\",\"code\":\"ALO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Fernando_Alonso\",\"givenName\":\"Fernando\",\"familyName\":\"Alonso\",\"dateOfBirth\":\"1981-07-29\",\"nationality\":\"Spanish\"},\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"},\"grid\":\"5\",\"laps\":\"20\",\"status\":\"Engine\",\"FastestLap\":{\"rank\":\"16\",\"lap\":\"19\",\"Time\":{\"time\":\"2:00.463\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"151.306\"}}},{\"number\":\"6\",\"position\":\"19\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"latifi\",\"permanentNumber\":\"6\",\"code\":\"LAT\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Nicholas_Latifi\",\"givenName\":\"Nicholas\",\"familyName\":\"Latifi\",\"dateOfBirth\":\"1995-06-29\",\"nationality\":\"Canadian\"},\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"},\"grid\":\"19\",\"laps\":\"7\",\"status\":\"Collision damage\",\"FastestLap\":{\"rank\":\"20\",\"lap\":\"5\",\"Time\":{\"time\":\"2:05.585\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"145.135\"}}},{\"number\":\"24\",\"position\":\"20\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"zhou\",\"permanentNumber\":\"24\",\"code\":\"ZHO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Guanyu_Zhou\",\"givenName\":\"Guanyu\",\"familyName\":\"Zhou\",\"dateOfBirth\":\"1999-05-30\",\"nationality\":\"Chinese\"},\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"},\"grid\":\"14\",\"laps\":\"6\",\"status\":\"Collision\",\"FastestLap\":{\"rank\":\"19\",\"lap\":\"5\",\"Time\":{\"time\":\"2:05.556\"},\"AverageSpeed\":{\"units\":\"kph\",\"speed\":\"145.168\"}}}]}]}}}"
  },
  {
    "path": "tests/testdata/schedule.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/2022.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"22\",\"RaceTable\":{\"season\":\"2022\",\"Races\":[{\"season\":\"2022\",\"round\":\"1\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Bahrain_Grand_Prix\",\"raceName\":\"Bahrain Grand Prix\",\"Circuit\":{\"circuitId\":\"bahrain\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Bahrain_International_Circuit\",\"circuitName\":\"Bahrain International Circuit\",\"Location\":{\"lat\":\"26.0325\",\"long\":\"50.5106\",\"locality\":\"Sakhir\",\"country\":\"Bahrain\"}},\"date\":\"2022-03-20\",\"time\":\"15:00:00Z\",\"FirstPractice\":{\"date\":\"2022-03-18\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-03-18\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-03-19\",\"time\":\"12:00:00Z\"},\"Qualifying\":{\"date\":\"2022-03-19\",\"time\":\"15:00:00Z\"}},{\"season\":\"2022\",\"round\":\"2\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Saudi_Arabian_Grand_Prix\",\"raceName\":\"Saudi Arabian Grand Prix\",\"Circuit\":{\"circuitId\":\"jeddah\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Jeddah_Street_Circuit\",\"circuitName\":\"Jeddah Corniche Circuit\",\"Location\":{\"lat\":\"21.6319\",\"long\":\"39.1044\",\"locality\":\"Jeddah\",\"country\":\"Saudi Arabia\"}},\"date\":\"2022-03-27\",\"time\":\"17:00:00Z\",\"FirstPractice\":{\"date\":\"2022-03-25\",\"time\":\"14:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-03-25\",\"time\":\"17:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-03-26\",\"time\":\"14:00:00Z\"},\"Qualifying\":{\"date\":\"2022-03-26\",\"time\":\"17:00:00Z\"}},{\"season\":\"2022\",\"round\":\"3\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Australian_Grand_Prix\",\"raceName\":\"Australian Grand Prix\",\"Circuit\":{\"circuitId\":\"albert_park\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Melbourne_Grand_Prix_Circuit\",\"circuitName\":\"Albert Park Grand Prix Circuit\",\"Location\":{\"lat\":\"-37.8497\",\"long\":\"144.968\",\"locality\":\"Melbourne\",\"country\":\"Australia\"}},\"date\":\"2022-04-10\",\"time\":\"05:00:00Z\",\"FirstPractice\":{\"date\":\"2022-04-08\",\"time\":\"03:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-04-08\",\"time\":\"06:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-04-09\",\"time\":\"03:00:00Z\"},\"Qualifying\":{\"date\":\"2022-04-09\",\"time\":\"06:00:00Z\"}},{\"season\":\"2022\",\"round\":\"4\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Emilia_Romagna_Grand_Prix\",\"raceName\":\"Emilia Romagna Grand Prix\",\"Circuit\":{\"circuitId\":\"imola\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Autodromo_Enzo_e_Dino_Ferrari\",\"circuitName\":\"Autodromo Enzo e Dino Ferrari\",\"Location\":{\"lat\":\"44.3439\",\"long\":\"11.7167\",\"locality\":\"Imola\",\"country\":\"Italy\"}},\"date\":\"2022-04-24\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-04-22\",\"time\":\"11:30:00Z\"},\"Qualifying\":{\"date\":\"2022-04-22\",\"time\":\"15:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-04-23\",\"time\":\"10:30:00Z\"},\"Sprint\":{\"date\":\"2022-04-23\",\"time\":\"14:30:00Z\"}},{\"season\":\"2022\",\"round\":\"5\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Miami_Grand_Prix\",\"raceName\":\"Miami Grand Prix\",\"Circuit\":{\"circuitId\":\"miami\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Miami_International_Autodrome\",\"circuitName\":\"Miami International Autodrome\",\"Location\":{\"lat\":\"25.9581\",\"long\":\"-80.2389\",\"locality\":\"Miami\",\"country\":\"USA\"}},\"date\":\"2022-05-08\",\"time\":\"19:30:00Z\",\"FirstPractice\":{\"date\":\"2022-05-06\",\"time\":\"18:30:00Z\"},\"SecondPractice\":{\"date\":\"2022-05-06\",\"time\":\"21:30:00Z\"},\"ThirdPractice\":{\"date\":\"2022-05-07\",\"time\":\"17:00:00Z\"},\"Qualifying\":{\"date\":\"2022-05-07\",\"time\":\"20:00:00Z\"}},{\"season\":\"2022\",\"round\":\"6\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Spanish_Grand_Prix\",\"raceName\":\"Spanish Grand Prix\",\"Circuit\":{\"circuitId\":\"catalunya\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Circuit_de_Barcelona-Catalunya\",\"circuitName\":\"Circuit de Barcelona-Catalunya\",\"Location\":{\"lat\":\"41.57\",\"long\":\"2.26111\",\"locality\":\"Montmeló\",\"country\":\"Spain\"}},\"date\":\"2022-05-22\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-05-20\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-05-20\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-05-21\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-05-21\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"7\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Monaco_Grand_Prix\",\"raceName\":\"Monaco Grand Prix\",\"Circuit\":{\"circuitId\":\"monaco\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Circuit_de_Monaco\",\"circuitName\":\"Circuit de Monaco\",\"Location\":{\"lat\":\"43.7347\",\"long\":\"7.42056\",\"locality\":\"Monte-Carlo\",\"country\":\"Monaco\"}},\"date\":\"2022-05-29\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-05-27\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-05-27\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-05-28\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-05-28\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"8\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Azerbaijan_Grand_Prix\",\"raceName\":\"Azerbaijan Grand Prix\",\"Circuit\":{\"circuitId\":\"baku\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Baku_City_Circuit\",\"circuitName\":\"Baku City Circuit\",\"Location\":{\"lat\":\"40.3725\",\"long\":\"49.8533\",\"locality\":\"Baku\",\"country\":\"Azerbaijan\"}},\"date\":\"2022-06-12\",\"time\":\"11:00:00Z\",\"FirstPractice\":{\"date\":\"2022-06-10\",\"time\":\"11:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-06-10\",\"time\":\"14:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-06-11\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-06-11\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"9\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Canadian_Grand_Prix\",\"raceName\":\"Canadian Grand Prix\",\"Circuit\":{\"circuitId\":\"villeneuve\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Circuit_Gilles_Villeneuve\",\"circuitName\":\"Circuit Gilles Villeneuve\",\"Location\":{\"lat\":\"45.5\",\"long\":\"-73.5228\",\"locality\":\"Montreal\",\"country\":\"Canada\"}},\"date\":\"2022-06-19\",\"time\":\"18:00:00Z\",\"FirstPractice\":{\"date\":\"2022-06-17\",\"time\":\"18:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-06-17\",\"time\":\"21:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-06-18\",\"time\":\"17:00:00Z\"},\"Qualifying\":{\"date\":\"2022-06-18\",\"time\":\"20:00:00Z\"}},{\"season\":\"2022\",\"round\":\"10\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_British_Grand_Prix\",\"raceName\":\"British Grand Prix\",\"Circuit\":{\"circuitId\":\"silverstone\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Silverstone_Circuit\",\"circuitName\":\"Silverstone Circuit\",\"Location\":{\"lat\":\"52.0786\",\"long\":\"-1.01694\",\"locality\":\"Silverstone\",\"country\":\"UK\"}},\"date\":\"2022-07-03\",\"time\":\"14:00:00Z\",\"FirstPractice\":{\"date\":\"2022-07-01\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-07-01\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-07-02\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-07-02\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"11\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Austrian_Grand_Prix\",\"raceName\":\"Austrian Grand Prix\",\"Circuit\":{\"circuitId\":\"red_bull_ring\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Ring\",\"circuitName\":\"Red Bull Ring\",\"Location\":{\"lat\":\"47.2197\",\"long\":\"14.7647\",\"locality\":\"Spielberg\",\"country\":\"Austria\"}},\"date\":\"2022-07-10\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-07-08\",\"time\":\"11:30:00Z\"},\"Qualifying\":{\"date\":\"2022-07-08\",\"time\":\"15:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-07-09\",\"time\":\"10:30:00Z\"},\"Sprint\":{\"date\":\"2022-07-09\",\"time\":\"14:30:00Z\"}},{\"season\":\"2022\",\"round\":\"12\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_French_Grand_Prix\",\"raceName\":\"French Grand Prix\",\"Circuit\":{\"circuitId\":\"ricard\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Paul_Ricard_Circuit\",\"circuitName\":\"Circuit Paul Ricard\",\"Location\":{\"lat\":\"43.2506\",\"long\":\"5.79167\",\"locality\":\"Le Castellet\",\"country\":\"France\"}},\"date\":\"2022-07-24\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-07-22\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-07-22\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-07-23\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-07-23\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"13\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Hungarian_Grand_Prix\",\"raceName\":\"Hungarian Grand Prix\",\"Circuit\":{\"circuitId\":\"hungaroring\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Hungaroring\",\"circuitName\":\"Hungaroring\",\"Location\":{\"lat\":\"47.5789\",\"long\":\"19.2486\",\"locality\":\"Budapest\",\"country\":\"Hungary\"}},\"date\":\"2022-07-31\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-07-29\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-07-29\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-07-30\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-07-30\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"14\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Belgian_Grand_Prix\",\"raceName\":\"Belgian Grand Prix\",\"Circuit\":{\"circuitId\":\"spa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Circuit_de_Spa-Francorchamps\",\"circuitName\":\"Circuit de Spa-Francorchamps\",\"Location\":{\"lat\":\"50.4372\",\"long\":\"5.97139\",\"locality\":\"Spa\",\"country\":\"Belgium\"}},\"date\":\"2022-08-28\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-08-26\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-08-26\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-08-27\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-08-27\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"15\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Dutch_Grand_Prix\",\"raceName\":\"Dutch Grand Prix\",\"Circuit\":{\"circuitId\":\"zandvoort\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Circuit_Zandvoort\",\"circuitName\":\"Circuit Park Zandvoort\",\"Location\":{\"lat\":\"52.3888\",\"long\":\"4.54092\",\"locality\":\"Zandvoort\",\"country\":\"Netherlands\"}},\"date\":\"2022-09-04\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-09-02\",\"time\":\"10:30:00Z\"},\"SecondPractice\":{\"date\":\"2022-09-02\",\"time\":\"14:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-09-03\",\"time\":\"10:00:00Z\"},\"Qualifying\":{\"date\":\"2022-09-03\",\"time\":\"13:00:00Z\"}},{\"season\":\"2022\",\"round\":\"16\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Italian_Grand_Prix\",\"raceName\":\"Italian Grand Prix\",\"Circuit\":{\"circuitId\":\"monza\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Autodromo_Nazionale_Monza\",\"circuitName\":\"Autodromo Nazionale di Monza\",\"Location\":{\"lat\":\"45.6156\",\"long\":\"9.28111\",\"locality\":\"Monza\",\"country\":\"Italy\"}},\"date\":\"2022-09-11\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-09-09\",\"time\":\"12:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-09-09\",\"time\":\"15:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-09-10\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-09-10\",\"time\":\"14:00:00Z\"}},{\"season\":\"2022\",\"round\":\"17\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Singapore_Grand_Prix\",\"raceName\":\"Singapore Grand Prix\",\"Circuit\":{\"circuitId\":\"marina_bay\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Marina_Bay_Street_Circuit\",\"circuitName\":\"Marina Bay Street Circuit\",\"Location\":{\"lat\":\"1.2914\",\"long\":\"103.864\",\"locality\":\"Marina Bay\",\"country\":\"Singapore\"}},\"date\":\"2022-10-02\",\"time\":\"12:00:00Z\",\"FirstPractice\":{\"date\":\"2022-09-30\",\"time\":\"10:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-09-30\",\"time\":\"13:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-10-01\",\"time\":\"10:00:00Z\"},\"Qualifying\":{\"date\":\"2022-10-01\",\"time\":\"13:00:00Z\"}},{\"season\":\"2022\",\"round\":\"18\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Japanese_Grand_Prix\",\"raceName\":\"Japanese Grand Prix\",\"Circuit\":{\"circuitId\":\"suzuka\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Suzuka_Circuit\",\"circuitName\":\"Suzuka Circuit\",\"Location\":{\"lat\":\"34.8431\",\"long\":\"136.541\",\"locality\":\"Suzuka\",\"country\":\"Japan\"}},\"date\":\"2022-10-09\",\"time\":\"05:00:00Z\",\"FirstPractice\":{\"date\":\"2022-10-07\",\"time\":\"03:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-10-07\",\"time\":\"06:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-10-08\",\"time\":\"03:00:00Z\"},\"Qualifying\":{\"date\":\"2022-10-08\",\"time\":\"06:00:00Z\"}},{\"season\":\"2022\",\"round\":\"19\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_United_States_Grand_Prix\",\"raceName\":\"United States Grand Prix\",\"Circuit\":{\"circuitId\":\"americas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Circuit_of_the_Americas\",\"circuitName\":\"Circuit of the Americas\",\"Location\":{\"lat\":\"30.1328\",\"long\":\"-97.6411\",\"locality\":\"Austin\",\"country\":\"USA\"}},\"date\":\"2022-10-23\",\"time\":\"19:00:00Z\",\"FirstPractice\":{\"date\":\"2022-10-21\",\"time\":\"19:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-10-21\",\"time\":\"22:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-10-22\",\"time\":\"19:00:00Z\"},\"Qualifying\":{\"date\":\"2022-10-22\",\"time\":\"22:00:00Z\"}},{\"season\":\"2022\",\"round\":\"20\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Mexican_Grand_Prix\",\"raceName\":\"Mexico City Grand Prix\",\"Circuit\":{\"circuitId\":\"rodriguez\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aut%C3%B3dromo_Hermanos_Rodr%C3%ADguez\",\"circuitName\":\"Autódromo Hermanos Rodríguez\",\"Location\":{\"lat\":\"19.4042\",\"long\":\"-99.0907\",\"locality\":\"Mexico City\",\"country\":\"Mexico\"}},\"date\":\"2022-10-30\",\"time\":\"20:00:00Z\",\"FirstPractice\":{\"date\":\"2022-10-28\",\"time\":\"18:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-10-28\",\"time\":\"21:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-10-29\",\"time\":\"17:00:00Z\"},\"Qualifying\":{\"date\":\"2022-10-29\",\"time\":\"20:00:00Z\"}},{\"season\":\"2022\",\"round\":\"21\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Brazilian_Grand_Prix\",\"raceName\":\"Brazilian Grand Prix\",\"Circuit\":{\"circuitId\":\"interlagos\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aut%C3%B3dromo_Jos%C3%A9_Carlos_Pace\",\"circuitName\":\"Autódromo José Carlos Pace\",\"Location\":{\"lat\":\"-23.7036\",\"long\":\"-46.6997\",\"locality\":\"São Paulo\",\"country\":\"Brazil\"}},\"date\":\"2022-11-13\",\"time\":\"18:00:00Z\",\"FirstPractice\":{\"date\":\"2022-11-11\",\"time\":\"15:30:00Z\"},\"Qualifying\":{\"date\":\"2022-11-11\",\"time\":\"19:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-11-12\",\"time\":\"15:30:00Z\"},\"Sprint\":{\"date\":\"2022-11-12\",\"time\":\"19:30:00Z\"}},{\"season\":\"2022\",\"round\":\"22\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Abu_Dhabi_Grand_Prix\",\"raceName\":\"Abu Dhabi Grand Prix\",\"Circuit\":{\"circuitId\":\"yas_marina\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Yas_Marina_Circuit\",\"circuitName\":\"Yas Marina Circuit\",\"Location\":{\"lat\":\"24.4672\",\"long\":\"54.6031\",\"locality\":\"Abu Dhabi\",\"country\":\"UAE\"}},\"date\":\"2022-11-20\",\"time\":\"13:00:00Z\",\"FirstPractice\":{\"date\":\"2022-11-18\",\"time\":\"10:00:00Z\"},\"SecondPractice\":{\"date\":\"2022-11-18\",\"time\":\"13:00:00Z\"},\"ThirdPractice\":{\"date\":\"2022-11-19\",\"time\":\"11:00:00Z\"},\"Qualifying\":{\"date\":\"2022-11-19\",\"time\":\"14:00:00Z\"}}]}}}"
  },
  {
    "path": "tests/testdata/seasons.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/seasons.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"74\",\"SeasonTable\":{\"Seasons\":[{\"season\":\"1950\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1950_Formula_One_season\"},{\"season\":\"1951\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1951_Formula_One_season\"},{\"season\":\"1952\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1952_Formula_One_season\"},{\"season\":\"1953\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1953_Formula_One_season\"},{\"season\":\"1954\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1954_Formula_One_season\"},{\"season\":\"1955\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1955_Formula_One_season\"},{\"season\":\"1956\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1956_Formula_One_season\"},{\"season\":\"1957\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1957_Formula_One_season\"},{\"season\":\"1958\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1958_Formula_One_season\"},{\"season\":\"1959\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1959_Formula_One_season\"},{\"season\":\"1960\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1960_Formula_One_season\"},{\"season\":\"1961\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1961_Formula_One_season\"},{\"season\":\"1962\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1962_Formula_One_season\"},{\"season\":\"1963\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1963_Formula_One_season\"},{\"season\":\"1964\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1964_Formula_One_season\"},{\"season\":\"1965\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1965_Formula_One_season\"},{\"season\":\"1966\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1966_Formula_One_season\"},{\"season\":\"1967\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1967_Formula_One_season\"},{\"season\":\"1968\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1968_Formula_One_season\"},{\"season\":\"1969\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1969_Formula_One_season\"},{\"season\":\"1970\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1970_Formula_One_season\"},{\"season\":\"1971\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1971_Formula_One_season\"},{\"season\":\"1972\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1972_Formula_One_season\"},{\"season\":\"1973\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1973_Formula_One_season\"},{\"season\":\"1974\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1974_Formula_One_season\"},{\"season\":\"1975\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1975_Formula_One_season\"},{\"season\":\"1976\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1976_Formula_One_season\"},{\"season\":\"1977\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1977_Formula_One_season\"},{\"season\":\"1978\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1978_Formula_One_season\"},{\"season\":\"1979\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/1979_Formula_One_season\"}]}}}"
  },
  {
    "path": "tests/testdata/sprint.json",
    "content": "{\"MRData\":{\"xmlns\":\"http:\\/\\/ergast.com\\/mrd\\/1.5\",\"series\":\"f1\",\"url\":\"http://ergast.com/api/f1/2022/4/sprint.json\",\"limit\":\"30\",\"offset\":\"0\",\"total\":\"20\",\"RaceTable\":{\"season\":\"2022\",\"round\":\"4\",\"Races\":[{\"season\":\"2022\",\"round\":\"4\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/2022_Emilia_Romagna_Grand_Prix\",\"raceName\":\"Emilia Romagna Grand Prix\",\"Circuit\":{\"circuitId\":\"imola\",\"url\":\"http://en.wikipedia.org/wiki/Autodromo_Enzo_e_Dino_Ferrari\",\"circuitName\":\"Autodromo Enzo e Dino Ferrari\",\"Location\":{\"lat\":\"44.3439\",\"long\":\"11.7167\",\"locality\":\"Imola\",\"country\":\"Italy\"}},\"date\":\"2022-04-24\",\"time\":\"13:00:00Z\",\"SprintResults\":[{\"number\":\"1\",\"position\":\"1\",\"positionText\":\"1\",\"points\":\"8\",\"Driver\":{\"driverId\":\"max_verstappen\",\"permanentNumber\":\"33\",\"code\":\"VER\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Max_Verstappen\",\"givenName\":\"Max\",\"familyName\":\"Verstappen\",\"dateOfBirth\":\"1997-09-30\",\"nationality\":\"Dutch\"},\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"},\"grid\":\"1\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1839567\",\"time\":\"30:39.567\"},\"FastestLap\":{\"lap\":\"14\",\"Time\":{\"time\":\"1:19.154\"}}},{\"number\":\"16\",\"position\":\"2\",\"positionText\":\"2\",\"points\":\"7\",\"Driver\":{\"driverId\":\"leclerc\",\"permanentNumber\":\"16\",\"code\":\"LEC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Charles_Leclerc\",\"givenName\":\"Charles\",\"familyName\":\"Leclerc\",\"dateOfBirth\":\"1997-10-16\",\"nationality\":\"Monegasque\"},\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"},\"grid\":\"2\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1842542\",\"time\":\"+2.975\"},\"FastestLap\":{\"lap\":\"11\",\"Time\":{\"time\":\"1:19.044\"}}},{\"number\":\"11\",\"position\":\"3\",\"positionText\":\"3\",\"points\":\"6\",\"Driver\":{\"driverId\":\"perez\",\"permanentNumber\":\"11\",\"code\":\"PER\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Sergio_P%C3%A9rez\",\"givenName\":\"Sergio\",\"familyName\":\"Pérez\",\"dateOfBirth\":\"1990-01-26\",\"nationality\":\"Mexican\"},\"Constructor\":{\"constructorId\":\"red_bull\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Red_Bull_Racing\",\"name\":\"Red Bull\",\"nationality\":\"Austrian\"},\"grid\":\"7\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1844288\",\"time\":\"+4.721\"},\"FastestLap\":{\"lap\":\"14\",\"Time\":{\"time\":\"1:19.012\"}}},{\"number\":\"55\",\"position\":\"4\",\"positionText\":\"4\",\"points\":\"5\",\"Driver\":{\"driverId\":\"sainz\",\"permanentNumber\":\"55\",\"code\":\"SAI\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Carlos_Sainz_Jr.\",\"givenName\":\"Carlos\",\"familyName\":\"Sainz\",\"dateOfBirth\":\"1994-09-01\",\"nationality\":\"Spanish\"},\"Constructor\":{\"constructorId\":\"ferrari\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_Ferrari\",\"name\":\"Ferrari\",\"nationality\":\"Italian\"},\"grid\":\"10\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1857145\",\"time\":\"+17.578\"},\"FastestLap\":{\"lap\":\"14\",\"Time\":{\"time\":\"1:19.251\"}}},{\"number\":\"4\",\"position\":\"5\",\"positionText\":\"5\",\"points\":\"4\",\"Driver\":{\"driverId\":\"norris\",\"permanentNumber\":\"4\",\"code\":\"NOR\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lando_Norris\",\"givenName\":\"Lando\",\"familyName\":\"Norris\",\"dateOfBirth\":\"1999-11-13\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"},\"grid\":\"3\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1864128\",\"time\":\"+24.561\"},\"FastestLap\":{\"lap\":\"9\",\"Time\":{\"time\":\"1:20.030\"}}},{\"number\":\"3\",\"position\":\"6\",\"positionText\":\"6\",\"points\":\"3\",\"Driver\":{\"driverId\":\"ricciardo\",\"permanentNumber\":\"3\",\"code\":\"RIC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Daniel_Ricciardo\",\"givenName\":\"Daniel\",\"familyName\":\"Ricciardo\",\"dateOfBirth\":\"1989-07-01\",\"nationality\":\"Australian\"},\"Constructor\":{\"constructorId\":\"mclaren\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/McLaren\",\"name\":\"McLaren\",\"nationality\":\"British\"},\"grid\":\"6\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1867307\",\"time\":\"+27.740\"},\"FastestLap\":{\"lap\":\"12\",\"Time\":{\"time\":\"1:20.328\"}}},{\"number\":\"77\",\"position\":\"7\",\"positionText\":\"7\",\"points\":\"2\",\"Driver\":{\"driverId\":\"bottas\",\"permanentNumber\":\"77\",\"code\":\"BOT\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Valtteri_Bottas\",\"givenName\":\"Valtteri\",\"familyName\":\"Bottas\",\"dateOfBirth\":\"1989-08-28\",\"nationality\":\"Finnish\"},\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"},\"grid\":\"8\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1867700\",\"time\":\"+28.133\"},\"FastestLap\":{\"lap\":\"9\",\"Time\":{\"time\":\"1:20.219\"}}},{\"number\":\"20\",\"position\":\"8\",\"positionText\":\"8\",\"points\":\"1\",\"Driver\":{\"driverId\":\"kevin_magnussen\",\"permanentNumber\":\"20\",\"code\":\"MAG\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Kevin_Magnussen\",\"givenName\":\"Kevin\",\"familyName\":\"Magnussen\",\"dateOfBirth\":\"1992-10-05\",\"nationality\":\"Danish\"},\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"},\"grid\":\"4\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1870279\",\"time\":\"+30.712\"},\"FastestLap\":{\"lap\":\"6\",\"Time\":{\"time\":\"1:20.557\"}}},{\"number\":\"14\",\"position\":\"9\",\"positionText\":\"9\",\"points\":\"0\",\"Driver\":{\"driverId\":\"alonso\",\"permanentNumber\":\"14\",\"code\":\"ALO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Fernando_Alonso\",\"givenName\":\"Fernando\",\"familyName\":\"Alonso\",\"dateOfBirth\":\"1981-07-29\",\"nationality\":\"Spanish\"},\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"},\"grid\":\"5\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1871845\",\"time\":\"+32.278\"},\"FastestLap\":{\"lap\":\"10\",\"Time\":{\"time\":\"1:20.639\"}}},{\"number\":\"47\",\"position\":\"10\",\"positionText\":\"10\",\"points\":\"0\",\"Driver\":{\"driverId\":\"mick_schumacher\",\"permanentNumber\":\"47\",\"code\":\"MSC\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mick_Schumacher\",\"givenName\":\"Mick\",\"familyName\":\"Schumacher\",\"dateOfBirth\":\"1999-03-22\",\"nationality\":\"German\"},\"Constructor\":{\"constructorId\":\"haas\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Haas_F1_Team\",\"name\":\"Haas F1 Team\",\"nationality\":\"American\"},\"grid\":\"12\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1873340\",\"time\":\"+33.773\"},\"FastestLap\":{\"lap\":\"15\",\"Time\":{\"time\":\"1:20.567\"}}},{\"number\":\"63\",\"position\":\"11\",\"positionText\":\"11\",\"points\":\"0\",\"Driver\":{\"driverId\":\"russell\",\"permanentNumber\":\"63\",\"code\":\"RUS\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/George_Russell_%28racing_driver%29\",\"givenName\":\"George\",\"familyName\":\"Russell\",\"dateOfBirth\":\"1998-02-15\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"},\"grid\":\"11\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1875851\",\"time\":\"+36.284\"},\"FastestLap\":{\"lap\":\"19\",\"Time\":{\"time\":\"1:20.756\"}}},{\"number\":\"22\",\"position\":\"12\",\"positionText\":\"12\",\"points\":\"0\",\"Driver\":{\"driverId\":\"tsunoda\",\"permanentNumber\":\"22\",\"code\":\"TSU\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Yuki_Tsunoda\",\"givenName\":\"Yuki\",\"familyName\":\"Tsunoda\",\"dateOfBirth\":\"2000-05-11\",\"nationality\":\"Japanese\"},\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"},\"grid\":\"16\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1877865\",\"time\":\"+38.298\"},\"FastestLap\":{\"lap\":\"20\",\"Time\":{\"time\":\"1:20.909\"}}},{\"number\":\"5\",\"position\":\"13\",\"positionText\":\"13\",\"points\":\"0\",\"Driver\":{\"driverId\":\"vettel\",\"permanentNumber\":\"5\",\"code\":\"VET\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Sebastian_Vettel\",\"givenName\":\"Sebastian\",\"familyName\":\"Vettel\",\"dateOfBirth\":\"1987-07-03\",\"nationality\":\"German\"},\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"},\"grid\":\"9\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1879744\",\"time\":\"+40.177\"},\"FastestLap\":{\"lap\":\"8\",\"Time\":{\"time\":\"1:21.044\"}}},{\"number\":\"44\",\"position\":\"14\",\"positionText\":\"14\",\"points\":\"0\",\"Driver\":{\"driverId\":\"hamilton\",\"permanentNumber\":\"44\",\"code\":\"HAM\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lewis_Hamilton\",\"givenName\":\"Lewis\",\"familyName\":\"Hamilton\",\"dateOfBirth\":\"1985-01-07\",\"nationality\":\"British\"},\"Constructor\":{\"constructorId\":\"mercedes\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Mercedes-Benz_in_Formula_One\",\"name\":\"Mercedes\",\"nationality\":\"German\"},\"grid\":\"13\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1881026\",\"time\":\"+41.459\"},\"FastestLap\":{\"lap\":\"9\",\"Time\":{\"time\":\"1:20.663\"}}},{\"number\":\"18\",\"position\":\"15\",\"positionText\":\"15\",\"points\":\"0\",\"Driver\":{\"driverId\":\"stroll\",\"permanentNumber\":\"18\",\"code\":\"STR\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Lance_Stroll\",\"givenName\":\"Lance\",\"familyName\":\"Stroll\",\"dateOfBirth\":\"1998-10-29\",\"nationality\":\"Canadian\"},\"Constructor\":{\"constructorId\":\"aston_martin\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Aston_Martin_in_Formula_One\",\"name\":\"Aston Martin\",\"nationality\":\"British\"},\"grid\":\"15\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1882477\",\"time\":\"+42.910\"},\"FastestLap\":{\"lap\":\"14\",\"Time\":{\"time\":\"1:20.948\"}}},{\"number\":\"31\",\"position\":\"16\",\"positionText\":\"16\",\"points\":\"0\",\"Driver\":{\"driverId\":\"ocon\",\"permanentNumber\":\"31\",\"code\":\"OCO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Esteban_Ocon\",\"givenName\":\"Esteban\",\"familyName\":\"Ocon\",\"dateOfBirth\":\"1996-09-17\",\"nationality\":\"French\"},\"Constructor\":{\"constructorId\":\"alpine\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alpine_F1_Team\",\"name\":\"Alpine F1 Team\",\"nationality\":\"French\"},\"grid\":\"19\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1883084\",\"time\":\"+43.517\"},\"FastestLap\":{\"lap\":\"14\",\"Time\":{\"time\":\"1:20.995\"}}},{\"number\":\"10\",\"position\":\"17\",\"positionText\":\"17\",\"points\":\"0\",\"Driver\":{\"driverId\":\"gasly\",\"permanentNumber\":\"10\",\"code\":\"GAS\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Pierre_Gasly\",\"givenName\":\"Pierre\",\"familyName\":\"Gasly\",\"dateOfBirth\":\"1996-02-07\",\"nationality\":\"French\"},\"Constructor\":{\"constructorId\":\"alphatauri\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Scuderia_AlphaTauri\",\"name\":\"AlphaTauri\",\"nationality\":\"Italian\"},\"grid\":\"17\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1883361\",\"time\":\"+43.794\"},\"FastestLap\":{\"lap\":\"18\",\"Time\":{\"time\":\"1:20.599\"}}},{\"number\":\"23\",\"position\":\"18\",\"positionText\":\"18\",\"points\":\"0\",\"Driver\":{\"driverId\":\"albon\",\"permanentNumber\":\"23\",\"code\":\"ALB\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alexander_Albon\",\"givenName\":\"Alexander\",\"familyName\":\"Albon\",\"dateOfBirth\":\"1996-03-23\",\"nationality\":\"Thai\"},\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"},\"grid\":\"20\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1888438\",\"time\":\"+48.871\"},\"FastestLap\":{\"lap\":\"14\",\"Time\":{\"time\":\"1:21.020\"}}},{\"number\":\"6\",\"position\":\"19\",\"positionText\":\"19\",\"points\":\"0\",\"Driver\":{\"driverId\":\"latifi\",\"permanentNumber\":\"6\",\"code\":\"LAT\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Nicholas_Latifi\",\"givenName\":\"Nicholas\",\"familyName\":\"Latifi\",\"dateOfBirth\":\"1995-06-29\",\"nationality\":\"Canadian\"},\"Constructor\":{\"constructorId\":\"williams\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Williams_Grand_Prix_Engineering\",\"name\":\"Williams\",\"nationality\":\"British\"},\"grid\":\"18\",\"laps\":\"21\",\"status\":\"Finished\",\"Time\":{\"millis\":\"1891584\",\"time\":\"+52.017\"},\"FastestLap\":{\"lap\":\"16\",\"Time\":{\"time\":\"1:21.437\"}}},{\"number\":\"24\",\"position\":\"20\",\"positionText\":\"R\",\"points\":\"0\",\"Driver\":{\"driverId\":\"zhou\",\"permanentNumber\":\"24\",\"code\":\"ZHO\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Guanyu_Zhou\",\"givenName\":\"Guanyu\",\"familyName\":\"Zhou\",\"dateOfBirth\":\"1999-05-30\",\"nationality\":\"Chinese\"},\"Constructor\":{\"constructorId\":\"alfa\",\"url\":\"http:\\/\\/en.wikipedia.org\\/wiki\\/Alfa_Romeo_in_Formula_One\",\"name\":\"Alfa Romeo\",\"nationality\":\"Swiss\"},\"grid\":\"0\",\"laps\":\"0\",\"status\":\"Retired\"}]}]}}}"
  },
  {
    "path": "tests/utils/calculateWindDirection.test.ts",
    "content": "import { calculateWindDirection } from \"../../src/utils\";\n\ndescribe('Testing util file function calculateWindDirection ', () => {\n\n    test.each`\n    windDirection | expected\n    ${0}          | ${'N'}\n    ${22.5}       | ${'NNE'}\n    ${45}         | ${'NE'}\n    ${67.5}       | ${'ENE'}\n    ${90}         | ${'E'}\n    ${112.5}      | ${'ESE'}\n    ${135}        | ${'SE'}\n    ${157.5}      | ${'SSE'}\n    ${180}        | ${'S'}\n    ${202.5}      | ${'SSW'}\n    ${225}        | ${'SW'}\n    ${247.5}      | ${'WSW'}\n    ${270}        | ${'W'}\n    ${292.5}      | ${'WNW'}\n    ${315}        | ${'NW'}\n    ${337.5}      | ${'NNW'}\n    ${360}        | ${'N'}\n    `( 'Passing $windDirection should return $expected', ({ windDirection, expected }) => {\n        expect(calculateWindDirection(windDirection)).toBe(expected)\n    });\n});"
  },
  {
    "path": "tests/utils/checkConfig.test.ts",
    "content": "import { checkConfig } from '../../src/utils';\nimport { FormulaOneCardConfig } from '../../src/types/formulaone-card-types';\n\ndescribe('Testing util file function checkConfig', () => {\n    test('Passing empty config should throw error', () => {   \n        const config: FormulaOneCardConfig = {\n            type: ''\n        }\n\n        expect(() => checkConfig(config)).toThrowError('Please define FormulaOne card type (card_type).');\n    })\n})\n\n"
  },
  {
    "path": "tests/utils/getCircuitName.test.ts",
    "content": "import { getCircuitName } from '../../src/utils';\n\ndescribe('Testing util file function getCircuitName', () => {\n    test('Passing Japan should return expected circuit name', () => {         \n        expect(getCircuitName({\n            country: 'Japan',\n            lat: '',\n            long: '',\n            locality: ''\n        })).toBe('Japan')\n    }),\n    test('Passing UAE should return expected circuit name', () => {         \n        expect(getCircuitName({\n            country: 'UAE',\n            lat: '',\n            long: '',\n            locality: ''\n        })).toBe('Abu_Dhabi')\n    })\n})\n\n"
  },
  {
    "path": "tests/utils/getCountryFlagUrl.test.ts",
    "content": "// Mocks\nimport { createMock } from 'ts-auto-mock';\n\nimport { getCountryFlagByName } from '../../src/utils';\nimport * as countries from '../testdata/countries.json';\nimport RestCountryClient from '../../src/api/restcountry-client';\nimport { Country } from '../../src/types/rest-country-types';\nimport ImageClient from '../../src/api/image-client';\nimport { BaseCard } from '../../src/cards/base-card';\n\ndescribe('Testing util file function getCountryFlagUrl', () => {\n    \n    const card = createMock<BaseCard>();\n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n\n        jest.spyOn(FileReader.prototype, 'readAsDataURL').mockImplementation(() => null);\n        jest.spyOn(ImageClient.prototype, 'GetImage').mockImplementation((url: string) => {\n            return url;\n        });\n    });\n\n    test('Passing USA should return expected flag url', () => {         \n        expect(getCountryFlagByName(card, 'USA')).toBe('')\n    }),\n    test('Passing UAE should return expected flag url', () => {         \n        expect(getCountryFlagByName(card, 'UAE')).toBe('')\n    })\n})"
  },
  {
    "path": "tests/utils/getDriverName.test.ts",
    "content": "import { createMock } from 'ts-auto-mock';\nimport { Driver } from '../../src/api/f1-models';\nimport { FormulaOneCardConfig } from '../../src/types/formulaone-card-types';\nimport { getDriverName } from '../../src/utils';\n\ndescribe('Testing util file function getDriverName', () => {\n    const config = createMock<FormulaOneCardConfig>();\n    const driver: Driver = {\n        familyName: 'Verstappen',\n        givenName: 'Max',\n        permanentNumber: '1',\n        driverId: '',\n        code: 'VER',\n        url: '',\n        dateOfBirth: '',\n        nationality: ''\n    };\n\n    test('Passing driver and config with show_carnumber should return expected driver name', () => {            \n        expect(getDriverName(driver, config)).toBe('Max Verstappen')\n    }),\n    test('Passing driver and config with show_carnumber should return expected driver name', () => { \n        config.show_carnumber = true;           \n        expect(getDriverName(driver, config)).toBe('Max Verstappen #1')\n    })\n})\n\n"
  },
  {
    "path": "tests/utils/getRefreshTime.test.ts",
    "content": "import { getRefreshTime } from '../../src/utils';\nimport { MRData as scheduleData } from '../testdata/schedule.json'\nimport LocalStorageMock from '../testdata/localStorageMock';\n\ndescribe('Testing util file function getRefreshTime', () => {\n    \n    const localStorageMock = new LocalStorageMock();\n\n    beforeAll(() => {       \n        jest.useFakeTimers();\n        jest.setSystemTime(new Date(2022, 2, 1)); // Weird bug in jest setting this to the last of the month\n\n        const now = new Date();\n        const currentYear = now.getFullYear();\n        localStorageMock.setItem(`${currentYear}.json`, JSON.stringify({ data: JSON.stringify({ MRData: scheduleData }), created: new Date() }));       \n\n        Object.defineProperty(window, 'localStorage', { value: localStorageMock });\n    });\n\n    afterAll(() => {\n        jest.useRealTimers();\n    })\n\n    test('Calling getRefreshTime without data in localstorage should return 24', () => {   \n\n        const result = getRefreshTime(\"\");\n        expect(result).toBe(24);\n    }),\n    test('Calling getRefreshTime with data in localstorage should return 24', () => {   \n\n        localStorageMock.setItem('', JSON.stringify({ data: [], created: new Date(2022, 3, 1)}))\n\n        const result = getRefreshTime(\"\");\n        expect(result).toBe(24);\n    }),\n    test('Calling getRefreshTime with data in localstorage should return 1', () => {   \n\n        localStorageMock.setItem('', JSON.stringify({ data: [], created: new Date(2022, 2, 20, 10)}))\n\n        const result = getRefreshTime(\"\");\n        expect(result).toBe(1);\n    })\n})\n\n"
  },
  {
    "path": "tests/utils/getTeamImageUrl.test.ts",
    "content": "import { getTeamImage } from '../../src/utils';\nimport { MRData } from '../testdata/constructorStandings.json'\nimport 'isomorphic-fetch';\nimport { createMock } from 'ts-auto-mock';\nimport { BaseCard } from '../../src/cards/base-card';\n\ndescribe('Testing util file function renderHeader', () => {\n\n    const card = createMock<BaseCard>();\n    MRData.StandingsTable.StandingsLists[0].ConstructorStandings.forEach(constructor => {\n\n        const constructorName = constructor.Constructor.constructorId;\n        \n        test(`Calling getTeamImageUrl with ${constructorName} should return valid image`, async () => { \n\n            const imageUrl = getTeamImage(card, constructorName);\n            const result = await fetch(imageUrl);\n\n            expect(result.status).toBe(200);\n        });\n    })\n});"
  },
  {
    "path": "tests/utils/hasConfigOrEntitiesChanged.test.ts",
    "content": "import { PropertyValues } from \"lit\";\nimport { createMock } from \"ts-auto-mock\";\nimport FormulaOneCard from \"../../src\";\nimport { BaseCard } from \"../../src/cards/base-card\";\nimport { FormulaOneCardConfig } from \"../../src/types/formulaone-card-types\";\nimport { hasConfigOrCardValuesChanged } from '../../src/utils';\n\ndescribe('Testing util file function hasConfigOrEntitiesChanged', () => {\n    const config : FormulaOneCardConfig = {\n        type: ''\n    };    \n    const card = createMock<FormulaOneCard>();\n    const baseCard = createMock<BaseCard>();\n\n    test('Passing PropertyValues with config should return true', () => {\n        const props : PropertyValues = new Map([['config', config]]);\n\n        expect(hasConfigOrCardValuesChanged(card, props)).toBe(true);\n    }),\n    test('Passing PropertyValues empty should return false', () => {\n        const props : PropertyValues = new Map();\n\n        expect(hasConfigOrCardValuesChanged(card, props)).toBe(false);\n    }),\n    test('Passing PropertyValues config and card should return true', () => {\n        card.properties = new Map([['test', 'test']]);\n        const props : PropertyValues = new Map([['card', baseCard]]);\n\n        expect(hasConfigOrCardValuesChanged(card, props)).toBe(true);\n    }),\n    test('Passing PropertyValues config and cardValues should return true', () => {\n        const props : PropertyValues = new Map([['cardValues', new Map([['cardValues', 'test']])]]);\n\n        expect(hasConfigOrCardValuesChanged(card, props)).toBe(true);\n    })\n})"
  },
  {
    "path": "tests/utils/reduceArray.test.ts",
    "content": "import { reduceArray } from \"../../src/utils\";\n\ndescribe('reduceArray', () => {\n    it('should reduce the array to the size of the limit', () => {\n        const array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'];\n        const limit = 10;\n        const result = reduceArray(array, limit);\n\n        expect(result.length).toBe(limit);\n    });\n\n    it('should not reduce the array if the limit is greater than the array size', () => {\n        const array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'];\n        const limit = 20;\n        const result = reduceArray(array, limit);\n\n        expect(result.length).toBe(array.length);\n    });\n\n    it('should return an empty array if the array is empty', () => {\n        const array = [] as string[];\n        const limit = 20;\n        const result = reduceArray(array, limit);\n\n        expect(result.length).toBe(0);\n    });\n\n    it('should return an empty array if the array is undefined', () => {        \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any  \n        const limit = 20;\n        const result = reduceArray(undefined, limit);\n\n        expect(result.length).toBe(0);\n    });\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    it('should return an empty array if the limit is undefined', () => {\n        const array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'];\n        \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const result = reduceArray(array, undefined);\n\n        expect(result.length).toBe(12);\n    });\n});\n"
  },
  {
    "path": "tests/utils/renderHeader.test.ts",
    "content": "import { HomeAssistant } from \"custom-card-helpers\";\nimport { HTMLTemplateResult } from \"lit\";\nimport { createMock } from \"ts-auto-mock\";\nimport FormulaOneCard from \"../../src\";\nimport { Race } from \"../../src/api/f1-models\";\nimport { BaseCard } from \"../../src/cards/base-card\";\nimport { renderHeader } from \"../../src/utils\";\nimport { MRData } from '../testdata/results.json'\nimport { getRenderString } from \"../utils\";\nimport * as customCardHelper from \"custom-card-helpers\";\nimport { FormulaOneCardType } from \"../../src/types/formulaone-card-types\";\nimport RestCountryClient from \"../../src/api/restcountry-client\";\nimport { Country } from \"../../src/types/rest-country-types\";\nimport * as countries from '../testdata/countries.json'\n\ndescribe('Testing util file function renderHeader', () => {\n\n    const card = createMock<BaseCard>();\n    card.hass = createMock<HomeAssistant>();\n    card.parent = createMock<FormulaOneCard>();\n    const lastRace = <Race>MRData.RaceTable.Races[0];\n    \n    beforeAll(() => {\n        jest.spyOn(RestCountryClient.prototype, 'GetCountriesFromLocalStorage').mockImplementation(() => {\n            return countries as Country[];\n        });\n    });\n    \n    test('Calling renderHeader with image not clickable', async () => { \n        card.config.image_clickable = undefined;\n        \n        const result = renderHeader(card, lastRace);\n        const htmlResult = getRenderString(result);\n\n        expect(htmlResult).toMatch(`<h2 class=\"\"><img height=\"25\" src=\"\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"\" @action=_handleAction .actionHandler= class=\"\" /><br>`);\n    }),\n    test('Calling renderHeader with clickable image ', () => { \n        card.config.image_clickable = true;\n        card.config.f1_font = true;\n        \n        const result = renderHeader(card, lastRace);\n        const htmlResult = getRenderString(result);\n\n        expect(card.config.actions).toMatchObject({\n            tap_action: {\n              action: 'url',\n              url_path: 'http://en.wikipedia.org/wiki/Marina_Bay_Street_Circuit'\n            }\n          });\n\n        expect(htmlResult).toMatch(`<h2 class=\"formulaone-font\"><img height=\"25\" src=\"\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"\" @action=_handleAction .actionHandler= class=\" clickable\" /><br>`);\n    }),\n    test('Calling renderHeader with image not clickable and card countdown', async () => { \n        card.config.image_clickable = undefined;\n        card.config.card_type = FormulaOneCardType.Countdown;\n        \n        const result = renderHeader(card, lastRace);\n        const htmlResult = getRenderString(result);\n\n        expect(htmlResult).toMatch(`<img width=\"100%\" src=\"\" @action=_handleAction .actionHandler= class=\" clickable\" /><br>`);\n    }),\n    test('Calling renderHeader with actions', () => {\n\n        // handleAction\n        const spy = jest.spyOn(customCardHelper, 'handleAction');\n\n        card.config.actions = {\n            tap_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/0',\n            },\n            hold_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/1',\n            },\n            double_tap_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/2',\n            }\n        }\n        \n        const result = renderHeader(card, lastRace);\n\n        // eslint-disable-next-line @typescript-eslint/ban-types\n        const actionHandler = (result.values[1] as HTMLTemplateResult).values[1] as Function;\n        actionHandler({ detail: { action: 'tap' } });\n        actionHandler({ detail: { action: 'double_tap' } });\n        actionHandler({ detail: { action: 'hold' } });\n        \n        expect(customCardHelper.handleAction).toBeCalledTimes(3);\n\n        spy.mockClear();\n    }),\n    test('Calling renderHeader with actions', () => {\n\n        // handleAction\n        const spy = jest.spyOn(customCardHelper, 'handleAction');\n\n        card.config.actions = {\n            tap_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/0',\n            },\n            hold_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/1',\n            },\n            double_tap_action: {\n                action: 'navigate',\n                navigation_path: '/lovelace/2',\n            }\n        }\n        \n        const result = renderHeader(card, lastRace, true);\n\n        // eslint-disable-next-line @typescript-eslint/ban-types\n        const actionHandler = (result.values[1] as HTMLTemplateResult).values[1] as Function;\n        actionHandler({ detail: { action: 'tap' } });\n        actionHandler({ detail: { action: 'double_tap' } });\n        actionHandler({ detail: { action: 'hold' } });\n        \n        expect(customCardHelper.handleAction).toBeCalledTimes(0);\n\n        spy.mockClear();\n    }),\n    test('Calling renderHeader with config hide_tracklayout true', () => {\n        card.config.hide_tracklayout = true;\n        card.config.card_type = FormulaOneCardType.Results;\n        const result = renderHeader(card, lastRace);\n        const htmlResult = getRenderString(result);\n\n        expect(htmlResult).toMatch(`<h2 class=\"formulaone-font\"><img height=\"25\" src=\"\">&nbsp; 17 : Singapore Grand Prix</h2>`);\n    }),\n    test('Calling renderHeader with Miami with image not clickable', async () => { \n        card.config.image_clickable = undefined;\n        card.config.hide_tracklayout = false;\n        lastRace.Circuit.Location.country = \"USA\";\n        lastRace.Circuit.Location.locality = \"Miami\";\n        \n        const result = renderHeader(card, lastRace);\n        const htmlResult = getRenderString(result);\n\n        expect(htmlResult).toMatch(`<h2 class=\"formulaone-font\"><img height=\"25\" src=\"\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"\" @action=_handleAction .actionHandler= class=\" clickable\" /><br>`);\n    }),\n    test('Calling renderHeader with Imola  with image not clickable', async () => { \n        card.config.image_clickable = undefined;\n        card.config.hide_tracklayout = false;\n        lastRace.Circuit.Location.country = \"Italy\";\n        lastRace.Circuit.Location.locality = \"Imola\";\n        \n        const result = renderHeader(card, lastRace);\n        const htmlResult = getRenderString(result);\n\n        expect(htmlResult).toMatch(`<h2 class=\"formulaone-font\"><img height=\"25\" src=\"\">&nbsp; 17 : Singapore Grand Prix</h2> <img width=\"100%\" src=\"\" @action=_handleAction .actionHandler= class=\" clickable\" /><br>`);\n    })\n});\n"
  },
  {
    "path": "tests/utils/renderLastYearsResults.test.ts",
    "content": "import { HomeAssistant, NumberFormat, TimeFormat } from \"custom-card-helpers\";\nimport { createMock } from \"ts-auto-mock\";\nimport { BaseCard } from \"../../src/cards/base-card\";\nimport { renderLastYearsResults } from \"../../src/utils\";\nimport { getRenderStringAsyncIndex } from \"../utils\";\nimport { Race } from \"../../src/api/f1-models\";\nimport { MRData as resultData } from '../testdata/results.json'\n\ndescribe('Testing util file function renderLastYearsResults', () => {\n\n    const card = createMock<BaseCard>();\n    const hass = createMock<HomeAssistant>();\n    hass.locale = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    };\n\n    test('Given config with hide_raceinfo = false when raceinfo is rendered then raceinfo is rendered', async () => {\n        card.config.f1_font = false;\n        const result = renderLastYearsResults(card.config, resultData.RaceTable.Races[0] as Race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> Sergio Pérez (Red Bull) </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> George Russell (1:46.458) </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    }),\n    test('Given config with hide_raceinfo = false when raceinfo is rendered then raceinfo is rendered', async () => {\n        card.config.f1_font = true;\n\n        const result = renderLastYearsResults(card.config, resultData.RaceTable.Races[0] as Race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"formulaone-font\"></h1> <h2 class=\"formulaone-font\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> Sergio Pérez (Red Bull) </h2> <h3 class=\"formulaone-font\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> George Russell (1:46.458) </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    }),\n    test('Given config and data without fastest lap with hide_raceinfo = false when raceinfo is rendered then raceinfo is rendered', async () => {\n        card.config.f1_font = true;\n\n        const raceData = resultData.RaceTable.Races[0] as Race;\n        raceData.Results?.forEach(element => {\n            element.FastestLap = undefined;\n        });\n\n        const result = renderLastYearsResults(card.config, raceData);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"formulaone-font\"></h1> <h2 class=\"formulaone-font\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> Sergio Pérez (Red Bull) </h2> <h3 class=\"formulaone-font\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    })\n});"
  },
  {
    "path": "tests/utils/renderRaceInfo.test.ts",
    "content": "import { HomeAssistant, NumberFormat, TimeFormat } from 'custom-card-helpers';\nimport { createMock } from 'ts-auto-mock';\nimport fetchMock from \"jest-fetch-mock\";\nimport FormulaOneCard from '../../src';\nimport { Mrdata, Race } from '../../src/api/f1-models';\nimport { BaseCard } from '../../src/cards/base-card';\nimport { WeatherUnit } from '../../src/types/formulaone-card-types';\nimport { renderRaceInfo } from '../../src/utils';\nimport { getRenderString, getRenderStringAsyncIndex } from '../utils';\nimport { MRData as scheduleData } from '../testdata/schedule.json'\nimport { MRData as resultData } from '../testdata/results.json'\n\ndescribe('Testing util file function renderRaceInfo', () => {\n\n    const card = createMock<BaseCard>();\n    const hass = createMock<HomeAssistant>();\n    hass.locale = {\n        language: 'NL', \n        number_format: NumberFormat.comma_decimal,\n        time_format: TimeFormat.language\n    }\n    card.hass = hass;\n    card.parent = createMock<FormulaOneCard>();\n    const race : Race = {\n        season: '2021',\n        round: '1',\n        url: 'https://en.wikipedia.org/wiki/2021_Abu_Dhabi_Grand_Prix',\n        Sprint: {\n            date: '2021-12-11',\n            time: '15:00:00Z',\n        },\n        Qualifying: {\n            date: '2021-12-11',\n            time: '18:00:00Z',\n        },\n        FirstPractice: {\n            date: '2021-12-09',\n            time: '11:00:00Z',\n        },\n        SecondPractice: {\n            date: '2021-12-10',\n            time: '12:00:00Z',\n        },\n        time: '18:00:00Z',\n        date: '2021-12-12',\n        raceName: 'Abu Dhabi Grand Prix',\n        Circuit: {\n            circuitId: 'yas_marina',\n            url: 'http://en.wikipedia.org/wiki/Yas_Marina_Circuit',\n            circuitName: 'Yas Marina Circuit',\n            Location: {\n                lat: '24.4672',\n                long: '54.6031',\n                locality: 'Abu Dhabi',\n                country: 'United Arab Emirates',\n            }\n        },\n    };\n\n    test('Given config with hide_raceinfo = false when raceinfo is rendered then raceinfo is rendered', async () => {\n        card.config.hide_racedatetimes = false;\n\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    }),\n    test('Given config with hide_raceinfo = true when raceinfo is rendered then raceinfo is not rendered', () => {\n        card.config.hide_racedatetimes = true;\n        const result = renderRaceInfo(card, race);\n        const htmlResult = getRenderString(result);\n\n        expect(htmlResult).toBe('');\n    }),\n    test('Given config with hide_raceinfo = undefined when raceinfo is rendered then raceinfo is rendered', async () => {\n        card.config.hide_racedatetimes = undefined;\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    }),\n    test('Given config with show_weather = true and no weather options when raceinfo is rendered then weather is rendered', async () => {\n        card.config.hide_racedatetimes = false;\n        card.config.show_weather = true;\n\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    }),\n    test('Given config with show_weather = true and weather options without api key when raceinfo is rendered then weather is rendered', async () => {\n        card.config.hide_racedatetimes = false;\n        card.config.show_weather = true;\n        card.config.weather_options = {\n            api_key: undefined,\n        };\n\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    }),\n    test('Given config with show_weather = true and weather options unit metric when raceinfo is rendered then weather is rendered', async () => {\n        card.config.hide_racedatetimes = false;\n        card.config.show_weather = true;\n        card.config.weather_options = {\n            api_key: 'fakekey',\n            unit: WeatherUnit.Metric,\n        };\n\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    }),\n    test('Given config with show_weather = true and weather options unit MilesFahrenheit when raceinfo is rendered then weather is rendered', async () => {\n        card.config.hide_racedatetimes = false;\n        card.config.show_weather = true;\n        card.config.weather_options = {\n            api_key: 'fakekey',\n            unit: WeatherUnit.MilesFahrenheit,\n        };\n\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    }),\n    test('Given config with show_lastyears_result = true when raceinfo is rendered then last years result is rendered', async () => {\n        card.config.hide_racedatetimes = false;\n        card.config.show_lastyears_result = true;\n        jest.useFakeTimers();\n        \n        jest.setSystemTime(new Date(2022, 3, 20)); // Weird bug in jest setting this to the last of the month\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>scheduleData }));\n        fetchMock.mockResponseOnce(JSON.stringify({ MRData : <Mrdata>resultData }));\n\n        const result = renderRaceInfo(card, race);\n        const htmlResult = await getRenderStringAsyncIndex(result);\n\n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td class=\"text-center\"> <h1 class=\"\"></h1> <h2 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:trophy-outline\"></ha-icon> () </h2> <h3 class=\"\"> <ha-icon slot=\"icon\" icon=\"mdi:timer-outline\"></ha-icon> () </h3> </td> </tr> </table> </td> <tr><td colspan=\"5\">&nbsp;</td></tr><tr><td></td><td>12-12-21</td><td>&nbsp;</td><td></td><td align=\"right\">do 12:00</td></tr> <tr><td></td><td>1</td><td>&nbsp;</td><td></td><td align=\"right\">vr 13:00</td></tr> <tr><td></td><td>Abu Dhabi Grand Prix</td><td>&nbsp;</td><td></td><td align=\"right\">-</td></tr> <tr><td></td><td>Yas Marina Circuit</td><td>&nbsp;</td><td></td><td align=\"right\">za 19:00</td></tr> <tr><td></td><td>United Arab Emirates</td><td>&nbsp;</td><td></td><td align=\"right\">za 16:00</td></tr> <tr><td></td><td>Abu Dhabi</td><td>&nbsp;</td><td></td><td align=\"right\">zo 19:00</td></tr>');\n    })\n})"
  },
  {
    "path": "tests/utils/renderWeatherInfo.test.ts",
    "content": "import { createMock } from \"ts-auto-mock\";\nimport { Day, Hour } from \"../../src/api/weather-models\";\nimport { FormulaOneCardConfig, WeatherUnit } from \"../../src/types/formulaone-card-types\";\nimport { renderWeatherInfo } from \"../../src/utils\";\nimport { getRenderString } from '../utils';\n\ndescribe('Testing util file function renderWeatherInfo ', () => {\n    \n    const config = createMock<FormulaOneCardConfig>();\n    const weather = createMock<Day>();\n    weather.hours = [];\n    const hour = createMock<Hour>();\n    hour.winddir = 270;\n    hour.windspeed = 10;\n    hour.temp = 20;\n    hour.precip = 2;\n    hour.precipprob = 10;\n    weather.winddir = 270;\n    weather.windspeed = 10;\n    weather.temp = 20;\n    weather.precip = 2;\n    weather.precipprob = 10;\n    weather.hours.push(hour);\n\n    test('Given config with hide_weatherinfo = false when weatherinfo is rendered then weatherinfo is rendered', () => {\n        config.hide_weatherinfo = false;    \n\n        const result = renderWeatherInfo(weather, config, new Date(2021, 1, 1, 0, 0, 0));\n        const htmlResult = getRenderString(result);\n    \n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-windy\"></ha-icon> W mph</td> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-pouring\"></ha-icon> mm</td> <td><ha-icon slot=\"icon\" icon=\"mdi:cloud-percent-outline\"></ha-icon> %</td> </tr> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:clouds\"></ha-icon> %</td> <td><ha-icon slot=\"icon\" icon=\"mdi:thermometer-lines\"></ha-icon> °C</td> <td><ha-icon slot=\"icon\" icon=\"mdi:sun-thermometer\"></ha-icon> °C</td> </tr> </table> </td> </tr> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    }),\n    test('Given weatherData, config and raceDate when weatherinfo is rendered then weatherinfo is rendered', () => {\n        config.hide_weatherinfo = false;    \n\n        const result = renderWeatherInfo(weather, config, new Date(2021, 1, 1, 0, 0, 0));\n        const htmlResult = getRenderString(result);\n    \n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-windy\"></ha-icon> W mph</td> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-pouring\"></ha-icon> mm</td> <td><ha-icon slot=\"icon\" icon=\"mdi:cloud-percent-outline\"></ha-icon> %</td> </tr> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:clouds\"></ha-icon> %</td> <td><ha-icon slot=\"icon\" icon=\"mdi:thermometer-lines\"></ha-icon> °C</td> <td><ha-icon slot=\"icon\" icon=\"mdi:sun-thermometer\"></ha-icon> °C</td> </tr> </table> </td> </tr> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    }),\n    test('Given weatherData, config with unit metric unit and raceDate when weatherinfo is rendered then weatherinfo is rendered', () => {\n        config.hide_weatherinfo = false; \n        config.weather_options = { \n            unit: WeatherUnit.Metric\n        }\n\n        const result = renderWeatherInfo(weather, config, new Date(2021, 1, 1, 0, 0, 0));\n        const htmlResult = getRenderString(result);\n    \n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-windy\"></ha-icon> W km/h</td> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-pouring\"></ha-icon> mm</td> <td><ha-icon slot=\"icon\" icon=\"mdi:cloud-percent-outline\"></ha-icon> %</td> </tr> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:clouds\"></ha-icon> %</td> <td><ha-icon slot=\"icon\" icon=\"mdi:thermometer-lines\"></ha-icon> °C</td> <td><ha-icon slot=\"icon\" icon=\"mdi:sun-thermometer\"></ha-icon> °C</td> </tr> </table> </td> </tr> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    }),\n    test('Given weatherData, config with unit metric unit and raceDate when weatherinfo is rendered then weatherinfo is rendered', () => {\n        config.hide_weatherinfo = false; \n        config.weather_options = { \n            unit: WeatherUnit.MilesFahrenheit\n        }\n\n        const result = renderWeatherInfo(weather, config, new Date(2021, 1, 1, 0, 0, 0));\n        const htmlResult = getRenderString(result);\n    \n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-windy\"></ha-icon> W mph</td> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-pouring\"></ha-icon> mm</td> <td><ha-icon slot=\"icon\" icon=\"mdi:cloud-percent-outline\"></ha-icon> %</td> </tr> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:clouds\"></ha-icon> %</td> <td><ha-icon slot=\"icon\" icon=\"mdi:thermometer-lines\"></ha-icon> °F</td> <td><ha-icon slot=\"icon\" icon=\"mdi:sun-thermometer\"></ha-icon> °F</td> </tr> </table> </td> </tr> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    }),    \n    test('Given weatherData, config and raceDate when weatherinfo hours is undefined is rendered then weatherinfo is rendered', () => {\n        config.hide_weatherinfo = false;    \n        config.weather_options = { \n            unit: WeatherUnit.Metric\n        }\n\n        const weatherHoursUndefined = weather;\n        weatherHoursUndefined.hours = undefined as unknown as Hour[];\n        \n        const result = renderWeatherInfo(weatherHoursUndefined, config, new Date(2021, 1, 1, 0, 0, 0));\n        const htmlResult = getRenderString(result);\n    \n        expect(htmlResult).toBe('<tr> <td colspan=\"5\"> <table class=\"weather-info\"> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-windy\"></ha-icon> W km/h</td> <td><ha-icon slot=\"icon\" icon=\"mdi:weather-pouring\"></ha-icon> mm</td> <td><ha-icon slot=\"icon\" icon=\"mdi:cloud-percent-outline\"></ha-icon> %</td> </tr> <tr> <td><ha-icon slot=\"icon\" icon=\"mdi:clouds\"></ha-icon> %</td> <td><ha-icon slot=\"icon\" icon=\"mdi:thermometer-lines\"></ha-icon> °C</td> <td><ha-icon slot=\"icon\" icon=\"mdi:sun-thermometer\"></ha-icon> °C</td> </tr> </table> </td> </tr> <tr><td colspan=\"5\">&nbsp;</td></tr>');\n    })\n});\n"
  },
  {
    "path": "tests/utils.ts",
    "content": "import { HTMLTemplateResult } from \"lit\";\n\nexport const getRenderString = (data: HTMLTemplateResult) : string => {\n    \n    let returnHtml = '';\n    if(!data) {\n        return returnHtml;\n    }\n\n    const {strings, values} = data;\n\n    if(strings === undefined) {\n        return returnHtml;\n    }\n    \n    for(let i = 0; i < strings.length; i++) {\n        \n        returnHtml += strings[i];\n\n        if(typeof values[i] === 'string') {\n            returnHtml += values[i];\n        }\n        if(typeof values[i] === 'function') {\n            // eslint-disable-next-line @typescript-eslint/ban-types\n            returnHtml += (values[i] as Function).name;\n        }\n        else if(typeof values[i] === 'object') {\n            const templates = values[i] as HTMLTemplateResult[];\n            if(templates !== undefined && templates !== null) {\n                for(let i = 0; i < templates.length; i++) {\n                    returnHtml += getRenderString(templates[i] as HTMLTemplateResult);\n                }\n            }\n\n            const template = values[i] as HTMLTemplateResult;\n            if(template !== undefined && templates !== null) {\n                returnHtml += getRenderString(template);\n            }\n        } \n    }\n\n    return returnHtml.replace(/\\s\\s+/g, ' ');\n}\n\nexport const getRenderStringAsync = async (data: HTMLTemplateResult) : Promise<string> => {\n    \n    let returnHtml = '';\n    if(!data) {\n        return returnHtml;\n    }\n\n    const {strings, values} = data;\n\n    if(strings === undefined) {\n        return returnHtml;\n    }\n    \n    for(let i = 0; i < strings.length; i++) {\n        \n        returnHtml += strings[i];\n\n        if(typeof values[i] === 'string') {\n            returnHtml += values[i];\n        }\n        if(typeof values[i] === 'function') {\n            // eslint-disable-next-line @typescript-eslint/ban-types\n            returnHtml += (values[i] as Function).name;\n        }\n        else if(typeof values[i] === 'object') {\n            const templateResult = <HTMLTemplateResult>values[i];\n            if(templateResult) {\n\n                for(let i = 0; i < templateResult.values.length; i++) {\n                    if(templateResult.values[i] instanceof Promise) {\n                        const promise = <Promise<HTMLTemplateResult>>templateResult.values[i];\n                        \n                        const promiseResult = await promise;\n                        returnHtml += getRenderString(promiseResult)\n                    }\n                    else {\n                        const templates = templateResult.values[i] as HTMLTemplateResult[];\n                        if(templates !== undefined && templates !== null) {\n                            for(let i = 0; i < templates.length; i++) {\n                                returnHtml += getRenderString(templates[i])//, iteration + 1);\n                            }\n                        }\n\n                        const template = templateResult.values[i] as HTMLTemplateResult;\n                        if(template !== undefined && template !== null) {\n                            returnHtml += getRenderString(template)//, iteration + 1);\n                        }\n                    }\n                }\n            }\n        } \n    }\n\n    return returnHtml.replace(/\\s\\s+/g, ' ');\n}\n\nexport const getRenderStringAsyncIndex = async (data: HTMLTemplateResult) : Promise<string> => {\n    \n    // loop through the strings and values and build the html string iteratively\n    // if the value is a string, add it to the html string\n    // if the value is an object, check if it is a template result or an array of template results\n    // if it is a template result, call this function recursively\n    // if it is an array of template results, loop through the array and call this function recursively for each item\n    // if the value is a promise, await the promise and call this function recursively\n    // if the value is a function, add the function name to the html string\n    // if the value is undefined, add an empty string to the html string\n    // if the value is null, add an empty string to the html string\n    // if the value is a number, add the number to the html string\n    // if the value is a boolean, add the boolean to the html string\n    //\n\n    let returnHtml = '';\n    if(!data) {\n        return returnHtml;\n    }\n\n    const {strings, values} = data;\n\n    if(strings === undefined) {\n        return returnHtml;\n    }\n\n    for(let i = 0; i < strings.length; i++) {\n        \n        returnHtml += strings[i];\n\n        if(i >= values.length) {\n            continue;\n        }\n        \n        if(typeof values[i] === 'string') {\n            returnHtml += values[i];\n        }\n        else if(typeof values[i] === 'object') {\n            const templates = <HTMLTemplateResult[]>values[i];\n            if(templates !== undefined) {\n                \n                for(let j = 0; j < templates?.length; j++) {\n                    returnHtml += await getRenderStringAsyncIndex(templates[j]);\n                }\n            }      \n            \n            const templateResult = <HTMLTemplateResult>values[i];\n            for(let j = 0; j < templateResult?.values.length; j++) {\n                if(templateResult.values[j] instanceof Promise<HTMLTemplateResult>) {\n                    const promise = <Promise<HTMLTemplateResult>>templateResult.values[j];\n                    const promiseResult = await promise;\n                    returnHtml += await getRenderStringAsyncIndex(promiseResult);\n                }\n                else {\n                    returnHtml += await getRenderStringAsyncIndex(templateResult);\n                }\n            }\n        }\n    }\n\n    return returnHtml.replace(/\\s\\s+/g, ' ');\n}\n\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n      \"experimentalDecorators\": true,\n      \"module\": \"CommonJS\",\n      \"noImplicitAny\": true,\n      \"removeComments\": true,\n      \"resolveJsonModule\": true,\n      \"preserveConstEnums\": true,\n      \"sourceMap\": true,\n      \"moduleResolution\": \"Node\",\n      \"target\": \"es6\",\n      \"plugins\": [\n         { \"transform\": \"ts-auto-mock/transformer\", \"cacheBetweenTests\": false }\n      ],\n      \"paths\": {\n         \"jest-ts-auto-mock\": [\"../../index\"]\n      }\n    },\n    \"include\": [\"src/**/*\"],\n    \"exclude\": [\"node_modules\", \"**/*.spec.ts\"]\n  }"
  },
  {
    "path": "webpack.config.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\nconst compressionPlugin = require('compression-webpack-plugin');\n\nmodule.exports = {\n    mode: 'production',\n    entry: path.resolve(__dirname, 'src', 'index.ts'),\n    output: {\n        filename: 'formulaone-card.js',\n        path: path.resolve(__dirname),\n    },\n    optimization: {\n        minimize: true\n    },\n    module: {\n        rules: [\n            {\n                test: /\\.js$/,\n                exclude: /(node_modules)/,\n                use: {\n                    loader: 'babel-loader',\n                    options: {\n                        presets: ['@babel/preset-env'],\n                    },\n                },\n            },\n            {\n                test: /\\.(js|jsx|ts|tsx)$/,\n                use: [\n                  { loader: 'minify-html-literals-loader' }\n                ],\n            },\n            { test: /\\.tsx?$/, loader: \"ts-loader\" }\n        ],\n    },\n    plugins: [\n        new webpack.DefinePlugin({\n            'process.env.NODE_ENV': JSON.stringify('production'),\n        }),\n        new compressionPlugin({\n            test: /\\.js(\\?.*)?$/i,\n        }),\n    ],\n    resolve: {\n        extensions: ['.js', '.jsx', '.ts', '.tsx']\n    }\n};\n"
  }
]