@tgwf/co2 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CONTRIBUTING.md +10 -10
  2. package/dist/cjs/1byte.js.map +1 -1
  3. package/dist/cjs/co2.js +38 -13
  4. package/dist/cjs/co2.js.map +2 -2
  5. package/dist/cjs/constants/index.js +4 -1
  6. package/dist/cjs/constants/index.js.map +2 -2
  7. package/dist/cjs/data/average-intensities.min.js +1 -1
  8. package/dist/cjs/data/average-intensities.min.js.map +2 -2
  9. package/dist/cjs/data/marginal-intensities-2021.min.js.map +2 -2
  10. package/dist/cjs/helpers/index.js +78 -38
  11. package/dist/cjs/helpers/index.js.map +2 -2
  12. package/dist/cjs/hosting-api.js +10 -4
  13. package/dist/cjs/hosting-api.js.map +2 -2
  14. package/dist/cjs/hosting-json.js.map +1 -1
  15. package/dist/cjs/hosting-json.node.js +4 -1
  16. package/dist/cjs/hosting-json.node.js.map +2 -2
  17. package/dist/cjs/hosting-node.js +35 -12
  18. package/dist/cjs/hosting-node.js.map +2 -2
  19. package/dist/cjs/hosting.js +4 -1
  20. package/dist/cjs/hosting.js.map +2 -2
  21. package/dist/cjs/index-node.js +4 -1
  22. package/dist/cjs/index-node.js.map +2 -2
  23. package/dist/cjs/index.js +4 -1
  24. package/dist/cjs/index.js.map +2 -2
  25. package/dist/cjs/sustainable-web-design-v3.js +30 -10
  26. package/dist/cjs/sustainable-web-design-v3.js.map +1 -1
  27. package/dist/cjs/sustainable-web-design-v4.js.map +2 -2
  28. package/dist/esm/co2.js +34 -13
  29. package/dist/esm/data/average-intensities.min.js +1 -1
  30. package/dist/esm/helpers/index.js +78 -38
  31. package/dist/esm/hosting-api.js +6 -4
  32. package/dist/esm/hosting-json.js +0 -1
  33. package/dist/esm/hosting.js +0 -1
  34. package/dist/esm/sustainable-web-design-v3.js +30 -11
  35. package/dist/esm/sustainable-web-design-v4.js +0 -1
  36. package/package.json +2 -2
package/CONTRIBUTING.md CHANGED
@@ -9,17 +9,17 @@ Thank you for considering contributing to CO2.js. Open source is at the heart of
9
9
  **NB** Changes/commits that are not linked to an issue will not be accepted.
10
10
 
11
11
  ### New issues
12
- - Our issue template provides you with a scaffold to follow when raising a new issue. There are three formats to choose from:
13
- 1. *Bugs* - clearly describe the problem you're facing including steps to reproduce it. Please also be sure to include the information about the environment your code was running in (e.g. NodeJS, Deno, Edge Worker, Browser etc).
14
- 1. *New features* - clearly describe the new feature you'd like to see added and provide a reason for why it should be added. eg what will be improved/possible as a result of making your suggested change.
15
- 1. *Request addition of carbon estimation model to CO2.js* - please provide as much information about the model as possible including links to additional documentation and information about how the model is licensed.
16
-
17
12
 
13
+ - Our issue template provides you with a scaffold to follow when raising a new issue. There are three formats to choose from:
14
+ 1. _Bugs_ - clearly describe the problem you're facing including steps to reproduce it. Please also be sure to include the information about the environment your code was running in (e.g. NodeJS, Deno, Edge Worker, Browser etc).
15
+ 1. _New features_ - clearly describe the new feature you'd like to see added and provide a reason for why it should be added. eg what will be improved/possible as a result of making your suggested change.
16
+ 1. _Request addition of carbon estimation model to CO2.js_ - please provide as much information about the model as possible including links to additional documentation and information about how the model is licensed.
18
17
 
19
18
  ## Making Changes
20
19
 
21
20
  - Fork the repository on GitHub.
22
21
  - Create a topic branch from where you want to base your work. This branch should usually be based off `main`.
22
+ - Remember to add JSDoc comments to any new functions or variables that you are introducing into the codebase.
23
23
  - Make commits of logical units.
24
24
  - Make commit messages clear and understandable.
25
25
 
@@ -28,10 +28,10 @@ Thank you for considering contributing to CO2.js. Open source is at the heart of
28
28
  - Push the changes made in your branch to your fork of this repository.
