module.exports = "(function(e,i,r){var n=r(5894),t=r(4934),a=r(4810),s=r(8131),l=r(1442),c=r(7004),o=r(7152),f=\"adobe_analytics\",v=\"optimizelyLayerEvent\",d=r(4527),u=r(2933),p=d.get(\"stores/integration_settings\");var y=function(e,i){var r;return s.pollFor((function(){var e=p.getReference(f);return r=n.extend({},e,i),function(e,i){if(i.sVariableReference)return i.sVariableReference||null;var r=i.sVariable?i.sVariable:\"s\";return e.getGlobal(r)}(o,r)}),200,50).then((function(i){var t,a,s=r.site_catalyst_eVar||null,c=r.site_catalyst_prop||null;s&&(t=\"eVar\"+s),c&&(a=\"prop\"+c),function(e){n.each([\"events\",\"linkTrackEvents\",\"linkTrackVars\"],(function(i){n.isString(e[i])||(e[i]=\"\")}))}(i);var o=i.linkTrackVars.split(\",\");t&&(e=e.substring(0,255),i[t]=e,-1===o.indexOf(t)&&o.push(t)),a&&(i[a]=e,-1===o.indexOf(a)&&o.push(a));var f=l.getReferrer();if(f&&(i.referrer=f),-1===i.linkTrackVars.indexOf(\"events\")&&o.push(\"events\"),i.linkTrackVars=n.filter(o).join(\",\"),-1===i.linkTrackEvents.indexOf(v)){var d=i.linkTrackEvents.split(\",\");d.push(v),i.linkTrackEvents=n.filter(d).join(\",\")}if(-1===i.events.indexOf(v)){var u=i.events.split(\",\");u.push(v),i.events=n.filter(u).join(\",\")}i.tl(!0,\"o\",\"OptimizelyLayerDecision\")}))},g={preRedirectPolicy:c.PreRedirectPolicies.PERSIST_BEFORE_REDIRECT,postRedirectPolicy:c.PostRedirectPolicies.TRACK_IMMEDIATELY,nonRedirectPolicy:c.NonRedirectPolicies.TRACK_IMMEDIATELY,trackLayerDecision:function(e){var i=e.integrationSettings;if(i&&i[f]&&e.experimentId&&e.variationId){var r={id:e.layerId,name:e.layerName,policy:e.layerPolicy,integrationStringVersion:e.integrationStringVersion},n={id:e.experimentId,name:e.experimentName},t={id:e.variationId,name:e.variationName},s=e.isLayerHoldback,l=u.generateAnalyticsString(r,n,t,s,255,!0);if(l)return y(l,i[f]).catch((function(e){a.warn(\"Tracker for\",f,\"failed:\",e)}))}},serializeSettings:t.stringify,deserializeSettings:t.parse};e.exports=function(e){e.registerAnalyticsTracker(\"adobe_analytics\",g)}})";