{"version":3,"sources":["webpack:///./src/shared/utilities/screenSize.js","webpack:///./node_modules/process/browser.js","webpack:///./src/components/molecules/checkbox-dropdown/checkbox-dropdown.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/dropdownUtils.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","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","CheckboxDropdown","_BaseBehavior","element","_this","_classCallCheck","_callSuper","initDomCache","addEventListeners","dom","items","firstElementChild","checked","subscribe","_ref","dpElement","contains","firstOption","changeCheckboxesState","changeDropdownValue","publish","filterId","dataset","dropdownId","_inherits","_createClass","key","value","selectedElement","nodeName","target","closest","parentElement","hideOptions","publishChange","dpFilter","targetID","guid","children","selected","from","forEach","li","input","logo","logoContainer","innerHTML","outerHTML","innerText","textContent","trim","hideElement","toggleArrow","anchorElem","_this2","addEventListener","preventDefault","evt","classList","showOptions","onChange","bind","removeEventListener","removeEventListeners","BaseBehavior","debounce","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","getAttribute","instanceId","generateId","attachInstanceId","partialState","_objectSpread","setAttribute","removeAttribute","querySelectorAll","filter","el","ref","dashCaseToCamelCase","split","console","error","_this3","delay","breakpoint","debouncedGetBreakpoint","newBreakPoint","event","useCapture","obj","unsubscribe","navigation","getBoundingClientRect","bottom","scrollY","scroll","reason","promise","log","str","toLowerCase","x","chr","toUpperCase","alphabet","id","charAt","Math","floor","random","add","showElement","remove","fromCss","toCss","node","anchorMarker","domElement","otherDrp","drp","selector","dropDown"],"mappings":"2FAAA,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,WAAaZ,EAAOD,GAG5B,SAASc,EAAqBd,GAA8B,IAAxBC,EAAMC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGf,EACnD,IAAKkB,OAAOC,UAAUC,eAAeC,KAAKP,EAAQD,GACjD,MAAM,IAAIS,MAAM,wBAADC,OAAyBL,OAAOM,KAAKV,GAAQW,KAAK,QAElE,OAAOnB,OAAOoB,YAAcZ,EAAOD,K,kBCzBpC,IAOIe,EACAC,EARAC,EAAUC,EAAOC,QAAU,GAU/B,SAASC,IACL,MAAM,IAAIX,MAAM,mCAEpB,SAASY,IACL,MAAM,IAAIZ,MAAM,qCAsBpB,SAASa,EAAWC,GAChB,GAAIR,IAAqBS,WAErB,OAAOA,WAAWD,EAAK,GAG3B,IAAKR,IAAqBK,IAAqBL,IAAqBS,WAEhE,OADAT,EA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BAEX,SAAUpC,IAGf,IAH4C,IAAlBhK,EAAAD,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAiB,EACvCsM,EAAY,GAEP3J,EAAW,EAAGA,EAAI1C,EAAQ0C,IAClC2J,GAAMD,EAASE,OAAOC,KAAKC,MAAMD,KAAKE,SAAWL,EAASpM,SAG3D,OAAOqM,I,iCCTR,wEACahF,EAAc,SAAChD,GAAmB,OAAUA,GAAWA,EAAQuD,UAAU8E,IADlE,cAEPC,EAAc,SAACtI,GAAmB,OAAUA,GAAWA,EAAQuD,UAAUgF,OAFlE,e,iCCApB,iFAEO,SAAStF,EAAYC,EAAYsF,EAASC,GAAoB,IAAbC,EAAIhN,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KACxDiN,EAAeD,GAAQxF,EAAW9H,cAAc,kBACtDuN,EAAapF,UAAUgF,OAAOC,GAC9BG,EAAapF,UAAU8E,IAAII,GAErB,SAASjF,EAAYN,EAAY0F,GAGvC,IAAMC,EAAWzK,MAAMiE,KAAKlH,SAAS8K,iBAAiB,yBAClD4C,EAASlN,OAAS,GACrBkN,EAASvG,SAAQ,SAAAwG,GAChB,IAAMC,EAAWD,EAAIvF,UAAU1C,SAAS,wBACrC,wBACA,WACG6H,EAAOI,EAAI1N,cAAc,kBACzB4N,EAAWF,EAAI1N,cAAc2N,GACnC/F,YAAYgG,GACZ/F,EAAYC,EAAY,yBAA0B,2BAA4BwF,MAGhFJ,YAAYM,GACZ3F,EAAYC,EAAY,2BAA4B","file":"27-162181ab.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","// 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 BaseBehavior from '../../../framework/base/base';\r\nimport { hideElement } from '../../../shared/utilities/show-hide';\r\nimport { showOptions, toggleArrow } from '../../../shared/utilities/dropdownUtils';\r\n\r\nexport default class CheckboxDropdown extends BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\t\tthis.initDomCache();\r\n\t\tthis.addEventListeners();\r\n\t\t// default check first option\r\n\t\tthis.dom.items.firstElementChild.firstElementChild.checked = true;\r\n\t\tthis.subscribe('reset-to-default', ({ dpElement }) => {\r\n\t\t\tif (dpElement.contains(element)) {\r\n\t\t\t\tconst firstOption = this.dom.items.firstElementChild;\r\n\t\t\t\tthis.changeCheckboxesState(firstOption);\r\n\t\t\t\tthis.changeDropdownValue(firstOption);\r\n\t\t\t\tthis.publish('reset-done', { dpElement, filterId: element.dataset.dropdownId });\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tonChange(e) {\r\n\t\tconst { nodeName } = e.target;\r\n\t\tlet selectedElement;\r\n\t\tif (nodeName === 'UL') return false;\r\n\t\tif (e.target.closest('li').querySelector('input').checked) return false; // is already selected\r\n\r\n\t\tif (nodeName === 'LI') {\r\n\t\t\tselectedElement = e.target;\r\n\t\t} else {\r\n\t\t\tselectedElement = e.target.parentElement;\r\n\t\t}\r\n\r\n\t\tthis.changeCheckboxesState(selectedElement);\r\n\t\tthis.changeDropdownValue(selectedElement);\r\n\t\tthis.hideOptions();\r\n\t\tif (this.element.dataset.publishChange === 'true') {\r\n\t\t\tconst dpFilter = this.element.closest('.dynamic-pricing__filters');\r\n\t\t\tconst targetID = dpFilter ? dpFilter.dataset.guid : '';\r\n\t\t\tthis.publish(`/cb-dropdown/change`, {\r\n\t\t\t\tdropdownId: this.element.dataset.dropdownId,\r\n\t\t\t\tvalue: selectedElement.children[0].value,\r\n\t\t\t\ttargetID\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tchangeCheckboxesState(selected) {\r\n\t\t// have selected checkbox checked and others unchecked\r\n\t\tArray.from(this.dom.items.children).forEach(li => {\r\n\t\t\tli.firstElementChild.checked = li === selected;\r\n\t\t});\r\n\t}\r\n\r\n\tchangeDropdownValue(selected) {\r\n\t\tconst input = this.element.querySelector('.anchor-text--optional');\r\n\t\tconst logo = selected.querySelector('.instrument__logo');\r\n\t\tconst logoContainer = this.element.querySelector('.anchor-text--logo');\r\n\t\tif (logo && logoContainer) {\r\n\t\t\tlogoContainer.innerHTML = logo.outerHTML;\r\n\t\t}\r\n\t\tif (!logo && logoContainer) {\r\n\t\t\tlogoContainer.innerHTML = '';\r\n\t\t}\r\n\t\tinput.innerText = selected.textContent.trim();\r\n\t\tinput.dataset.value = selected.querySelector('input[type=checkbox]').value;\r\n\t}\r\n\r\n\thideOptions() {\r\n\t\thideElement(this.dom.items);\r\n\t\ttoggleArrow(this.dom.anchorElem, 'v2-arrow-indicator--up', 'v2-arrow-indicator--down');\r\n\t}\r\n\r\n\taddEventListeners() {\r\n\t\tthis.addEventListener(document, 'click', e => {\r\n\t\t\tif (e.target.closest('.dropdown-check-list')) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.hideOptions();\r\n\t\t});\r\n\t\tthis.addEventListener(this.dom.anchorElem, 'click', evt => {\r\n\t\t\tevt.preventDefault();\r\n\t\t\tif (this.dom.items.classList.contains('v2-hidden')) {\r\n\t\t\t\tshowOptions(this.dom.anchorElem, this.dom.items);\r\n\t\t\t} else {\r\n\t\t\t\tthis.hideOptions();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.addEventListener(this.dom.items, 'click', this.onChange.bind(this));\r\n\t}\r\n\r\n\tremoveEventListeners() {\r\n\t\tthis.removeEventListener(this.dom.items, 'click');\r\n\t\tthis.removeEventListener(this.dom.anchorElem, 'click');\r\n\t}\r\n\r\n\tcleanup() {\r\n\t\tthis.removeEventListeners();\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","import { showElement, hideElement } from './show-hide';\r\n\r\nexport function toggleArrow(anchorElem, fromCss, toCss, node = null) {\r\n\tconst anchorMarker = node || anchorElem.querySelector('.anchor-marker');\r\n\tanchorMarker.classList.remove(fromCss);\r\n\tanchorMarker.classList.add(toCss);\r\n}\r\nexport function showOptions(anchorElem, domElement) {\r\n\t// hide rest of checkbox dropdowns for\r\n\t// data-ref = checkbox-dropdown__items , .items\r\n\tconst otherDrp = Array.from(document.querySelectorAll('.dropdown-check-list'));\r\n\tif (otherDrp.length > 1) {\r\n\t\totherDrp.forEach(drp => {\r\n\t\t\tconst selector = drp.classList.contains('multiselect-dropdown')\r\n\t\t\t\t? 'div.dropdown-expanded'\r\n\t\t\t\t: 'ul.items';\r\n\t\t\tconst node = drp.querySelector('.anchor-marker');\r\n\t\t\tconst dropDown = drp.querySelector(selector);\r\n\t\t\thideElement(dropDown);\r\n\t\t\ttoggleArrow(anchorElem, 'v2-arrow-indicator--up', 'v2-arrow-indicator--down', node);\r\n\t\t});\r\n\t}\r\n\tshowElement(domElement);\r\n\ttoggleArrow(anchorElem, 'v2-arrow-indicator--down', 'v2-arrow-indicator--up');\r\n}\r\n"],"sourceRoot":""}