{"version":3,"sources":["webpack:///./src/js/modules/legacy/liftStatusReport/components/Header.js","webpack:///./src/js/modules/legacy/liftStatusReport/components/Table.js","webpack:///./src/js/modules/legacy/liftStatusReport/components/List.js","webpack:///./src/js/modules/legacy/liftStatusReport/index.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js"],"names":["Header","openLabel","closedLabel","holdLabel","getIcon","lastUpdated","className","xlinkHref","propTypes","PropTypes","string","isRequired","func","Table","liftLabel","typeLabel","hoursLabel","areaLabel","elevationGainLabel","timeLabel","liftStatuses","map","lift","key","liftName","status","toLowerCase","type","hoursOfOperation","area","elevationGainFeet","elevationGainMeters","time","array","List","LiftStatusReport","endpoint","feedKey","areaKey","isSummer","unavailableMessage","useState","report","setReport","loaded","setLoaded","useEffect","Axios","method","url","params","mountain","areas","data","console","log","fetchFeed","module","exports","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","ReactPropTypes","bool","number","object","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes"],"mappings":"wOAGMA,EAAS,SAAC,GAAD,IACbC,EADa,EACbA,UACAC,EAFa,EAEbA,YACAC,EAHa,EAGbA,UAEAC,GALa,EAIbC,YAJa,EAKbD,SALa,OAOb,yBAAKE,UAAU,8BACb,wBAAIA,UAAU,8BACZ,4BACE,yBAAKA,UAAU,iCACb,uCACA,yBAAKC,UAAWH,EAAQ,WAEzBH,GAEH,4BACE,yBAAKK,UAAU,mCACb,wCACA,yBAAKC,UAAWH,EAAQ,aAEzBF,GAEH,4BACE,yBAAKI,UAAU,iCACb,uCACA,yBAAKC,UAAWH,EAAQ,WAEzBD,MAMTH,EAAOQ,UAAY,CACjBP,UAAWQ,IAAUC,OAAOC,WAC5BT,YAAaO,IAAUC,OAAOC,WAC9BR,UAA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BG,UAAWL,IAAUC,OAAOC,WAC5BI,UAAWN,IAAUC,OAAOC,WAC5BK,WAAYP,IAAUC,OAAOC,WAC7BM,UAAWR,IAAUC,OAAOC,WAC5BO,mBAAoBT,IAAUC,OAAOC,WACrCQ,UAAWV,IAAUC,OAAOC,WAC5B6B,mBAAoB/B,IAAUC,OAAOC,YAGxBwB,a,oBCnGbsB,EAAOC,QAAU,EAAQ,IAAR,I,iCCRnB,IAAIC,EAAuB,EAAQ,KAEnC,SAASC,KACT,SAASC,KACTA,EAAuBC,kBAAoBF,EAE3CH,EAAOC,QAAU,WACf,SAASK,EAAKC,EAAOC,EAAUC,EAAeC,EAAUC,EAAcC,GACpE,GAAIA,IAAWV,EAAf,CAIA,IAAIW,EAAM,IAAIC,MACZ,mLAKF,MADAD,EAAIE,KAAO,sBACLF,GAGR,SAASG,IACP,OAAOV,EAFTA,EAAKpD,WAAaoD,EAMlB,IAAIW,EAAiB,CACnBzC,MAAO8B,EACPY,KAAMZ,EACNnD,KAAMmD,EACNa,OAAQb,EACRc,OAAQd,EACRrD,OAAQqD,EACRe,OAAQf,EAERgB,IAAKhB,EACLiB,QAASP,EACTQ,QAASlB,EACTmB,YAAanB,EACboB,WAAYV,EACZW,KAAMrB,EACNsB,SAAUZ,EACVa,MAAOb,EACPc,UAAWd,EACXe,MAAOf,EACPgB,MAAOhB,EAEPiB,eAAgB7B,EAChBC,kBAAmBF,GAKrB,OAFAc,EAAejE,UAAYiE,EAEpBA,I,iCCnDTjB,EAAOC,QAFoB","file":"30.b92ee38ab8e6fa5ef284.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Header = ({\n openLabel,\n closedLabel,\n holdLabel,\n lastUpdated,\n getIcon\n}) => (\n <div className=\"lift-status-report__header\">\n <ul className=\"lift-status-report__legend\">\n <li>\n <svg className=\"lift-status-report__open-icon\">\n <title>Open</title>\n <use xlinkHref={getIcon('open')} />\n </svg>\n {openLabel}\n </li>\n <li>\n <svg className=\"lift-status-report__closed-icon\">\n <title>Close</title>\n <use xlinkHref={getIcon('closed')} />\n </svg>\n {closedLabel}\n </li>\n <li>\n <svg className=\"lift-status-report__hold-icon\">\n <title>Hold</title>\n <use xlinkHref={getIcon('hold')} />\n </svg>\n {holdLabel}\n </li>\n </ul>\n </div>\n);\n\nHeader.propTypes = {\n openLabel: PropTypes.string.isRequired,\n closedLabel: PropTypes.string.isRequired,\n holdLabel: PropTypes.string.isRequired,\n lastUpdated: PropTypes.string.isRequired,\n getIcon: PropTypes.func.isRequired\n};\n\nexport default Header;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Table = ({\n liftLabel,\n typeLabel,\n hoursLabel,\n areaLabel,\n elevationGainLabel,\n timeLabel,\n liftStatuses,\n getIcon\n}) => (\n <table className=\"lift-status-report__table\">\n <thead>\n <tr>\n <th></th>\n <th>{liftLabel}</th>\n <th>{typeLabel}</th>\n <th>{hoursLabel}</th>\n <th>{areaLabel}</th>\n <th>{elevationGainLabel}</th>\n <th>{timeLabel}</th>\n </tr>\n </thead>\n <tbody>\n {liftStatuses.map(lift => (\n <tr key={lift.liftName}>\n <td>\n <svg\n className={`lift-status-report__${\n lift.status.toLowerCase() !== 'on hold'\n ? lift.status.toLowerCase()\n : 'hold'\n }-icon`}\n >\n <title>list</title>\n <use xlinkHref={getIcon(lift.status)} />\n </svg>\n </td>\n <td>{lift.liftName}</td>\n <td className=\"lift-status-report__table-value\">{lift.type}</td>\n <td className=\"lift-status-report__table-value\">\n {lift.hoursOfOperation}\n </td>\n <td className=\"lift-status-report__table-value\">{lift.area}</td>\n <td className=\"lift-status-report__table-value\">\n {lift.elevationGainFeet} ft./{lift.elevationGainMeters} m\n </td>\n <td className=\"lift-status-report__table-value\">{lift.time}</td>\n </tr>\n ))}\n </tbody>\n </table>\n);\n\nTable.propTypes = {\n liftLabel: PropTypes.string.isRequired,\n typeLabel: PropTypes.string.isRequired,\n hoursLabel: PropTypes.string.isRequired,\n areaLabel: PropTypes.string.isRequired,\n elevationGainLabel: PropTypes.string.isRequired,\n timeLabel: PropTypes.string.isRequired,\n liftStatuses: PropTypes.array.isRequired,\n getIcon: PropTypes.func.isRequired\n};\n\nexport default Table;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst List = ({\n typeLabel,\n hoursLabel,\n areaLabel,\n elevationGainLabel,\n timeLabel,\n liftStatuses,\n getIcon\n}) => (\n <ul className=\"lift-status-report__list\">\n {liftStatuses.map(lift => (\n <li key={lift.liftName}>\n <h3 className=\"lift-status-report__table-name\">\n <svg\n className={`lift-status-report__${lift.status.toLowerCase()}-icon`}\n >\n <title>list</title>\n <use xlinkHref={getIcon(lift.status)} />\n </svg>\n {lift.liftName}\n </h3>\n\n <div className=\"lift-status-report__table-cell\">\n <p className=\"lift-status-report__table-label\">{typeLabel}</p>\n <p className=\"lift-status-report__table-value\">{lift.type}</p>\n </div>\n <div className=\"lift-status-report__table-cell\">\n <p className=\"lift-status-report__table-label\">{hoursLabel}</p>\n <p className=\"lift-status-report__table-value\">\n {lift.hoursOfOperation}\n </p>\n </div>\n <div className=\"lift-status-report__table-cell\">\n <p className=\"lift-status-report__table-label\">{areaLabel}</p>\n <p className=\"lift-status-report__table-value\">{lift.area}</p>\n </div>\n <div className=\"lift-status-report__table-cell\">\n <p className=\"lift-status-report__table-label\">\n {elevationGainLabel}\n </p>\n <p className=\"lift-status-report__table-value\">\n {lift.elevationGainFeet} ft./{lift.elevationGainMeters} m\n </p>\n </div>\n <div className=\"lift-status-report__table-cell\">\n <p className=\"lift-status-report__table-label\">{timeLabel}</p>\n <p className=\"lift-status-report__table-value\">{lift.time}</p>\n </div>\n </li>\n ))}\n </ul>\n);\n\nList.propTypes = {\n typeLabel: PropTypes.string.isRequired,\n hoursLabel: PropTypes.string.isRequired,\n areaLabel: PropTypes.string.isRequired,\n elevationGainLabel: PropTypes.string.isRequired,\n timeLabel: PropTypes.string.isRequired,\n liftStatuses: PropTypes.array.isRequired,\n getIcon: PropTypes.func.isRequired\n};\n\nexport default List;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\n\nimport Header from './components/Header';\nimport Table from './components/Table';\nimport List from './components/List';\n\nconst LiftStatusReport = ({\n endpoint,\n feedKey,\n areaKey,\n isSummer,\n openLabel,\n closedLabel,\n holdLabel,\n liftLabel,\n typeLabel,\n hoursLabel,\n areaLabel,\n elevationGainLabel,\n timeLabel,\n unavailableMessage\n}) => {\n const [report, setReport] = useState({});\n const [loaded, setLoaded] = useState(false);\n\n useEffect(() => {\n const fetchFeed = async () => {\n try {\n const { data } = await Axios({\n method: 'GET',\n url: endpoint,\n params: {\n mountain: feedKey,\n areas: areaKey,\n isSummer\n }\n });\n\n setReport(data);\n } catch (e) {\n console.log('Error fetching Lift Status Report data.');\n }\n setLoaded(true);\n };\n\n fetchFeed();\n }, [areaKey, endpoint, feedKey]);\n\n const getIcon = status => {\n switch (status.toLowerCase()) {\n case 'open':\n return '#open';\n case 'closed':\n return '#closed';\n case 'hold':\n case 'on hold':\n return '#alert';\n }\n };\n\n return (\n <>\n {loaded && report.liftStatuses && (\n <>\n <Header\n openLabel={openLabel}\n closedLabel={closedLabel}\n holdLabel={holdLabel}\n lastUpdated={report.lastUpdated}\n getIcon={getIcon}\n />\n <Table\n liftLabel={liftLabel}\n typeLabel={typeLabel}\n hoursLabel={hoursLabel}\n areaLabel={areaLabel}\n elevationGainLabel={elevationGainLabel}\n timeLabel={timeLabel}\n liftStatuses={report.liftStatuses}\n getIcon={getIcon}\n />\n <List\n typeLabel={typeLabel}\n hoursLabel={hoursLabel}\n areaLabel={areaLabel}\n elevationGainLabel={elevationGainLabel}\n timeLabel={timeLabel}\n liftStatuses={report.liftStatuses}\n getIcon={getIcon}\n />\n </>\n )}\n {loaded && !report.liftStatuses && <p>{unavailableMessage}</p>}\n </>\n );\n};\n\nLiftStatusReport.propTypes = {\n endpoint: PropTypes.string.isRequired,\n feedKey: PropTypes.string.isRequired,\n areaKey: PropTypes.string,\n isSummer: PropTypes.string,\n openLabel: PropTypes.string.isRequired,\n closedLabel: PropTypes.string.isRequired,\n holdLabel: PropTypes.string.isRequired,\n liftLabel: PropTypes.string.isRequired,\n typeLabel: PropTypes.string.isRequired,\n hoursLabel: PropTypes.string.isRequired,\n areaLabel: PropTypes.string.isRequired,\n elevationGainLabel: PropTypes.string.isRequired,\n timeLabel: PropTypes.string.isRequired,\n unavailableMessage: PropTypes.string.isRequired\n};\n\nexport default LiftStatusReport;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n"],"sourceRoot":""}