{"version":3,"sources":["webpack:///./node_modules/@logitravel/alex-comp-trans/components/main-car-city/client/js/image/index.js","webpack:///./node_modules/@logitravel/alex-comp-trans/components/main-car-city/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js/store/actions.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js/prototype.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/node_modules/rxjs/_esm5/internal/observable/dom/fetch.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js/store/reducer.js","webpack:///./node_modules/@logitravel/alex-comp-trans/components/main-car-city/client/js/components.js"],"names":["Image","module","exports","initImage","selector","elementExist","resolveComponents","getSearcherCar","element","document","querySelector","config","dataset","result","JSON","parse","publicPath","components","map","component","loader","name","filter","observerConfig","root","rootMargin","threshold","observer","IntersectionObserver","entries","forEach","entry","intersectionRatio","target","reduce","acc","then","default","unobserve","observe","types","DESTROY","DISPLAY","HIDE","SET_SRC","actions","destroy","type","display","hide","setSrc","payload","prototype","configuration","instance","Object","create","hooks","img","figcaption","a","init","start","css","load","loading","loaded","hidden","vertical","lazySrc","resize","width","height","operation","suboperation","quality","Store","fromEvent","fromFetch","take","reducer","this","store","image","dispatch","src","reactions","subscribe","state","action","unsubscribe","parentNode","removeChild","keys","key","classList","remove","add","subscriptions","lazyLoad","pipe","error","alternative","isLazy","data","status","setupStore","setupActions","setupReactions","input","initWithSelector","Observable","subscriber","perSubscriberInit","controller","AbortController","signal","abortable","unsubscribed","subscription","Subscription","abort","aborted","outerSignal_1","outerSignalHandler_1","addEventListener","removeEventListener","fetch","response","from","value","next","err","complete","catch","initialState","COMPONENTS"],"mappings":";gFAGA,MAAMA,EAAQ,EAAQ,QAQtBC,EAAOC,QAAU,CACbC,UA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ID,OA9BoB,IACjB,2DA8BHC,KAAM,oBAEV,CACID,OApFW,IACR,qCAoFHC,KAAM,WAEV,CACID,OAhDgB,IACb,4DAgDHC,KAAM,gBAEV,CACID,OAlFiB,IACd,2DAkFHC,KAAM,iBAEV,CACID,OA5Ec,IACX,kEA4EHC,KAAM,eAWdpB,EAAOC,QAAU,CACbI,kBALJ,WACI,OAAOkI,GAKPjI,eAlDmB,IACZ","file":"main-cars-home.2f25b02ed0b713fa6b96.bundle.js","sourcesContent":["/* ==========================================================================\n MainFliCity > Client > Image\n ========================================================================== */\nconst Image = require('@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js');\n\nfunction initImage(selector) {\n const imageGuide = Image(`${selector} [data-guide] [data-component=\"ImageRxjs\"]`);\n\n return imageGuide;\n}\n\nmodule.exports = {\n initImage\n};\n","/* ==========================================================================\n MainCarCity > Client\n ========================================================================== */\n\n/* Import modules */\nrequire('intersection-observer');\n\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\n\nconst { resolveComponents, getSearcherCar } = require('./components');\n\nconst { initImage } = require('./image');\n\n/**\n * MainCarCity component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function MainCarCity(selector = '[data-component=MainCarCity]') {\n if (elementExist(selector)) {\n const element = document.querySelector(selector);\n\n const config = {\n ...(function getConfig() {\n if (!element.dataset.config) return '';\n\n const result = JSON.parse(element.dataset.config);\n element.dataset.config = '';\n return result;\n })()\n };\n\n /**\n * Setting public path to the webpack exposed variable\n */\n /* eslint-disable */\n if (config.publicPath) __webpack_public_path__ = config.publicPath;\n /* eslint-enable */\n\n const components = resolveComponents()\n .map(component => ({\n loader: component.loader,\n element: document.querySelector(`[data-component=\"${component.name}\"]`)\n }))\n .filter(component => component.element);\n\n /* Observer Config */\n const observerConfig = {\n root: null, // avoiding 'root' or setting it to 'null' sets it to default value: viewport\n rootMargin: '0px',\n threshold: 0.15\n };\n\n /**\n * Observer to lazy load modules based on\n * currently viewed components in the viewport\n */\n const observer = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n if (entry.intersectionRatio > 0) {\n const { loader } = components\n .filter(component => component.element === entry.target)\n .reduce(acc => acc);\n\n /**\n * Init component with its loader and then\n * unobserve from this entry so we dont\n * call the init of the component more\n * than once\n */\n loader().then(module => {\n module.default();\n\n observer.unobserve(entry.target);\n });\n }\n }, observerConfig);\n },\n {\n root: null, // avoiding 'root' or setting it to 'null' sets it to default value: viewport\n rootMargin: '0px',\n threshold: 0.15\n }\n );\n\n components.forEach(component => {\n observer.observe(component.element);\n });\n\n /* Searcher Car */\n getSearcherCar().then(module => module.default('[data-component=SearcherCar]'));\n\n initImage(selector);\n }\n};\n","/* ==========================================================================\n ImageRxjs > Client > Store > Actions\n ========================================================================== */\n\n/* Types */\nconst DESTROY = 'IMAGE::DESTROY';\nconst DISPLAY = 'IMAGE::DISPLAY';\nconst HIDE = 'IMAGE::HIDE';\n\nconst SET_SRC = 'IMAGE::SET_SRC';\n\n/* Actions */\nconst destroy = () => ({ type: DESTROY });\nconst display = () => ({ type: DISPLAY });\nconst hide = () => ({ type: HIDE });\n\nconst setSrc = payload => ({ type: SET_SRC, payload });\n\n/* Exports */\nmodule.exports = {\n types: {\n DESTROY,\n DISPLAY,\n HIDE,\n SET_SRC\n },\n actions: {\n destroy,\n display,\n hide,\n setSrc\n }\n};\n","/* ==========================================================================\n ImageRxjs > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * ImageRxjs component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function ImageRxjs(selector = '[data-component=ImageRxjs]', configuration = {}) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Hooks */\n instance.hooks = {\n img: instance.element.querySelector('img'),\n figcaption: instance.element.querySelector('figcaption'),\n a: instance.element.querySelector('a')\n };\n\n /* Config */\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n return result;\n })()\n };\n\n /* Init */\n if (instance.config.init) instance.init();\n\n /* Return */\n return instance;\n }\n};\n","/* ==========================================================================\n ImageRxjs > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'ImageRxjs',\n init: true,\n start: true,\n css: {\n load: 'lazyload',\n loading: 'lazyloading',\n loaded: 'lazyloaded',\n hidden: 'is-hidden',\n vertical: 'is-vertical'\n },\n lazySrc: '/comun/images/shim.gif',\n resize: {\n width: 100,\n height: 100,\n operation: 'resize',\n suboperation: 'crop',\n quality: 85\n }\n};\n\nmodule.exports = () => config;\n","/* ==========================================================================\n InputRxjs > Client > Prototype\n ========================================================================== */\n\n/* Modules */\nconst { Store } = require('@bluekiri/alexandria/helpers/state');\n\nconst { fromEvent } = require('rxjs');\nconst { fromFetch } = require('rxjs/fetch');\nconst { take } = require('rxjs/operators');\n\nconst { actions, types } = require('./store/actions');\nconst { reducer } = require('./store/reducer');\n\n/* Prototype */\nconst prototype = {\n /* Setup store */\n setupStore() {\n if (this.store) return this;\n\n this.store = new Store({\n image: reducer\n });\n\n return this;\n },\n /* Setup actions */\n setupActions() {\n if (this.actions) return this;\n\n this.actions = {\n destroy: () => this.store.dispatch(actions.destroy()),\n display: () => this.store.dispatch(actions.display()),\n hide: () => this.store.dispatch(actions.hide()),\n setSrc: src => this.store.dispatch(actions.setSrc(src))\n };\n\n return this;\n },\n /* Setup reactions */\n setupReactions() {\n if (this.reactions) return this;\n\n this.reactions = {\n destroy: this.store.subscribe((state, action) => {\n if (action.type !== types.DESTROY) return;\n\n /* Unsubscribe */\n this.unsubscribe();\n\n /* Remove from DOM */\n this.element.parentNode.removeChild(this.element);\n\n /* Clean instance */\n [...Object.keys(this)].forEach(key => delete this[key]);\n }),\n display: this.store.subscribe((state, action) => {\n if (action.type !== types.DISPLAY) return;\n\n const { css } = this.config;\n this.element.classList.remove(css.hidden);\n }),\n hide: this.store.subscribe((state, action) => {\n if (action.type !== types.HIDE) return;\n\n const { css } = this.config;\n this.element.classList.add(css.hidden);\n }),\n setSrc: this.store.subscribe((state, action) => {\n if (action.type !== types.SET_SRC) return;\n\n const { loaded } = state.image;\n\n if (loaded) return;\n\n /* Set src to the img element */\n this.hooks.img.src = action.payload;\n })\n };\n\n return this;\n },\n /* Subscribe */\n subscribe() {\n if (this.subscriptions) this.unsubscribe();\n\n this.subscriptions = {\n lazyLoad: fromEvent(this.hooks.img, 'lazyloaded')\n .pipe(take(1))\n .subscribe(() => {\n const { src } = this.hooks.img.dataset;\n\n /* Dispatch action */\n this.actions.setSrc(src);\n }),\n error: fromEvent(this.hooks.img, 'error')\n .pipe(take(1))\n .subscribe(() => {\n const { alternative } = this.hooks.img.dataset;\n\n this.hooks.img.src = alternative;\n })\n };\n\n return this;\n },\n /* Unsubscribe */\n unsubscribe() {\n if (!this.subscriptions) return this;\n\n [...Object.keys(this.subscriptions)].forEach(key => this.subscriptions[key].unsubscribe());\n\n return this;\n },\n /* Start */\n start() {\n const { isLazy = true, css, alternative } = this.config;\n\n if (isLazy) this.hooks.img.classList.add(css.load);\n\n if (!isLazy) {\n fromFetch(this.hooks.img.src)\n .pipe(take(1))\n .subscribe(data => {\n if (data.status === 404 && alternative) {\n this.hooks.img.src = alternative;\n }\n });\n }\n },\n /* Init */\n init() {\n /* Setup store */\n this.setupStore();\n\n /* Setup actions */\n this.setupActions();\n\n /* Setup reactions */\n this.setupReactions();\n\n /* Subscribe */\n this.subscribe();\n\n /* Requier library */\n module.require('lazysizes');\n\n /* Start */\n if (this.config.start) this.start();\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n","/** PURE_IMPORTS_START tslib,_.._Observable,_.._Subscription,_.._observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from '../../Observable';\nimport { Subscription } from '../../Subscription';\nimport { from } from '../../observable/from';\nexport function fromFetch(input, initWithSelector) {\n if (initWithSelector === void 0) {\n initWithSelector = {};\n }\n var selector = initWithSelector.selector, init = tslib_1.__rest(initWithSelector, [\"selector\"]);\n return new Observable(function (subscriber) {\n var controller = new AbortController();\n var signal = controller.signal;\n var abortable = true;\n var unsubscribed = false;\n var subscription = new Subscription();\n subscription.add(function () {\n unsubscribed = true;\n if (abortable) {\n controller.abort();\n }\n });\n var perSubscriberInit;\n if (init) {\n if (init.signal) {\n if (init.signal.aborted) {\n controller.abort();\n }\n else {\n var outerSignal_1 = init.signal;\n var outerSignalHandler_1 = function () {\n if (!signal.aborted) {\n controller.abort();\n }\n };\n outerSignal_1.addEventListener('abort', outerSignalHandler_1);\n subscription.add(function () { return outerSignal_1.removeEventListener('abort', outerSignalHandler_1); });\n }\n }\n perSubscriberInit = tslib_1.__assign({}, init, { signal: signal });\n }\n else {\n perSubscriberInit = { signal: signal };\n }\n fetch(input, perSubscriberInit).then(function (response) {\n if (selector) {\n subscription.add(from(selector(response)).subscribe(function (value) { return subscriber.next(value); }, function (err) {\n abortable = false;\n if (!unsubscribed) {\n subscriber.error(err);\n }\n }, function () {\n abortable = false;\n subscriber.complete();\n }));\n }\n else {\n abortable = false;\n subscriber.next(response);\n subscriber.complete();\n }\n }).catch(function (err) {\n abortable = false;\n if (!unsubscribed) {\n subscriber.error(err);\n }\n });\n return subscription;\n });\n}\n//# sourceMappingURL=fetch.js.map\n","/* ==========================================================================\n ImageRxjs > Client > Store > Reducer\n ========================================================================== */\n\n/* Modules */\nconst { types } = require('./actions');\n\n/* Initial state */\nconst initialState = {\n loaded: false,\n hidden: false,\n src: null\n};\n\n/* Reducer */\nfunction reducer(state = initialState, action) {\n switch (action.type) {\n case types.DESTROY:\n return null;\n case types.DISPLAY:\n return {\n ...state,\n hidden: false\n };\n case types.HIDE:\n return {\n ...state,\n hidden: true\n };\n case types.SET_SRC:\n return {\n ...state,\n loaded: true,\n src: action.payload\n };\n default:\n return state;\n }\n}\n\n/* Exports */\nmodule.exports = {\n reducer\n};\n","/* ==========================================================================\n MainCarCity> Client > Components\n ========================================================================== */\n\n/**\n * HeaderBannerAub\n */\nconst getHeaderBannerAub = () => {\n return import(\n /* webpackChunkName: \"header-banner-aub\" */\n '@logitravel/alex-aubergine/components/header-banner-aub/client/js'\n );\n};\n\n/**\n * BlogAub\n */\nconst getBlogAub = () => {\n return import(\n /* webpackChunkName: \"blog-aub\" */\n '@logitravel/alex-aubergine/components/blog-aub/client/js'\n );\n};\n\n/**\n * LogosCarousel\n */\nconst getLogosCarousel = () => {\n return import(\n /* webpackChunkName: \"banner-highlights\" */\n '../../../logos-carousel/client/js'\n );\n};\n\n/**\n * MapFilters\n */\nconst getMapFilters = () => {\n return import(\n /* webpackChunkName: \"map-filters\" */\n '../../../map-filters/client/js'\n );\n};\n\n/**\n * CardProductCarousel\n */\nconst getCardProductCarousel = () => {\n return import(\n /* webpackChunkName: \"card-product-carousel\" */\n '../../../card-product-carousel/client/js'\n );\n};\n\n/**\n * VerticalTabs\n */\nconst getVerticalTabs = () => {\n return import(\n /* webpackChunkName: \"vertical-tabs\" */\n '../../../vertical-tabs/client/js'\n );\n};\n\n/**\n * BannerHighlights\n */\nconst getBannerHighlights = () => {\n return import(\n /* webpackChunkName: \"banner-highlights\" */\n '../../../banner-highlights/client/js'\n );\n};\n\n/**\n * SearcherCar\n */\nconst getSearcherCar = () => {\n return import(\n /* webpackChunkName: \"searcher-car\" */\n '../../../searcher-car/client/js'\n );\n};\n\n/**\n * Components\n */\nconst COMPONENTS = [\n {\n loader: getHeaderBannerAub,\n name: 'HeaderBannerAub'\n },\n {\n loader: getCardProductCarousel,\n name: 'CardProductCarousel'\n },\n {\n loader: getBannerHighlights,\n name: 'BannerHighlights'\n },\n {\n loader: getBlogAub,\n name: 'BlogAub'\n },\n {\n loader: getVerticalTabs,\n name: 'VerticalTabs'\n },\n {\n loader: getLogosCarousel,\n name: 'LogosCarousel'\n },\n {\n loader: getMapFilters,\n name: 'MapFilters'\n }\n];\n\n/**\n * Resolve components\n */\nfunction resolveComponents() {\n return COMPONENTS;\n}\n\nmodule.exports = {\n resolveComponents,\n getSearcherCar\n};\n"],"sourceRoot":""}