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,IAAMM,EAAQP,EAAUzD,EAAO0D,GAI/B,OAFAL,EAAeY,IAAIV,GAEZ,kBACL,gBAAC,KAAD,CAAUS,MAAOA,GACf,gBAAC,UAAD,KACE,gBAAC,UAAD,KACE,gBAAC,IAAD,CAAQE,OAAQlE,EAAMkE,OAAQC,OAAQnE,EAAMmE,OAAQC,iBAAkBpE,EAAMoE,kBAC1E,gBAAC,KAAD,CACEzB,YAAa3C,EAAM2C,YACnBb,YAAa9B,EAAM8B,YACnBY,UAAW1C,EAAMqE,sBAAsBC,QACvCvC,WAAY/B,EAAMqE,sBAAsBtC,WACxCS,YAAaxC,EAAMqE,sBAAsB7B,YACzCC,OAAQzC,EAAMuE,2BAXnB,CAkBR,EClCD,ICDAC,IAAAA,SAAsB,CAACC,eAAAA,G,mCCFvB,SAAgB,KAAO,uCAAuC,cAAgB,gDAAgD,aAAe,+CAA+C,cAAgB,gDAAgD,aAAe,+CAA+C,gBAAkB,kDAAkD,eAAiB,iD","sources":["webpack://hichee/./app/rescript/bundles/sitemap-country/ui/SitemapCountryContainer/SitemapCountryContainer.bs.js","webpack://hichee/./app/rescript/bundles/sitemap-country/ui/SitemapCountryContainer/SitemapCountryContainer__JsBridge.bs.js","webpack://hichee/./app/rescript/bundles/sitemap-country/store.js","webpack://hichee/./app/rescript/bundles/sitemap-country/SitemapCountry.jsx","webpack://hichee/./app/rescript/bundles/sitemap-country/ror_components/SitemapCountry.client.jsx","webpack://hichee/./app/ror-generated-packs/generated/SitemapCountry.js","webpack://hichee/./app/rescript/bundles/sitemap-country/ui/SitemapCountryContainer/SitemapCountryContainer.scss?09f3"],"sourcesContent":["// Generated by ReScript, PLEASE EDIT WITH CARE\n'use strict';\n\nvar A = require(\"../../../../styleguide/components/Link/A.bs.js\");\nvar Route = require(\"../../../../Route.bs.js\");\nvar React = require(\"react\");\nvar Belt_Array = require(\"rescript/lib/js/belt_Array.js\");\nvar ReactIntl = require(\"react-intl\");\nvar JsxPPXReactSupport = require(\"rescript/lib/js/jsxPPXReactSupport.js\");\nvar SitemapCountryContainerScss = require(\"./SitemapCountryContainer.scss\").default;\n\nvar css = SitemapCountryContainerScss;\n\nfunction SitemapCountryContainer$CityText(props) {\n var city = props.city;\n return React.createElement(ReactIntl.FormattedMessage, {\n id: \"sitemap-country.city-link\",\n defaultMessage: \"Vacation rentals in {cityName} ({listingsCount})\",\n values: {\n cityName: city.name,\n listingsCount: String(city.listingsCount)\n }\n });\n}\n\nvar CityText = {\n make: SitemapCountryContainer$CityText\n};\n\nfunction SitemapCountryContainer$StateLink(props) {\n var state = props.state;\n return JsxPPXReactSupport.createElementWithKey(state.path + \"-\" + String(props.idx), A.make, {\n href: state.path,\n style: /* General */0,\n className: css.locationLink,\n children: React.createElement(ReactIntl.FormattedMessage, {\n id: \"sitemap-country.state-link\",\n defaultMessage: \"Vacation rentals in {stateName}\",\n values: {\n stateName: state.name\n }\n })\n });\n}\n\nvar StateLink = {\n make: SitemapCountryContainer$StateLink\n};\n\nfunction SitemapCountryContainer$LocationLink(props) {\n var $$location = props.location;\n return JsxPPXReactSupport.createElementWithKey($$location.path + \"-\" + String(props.idx), A.make, {\n href: $$location.path,\n style: /* General */0,\n className: css.locationLink,\n children: React.createElement(SitemapCountryContainer$CityText, {\n city: $$location\n })\n });\n}\n\nvar LocationLink = {\n make: SitemapCountryContainer$LocationLink\n};\n\nfunction SitemapCountryContainer$PaginationLinks(props) {\n var countryPath = props.countryPath;\n var totalPages = props.totalPages;\n var SitemapCountryContainer$PaginationLinks$1 = function (props) {\n return Belt_Array.init(totalPages, (function (idx) {\n return JsxPPXReactSupport.createElementWithKey(countryPath + \"-\" + String(idx), A.make, {\n href: Route.sitemapCountry(countryPath, idx + 1 | 0),\n style: /* General */0,\n className: css.paginationLink,\n children: String(idx + 1 | 0)\n });\n }));\n };\n return React.createElement(React.Fragment, undefined, React.createElement(\"h2\", {\n className: css.headerStates\n }, React.createElement(ReactIntl.FormattedMessage, {\n id: \"sitemap-country.pagination-header\",\n defaultMessage: \"More Destinations\"\n })), React.createElement(\"div\", {\n className: css.paginationLinks\n }, React.createElement(SitemapCountryContainer$PaginationLinks$1, {})));\n}\n\nvar PaginationLinks = {\n make: SitemapCountryContainer$PaginationLinks\n};\n\nfunction SitemapCountryContainer(props) {\n var currentPage = props.currentPage;\n var totalPages = props.totalPages;\n var states = props.states;\n var locations = props.locations;\n var countryName = props.countryName;\n return React.createElement(\"div\", {\n className: css.grid\n }, currentPage === 1 ? React.createElement(React.Fragment, undefined, React.createElement(\"h2\", {\n className: css.headerCountry\n }, React.createElement(ReactIntl.FormattedMessage, {\n id: \"sitemap-country.states-header\",\n defaultMessage: \"{countryName} - states\",\n values: {\n countryName: countryName\n }\n })), React.createElement(\"div\", {\n className: css.locationsGrid\n }, states !== undefined ? Belt_Array.mapWithIndex(states, (function (idx, state) {\n return JsxPPXReactSupport.createElementWithKey(state.path, SitemapCountryContainer$StateLink, {\n idx: idx,\n state: state\n });\n })) : null)) : null, React.createElement(\"h2\", {\n className: css.headerStates\n }, React.createElement(ReactIntl.FormattedMessage, {\n id: \"sitemap-country.cities-header\",\n defaultMessage: \"{countryName} - cities\",\n values: {\n countryName: countryName\n }\n })), React.createElement(\"div\", {\n className: css.locationsGrid\n }, locations !== undefined ? Belt_Array.mapWithIndex(locations, (function (idx, $$location) {\n return JsxPPXReactSupport.createElementWithKey($$location.path, SitemapCountryContainer$LocationLink, {\n idx: idx,\n location: $$location\n });\n })) : null), totalPages !== undefined && totalPages > 1 ? React.createElement(SitemapCountryContainer$PaginationLinks, {\n totalPages: totalPages,\n countryPath: props.countryPath\n }) : null);\n}\n\nvar make = SitemapCountryContainer;\n\nexports.css = css;\nexports.CityText = CityText;\nexports.StateLink = StateLink;\nexports.LocationLink = LocationLink;\nexports.PaginationLinks = PaginationLinks;\nexports.make = make;\n/* css Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n'use strict';\n\nvar React = require(\"react\");\nvar Caml_option = require(\"rescript/lib/js/caml_option.js\");\nvar SitemapCountryContainer = require(\"./SitemapCountryContainer.bs.js\");\n\nfunction SitemapCountryContainer__JsBridge$default(props) {\n return React.createElement(SitemapCountryContainer.make, {\n countryName: props.countryName,\n countryPath: props.countryPath,\n locations: Caml_option.nullable_to_opt(props.locations),\n states: Caml_option.nullable_to_opt(props.states),\n totalPages: Caml_option.nullable_to_opt(props.totalPages),\n currentPage: Caml_option.nullable_to_opt(props.currentPage)\n });\n}\n\nvar $$default = SitemapCountryContainer__JsBridge$default;\n\nexports.$$default = $$default;\nexports.default = $$default;\nexports.__esModule = true;\n/* react Not a pure module */\n","/* @flow */\n\nimport { combineReducers, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nimport { withLayoutReducers, withLayoutState, withLayoutSagas, withLayoutMiddlewares } from 'layout/store';\n\nimport type { RailsProps, RailsContext } from './types';\n\nexport const sagaMiddleware = createSagaMiddleware();\n\nexport const rootSaga = withLayoutSagas();\n\nexport const initStore = (props: RailsProps, context: RailsContext) =>\n createStore(\n combineReducers(withLayoutReducers()),\n withLayoutState(props, context),\n withLayoutMiddlewares(sagaMiddleware),\n );\n","/* @flow */\n\nimport * as React from 'react';\nimport { Provider } from 'react-redux';\n\nimport SitemapCountryContainer from 'app/rescript/bundles/sitemap-country/ui/SitemapCountryContainer/SitemapCountryContainer__JsBridge.bs.js';\n\nimport IntlProviderWrapper from 'app/rescript/i18n/IntlProviderWrapper.bs.js';\nimport ScreenSizeContext from 'app/rescript/contexts/ScreenSizeContext.bs.js';\n\nimport Layout from 'layout';\nimport type { RailsProps, RailsContext } from './types';\n\nimport { initStore, rootSaga, sagaMiddleware } from './store';\n\nconst SitemapCountry = (props: RailsProps, context: RailsContext) => {\n const store = initStore(props, context);\n\n sagaMiddleware.run(rootSaga);\n\n return () => (\n <Provider store={store}>\n <IntlProviderWrapper>\n <ScreenSizeContext>\n <Layout navbar={props.navbar} alerts={props.alerts} impersonatedUser={props.impersonatedUser}>\n <SitemapCountryContainer\n countryName={props.countryName}\n countryPath={props.countryPath}\n locations={props.locationCountryCities.results}\n totalPages={props.locationCountryCities.totalPages}\n currentPage={props.locationCountryCities.currentPage}\n states={props.locationCountryStates}\n />\n </Layout>\n </ScreenSizeContext>\n </IntlProviderWrapper>\n </Provider>\n );\n};\n\nexport default SitemapCountry;\n","/* @flow */\n\nimport SitemapCountry from '../SitemapCountry';\n\nexport default SitemapCountry;\n","import ReactOnRails from 'react-on-rails';\nimport SitemapCountry from '../../rescript/bundles/sitemap-country/ror_components/SitemapCountry.client.jsx';\n\nReactOnRails.register({SitemapCountry});\n","// extracted by mini-css-extract-plugin\nexport default {\"grid\":\"SitemapCountryContainer__grid__Fh933\",\"locationsGrid\":\"SitemapCountryContainer__locationsGrid__T_CTq\",\"locationLink\":\"SitemapCountryContainer__locationLink___rE2T\",\"headerCountry\":\"SitemapCountryContainer__headerCountry__HJfaD\",\"headerStates\":\"SitemapCountryContainer__headerStates__eCSqN\",\"paginationLinks\":\"SitemapCountryContainer__paginationLinks__COniL\",\"paginationLink\":\"SitemapCountryContainer__paginationLink__PZHbH\"};"],"names":["A","require","Route","React","Belt_Array","ReactIntl","JsxPPXReactSupport","css","SitemapCountryContainer$CityText","props","city","createElement","FormattedMessage","id","defaultMessage","values","cityName","name","listingsCount","String","CityText","make","SitemapCountryContainer$StateLink","state","createElementWithKey","path","idx","href","style","className","locationLink","children","stateName","StateLink","SitemapCountryContainer$LocationLink","$$location","location","LocationLink","SitemapCountryContainer$PaginationLinks","countryPath","totalPages","Fragment","undefined","headerStates","paginationLinks","init","sitemapCountry","paginationLink","PaginationLinks","currentPage","states","locations","countryName","grid","headerCountry","locationsGrid","mapWithIndex","exports","Caml_option","SitemapCountryContainer","$$default","nullable_to_opt","sagaMiddleware","createSagaMiddleware","rootSaga","withLayoutSagas","initStore","context","createStore","combineReducers","withLayoutReducers","withLayoutState","withLayoutMiddlewares","store","run","navbar","alerts","impersonatedUser","locationCountryCities","results","locationCountryStates","ReactOnRails","SitemapCountry"],"sourceRoot":""}