module.exports = "(function(e,t,r){var s=r(5894),n=r(280).v,o=r(4934),a=r(6474),u=n(\"AdaGaugeError\");0;var i=__CONTROL_TOWER_ORIGIN__+\"/v1/interests/gauge\",c=[\"NN\",\"VB\",\"JJ\"];t.gauge=function(e){var t=function(e){var t=s.reduce(e.interestGroups,(function(e,t,r){return e[r]={keywords:t.keywords,tagGroup:t.tagGroupId},e}),{}),r=s.reduce(e.tagGroups,(function(e,t,r){return e[r]=s.map(t.tags,(function(e){return{eventName:e.viewId,tag:e.tagApiName}})),e}),{});return{interests:t,tagGroups:r,posTags:c,visitor:{history:e.events}}}(e);return a.request({method:\"POST\",url:i,contentType:\"application/json\",data:t}).then((function(e){if(e.status>299)throw new u(\"Status: \"+e.status+\"; body: \"+e.responseText);var t;try{t=o.parse(e.responseText)}catch(t){throw new u(\"Error parsing response: \"+e.responseText)}if(!s.isObject(t))throw new u(\"Response is not an object: \"+e.responseText);if(!s.isObject(t.scores))throw new u(\"Response lacks scores: \"+e.responseText);return t})).catch((function(){throw new u(\"Fetch failed\")}))}})";