{"version":3,"file":"static/chunks/2651.615794fb84510e5d.js","mappings":"yGAIA,IAAMA,EAAa,CACjBC,IAAK,CAAE,GAAK,IAAM,CAClBC,IAAK,CAAE,KAAM,IAAM,CACnBC,IAAK,CAAE,IAAK,IAAK,CACjBC,IAAK,CAAE,KAAM,IAAM,CACnBC,KAAM,CAAE,IAAK,IAAK,EAYdC,EAAY,CAAEC,EAAOC,IACzB,EAAaA,CAAS,CAAE,EAAG,CAAU,OAChCD,EAAQC,CAAS,CAAE,EAAG,CAAU,KAC9B,MAkCTC,CAAAA,EAAA,QAtBwB,IACtB,GAAM,CAAEC,KAAAA,CAAI,CAAEH,MAAAA,CAAK,CAAE,CAAGI,EAExBC,SAAU,QAAS,KAEjB,IAAMC,EAAkB,CAAE,GAAGC,SAASC,UAAU,CAChDF,CAAAA,EAAgBG,OAAO,CAAG,CACxBN,KAAM,aACNO,QAAS,OACX,EAGAC,QAAS,OAAQ,CACf,QAAS,oBACTC,WAAYC,OAAQV,GACpBW,OAAQf,EAAWC,EAAOP,CAAU,CAAEU,EAAM,EAC5CH,MAAOe,OAAQf,GACfQ,WAAYF,CACd,EACF,EACF","sources":["webpack://_N_E/./js/plugins/cwv.js"],"sourcesContent":["/**\n * @module Core Web Vitals\n * @description Core Web Vitals Reporting\n */\nconst thresholds = {\n CLS: [ 0.1, 0.25 ],\n FCP: [ 1800, 3000 ],\n FID: [ 100, 300 ],\n LCP: [ 2500, 4000 ],\n TTFB: [ 100, 600 ]\n};\n\n/**\n * @function getRating\n * @description Get Core Web Vitals rating for each metric.\n * @see https://github.com/GoogleChromeLabs/web-vitals-report/blob/71b0879334798c732f460945ded5267cab5a36bf/src/js/analytics.js#L57-L65\n *\n * @param {Number} value\n * @param {Array} thresholds\n * @return {String}\n */\nconst getRating = ( value, threshold ) => {\n if ( value > threshold[ 1 ] ) return 'POOR';\n if ( value > threshold[ 0 ] ) return 'NI'; // NI == Needs Improvement\n return 'GOOD';\n};\n\n/**\n * @function sendToAnalytics\n * @description Track web vitals data via Tagular.\n * @see https://github.com/GoogleChrome/web-vitals#readme\n * @see https://app.make.rvapps.io/schemas/sch_1ofhDFwJqLfXE91RzyPPIFhuyt6\n *\n * @param {Object} metric { name, value }\n * @return {void}\n */\nconst sendToAnalytics = ( metric ) => {\n const { name, value } = metric;\n\n cohesion( 'ready', () => {\n // Copy the webContext object and add web-vitals library info.\n const modifiedContext = { ..._Tagular.webContext };\n modifiedContext.library = {\n name: 'web-vitals',\n version: '2.1.0'\n };\n\n // Beam the data to Make, weeee ⚡.\n tagular( 'beam', {\n '@type': 'core.WebVitals.v1',\n metricName: String( name ),\n rating: getRating( value, thresholds[ name ] ),\n value: Number( value ),\n webContext: modifiedContext\n } );\n } );\n};\n\nexport default sendToAnalytics;\n"],"names":["thresholds","CLS","FCP","FID","LCP","TTFB","getRating","value","threshold","__webpack_exports__","name","metric","cohesion","modifiedContext","_Tagular","webContext","library","version","tagular","metricName","String","rating","Number"],"sourceRoot":""}