module.exports = "(function(e,i,t){var r=t(4810),a=t(8258),n=t(3769),o=t(8789);i.isCmabEnabled=function(){return __CMAB_IS_ENABLED__},i.isExperimentSyncApiEnabled=function(e){return __CMAB_IS_SYNC_API_CALL_ENABLED__},i.defaultToSnippetBucketing=function(e,i,t){r.debug(\"CMAB / Defaulting to snippet bucketing with variation:\",i,\"for experiment:\",e.id),a.setCmabVariationDataInVisitorStore(e,i,t)},i.processCmabExperiment=function(e,t){if(!i.isCmabEnabled())return r.debug(\"CMAB / Feature flag is disabled. Defaulting to snippet bucketing with variation:\",t,\"for experiment:\",e.id),t;if(r.debug(\"CMAB / Feature flag is enabled. Processing CMAB for experiment:\",e.id),a.activateTimeoutForNonBucketedCmabExperiments(e),!a.isCmabExperiment(e))return t;var m=a.getCmabVariationDataFromVisitorStore(e);if(!a.isCmabTimeout(e,m))return m.variationId;o.startCmabApiCallPerformanceTimer(e.id);var u=null,l=a.generateCmabUUID();if(i.isExperimentSyncApiEnabled(e))try{return(u=n.makeSyncApiCallWithXHR(e,l))?(a.setCmabVariationDataInVisitorStore(e,u,l),o.endCmabApiCallPerformanceTimer(e.id),u):(i.defaultToSnippetBucketing(e,t,l),o.endCmabApiCallPerformanceTimer(e.id),t)}catch(a){return r.error(\"CMAB API / SYNC / API call failed with error:\",a),i.defaultToSnippetBucketing(e,t,l),o.endCmabApiCallPerformanceTimer(e.id),null}return n.makeAsyncApiCall(e,l).then((function(m){return(u=n.handleCmabApiResponse(m,e))?(r.debug(\"CMAB API / ASYNC / Variation:\",u,\"for experiment:\",e.id),a.setCmabVariationDataInVisitorStore(e,u,l),o.endCmabApiCallPerformanceTimer(e.id),u):(i.defaultToSnippetBucketing(e,t,l),o.endCmabApiCallPerformanceTimer(e.id),t)}),(function(a){return r.error(\"CMAB API / ASYNC / API call failed with error:\",a),i.defaultToSnippetBucketing(e,t,l),o.endCmabApiCallPerformanceTimer(e.id),null})),i.defaultToSnippetBucketing(e,t,l),o.endCmabApiCallPerformanceTimer(e.id),t},i.getCmabUUIDAndUpdate30MinTimeout=function(e,i){var t=a.getCmabUUIDFromVisitorStore(e,i);return a.updateCmabTimeoutInVisitorStore(e,i),t}})";