29
29
  - Submit a [pull request](https://github.com/thegreenwebfoundation/co2.js/pulls) to the CO2.js repository in the `thegreenwebfoundation` organization.
30
30
  - When opening a new pull request, you'll see a template. Please follow it. It asks you to state:
31
- - the type of change (choose from a list)
32
- - link to the related issue
33
- - what documentation needs updating as a result (choose from a list)
34
- - what your changes are - be sure to clearly explain the changes you've made, any new files, dependencies, or network requests that have been added, and provide any additional context to help reviewers understand the changes made.
31
+ - the type of change (choose from a list)
32
+ - link to the related issue
33
+ - what documentation needs updating as a result (choose from a list)
34
+ - what your changes are - be sure to clearly explain the changes you've made, any new files, dependencies, or network requests that have been added, and provide any additional context to help reviewers understand the changes made.
35
35
  - Your pull request will be reviewed by a maintainer from Green Web Foundation.
36
36
  - After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request if it isn't showing any activity.
37
37
 
@@ -43,4 +43,4 @@ Please note that this project is released with a [Contributor Code of Conduct](h
43
43
 
44
44
  ## Thank you
45
45
 
46
- Again, thank you for your contributions. We appreciate your help improving CO2.js, and we look forward to your future contributions!
46
+ Again, thank you for your contributions. We appreciate your help improving CO2.js, and we look forward to your future contributions!
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/1byte.js"],
4
4
  "sourcesContent": ["// Use the 1byte model for now from the Shift Project, and assume a US grid mix figure they use of around 519 g co2 for the time being. It's lower for Europe, and in particular, France, but for v1, we don't include this\nconst CO2_PER_KWH_IN_DC_GREY = 519;\n\n// this figure is from the IEA's 2018 report for a global average:\nconst CO2_PER_KWH_NETWORK_GREY = 475;\n\n// TODO - these figures need to be updated, as the figures for green\n// shouldn't really be zero now we know that carbon intensity figures\n// for renewables still usually include the life cycle emissions\nconst CO2_PER_KWH_IN_DC_GREEN = 0;\n\n// the 1 byte model gives figures for energy usage for:\n\n// datacentres\n// networks\n// the device used to access a site/app\n\n// The device usage figure combines figures for:\n// 1. the usage for devices (which is small proportion of the energy use)\n// 2. the *making* the device, which is comparatively high.\n\nconst KWH_PER_BYTE_IN_DC = 7.2e-11;\n\n// this is probably best left as something users can define, or\n// a weighted average based on total usage.\n// Using a simple mean for now, as while web traffic to end users might trend\n// towards wifi and mobile,\n// Web traffic between servers is likely wired networks\n\nconst FIXED_NETWORK_WIRED = 4.29e-10;\nconst FIXED_NETWORK_WIFI = 1.52e-10;\nconst FOUR_G_MOBILE = 8.84e-10;\n\n// Pull requests gratefully accepted\nconst KWH_PER_BYTE_FOR_NETWORK =\n (FIXED_NETWORK_WIRED + FIXED_NETWORK_WIFI + FOUR_G_MOBILE) / 3;\n\nconst KWH_PER_BYTE_FOR_DEVICES = 1.3e-10;\n\nclass OneByte {\n constructor(options) {\n this.allowRatings = false;\n this.options = options;\n\n this.KWH_PER_BYTE_FOR_NETWORK = KWH_PER_BYTE_FOR_NETWORK;\n }\n\n /**\n * Calculates the carbon footprint of a website using the OneByte model\n * @param {number} bytes - The number of bytes to calculate the carbon footprint for\n * @param {boolean} green - Whether the energy is green or not\n * @returns {number} The carbon footprint in grams of CO2\n */\n\n perByte(bytes, green) {\n if (bytes < 1) {\n return 0;\n }\n\n if (green) {\n // if we have a green datacentre, use the lower figure for renewable energy\n const Co2ForDC = bytes * KWH_PER_BYTE_IN_DC * CO2_PER_KWH_IN_DC_GREEN;\n\n // but for the worest of the internet, we can't easily check, so assume\n // grey for now\n const Co2forNetwork =\n bytes * KWH_PER_BYTE_FOR_NETWORK * CO2_PER_KWH_NETWORK_GREY;\n\n return Co2ForDC + Co2forNetwork;\n }\n\n const KwHPerByte = KWH_PER_BYTE_IN_DC + KWH_PER_BYTE_FOR_NETWORK;\n return bytes * KwHPerByte * CO2_PER_KWH_IN_DC_GREY;\n }\n}\n\nexport { OneByte };\nexport default OneByte;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,MAAM,yBAAyB;AAG/B,MAAM,2BAA2B;AAKjC,MAAM,0BAA0B;AAYhC,MAAM,qBAAqB;AAQ3B,MAAM,sBAAsB;AAC5B,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AAGtB,MAAM,2BACH,uBAAsB,qBAAqB,iBAAiB;AAE/D,MAAM,2BAA2B;AAEjC,MAAM,QAAQ;AAAA,EACZ,YAAY,SAAS;AACnB,SAAK,eAAe;AACpB,SAAK,UAAU;AAEf,SAAK,2BAA2B;AAAA,EAClC;AAAA,EASA,QAAQ,OAAO,OAAO;AACpB,QAAI,QAAQ,GAAG;AACb,aAAO;AAAA,IACT;AAEA,QAAI,OAAO;AAET,YAAM,WAAW,QAAQ,qBAAqB;AAI9C,YAAM,gBACJ,QAAQ,2BAA2B;AAErC,aAAO,WAAW;AAAA,IACpB;AAEA,UAAM,aAAa,qBAAqB;AACxC,WAAO,QAAQ,aAAa;AAAA,EAC9B;AACF;AAGA,IAAO,eAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,MAAM,yBAAyB;AAG/B,MAAM,2BAA2B;AAKjC,MAAM,0BAA0B;AAYhC,MAAM,qBAAqB;AAQ3B,MAAM,sBAAsB;AAC5B,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AAGtB,MAAM,4BACH,sBAAsB,qBAAqB,iBAAiB;AAE/D,MAAM,2BAA2B;AAEjC,MAAM,QAAQ;AAAA,EACZ,YAAY,SAAS;AACnB,SAAK,eAAe;AACpB,SAAK,UAAU;AAEf,SAAK,2BAA2B;AAAA,EAClC;AAAA,EASA,QAAQ,OAAO,OAAO;AACpB,QAAI,QAAQ,GAAG;AACb,aAAO;AAAA,IACT;AAEA,QAAI,OAAO;AAET,YAAM,WAAW,QAAQ,qBAAqB;AAI9C,YAAM,gBACJ,QAAQ,2BAA2B;AAErC,aAAO,WAAW;AAAA,IACpB;AAEA,UAAM,aAAa,qBAAqB;AACxC,WAAO,QAAQ,aAAa;AAAA,EAC9B;AACF;AAGA,IAAO,eAAQ;",
6
6
  "names": []
7
7
  }
package/dist/cjs/co2.js CHANGED
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var co2_exports = {};
23
26
  __export(co2_exports, {
@@ -41,19 +44,25 @@ class CO2 {
41
44
  this.model = new import_sustainable_web_design_v4.default();
42
45
  }
43
46
  } else if (options == null ? void 0 : options.model) {
44
- throw new Error(`"${options.model}" is not a valid model. Please use "1byte" for the OneByte model, and "swd" for the Sustainable Web Design model.
45
- See https://developers.thegreenwebfoundation.org/co2js/models/ to learn more about the models available in CO2.js.`);
47
+ throw new Error(
48
+ `"${options.model}" is not a valid model. Please use "1byte" for the OneByte model, and "swd" for the Sustainable Web Design model.
49
+ See https://developers.thegreenwebfoundation.org/co2js/models/ to learn more about the models available in CO2.js.`
50
+ );
46
51
  }
47
52
  if ((options == null ? void 0 : options.rating) && typeof options.rating !== "boolean") {
48
- throw new Error(`The rating option must be a boolean. Please use true or false.
49
- See https://developers.thegreenwebfoundation.org/co2js/options/ to learn more about the options available in CO2.js.`);
53
+ throw new Error(
54
+ `The rating option must be a boolean. Please use true or false.
55
+ See https://developers.thegreenwebfoundation.org/co2js/options/ to learn more about the options available in CO2.js.`
56
+ );
50
57
  }
51
58
  const allowRatings = !!this.model.allowRatings;
52
59
  this._segment = (options == null ? void 0 : options.results) === "segment";
53
60
  this._rating = (options == null ? void 0 : options.rating) === true;
54
61
  if (!allowRatings && this._rating) {
55
- throw new Error(`The rating system is not supported in the model you are using. Try using the Sustainable Web Design model instead.
56
- See https://developers.thegreenwebfoundation.org/co2js/models/ to learn more about the models available in CO2.js.`);
62
+ throw new Error(
63
+ `The rating system is not supported in the model you are using. Try using the Sustainable Web Design model instead.
64
+ See https://developers.thegreenwebfoundation.org/co2js/models/ to learn more about the models available in CO2.js.`
65
+ );
57
66
  }
58
67
  }
59
68
  perByte(bytes, green = false) {
@@ -64,8 +73,10 @@ See https://developers.thegreenwebfoundation.org/co2js/models/ to learn more abo
64
73
  if ((_a = this.model) == null ? void 0 : _a.perVisit) {
65
74
  return this.model.perVisit(bytes, green, this._segment, this._rating);
66
75
  } else {
67
- throw new Error(`The perVisit() method is not supported in the model you are using. Try using perByte() instead.
68
- See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more about the methods available in CO2.js.`);
76
+ throw new Error(
77
+ `The perVisit() method is not supported in the model you are using. Try using perByte() instead.
78
+ See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more about the methods available in CO2.js.`
79
+ );
69
80
  }
70
81
  }
71
82
  perByteTrace(bytes, green = false, options = {}) {
@@ -78,7 +89,13 @@ See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more ab
78
89
  ...otherVariables
79
90
  } = traceVariables;
80
91
  return {
81
- co2: this.model.perByte(bytes, green, this._segment, this._rating, adjustments),
92
+ co2: this.model.perByte(
93
+ bytes,
94
+ green,
95
+ this._segment,
96
+ this._rating,
97
+ adjustments
98
+ ),
82
99
  green,
83
100
  variables: {
84
101
  description: "Below are the variables used to calculate this CO2 estimate.",
@@ -97,7 +114,13 @@ See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more ab
97
114
  const adjustments = (0, import_helpers.parseOptions)(options, this.model.version, green);
98
115
  const { gridIntensity, ...variables } = adjustments;
99
116
  return {
100
- co2: this.model.perVisit(bytes, green, this._segment, this._rating, adjustments),
117
+ co2: this.model.perVisit(
118
+ bytes,
119
+ green,
120
+ this._segment,
121
+ this._rating,
122
+ adjustments
123
+ ),
101
124
  green,
102
125
  variables: {
103
126
  description: "Below are the variables used to calculate this CO2 estimate.",
@@ -110,8 +133,10 @@ See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more ab
110
133
  }
111
134
  };
112
135
  } else {
113
- throw new Error(`The perVisitTrace() method is not supported in the model you are using. Try using perByte() instead.
114
- See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more about the methods available in CO2.js.`);
136
+ throw new Error(
137
+ `The perVisitTrace() method is not supported in the model you are using. Try using perByte() instead.
138
+ See https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more about the methods available in CO2.js.`
139
+ );
115
140
  }
116
141
  }
117
142
  SustainableWebDesignV3() {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/co2.js"],
4
4
  "sourcesContent": ["\"use strict\";\n\n/**\n * @typedef {Object} CO2EstimateTraceResultPerByte\n * @property {number|CO2EstimateComponentsPerByte} co2 - The CO2 estimate in grams or its separate components\n * @property {boolean} green - Whether the domain is green or not\n * @property {TraceResultVariablesPerByte} variables - The variables used to calculate the CO2 estimate\n */\n\n/**\n * @typedef {Object} CO2EstimateTraceResultPerVisit\n * @property {number|CO2EstimateComponentsPerVisit} co2 - The CO2 estimate in grams or its separate components\n * @property {boolean} green - Whether the domain is green or not\n * @property {TraceResultVariablesPerVisit} variables - The variables used to calculate the CO2 estimate\n */\n\n/**\n * @typedef {Object} TraceResultVariablesPerByte\n * @property {GridIntensityVariables} gridIntensity - The grid intensity related variables\n */\n/**\n * @typedef {Object} TraceResultVariablesPerVisit\n * @property {GridIntensityVariables} gridIntensity - The grid intensity related variables\n * @property {number} dataReloadRatio - What percentage of a page is reloaded on each subsequent page view\n * @property {number} firstVisitPercentage - What percentage of visits are loading this page for subsequent times\n * @property {number} returnVisitPercentage - What percentage of visits are loading this page for the second or more time\n */\n\n/**\n * @typedef {Object} GridIntensityVariables\n * @property {string} description - The description of the variables\n * @property {number} network - The network grid intensity set by the user or the default\n * @property {number} dataCenter - The data center grid intensity set by the user or the default\n * @property {number} device - The device grid intensity set by the user or the default\n * @property {number} production - The production grid intensity set by the user or the default\n */\n\n/**\n * @typedef {Object} CO2EstimateComponentsPerByte\n * @property {number} networkCO2 - The CO2 estimate for networking in grams\n * @property {number} dataCenterCO2 - The CO2 estimate for data centers in grams\n * @property {number} consumerDeviceCO2 - The CO2 estimate for consumer devices in grams\n * @property {number} productionCO2 - The CO2 estimate for device production in grams\n * @property {string} rating - The rating of the CO2 estimate based on the Sustainable Web Design Model\n * @property {number} total - The total CO2 estimate in grams\n */\n\n/**\n * @typedef {Object} CO2EstimateComponentsPerVisit\n * @property {number} 'networkCO2 - first' - The CO2 estimate for networking in grams on first visit\n * @property {number} 'networkCO2 - subsequent' - The CO2 estimate for networking in grams on subsequent visits\n * @property {number} 'dataCenterCO2 - first' - The CO2 estimate for data centers in grams on first visit\n * @property {number} 'dataCenterCO2 - subsequent' - The CO2 estimate for data centers in grams on subsequent visits\n * @property {number} 'consumerDeviceCO2 - first' - The CO2 estimate for consumer devices in grams on first visit\n * @property {number} 'consumerDeviceCO2 - subsequent' - The CO2 estimate for consumer devices in grams on subsequent visits\n * @property {number} 'productionCO2 - first' - The CO2 estimate for device production in grams on first visit\n * @property {number} 'productionCO2 - subsequent' - The CO2 estimate for device production in grams on subsequent visits\n * @property {string} rating - The rating of the CO2 estimate based on the Sustainable Web Design Model\n * @property {number} total - The total CO2 estimate in grams\n */\n\nimport OneByte from \"./1byte.js\";\nimport SustainableWebDesignV3 from \"./sustainable-web-design-v3.js\";\nimport SustainableWebDesignV4 from \"./sustainable-web-design-v4.js\";\n\nimport {\n GLOBAL_GRID_INTENSITY,\n RENEWABLES_GRID_INTENSITY,\n} from \"./constants/index.js\";\nimport { parseOptions } from \"./helpers/index.js\";\n\nclass CO2 {\n constructor(options) {\n this.model = new SustainableWebDesignV3();\n // Using optional chaining allows an empty object to be passed\n // in without breaking the code.\n if (options?.model === \"1byte\") {\n this.model = new OneByte();\n } else if (options?.model === \"swd\") {\n this.model = new SustainableWebDesignV3();\n if (options?.version === 4) {\n this.model = new SustainableWebDesignV4();\n }\n } else if (options?.model) {\n throw new Error(\n `\"${options.model}\" is not a valid model. Please use \"1byte\" for the OneByte model, and \"swd\" for the Sustainable Web Design model.\\nSee https://developers.thegreenwebfoundation.org/co2js/models/ to learn more about the models available in CO2.js.`\n );\n }\n\n if (options?.rating && typeof options.rating !== \"boolean\") {\n throw new Error(\n `The rating option must be a boolean. Please use true or false.\\nSee https://developers.thegreenwebfoundation.org/co2js/options/ to learn more about the options available in CO2.js.`\n );\n }\n\n // This flag checks to see if the model itself has a rating system.\n const allowRatings = !!this.model.allowRatings;\n\n /** @private */\n this._segment = options?.results === \"segment\";\n // This flag is set by the user to enable the rating system.\n this._rating = options?.rating === true;\n\n // The rating system is only supported in the Sustainable Web Design Model.\n if (!allowRatings && this._rating) {\n throw new Error(\n `The rating system is not supported in the model you are using. Try using the Sustainable Web Design model instead.\\nSee https://developers.thegreenwebfoundation.org/co2js/models/ to learn more about the models available in CO2.js.`\n );\n }\n }\n\n /**\n * Accept a figure in bytes for data transfer, and a boolean for whether\n * the domain shows as 'green', and return a CO2 figure for energy used to shift the corresponding\n * the data transfer.\n *\n * @param {number} bytes\n * @param {boolean} green\n * @return {number|CO2EstimateComponentsPerByte} the amount of CO2 in grammes or its separate components\n */\n perByte(bytes, green = false) {\n return this.model.perByte(bytes, green, this._segment, this._rating);\n }\n\n /**\n * Accept a figure in bytes for data transfer, and a boolean for whether\n * the domain shows as 'green', and return a CO2 figure for energy used to shift the corresponding\n * the data transfer.\n *\n * @param {number} bytes\n * @param {boolean} green\n * @return {number|CO2EstimateComponentsPerVisit} the amount of CO2 in grammes or its separate components\n */\n perVisit(bytes, green = false) {\n if (this.model?.perVisit) {\n return this.model.perVisit(bytes, green, this._segment, this._rating);\n } else {\n throw new Error(\n `The perVisit() method is not supported in the model you are using. Try using perByte() instead.\\nSee https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more about the methods available in CO2.js.`\n );\n }\n }\n\n /**\n * Accept a figure in bytes for data transfer, a boolean for whether\n * the domain shows as 'green', and an options object.\n * Returns an object containing CO2 figure, green boolean, and object of the variables used in calculating the CO2 figure.\n *\n * @param {number} bytes\n * @param {boolean} green\n * @param {Object} options\n * @return {CO2EstimateTraceResultPerByte} the amount of CO2 in grammes\n */\n perByteTrace(bytes, green = false, options = {}) {\n const adjustments = parseOptions(options, this.model.version, green);\n\n // Filter out the trace items that aren't relevant to this function.\n const { gridIntensity, ...traceVariables } = adjustments;\n const {\n dataReloadRatio,\n firstVisitPercentage,\n returnVisitPercentage,\n ...otherVariables\n } = traceVariables;\n return {\n co2: this.model.perByte(\n bytes,\n green,\n this._segment,\n this._rating,\n adjustments\n ),\n green,\n variables: {\n description:\n \"Below are the variables used to calculate this CO2 estimate.\",\n bytes,\n gridIntensity: {\n description:\n \"The grid intensity (grams per kilowatt-hour) used to calculate this CO2 estimate.\",\n ...adjustments.gridIntensity,\n },\n ...otherVariables,\n },\n };\n }\n\n /**\n * Accept a figure in bytes for data transfer, a boolean for whether\n * the domain shows as 'green', and an options object.\n * Returns an object containing CO2 figure, green boolean, and object of the variables used in calculating the CO2 figure.\n *\n * @param {number} bytes\n * @param {boolean} green\n * @param {Object} options\n * @return {CO2EstimateTraceResultPerVisit} the amount of CO2 in grammes\n */\n perVisitTrace(bytes, green = false, options = {}) {\n if (this.model?.perVisit) {\n const adjustments = parseOptions(options, this.model.version, green);\n const { gridIntensity, ...variables } = adjustments;\n\n return {\n co2: this.model.perVisit(\n bytes,\n green,\n this._segment,\n this._rating,\n adjustments\n ),\n green,\n variables: {\n description:\n \"Below are the variables used to calculate this CO2 estimate.\",\n bytes,\n gridIntensity: {\n description:\n \"The grid intensity (grams per kilowatt-hour) used to calculate this CO2 estimate.\",\n ...adjustments.gridIntensity,\n },\n ...variables,\n },\n };\n } else {\n throw new Error(\n `The perVisitTrace() method is not supported in the model you are using. Try using perByte() instead.\\nSee https://developers.thegreenwebfoundation.org/co2js/methods/ to learn more about the methods available in CO2.js.`\n );\n }\n }\n\n SustainableWebDesignV3() {\n return new SustainableWebDesignV3();\n }\n\n SustainableWebDesignV4() {\n return new SustainableWebDesignV4();\n }\n\n OneByte() {\n return new OneByte();\n }\n}\n\nexport { CO2 };\nexport default CO2;\n"],
5
- "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4"]
7
7
  }
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
+ mod
22
+ ));
20
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
24
  var constants_exports = {};
