<|start_filename|>src/data/hub/items/periodic-table-quiz.json<|end_filename|>
{
  "disabled": false,
  "id": "periodic-table-quiz",
  "title": "Periodic Table",
  "category": "quiz",
  "href": "/tests/periodic-table",
  "imageUrl": "/media/periodic-table-quiz.svg"
}


<|start_filename|>scripts/build-locales-coverage.js<|end_filename|>
const { readdirSync, writeFileSync } = require("fs");
const files = readdirSync(`${__dirname}/../src/locales`);

const locales = files.filter(
  (file) =>
    file !== "README.md" &&
    file !== "percentages.json" &&
    file !== "common.json"
);

const percentages = {};

const baseLocale = require("../src/locales/en.json");

const totalKeysCount = Object.keys(baseLocale).length;

for (let index = 0; index < locales.length; index++) {
  const currentLocale = locales[index];
  const data = require(`../src/locales/${currentLocale}`);

  const localeKeysCount = Object.keys(data).length;

  const percentage = (localeKeysCount / totalKeysCount) * 100;

  percentages[currentLocale.replace(".json", "")] = parseInt(percentage);
}

writeFileSync(
  `${__dirname}/../src/locales/percentages.json`,
  `${JSON.stringify(percentages, null, 2)}\n`,
  "utf8"
);


<|start_filename|>src/data/hub/items/unit-converter.json<|end_filename|>
{
  "disabled": true,
  "category": "tools",
  "id": "unit-converter",
  "title": "Unit Converter",
  "href": "/unit-converter",
  "imageUrl": "/media/unit-converter.svg"
}


<|start_filename|>src/data/hub/items/quizzes.json<|end_filename|>
{
  "disabled": false,
  "category": "learn",
  "id": "quizzes",
  "title": "Quizzes",
  "href": "/tests",
  "imageUrl": "/media/quizzes.svg"
}


<|start_filename|>src/data/hub/items/mass-calculator.json<|end_filename|>
{
  "disabled": false,
  "id": "mass-calculator",
  "title": "Mass Calculator",
  "category": "tools",
  "href": "/mass-calculator",
  "imageUrl": "/media/mass-calculator.svg"
}


<|start_filename|>src/data/hub/items/courses.json<|end_filename|>
{
  "disabled": true,
  "id": "resources",
  "title": "Resources",
  "category": "learn",
  "href": "/resources",
  "imageUrl": "/media/resources.svg"
}


<|start_filename|>src/data/elements/100.json<|end_filename|>
{
  "atomic": 100,
  "symbol": "Fm",
  "name": "Fermium",
  "atomicMass": 257,
  "cpkHexColor": "B31FBA",
  "electronicConfiguration": "[Rn] 5f12 7s2",
  "electronegativity": 1.3,
  "atomicRadius": null,
  "ionRadius": null,
  "vanDelWaalsRadius": null,
  "ionizationEnergy": 627,
  "electronAffinity": null,
  "oxidationStates": "2, 3",
  "standardState": null,
  "bondingType": null,
  "meltingPoint": 1800,
  "boilingPoint": null,
  "density": null,
  "group": "actinoids",
  "yearDiscovered": 1952,
  "valency": null,
  "wrongValences": [],
  "testState": {
    "valencesTest": false,
    "ptTest": true
  }
}

