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BxD,EAAMwD,eACtBC,gBAAiBzD,EAAMyD,gBACvBrB,iBAAkBpC,EAAMoC,iBACxB+C,SAAUnF,EAAMoB,OAAO+D,inBC/CnC,MAAMC,EAAU,CAAEC,QAAS,GAAIC,YAAa,IAEvCF,EAAQC,QAAQ,gBAAkB,CAC/BE,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,kBACPC,GAAI,GAEJC,KAAK,EACLC,GAAI,YACJC,EAAG,eACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,4BAKRC,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAOtC,EAAAA,EAAA,GACpBkD,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAWvC,EAAAA,EAAA,GAC5BkD,OAAOC,aAAaZ,aAAe,IACnCF,EAAQE,aAEY,MAAMa,EAAiB,GAC9BA,EAAe,yDAA2D,CAClFZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,oCAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAcpD,EAAAA,EAAA,GACPkD,OAAOC,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAUxG,cCAjBuG,EAAOC,QAAUC","sources":["webpack://sheikh-zayed-festival/./src/modules/szf-carousel/szf-carousel.tsx?9c5f","webpack://sheikh-zayed-festival/./src/modules/szf-carousel/szf-carousel.view.tsx?507c","webpack://sheikh-zayed-festival/./lib/szf-carousel/module-registration.js?1d31","webpack://sheikh-zayed-festival/external var \"React\"?0d3b","webpack://sheikh-zayed-festival/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { ISzfCarouselData } from './szf-carousel.data';\r\nimport { ISzfCarouselProps } from './szf-carousel.props.autogenerated';\r\nimport { ICarouselState } from './szf-carousel.state';\r\n\r\nexport interface ICarouselViewProps extends ISzfCarouselProps<{}>, ICarouselState {\r\n closeAnimation: string;\r\n carouselContainer: IModuleProps;\r\n telemetryContent: ITelemetryContent;\r\n next(): void;\r\n previous(): void;\r\n onIndicatorsClickHandler(): void;\r\n handleDismissCarousel(): void;\r\n handleOnExited(): void;\r\n handleOnExiting(): void;\r\n}\r\nexport interface contentBlockSlot {\r\n props:{\r\n config:{\r\n className?:string\r\n }\r\n }\r\n}\r\n/**\r\n *\r\n * CarouselModule component.\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CarouselModule extends React.PureComponent, ICarouselState> {\r\n private animating: boolean;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: ISzfCarouselProps, state: ICarouselState) {\r\n super(props);\r\n this.state = { activeIndex: 0, closeNow: false, dismissCarousel: false };\r\n this.animating = false;\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\r\n if (this.props.context.request.cookies.get(`CarouselDismiss_${this.props.id}`) === undefined) {\r\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'false');\r\n this.setState({ dismissCarousel: false });\r\n }\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n if (this.state.dismissCarousel) {\r\n return null;\r\n }\r\n\r\n const { className } = this.props.config;\r\n\r\n const viewProps = {\r\n // Context for telemetry and raw data for C1 to do customization\r\n // Including computed data, state data and methods\r\n ...this.props,\r\n ...this.state,\r\n telemetryContent: this.telemetryContent,\r\n carouselContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-carousel', className)\r\n },\r\n closeAnimation: this.state.closeNow ? 'close-now' : '',\r\n next: this._next,\r\n previous: this._previous,\r\n onIndicatorsClickHandler: this._goToIndex,\r\n handleDismissCarousel: this._handleDismissCarousel,\r\n handleOnExited: this._onExited,\r\n handleOnExiting: this._onExiting\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Function implementation to dismiss the Carousel.\r\n */\r\n private readonly _handleDismissCarousel = (): void => {\r\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\r\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'true');\r\n this.setState({ dismissCarousel: true });\r\n }\r\n };\r\n\r\n /**\r\n * Function implementation to move to next slide.\r\n */\r\n private readonly _next = (): void => {\r\n const { slots } = this.props;\r\n const nextIndex = this.state.activeIndex === (slots && slots.content && slots.content.length - 1) ? 0 : this.state.activeIndex + 1;\r\n // const Classes = slots && slots.content && (slots.content.length >0) && slots.content.map((contentBlockslot : React.ReactNode )=>{\r\n // return contentBlockslot && contentBlockslot.props && contentBlockslot.props.config.className\r\n // })\r\n /* VSI | Customization | Start */\r\n const { parallaxEffect, imageClassesForParallaxEffect } = this.props.config;\r\n if(parallaxEffect && imageClassesForParallaxEffect?.length){\r\n const domBodyElement = document.getElementsByClassName('szf_homepage');\r\n imageClassesForParallaxEffect.forEach((Parallaxclass)=>{\r\n domBodyElement[0].classList.remove(Parallaxclass);\r\n });\r\n domBodyElement[0].classList.add(imageClassesForParallaxEffect[nextIndex]);\r\n }\r\n /* VSI | Customization | End */\r\n if (this.animating) {\r\n this.setState({ closeNow: true, activeIndex: nextIndex });\r\n } else {\r\n this.setState({ activeIndex: nextIndex });\r\n }\r\n };\r\n\r\n /**\r\n * Function implementation to move to previous slide.\r\n */\r\n private readonly _previous = (): void => {\r\n const slots = this.props.slots && this.props.slots.content;\r\n const nextIndex = this.state.activeIndex === 0 ? (slots ? slots.length - 1 : 0) : this.state.activeIndex - 1;\r\n /* VSI | Customization | Start */\r\n const { parallaxEffect, imageClassesForParallaxEffect } = this.props.config;\r\n if(parallaxEffect && imageClassesForParallaxEffect?.length){\r\n const domBodyElement = document.getElementsByClassName('szf_homepage');\r\n imageClassesForParallaxEffect.forEach((Parallaxclass)=>{\r\n domBodyElement[0].classList.remove(Parallaxclass);\r\n });\r\n domBodyElement[0].classList.add(imageClassesForParallaxEffect[nextIndex]);\r\n }\r\n /* VSI | Customization | End */\r\n if (this.animating) {\r\n this.setState({ closeNow: true, activeIndex: nextIndex });\r\n } else {\r\n this.setState({ activeIndex: nextIndex });\r\n }\r\n };\r\n\r\n private readonly _onExiting = (): void => {\r\n this.animating = true;\r\n };\r\n\r\n private readonly _onExited = (): void => {\r\n this.animating = false;\r\n this.setState({ closeNow: false });\r\n };\r\n\r\n /**\r\n * Function implementation to move to a given slide.\r\n * @param newIndex\r\n */\r\n private readonly _goToIndex = (newIndex: number): void => {\r\n if (this.animating) {\r\n return;\r\n }\r\n this.setState({ activeIndex: newIndex });\r\n };\r\n}\r\n\r\nexport default CarouselModule;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Carousel } from '@msdyn365-commerce/components';\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { ICarouselViewProps } from './szf-carousel';\r\n\r\n/**\r\n * Returns item slots.\r\n * @returns Array of item slots.\r\n * @param props -Props.\r\n */\r\nconst retrieveItems = (props: ICarouselViewProps): React.ReactNode[] => {\r\n let items = [];\r\n items = props.slots && props.slots.content && props.slots.content.length > 0 ? props.slots.content : [];\r\n return items;\r\n};\r\nconst CarouselView: React.FC = props => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default CarouselView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['szf-carousel'] = {\n c: () => require('partner/modules/szf-carousel/szf-carousel.tsx'),\n $type: 'containerModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'szf-carousel',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/szf-carousel'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|szf-carousel|szf-carousel'] = {\n c: () => require('partner/modules/szf-carousel/szf-carousel.view.tsx'),\n cn: '__local__-__local__-szf-carousel'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["CarouselModule","React","constructor","props","state","super","_handleDismissCarousel","this","context","request","cookies","set","id","setState","dismissCarousel","_next","slots","nextIndex","activeIndex","content","length","parallaxEffect","imageClassesForParallaxEffect","config","domBodyElement","document","getElementsByClassName","forEach","Parallaxclass","classList","remove","add","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","telemetry","componentDidMount","undefined","get","render","className","viewProps","_objectSpread","carouselContainer","moduleProps","classnames","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","renderView","retrieveItems","items","Module","Object","assign","renderModuleAttributes","Carousel","pause","pauseOnHover","ride","autoplay","interval","transitionType","hideFlipper","dismissEnabled","dismissCarouselAriaText","resources","ariaLabelForDismissButton","indicatorAriaText","ariaLabelForSlide","directionTextPrev","flipperPrevious","directionTextNext","flipperNext","keyboard","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}