{"version":3,"sources":["webpack:///./src/shared/utilities/screenSize.js","webpack:///./src/shared/utilities/when-in-view.js","webpack:///./node_modules/process/browser.js","webpack:///./src/components/molecules/content-scroll-shadow/content-scroll-shadow.js","webpack:///./src/shared/utilities/debounce.js","webpack:///./src/shared/utilities/pubsub.js","webpack:///./src/framework/base/base.js","webpack:///./src/shared/utilities/case.ts","webpack:///./src/shared/utilities/id.ts","webpack:///./src/shared/utilities/show-hide.ts","webpack:///./src/shared/utilities/addListenerOnce.js","webpack:///./src/shared/utilities/effectsEndEventHandler.js","webpack:///./src/shared/utilities/deviceDetection.js","webpack:///./node_modules/normalize-scroll-left/esm/main.js"],"names":["defaultWidths","sm","md","lg","xl","getBreakpoint","window","getComputedStyle","document","querySelector","getPropertyValue","replace","screenSmallerThan","size","widths","arguments","length","undefined","Object","prototype","hasOwnProperty","call","Error","concat","keys","join","innerWidth","screenGreatOrEqualTo","whenInView","elm","options","threshold","Promise","acc","then","obs","IntersectionObserver","entries","isIntersecting","intersectionRatio","disconnect","observe","cachedSetTimeout","cachedClearTimeout","process","module","exports","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","e","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","args","Array","i","push","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","contentShadowClasses","scrollShadowLeft","scrollShadowRight","scrollShadowBoth","scrollShadowClasses","removeScrollClasses","el","forEach","className","classList","remove","isRtl","ContentScrollShadow","_BaseBehavior","element","_this","_classCallCheck","_callSuper","initDomCache","horizontalScrollInitialized","shadowContent","hasAttribute","getAttribute","direction","contentPlaceholder","arrow","arrowPlaceholder","isDevice","deviceDetection","mobile","initScrollShadow","_inherits","key","value","_this2","handleHorizontalScrollDebounced","debounce","handleHorizontalScroll","bind","lastRecordedWindowWidth","handleResizeDebounced","clientWidth","showElement","hideElement","addEventListener","_this3","addEventListeners","removeEventListener","_this4","add","onEffectEndEvent","scrollLeft","getNormalizedScrollLeft","animateArrow","BaseBehavior","func","wait","immediate","_len","_key","later","callNow","pubsub","PubSub","subscriptions","topic","_step","_iterator","_createForOfIteratorHelper","s","n","done","fn","err","f","index","splice","state","events","behaviorName","camelCaseToDashCase","instanceId","generateId","attachInstanceId","partialState","_objectSpread","setAttribute","removeAttribute","dom","from","querySelectorAll","filter","closest","ref","dashCaseToCamelCase","split","console","error","delay","breakpoint","publish","debouncedGetBreakpoint","newBreakPoint","event","useCapture","obj","subscribe","unsubscribe","navigation","getBoundingClientRect","bottom","scrollY","scroll","reason","promise","log","str","toLowerCase","x","chr","toUpperCase","alphabet","id","charAt","Math","floor","random","addEventListenerOnce","type","listener","effects","transition","endEvent","endEventsList","OTransition","MozTransition","WebkitTransition","animation","OAnimation","MozAnimation","WebkitAnimation","whichEffectEndEvent","createElement","reduce","a","c","style","callback","devicesRegExps","ios","RegExp","recognizedDevices","deviceClasses","addDeviceDocumentClass","device","documentElement","removeDeviceDocumentClass","navigator","platform","test","userAgent","cachedType","inDOM","detectScrollType","body","dummy","appendChild","createTextNode","fontSize","width","height","position","top","overflow","removeChild","Number","NaN","scrollWidth","setNormalizedScrollLeft"],"mappings":"0FAAA,sGAAO,IAAMA,EAAgB,CAC5BC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAIQC,EAAgB,WAAH,OACzBC,OACEC,iBAAiBC,SAASC,cAAc,QAAS,WACjDC,iBAAiB,WACjBC,QAAQ,KAAM,KAGV,SAASC,EAAkBC,GAA8B,IAAxBC,EAAMC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGf,EAChD,IAAKkB,OAAOC,UAAUC,eAAeC,KAAKP,EAAQD,GACjD,MAAM,IAAIS,MAAM,wBAADC,OAAyBL,OAAOM,KAAKV,GAAQW,KAAK,QAElE,OAAOnB,OAAOoB,WAAa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AGJ,SAAS7G,EAAwBtC,EAASS,GAC7C,IAAI4B,EAAarC,EAAQqC,WAEzB,GAAkB,QAAd5B,EACA,OAAO4B,EAEX,IAAI6E,EAAOmC,IACX,GAAa,kBAATnC,EACA,OAAO+C,OAAOC,IAElB,OAAQhD,GACJ,IAAK,WACD,OAAOlH,EAAQmK,YAAcnK,EAAQ2B,YAAcU,EACvD,IAAK,UACD,OAAOrC,EAAQmK,YAAcnK,EAAQ2B,YAAcU,EAE3D,OAAOA,EAEJ,SAAS+H,EAAwBpK,EAASqC,EAAY5B,GAEzD,GAAkB,QAAdA,EAAJ,CAIA,IAAIyG,EAAOmC,IACX,GAAa,kBAATnC,EAGJ,OAAQA,GACJ,IAAK,WACDlH,EAAQqC,WAAarC,EAAQ2B,YAAc3B,EAAQmK,YAAc9H,EACjE,MACJ,IAAK,UACDrC,EAAQqC,WAAarC,EAAQmK,YAAcnK,EAAQ2B,YAAcU,EACjE,MACJ,QACIrC,EAAQqC,WAAaA,QAfzBrC,EAAQqC,WAAaA","file":"8-7720ec1c.js","sourcesContent":["export const defaultWidths = {\r\n\tsm: 768,\r\n\tmd: 1024,\r\n\tlg: 1280,\r\n\txl: 1400\r\n};\r\n\r\n// getBreakpoint :: Void -> String\r\nexport const getBreakpoint = () =>\r\n\twindow\r\n\t\t.getComputedStyle(document.querySelector('body'), ':before')\r\n\t\t.getPropertyValue('content')\r\n\t\t.replace(/\"/g, '');\r\n\r\n// function :: String -> ?Object -> Boolean\r\nexport function screenSmallerThan(size, widths = defaultWidths) {\r\n\tif (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n\t\tthrow new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n\t}\r\n\treturn window.innerWidth < widths[size];\r\n}\r\n\r\nexport function screenGreatOrEqualTo(size, widths = defaultWidths) {\r\n\tif (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n\t\tthrow new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n\t}\r\n\treturn window.innerWidth >= widths[size];\r\n}\r\n","export function whenInView(elm, options = { threshold: 0 }) {\r\n\treturn new Promise(acc => {\r\n\t\timport('intersection-observer').then(() => {\r\n\t\t\tconst obs = new IntersectionObserver(entries => {\r\n\t\t\t\tif (entries[0].isIntersecting && entries[0].intersectionRatio >= options.threshold) {\r\n\t\t\t\t\tacc();\r\n\t\t\t\t\tobs.disconnect();\r\n\t\t\t\t}\r\n\t\t\t}, options);\r\n\t\t\tobs.observe(elm);\r\n\t\t});\r\n\t});\r\n}\r\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import { getNormalizedScrollLeft } from 'normalize-scroll-left';\r\nimport BaseBehavior from '../../../framework/base/base';\r\nimport { debounce } from '../../../shared/utilities/debounce';\r\nimport { onEffectEndEvent } from '../../../shared/utilities/effectsEndEventHandler';\r\nimport { isDevice, deviceDetection } from '../../../shared/utilities/deviceDetection';\r\nimport { whenInView } from '../../../shared/utilities/when-in-view';\r\nimport { hideElement, showElement } from '../../../shared/utilities/show-hide';\r\n\r\nconst contentShadowClasses = {\r\n\tscrollShadowLeft: 'v2-content-scroll-shadow--left',\r\n\tscrollShadowRight: 'v2-content-scroll-shadow--right',\r\n\tscrollShadowBoth: 'v2-content-scroll-shadow--both'\r\n};\r\n\r\nconst scrollShadowClasses = {\r\n\tarrow: '.v2-content-scroll-shadow-arrow',\r\n\tcontent: '.v2-content-scroll-shadow__content',\r\n\tarrowAnimate: 'v2-content-scroll-shadow-arrow--animate',\r\n\tarrowPlaceholder: '.v2-content-scroll-shadow-arrow__ph'\r\n};\r\n\r\nconst removeScrollClasses = el => {\r\n\tObject.keys(contentShadowClasses).forEach(className => {\r\n\t\tel.classList.remove(contentShadowClasses[className]);\r\n\t});\r\n};\r\n\r\nlet isRtl = false;\r\nexport default class ContentScrollShadow extends BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\r\n\t\tthis.initDomCache();\r\n\t\tthis.horizontalScrollInitialized = false;\r\n\t\tthis.shadowContent = element.querySelector(\r\n\t\t\telement.hasAttribute('data-element') ? element.getAttribute('data-element') : 'table'\r\n\t\t);\r\n\t\tisRtl = window.getComputedStyle(element).direction === 'rtl';\r\n\t\tthis.contentPlaceholder = element.querySelector(scrollShadowClasses.content);\r\n\t\tthis.arrow = element.querySelector(scrollShadowClasses.arrow);\r\n\t\tthis.arrowPlaceholder = element.querySelector(scrollShadowClasses.arrowPlaceholder);\r\n\t\tif (isDevice(deviceDetection.mobile)) {\r\n\t\t\tthis.initScrollShadow();\r\n\t\t}\r\n\t}\r\n\r\n\taddEventListeners() {\r\n\t\tconst handleHorizontalScrollDebounced = debounce(() => {\r\n\t\t\tthis.handleHorizontalScroll();\r\n\t\t}, 5).bind(this);\r\n\r\n\t\tthis.lastRecordedWindowWidth = window.innerWidth;\r\n\t\tconst handleResizeDebounced = debounce(() => {\r\n\t\t\tif (this.lastRecordedWindowWidth === window.innerWidth) return;\r\n\t\t\tthis.lastRecordedWindowWidth = window.innerWidth;\r\n\t\t\tif (this.shadowContent.clientWidth > this.contentPlaceholder.clientWidth) {\r\n\t\t\t\tshowElement(this.arrowPlaceholder);\r\n\t\t\t\tthis.handleHorizontalScroll();\r\n\t\t\t} else {\r\n\t\t\t\tremoveScrollClasses(this.contentPlaceholder);\r\n\t\t\t\thideElement(this.arrowPlaceholder);\r\n\t\t\t}\r\n\t\t}, 250).bind(this);\r\n\r\n\t\tthis.addEventListener(this.contentPlaceholder, 'scroll', handleHorizontalScrollDebounced);\r\n\t\twindow.addEventListener('resize', handleResizeDebounced);\r\n\t}\r\n\r\n\tinitScrollShadow() {\r\n\t\twhenInView(this.contentPlaceholder).then(() => {\r\n\t\t\tif (this.horizontalScrollInitialized) return;\r\n\t\t\tdebounce(() => {\r\n\t\t\t\tif (this.shadowContent.clientWidth > this.contentPlaceholder.clientWidth) {\r\n\t\t\t\t\tshowElement(this.arrowPlaceholder);\r\n\t\t\t\t\tthis.handleHorizontalScroll();\r\n\t\t\t\t\tthis.addEventListeners();\r\n\t\t\t\t}\r\n\t\t\t}).bind(this)();\r\n\t\t\tthis.horizontalScrollInitialized = true;\r\n\t\t});\r\n\t}\r\n\r\n\tremoveEventListeners() {\r\n\t\tthis.removeEventListener(this.contentPlaceholder, 'scroll');\r\n\t\tthis.removeEventListener(window, 'resize');\r\n\t}\r\n\r\n\tanimateArrow() {\r\n\t\tthis.arrow.classList.add(scrollShadowClasses.arrowAnimate);\r\n\t\tonEffectEndEvent(\r\n\t\t\tthis.arrow,\r\n\t\t\t() => {\r\n\t\t\t\tthis.arrow.classList.remove(scrollShadowClasses.arrowAnimate);\r\n\t\t\t},\r\n\t\t\t'animation'\r\n\t\t);\r\n\t}\r\n\r\n\thandleHorizontalScroll() {\r\n\t\tconst { clientWidth } = this.contentPlaceholder;\r\n\t\tconst scrollLeft = isRtl\r\n\t\t\t? getNormalizedScrollLeft(this.contentPlaceholder, 'rtl')\r\n\t\t\t: getNormalizedScrollLeft(this.contentPlaceholder, 'ltr');\r\n\t\tif (scrollLeft > 0 && scrollLeft < this.shadowContent.clientWidth - clientWidth) {\r\n\t\t\tremoveScrollClasses(this.contentPlaceholder);\r\n\t\t\tthis.contentPlaceholder.classList.add(contentShadowClasses.scrollShadowBoth);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (scrollLeft === 0) {\r\n\t\t\tif (!isRtl) this.animateArrow();\r\n\t\t\tremoveScrollClasses(this.contentPlaceholder);\r\n\t\t\tisRtl\r\n\t\t\t\t? this.contentPlaceholder.classList.add(contentShadowClasses.scrollShadowLeft)\r\n\t\t\t\t: this.contentPlaceholder.classList.add(contentShadowClasses.scrollShadowRight);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (scrollLeft >= this.shadowContent.clientWidth - clientWidth) {\r\n\t\t\tremoveScrollClasses(this.contentPlaceholder);\r\n\t\t\tif (isRtl) this.animateArrow();\r\n\t\t\tisRtl\r\n\t\t\t\t? this.contentPlaceholder.classList.add(contentShadowClasses.scrollShadowRight)\r\n\t\t\t\t: this.contentPlaceholder.classList.add(contentShadowClasses.scrollShadowLeft);\r\n\t\t}\r\n\t}\r\n}\r\n","// debounce :: Function, Number, Bool -> (Any -> Void)\r\nexport function debounce(func, wait, immediate) {\r\n\tlet timeout;\r\n\treturn function debounced(...args) {\r\n\t\tconst later = () => {\r\n\t\t\ttimeout = null;\r\n\t\t\tif (!immediate) func(args);\r\n\t\t};\r\n\t\tconst callNow = immediate && !timeout;\r\n\t\tclearTimeout(timeout);\r\n\t\ttimeout = setTimeout(later, wait);\r\n\t\tif (callNow) func(args);\r\n\t};\r\n}\r\n","class PubSub {\r\n\tconstructor() {\r\n\t\tthis.subscriptions = {};\r\n\t}\r\n\r\n\tpublish(topic, ...args) {\r\n\t\tif (this.subscriptions[topic]) {\r\n\t\t\t// eslint-disable-next-line no-restricted-syntax\r\n\t\t\tfor (const fn of this.subscriptions[topic]) {\r\n\t\t\t\tfn(...args);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(topic, fn) {\r\n\t\tthis.subscriptions[topic] = this.subscriptions[topic] || [];\r\n\t\tthis.subscriptions[topic].push(fn);\r\n\t}\r\n\r\n\tunsubscribe(topic, fn) {\r\n\t\tif (this.subscriptions[topic]) {\r\n\t\t\tthis.subscriptions[topic].forEach((value, index) => {\r\n\t\t\t\tif (value === fn) {\r\n\t\t\t\t\tthis.subscriptions[topic].splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst pubsub = new PubSub();\r\n\r\nexport default pubsub;\r\n","import pubsub from '../../shared/utilities/pubsub';\r\nimport { generateId } from '../../shared/utilities/id';\r\nimport { camelCaseToDashCase, dashCaseToCamelCase } from '../../shared/utilities/case';\r\nimport { getBreakpoint } from '../../shared/utilities/screenSize';\r\nimport { debounce } from '../../shared/utilities/debounce';\r\n\r\nexport default class BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tthis.element = element;\r\n\t\tthis.state = undefined;\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptions = {};\r\n\t\tthis.behaviorName = camelCaseToDashCase(element.getAttribute('data-behavior'));\r\n\t\tthis.instanceId = generateId();\r\n\t\tthis.attachInstanceId();\r\n\t}\r\n\r\n\tsetState(partialState) {\r\n\t\tObject.keys(partialState).forEach(key => {\r\n\t\t\tif (!{}.hasOwnProperty.call(this.state, key)) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t`${this.behaviorName} does not have ${key} on the state object,\r\n\t\t\t\t\tmake sure to define all state properties in the constructor.`\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.state = { ...(this.state || {}), ...partialState };\r\n\t}\r\n\r\n\tattachInstanceId() {\r\n\t\tthis.element.setAttribute('data-instance', `${this.behaviorName}__${this.instanceId}`);\r\n\t\tthis.element.removeAttribute('data-instance-init');\r\n\t}\r\n\r\n\tinitDomCache() {\r\n\t\tthis.dom = {};\r\n\r\n\t\t// Filter out ref's that embedded in another instance of the same behavior.\r\n\t\tArray.from(this.element.querySelectorAll(`[data-ref^=${this.behaviorName}]`))\r\n\t\t\t.filter(el => el.closest(`[data-behavior*=\"${this.behaviorName}\"]`) === this.element)\r\n\t\t\t.forEach(element => {\r\n\t\t\t\tconst ref = element.getAttribute('data-ref');\r\n\t\t\t\tconst key = dashCaseToCamelCase(ref).split('__')[1];\r\n\r\n\t\t\t\tif (key) {\r\n\t\t\t\t\tthis.dom[key] = element;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.error(\r\n\t\t\t\t\t\t`Element cannot be cached. Reference \"${ref}\" should have the format \"behavior-name__element-name\"`\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublishBreakpointOnResize(delay = 250) {\r\n\t\tif (this.breakpoint) return;\r\n\r\n\t\tthis.breakpoint = getBreakpoint();\r\n\t\tthis.publish('SITE.BREAKPOINT', this.breakpoint);\r\n\r\n\t\tconst debouncedGetBreakpoint = debounce(() => {\r\n\t\t\tconst newBreakPoint = getBreakpoint();\r\n\t\t\tif (this.breakpoint !== newBreakPoint) {\r\n\t\t\t\tthis.publish('SITE.BREAKPOINT', newBreakPoint);\r\n\t\t\t\tthis.breakpoint = newBreakPoint;\r\n\t\t\t}\r\n\t\t}, delay);\r\n\r\n\t\twindow.addEventListener('resize', debouncedGetBreakpoint);\r\n\t}\r\n\r\n\taddEventListener(element, event, fn, useCapture = false) {\r\n\t\tif (element) {\r\n\t\t\tthis.events[event] = fn;\r\n\t\t\telement.addEventListener(event.split('.')[0], this.events[event], useCapture);\r\n\t\t}\r\n\t}\r\n\r\n\tremoveEventListener(element, event) {\r\n\t\telement.removeEventListener(event.split('.')[0], this.events[event]);\r\n\t\tthis.events[event] = null;\r\n\t\tdelete this.events[event];\r\n\t}\r\n\r\n\t// eslint-disable-next-line class-methods-use-this\r\n\tpublish(topic, obj) {\r\n\t\tpubsub.publish(topic, obj);\r\n\t}\r\n\r\n\tsubscribe(topic, fn) {\r\n\t\tthis.subscriptions[topic] = fn;\r\n\t\tpubsub.subscribe(topic, fn);\r\n\t}\r\n\r\n\tunsubscribe(topic) {\r\n\t\tpubsub.unsubscribe(topic, this.subscriptions[topic]);\r\n\t\tthis.subscriptions[topic] = null;\r\n\t\tdelete this.subscriptions[topic];\r\n\t}\r\n}\r\n\r\n// Below code is added for fixing scrolling issue on page refresh.\r\nwindow.addEventListener('load', () => {\r\n\tsetTimeout(() => {\r\n\t\tconst navigation = document.querySelector('#navigation');\r\n\t\t// eslint-disable-next-line\r\n\t\tif (navigation && navigation.getBoundingClientRect().bottom === scrollY) {\r\n\t\t\twindow.scroll(0, 0);\r\n\t\t}\r\n\t}, 0);\r\n});\r\n\r\nprocess.on('unhandledRejection', (reason, promise) => {\r\n\t// eslint-disable-next-line no-console\r\n\tconsole.log('Reason for this failure is : ', reason);\r\n\t// eslint-disable-next-line no-console\r\n\tconsole.log('promise is', promise);\r\n\t// Application specific logging, throwing an error, or other logic here\r\n});\r\n","export function camelCaseToDashCase(str: string): string {\r\n\treturn str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\r\n}\r\n\r\nexport function dashCaseToCamelCase(str: string): string {\r\n\treturn str.replace(/\\W+(.)/g, (x, chr) => chr.toUpperCase());\r\n}\r\n","const alphabet = '23456789ABDEGJKMNPQRVWXYZ';\r\n\r\nexport function generateId(length: number = 6): string {\r\n\tlet id:string = '';\r\n\r\n\tfor (let i:number = 0; i < length; i++) {\r\n\t\tid += alphabet.charAt(Math.floor(Math.random() * alphabet.length));\r\n\t}\r\n\r\n\treturn id;\r\n}\r\n","const hiddenClass = 'v2-hidden';\r\nexport const hideElement = (element:HTMLElement):void => element && element.classList.add(hiddenClass);\r\nexport const showElement = (element:HTMLElement):void => element && element.classList.remove(hiddenClass);\r\n","export const addEventListenerOnce = (element, type, listener) => {\r\n\telement.addEventListener(type, function fn(event) {\r\n\t\telement.removeEventListener(type, fn);\r\n\t\tlistener(event);\r\n\t});\r\n};\r\n","import { addEventListenerOnce } from './addListenerOnce';\r\n\r\nconst TRANSITION_END_EVENTS = {\r\n\ttransition: 'transitionend',\r\n\tOTransition: 'oTransitionEnd',\r\n\tMozTransition: 'transitionend',\r\n\tWebkitTransition: 'webkitTransitionEnd'\r\n};\r\n\r\nconst ANIMATION_END_EVENTS = {\r\n\tanimation: 'animationend',\r\n\tOAnimation: 'oAnimationEnd',\r\n\tMozAnimation: 'animationend',\r\n\tWebkitAnimation: 'webkitAnimationEnd'\r\n};\r\n\r\nexport const effects = {\r\n\ttransition: {\r\n\t\tendEvent: null,\r\n\t\tendEventsList: TRANSITION_END_EVENTS\r\n\t},\r\n\tanimation: {\r\n\t\tendEvent: null,\r\n\t\tendEventsList: ANIMATION_END_EVENTS\r\n\t}\r\n};\r\n\r\nexport const whichEffectEndEvent = (type = 'transition') => {\r\n\tif (effects[type].endEvent !== null) {\r\n\t\treturn effects[type].endEvent;\r\n\t}\r\n\tconst el = document.createElement('fakeelement');\r\n\teffects[type].endEvent = Object.keys(effects[type].endEventsList).reduce(\r\n\t\t(a, c) => a || (typeof el.style[c] !== 'undefined' ? effects[type].endEventsList[c] : a),\r\n\t\tfalse\r\n\t);\r\n\treturn effects[type].endEvent;\r\n};\r\n\r\nexport const onEffectEndEvent = (element, callback, type = 'transition', delay = 300) => {\r\n\tconst endEvent = whichEffectEndEvent(type);\r\n\tif (endEvent) {\r\n\t\taddEventListenerOnce(element, endEvent, callback);\r\n\t\treturn;\r\n\t}\r\n\tsetTimeout(callback, delay);\r\n};\r\n","const devicesRegExps = {\r\n\tios: new RegExp('iPad|iPhone|iPod'),\r\n\tmobile: new RegExp('Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini')\r\n};\r\n\r\nexport const recognizedDevices = {};\r\n\r\nconst deviceClasses = {\r\n\tios: 'v2-ios-device',\r\n\tmobile: 'v2-mobile-device'\r\n};\r\n\r\nexport const deviceDetection = {\r\n\tios: 'ios',\r\n\tmobile: 'mobile'\r\n};\r\n\r\nexport function addDeviceDocumentClass(device) {\r\n\tdocument.documentElement.classList.add(deviceClasses[device]);\r\n}\r\n\r\nexport function removeDeviceDocumentClass(device) {\r\n\tdocument.documentElement.classList.remove(deviceClasses[device]);\r\n}\r\n\r\nexport function isDevice(device) {\r\n\tif (device in recognizedDevices) {\r\n\t\treturn recognizedDevices[device];\r\n\t}\r\n\r\n\trecognizedDevices[device] =\r\n\t\t!!navigator.platform &&\r\n\t\tdevicesRegExps[device] &&\r\n\t\t(devicesRegExps[device].test(navigator.platform) ||\r\n\t\t\tdevicesRegExps[device].test(navigator.userAgent));\r\n\treturn (\r\n\t\t!!navigator.platform &&\r\n\t\tdevicesRegExps[device] &&\r\n\t\t(devicesRegExps[device].test(navigator.platform) ||\r\n\t\t\tdevicesRegExps[device].test(navigator.userAgent))\r\n\t);\r\n}\r\n","// Based on https://github.com/react-bootstrap/dom-helpers/blob/master/src/util/inDOM.js\r\nvar inDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\r\nvar cachedType;\r\nexport function _setScrollType(type) {\r\n cachedType = type;\r\n}\r\n// Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\r\nexport function detectScrollType() {\r\n if (cachedType) {\r\n return cachedType;\r\n }\r\n if (!inDOM || !window.document.body) {\r\n return 'indeterminate';\r\n }\r\n var dummy = window.document.createElement('div');\r\n dummy.appendChild(document.createTextNode('ABCD'));\r\n dummy.dir = 'rtl';\r\n dummy.style.fontSize = '14px';\r\n dummy.style.width = '4px';\r\n dummy.style.height = '1px';\r\n dummy.style.position = 'absolute';\r\n dummy.style.top = '-1000px';\r\n dummy.style.overflow = 'scroll';\r\n document.body.appendChild(dummy);\r\n cachedType = 'reverse';\r\n if (dummy.scrollLeft > 0) {\r\n cachedType = 'default';\r\n }\r\n else {\r\n dummy.scrollLeft = 2;\r\n if (dummy.scrollLeft < 2) {\r\n cachedType = 'negative';\r\n }\r\n }\r\n document.body.removeChild(dummy);\r\n return cachedType;\r\n}\r\n// Based on https://stackoverflow.com/a/24394376\r\nexport function getNormalizedScrollLeft(element, direction) {\r\n var scrollLeft = element.scrollLeft;\r\n // Perform the calculations only when direction is rtl to avoid messing up the ltr behavior\r\n if (direction !== 'rtl') {\r\n return scrollLeft;\r\n }\r\n var type = detectScrollType();\r\n if (type === 'indeterminate') {\r\n return Number.NaN;\r\n }\r\n switch (type) {\r\n case 'negative':\r\n return element.scrollWidth - element.clientWidth + scrollLeft;\r\n case 'reverse':\r\n return element.scrollWidth - element.clientWidth - scrollLeft;\r\n }\r\n return scrollLeft;\r\n}\r\nexport function setNormalizedScrollLeft(element, scrollLeft, direction) {\r\n // Perform the calculations only when direction is rtl to avoid messing up the ltr behavior\r\n if (direction !== 'rtl') {\r\n element.scrollLeft = scrollLeft;\r\n return;\r\n }\r\n var type = detectScrollType();\r\n if (type === 'indeterminate') {\r\n return;\r\n }\r\n switch (type) {\r\n case 'negative':\r\n element.scrollLeft = element.clientWidth - element.scrollWidth + scrollLeft;\r\n break;\r\n case 'reverse':\r\n element.scrollLeft = element.scrollWidth - element.clientWidth - scrollLeft;\r\n break;\r\n default:\r\n element.scrollLeft = scrollLeft;\r\n break;\r\n }\r\n}\r\n"],"sourceRoot":""}