<|start_filename|>public/manifest.json<|end_filename|>
{
  "short_name": "Atom",
  "name": "Atom - Periodic Table & Quizzes",
  "description": "Learn the basics of chemistry doing the quizzes and using the periodic table.\n\nFEATURES:\n• Periodic table quiz\n• Chemical valences quiz\n• All the elements of the periodic table\n• Atomic number, atomic mass, electronic configuration, electronegativity, oxidation states, bonding type, melting point, boiling point, density, year of discovery and valency\n• Molar mass calculator\n\nThere will be more quizzes in the future!",
  "icons": [
    {
      "src": "/icons/android-chrome-192x192.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "any"
    },
    {
      "src": "/icons/android-chrome-512x512.png",
      "sizes": "512x512",
      "type": "image/png",
      "purpose": "any"
    },
    {
      "src": "/icons/android-chrome-192x192-mask.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "maskable"
    },
    {
      "src": "/icons/android-chrome-512x512-mask.png",
      "sizes": "512x512",
      "type": "image/png",
      "purpose": "maskable"
    }
  ],
  "screenshots": [
    {
      "src": "/screenshots/phone/1-pt.png",
      "sizes": "1080x1920",
      "platform": "narrow",
      "label": "Periodic table with all the elements at your fingertips"
    },
    {
      "src": "/screenshots/phone/2-ptinfo.png",
      "sizes": "1080x1920",
      "platform": "narrow",
      "label": "Look up available data of any element"
    },
    {
      "src": "/screenshots/phone/3-ptquiz.png",
      "sizes": "1080x1920",
      "platform": "narrow",
      "label": "Complete the periodic table to learn the position of all elements"
    },
    {
      "src": "/screenshots/phone/4-masscalc.png",
      "sizes": "1080x1920",
      "platform": "narrow",
      "label": "Use the calculator to find the mass of your formulas"
    },
    {
      "src": "/screenshots/phone/5-valencyquiz.png",
      "sizes": "1080x1920",
      "platform": "narrow",
      "label": "Learn the valences practicing with the quiz"
    },
    {
      "src": "/screenshots/phone/6-quizsettings.png",
      "sizes": "1080x1920",
      "platform": "narrow",
      "label": "Select the elements you need to learn in each test"
    },
    {
      "src": "/screenshots/desktop/1-pt.png",
      "sizes": "1920x1080",
      "platform": "wide",
      "label": "Periodic table with all the elements at your fingertips"
    },
    {
      "src": "/screenshots/desktop/2-ptinfo.png",
      "sizes": "1920x1080",
      "platform": "wide",
      "label": "Look up available data of any element"
    },
    {
      "src": "/screenshots/desktop/3-ptquiz.png",
      "sizes": "1920x1080",
      "platform": "wide",
      "label": "Complete the periodic table to learn the position of all elements"
    },
    {
      "src": "/screenshots/desktop/4-masscalc.png",
      "sizes": "1920x1080",
      "platform": "wide",
      "label": "Use the calculator to find the mass of your formulas"
    },
    {
      "src": "/screenshots/desktop/5-valencyquiz.png",
      "sizes": "1920x1080",
      "platform": "wide",
      "label": "Learn the valences practicing with the quiz"
    },
    {
      "src": "/screenshots/desktop/6-quizsettings.png",
      "sizes": "1920x1080",
      "platform": "wide",
      "label": "Select the elements you need to learn in each test"
    }
  ],
  "categories": ["education"],
  "start_url": "/",
  "display": "standalone",
  "background_color": "#193132",
  "theme_color": "#193132"
}


<|start_filename|>src/data/hub/items/periodic-table.json<|end_filename|>
{
  "disabled": false,
  "id": "periodic-table",
  "title": "Periodic Table",
  "category": "tools",
  "colSpan": 2,
  "imageUrl": "/media/periodic-table.svg",
  "href": "/periodic-table"
}


<|start_filename|>scripts/locales-coverage-description.js<|end_filename|>
const fs = require("fs");

const THRESSHOLD = 85;

const crowdinMap = {
  ar_SA: "en-ar",
  bg_BG: "en-bg",
  ca_ES: "en-ca",
  de: "en-de",
  de_DE: "en-de",
  el_GR: "en-el",
  es: "en-es",
  es_ES: "en-es",
  fa_IR: "en-fa",
  fi_FI: "en-fi",
  fr_FR: "en-fr",
  he_IL: "en-he",
  hi_IN: "en-hi",
  hu_HU: "en-hu",
  id_ID: "en-id",
  it_IT: "en-it",
  ja_JP: "en-ja",
  kab_KAB: "en-kab",
  ko_KR: "en-ko",
  my_MM: "en-my",
  nb_NO: "en-nb",
  nl_NL: "en-nl",
  nn_NO: "en-nnno",
  pa_IN: "en-pain",
  pl_PL: "en-pl",
  pt_BR: "en-ptbr",
  pt_PT: "en-pt",
  ro: "en-ro",
  ro_RO: "en-ro",
  ru_RU: "en-ru",
  sk_SK: "en-sk",
  sv_SE: "en-sv",
  tr_TR: "en-tr",
  uk_UA: "en-uk",
  zh_CN: "en-zhcn",
  zh_TW: "en-zhtw",
};

const flags = {
  ar_SA: "🇸🇦",
  bg_BG: "🇧🇬",
  ca_ES: "🏳",
  de: "🇩🇪",
  de_DE: "🇩🇪",
  el_GR: "🇬🇷",
  es: "🇪🇸",
  es_ES: "🇪🇸",
  fa_IR: "🇮🇷",
  fi_FI: "🇫🇮",
  fr_FR: "🇫🇷",
  he_IL: "🇮🇱",
  hi_IN: "🇮🇳",
  hu_HU: "🇭🇺",
  id_ID: "🇮🇩",
  it_IT: "🇮🇹",
  ja_JP: "🇯🇵",
  kab_KAB: "🏳",
  ko_KR: "🇰🇷",
  my_MM: "🇲🇲",
  nb_NO: "🇳🇴",
  nl_NL: "🇳🇱",
  nn_NO: "🇳🇴",
  pa_IN: "🇮🇳",
  pl_PL: "🇵🇱",
  pt_BR: "🇧🇷",
  pt_PT: "🇵🇹",
  ro: "🇷🇴",
  ro_RO: "🇷🇴",
  ru_RU: "🇷🇺",
  sk_SK: "🇸🇰",
  sv_SE: "🇸🇪",
  tr_TR: "🇹🇷",
  uk_UA: "🇺🇦",
  zh_CN: "🇨🇳",
  zh_TW: "🇹🇼",
};

