{"version":3,"sources":["webpack://[name]/webpack/bootstrap","webpack://[name]/./ts/constants/styles.ts","webpack://[name]/./ts/SiteSearch.ts","webpack://[name]/./ts/generic/helpers/Debounce.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","StyleConstants","DefaultFontFamily","DefaultFontSize","CollapseBusStopInfoSize","MenuBreakPoint","SubMenuBreakPoint","SearchCollapse","Colors","IconFontWeight","IconFontColor","IconFontFamily","IconSize","Width","Height","Scale","Count","siteSearchForm","document","getElementById","siteSearchLink","screenType","tearDownFunction","setScreenType","newScreenType","width","window","innerWidth","detectScreenType","classList","add","setAttribute","remove","removeAttribute","debouncedSetScreenType","debounce","addEventListener","cb","wait","h","args","clearTimeout","setTimeout"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD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AC,EA8BJ,SAASC,IAQR,MAAMC,EANN,WACC,MAAMC,EAAQC,OAAOC,WAErB,OADiBF,GAASA,GAAS,EAAAxB,eAAeM,eAChC,SAAW,UAGRqB,GAGlBP,IAAeG,IAEdF,GACHA,IAGDA,EAAqC,YAAlBE,GA3CpBJ,EAAeS,UAAUC,IAAI,QAC7BV,EAAeW,aAAa,cAAe,QAC3CX,EAAeW,aAAa,WAAY,MAExCd,EAAeY,UAAUG,OAAO,QAChCf,EAAegB,gBAAgB,eAC/BhB,EAAegB,gBAAgB,YAExB,eAMPb,EAAeS,UAAUG,OAAO,QAChCZ,EAAea,gBAAgB,eAC/Bb,EAAea,gBAAgB,YAE/BhB,EAAeY,UAAUC,IAAI,QAC7Bb,EAAec,aAAa,cAAe,QAC3Cd,EAAec,aAAa,WAAY,MAEjC,cAyBNV,EAAaG,GAIfD,IACA,MAAMW,EAAyB,EAAAC,SAASZ,EAAe,KACvDG,OAAOU,iBAAiB,SAAUF,IA/DnC,I,kGCFA,oBAA6CG,EAAOC,EAAO,IAC1D,IAAIC,EAAI,EAKR,MAJe,IAAIC,KAClBC,aAAaF,GACbA,EAAIb,OAAOgB,WAAW,IAAML,KAAMG,GAAOF","file":"siteSearch.b0fe3211e71c8c382ac7.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 352);\n","/** Constants for styling elements */\r\nexport module StyleConstants {\r\n\r\n/** The default font size for the applicaiton */\r\n\r\n\texport const DefaultFontFamily: string = 'Interstate, sans-serif';\r\n\texport const DefaultFontSize: number = 16;\r\n\r\n\t/** The size at which to collapse the bus stop info page into one column */\r\n\texport const CollapseBusStopInfoSize: number = 1104;\r\n\r\n\texport const MenuBreakPoint: number = 817;\r\n\texport const SubMenuBreakPoint: number = 992;\r\n\r\n\texport const SearchCollapse: number = 1560;\r\n\r\n\texport const Colors: string[] = [\r\n\t\t'e10027',\r\n\t\t'002f87',\r\n\t\t'318d3a',\r\n\t\t'cb3e17',\r\n\t\t'671973',\r\n\t\t'008891'\r\n\t];\r\n\r\n\texport const IconFontWeight: number = 900;\r\n\texport const IconFontColor: string = '#000';\r\n\texport const IconFontFamily: string = 'Interstate, sans-serif';\r\n\r\n\texport const IconSize: { [key: string]: number } = {\r\n\t\tWidth: 26,\r\n\t\tHeight: 32,\r\n\t\tScale: 1.5,\r\n\t\tCount: 6\r\n\t};\r\n\r\n}\r\n","import { StyleConstants } from './constants/styles';\r\nimport { debounce } from './generic/helpers/Debounce';\r\n\r\ntype ScreenType = 'mobile' | 'desktop';\r\n\r\n(() => {\r\n\r\n\tconst siteSearchForm: HTMLFormElement = document.getElementById('site-search-form') as HTMLFormElement;\r\n\tconst siteSearchLink: HTMLAnchorElement = document.getElementById('site-search-link') as HTMLAnchorElement;\r\n\r\n\tlet screenType: ScreenType | undefined;\r\n\tlet tearDownFunction: () => void | undefined;\r\n\r\n\tfunction setupDesktopSearch(): () => void {\r\n\r\n\t\tsiteSearchLink.classList.add('hide');\r\n\t\tsiteSearchLink.setAttribute('aria-hidden', 'true');\r\n\t\tsiteSearchLink.setAttribute('tabindex', '-1');\r\n\r\n\t\tsiteSearchForm.classList.remove('hide');\r\n\t\tsiteSearchForm.removeAttribute('aria-hidden');\r\n\t\tsiteSearchForm.removeAttribute('tabindex');\r\n\r\n\t\treturn function tearDown(): void {\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setupMobileSearch(): () => void {\r\n\r\n\t\tsiteSearchLink.classList.remove('hide');\r\n\t\tsiteSearchLink.removeAttribute('aria-hidden');\r\n\t\tsiteSearchLink.removeAttribute('tabindex');\r\n\r\n\t\tsiteSearchForm.classList.add('hide');\r\n\t\tsiteSearchForm.setAttribute('aria-hidden', 'true');\r\n\t\tsiteSearchForm.setAttribute('tabindex', '-1');\r\n\r\n\t\treturn function tearDown(): void {\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setScreenType(): void {\r\n\r\n\t\tfunction detectScreenType(): ScreenType {\r\n\t\t\tconst width = window.innerWidth;\r\n\t\t\tconst isMobile = width && width <= StyleConstants.SearchCollapse;\r\n\t\t\treturn isMobile ? 'mobile' : 'desktop';\r\n\t\t}\r\n\r\n\t\tconst newScreenType = detectScreenType();\r\n\r\n\t\t// only act if it's changed\r\n\t\tif (screenType !== newScreenType) {\r\n\r\n\t\t\tif (tearDownFunction) {\r\n\t\t\t\ttearDownFunction();\r\n\t\t\t}\r\n\r\n\t\t\ttearDownFunction = newScreenType === 'desktop'\r\n\t\t\t\t? setupDesktopSearch()\r\n\t\t\t\t: setupMobileSearch();\r\n\r\n\t\t\tscreenType = newScreenType;\r\n\t\t}\r\n\t}\r\n\r\n\tsetScreenType();\r\n\tconst debouncedSetScreenType = debounce(setScreenType, 100);\r\n\twindow.addEventListener('resize', debouncedSetScreenType);\r\n})();\r\n","/**\r\n * Enforce that a function not be called until a certain amount of time has passed without it being called.\r\n */\r\nexport function debounce(cb: T, wait = 20) {\r\n\tlet h = 0;\r\n\tlet callable = (...args: any) => {\r\n\t\tclearTimeout(h);\r\n\t\th = window.setTimeout(() => cb(...args), wait);\r\n\t};\r\n\treturn (callable);\r\n}\r\n"],"sourceRoot":""}