module.exports = "(function(e,r,t){var a=t(4810),l={FIELDS:t(3219).FIELDS},n=t(9921),u=t(232);r.GRANULARITY={ALL:\"all\",CURRENT_SESSION:\"current_session\",LAST_30_DAYS:\"last_30_days\",LAST_60_DAYS:\"last_60_days\"},r.evaluate=function(e,t){var i={};if(0===t.length){for(var S=0;S<e.length;S++)i[e[S].id]=e[S].defaultValue;return i}var _=function(e){if(0===e.length)return[];for(var r=e.length-1,t=l.FIELDS.SESSION_ID,a=e[r][t];r>0&&a===e[r-1][t];)r--;return e.slice(r)}(t),I=function(e,r){if(0===e.length||r<=0)return[];var t=+new Date-r*n.MILLIS_IN_A_DAY;t-=t%n.MILLIS_IN_A_DAY;for(var a=e.length;a>0&&t<=e[a-1][l.FIELDS.TIME];)a--;return e.slice(a)}(t,60);for(S=0;S<e.length;S++){var f=e[S],A=t;f.granularity===r.GRANULARITY.CURRENT_SESSION?A=_:f.granularity===r.GRANULARITY.LAST_60_DAYS&&(A=I);try{var L=A;f.rule&&(L=u.execute(f.rule,A)),i[f.id]=f.defaultValue,1===L.length?i[f.id]=L[0][0]||f.defaultValue:a.debug(\"Behavior / Rule for\",f.id,\"returned\",L.length,\"results, expected 1\")}catch(e){a.error(\"Behavior / Rule for\",f.id,\"failed with\",e.message||\"\")}}return i}})";