{"version":3,"sources":["webpack://fxsWidgets/../src/js/widgets/calendar-title-description/actions/localizationActions.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/store.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/actions/titleDescriptionActions.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/components/Title.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/constants/gtmIds.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/components/Description.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/components/TitleDescriptionContainer.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/actions/index.js","webpack://fxsWidgets/../src/js/widgets/calendar-title-description/index.js","webpack://fxsWidgets/../src/js/widgets/calendar/constants/countryFilterOptions.js"],"names":["translations","fetchLocalizations","_ref","store","storeCulture","getState","config","culture","toLowerCase","currentCulture","hasOwnProperty","catch","console","error","default","_x","apply","arguments","INITIAL_STATE","calendarApiUrl","CALENDAR_API_URL","type","eventId","tracking","isFetching","fetchError","data","convertCulture","input","Object","keys","includes","setState","Title","_Component","props","_this","_callSuper","renderTitle","bind","_inherits","key","value","_this$props$data","this","countryCode","currencyCode","title","countryName","translate","getCountryNameByCountryCode","h","class","concat","Spinner","WidgetError","message","Component","connectWithTranslations","GTM_ID","eventDateId","GA4EVENT","FEATURES_CALENDAR","DESCRIPTION","Description","_classCallCheck","renderDescription","description","dangerouslySetInnerHTML","__html","TitleDescriptionContainer","fetchTitleDescriptionData","dir","requested","_store$getState$confi","url","cacheFetch","then","response","ok","json","values","name","received","err","CalendarTitleDescriptionWidget","createCustomStore","createStore","Provider","COUNTRY_FILTER_OPTIONS","Country_All","Country_UnitedStates","Country_UnitedKingdom","Country_EuropeanMonetaryUnion","Country_Germany","Country_China","Country_Japan","Country_Canada","Country_Australia","Country_NewZealand","Country_Switzerland","Country_France","Country_Italy","Country_Spain","Country_Ukraine","Country_India","Country_Russia","Country_Turkey","Country_SouthAfrica","Country_Brazil","Country_SouthKorea","Country_Indonesia","Country_Singapore","Country_Mexico","Country_Sweden","Country_Norway","Country_Denmark","Country_Greece","Country_Portugal","Country_Ireland","Country_Austria","Country_Belgium","Country_Netherlands","Country_Finland","Country_CzechRepublic","Country_Poland","Country_Hungary","Country_Romania","Country_Chile","Country_Colombia","Country_Argentina","Country_Iceland","Country_HongKong","Country_Slovakia","Country_Israel","Country_SaudiArabia","Country_Vietnam","Country_Kuwait","Country_Egypt","Country_UnitedArabEmirates","Country_Qatar","Country_Thailand","getBasicCountries","countries","slice","getMajorCountries","getMinorCountries","code","find"],"mappings":"8pMAAaA,EAAe,CACxB,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,SAAU,kBAAM,kCAA2F,EAC3G,QAAS,kBAAM,kCAAyF,EACxG,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,EAC/F,GAAM,kBAAM,kCAAmF,GAGtFC,EAAkB,e,EAAAC,G,EAAG,UAAOC,GACrC,IAAMC,EAAeD,EAAME,WAAWC,OAAOC,QACvCA,EAAUH,EAAeA,EAAaI,cAAgB,KAEtDC,EAAiBT,EAAaU,eAAeH,GAAWA,EAAU,KAQxE,MAAO,CAAEP,oBANyBA,EAAaS,KAC5CE,OAAM,WAEL,OADAC,QAAQC,MAAM,gCACP,IACT,KAEyCC,QAC/C,E,+KAAC,gBAb8BC,GAAA,OAAAb,EAAAc,MAAA,KAAAC,UAAA,KCdzBC,EAAgB,CAClBZ,OAAQ,CACJC,QAAS,KACTY,eAAgBC,qCAChBC,KAAM,QACNC,QAAS,GACTC,UAAU,GAEdC,YAAY,EACZC,YAAY,EACZC,KAAM,MA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B,SAACF,GACvB,OAAKA,EAEEA,EAAUC,MAAM,EAAG,IAFH,IAG3B,EAEME,EAAoB,SAACH,GACvB,OAAKA,EAEEA,EAAUC,MAAM,IAFA,IAG3B,EAEM9F,EAA8B,SAACiG,GAEjC,OAAOtH,OAAOC,KAAK2D,GAAwB2D,MAAK,SAAA3G,GAAG,OAAIgD,EAAuBhD,KAAS0G,CAAI,GAC/F,C","file":"calendar-title-description.4abbba63eb66df77a295.js","sourcesContent":["export const translations = {\r\n    \"ar\": () => import(/*webpackChunkName: 'calendar-title-description-t-ar'*/\"../translations/ar\"),\r\n    \"de\": () => import(/*webpackChunkName: 'calendar-title-description-t-de'*/\"../translations/de\"),\r\n    \"en\": () => import(/*webpackChunkName: 'calendar-title-description-t-en'*/\"../translations/en\"),\r\n    \"es\": () => import(/*webpackChunkName: 'calendar-title-description-t-es'*/\"../translations/es\"),\r\n    \"fr\": () => import(/*webpackChunkName: 'calendar-title-description-t-fr'*/\"../translations/fr\"),\r\n    \"id\": () => import(/*webpackChunkName: 'calendar-title-description-t-id'*/\"../translations/id\"),\r\n    \"ru\": () => import(/*webpackChunkName: 'calendar-title-description-t-ru'*/\"../translations/ru\"),\r\n    \"tr\": () => import(/*webpackChunkName: 'calendar-title-description-t-tr'*/\"../translations/tr\"),\r\n    \"zh-cht\": () => import(/*webpackChunkName: 'calendar-title-description-t-zh-cht'*/\"../translations/zh-cht\"),\r\n    \"zh-cn\": () => import(/*webpackChunkName: 'calendar-title-description-t-zh-cn'*/\"../translations/zh-cn\"),\r\n    \"vi\": () => import(/*webpackChunkName: 'calendar-title-description-t-vi'*/\"../translations/vi\"),\r\n    \"fa\": () => import(/*webpackChunkName: 'calendar-title-description-t-fa'*/\"../translations/fa\"),\r\n    \"pt\": () => import(/*webpackChunkName: 'calendar-title-description-t-pt'*/\"../translations/pt\"),\r\n    \"cs\": () => import(/*webpackChunkName: 'calendar-title-description-t-cs'*/\"../translations/cs\"),\r\n}\r\n\r\nexport const fetchLocalizations = async (store) => {\r\n    const storeCulture = store.getState().config.culture\r\n    const culture = storeCulture ? storeCulture.toLowerCase() : 'en'\r\n\r\n    const currentCulture = translations.hasOwnProperty(culture) ? culture : 'en'\r\n\r\n    const fetchedTranslations = await translations[currentCulture]()\r\n      .catch(() => {\r\n        console.error('Could not fetch translations')\r\n        return null\r\n      })\r\n\r\n    return { translations: fetchedTranslations.default }\r\n}\r\n","import { createCustomStore } from \"../common/helpers/storeHelpers\";\r\nimport { translations } from \"./actions/localizationActions\";\r\n\r\nconst INITIAL_STATE = {\r\n    config: {\r\n        culture: \"en\",\r\n        calendarApiUrl: CALENDAR_API_URL,\r\n        type: \"title\",\r\n        eventId: \"\",\r\n        tracking: false,\r\n    },\r\n    isFetching: false,\r\n    fetchError: false,\r\n    data: null,\r\n};\r\n\r\nconst convertCulture = (input) => {\r\n    const result =\r\n        input && Object.keys(translations).includes(input.toLowerCase())\r\n            ? input.toLowerCase()\r\n            : \"en\";\r\n    return result;\r\n};\r\n\r\nconst createStore = (props) => {\r\n    const result = createCustomStore(props, INITIAL_STATE, {\r\n        culture: convertCulture,\r\n    });\r\n    return result;\r\n};\r\n\r\nexport { createStore };\r\n","import { cacheFetch } from '../../common/helpers/cacheFetchHelpers'\r\n\r\nconst requested = (store) => {\r\n    store.setState({ isFetching: true, fetchError: false, data: null })\r\n}\r\n\r\nconst received = (store, values) => {\r\n    store.setState({\r\n        isFetching: false,\r\n        fetchError: false,\r\n        data: {\r\n            description: values.description,\r\n            title: values.name,\r\n            countryCode: values.countryCode,\r\n            currencyCode: values.currencyCode\r\n        }\r\n    })\r\n}\r\n\r\nconst error = (store) => {\r\n    store.setState({ isFetching: false, fetchError: true, data: null })\r\n}\r\n\r\nexport const fetchTitleDescriptionData = (store) => {\r\n    requested(store)\r\n\r\n    const { calendarApiUrl, culture, eventId } = store.getState().config\r\n    let url = `${calendarApiUrl}/${culture}/api/v1/events/${eventId}`\r\n\r\n    cacheFetch(url, false)\r\n        .then(response => {\r\n            if (response.ok) {\r\n                response.json().then(values => received(store, values))\r\n            } else if (response.status === 404) {\r\n                error(store)\r\n            } else {\r\n                error(store)\r\n            }\r\n        })\r\n        .catch(err => {\r\n            console.error(err)\r\n            error(store)\r\n        })\r\n}\r\n","import { h, Component } from \"preact\";\r\nimport { connectWithTranslations } from \"../../common/helpers/translationsHelpers\";\r\nimport Spinner from \"../../common/components/Spinner\";\r\nimport WidgetError from \"../../common/components/WidgetError\";\r\nimport { getCountryNameByCountryCode } from \"../../calendar/constants/countryFilterOptions\";\r\n\r\nclass Title extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.renderTitle = this.renderTitle.bind(this);\r\n    }\r\n\r\n    renderTitle() {\r\n        const { countryCode, currencyCode, title } = this.props.data;\r\n        const countryName = this.props.translate(getCountryNameByCountryCode(countryCode));\r\n        return (\r\n            <div class=\"fxs_title-description_title\">\r\n                <h2 class=\"fxs_subsectionTitle\">\r\n                    <span>&nbsp;</span>\r\n                    <span\r\n                        class={`fxs_flag ${\r\n                            countryCode\r\n                                ? \"fxs_\" + countryCode.toLowerCase()\r\n                                : \"\"\r\n                        }`}\r\n                    ></span>\r\n                    <span>&nbsp;</span>\r\n                    <span>{currencyCode}</span>\r\n                </h2>\r\n                <h1 class=\"fxs_headline_from_medium_to_large\">{`${countryName} ${title}`}</h1>\r\n            </div>\r\n        );\r\n    }\r\n    render({ translate, isFetching, fetchError }) {\r\n        return (\r\n            <div class=\"fxs_title-description_title-wrapper\">\r\n                {isFetching && <Spinner />}\r\n                {fetchError && (\r\n                    <WidgetError\r\n                        message={\r\n                            <p>\r\n                                {translate(\"WidgetErrorMessageLine1\")}\r\n                                <br />\r\n                                {translate(\"WidgetErrorMessageLine2\")}\r\n                            </p>\r\n                        }\r\n                    />\r\n                )}\r\n                {!isFetching && !fetchError && this.renderTitle()}\r\n            </div>\r\n        );\r\n    }\r\n}\r\nexport default connectWithTranslations(\"config,data, isFetching, fetchError\")(\r\n    Title\r\n);\r\n","export const GTM_ID = {\r\n    DESCRIPTION: eventDateId => `features-calendar-text-openlinktext-${eventDateId}`,\r\n}\r\nexport const GA4EVENT = {\r\n    NAMES: { FEATURES_CALENDAR: \"features-calendar\" },\r\n    ELEMENTS: {\r\n        DESCRIPTION: `text-openlinktext`,\r\n    }\r\n}","import { h, Component } from \"preact\";\r\nimport { connectWithTranslations } from \"../../common/helpers/translationsHelpers\";\r\nimport Spinner from \"../../common/components/Spinner\";\r\nimport WidgetError from \"../../common/components/WidgetError\";\r\nimport { GTM_ID, GA4EVENT } from \"../constants/gtmIds\";\r\nclass Description extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.renderDescription = this.renderDescription.bind(this);\r\n    }\r\n    renderDescription(description) {\r\n        return (\r\n            <p\r\n                class=\"fxs_entryPlain_txt_large\"\r\n                dangerouslySetInnerHTML={{ __html: description }}\r\n            ></p>\r\n        );\r\n    }\r\n    render({ translate, data, isFetching, fetchError, config }) {\r\n        return (\r\n            <div\r\n                class=\"fxs_title-description_description\"\r\n                data-gtmid={\r\n                    config.tracking && GTM_ID.DESCRIPTION(config.eventId)\r\n                }\r\n                data-ga4event-clk-name={config.tracking && GA4EVENT.NAMES.FEATURES_CALENDAR}\r\n                data-ga4event-element={config.tracking && GA4EVENT.ELEMENTS.DESCRIPTION}\r\n                data-ga4event-eventid={config.eventId}\r\n            >\r\n                {isFetching && <Spinner />}\r\n                {fetchError && (\r\n                    <WidgetError\r\n                        message={\r\n                            <p>\r\n                                {translate(\"WidgetErrorMessageLine1\")}\r\n                                <br />\r\n                                {translate(\"WidgetErrorMessageLine2\")}\r\n                            </p>\r\n                        }\r\n                    />\r\n                )}\r\n                {!isFetching &&\r\n                    !fetchError &&\r\n                    this.renderDescription(data.description)}\r\n            </div>\r\n        );\r\n    }\r\n}\r\nexport default connectWithTranslations(\"config,data,isFetching,fetchError\")(\r\n    Description\r\n);\r\n","import { h, Component } from 'preact'\r\nimport actions from '../actions'\r\nimport Title from './Title'\r\nimport Description from './Description'\r\nimport { connectWithTranslations } from '../../common/helpers/translationsHelpers'\r\n\r\nclass TitleDescriptionContainer extends Component {\r\n    constructor(props) {\r\n        super(props)\r\n    }\r\n    componentWillMount() {\r\n        this.props.fetchTitleDescriptionData()\r\n        this.props.fetchLocalizations()\r\n    }\r\n\r\n    render({ config: { type }, translate}) {\r\n        return (\r\n            <div class=\"fxs_widget fxs_title-description\" dir={`${!!translate('IsRightToLeftOriented') ? 'rtl' : 'auto'}`}  >\r\n                {\r\n                    type == 'title' ?\r\n                        <Title/>\r\n                        :\r\n                        <Description/>\r\n                }\r\n            </div>\r\n        )\r\n    }\r\n\r\n}\r\nexport default connectWithTranslations('config', actions)(TitleDescriptionContainer)\r\n","import { fetchTitleDescriptionData } from './titleDescriptionActions'\r\nimport { fetchLocalizations } from './localizationActions'\r\n\r\nexport default (store) => ({\r\n    fetchTitleDescriptionData: (state) => fetchTitleDescriptionData(store),\r\n    fetchLocalizations: (state) => fetchLocalizations(store)\r\n})\r\n","import { h, Component } from 'preact'\r\nimport { Provider } from 'unistore/preact'\r\nimport { createStore } from './store'\r\nimport TitleDescriptionContainer from './components/TitleDescriptionContainer'\r\n\r\n\r\nclass CalendarTitleDescriptionWidget extends Component {\r\n    constructor(props) {\r\n        super(props)\r\n        this.store = createStore(props)\r\n    }\r\n\r\n    render(props) {\r\n        return (\r\n            <Provider store={this.store}>\r\n                <TitleDescriptionContainer/>\r\n            </Provider>\r\n        )\r\n    }\r\n}\r\n\r\nexport default CalendarTitleDescriptionWidget","const COUNTRY_FILTER_OPTIONS = {\r\n    Country_All: null,\r\n    Country_UnitedStates: \"US\",\r\n    Country_UnitedKingdom: \"UK\",\r\n    Country_EuropeanMonetaryUnion: \"EMU\",\r\n    Country_Germany: \"DE\",\r\n    Country_China: \"CN\",\r\n    Country_Japan: \"JP\",\r\n    Country_Canada: \"CA\",\r\n    Country_Australia: \"AU\",\r\n    Country_NewZealand: \"NZ\",\r\n\r\n    Country_Switzerland: \"CH\",\r\n    Country_France: \"FR\",\r\n    Country_Italy: \"IT\",\r\n    Country_Spain: \"ES\",\r\n\r\n    Country_Ukraine: \"UA\",\r\n\r\n    Country_India: \"IN\",\r\n    Country_Russia: \"RU\",\r\n    Country_Turkey: \"TR\",\r\n    Country_SouthAfrica: \"ZA\",\r\n    Country_Brazil: \"BR\",\r\n    Country_SouthKorea: \"KR\",\r\n    Country_Indonesia: \"ID\",\r\n    Country_Singapore: \"SG\",\r\n    Country_Mexico: \"MX\",\r\n    Country_Sweden: \"SE\",\r\n    Country_Norway: \"NO\",\r\n    Country_Denmark: \"DK\",\r\n    Country_Greece: \"GR\",\r\n    Country_Portugal: \"PT\",\r\n    Country_Ireland: \"IE\",\r\n    Country_Austria: \"AT\",\r\n    Country_Belgium: \"BE\",\r\n    Country_Netherlands: \"NL\",\r\n    Country_Finland: \"FI\",\r\n    Country_CzechRepublic: \"CZ\",\r\n    Country_Poland: \"PL\",\r\n    Country_Hungary: \"HU\",\r\n    Country_Romania: \"RO\",\r\n    Country_Chile: \"CL\",\r\n    Country_Colombia: \"CO\",\r\n    Country_Argentina: \"AR\",\r\n    Country_Iceland: \"IS\",\r\n    Country_HongKong: \"HK\",\r\n    Country_Slovakia: \"SK\",\r\n    Country_Israel: \"IL\",\r\n    Country_SaudiArabia: \"SA\",\r\n    Country_Vietnam: \"VN\",\r\n    Country_Kuwait: \"KW\",\r\n    Country_Egypt: \"EG\",\r\n    Country_UnitedArabEmirates: \"AE\",\r\n    Country_Qatar: \"QA\",\r\n    Country_Thailand: \"TH\",\r\n};\r\n\r\nconst getBasicCountries = (countries) => {\r\n    if (!countries) return null;\r\n\r\n    return countries.slice(0, 9);\r\n};\r\n\r\nconst getMajorCountries = (countries) => {\r\n    if (!countries) return null;\r\n\r\n    return countries.slice(0, 14);\r\n};\r\n\r\nconst getMinorCountries = (countries) => {\r\n    if (!countries) return null;\r\n\r\n    return countries.slice(14);\r\n};\r\n\r\nconst getCountryNameByCountryCode = (code) => {\r\n\r\n    return Object.keys(COUNTRY_FILTER_OPTIONS).find(key => COUNTRY_FILTER_OPTIONS[key] === code);\r\n}\r\n\r\nexport {\r\n    COUNTRY_FILTER_OPTIONS,\r\n    getBasicCountries,\r\n    getMajorCountries,\r\n    getMinorCountries,\r\n    getCountryNameByCountryCode,\r\n};\r\n"],"sourceRoot":""}