From 8eb06305e64cbd9f8110d010a71becbb83d55fa5 Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:56:34 +0800 Subject: [PATCH] update iife --- dist/iife/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/iife/index.js b/dist/iife/index.js index 6c4addb..434088e 100644 --- a/dist/iife/index.js +++ b/dist/iife/index.js @@ -1,4 +1,4 @@ -var co2=(()=>{var ae=Object.create;var P=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ce=Object.prototype.hasOwnProperty;var le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ee=(t,e)=>{for(var r in e)P(t,r,{get:e[r],enumerable:!0})},Z=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of oe(e))!ce.call(t,n)&&n!==r&&P(t,n,{get:()=>e[n],enumerable:!(a=ie(e,n))||a.enumerable});return t};var ue=(t,e,r)=>(r=t!=null?ae(se(t)):{},Z(e||!t||!t.__esModule?P(r,"default",{value:t,enumerable:!0}):r,t)),de=t=>Z(P({},"__esModule",{value:!0}),t);var te=le((ct,ee)=>{"use strict";async function me(t,e){return typeof t=="string"?Oe(t,e):Pe(t,e)}function Oe(t,e){return e.indexOf(t)>-1}function ye(t){return Object.entries(t).filter(([a,n])=>n.green).map(([a,n])=>n.url)}function Pe(t,e){let r=[];for(let a of t)e.indexOf(a)>-1&&r.push(a);return r}function Ge(t,e){return typeof t=="string"?z(t,e):Se(t,e)}function z(t,e){return e.indexOf(t)>-1?t:{url:t,green:!1}}function Se(t,e){let r={};for(let a of t)r[a]=z(a,e);return r}ee.exports={check:me,greenDomainsFromResults:ye,find:Ge}});var Me={};Ee(Me,{averageIntensity:()=>R,co2:()=>k,default:()=>we,hosting:()=>Y,marginalIntensity:()=>j});var D=4883333333333333e-25;var b=class{constructor(e){this.allowRatings=!1,this.options=e,this.KWH_PER_BYTE_FOR_NETWORK=D}perByte(e,r){if(e<1)return 0;if(r){let n=e*72e-12*0,i=e*D*475;return n+i}let a=72e-12+D;return e*a*519}};var p=b;var N={GIGABYTE:1e9};var Re={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},ge="average";var R={data:Re,type:ge};var $=.81,V=.52,L=.14,v=.15,w=.19,g=R.data.WORLD,J=50,_=.75,C=.25,A=.02,G={OPERATIONAL_KWH_PER_GB_DATACENTER:.055,OPERATIONAL_KWH_PER_GB_NETWORK:.059,OPERATIONAL_KWH_PER_GB_DEVICE:.08,EMBODIED_KWH_PER_GB_DATACENTER:.012,EMBODIED_KWH_PER_GB_NETWORK:.013,EMBODIED_KWH_PER_GB_DEVICE:.081,GLOBAL_GRID_INTENSITY:494},X={FIFTH_PERCENTILE:.095,TENTH_PERCENTILE:.186,TWENTIETH_PERCENTILE:.341,THIRTIETH_PERCENTILE:.493,FORTIETH_PERCENTILE:.656,FIFTIETH_PERCENTILE:.846},T={FIFTH_PERCENTILE:.04,TENTH_PERCENTILE:.079,TWENTIETH_PERCENTILE:.145,THIRTIETH_PERCENTILE:.209,FORTIETH_PERCENTILE:.278,FIFTIETH_PERCENTILE:.359};var fe=G.GLOBAL_GRID_INTENSITY,O=t=>parseFloat(t.toFixed(2)),m=(t,e)=>t<=e;function M(t={},e=3,r=!1){let a=e===4?fe:g;if(typeof t!="object")throw new Error("Options must be an object");let n={};if(t?.gridIntensity){n.gridIntensity={};let{device:i,dataCenter:o,network:s}=t.gridIntensity;(i||i===0)&&(typeof i=="object"?(R.data[i.country?.toUpperCase()]||(console.warn(`"${i.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code. +var co2=(()=>{var ae=Object.create;var P=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ce=Object.prototype.hasOwnProperty;var le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ee=(t,e)=>{for(var r in e)P(t,r,{get:e[r],enumerable:!0})},Z=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of oe(e))!ce.call(t,n)&&n!==r&&P(t,n,{get:()=>e[n],enumerable:!(a=ie(e,n))||a.enumerable});return t};var ue=(t,e,r)=>(r=t!=null?ae(se(t)):{},Z(e||!t||!t.__esModule?P(r,"default",{value:t,enumerable:!0}):r,t)),de=t=>Z(P({},"__esModule",{value:!0}),t);var te=le((ct,ee)=>{"use strict";async function me(t,e){return typeof t=="string"?Oe(t,e):Pe(t,e)}function Oe(t,e){return e.indexOf(t)>-1}function ye(t){return Object.entries(t).filter(([a,n])=>n.green).map(([a,n])=>n.url)}function Pe(t,e){let r=[];for(let a of t)e.indexOf(a)>-1&&r.push(a);return r}function Ge(t,e){return typeof t=="string"?z(t,e):Se(t,e)}function z(t,e){return e.indexOf(t)>-1?t:{url:t,green:!1}}function Se(t,e){let r={};for(let a of t)r[a]=z(a,e);return r}ee.exports={check:me,greenDomainsFromResults:ye,find:Ge}});var Me={};Ee(Me,{averageIntensity:()=>R,co2:()=>k,default:()=>we,hosting:()=>Y,marginalIntensity:()=>j});var D=4883333333333333e-25;var b=class{constructor(e){this.allowRatings=!1,this.options=e,this.KWH_PER_BYTE_FOR_NETWORK=D}perByte(e,r){if(e<1)return 0;if(r){let n=e*72e-12*0,i=e*D*475;return n+i}let a=72e-12+D;return e*a*519}};var p=b;var N={GIGABYTE:1e9};var Re={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},ge="average";var R={data:Re,type:ge};var $=.81,V=.52,L=.14,v=.15,w=.19,g=R.data.WORLD,J=50,_=.75,C=.25,A=.02,G={OPERATIONAL_KWH_PER_GB_DATACENTER:.055,OPERATIONAL_KWH_PER_GB_NETWORK:.059,OPERATIONAL_KWH_PER_GB_DEVICE:.08,EMBODIED_KWH_PER_GB_DATACENTER:.012,EMBODIED_KWH_PER_GB_NETWORK:.013,EMBODIED_KWH_PER_GB_DEVICE:.081,GLOBAL_GRID_INTENSITY:494},X={FIFTH_PERCENTILE:.095,TENTH_PERCENTILE:.186,TWENTIETH_PERCENTILE:.341,THIRTIETH_PERCENTILE:.493,FORTIETH_PERCENTILE:.656,FIFTIETH_PERCENTILE:.846},T={FIFTH_PERCENTILE:.04,TENTH_PERCENTILE:.079,TWENTIETH_PERCENTILE:.145,THIRTIETH_PERCENTILE:.209,FORTIETH_PERCENTILE:.278,FIFTIETH_PERCENTILE:.359};var fe=G.GLOBAL_GRID_INTENSITY,O=t=>parseFloat(t.toFixed(2)),m=(t,e)=>t<=e;function M(t={},e=3,r=!1){let a=e===4?fe:g;if(typeof t!="object")throw new Error("Options must be an object");let n={};if(t?.gridIntensity){n.gridIntensity={};let{device:i,dataCenter:o,network:s}=t.gridIntensity;(i||i===0)&&(typeof i=="object"?(R.data[i.country?.toUpperCase()]||(console.warn(`"${i.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code. See https://developers.thegreenwebfoundation.org/co2js/data/ for more information. Falling back to global average grid intensity.`),n.gridIntensity.device={value:a}),n.gridIntensity.device={country:i.country,value:parseFloat(R.data[i.country?.toUpperCase()])}):typeof i=="number"?n.gridIntensity.device={value:i}:(n.gridIntensity.device={value:a},console.warn(`The device grid intensity must be a number or an object. You passed in a ${typeof i}. Falling back to global average grid intensity.`))),(o||o===0)&&(typeof o=="object"?(R.data[o.country?.toUpperCase()]||(console.warn(`"${o.country}" is not a valid country. Please use a valid 3 digit ISO 3166 country code.