const languages = {
  ar_SA: "العربية",
  bg_BG: "Български",
  ca_ES: "Català",
  de: "Deutsch",
  de_DE: "Deutsch",
  el_GR: "Ελληνικά",
  es: "Español",
  es_ES: "Español",
  fa_IR: "فارسی",
  fi_FI: "Suomi",
  fr_FR: "Français",
  he_IL: "עברית",
  hi_IN: "हिन्दी",
  hu_HU: "Magyar",
  id_ID: "Bahasa Indonesia",
  it_IT: "Italiano",
  ja_JP: "日本語",
  kab_KAB: "Taqbaylit",
  ko_KR: "한국어",
  my_MM: "Burmese",
  nb_NO: "Norsk bokmål",
  nl_NL: "Nederlands",
  nn_NO: "Norsk nynorsk",
  pa_IN: "ਪੰਜਾਬੀ",
  pl_PL: "Polski",
  pt_BR: "Português Brasileiro",
  pt_PT: "Português",
  ro: "Română",
  ro_RO: "Română",
  ru_RU: "Русский",
  sk_SK: "Slovenčina",
  sv_SE: "Svenska",
  tr_TR: "Türkçe",
  uk_UA: "Українська",
  zh_CN: "简体中文",
  zh_TW: "繁體中文",
};

const percentages = fs.readFileSync(
  `${__dirname}/../src/locales/percentages.json`
);
const rowData = JSON.parse(percentages);

const coverages = Object.entries(rowData)
  .sort(([, a], [, b]) => b - a)
  .reduce((r, [k, v]) => ({ ...r, [k]: v }), {});

const boldIf = (text, condition) => (condition ? `**${text}**` : text);

const printHeader = () => {
  let result = "| | Flag | Locale | % |\n";
  result += "| :--: | :--: | -- | :--: |";
  return result;
};

const printRow = (id, locale, coverage) => {
  const isOver = coverage >= THRESSHOLD;
  let result = `| ${isOver ? id : "..."} | `;
  result += `${locale in flags ? flags[locale] : ""} | `;
  const language = locale in languages ? languages[locale] : locale;
  if (locale in crowdinMap && crowdinMap[locale]) {
    result += `[${boldIf(
      language,
      isOver
    )}](https://crowdin.com/translate/atom-periodic-table-quizzes/8/${
      crowdinMap[locale]
    }) | `;
  } else {
    result += `${boldIf(language, isOver)} | `;
  }
  result += `${coverage === 100 ? "💯" : boldIf(coverage, isOver)} |`;
  return result;
};

console.info(
  `Each language must be at least **${THRESSHOLD}%** translated in order to appear on Atom. Join us on [Crowdin](https://crowdin.com/project/atom-periodic-table-quizzes) and help us translate your own language. **Can't find yours yet?** Open an [issue](https://github.com/HorusGoul/atom-pwa/issues/new) and we'll add it to the list.`
);
console.info("\n\r");
console.info(printHeader());
let index = 1;
for (const coverage in coverages) {
  if (coverage === "en") {
    continue;
  }
  console.info(printRow(index, coverage, coverages[coverage]));
  index++;
}
console.info("\n\r");
console.info("\\* Languages in **bold** are going to appear on production.");


<|start_filename|>src/data/elements/86.json<|end_filename|>
{
  "atomic": 86,
  "symbol": "Rn",
  "name": "Radon",
  "atomicMass": 222,
  "cpkHexColor": 428296,
  "electronicConfiguration": "[Xe] 4f14 5d10 6s2 6p6",
  "electronegativity": null,
  "atomicRadius": 120,
  "ionRadius": null,
  "vanDelWaalsRadius": null,
  "ionizationEnergy": 1037,
  "electronAffinity": null,
  "oxidationStates": 2,
  "standardState": "gas",
  "bondingType": "atomic",
  "meltingPoint": "202",
  "boilingPoint": "211.4",
  "density": 0.01,
  "group": "noble_gases",
  "yearDiscovered": 1900,
  "valency": "0 +2 +6",
  "wrongValences": [],
  "testState": {
    "valencesTest": false,
    "ptTest": true
  }
}

<|start_filename|>workbox-config.js<|end_filename|>
module.exports = {
  globDirectory: "dist/",
  globPatterns: ["**/*.{svg,png,css,js,xml,ico,html,json,txt}"],
  globIgnores: ["**/screenshots/**/*.{png,jpg,jpeg}"],
  swDest: "dist/sw.js",
};


<|start_filename|>src/data/hub/items/valency-quiz.json<|end_filename|>
{
  "disabled": false,
  "id": "valency-quiz",
  "href": "/tests/valences",
  "category": "quiz",
  "title": "Valency Quiz",
  "imageUrl": "/media/valency-quiz.svg"
}