22
25
  __export(constants_exports, {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/index.js"],
4
4
  "sourcesContent": ["import fileSize from \"./file-size.js\";\nimport averageIntensity from \"../data/average-intensities.min.js\";\n\n// SUSTAINABLE WEB DESIGN CONSTANTS\n// this refers to the estimated total energy use for the internet around 2000 TWh,\n// divided by the total transfer it enables around 2500 exabytes\nconst KWH_PER_GB = 0.81;\n\n// these constants outline how the energy is attributed to\n// different parts of the system in the SWD model\nconst END_USER_DEVICE_ENERGY = 0.52;\nconst NETWORK_ENERGY = 0.14;\nconst DATACENTER_ENERGY = 0.15;\nconst PRODUCTION_ENERGY = 0.19;\n\n// These carbon intensity figures https://ember-climate.org/data/data-explorer\n// - Global carbon intensity for 2022\nconst GLOBAL_GRID_INTENSITY = averageIntensity.data[\"WORLD\"];\nconst RENEWABLES_GRID_INTENSITY = 50;\n\n// Taken from: https://gitlab.com/wholegrain/carbon-api-2-0/-/blob/master/includes/carbonapi.php\n\nconst FIRST_TIME_VIEWING_PERCENTAGE = 0.75;\nconst RETURNING_VISITOR_PERCENTAGE = 0.25;\nconst PERCENTAGE_OF_DATA_LOADED_ON_SUBSEQUENT_LOAD = 0.02;\n\nconst SWDV4 = {\n OPERATIONAL_KWH_PER_GB_DATACENTER: 0.055,\n OPERATIONAL_KWH_PER_GB_NETWORK: 0.059,\n OPERATIONAL_KWH_PER_GB_DEVICE: 0.08,\n EMBODIED_KWH_PER_GB_DATACENTER: 0.012,\n EMBODIED_KWH_PER_GB_NETWORK: 0.013,\n EMBODIED_KWH_PER_GB_DEVICE: 0.081,\n GLOBAL_GRID_INTENSITY: 494,\n};\n\nconst SWDMV3_RATINGS = {\n FIFTH_PERCENTILE: 0.095,\n TENTH_PERCENTILE: 0.186,\n TWENTIETH_PERCENTILE: 0.341,\n THIRTIETH_PERCENTILE: 0.493,\n FORTIETH_PERCENTILE: 0.656,\n FIFTIETH_PERCENTILE: 0.846,\n};\n\nconst SWDMV4_RATINGS = {\n FIFTH_PERCENTILE: 0.04,\n TENTH_PERCENTILE: 0.079,\n TWENTIETH_PERCENTILE: 0.145,\n THIRTIETH_PERCENTILE: 0.209,\n FORTIETH_PERCENTILE: 0.278,\n FIFTIETH_PERCENTILE: 0.359,\n};\n\nexport {\n fileSize,\n KWH_PER_GB,\n END_USER_DEVICE_ENERGY,\n NETWORK_ENERGY,\n DATACENTER_ENERGY,\n PRODUCTION_ENERGY,\n GLOBAL_GRID_INTENSITY,\n RENEWABLES_GRID_INTENSITY,\n FIRST_TIME_VIEWING_PERCENTAGE,\n RETURNING_VISITOR_PERCENTAGE,\n PERCENTAGE_OF_DATA_LOADED_ON_SUBSEQUENT_LOAD,\n SWDV4,\n SWDMV3_RATINGS,\n SWDMV4_RATINGS,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAqB;AACrB,qCAA6B;AAK7B,MAAM,aAAa;AAInB,MAAM,yBAAyB;AAC/B,MAAM,iBAAiB;AACvB,MAAM,oBAAoB;AAC1B,MAAM,oBAAoB;AAI1B,MAAM,wBAAw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AAA,EAClB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,iBAAiB;AAAA,EACrB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;",
6
+ "names": ["fileSize", "averageIntensity"]
7
7
  }
@@ -22,7 +22,7 @@ __export(average_intensities_min_exports, {
22
22
  type: () => type
23
23
  });
24
24
  module.exports = __toCommonJS(average_intensities_min_exports);
25
- const data = { "AFG": 132.53, "AFRICA": 547.83, "ALB": 24.29, "DZA": 634.61, "ASM": 611.11, "AGO": 174.73, "ATG": 611.11, "ARG": 353.96, "ARM": 264.54, "ABW": 561.22, "ASEAN": 570.41, "ASIA": 591.13, "AUS": 556.3, "AUT": 110.81, "AZE": 671.39, "BHS": 660.1, "BHR": 904.62, "BGD": 691.41, "BRB": 605.51, "BLR": 441.74, "BEL": 138.11, "BLZ": 225.81, "BEN": 584.07, "BTN": 23.33, "BOL": 531.69, "BIH": 601.29, "BWA": 847.91, "BRA": 96.4, "BRN": 893.91, "BGR": 335.33, "BFA": 467.53, "BDI": 250, "CPV": 558.14, "KHM": 417.71, "CMR": 305.42, "CAN": 165.15, "CYM": 642.86, "CAF": 0, "TCD": 628.57, "CHL": 291.11, "CHN": 583.61, "COL": 259.51, "COM": 642.86, "COG": 700, "COD": 24.46, "COK": 250, "CRI": 53.38, "CIV": 393.89, "HRV": 204.96, "CUB": 637.61, "CYP": 534.32, "CZE": 449.72, "DNK": 151.65, "DJI": 692.31, "DMA": 529.41, "DOM": 580.78, "ECU": 166.91, "EGY": 574.04, "SLV": 224.76, "GNQ": 591.84, "ERI": 631.58, "EST": 416.67, "SWZ": 172.41, "ETH": 24.64, "EU": 243.93, "EUROPE": 302.29, "FLK": 500, "FRO": 404.76, "FJI": 288.46, "FIN": 79.16, "FRA": 56.02, "GUF": 217.82, "PYF": 442.86, "G20": 477.89, "G7": 341.44, "GAB": 491.6, "GMB": 666.67, "GEO": 167.59, "DEU": 381.41, "GHA": 484, "GRC": 336.57, "GRL": 178.57, "GRD": 640, "GLP": 500, "GUM": 622.86, "GTM": 328.27, "GIN": 236.84, "GNB": 625, "GUY": 640.35, "HTI": 567.31, "HND": 282.27, "HKG": 699.5, "HUN": 204.19, "ISL": 27.68, "IND": 713.01, "IDN": 682.43, "IRN": 641.73, "IRQ": 688.81, "IRL": 282.98, "ISR": 582.93, "ITA": 330.72, "JAM": 555.56, "JPN": 493.59, "JOR": 540.92, "KAZ": 821.9, "KEN": 71.2, "KIR": 666.67, "XKX": 894.65, "KWT": 649.16, "KGZ": 147.29, "LAO": 265.51, "LATIN AMERICA AND CARIBBEAN": 256.03, "LVA": 123.99, "LBN": 599.01, "LSO": 20, "LBR": 227.85, "LBY": 818.69, "LTU": 160.07, "LUX": 105.26, "MAC": 448.98, "MDG": 436.44, "MWI": 66.67, "MYS": 607.88, "MDV": 611.77, "MLI": 408, "MLT": 459.14, "MTQ": 523.18, "MRT": 464.71, "MUS": 632.48, "MEX": 492.34, "MIDDLE EAST": 643.04, "MDA": 643.46, "MNG": 775.31, "MNE": 418.09, "MSR": 1e3, "MAR": 624.45, "MOZ": 135.65, "MMR": 436.92, "NAM": 59.26, "NRU": 750, "NPL": 24.44, "NLD": 268.48, "NCL": 660.58, "NZL": 112.76, "NIC": 265.12, "NER": 670.89, "NGA": 523.25, "NORTH AMERICA": 342.95, "PRK": 389.59, "MKD": 556.19, "NOR": 30.05, "OCEANIA": 495.74, "OECD": 341.27, "OMN": 564.55, "PAK": 440.61, "PSE": 516.13, "PAN": 161.68, "PNG": 507.25, "PRY": 24.31, "PER": 266.48, "POL": 661.93, "PRT": 165.55, "PRI": 677.96, "QAT": 602.5, "REU": 572.82, "ROU": 240.58, "RUS": 445.02, "RWA": 316.33, "KNA": 636.36, "LCA": 666.67, "SPM": 600, "VCT": 529.41, "WSM": 473.68, "STP": 642.86, "SAU": 696.31, "SEN": 511.6, "SRB": 647.52, "SYC": 564.52, "SLE": 50, "SGP": 470.78, "SVK": 116.77, "SVN": 231.28, "SLB": 700, "SOM": 578.95, "ZAF": 709.69, "KOR": 432.11, "SSD": 629.03, "ESP": 174.05, "LKA": 509.78, "SDN": 263.16, "SUR": 349.28, "SWE": 40.7, "CHE": 34.68, "SYR": 701.66, "TWN": 644.36, "TJK": 116.86, "TZA": 339.25, "THA": 549.85, "PHL": 610.74, "TGO": 443.18, "TON": 625, "TTO": 681.53, "TUN": 563.96, "TUR": 464.59, "TKM": 1306.03, "TCA": 653.85, "UGA": 44.53, "UKR": 256.21, "ARE": 492.7, "GBR": 228.25, "USA": 369.47, "URY": 128.79, "UZB": 1167.6, "VUT": 571.43, "VEN": 185.8, "VNM": 472.47, "VGB": 647.06, "VIR": 632.35, "WORLD": 481.65, "YEM": 566.1, "ZMB": 111.97, "ZWE": 297.87 };
25
+ const data = { "AFG": 132.53, "AFRICA": 547.83, "ALB": 24.29, "DZA": 634.61, "ASM": 611.11, "AGO": 174.73, "ATG": 611.11, "ARG": 353.96, "ARM": 264.54, "ABW": 561.22, "ASEAN": 570.41, "ASIA": 591.13, "AUS": 556.3, "AUT": 110.78, "AZE": 671.39, "BHS": 660.1, "BHR": 904.62, "BGD": 691.41, "BRB": 605.51, "BLR": 441.74, "BEL": 138.11, "BLZ": 225.81, "BEN": 584.07, "BTN": 23.33, "BOL": 531.69, "BIH": 600.94, "BWA": 847.91, "BRA": 96.4, "BRN": 893.91, "BGR": 335.33, "BFA": 467.53, "BDI": 250, "CPV": 558.14, "KHM": 417.71, "CMR": 305.42, "CAN": 165.15, "CYM": 642.86, "CAF": 0, "TCD": 628.57, "CHL": 291.11, "CHN": 583.61, "COL": 259.51, "COM": 642.86, "COG": 700, "COD": 24.46, "COK": 250, "CRI": 53.38, "CIV": 393.89, "HRV": 204.96, "CUB": 637.61, "CYP": 526.02, "CZE": 449.72, "DNK": 151.65, "DJI": 692.31, "DMA": 529.41, "DOM": 580.78, "ECU": 166.91, "EGY": 574.04, "SLV": 224.76, "GNQ": 591.84, "ERI": 631.58, "EST": 416.67, "SWZ": 172.41, "ETH": 24.64, "EU": 243.89, "EUROPE": 302.27, "FLK": 500, "FRO": 404.76, "FJI": 288.46, "FIN": 79.12, "FRA": 56.02, "GUF": 217.82, "PYF": 442.86, "G20": 477.87, "G7": 341.49, "GAB": 491.6, "GMB": 666.67, "GEO": 167.59, "DEU": 381.41, "GHA": 484, "GRC": 336.57, "GRL": 178.57, "GRD": 640, "GLP": 500, "GUM": 622.86, "GTM": 328.27, "GIN": 236.84, "GNB": 625, "GUY": 640.35, "HTI": 567.31, "HND": 282.27, "HKG": 699.5, "HUN": 204.01, "ISL": 27.68, "IND": 713.01, "IDN": 682.43, "IRN": 641.73, "IRQ": 688.81, "IRL": 282.98, "ISR": 582.93, "ITA": 330.72, "JAM": 555.56, "JPN": 493.59, "JOR": 540.92, "KAZ": 821.9, "KEN": 71.2, "KIR": 666.67, "XKX": 894.65, "KWT": 649.16, "KGZ": 147.29, "LAO": 265.51, "LATIN AMERICA AND CARIBBEAN": 256.03, "LVA": 123.99, "LBN": 599.01, "LSO": 20, "LBR": 227.85, "LBY": 818.69, "LTU": 160.07, "LUX": 105.26, "MAC": 448.98, "MDG": 436.44, "MWI": 66.67, "MYS": 607.88, "MDV": 611.77, "MLI": 408, "MLT": 444.03, "MTQ": 523.18, "MRT": 464.71, "MUS": 632.48, "MEX": 492.34, "MIDDLE EAST": 643.04, "MDA": 643.46, "MNG": 775.31, "MNE": 418.09, "MSR": 1e3, "MAR": 624.45, "MOZ": 135.65, "MMR": 436.92, "NAM": 59.26, "NRU": 750, "NPL": 24.44, "NLD": 268.48, "NCL": 660.58, "NZL": 112.76, "NIC": 265.12, "NER": 670.89, "NGA": 523.25, "NORTH AMERICA": 343.03, "PRK": 389.59, "MKD": 539.55, "NOR": 30.05, "OCEANIA": 495.74, "OECD": 341.31, "OMN": 564.55, "PAK": 440.61, "PSE": 516.13, "PAN": 161.68, "PNG": 507.25, "PRY": 24.31, "PER": 266.48, "POL": 661.93, "PRT": 165.55, "PRI": 677.96, "QAT": 602.5, "REU": 572.82, "ROU": 240.58, "RUS": 445.02, "RWA": 316.33, "KNA": 636.36, "LCA": 666.67, "SPM": 600, "VCT": 529.41, "WSM": 473.68, "STP": 642.86, "SAU": 696.31, "SEN": 511.6, "SRB": 648.2, "SYC": 564.52, "SLE": 50, "SGP": 470.78, "SVK": 116.77, "SVN": 231.28, "SLB": 700, "SOM": 578.95, "ZAF": 709.69, "KOR": 432.11, "SSD": 629.03, "ESP": 174.05, "LKA": 509.78, "SDN": 263.16, "SUR": 349.28, "SWE": 40.7, "CHE": 34.7, "SYR": 701.66, "TWN": 644.36, "TJK": 116.86, "TZA": 339.25, "THA": 549.85, "PHL": 610.74, "TGO": 443.18, "TON": 625, "TTO": 681.53, "TUN": 563.96, "TUR": 464.59, "TKM": 1306.03, "TCA": 653.85, "UGA": 44.53, "UKR": 256.21, "ARE": 492.7, "GBR": 228.25, "USA": 369.53, "URY": 128.79, "UZB": 1167.6, "VUT": 571.43, "VEN": 185.8, "VNM": 472.47, "VGB": 647.06, "VIR": 632.35, "WORLD": 481.63, "YEM": 566.1, "ZMB": 111.97, "ZWE": 297.87 };
26
26
  const type = "average";
27
27
  var average_intensities_min_default = { data, type };
28
28
  //# sourceMappingURL=average-intensities.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/data/average-intensities.min.js"],
4
- "sourcesContent": ["const data = {\"AFG\":132.53,\"AFRICA\":547.83,\"ALB\":24.29,\"DZA\":634.61,\"ASM\":611.11,\"AGO\":174.73,\"ATG\":611.11,\"ARG\":353.96,\"ARM\":264.54,\"ABW\":561.22,\"ASEAN\":570.41,\"ASIA\":591.13,\"AUS\":556.3,\"AUT\":110.81,\"AZE\":671.39,\"BHS\":660.1,\"BHR\":904.62,\"BGD\":691.41,\"BRB\":605.51,\"BLR\":441.74,\"BEL\":138.11,\"BLZ\":225.81,\"BEN\":584.07,\"BTN\":23.33,\"BOL\":531.69,\"BIH\":601.29,\"BWA\":847.91,\"BRA\":96.4,\"BRN\":893.91,\"BGR\":335.33,\"BFA\":467.53,\"BDI\":250,\"CPV\":558.14,\"KHM\":417.71,\"CMR\":305.42,\"CAN\":165.15,\"CYM\":642.86,\"CAF\":0,\"TCD\":628.57,\"CHL\":291.11,\"CHN\":583.61,\"COL\":259.51,\"COM\":642.86,\"COG\":700,\"COD\":24.46,\"COK\":250,\"CRI\":53.38,\"CIV\":393.89,\"HRV\":204.96,\"CUB\":637.61,\"CYP\":534.32,\"CZE\":449.72,\"DNK\":151.65,\"DJI\":692.31,\"DMA\":529.41,\"DOM\":580.78,\"ECU\":166.91,\"EGY\":574.04,\"SLV\":224.76,\"GNQ\":591.84,\"ERI\":631.58,\"EST\":416.67,\"SWZ\":172.41,\"ETH\":24.64,\"EU\":243.93,\"EUROPE\":302.29,\"FLK\":500,\"FRO\":404.76,\"FJI\":288.46,\"FIN\":79.16,\"FRA\":56.02,\"GUF\":217.82,\"PYF\":442.86,\"G20\":477.89,\"G7\":341.44,\"GAB\":491.6,\"GMB\":666.67,\"GEO\":167.59,\"DEU\":381.41,\"GHA\":484,\"GRC\":336.57,\"GRL\":178.57,\"GRD\":640,\"GLP\":500,\"GUM\":622.86,\"GTM\":328.27,\"GIN\":236.84,\"GNB\":625,\"GUY\":640.35,\"HTI\":567.31,\"HND\":282.27,\"HKG\":699.5,\"HUN\":204.19,\"ISL\":27.68,\"IND\":713.01,\"IDN\":682.43,\"IRN\":641.73,\"IRQ\":688.81,\"IRL\":282.98,\"ISR\":582.93,\"ITA\":330.72,\"JAM\":555.56,\"JPN\":493.59,\"JOR\":540.92,\"KAZ\":821.9,\"KEN\":71.2,\"KIR\":666.67,\"XKX\":894.65,\"KWT\":649.16,\"KGZ\":147.29,\"LAO\":265.51,\"LATIN AMERICA AND CARIBBEAN\":256.03,\"LVA\":123.99,\"LBN\":599.01,\"LSO\":20,\"LBR\":227.85,\"LBY\":818.69,\"LTU\":160.07,\"LUX\":105.26,\"MAC\":448.98,\"MDG\":436.44,\"MWI\":66.67,\"MYS\":607.88,\"MDV\":611.77,\"MLI\":408,\"MLT\":459.14,\"MTQ\":523.18,\"MRT\":464.71,\"MUS\":632.48,\"MEX\":492.34,\"MIDDLE EAST\":643.04,\"MDA\":643.46,\"MNG\":775.31,\"MNE\":418.09,\"MSR\":1000,\"MAR\":624.45,\"MOZ\":135.65,\"MMR\":436.92,\"NAM\":59.26,\"NRU\":750,\"NPL\":24.44,\"NLD\":268.48,\"NCL\":660.58,\"NZL\":112.76,\"NIC\":265.12,\"NER\":670.89,\"NGA\":523.25,\"NORTH AMERICA\":342.95,\"PRK\":389.59,\"MKD\":556.19,\"NOR\":30.05,\"OCEANIA\":495.74,\"OECD\":341.27,\"OMN\":564.55,\"PAK\":440.61,\"PSE\":516.13,\"PAN\":161.68,\"PNG\":507.25,\"PRY\":24.31,\"PER\":266.48,\"POL\":661.93,\"PRT\":165.55,\"PRI\":677.96,\"QAT\":602.5,\"REU\":572.82,\"ROU\":240.58,\"RUS\":445.02,\"RWA\":316.33,\"KNA\":636.36,\"LCA\":666.67,\"SPM\":600,\"VCT\":529.41,\"WSM\":473.68,\"STP\":642.86,\"SAU\":696.31,\"SEN\":511.6,\"SRB\":647.52,\"SYC\":564.52,\"SLE\":50,\"SGP\":470.78,\"SVK\":116.77,\"SVN\":231.28,\"SLB\":700,\"SOM\":578.95,\"ZAF\":709.69,\"KOR\":432.11,\"SSD\":629.03,\"ESP\":174.05,\"LKA\":509.78,\"SDN\":263.16,\"SUR\":349.28,\"SWE\":40.7,\"CHE\":34.68,\"SYR\":701.66,\"TWN\":644.36,\"TJK\":116.86,\"TZA\":339.25,\"THA\":549.85,\"PHL\":610.74,\"TGO\":443.18,\"TON\":625,\"TTO\":681.53,\"TUN\":563.96,\"TUR\":464.59,\"TKM\":1306.03,\"TCA\":653.85,\"UGA\":44.53,\"UKR\":256.21,\"ARE\":492.7,\"GBR\":228.25,\"USA\":369.47,\"URY\":128.79,\"UZB\":1167.6,\"VUT\":571.43,\"VEN\":185.8,\"VNM\":472.47,\"VGB\":647.06,\"VIR\":632.35,\"WORLD\":481.65,\"YEM\":566.1,\"ZMB\":111.97,\"ZWE\":297.87}; const type = \"average\"; export { data, type }; export default { data, type };"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,OAAO,EAAC,OAAM,QAAO,UAAS,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,SAAQ,QAAO,QAAO,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,MAAK,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,KAAI,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,GAAE,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,KAAI,OAAM,OAAM,OAAM,KAAI,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,MAAK,QAAO,UAAS,QAAO,OAAM,KAAI,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,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OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,IAAG,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,KAAI,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,MAAK,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,KAAI,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,SAAQ,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,SAAQ,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM;AAAG,MAAM,OAAO;AAAkC,IAAO,kCAAQ,EAAE,MAAM,KAAK;",
4
+ "sourcesContent": ["/**\n * @fileoverview Minified average CO2 emissions intensity data for countries.\n * @generated Generated by generate_average_co2.js\n * @version 1.0.0\n*/\n/**\n * @constant {Object.<string, number>} data - Average CO2 emissions intensity data for various countries.\n * @constant {string} type - Type of data being represented.\n */\n const data = {\"AFG\":132.53,\"AFRICA\":547.83,\"ALB\":24.29,\"DZA\":634.61,\"ASM\":611.11,\"AGO\":174.73,\"ATG\":611.11,\"ARG\":353.96,\"ARM\":264.54,\"ABW\":561.22,\"ASEAN\":570.41,\"ASIA\":591.13,\"AUS\":556.3,\"AUT\":110.78,\"AZE\":671.39,\"BHS\":660.1,\"BHR\":904.62,\"BGD\":691.41,\"BRB\":605.51,\"BLR\":441.74,\"BEL\":138.11,\"BLZ\":225.81,\"BEN\":584.07,\"BTN\":23.33,\"BOL\":531.69,\"BIH\":600.94,\"BWA\":847.91,\"BRA\":96.4,\"BRN\":893.91,\"BGR\":335.33,\"BFA\":467.53,\"BDI\":250,\"CPV\":558.14,\"KHM\":417.71,\"CMR\":305.42,\"CAN\":165.15,\"CYM\":642.86,\"CAF\":0,\"TCD\":628.57,\"CHL\":291.11,\"CHN\":583.61,\"COL\":259.51,\"COM\":642.86,\"COG\":700,\"COD\":24.46,\"COK\":250,\"CRI\":53.38,\"CIV\":393.89,\"HRV\":204.96,\"CUB\":637.61,\"CYP\":526.02,\"CZE\":449.72,\"DNK\":151.65,\"DJI\":692.31,\"DMA\":529.41,\"DOM\":580.78,\"ECU\":166.91,\"EGY\":574.04,\"SLV\":224.76,\"GNQ\":591.84,\"ERI\":631.58,\"EST\":416.67,\"SWZ\":172.41,\"ETH\":24.64,\"EU\":243.89,\"EUROPE\":302.27,\"FLK\":500,\"FRO\":404.76,\"FJI\":288.46,\"FIN\":79.12,\"FRA\":56.02,\"GUF\":217.82,\"PYF\":442.86,\"G20\":477.87,\"G7\":341.49,\"GAB\":491.6,\"GMB\":666.67,\"GEO\":167.59,\"DEU\":381.41,\"GHA\":484,\"GRC\":336.57,\"GRL\":178.57,\"GRD\":640,\"GLP\":500,\"GUM\":622.86,\"GTM\":328.27,\"GIN\":236.84,\"GNB\":625,\"GUY\":640.35,\"HTI\":567.31,\"HND\":282.27,\"HKG\":699.5,\"HUN\":204.01,\"ISL\":27.68,\"IND\":713.01,\"IDN\":682.43,\"IRN\":641.73,\"IRQ\":688.81,\"IRL\":282.98,\"ISR\":582.93,\"ITA\":330.72,\"JAM\":555.56,\"JPN\":493.59,\"JOR\":540.92,\"KAZ\":821.9,\"KEN\":71.2,\"KIR\":666.67,\"XKX\":894.65,\"KWT\":649.16,\"KGZ\":147.29,\"LAO\":265.51,\"LATIN AMERICA AND CARIBBEAN\":256.03,\"LVA\":123.99,\"LBN\":599.01,\"LSO\":20,\"LBR\":227.85,\"LBY\":818.69,\"LTU\":160.07,\"LUX\":105.26,\"MAC\":448.98,\"MDG\":436.44,\"MWI\":66.67,\"MYS\":607.88,\"MDV\":611.77,\"MLI\":408,\"MLT\":444.03,\"MTQ\":523.18,\"MRT\":464.71,\"MUS\":632.48,\"MEX\":492.34,\"MIDDLE EAST\":643.04,\"MDA\":643.46,\"MNG\":775.31,\"MNE\":418.09,\"MSR\":1000,\"MAR\":624.45,\"MOZ\":135.65,\"MMR\":436.92,\"NAM\":59.26,\"NRU\":750,\"NPL\":24.44,\"NLD\":268.48,\"NCL\":660.58,\"NZL\":112.76,\"NIC\":265.12,\"NER\":670.89,\"NGA\":523.25,\"NORTH AMERICA\":343.03,\"PRK\":389.59,\"MKD\":539.55,\"NOR\":30.05,\"OCEANIA\":495.74,\"OECD\":341.31,\"OMN\":564.55,\"PAK\":440.61,\"PSE\":516.13,\"PAN\":161.68,\"PNG\":507.25,\"PRY\":24.31,\"PER\":266.48,\"POL\":661.93,\"PRT\":165.55,\"PRI\":677.96,\"QAT\":602.5,\"REU\":572.82,\"ROU\":240.58,\"RUS\":445.02,\"RWA\":316.33,\"KNA\":636.36,\"LCA\":666.67,\"SPM\":600,\"VCT\":529.41,\"WSM\":473.68,\"STP\":642.86,\"SAU\":696.31,\"SEN\":511.6,\"SRB\":648.2,\"SYC\":564.52,\"SLE\":50,\"SGP\":470.78,\"SVK\":116.77,\"SVN\":231.28,\"SLB\":700,\"SOM\":578.95,\"ZAF\":709.69,\"KOR\":432.11,\"SSD\":629.03,\"ESP\":174.05,\"LKA\":509.78,\"SDN\":263.16,\"SUR\":349.28,\"SWE\":40.7,\"CHE\":34.7,\"SYR\":701.66,\"TWN\":644.36,\"TJK\":116.86,\"TZA\":339.25,\"THA\":549.85,\"PHL\":610.74,\"TGO\":443.18,\"TON\":625,\"TTO\":681.53,\"TUN\":563.96,\"TUR\":464.59,\"TKM\":1306.03,\"TCA\":653.85,\"UGA\":44.53,\"UKR\":256.21,\"ARE\":492.7,\"GBR\":228.25,\"USA\":369.53,\"URY\":128.79,\"UZB\":1167.6,\"VUT\":571.43,\"VEN\":185.8,\"VNM\":472.47,\"VGB\":647.06,\"VIR\":632.35,\"WORLD\":481.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O,OAAM,QAAO,OAAM,MAAK,OAAM,MAAK,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,KAAI,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,SAAQ,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,QAAO,SAAQ,QAAO,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM;AAAG,MAAM,OAAO;AAAkC,IAAO,kCAAQ,EAAE,MAAM,KAAK;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/data/marginal-intensities-2021.min.js"],
4
- "sourcesContent": ["const data = {\"AFG\":\"414\",\"ALB\":\"0\",\"DZA\":\"528\",\"ASM\":\"753\",\"AND\":\"188\",\"AGO\":\"1476\",\"AIA\":\"753\",\"ATG\":\"753\",\"ARG\":\"478\",\"ARM\":\"390\",\"ABW\":\"753\",\"AUS\":\"808\",\"AUT\":\"242\",\"AZE\":\"534\",\"AZORES (PORTUGAL)\":\"753\",\"BHS\":\"753\",\"BHR\":\"726\",\"BGD\":\"528\",\"BRB\":\"749\",\"BLR\":\"400\",\"BEL\":\"252\",\"BLZ\":\"403\",\"BEN\":\"745\",\"BMU\":\"753\",\"BTN\":\"0\",\"BOL\":\"604\",\"BES\":\"753\",\"BIH\":\"1197\",\"BWA\":\"1486\",\"BRA\":\"284\",\"VGB\":\"753\",\"BRN\":\"681\",\"BGR\":\"911\",\"BFA\":\"753\",\"BDI\":\"414\",\"KHM\":\"1046\",\"CMR\":\"659\",\"CAN\":\"372\",\"CYM\":\"753\",\"CPV\":\"753\",\"CAF\":\"188\",\"TCD\":\"753\",\"CHANNEL ISLANDS (U.K)\":\"753\",\"CHL\":\"657\",\"CHN\":\"899\",\"COL\":\"410\",\"COM\":\"753\",\"COD\":\"0\",\"COG\":\"659\",\"COK\":\"753\",\"CRI\":\"108\",\"CIV\":\"466\",\"HRV\":\"294\",\"CUB\":\"559\",\"CUW\":\"876\",\"CYP\":\"751\",\"CZE\":\"902\",\"DNK\":\"362\",\"DJI\":\"753\",\"DMA\":\"753\",\"DOM\":\"601\",\"ECU\":\"560\",\"EGY\":\"554\",\"SLV\":\"547\",\"GNQ\":\"632\",\"ERI\":\"915\",\"EST\":\"1057\",\"SWZ\":\"0\",\"ETH\":\"0\",\"FLK\":\"753\",\"FRO\":\"753\",\"FJI\":\"640\",\"FIN\":\"267\",\"FRA\":\"158\",\"GUF\":\"423\",\"PYF\":\"753\",\"GAB\":\"946\",\"GMB\":\"753\",\"GEO\":\"289\",\"DEU\":\"650\",\"GHA\":\"495\",\"GIB\":\"779\",\"GRC\":\"507\",\"GRL\":\"264\",\"GRD\":\"753\",\"GLP\":\"753\",\"GUM\":\"753\",\"GTM\":\"798\",\"GIN\":\"753\",\"GNB\":\"753\",\"GUY\":\"847\",\"HTI\":\"1048\",\"HND\":\"662\",\"HUN\":\"296\",\"ISL\":\"0\",\"IND\":\"951\",\"IDN\":\"783\",\"IRN\":\"592\",\"IRQ\":\"1080\",\"IRL\":\"380\",\"IMN\":\"436\",\"ISR\":\"394\",\"ITA\":\"414\",\"JAM\":\"711\",\"JPN\":\"471\",\"JOR\":\"529\",\"KAZ\":\"797\",\"KEN\":\"574\",\"KIR\":\"753\",\"PRK\":\"754\",\"KOR\":\"555\",\"XKX\":\"1145\",\"KWT\":\"675\",\"KGZ\":\"217\",\"LAO\":\"1069\",\"LVA\":\"240\",\"LBN\":\"794\",\"LSO\":\"0\",\"LBR\":\"677\",\"LBY\":\"668\",\"LIE\":\"151\",\"LTU\":\"211\",\"LUX\":\"220\",\"MDG\":\"876\",\"MADEIRA (PORTUGAL)\":\"663\",\"MWI\":\"489\",\"MYS\":\"551\",\"MDV\":\"753\",\"MLI\":\"1076\",\"MLT\":\"520\",\"MHL\":\"753\",\"MTQ\":\"753\",\"MRT\":\"753\",\"MUS\":\"700\",\"MYT\":\"753\",\"MEX\":\"531\",\"FSM\":\"753\",\"MDA\":\"541\",\"MCO\":\"158\",\"MNG\":\"1366\",\"MNE\":\"899\",\"MSR\":\"753\",\"MAR\":\"729\",\"MOZ\":\"234\",\"MMR\":\"719\",\"NAM\":\"355\",\"NRU\":\"753\",\"NPL\":\"0\",\"NLD\":\"326\",\"NCL\":\"779\",\"NZL\":\"246\",\"NIC\":\"675\",\"NER\":\"772\",\"NGA\":\"526\",\"NIU\":\"753\",\"MKD\":\"851\",\"MNP\":\"753\",\"NOR\":\"47\",\"OMN\":\"479\",\"PAK\":\"592\",\"PLW\":\"753\",\"PSE\":\"719\",\"PAN\":\"477\",\"PNG\":\"597\",\"PRY\":\"0\",\"PER\":\"473\",\"PHL\":\"672\",\"POL\":\"828\",\"PRT\":\"389\",\"PRI\":\"596\",\"QAT\":\"503\",\"REU\":\"772\",\"ROU\":\"489\",\"RUS\":\"476\",\"RWA\":\"712\",\"SHN\":\"753\",\"KNA\":\"753\",\"LCA\":\"753\",\"MAF\":\"753\",\"SPM\":\"753\",\"VCT\":\"753\",\"WSM\":\"753\",\"SMR\":\"414\",\"STP\":\"753\",\"SAU\":\"592\",\"SEN\":\"870\",\"SRB\":\"1086\",\"SYC\":\"753\",\"SLE\":\"489\",\"SGP\":\"379\",\"SXM\":\"753\",\"SVK\":\"332\",\"SVN\":\"620\",\"SLB\":\"753\",\"SOM\":\"753\",\"ZAF\":\"1070\",\"SSD\":\"890\",\"ESP\":\"402\",\"LKA\":\"731\",\"SDN\":\"736\",\"SUR\":\"1029\",\"SWE\":\"68\",\"CHE\":\"48\",\"SYR\":\"713\",\"TWN\":\"484\",\"TJK\":\"255\",\"TZA\":\"531\",\"THA\":\"450\",\"TLS\":\"753\",\"TGO\":\"859\",\"TON\":\"753\",\"TTO\":\"559\",\"TUN\":\"468\",\"TUR\":\"376\",\"TKM\":\"927\",\"TCA\":\"753\",\"TUV\":\"753\",\"UGA\":\"279\",\"UKR\":\"768\",\"ARE\":\"556\",\"GBR\":\"380\",\"USA\":\"416\",\"URY\":\"174\",\"UZB\":\"612\",\"VUT\":\"753\",\"VEN\":\"711\",\"VNM\":\"560\",\"VIR\":\"650\",\"YEM\":\"807\",\"ZMB\":\"416\",\"ZWE\":\"1575\",\"MEMO: EU 27\":\"409\"}; const type = \"marginal\"; const year = \"2021\"; export { data, type, year }; export default { data, type, year };"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,OAAO,EAAC,OAAM,OAAM,OAAM,KAAI,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,qBAAoB,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,KAAI,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,yBAAwB,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,KAAI,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,O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M,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,MAAK,OAAM,MAAK,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,gBAAe,MAAK;AAAG,MAAM,OAAO;AAAY,MAAM,OAAO;AAAqC,IAAO,wCAAQ,EAAE,MAAM,MAAM,KAAK;",
4
+ "sourcesContent": ["/**\n * @fileoverview Minified marginal CO2 emissions intensity data for countries (2021).\n * @generated Generated by generate_marginal_co2.js\n * @version 1.0.0\n */\n\n/**\n * @constant {Object.<string, number>} data - Average CO2 emissions intensity data for various countries.\n * @constant {string} type - Type of data being represented.\n * @constant {string} year - Year for which the data was collected.\n */\nconst data = {\"AFG\":\"414\",\"ALB\":\"0\",\"DZA\":\"528\",\"ASM\":\"753\",\"AND\":\"188\",\"AGO\":\"1476\",\"AIA\":\"753\",\"ATG\":\"753\",\"ARG\":\"478\",\"ARM\":\"390\",\"ABW\":\"753\",\"AUS\":\"808\",\"AUT\":\"242\",\"AZE\":\"534\",\"AZORES (PORTUGAL)\":\"753\",\"BHS\":\"753\",\"BHR\":\"726\",\"BGD\":\"528\",\"BRB\":\"749\",\"BLR\":\"400\",\"BEL\":\"252\",\"BLZ\":\"403\",\"BEN\":\"745\",\"BMU\":\"753\",\"BTN\":\"0\",\"BOL\":\"604\",\"BES\":\"753\",\"BIH\":\"1197\",\"BWA\":\"1486\",\"BRA\":\"284\",\"VGB\":\"753\",\"BRN\":\"681\",\"BGR\":\"911\",\"BFA\":\"753\",\"BDI\":\"414\",\"KHM\":\"1046\",\"CMR\":\"659\",\"CAN\":\"372\",\"CYM\":\"753\",\"CPV\":\"753\",\"CAF\":\"188\",\"TCD\":\"753\",\"CHANNEL ISLANDS (U.K)\":\"753\",\"CHL\":\"657\",\"CHN\":\"899\",\"COL\":\"410\",\"COM\":\"753\",\"COD\":\"0\",\"COG\":\"659\",\"COK\":\"753\",\"CRI\":\"108\",\"CIV\":\"466\",\"HRV\":\"294\",\"CUB\":\"559\",\"CUW\":\"876\",\"CYP\":\"751\",\"CZE\":\"902\",\"DNK\":\"362\",\"DJI\":\"753\",\"DMA\":\"753\",\"DOM\":\"601\",\"ECU\":\"560\",\"EGY\":\"554\",\"SLV\":\"547\",\"GNQ\":\"632\",\"ERI\":\"915\",\"EST\":\"1057\",\"SWZ\":\"0\",\"ETH\":\"0\",\"FLK\":\"753\",\"FRO\":\"753\",\"FJI\":\"640\",\"FIN\":\"267\",\"FRA\":\"158\",\"GUF\":\"423\",\"PYF\":\"753\",\"GAB\":\"946\",\"GMB\":\"753\",\"GEO\":\"289\",\"DEU\":\"650\",\"GHA\":\"495\",\"GIB\":\"779\",\"GRC\":\"507\",\"GRL\":\"264\",\"GRD\":\"753\",\"GLP\":\"753\",\"GUM\":\"753\",\"GTM\":\"798\",\"GIN\":\"753\",\"GNB\":\"753\",\"GUY\":\"847\",\"HTI\":\"1048\",\"HND\":\"662\",\"HUN\":\"296\",\"ISL\":\"0\",\"IND\":\"951\",\"IDN\":\"783\",\"IRN\":\"592\",\"IRQ\":\"1080\",\"IRL\":\"380\",\"IMN\":\"436\",\"ISR\":\"394\",\"ITA\":\"414\",\"JAM\":\"711\",\"JPN\":\"471\",\"JOR\":\"529\",\"KAZ\":\"797\",\"KEN\":\"574\",\"KIR\":\"753\",\"PRK\":\"754\",\"KOR\":\"555\",\"XKX\":\"1145\",\"KWT\":\"675\",\"KGZ\":\"217\",\"LAO\":\"1069\",\"LVA\":\"240\",\"LBN\":\"794\",\"LSO\":\"0\",\"LBR\":\"677\",\"LBY\":\"668\",\"LIE\":\"151\",\"LTU\":\"211\",\"LUX\":\"220\",\"MDG\":\"876\",\"MADEIRA (PORTUGAL)\":\"663\",\"MWI\":\"489\",\"MYS\":\"551\",\"MDV\":\"753\",\"MLI\":\"1076\",\"MLT\":\"520\",\"MHL\":\"753\",\"MTQ\":\"753\",\"MRT\":\"753\",\"MUS\":\"700\",\"MYT\":\"753\",\"MEX\":\"531\",\"FSM\":\"753\",\"MDA\":\"541\",\"MCO\":\"158\",\"MNG\":\"1366\",\"MNE\":\"899\",\"MSR\":\"753\",\"MAR\":\"729\",\"MOZ\":\"234\",\"MMR\":\"719\",\"NAM\":\"355\",\"NRU\":\"753\",\"NPL\":\"0\",\"NLD\":\"326\",\"NCL\":\"779\",\"NZL\":\"246\",\"NIC\":\"675\",\"NER\":\"772\",\"NGA\":\"526\",\"NIU\":\"753\",\"MKD\":\"851\",\"MNP\":\"753\",\"NOR\":\"47\",\"OMN\":\"479\",\"PAK\":\"592\",\"PLW\":\"753\",\"PSE\":\"719\",\"PAN\":\"477\",\"PNG\":\"597\",\"PRY\":\"0\",\"PER\":\"473\",\"PHL\":\"672\",\"POL\":\"828\",\"PRT\":\"389\",\"PRI\":\"596\",\"QAT\":\"503\",\"REU\":\"772\",\"ROU\":\"489\",\"RUS\":\"476\",\"RWA\":\"712\",\"SHN\":\"753\",\"KNA\":\"753\",\"LCA\":\"753\",\"MAF\":\"753\",\"SPM\":\"753\",\"VCT\":\"753\",\"WSM\":\"753\",\"SMR\":\"414\",\"STP\":\"753\",\"SAU\":\"592\",\"SEN\":\"870\",\"SRB\":\"1086\",\"SYC\":\"753\",\"SLE\":\"489\",\"SGP\":\"379\",\"SXM\":\"753\",\"SVK\":\"332\",\"SVN\":\"620\",\"SLB\":\"753\",\"SOM\":\"753\",\"ZAF\":\"1070\",\"SSD\":\"890\",\"ESP\":\"402\",\"LKA\":\"731\",\"SDN\":\"736\",\"SUR\":\"1029\",\"SWE\":\"68\",\"CHE\":\"48\",\"SYR\":\"713\",\"TWN\":\"484\",\"TJK\":\"255\",\"TZA\":\"531\",\"THA\":\"450\",\"TLS\":\"753\",\"TGO\":\"859\",\"TON\":\"753\",\"TTO\":\"559\",\"TUN\":\"468\",\"TUR\":\"376\",\"TKM\":\"927\",\"TCA\":\"753\",\"TUV\":\"753\",\"UGA\":\"279\",\"UKR\":\"768\",\"ARE\":\"556\",\"GBR\":\"380\",\"USA\":\"416\",\"URY\":\"174\",\"UZB\":\"612\",\"VUT\":\"753\",\"VEN\":\"711\",\"VNM\":\"560\",\"VIR\":\"650\",\"YEM\":\"807\",\"ZMB\":\"416\",\"ZWE\":\"1575\",\"MEMO: EU 27\":\"409\"}; const type = \"marginal\"; const year = \"2021\"; export { data, type, year }; export default { data, type, year };"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,MAAM,OAAO,EAAC,OAAM,OAAM,OAAM,KAAI,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,qBAAoB,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,OAAM,O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OAAM,OAAM,OAAM,OAAM,OAAM,QAAO,gBAAe,MAAK;AAAG,MAAM,OAAO;AAAY,MAAM,OAAO;AAAqC,IAAO,wCAAQ,EAAE,MAAM,MAAM,KAAK;",
6
6
  "names": []
7
7
  }
@@ -42,16 +42,20 @@ function parseOptions(options = {}, version = 3, green = false) {
42
42
  if (device || device === 0) {
43
43
  if (typeof device === "object") {
44
44
  if (!import__.averageIntensity.data[(_a = device.country) == null ? void 0 : _a.toUpperCase()]) {
45
- console.warn(`"${device.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.
45
+ console.warn(
46
+ `"${device.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.
46
47
  See https://developers.thegreenwebfoundation.org/co2js/data/ for more information.
47
- Falling back to global average grid intensity.`);
48
+ Falling back to global average grid intensity.`
49
+ );
48
50
  adjustments.gridIntensity["device"] = {
49
51
  value: globalGridIntensity
50
52
  };
51
53
  }
52
54
  adjustments.gridIntensity["device"] = {
53
55
  country: device.country,
54
- value: parseFloat(import__.averageIntensity.data[(_b = device.country) == null ? void 0 : _b.toUpperCase()])
56
+ value: parseFloat(
57
+ import__.averageIntensity.data[(_b = device.country) == null ? void 0 : _b.toUpperCase()]
58
+ )
55
59
  };
56
60
  } else if (typeof device === "number") {
57
61
  adjustments.gridIntensity["device"] = {
@@ -61,23 +65,29 @@ Falling back to global average grid intensity.`);
61
65
  adjustments.gridIntensity["device"] = {
62
66
  value: globalGridIntensity
63
67
  };
64
- console.warn(`The device grid intensity must be a number or an object. You passed in a ${typeof device}.
65
- Falling back to global average grid intensity.`);
68
+ console.warn(
69
+ `The device grid intensity must be a number or an object. You passed in a ${typeof device}.
70
+ Falling back to global average grid intensity.`
71
+ );
66
72
  }
67
73
  }
68
74
  if (dataCenter || dataCenter === 0) {
69
75
  if (typeof dataCenter === "object") {
70
76
  if (!import__.averageIntensity.data[(_c = dataCenter.country) == null ? void 0 : _c.toUpperCase()]) {
71
- console.warn(`"${dataCenter.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.
77
+ console.warn(
78
+ `"${dataCenter.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.
72
79
  See https://developers.thegreenwebfoundation.org/co2js/data/ for more information.
73
- Falling back to global average grid intensity.`);
80
+ Falling back to global average grid intensity.`
81
+ );
74
82
  adjustments.gridIntensity["dataCenter"] = {
75
83
  value: import_constants.GLOBAL_GRID_INTENSITY
76
84
  };
77
85
  }
78
86
  adjustments.gridIntensity["dataCenter"] = {
79
87
  country: dataCenter.country,
80
- value: parseFloat(import__.averageIntensity.data[(_d = dataCenter.country) == null ? void 0 : _d.toUpperCase()])
88
+ value: parseFloat(
89
+ import__.averageIntensity.data[(_d = dataCenter.country) == null ? void 0 : _d.toUpperCase()]
90
+ )
81
91
  };
82
92
  } else if (typeof dataCenter === "number") {
83
93
  adjustments.gridIntensity["dataCenter"] = {
@@ -87,23 +97,29 @@ Falling back to global average grid intensity.`);
87
97
  adjustments.gridIntensity["dataCenter"] = {
88
98
  value: globalGridIntensity
89
99
  };
90
- console.warn(`The data center grid intensity must be a number or an object. You passed in a ${typeof dataCenter}.
91
- Falling back to global average grid intensity.`);
100
+ console.warn(
101
+ `The data center grid intensity must be a number or an object. You passed in a ${typeof dataCenter}.
102
+ Falling back to global average grid intensity.`
103
+ );
92
104
  }
93
105
  }
94
106
  if (network || network === 0) {
95
107
  if (typeof network === "object") {
96
108
  if (!import__.averageIntensity.data[(_e = network.country) == null ? void 0 : _e.toUpperCase()]) {
97
- console.warn(`"${network.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.
109
+ console.warn(
110
+ `"${network.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.
98
111
  See https://developers.thegreenwebfoundation.org/co2js/data/ for more information. Falling back to global average grid intensity.
99
- Falling back to global average grid intensity.`);
112
+ Falling back to global average grid intensity.`
113
+ );
100
114
  adjustments.gridIntensity["network"] = {
101
115
  value: globalGridIntensity
102
116
  };
103
117
  }
104
118
  adjustments.gridIntensity["network"] = {
105
119
  country: network.country,
106
- value: parseFloat(import__.averageIntensity.data[(_f = network.country) == null ? void 0 : _f.toUpperCase()])
120
+ value: parseFloat(
121
+ import__.averageIntensity.data[(_f = network.country) == null ? void 0 : _f.toUpperCase()]
122
+ )
107
123
  };
108
124
  } else if (typeof network === "number") {
109
125
  adjustments.gridIntensity["network"] = {
@@ -113,8 +129,10 @@ Falling back to global average grid intensity.`);
113
129
  adjustments.gridIntensity["network"] = {
114
130
  value: globalGridIntensity
115
131
  };
116
- console.warn(`The network grid intensity must be a number or an object. You passed in a ${typeof network}.
117
- Falling back to global average grid intensity.`);
132
+ console.warn(
133
+ `The network grid intensity must be a number or an object. You passed in a ${typeof network}.
134
+ Falling back to global average grid intensity.`
135
+ );
118
136
  }
119
137
  }
120
138
  } else {
@@ -130,18 +148,24 @@ Falling back to global average grid intensity.`);
130
148
  adjustments.dataReloadRatio = options.dataReloadRatio;
131
149
  } else {
132
150
  adjustments.dataReloadRatio = version === 3 ? import_constants.PERCENTAGE_OF_DATA_LOADED_ON_SUBSEQUENT_LOAD : 0;
133
- console.warn(`The dataReloadRatio option must be a number between 0 and 1. You passed in ${options.dataReloadRatio}.
134
- Falling back to default value.`);
151
+ console.warn(
152
+ `The dataReloadRatio option must be a number between 0 and 1. You passed in ${options.dataReloadRatio}.
153
+ Falling back to default value.`
154
+ );
135
155
  }
136
156
  } else {
137
157
  adjustments.dataReloadRatio = version === 3 ? import_constants.PERCENTAGE_OF_DATA_LOADED_ON_SUBSEQUENT_LOAD : 0;
138
- console.warn(`The dataReloadRatio option must be a number. You passed in a ${typeof options.dataReloadRatio}.
139
- Falling back to default value.`);
158
+ console.warn(
159
+ `The dataReloadRatio option must be a number. You passed in a ${typeof options.dataReloadRatio}.
160
+ Falling back to default value.`
161
+ );
140
162
  }
141
163
  } else {
142
164
  adjustments.dataReloadRatio = version === 3 ? import_constants.PERCENTAGE_OF_DATA_LOADED_ON_SUBSEQUENT_LOAD : 0;
143
- console.warn(`The dataReloadRatio option must be a number. You passed in a ${typeof options.dataReloadRatio}.
144
- Falling back to default value.`);
165
+ console.warn(
166
+ `The dataReloadRatio option must be a number. You passed in a ${typeof options.dataReloadRatio}.
167
+ Falling back to default value.`
168
+ );
145
169
  }
146
170
  if ((options == null ? void 0 : options.firstVisitPercentage) || options.firstVisitPercentage === 0) {
147
171
  if (typeof options.firstVisitPercentage === "number") {
@@ -149,18 +173,24 @@ Falling back to default value.`);
149
173
  adjustments.firstVisitPercentage = options.firstVisitPercentage;
150
174
  } else {
151
175
  adjustments.firstVisitPercentage = version === 3 ? import_constants.FIRST_TIME_VIEWING_PERCENTAGE : 1;
152
- console.warn(`The firstVisitPercentage option must be a number between 0 and 1. You passed in ${options.firstVisitPercentage}.
153
- Falling back to default value.`);
176
+ console.warn(
177
+ `The firstVisitPercentage option must be a number between 0 and 1. You passed in ${options.firstVisitPercentage}.
178
+ Falling back to default value.`
179
+ );
154
180
  }
155
181
  } else {
156
182
  adjustments.firstVisitPercentage = version === 3 ? import_constants.FIRST_TIME_VIEWING_PERCENTAGE : 1;
157
- console.warn(`The firstVisitPercentage option must be a number. You passed in a ${typeof options.firstVisitPercentage}.
158
- Falling back to default value.`);
183
+ console.warn(
184
+ `The firstVisitPercentage option must be a number. You passed in a ${typeof options.firstVisitPercentage}.
185
+ Falling back to default value.`
186
+ );
159
187
  }
160
188
  } else {
161
189
  adjustments.firstVisitPercentage = version === 3 ? import_constants.FIRST_TIME_VIEWING_PERCENTAGE : 1;
162
- console.warn(`The firstVisitPercentage option must be a number. You passed in a ${typeof options.firstVisitPercentage}.
163
- Falling back to default value.`);
190
+ console.warn(
191
+ `The firstVisitPercentage option must be a number. You passed in a ${typeof options.firstVisitPercentage}.
192
+ Falling back to default value.`
193
+ );
164
194
  }
165
195
  if ((options == null ? void 0 : options.returnVisitPercentage) || options.returnVisitPercentage === 0) {
166
196
  if (typeof options.returnVisitPercentage === "number") {
@@ -168,18 +198,24 @@ Falling back to default value.`);
168
198
  adjustments.returnVisitPercentage = options.returnVisitPercentage;
169
199
  } else {
170
200
  adjustments.returnVisitPercentage = version === 3 ? import_constants.RETURNING_VISITOR_PERCENTAGE : 0;
171
- console.warn(`The returnVisitPercentage option must be a number between 0 and 1. You passed in ${options.returnVisitPercentage}.
172
- Falling back to default value.`);
201
+ console.warn(
202
+ `The returnVisitPercentage option must be a number between 0 and 1. You passed in ${options.returnVisitPercentage}.
203
+ Falling back to default value.`
204
+ );
173
205
  }
174
206
  } else {
175
207
  adjustments.returnVisitPercentage = version === 3 ? import_constants.RETURNING_VISITOR_PERCENTAGE : 0;
176
- console.warn(`The returnVisitPercentage option must be a number. You passed in a ${typeof options.returnVisitPercentage}.
177
- Falling back to default value.`);
208
+ console.warn(
209
+ `The returnVisitPercentage option must be a number. You passed in a ${typeof options.returnVisitPercentage}.
210
+ Falling back to default value.`
211
+ );
178
212
  }
179
213
  } else {
180
214
  adjustments.returnVisitPercentage = version === 3 ? import_constants.RETURNING_VISITOR_PERCENTAGE : 0;
181
- console.warn(`The returnVisitPercentage option must be a number. You passed in a ${typeof options.returnVisitPercentage}.
182
- Falling back to default value.`);
215
+ console.warn(
216
+ `The returnVisitPercentage option must be a number. You passed in a ${typeof options.returnVisitPercentage}.
217
+ Falling back to default value.`
218
+ );
183
219
  }
184
220
  if ((options == null ? void 0 : options.greenHostingFactor) || options.greenHostingFactor === 0 && version === 4) {
185
221
  if (typeof options.greenHostingFactor === "number") {
@@ -187,13 +223,17 @@ Falling back to default value.`);
187
223
  adjustments.greenHostingFactor = options.greenHostingFactor;
188
224
  } else {
189
225
  adjustments.greenHostingFactor = 0;
190
- console.warn(`The returnVisitPercentage option must be a number between 0 and 1. You passed in ${options.returnVisitPercentage}.
191
- Falling back to default value.`);
226
+ console.warn(
227
+ `The returnVisitPercentage option must be a number between 0 and 1. You passed in ${options.returnVisitPercentage}.
228
+ Falling back to default value.`
229
+ );
192
230
  }
193
231
  } else {
194
232
  adjustments.greenHostingFactor = 0;
195
- console.warn(`The returnVisitPercentage option must be a number. You passed in a ${typeof options.returnVisitPercentage}.
196
- Falling back to default value.`);
233
+ console.warn(
234
+ `The returnVisitPercentage option must be a number. You passed in a ${typeof options.returnVisitPercentage}.
235
+ Falling back to default value.`
236
+ );
197
237
  }
198
238
  } else if (version === 4) {
199
239
  adjustments.greenHostingFactor = 0;
@@ -204,7 +244,7 @@ Falling back to default value.`);
204
244
  return adjustments;
205
245
  }
206
246
  function getApiRequestHeaders(comment = "") {
207
- return { "User-Agent": `co2js/${"0.16.1"} ${comment}` };
247
+ return { "User-Agent": `co2js/${"0.16.2"} ${comment}` };
208
248
  }
209
249
  function outputRating(co2e, swdmVersion) {
210
250
  let {