{"version":3,"sources":["webpack:///./src/components/FeatureFlags/FeatureFlagsProvider.tsx","webpack:///./node_modules/ldclient-js/src/index.js","webpack:///./node_modules/ldclient-js/src/EventProcessor.js","webpack:///./node_modules/Base64/base64.js","webpack:///./node_modules/ldclient-js/src/EventEmitter.js","webpack:///./node_modules/ldclient-js/src/EventSerializer.js","webpack:///./node_modules/ldclient-js/src/GoalTracker.js","webpack:///./node_modules/ldclient-js/src/Stream.js","webpack:///./node_modules/ldclient-js/src/Requestor.js","webpack:///./node_modules/ldclient-js/src/Identity.js","webpack:///./node_modules/ldclient-js/src/store.js","webpack:///./src/components/FeatureFlags/LdFeatureFlagsUtils.js","webpack:///./src/constants/ldFlagsDefaultValues.js","webpack:///./src/components/FeatureFlags/FeatureFlagsConsumer.tsx","webpack:///./src/components/FeatureFlags/FeatureFlagsDecorator.tsx","webpack:///./node_modules/ldclient-js/src/utils.js","webpack:///./src/components/FeatureFlags/index.ts","webpack:///./src/components/FeatureFlags/FeatureFlagsContext.tsx","webpack:///./src/constants/ldFlags.ts","webpack:///./node_modules/ldclient-js/src/messages.js","webpack:///./node_modules/ldclient-js/src/errors.js","webpack:///./src/constants/IAVTypes.ts"],"names":["props","user","createLdUser","updateUser","bind","state","flags","initialFlagValues","ldClient","LDClient","initialize","getLdClientKey","on","allFlags","newAllFlags","overrideFlags","setFlags","changes","newFlagsChanges","isOnChangeEvent","windowOverrideFlags","config","apiBaseUrl","indexOf","window","overrideFeatureFlags","keys","Object","length","forEach","key","current","this","setState","customUserFields","immutableCustomData","custom","email","ofxUserInfo","username","merge","identify","render","FeatureFlagsContext","Provider","value","children","React","Component","FeatureFlagsProvider","EventProcessor","EventEmitter","EventSerializer","GoalTracker","Stream","Requestor","Identity","utils","messages","store","errors","module","exports","env","options","environment","events","requestor","stream","sendEvents","samplingInterval","emitter","hash","ident","baseUrl","eventsUrl","streamUrl","goalTracker","useLocalStorage","localStorageKey","goals","seenRequests","sendFlagEvent","defaultValue","getUser","cacheKey","JSON","stringify","now","Date","cached","enqueueEvent","kind","creationDate","getTime","sendGoalEvent","goal","event","data","url","location","href","selector","variation","hasOwnProperty","flag","navigator","undefined","doNotTrack","msDoNotTrack","Math","floor","random","enqueue","connectStream","connect","fetchFlagSettings","err","settings","maybeReportError","LDFlagFetchError","errorFetchingFlags","updateSettings","modifications","clear","lsKey","set","emit","changeEvent","previous","btoa","bootstrap","parseInt","useReport","isNaN","onNextTick","LDInvalidArgumentError","LDInvalidEnvironmentIdError","environmentNotSpecified","LDInvalidUserError","invalidUser","userNotSpecified","toUpperCase","parse","get","error","start","setTimeout","tick","flush","refreshGoalTracker","dispose","fetchGoals","g","LDUnexpectedResponseError","message","document","readyState","addEventListener","history","pushState","origin","type","editorClientBaseUrl","editorTag","createElement","async","src","editorClientUrl","s","getElementsByTagName","parentNode","insertBefore","readyPromise","Promise","resolve","onReady","off","waitUntilReady","onDone","wrapPromiseCallback","reject","setUser","track","i","customEventExists","console","warn","unknownCustomEventKey","LDInvalidEventKeyError","handler","context","substr","isConnected","apply","Array","prototype","slice","call","arguments","results","VERSION","version","eventSerializer","processor","queue","initialFlush","push","sync","maxLength","pop","base64URLEncode","serialize_events","XMLHttpRequest","xhr","open","send","Image","object","chars","InvalidCharacterError","Error","name","input","block","charCode","str","String","idx","map","output","charAt","charCodeAt","atob","replace","bs","buffer","bc","fromCharCode","concat","serializer","allAttributesPrivate","all_attributes_private","privateAttributeNames","private_attribute_names","ignoreAttrs","anonymous","allowedTopLevelAttrs","secondary","ip","country","firstName","lastName","avatar","serialize_event","filter_user","reduce","acc","p","userPrivateAttrs","filterAttrs","isAttributeAllowed","isPrivateAttr","result","filteredProps","removedAttrs","customResult","removedAttrNames","sort","privateAttrs","escapeStringRegexp","doesUrlMatch","matcher","search","regex","testUrl","canonicalUrl","RegExp","substring","pattern","test","onEvent","tracker","listenerFn","clickGoals","urls","j","matches","target","elements","querySelectorAll","findGoalsForClick","removeEventListener","es","onPing","EventSource","disconnect","close","OPEN","CONNECTING","fetchJSON","endpoint","body","callback","status","getResponseHeader","responseText","statusText","environmentNotFound","setRequestHeader","flagSettingsRequest","lastFlagSettingsCallback","cb","join","currentCallback","prevCallback","wrappedCallback","abort","initialUser","onChange","u","sane","clone","toString","sanitizeUser","item","localStorage","setItem","ex","localStorageUnavailable","getItem","userAgentParser","isMobileDevice","getDevice","isTabletDevice","defaultUser","ldUser","device","browser","getResult","launchDarklyKey","enableDirectDebitPoa","enableComplianceModeByCountry","userRegistrationRecaptcha","mouseFlow","enabledIncomingTransfer","enableAttachRecipientLater","enableIAV","IAVTypes","MANUAL","ofxLiteSMSEnabled","mfaNoticeEnabled","addMobileFieldForCorpRego","brexitBannerEnabled","allowLimitOrders","bankDetailsChangedMessage","enableMgp","enableAethos","corEnabled","oktaSecureEnable","hideDLCardNumber","changeEmailFieldToUsername","enableAddEditRecipientFraudWarning","isUsdCaEftEnabled","oktaAlternateMfaSecure","oktaAlternateMfaFxsnet","enableKycUplift","onfidoReleaseDates","individual","CanadianForex","USForex","IEOFX","corporate","secureHolidayBanner","enableMobileDeviceVerification","ConsumerChildrenWrapper","componentDidMount","flagKey","Fragment","FeatureFlagsConsumerChildrenWrapper","Consumer","Base64","unescape","encodeURIComponent","obj","oldObj","newObj","mods","prop","varArgs","TypeError","to","index","nextSource","nextKey","promise","then","FeatureFlagsConsumer","FeatureFlagsDecorator","IFeatureFlagsDecoratorChildrenProps","createContext","enableTransferContactMessage","covid19BannerEnabled","autoOptInToNewTransferDate","useNewTransfer","enableUpdatedTNCBanner","enableDynamicBackendFrontend","secureMfaAtLoginBanner","enableCorporateOnboardingFrontEnd","docLink","clientNotReady","invalidKey","createCustomError","CustomError","code","captureStackTrace","constructor"],"mappings":"onBAAA,WACA,QACA,UACA,QACA,UACA,SACA,QAcA,cAKI,WAAYA,GAAZ,MACI,YAAMA,IAAM,K,OAEZ,EAAKC,KAAO,EAAAC,eACZ,EAAKC,WAAa,EAAKA,WAAWC,KAAK,GAEvC,EAAKC,MAAQ,CACTC,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AOC,QAAU,CACf4V,eAAgB,WACd,MAAO,oCAETC,WAAY,WACV,MAAO,8BAETlF,wBAAyB,WACvB,MAAO,+BAET7I,sBAAuB,SAAS9J,GAC9B,MAAO,iBAAmBA,EAAM,oBAElCsR,oBAAqB,WACnB,MAAO,yBAA2BqG,GAEpC/Q,wBAAyB,WACvB,MAAO,4BAA8B+Q,GAEvChS,mBAAoB,SAASJ,GAC3B,MAAO,kCAAoCA,EAAIsC,SAAWtC,IAE5DwB,iBAAkB,WAChB,MAAO,qBAAuB4Q,GAEhC7Q,YAAa,WACX,MAAO,0BAA4B6Q,K,kBC5BvC,SAASG,EAAkB9L,GACzB,SAAS+L,EAAYlQ,EAASmQ,GAC5BjM,MAAMkM,mBAAqBlM,MAAMkM,kBAAkB/X,KAAMA,KAAKgY,aAC9DhY,KAAK2H,QAAUA,EACf3H,KAAK8X,KAAOA,EAOd,OAJAD,EAAYzN,UAAY,IAAIyB,MAC5BgM,EAAYzN,UAAU0B,KAAOA,EAC7B+L,EAAYzN,UAAU4N,YAAcH,EAE7BA,EAGT/V,EAAQ4F,0BAA4BkQ,EAAkB,uCACtD9V,EAAQ2E,4BAA8BmR,EAAkB,yCACxD9V,EAAQ6E,mBAAqBiR,EAAkB,gCAC/C9V,EAAQ+H,uBAAyB+N,EAAkB,oCACnD9V,EAAQ0E,uBAAyBoR,EAAkB,oCACnD9V,EAAQ0D,iBAAmBoS,EAAkB,+B,kFCnB7C,SAAYhE,GACR,kBACA,gBACA,cAHJ,CAAY,EAAAA,WAAA,EAAAA,SAAQ","file":"bundle.90941fcebb2886554828.js","sourcesContent":["import * as React from 'react';\nimport { merge } from 'lodash';\nimport * as LDClient from 'ldclient-js';\nimport * as config from 'ofxSettings';\nimport { createLdUser, getLdClientKey } from './LdFeatureFlagsUtils';\nimport { FeatureFlagsContext, initialFlagValues } from './FeatureFlagsContext';\nimport * as ofxUserInfo from 'ofxUserInfo';\n\nexport interface ILdCustomUserFields {\n country?: string | undefined;\n custom?: {\n [key: string]: string | boolean | number | [string | boolean | number];\n };\n}\n\nexport interface IFeatureFlagsProviderState {\n flags: LDClient.LDFlagSet;\n updateUser: (customUserFields: ILdCustomUserFields) => void;\n}\n\nclass FeatureFlagsProvider extends React.Component<{}, IFeatureFlagsProviderState> {\n ldClient: LDClient.LDClient;\n\n user: LDClient.LDUser;\n\n constructor(props: {}) {\n super(props);\n\n this.user = createLdUser();\n this.updateUser = this.updateUser.bind(this);\n\n this.state = {\n flags: { ...initialFlagValues },\n updateUser: this.updateUser,\n };\n\n this.ldClient = LDClient.initialize(getLdClientKey(), this.user);\n\n this.ldClient.on('ready', () => {\n const allFlags = this.ldClient.allFlags();\n const newAllFlags = this.overrideFlags(allFlags, false);\n\n this.setFlags(newAllFlags);\n });\n\n this.ldClient.on('change', (changes) => {\n const newFlagsChanges = this.overrideFlags(changes, true);\n\n this.setFlags(newFlagsChanges);\n });\n }\n\n overrideFlags(flags: any, isOnChangeEvent: boolean): LDClient.LDFlagSet {\n let windowOverrideFlags: LDClient.LDFlagSet = {};\n\n if (config.apiBaseUrl && config.apiBaseUrl.indexOf('api.ofx.com') < 0) {\n windowOverrideFlags = (window as any).overrideFeatureFlags;\n }\n\n if (isOnChangeEvent) {\n const keys = Object.keys(flags);\n\n if (keys.length > 0) {\n const newFlags: LDClient.LDFlagSet = {};\n\n keys.forEach((key) => {\n newFlags[key] = flags[key].current;\n });\n\n return { ...newFlags, ...windowOverrideFlags };\n }\n }\n\n return { ...flags, ...windowOverrideFlags };\n }\n\n setFlags(flags: LDClient.LDFlagSet): void {\n this.setState({\n flags: {\n ...this.state.flags,\n ...flags,\n },\n });\n }\n\n updateUser(customUserFields: ILdCustomUserFields): void {\n const immutableCustomData = {\n custom: {\n email: ofxUserInfo.username,\n },\n };\n\n this.user = merge(this.user, customUserFields, immutableCustomData);\n\n this.ldClient.identify(this.user);\n }\n\n render() {\n return (\n \n {this.props.children}\n \n );\n }\n}\n\nexport default FeatureFlagsProvider;\n","var EventProcessor = require('./EventProcessor');\nvar EventEmitter = require('./EventEmitter');\nvar EventSerializer = require('./EventSerializer');\nvar GoalTracker = require('./GoalTracker');\nvar Stream = require('./Stream');\nvar Requestor = require('./Requestor');\nvar Identity = require('./Identity');\nvar utils = require('./utils');\nvar messages = require('./messages');\nvar store = require('./store');\nvar errors = require('./errors');\n\nfunction initialize(env, user, options) {\n var flags = {};\n var environment;\n var events;\n var requestor;\n var stream;\n var sendEvents;\n var samplingInterval;\n var emitter;\n var hash;\n var ident;\n var baseUrl;\n var eventsUrl;\n var streamUrl;\n var goalTracker;\n var useLocalStorage;\n var localStorageKey;\n var goals;\n\n var readyEvent = 'ready';\n var changeEvent = 'change';\n\n var flushInterval = 2000;\n\n var seenRequests = {};\n\n function sendIdentifyEvent(user) {\n enqueueEvent({\n kind: 'identify',\n key: user.key,\n user: user,\n creationDate: (new Date()).getTime()\n });\n }\n\n function sendFlagEvent(key, value, defaultValue) {\n var user = ident.getUser();\n var cacheKey = JSON.stringify(value) + (user && user.key ? user.key : '') + key;\n var now = new Date();\n var cached = seenRequests[cacheKey];\n\n if (cached && (now - cached) < 300000 /* five minutes, in ms */) {\n return;\n }\n\n seenRequests[cacheKey] = now;\n\n enqueueEvent({\n kind: 'feature',\n key: key,\n user: user,\n value: value,\n 'default': defaultValue,\n creationDate: now.getTime()\n });\n }\n\n function sendGoalEvent(kind, goal) {\n var event = {\n kind: kind,\n key: goal.key,\n data: null,\n url: window.location.href,\n creationDate: (new Date()).getTime()\n };\n\n if (kind === 'click') {\n event.selector = goal.selector;\n }\n\n return enqueueEvent(event);\n }\n\n function identify(user, hash, onDone) {\n return utils.wrapPromiseCallback(new Promise((function(resolve, reject) {\n ident.setUser(user);\n requestor.fetchFlagSettings(ident.getUser(), hash, function(err, settings) {\n if (err) {\n emitter.maybeReportError(new errors.LDFlagFetchError(messages.errorFetchingFlags(err)));\n return reject(err)\n }\n if (settings) {\n updateSettings(settings);\n }\n resolve(settings);\n });\n }).bind(this)), onDone);\n }\n\n function variation(key, defaultValue) {\n var value;\n\n if (flags && flags.hasOwnProperty(key)) {\n value = flags[key] === null ? defaultValue : flags[key];\n } else {\n value = defaultValue;\n }\n\n sendFlagEvent(key, value, defaultValue);\n\n return value;\n }\n\n function enqueueEvent(event) {\n if (shouldEnqueueEvent()) {\n events.enqueue(event);\n }\n }\n\n function shouldEnqueueEvent() {\n return sendEvents && !doNotTrack() && (samplingInterval === 0 || Math.floor(Math.random() * samplingInterval) === 0)\n }\n\n function doNotTrack() {\n var flag;\n if (navigator && navigator.doNotTrack !== undefined) {\n flag = navigator.doNotTrack; // FF, Chrome\n } else if (navigator && navigator.msDoNotTrack !== undefined) {\n flag = navigator.msDoNotTrack; // IE 9/10\n } else {\n flag = window.doNotTrack; // IE 11+, Safari\n }\n return flag === '1' || flag === 'yes';\n }\n\n function allFlags() {\n var results = {};\n\n if (!flags) { return results; }\n\n for (var key in flags) {\n if (flags.hasOwnProperty(key)) {\n results[key] = variation(key, null);\n }\n }\n\n return results;\n }\n\n function customEventExists(key) {\n if (!goals || goals.length === 0) { return false; }\n\n for (var i=0 ; i < goals.length ; i++) {\n if (goals[i].kind === 'custom' && goals[i].key === key) {\n return true;\n }\n }\n\n return false;\n }\n\n function track(key, data) {\n if (typeof key !== 'string') {\n emitter.maybeReportError(new errors.LDInvalidEventKeyError(messages.unknownCustomEventKey(key)));\n return;\n }\n\n // Validate key if we have goals\n if (!!goals && !customEventExists(key)) {\n console.warn(messages.unknownCustomEventKey(key));\n }\n\n enqueueEvent({\n kind: 'custom',\n key: key,\n data: data,\n url: window.location.href,\n creationDate: (new Date()).getTime()\n });\n }\n\n function connectStream() {\n stream.connect(function() {\n requestor.fetchFlagSettings(ident.getUser(), hash, function(err, settings) {\n if (err) {\n emitter.maybeReportError(new errors.LDFlagFetchError(messages.errorFetchingFlags(err)));\n }\n updateSettings(settings);\n });\n });\n }\n\n function updateSettings(settings) {\n var changes;\n var keys;\n\n if (!settings) { return; }\n\n changes = utils.modifications(flags, settings);\n keys = Object.keys(changes);\n\n flags = settings;\n\n if (useLocalStorage) {\n store.clear(localStorageKey);\n localStorageKey = lsKey(environment, ident.getUser());\n store.set(localStorageKey, JSON.stringify(flags));\n }\n\n if (keys.length > 0) {\n keys.forEach(function(key) {\n emitter.emit(changeEvent + ':' + key, changes[key].current, changes[key].previous);\n });\n\n emitter.emit(changeEvent, changes);\n\n keys.forEach(function(key) {\n sendFlagEvent(key, changes[key].current);\n });\n }\n }\n\n function on(event, handler, context) {\n if (event.substr(0, changeEvent.length) === changeEvent) {\n if (!stream.isConnected()) {\n connectStream();\n }\n emitter.on.apply(emitter, [event, handler, context]);\n } else {\n emitter.on.apply(emitter, Array.prototype.slice.call(arguments));\n }\n }\n\n function off() {\n emitter.off.apply(emitter, Array.prototype.slice.call(arguments));\n }\n\n function handleMessage(event) {\n if (event.origin !== baseUrl) { return; }\n if (event.data.type === 'SYN') {\n window.editorClientBaseUrl = baseUrl;\n var editorTag = document.createElement('script');\n editorTag.type = 'text/javascript';\n editorTag.async = true;\n editorTag.src = baseUrl + event.data.editorClientUrl;\n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(editorTag, s);\n }\n }\n\n function lsKey(env, user) {\n var key = '';\n if (user) {\n key = hash || utils.btoa(JSON.stringify(user));\n }\n return 'ld:' + env + ':' + key;\n }\n\n options = options || {};\n environment = env;\n flags = typeof(options.bootstrap) === 'object' ? options.bootstrap : {};\n hash = options.hash;\n baseUrl = options.baseUrl || 'https://app.launchdarkly.com';\n eventsUrl = options.eventsUrl || 'https://events.launchdarkly.com';\n streamUrl = options.streamUrl || 'https://clientstream.launchdarkly.com';\n stream = Stream(streamUrl, environment);\n events = EventProcessor(eventsUrl + '/a/' + environment + '.gif', EventSerializer(options));\n sendEvents = (typeof options.sendEvents === 'undefined') ? true : config.sendEvents;\n samplingInterval = parseInt(options.samplingInterval) || 0;\n emitter = EventEmitter();\n ident = Identity(user, sendIdentifyEvent);\n requestor = Requestor(baseUrl, environment, options.useReport);\n localStorageKey = lsKey(environment, ident.getUser());\n\n if (options.samplingInterval !== undefined && (isNaN(options.samplingInterval) || options.samplingInterval < 0)) {\n samplingInterval = 0;\n utils.onNextTick(function() {\n emitter.maybeReportError(new errors.LDInvalidArgumentError('Invalid sampling interval configured. Sampling interval must be an integer >= 0.'));\n })\n }\n\n if (!env) {\n utils.onNextTick(function() {\n emitter.maybeReportError(new errors.LDInvalidEnvironmentIdError(messages.environmentNotSpecified()));\n })\n }\n\n if (!user) {\n utils.onNextTick(function() {\n emitter.maybeReportError(new errors.LDInvalidUserError(messages.userNotSpecified()));\n });\n }\n else if (!user.key) {\n utils.onNextTick(function() {\n emitter.maybeReportError(new errors.LDInvalidUserError(messages.invalidUser()));\n });\n }\n\n if (typeof options.bootstrap === 'object') {\n utils.onNextTick(function() { emitter.emit(readyEvent); });\n }\n else if (typeof(options.bootstrap) === 'string' && options.bootstrap.toUpperCase() === 'LOCALSTORAGE' && typeof(Storage) !== 'undefined') {\n useLocalStorage = true;\n\n // check if localStorage data is corrupted, if so clear it\n try {\n flags = JSON.parse(store.get(localStorageKey));\n } catch (error) {\n store.clear(localStorageKey);\n }\n\n if (flags === null) {\n requestor.fetchFlagSettings(ident.getUser(), hash, function(err, settings) {\n if (err) {\n emitter.maybeReportError(new errors.LDFlagFetchError(messages.errorFetchingFlags(err)));\n }\n flags = settings;\n settings && store.set(localStorageKey, JSON.stringify(flags));\n emitter.emit(readyEvent);\n });\n } else {\n // We're reading the flags from local storage. Signal that we're ready,\n // then update localStorage for the next page load. We won't signal changes or update\n // the in-memory flags unless you subscribe for changes\n utils.onNextTick(function() { emitter.emit(readyEvent); });\n requestor.fetchFlagSettings(ident.getUser(), hash, function(err, settings) {\n if (err) {\n emitter.maybeReportError(new errors.LDFlagFetchError(messages.errorFetchingFlags(err)));\n }\n settings && store.set(localStorageKey, JSON.stringify(settings));\n });\n }\n }\n else {\n requestor.fetchFlagSettings(ident.getUser(), hash, function(err, settings) {\n if (err) {\n emitter.maybeReportError(new errors.LDFlagFetchError(messages.errorFetchingFlags(err)));\n }\n flags = settings;\n emitter.emit(readyEvent);\n });\n }\n\n requestor.fetchGoals(function(err, g) {\n if (err) {\n emitter.maybeReportError(new errors.LDUnexpectedResponseError('Error fetching goals: ' + err.message ? err.message : err));\n }\n if (g && g.length > 0) {\n goals = g;\n goalTracker = GoalTracker(goals, sendGoalEvent);\n }\n });\n\n function start() {\n if(sendEvents) {\n setTimeout(function tick() {\n events.flush(ident.getUser());\n setTimeout(tick, flushInterval);\n }, flushInterval);\n }\n }\n\n if (document.readyState !== 'complete') {\n window.addEventListener('load', start);\n } else {\n start();\n }\n\n window.addEventListener('beforeunload', function() {\n events.flush(ident.getUser(), true);\n });\n\n function refreshGoalTracker() {\n if (goalTracker) {\n goalTracker.dispose();\n }\n if (goals && goals.length) {\n goalTracker = GoalTracker(goals, sendGoalEvent);\n }\n }\n\n if (goals && goals.length > 0) {\n if (!!(window.history && history.pushState)) {\n window.addEventListener('popstate', refreshGoalTracker);\n } else {\n window.addEventListener('hashchange', refreshGoalTracker);\n }\n }\n\n window.addEventListener('message', handleMessage);\n\n var readyPromise = new Promise(function(resolve) {\n var onReady = emitter.on(readyEvent, function() {\n emitter.off(readyEvent, onReady);\n resolve();\n });\n });\n\n var client = {\n waitUntilReady: function() {\n return readyPromise;\n },\n identify: identify,\n variation: variation,\n track: track,\n on: on,\n off: off,\n allFlags: allFlags\n };\n\n return client;\n}\n\nmodule.exports = {\n initialize: initialize\n};\n\nif(typeof VERSION !== 'undefined') {\n module.exports.version = VERSION;\n}\n","var utils = require('./utils');\n\nfunction EventProcessor(eventsUrl, eventSerializer) {\n var processor = {};\n var queue = [];\n var initialFlush = true;\n \n processor.enqueue = function(event) {\n queue.push(event);\n };\n \n processor.flush = function(user, sync) {\n var maxLength = 2000 - eventsUrl.length;\n var data = [];\n \n if (!user) {\n if (initialFlush) {\n console && console.warn && console.warn('Be sure to call `identify` in the LaunchDarkly client: http://docs.launchdarkly.com/docs/running-an-ab-test#include-the-client-side-snippet');\n }\n return false;\n }\n \n initialFlush = false;\n while (maxLength > 0 && queue.length > 0) {\n var event = queue.pop();\n event.user = user;\n maxLength = maxLength - utils.base64URLEncode(JSON.stringify(event)).length;\n // If we are over the max size, put this one back on the queue\n // to try in the next round, unless this event alone is larger \n // than the limit, in which case, screw it, and try it anyway.\n if (maxLength < 0 && data.length > 0) {\n queue.push(event);\n } else {\n data.push(event);\n }\n }\n \n if (data.length > 0) {\n data = eventSerializer.serialize_events(data);\n var src = eventsUrl + '?d=' + utils.base64URLEncode(JSON.stringify(data));\n //Detect browser support for CORS\n if ('withCredentials' in new XMLHttpRequest()) {\n /* supports cross-domain requests */\n var xhr = new XMLHttpRequest();\n xhr.open('GET', src, !sync);\n xhr.send();\n } else {\n var img = new Image();\n img.src = src;\n }\n }\n\n // if the queue is not empty, call settimeout to flush it again \n // with a 0 timeout (stack-less recursion)\n // Or, just recursively call flush_queue with the remaining elements\n // if we're doing this on unload\n if (queue.length > 0) {\n if (sync) {\n processor.flush(user, sync);\n }\n else {\n setTimeout(function() {\n processor.flush(user);\n }, 0);\n }\n }\n return false;\n };\n \n return processor;\n}\n\nmodule.exports = EventProcessor;\n",";(function () {\n\n var object = typeof exports != 'undefined' ? exports : self; // #8: web workers\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n function InvalidCharacterError(message) {\n this.message = message;\n }\n InvalidCharacterError.prototype = new Error;\n InvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n // encoder\n // [https://gist.github.com/999166] by [https://github.com/nignag]\n object.btoa || (\n object.btoa = function (input) {\n var str = String(input);\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars, output = '';\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3/4);\n if (charCode > 0xFF) {\n throw new InvalidCharacterError(\"'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.\");\n }\n block = block << 8 | charCode;\n }\n return output;\n });\n\n // decoder\n // [https://gist.github.com/1020396] by [https://github.com/atk]\n object.atob || (\n object.atob = function (input) {\n var str = String(input).replace(/=+$/, '');\n if (str.length % 4 == 1) {\n throw new InvalidCharacterError(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = '';\n // get next character\n buffer = str.charAt(idx++);\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n });\n\n}());\n","function EventEmitter() {\n var emitter = {};\n var events = {};\n\n var listeningTo = function(event) {\n return !!events[event];\n }\n\n emitter.on = function(event, handler, context) {\n events[event] = events[event] || [];\n events[event] = events[event].concat({handler: handler, context: context});\n };\n\n emitter.off = function(event, handler, context) {\n if (!events[event]) { return; }\n for (var i = 0; i < events[event].length ; i++) {\n if (events[event][i].handler === handler && events[event][i].context === context) {\n events[event] = events[event].slice(0, i).concat(events[event].slice(i + 1));\n }\n }\n };\n\n emitter.emit = function(event) {\n if (!events[event]) { return; }\n for (var i = 0; i < events[event].length; i++) {\n events[event][i].handler.apply(events[event][i].context, Array.prototype.slice.call(arguments, 1));\n }\n };\n\n emitter.maybeReportError = function(error) {\n if (!error) {\n return;\n }\n if (listeningTo('error')) {\n this.emit('error', error);\n } else {\n console.error(error.message);\n }\n }\n return emitter;\n}\n\nmodule.exports = EventEmitter;\n","var utils = require('./utils');\n\n/**\n * The EventSerializer object transforms the internal representation of events into objects suitable to be sent\n * as JSON to the server. This includes hiding any private user attributes.\n *\n * @param {Object} the LaunchDarkly client configuration object\n **/\nfunction EventSerializer(config) {\n var serializer = {};\n var allAttributesPrivate = config.all_attributes_private;\n var privateAttributeNames = config.private_attribute_names || [];\n var ignoreAttrs = { key: true, custom: true, anonymous: true };\n var allowedTopLevelAttrs = { key: true, secondary: true, ip: true, country: true, email: true,\n firstName: true, lastName: true, avatar: true, name: true, anonymous: true, custom: true };\n\n serializer.serialize_events = function(events) {\n return events.map(serialize_event);\n }\n\n function serialize_event(event) {\n return Object.keys(event).map(function(key) {\n return [key, (key === 'user') ? filter_user(event[key]) : event[key]];\n }).reduce(function(acc, p) {\n acc[p[0]] = p[1];\n return acc;\n }, {});\n }\n\n function filter_user(user) {\n var userPrivateAttrs = user.privateAttributeNames || [];\n \n var isPrivateAttr = function(name) {\n return !ignoreAttrs[name] && (\n allAttributesPrivate || userPrivateAttrs.indexOf(name) !== -1 ||\n privateAttributeNames.indexOf(name) !== -1);\n }\n var filterAttrs = function(props, isAttributeAllowed) {\n return Object.keys(props).reduce(function(acc, name) {\n if (isAttributeAllowed(name)) {\n if (isPrivateAttr(name)) {\n // add to hidden list\n acc[1][name] = true;\n } else {\n acc[0][name] = props[name];\n }\n }\n return acc;\n }, [{}, {}]);\n }\n var result = filterAttrs(user, function(key) { return allowedTopLevelAttrs[key]; });\n var filteredProps = result[0];\n var removedAttrs = result[1];\n if (user.custom) {\n var customResult = filterAttrs(user.custom, function(key) { return true; });\n filteredProps.custom = customResult[0];\n utils.merge(removedAttrs, customResult[1]);\n }\n var removedAttrNames = Object.keys(removedAttrs);\n if (removedAttrNames.length) {\n removedAttrNames.sort();\n filteredProps.privateAttrs = removedAttrNames;\n }\n return filteredProps;\n }\n\n return serializer;\n}\n\nmodule.exports = EventSerializer;\n","var escapeStringRegexp = require('escape-string-regexp');\n\nfunction doesUrlMatch(matcher, href, search, hash) {\n var canonicalUrl = href.replace(search, '').replace(hash, '');\n var regex;\n var testUrl;\n \n switch (matcher.kind) {\n case 'exact':\n testUrl = href;\n regex = new RegExp('^' + escapeStringRegexp(matcher.url) + '/?$');\n break;\n case 'canonical':\n testUrl = canonicalUrl;\n regex = new RegExp('^' + escapeStringRegexp(matcher.url) + '/?$');\n break;\n case 'substring':\n testUrl = canonicalUrl;\n regex = new RegExp('.*' + escapeStringRegexp(matcher.substring) + '.*$');\n break;\n case 'regex':\n testUrl = canonicalUrl;\n regex = new RegExp(matcher.pattern);\n break;\n default:\n return false;\n }\n return regex.test(testUrl);\n}\n\nfunction findGoalsForClick(event, clickGoals) {\n var matches = [];\n \n for (var i = 0; i < clickGoals.length; i++) {\n var target = event.target;\n var goal = clickGoals[i];\n var selector = goal.selector;\n var elements = document.querySelectorAll(selector);\n while (target && elements.length > 0) {\n for (var j = 0; j < elements.length; j++) {\n if (target === elements[j])\n matches.push(goal);\n }\n target = target.parentNode;\n }\n }\n \n return matches;\n}\n\nfunction GoalTracker(goals, onEvent) {\n var tracker = {};\n var goals = goals;\n var listenerFn = null;\n \n var clickGoals = [];\n \n for (var i = 0; i < goals.length; i++) {\n var goal = goals[i];\n var urls = goal.urls || [];\n \n for (var j = 0; j < urls.length; j++) {\n if (doesUrlMatch(urls[j], location.href, location.search, location.hash)) {\n if (goal.kind === 'pageview') {\n onEvent('pageview', goal);\n } else {\n clickGoals.push(goal);\n onEvent('click_pageview', goal);\n }\n break;\n }\n }\n }\n \n if (clickGoals.length > 0) {\n listenerFn = function(event) {\n var goals = findGoalsForClick(event, clickGoals);\n for (var i = 0; i < goals.length; i++) {\n onEvent('click', goals[i]);\n }\n };\n\n document.addEventListener('click', listenerFn);\n }\n\n tracker.dispose = function() {\n document.removeEventListener('click', listenerFn);\n }\n \n return tracker;\n}\n\nmodule.exports = GoalTracker;\n","function Stream(url, environment) {\n var stream = {};\n var url = url + '/ping/' + environment;\n var es = null;\n\n stream.connect = function(onPing) {\n if (typeof EventSource !== 'undefined') {\n es = new window.EventSource(url);\n es.addEventListener('ping', onPing);\n }\n }\n\n stream.disconnect = function() {\n es && es.close();\n }\n\n stream.isConnected = function() {\n return es && (es.readyState === EventSource.OPEN || es.readyState === EventSource.CONNECTING);\n }\n\n return stream;\n}\n\nmodule.exports = Stream;\n","var utils = require('./utils');\nvar errors = require('./errors');\nvar messages = require('./messages');\n\nvar json = 'application/json';\n\nfunction fetchJSON(endpoint, body, callback) {\n var xhr = new XMLHttpRequest();\n\n xhr.addEventListener('load', function() {\n if (xhr.status === 200 && xhr.getResponseHeader('Content-type') === json) {\n callback(null, JSON.parse(xhr.responseText));\n } else {\n callback(xhr.statusText);\n }\n });\n\n xhr.addEventListener('error', function() {\n if(xhr.status === 404) {\n callback(new errors.LDInvalidEnvironmentIdError(messages.environmentNotFound()));\n }\n callback(xhr.statusText);\n });\n\n if (body) {\n xhr.open('REPORT', endpoint);\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.send(JSON.stringify(body));\n } else {\n xhr.open('GET', endpoint);\n xhr.send();\n }\n\n return xhr;\n}\n\nfunction Requestor(baseUrl, environment, useReport) {\n var flagSettingsRequest;\n var lastFlagSettingsCallback;\n\n var requestor = {};\n\n requestor.fetchFlagSettings = function(user, hash, callback) {\n var data;\n var endpoint;\n var body;\n var cb;\n\n if (useReport) {\n endpoint = [baseUrl, '/sdk/eval/', environment, '/user', hash ? '?h=' + hash : ''].join('');\n body = user;\n } else {\n data = utils.base64URLEncode(JSON.stringify(user));\n endpoint = [baseUrl, '/sdk/eval/', environment, '/users/', data, hash ? '?h=' + hash : ''].join('');\n }\n\n var wrappedCallback = (function(currentCallback) {\n return function() {\n currentCallback.apply(null, arguments);\n flagSettingsRequest = null;\n lastFlagSettingsCallback = null;\n };\n })(callback);\n\n\n if (flagSettingsRequest) {\n flagSettingsRequest.abort();\n cb = (function(prevCallback) {\n return function() {\n prevCallback && prevCallback.apply(null, arguments);\n wrappedCallback.apply(null, arguments);\n };\n })(lastFlagSettingsCallback);\n } else {\n cb = wrappedCallback;\n }\n\n lastFlagSettingsCallback = cb;\n flagSettingsRequest = fetchJSON(endpoint, body, cb);\n };\n\n requestor.fetchGoals = function(callback) {\n var endpoint = [baseUrl, '/sdk/goals/', environment].join('');\n fetchJSON(endpoint, null, callback);\n };\n\n return requestor;\n}\n\nmodule.exports = Requestor;\n","var utils = require('./utils');\n\nfunction sanitizeUser(u) {\n var sane = utils.clone(u);\n if (sane.key) {\n sane.key = sane.key.toString();\n }\n return sane;\n}\n\nfunction Identity(initialUser, onChange) {\n var ident = {};\n var user;\n \n ident.setUser = function(u) {\n user = sanitizeUser(u);\n onChange(utils.clone(user));\n };\n \n ident.getUser = function() {\n return utils.clone(user);\n };\n \n if (initialUser) {\n ident.setUser(initialUser);\n }\n \n return ident;\n}\n\nmodule.exports = Identity;\n","var messages = require('./messages');\n\nfunction get(key) {\n try {\n return window.localStorage.getItem(key);\n } catch (ex) {\n console.warn(messages.localStorageUnavailable());\n }\n}\n\nfunction set(key, item) {\n try {\n window.localStorage.setItem(key, item);\n } catch (ex) {\n console.warn(messages.localStorageUnavailable());\n }\n}\n\nfunction clear(key) {\n set(key, null);\n}\n\nmodule.exports = {\n get: get,\n set: set,\n clear: clear,\n};\n","import UAParser from 'ua-parser-js';\nimport * as config from 'ofxSettings';\n\nconst userAgentParser = new UAParser();\nconst isMobileDevice =\n typeof window !== 'undefined' && userAgentParser.getDevice().type === 'mobile';\nconst isTabletDevice =\n typeof window !== 'undefined' && userAgentParser.getDevice().type === 'tablet';\n\nconst defaultUser = {\n key: 'FEC User',\n};\n\nexport const createLdUser = (ldUser = {}) => {\n let device;\n\n if (isMobileDevice) {\n device = 'mobile';\n } else if (isTabletDevice) {\n device = 'tablet';\n } else {\n device = 'desktop';\n }\n\n return {\n ...defaultUser,\n custom: {\n browser: userAgentParser.getResult().browser.name,\n device,\n ...ldUser.custom,\n },\n };\n};\n\nexport const getLdClientKey = () => config.launchDarklyKey;\n","import ldFlags from './ldFlags';\nimport { IAVTypes } from './IAVTypes';\n\nexport default {\n [ldFlags.enableDirectDebitPoa]: false,\n [ldFlags.enableComplianceModeByCountry]: false,\n [ldFlags.userRegistrationRecaptcha]: false,\n [ldFlags.mouseFlow]: false,\n [ldFlags.enabledIncomingTransfer]: false,\n [ldFlags.enableAttachRecipientLater]: false,\n [ldFlags.enableIAV]: IAVTypes.MANUAL,\n [ldFlags.ofxLiteSMSEnabled]: true,\n [ldFlags.mfaNoticeEnabled]: false,\n [ldFlags.addMobileFieldForCorpRego]: false,\n [ldFlags.brexitBannerEnabled]: false,\n [ldFlags.allowLimitOrders]: false,\n [ldFlags.bankDetailsChangedMessage]: true,\n [ldFlags.enableMgp]: false,\n [ldFlags.enableAethos]: false,\n [ldFlags.corEnabled]: false,\n [ldFlags.oktaSecureEnable]: false,\n [ldFlags.hideDLCardNumber]: false,\n [ldFlags.changeEmailFieldToUsername]: false,\n [ldFlags.enableAddEditRecipientFraudWarning]: false,\n [ldFlags.isUsdCaEftEnabled]: false,\n [ldFlags.oktaAlternateMfaSecure]: false,\n [ldFlags.oktaAlternateMfaFxsnet]: false,\n [ldFlags.enableKycUplift]: false,\n\n // This is the OFF state of the flag\n [ldFlags.onfidoReleaseDates]: {\n individual: {\n CanadianForex: 1599746400000, // 11th Sept\n USForex: 1603285200000, // Oct 22 2020 00:00:00 GMT+1100\n // SingForex: 1635322729749,\n // HKForex: 1635322729749,\n IEOFX: 1618855200000, // Tue Apr 20 2021 04:00:00 GMT+1000 (AEST)\n },\n corporate: {\n CanadianForex: 1603285200000, // Oct 22 2020 00:00:00 GMT+1100\n USForex: 1605704400000, // Nov 19th 2020\n // SingForex: 1603285200000,\n // HKForex: 1603285200000,\n IEOFX: 1618855200000, // Tue Apr 20 2021 04:00:00 GMT+1000 (AEST)\n },\n },\n [ldFlags.secureHolidayBanner]: {},\n [ldFlags.enableMobileDeviceVerification]: false,\n};\n","import * as React from 'react';\nimport { IFeatureFlagsProviderState, ILdCustomUserFields } from './FeatureFlagsProvider';\nimport { FeatureFlagsContext } from './FeatureFlagsContext';\n\nexport interface IFeatureFlagsConsumerChildrenWrapperProps {\n flagKey: string;\n customUserFields?: ILdCustomUserFields;\n value: IFeatureFlagsProviderState;\n children?: JSX.Element;\n}\n\nconst withProviderValue = (\n ConsumerChildrenWrapper: React.ComponentType,\n) => (props: IFeatureFlagsConsumerChildrenWrapperProps) => (\n \n {(value: IFeatureFlagsProviderState) => (\n \n )}\n \n);\n\nexport class FeatureFlagsConsumerChildrenWrapper extends React.Component<\n IFeatureFlagsConsumerChildrenWrapperProps\n> {\n constructor(props: IFeatureFlagsConsumerChildrenWrapperProps) {\n super(props);\n }\n\n componentDidMount() {\n if (this.props.customUserFields) {\n this.props.value.updateUser(this.props.customUserFields);\n }\n }\n render() {\n return (\n !!this.props.value.flags[this.props.flagKey] && (\n {this.props.children}\n )\n );\n }\n}\n\nexport default withProviderValue(FeatureFlagsConsumerChildrenWrapper);\n","import * as React from 'react';\nimport { FeatureFlagsContext } from './FeatureFlagsContext';\nimport { IFeatureFlagsProviderState } from './FeatureFlagsProvider';\n\nexport interface IFeatureFlagsDecoratorChildrenProps {\n value: IFeatureFlagsProviderState;\n}\n\nconst FeatureFlagsDecorator = (\n Component: React.ComponentType,\n) => (props: IFeatureFlagsDecoratorChildrenProps) => (\n \n {(value: IFeatureFlagsProviderState) => }\n \n);\n\nexport default FeatureFlagsDecorator;\n","var Base64 = require('Base64');\n\n// See http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\nfunction btoa(s) {\n return Base64.btoa(unescape(encodeURIComponent(s)));\n}\n\nfunction base64URLEncode(s) {\n return btoa(s)\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n}\n\nfunction clone(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n\nfunction modifications(oldObj, newObj) {\n var mods = {};\n if (!oldObj || !newObj) { return {}; }\n for (var prop in oldObj) {\n if (oldObj.hasOwnProperty(prop)) {\n if (newObj[prop] !== oldObj[prop]) {\n mods[prop] = {previous: oldObj[prop], current: newObj[prop]};\n }\n }\n }\n\n return mods;\n}\n\n// Events emmited in LDClient's initialize method will happen before the consumer\n// can register a listener, so defer them to next tick.\nfunction onNextTick(cb) {\n setTimeout(cb, 0);\n}\n\n// Based off of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\nfunction merge(target, varArgs) { // .length of function is 2\n 'use strict';\n \n if (target == null) { // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var to = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n\n if (nextSource != null) { // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n}\n\n/**\n * Wrap a promise to invoke an optional callback upon resolution or rejection.\n * \n * This function assumes the callback follows the Node.js callback type: (err, value) => void\n * \n * If a callback is provided:\n * - if the promise is resolved, invoke the callback with (null, value)\n * - if the promise is rejected, invoke the callback with (error, null)\n * \n * @param {Promise} promise \n * @param {Function} callback \n * @returns Promise\n */\nfunction wrapPromiseCallback(promise, callback) {\n return promise.then(\n function(value) {\n if (callback) {\n setTimeout(function() { callback(null, value); }, 0);\n }\n return value;\n },\n function(error) {\n if (callback) {\n setTimeout(function() { callback(error, null); }, 0);\n }\n return Promise.reject(error);\n }\n );\n}\n\nmodule.exports = {\n btoa: btoa,\n base64URLEncode: base64URLEncode,\n clone: clone,\n modifications: modifications,\n merge: merge,\n onNextTick: onNextTick,\n wrapPromiseCallback: wrapPromiseCallback\n};\n","import FeatureFlagsProvider from './FeatureFlagsProvider';\nimport FeatureFlagsConsumer from './FeatureFlagsConsumer';\nimport FeatureFlagsDecorator, {\n IFeatureFlagsDecoratorChildrenProps,\n} from './FeatureFlagsDecorator';\nimport { FeatureFlagsContext } from './FeatureFlagsContext';\n\nexport {\n FeatureFlagsProvider,\n FeatureFlagsConsumer,\n FeatureFlagsDecorator,\n IFeatureFlagsDecoratorChildrenProps,\n FeatureFlagsContext,\n};\n","import * as React from 'react';\nimport LdFlagsDefaultValues from 'constants/ldFlagsDefaultValues';\n\nexport const initialFlagValues = LdFlagsDefaultValues;\nexport const FeatureFlagsContext = React.createContext({\n flags: initialFlagValues,\n updateUser: (): void => {},\n});\n","export default {\n userRegistrationRecaptcha: 'user-registration-recaptcha-enabled',\n mouseFlow: 'mouse-flow-enabled',\n enabledIncomingTransfer: 'allow-incoming-transfer',\n enableAttachRecipientLater: 'enable-attach-tba-recipient',\n enableIAV: 'enable-iav',\n ofxLiteSMSEnabled: 'ofx-lite-sms-enabled',\n mfaNoticeEnabled: 'mfa-notice-enabled',\n addMobileFieldForCorpRego: 'add-mobile-field-for-corp-rego',\n brexitBannerEnabled: 'brexit-banner-enabled',\n enableTransferContactMessage: 'enable-transfer-contact-message',\n covid19BannerEnabled: 'covid-19-banner-enabled',\n allowLimitOrders: 'allow-limit-orders',\n autoOptInToNewTransferDate: 'auto-opt-in-to-new-transfer-date',\n bankDetailsChangedMessage: 'bank-details-changed-message',\n useNewTransfer: 'use-new-transfer',\n enableMgp: 'enable-mgp',\n enableAethos: 'enable-aethos',\n onfidoReleaseDates: 'onfido-release-dates',\n corEnabled: 'cor-enabled',\n oktaSecureEnable: 'okta-secure-enable',\n enableUpdatedTNCBanner: 'new-tnc-banner-enabled',\n enableComplianceModeByCountry: 'enable-compliance-mode-by-country',\n hideDLCardNumber: 'hide-drivers-licence-card-number',\n changeEmailFieldToUsername: 'change-email-field-to-username',\n enableDynamicBackendFrontend: 'enable-dynamic-backend-and-frontend',\n enableAddEditRecipientFraudWarning: 'enable-add-edit-recipient-fraud-warning',\n isUsdCaEftEnabled: 'enable-usd-ca-eft',\n oktaAlternateMfaSecure: 'okta-alternative-mfa-secure',\n oktaAlternateMfaFxsnet: 'okta-alternative-mfa-fxsnet',\n secureMfaAtLoginBanner: 'secure-mfa-at-login-banner',\n secureHolidayBanner: 'secure-holiday-banner',\n enableCorporateOnboardingFrontEnd: 'enable-corporate-onboarding-front-end',\n enableDirectDebitPoa: 'enable-direct-debit-poa',\n enableMobileDeviceVerification: 'enable-mobile-device-verification',\n enableKycUplift: 'enable-kyc-uplift',\n};\n","var docLink = ' Please see https://docs.launchdarkly.com/docs/js-sdk-reference#section-initializing-the-client for instructions on SDK initialization.';\n\nmodule.exports = {\n clientNotReady: function() {\n return 'LaunchDarkly client is not ready';\n },\n invalidKey: function() {\n return 'Event key must be a string';\n },\n localStorageUnavailable: function() {\n return 'localStorage is unavailable';\n },\n unknownCustomEventKey: function(key) {\n return 'Custom event \"' + key + '\" does not exist';\n },\n environmentNotFound: function() {\n return 'Environment not found.' + docLink;\n },\n environmentNotSpecified: function() {\n return 'No environment specified.' + docLink;\n },\n errorFetchingFlags: function(err) {\n return 'Error fetching flag settings: ' + (err.message || err);\n },\n userNotSpecified: function() {\n return 'No user specified.' + docLink;\n },\n invalidUser: function() {\n return 'Invalid user specified.' + docLink;\n }\n};\n","function createCustomError(name) {\n function CustomError(message, code) {\n Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);\n this.message = message;\n this.code = code;\n }\n\n CustomError.prototype = new Error();\n CustomError.prototype.name = name;\n CustomError.prototype.constructor = CustomError;\n\n return CustomError;\n}\n\nexports.LDUnexpectedResponseError = createCustomError('LaunchDarklyUnexpectedResponseError');\nexports.LDInvalidEnvironmentIdError = createCustomError('LaunchDarklyInvalidEnvironmentIdError');\nexports.LDInvalidUserError = createCustomError('LaunchDarklyInvalidUserError');\nexports.LDInvalidEventKeyError = createCustomError('LaunchDarklyInvalidEventKeyError');\nexports.LDInvalidArgumentError = createCustomError('LaunchDarklyInvalidArgumentError');\nexports.LDFlagFetchError = createCustomError('LaunchDarklyFlagFetchError');\n","export enum IAVTypes {\n MANUAL = 'manual',\n PLAID = 'plaid',\n INIT = 'init',\n}\n"],"sourceRoot":""}