{"version":3,"sources":["webpack:///./src/shared/utilities/screenSize.js","webpack:///./node_modules/process/browser.js","webpack:///./src/components/organisms/institution-disclaimer/institution-disclaimer.js","webpack:///./src/shared/utilities/cookies.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/restrict-body-scroll.ts"],"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","InstitutionDisclaimer","_BaseBehavior","element","_this","_classCallCheck","_callSuper","initDomCache","timeoutDelay","self","timer","checkDOMReadyState","readyState","addEventListeners","init","cookiePopup","_inherits","_createClass","key","value","_this2","pubsub","subscribe","isCookiePopClosing","showInstitutionPopup","addEventListener","dom","acceptBtn","onAccept","bind","institutionConsent","getCookie","getIsCookiePopHidden","restrictBodyScroll","showElement","isCookiePopupRendered","Boolean","hideElement","preventDefault","setCookie","Date","getTime","hideInstitutionPopup","BaseBehavior","cname","ca","decodeURIComponent","cookie","split","c","charAt","substring","indexOf","expire","path","expires","toUTCString","debounce","func","wait","immediate","_len","_key","later","callNow","PubSub","subscriptions","topic","_step","_iterator","_createForOfIteratorHelper","s","n","done","fn","err","f","forEach","index","splice","state","events","behaviorName","camelCaseToDashCase","getAttribute","instanceId","generateId","attachInstanceId","partialState","_objectSpread","setAttribute","removeAttribute","from","querySelectorAll","filter","el","closest","ref","dashCaseToCamelCase","console","error","_this3","delay","breakpoint","publish","debouncedGetBreakpoint","newBreakPoint","event","useCapture","removeEventListener","obj","unsubscribe","navigation","getBoundingClientRect","bottom","scrollY","scroll","reason","promise","log","str","toLowerCase","x","chr","toUpperCase","alphabet","id","Math","floor","random","classList","add","remove","restrict","body"],"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,EAAmB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,UAAUE,OAAO,sBAJjC","file":"20-ee87a54e.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 { hideElement, showElement } from '../../../shared/utilities/show-hide';\r\nimport pubsub from '../../../shared/utilities/pubsub';\r\nimport BaseBehavior from '../../../framework/base/base';\r\nimport { getCookie, setCookie } from '../../../shared/utilities/cookies';\r\nimport restrictBodyScroll from '../../../shared/utilities/restrict-body-scroll';\r\n\r\nconst institutionCookieName = 'iit_institutionConsent';\r\nconst cookieConsentCookieName = 'CookieConsent';\r\n\r\nexport default class InstitutionDisclaimer extends BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\t\t// sections\r\n\t\tthis.initDomCache();\r\n\r\n\t\tlet timeoutDelay = 100;\r\n\t\tconst self = this;\r\n\t\tlet timer = setTimeout(function checkDOMReadyState() {\r\n\t\t\tif (document.readyState === 'complete') {\r\n\t\t\t\tself.addEventListeners();\r\n\t\t\t\tself.init();\r\n\t\t\t\tclearTimeout(timer);\r\n\t\t\t} else {\r\n\t\t\t\ttimeoutDelay += 100;\r\n\t\t\t\ttimer = setTimeout(checkDOMReadyState, timeoutDelay);\r\n\t\t\t}\r\n\t\t}, timeoutDelay);\r\n\r\n\t\tthis.cookiePopup = document.querySelector('#cookie-popup');\r\n\t}\r\n\r\n\taddEventListeners() {\r\n\t\t// subscribe to trigger\r\n\t\tpubsub.subscribe('institution-disclaimer/open', isCookiePopClosing => {\r\n\t\t\tthis.showInstitutionPopup(isCookiePopClosing);\r\n\t\t});\r\n\r\n\t\tthis.addEventListener(this.dom.acceptBtn, 'click.accept', this.onAccept.bind(this));\r\n\t}\r\n\r\n\tinit() {\r\n\t\tthis.showInstitutionPopup();\r\n\t}\r\n\r\n\t/**\r\n\t * set 'isCookiePopClosing' param to true on cookie popup close\r\n\t * as we cannot rely on 'cookieConset' cookie value just after\r\n\t * cookie pop up is being closed.\r\n\t */\r\n\tshowInstitutionPopup(isCookiePopClosing) {\r\n\t\tconst institutionConsent = getCookie(institutionCookieName);\r\n\t\tconst isCookiePopupHidden = this.getIsCookiePopHidden(isCookiePopClosing);\r\n\t\tif (isCookiePopupHidden && !institutionConsent) {\r\n\t\t\trestrictBodyScroll(true);\r\n\t\t\tshowElement(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgetIsCookiePopHidden(isCookiePopClosing) {\r\n\t\tconst isCookiePopupRendered = Boolean(this.cookiePopup);\r\n\t\tif (!isCookiePopupRendered) {\r\n\t\t\treturn !isCookiePopupRendered;\r\n\t\t}\r\n\r\n\t\tconst cookieConsent = getCookie(cookieConsentCookieName);\r\n\t\treturn cookieConsent || isCookiePopClosing;\r\n\t}\r\n\r\n\thideInstitutionPopup() {\r\n\t\trestrictBodyScroll(false);\r\n\t\thideElement(this.element);\r\n\t}\r\n\r\n\tonAccept(e) {\r\n\t\te.preventDefault();\r\n\t\tsetCookie(institutionCookieName, 'true', new Date().getTime() + 30 * 24 * 60 * 60 * 1000);\r\n\t\tthis.hideInstitutionPopup();\r\n\t}\r\n}\r\n","// eslint-disable-next-line import/no-unresolved, import/extensions\r\nexport const getCookie = cname => {\r\n\tconst name = cname + '=';\r\n\tconst decodedCookie = decodeURIComponent(document.cookie);\r\n\tconst ca = decodedCookie.split(';');\r\n\tfor (let i = 0; i < ca.length; i++) {\r\n\t\tlet c = ca[i];\r\n\t\twhile (c.charAt(0) === ' ') {\r\n\t\t\tc = c.substring(1);\r\n\t\t}\r\n\t\tif (c.indexOf(name) === 0) {\r\n\t\t\treturn c.substring(name.length, c.length);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nexport const setCookie = (name, value, expire = 0, path = '/') => {\r\n\tconst expires = expire ? `expires=${new Date(expire).toUTCString()};` : '';\r\n\tdocument.cookie = `${name}=${value};${expires}path=${path}`;\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 default function restrictBodyScroll(restrict:boolean): void {\r\n\tif (restrict) {\t\t\r\n\t\tdocument.body.classList.add('v2-overflow-hidden');\r\n\t} else {\r\n\t\tdocument.body.classList.remove('v2-overflow-hidden');\r\n\t}\r\n}\r\n"],"sourceRoot":""}