{"version":3,"sources":["webpack://CovestroUi/webpack/universalModuleDefinition","webpack://CovestroUi/webpack/bootstrap","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/events/js/events.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/tracking/js/tracking.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/breakpoints/js/breakpoints.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/scroll-to/js/scroll-to.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/form-control/js/form-control.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/hashscrolling/js/hashscrolling.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/overlays/js/overlays.ts","webpack://CovestroUi/./src/lib/molecules/favourites-action/js/favourites-action.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/product-compare/js/product-compare.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/body-state/js/body-state.ts","webpack://CovestroUi/./src/lib/molecules/marketo-form-global/js/marketo-form-global.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/burger/js/burger.ts","webpack://CovestroUi/./src/lib/molecules/favourite-button/js/favourite-button.ts","webpack://CovestroUi/./src/lib/molecules/event-list/js/event-list.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/labels/js/labels.ts","webpack://CovestroUi/./src/public_api.ui-footer.ts","webpack://CovestroUi/./src/lib/base/security/js/security.ts","webpack://CovestroUi/./src/lib/atoms/burger/js/burger.ts","webpack://CovestroUi/./src/lib/atoms/button/js/button.ts","webpack://CovestroUi/./src/lib/atoms/definitionlist/js/definitionlist.ts","webpack://CovestroUi/./src/lib/atoms/heading/js/heading.ts","webpack://CovestroUi/./src/lib/atoms/image/js/image.ts","webpack://CovestroUi/./src/lib/atoms/video/js/video.ts","webpack://CovestroUi/./src/lib/atoms/input/js/input.ts","webpack://CovestroUi/./src/lib/atoms/input-autocomplete/js/input-autocomplete.ts","webpack://CovestroUi/./src/lib/atoms/input-checkbox/js/input-checkbox.ts","webpack://CovestroUi/./src/lib/atoms/input-date/js/input-date.ts","webpack://CovestroUi/./src/lib/atoms/input-range-slider/js/input-range-slider.ts","webpack://CovestroUi/./src/lib/atoms/input-search/js/input-search.ts","webpack://CovestroUi/./src/lib/atoms/input-select/js/input-select.ts","webpack://CovestroUi/D:/a/1/s/frontend/packages/shared/utils/highlight/js/highlight.ts","webpack://CovestroUi/./src/lib/atoms/input-textarea/js/input-textarea.ts","webpack://CovestroUi/./src/lib/atoms/label/js/label.ts","webpack://CovestroUi/./src/lib/atoms/link/js/link.ts","webpack://CovestroUi/./src/lib/atoms/list-unordered/js/list-unordered.ts","webpack://CovestroUi/./src/lib/atoms/loading-indicator/js/loading-indicator.ts","webpack://CovestroUi/./src/lib/atoms/search-trigger/js/search-trigger.ts","webpack://CovestroUi/./src/lib/atoms/tag-filter/js/tag-filter.ts","webpack://CovestroUi/./src/lib/atoms/validation-summary/js/validation-summary.ts","webpack://CovestroUi/./src/lib/molecules/accordion/js/accordion.ts","webpack://CovestroUi/./src/lib/molecules/brand-benefit-list/js/brand-benefit-list.ts","webpack://CovestroUi/./src/lib/molecules/brand-product-accordion/js/brand-product-accordion.ts","webpack://CovestroUi/./src/lib/molecules/breadcrumb/js/breadcrumb.ts","webpack://CovestroUi/./src/lib/molecules/campaign-download/js/campaign-download.ts","webpack://CovestroUi/./src/lib/molecules/category-tags/js/category-tags.ts","webpack://CovestroUi/./src/lib/molecules/region-lightbox/js/region-lightbox.ts","webpack://CovestroUi/./src/lib/molecules/datasheet/js/datasheet.ts","webpack://CovestroUi/./src/lib/molecules/download-item/js/download-item.ts","webpack://CovestroUi/./src/lib/molecules/download-list/js/download-list.ts","webpack://CovestroUi/./src/lib/molecules/download-table/js/download-table.ts","webpack://CovestroUi/./src/lib/molecules/favourite-layer/js/favourite-layer.ts","webpack://CovestroUi/./src/lib/molecules/featured-download/js/featured-download.ts","webpack://CovestroUi/./src/lib/molecules/filter-market-switch/js/filter-market-switch.ts","webpack://CovestroUi/./src/lib/molecules/filter-multiselect/js/filter-multiselect.ts","webpack://CovestroUi/./src/lib/molecules/filter-productsearch/js/filter-productsearch.ts","webpack://CovestroUi/./src/lib/molecules/filter-categorysearch/js/filter-categorysearch.ts","webpack://CovestroUi/./src/lib/molecules/filter-categorysearch-singlelevel/js/filter-categorysearch-singlelevel.ts","webpack://CovestroUi/./src/lib/molecules/favourites-entry-table/js/favourites-entry-table.ts","webpack://CovestroUi/./src/lib/molecules/favourites-list/js/favourites-list.ts","webpack://CovestroUi/./src/lib/molecules/filter-singleselect/js/filter-singleselect.ts","webpack://CovestroUi/./src/lib/molecules/filter-two-level-multiselect/js/filter-two-level-multiselect.ts","webpack://CovestroUi/./src/lib/molecules/filter-wrapper/js/filter-wrapper.ts","webpack://CovestroUi/./src/lib/molecules/product-filter/js/product-filter.ts","webpack://CovestroUi/./src/lib/molecules/technical-property-popup/js/technical-property-popup.ts","webpack://CovestroUi/./src/lib/molecules/form-order/js/form-order.ts","webpack://CovestroUi/./src/lib/molecules/global-contact/js/global-contact.ts","webpack://CovestroUi/./src/lib/molecules/hazardous-substances/js/hazardous-substances.ts","webpack://CovestroUi/./src/lib/molecules/iframe/js/iframeResizer.js","webpack://CovestroUi/./src/lib/molecules/iframe/js/iframe.ts","webpack://CovestroUi/./src/lib/molecules/list-icons/js/list-icons.ts","webpack://CovestroUi/./src/lib/molecules/market-switch/js/market-switch.ts","webpack://CovestroUi/./src/lib/molecules/marketo-form/js/marketo-form.ts","webpack://CovestroUi/./src/lib/molecules/modal-overlay/js/modal-overlay.ts","webpack://CovestroUi/./src/lib/molecules/modal-actions/js/modal-actions.ts","webpack://CovestroUi/./src/lib/molecules/navigation-in-page/js/navigation-in-page.ts","webpack://CovestroUi/./src/lib/molecules/navigation-main/js/navigation-main.ts","webpack://CovestroUi/./src/lib/molecules/navigation-meta/js/navigation-meta.ts","webpack://CovestroUi/./src/lib/molecules/navigation-wrapper/js/navigation-wrapper.ts","webpack://CovestroUi/./src/lib/molecules/new-event/js/new-event.ts","webpack://CovestroUi/./src/lib/molecules/ordering-platform/js/ordering-platform.ts","webpack://CovestroUi/./src/lib/molecules/page-share/js/page-share.ts","webpack://CovestroUi/./src/lib/molecules/product-compare-button/js/product-compare-button.ts","webpack://CovestroUi/./src/lib/molecules/product-compare-layer/js/product-compare-layer.ts","webpack://CovestroUi/./src/lib/molecules/product-finder-teaser/js/product-finder-teaser.ts","webpack://CovestroUi/./src/lib/molecules/product-finder-teaser-V2/js/product-finder-teaser-V2.ts","webpack://CovestroUi/./src/lib/molecules/product-list/js/product-list.ts","webpack://CovestroUi/./src/lib/molecules/product-table/js/product-table.ts","webpack://CovestroUi/./src/lib/molecules/prompt-box/js/prompt-box.ts","webpack://CovestroUi/./src/lib/molecules/slider-gallery/js/slider-gallery.ts","webpack://CovestroUi/./src/lib/molecules/slider-stage/js/slider-stage.ts","webpack://CovestroUi/./src/lib/molecules/stage-brand/js/stage-brand.ts","webpack://CovestroUi/./src/lib/molecules/stage-keyvisual/js/stage-keyvisual.ts","webpack://CovestroUi/./src/lib/molecules/stage-product/js/stage-product.ts","webpack://CovestroUi/./src/lib/molecules/stage-content/js/stage-content.ts","webpack://CovestroUi/./src/lib/molecules/stage-compact/js/stage-compact.ts","webpack://CovestroUi/./src/lib/molecules/stage-campaign/js/stage-campaign.ts","webpack://CovestroUi/./src/lib/molecules/stage-event/js/stage-event.ts","webpack://CovestroUi/./src/lib/molecules/table-filter/js/table-filter.ts","webpack://CovestroUi/./src/lib/molecules/table-filterv2/js/table-filterv2.ts","webpack://CovestroUi/./src/lib/molecules/talks/js/talks.ts","webpack://CovestroUi/./src/lib/molecules/teaser-benefit/js/teaser-benefit.ts","webpack://CovestroUi/./src/lib/molecules/teaser-contact-form/js/teaser-contact-form.ts","webpack://CovestroUi/./src/lib/molecules/teaser-video/js/teaser-video.ts","webpack://CovestroUi/./src/lib/molecules/teaser-large/js/teaser-large.ts","webpack://CovestroUi/./src/lib/molecules/teaser-event/js/teaser-event.ts","webpack://CovestroUi/./src/lib/molecules/tooltip/js/tooltip.ts","webpack://CovestroUi/./src/lib/molecules/tooltip-actions/js/tooltip-actions.ts","webpack://CovestroUi/./src/lib/molecules/scrollable-teaser/js/scrollable-teaser.ts","webpack://CovestroUi/./src/lib/molecules/search-flyout/js/search-flyout.ts","webpack://CovestroUi/./src/lib/molecules/disclaimer/js/disclaimer.ts","webpack://CovestroUi/./src/lib/molecules/survey/js/survey.ts","webpack://CovestroUi/./src/lib/molecules/lounge-popup/js/lounge-popup.ts","webpack://CovestroUi/./src/lib/molecules/html-container/js/html-container.ts","webpack://CovestroUi/./src/lib/molecules/iCal-download/js/iCal-download.ts","webpack://CovestroUi/./src/lib/molecules/info-list/js/info-list.ts","webpack://CovestroUi/./src/lib/molecules/investor-overview/js/investor-overview.ts","webpack://CovestroUi/./src/lib/molecules/lightbox/js/lightbox.ts","webpack://CovestroUi/./src/lib/molecules/language-popup/js/language-popup.ts","webpack://CovestroUi/./src/lib/molecules/customer-lounge-brand-intro/js/customer-lounge-brand-intro.ts","webpack://CovestroUi/./src/lib/molecules/customer-lounge-brand-product-table/js/customer-lounge-brand-product-table.ts","webpack://CovestroUi/./src/lib/molecules/hero-article-stage/js/hero-article-stage.ts","webpack://CovestroUi/./src/lib/molecules/contact-teaser-card/js/contact-teaser-card.ts","webpack://CovestroUi/./src/lib/molecules/contact-teaser-popup/js/contact-teaser-popup.ts","webpack://CovestroUi/./src/lib/molecules/contact-teaser-large/js/contact-teaser-large.ts","webpack://CovestroUi/./src/lib/molecules/expansion-panel/js/expansion-panel.ts","webpack://CovestroUi/./src/lib/molecules/marketo-lightbox/js/marketo-lightbox.ts","webpack://CovestroUi/./src/lib/organisms/easteregg/js/pacman.min.js","webpack://CovestroUi/./src/lib/organisms/error-404/js/error-404.ts","webpack://CovestroUi/./src/lib/organisms/form/js/form.ts","webpack://CovestroUi/./src/lib/organisms/header/js/header.ts","webpack://CovestroUi/./src/lib/organisms/header-campaign/js/header-campaign.ts","webpack://CovestroUi/./src/lib/organisms/header-campaign-collector/js/header-campaign-collector.ts","webpack://CovestroUi/./src/lib/organisms/product-compare/js/product-compare.ts","webpack://CovestroUi/./src/lib/organisms/product-compareV2/js/product-compareV2.ts","webpack://CovestroUi/./src/lib/organisms/teaser-content-area/js/teaser-content-area.ts","webpack://CovestroUi/./src/lib/organisms/customer-lounge-navigation/js/customer-lounge-navigation.ts","webpack://CovestroUi/./src/lib/organisms/customer-lounge-project-teaser/js/customer-lounge-project-teaser.ts","webpack://CovestroUi/./src/lib/organisms/favourites-overview/js/favourites-overview.ts","webpack://CovestroUi/./src/lib/molecules/favourites-share/js/favourites-share.ts","webpack://CovestroUi/./src/lib/organisms/overview-share-favourites/js/overview-share-favourites.ts","webpack://CovestroUi/./src/lib/organisms/teaser-filter-area/js/teaser-filter-area.ts","webpack://CovestroUi/./src/lib/organisms/home-scrollable-teaser/js/home-scrollable-teaser.ts","webpack://CovestroUi/./src/lib/organisms/sds-search/js/sds-search.ts","webpack://CovestroUi/./src/lib/organisms/teaser-tabs/js/teaser-tabs.ts"],"names":["root","factory","exports","module","define","amd","window","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","oldJsonpFunction","slice","PublicEvents","triggerPublicEvent","type","terrificModule","target","eventData","eventName","terrificModuleName","_ctx","dataset","tName","event","CustomEvent","detail","dispatchEvent","onPublicEvent","element","callback","eventHandler","addEventListener","removeEventListener","params","bubbles","cancelable","undefined","evt","document","createEvent","initCustomEvent","default","Cookies","setSitecoreAnalyticsCookiePref","active","set","expires","setKnownMarketoLead","state","remove","checkMarketoEmailLink","querySet","location","search","substring","split","indexOf","gtmTrack","dataLayer","e","services","UC_UI","getServicesBaseInfo","sc","find","consent","status","mkto","isKnownMarketoLead","cookieValue","$","throttle","cachedBreakpoint","lastViewport","on","newViewport","getCurrentBreakpoint","trigger","leading","trailing","$meassureHelper","body","Error","appendTo","getComputedStyle","getPropertyValue","replace","meassureBreakpoint","isSmall","viewport","isMedium","onBreakpointChange","handler","off","isLarge","isExtraLarge","isSmallOrMedium","scrollToElement","$elm","preventFixedHeader","additionalOffsetTop","triggerScrollReached","topOnly","offset","scrollProperties","scrollTop","top","scrollLeft","left","animate","setTimeout","FormControlLabelStateClass","getLabel","control","$this","placeholderTxt","attr","$label","prev","Default","before","addClass","Required","toString","hasClass","floatControlLabel","isFocused","$formControl","each","this","HTMLSelectElement","val","Floated","$innerWidth","next","innerWidth","css","Math","floor","DoNotRemoveFloated","removeClass","ev","FormControlSiteCoreStateClass","scroll_to_1","initialized","scrollToIdElement","hash","$el","getElementById","height","init","addScrollClickTrigger","preventDefault","currentTarget","history","pushState","newurl","protocol","host","pathname","path","historyPush","Events","overlayDataName","IsOverlayDisplayed","documentElement","ShowOverlayWithRetry","openFunc","delayInMs","unsubscribeOpenHandler","unsubscribeCloseHandler","console","debug","timeoutHandle","overlayOpened","DoShowOverlay","clearTimeout","overlayClosed","ShowOverlay","unsubscribeCloseHandler_1","CloseOverlay","closeFunc","terrific_singleton_1","terrific_module_1","form_control_1","Track","classes","submitApis","FavouritesAction","_super","__extends","start","resolve","$ctx","rebindCommonViewEvents","$popup","$textareaContainer","bindTextareaContainerEvents","$textBoxContainer","bindTextboxContainerEvents","$allChecklists","bindAllCheckboxesEvents","bindSubmitEvent","contentType","_this_1","canSubmit","$btn_1","lockSubmitBtn","track","url_1","id","textareaValue","ids","getCheckedListIds","textboxValue","getTextCheckBoxValue","ajax","url","dataType","textareaInput","textInput","success","response","reload","log","error","message","complete","unlockSubmitBtn","xhr","statusText","bindAddSharedEntrySubmitEvent","$btn_2","url_2","SharedEntryIds","submitTrack","assign","redirectUrl","_this","me","$target","countTextarea","validateInputTextBox","$textboxContainer","$inputBox","$checkBox","parents","prop","$allCheckboxContainer","validateCheckList","$textarea","$textareaValLength","parent","$textareaValLengthMax","textVal","currentCount","parseInt","text","$currentPopup","$checkedItems","idArr","Array","join","$allCheckboxesContainer","chkVal","$chkValMsgEle","textareaVal","textboxVal","$textcheckboxContainer","$textbox","$allChecklistContainer","displayPopup","removePopup","empty","$btnEle","removeAttr","submitUrl","action","trackdata","eventCategory","eventAction","eventLabel","stop","__decorate","createModule","TerrificSpec","cookieInstance","withConverter","read","write","getCookieData","JSON","parse","getArrayIndex","array","findIndex","el","number","saveCookie","stringify","updateLayer","$compareLayerModule","count","addNewProductLayer","market","removeNewProductLayer","removeProductData","cookieVal","index","removeCompareProductLayerFromFinderList","setLayerHiddenCookie","removeProduct","removeAllProduct","addProduct","isProductInCookie","Bodystate","outerParent","stateBurgerNav","visible","noScrolling","scrollbar","changeBodyState","bodyClass","toggleClass","getBodyState","removeBodyState","tracking_1","MarketoFormGlobal","initializeMarketoOnScriptLoad","timerRef","MktoForms2","whenReady","form","$component","getFormElem","closest","initMessageBox","translate","sortSelectOptions","prefillForm","initContactImage","initCheckboxOrder","hideFields","updateFieldAttributes","productAutoSuggest","whenRendered","formEl","attrTag","_forEach","forEach","querySelectorAll","ancestor","setAttribute","input","currentTag","getAttribute","trim","jsonStr","fieldName","fieldTranslations","propertyName","propertyValue","translateTargetEl","currentTranslations","querySelector","lastChild","nodeValue","mktoFieldDescriptor","validationMessage","innerHTML","txt","parentElement","innerText","onSubmit","submittable","$form","language","$options","$defaultOption","filter","$othersOption","optIndex","optEle","optValue","toLocaleLowerCase","$optionEles","toArray","sort","a","b","aText","bText","localeCompare","ignorePunctuation","append","prepend","first","formatPhoneNumber","phone","vals","Phone","formattedPhone","prefilledJsonStr","prefillFields","formFieldEles","fieldValue","$fieldEle","formFieldId","obj","GenerateObject","formFieldValue","$formCheckbox","$contactImage","$formMessage","$formEl","rando","Date","getTime","random","$chk","chkId","newChkId","includes","formId","newFormId","hiddenFieldsArr","campaignId","formcampaignId","siteCampaignId","$formContainer","field","urlParams","URLSearchParams","utmId","has","autosuggestObjJsonStr","autoObj_1","FieldName","$autoEle_1","Endpoint","term","permissionQuery","PermissionQuery","max","MaxItem","lang","Language","renderDropdown","productSuggestions","ProductLabel","children","rebindDropdownEvents","labelContent","generateDropdownLabelContent","NoResultLabel","showDropdown","resizeDropdown","autoHideDropdown","generateDropdownItemContent","uvptext","currentTop","position","outerHeight","currentLeft","currentWidth","outerWidth","width","$autoEle","label","htmlContent","uvp","uvpno","setProductInfo","autoObj","extended","uvpFieldName","brandFieldName","brand","materialFieldName","materials","applicationFieldName","applications","industryFieldName","industries","businessUnitFieldName","businessUnits","show","stopPropagation","navLevel","updateNavLevel","nr","getNavLevel","favourites_action_1","productCompareClasses","productFinderClasses","popupClasses","FavouriteButton","confirmationKey","$localFavouritesButton","$globalFavouritesButton","$dynamicPopupContainer","$staticPopupContainer","$successPopup","$failurePopup","$loadingIndicator","pageId","enableFavourite","statusApiEndpoint","actionViewEndpoint","favorAction","updateStatus","actionType","getActionPartialView","$closeBtn","closeStaticPopup","closeSuccessPopup","query","substr","pageid","updateFavouriteButton","isActive","lockScreen","CurrentUrl","href","json","disablePopup","prefillTextareaBox","unlockScreen","currentUrl","enablePrompt","showSuccessPopup","showStaticPopup","curScrollTop","fadeIn","$container","$descInputBox","descVal","$productCompareNameEles","$productFinderSelectedCountry","$productFinderNameEles","getElementsText","filterTxt","getPageTitle","focus","docTitle","title","$nameEles","nameArr","getActionPartialViewForEventList","$favorBtn","favoriteCtx","siblings","$staicPopup","bindSubmitEventForEventList","prefillTextareaBoxForEventList","$button","updateStatusForEventList","statusEndpoint","filterLabel","filterOpen","filterClose","filterTags","filterTag","filterTagContainer","counterLabel","counterHeading","filterSelect","clearFilterBtn","loadMoreBtn","teaserContainer","stateHidden","teaserBlock","teaserColorBlock","twoLevelmainItemLink","twoLevelSelector","twoLevelList","twoLevelListOpen","twoLevelMainChecked","twoLevelParent","twoLevelParentHeader","twoLevelParentLink","twoLevelParentChecked","twoLevelParentDisabled","twoLevelChildList","twoLevelChild","twoLevelChildDisabled","twoLevelChildInputDisabled","twoLevelMainClose","oneLevelSelector","oneLevelItemContainer","oneLevelList","oneLevelListOpen","oneLevelMain","oneLevelMainChecked","oneLevelDisabled","oneLevel","oneLevelClose","placeholders","names","parameterSet","EventList","onOpenFilter","onCloseFilter","clickEvent","dataChanged","removeSelectedTag","clearAllFilters","loadMore","initTeaserData","resize","$textArea","dateParaValue","getIdParameterValueFromUrl","regionIdParaValue","materialIdParaValue","industryIdParaValue","getTeaserData","materialQuery","getIdParameterValue","industryQuery","dateQuery","regionQuery","pageNumber","lockFilters","lockLoadMoreButton","searchRootId","initNum","apiEndpoint","pageSize","configuration","initNumber","Configuration","container","jsonData","totalNumber","updateCounterLabel","displayNumber","updateCounterHeading","updateLoadMoreButton","enableLoadMore","updatePageNumber","updateFacet","enabledFilterItems","updateTeaserHeight","updateNoResult","unlockFilters","generateSelectedTags","updateUrl","parameterList","dateParameter","getUniqueNameParameter","regionParameter","materialParameter","industryParameter","searchQuery","generateUniqueNameQueryString","$tagContainer","selectorName","$checkboxes","areAllSubFiltersChecked","$parentSelectedOption","tagHtml","getSelectedTagHtml","$checkedboxes","childIndex","childEle","getSelectedDateMonthTagHtml","oneLevelIndex","oneLevelEle","html","hide","$currentTargetElement","triggerHandler","pageNum","unlockLoadMoreButton","displayNum","enable","currentId","isEnabled","setTwoLevelFilterDisabledClass","$ele","selector","$ids","arr","parameterName","parameter","$selectorInput","uniqueName","vars","pair","uniqueNameVariables","decodeURI","valueArr","searchId","getIdByUniqueName","$item","parameters","every","isElementChecked","checked","$inputItem","getTagHtml","year","month","$parentItem","areAllFilterDisabled","isElementDisabled","formatLabel","values","_i","arguments","formattedLabel","count_1","jQuery","T","bootstrap","body_state_1","body_state_2","burger_1","breakpoints_1","Burger","initBurger","ctx","toggleNavigation","onClickBurger","Button","isScrollTopBtn","scrollToTop","classList","contains","events_1","Definitionlist","_triggerChangeEvent","uxChange","Heading","Image","VideoComponent","$videoContainer","$consentContainer","videoData","milestonePercentage","loggedPlayActivity","loggedReachedMilestoneActivity","addMiScript","RegisteredUpdate","usercentricsDpsServiceName","VideoPlayer","Collection","acceptAnalytics","rejectAnalytics","containerId","tId","consentContainerId","$script","onScriptLoaded","embedscript","UC_UI_INITIALIZED","initVideoPlayer","config","onPlayerInit","configType","playerId","videoId","apiUrl","flashPath","addPlayerById","api","progressMarker","reachedMarker","videoName","getVideoName","registerEventListener","onPlay","onPause","onEnded","onTimeUpdate","timeUpdateCallBack","playingCallback","metaApi","getApi","metaTitle","getVideoTitle","Munchkin","mktoenvId","munchkinFunction","milestoneInSeconds","getPlayerById","getCurrentTime","percentWatched","getDuration","currentTime","round","time","percentPosition","marker","eventValue","$videoGatedPlay","$videoOpenedBtn","triggerPlay","$videoPlay","$videoLocked","removePlayerById","Input","isNaN","setValue","getValue","InputAutocomplete","InputCheckbox","checkboxElement","change","is","isChecked","InputDate","noUiSlider","InputRangeSlider","valueMin","valueMax","rangeMin","rangeMax","decimalSeparator","slider","numberOfDecimals","_calcNumberOfDecimals","marginBetweenHandles","_calcMarginBetweenHandles","connect","tooltips","margin","range","min","format","wNumb","decimals","mark","handle","_triggerReleaseEvent","_calcRange","widthOfRangerSlider","abs","uxSubmit","adjustSlider","leftHandleValue","rightHandleValue","InputSearch","highlight_1","InputSelect","fullwidth","autowidth","placeholderWorkaroundList","placeholderWorkaroundTop","customDropdownClass","modal","animationFrameId","cancelAnimationFrame","requestAnimationFrame","self","minSearchResults","$select2","select2","minimumResultsForSearch","dropdownAutoWidth","dropdownCssClass","matcher","toUpperCase","highlight","escapeMarkup","markup","templateResult","item","templateSelection","$body_1","$html","$optionsElement","hasScrollbar","scrollHeight","innerHeight","uxShow","uxHide","_openModal","_closeModal","getOptionValue","modifier","pattern","RegExp","mod","exec","InputTextarea","Label","Link","ListUnordered","LoadingIndicator","SearchTrigger","searchFlyoutIsOpen","_handleTrigger","_close","TagFilter","ValidationSummary","Accordion","$accordionElements","doNotClose","onTriggerClick","$accordionElement","not","BrandBenefitList","BrandProductAccordion","breadcrumbScroll","IScroll","initialContentWidth","Breadcrumb","initBreadcrumbOpening","mouseWheel","scrollbars","scrollX","scrollY","setEllipsisWhenNotEnoughSpace","breadcrumbOpener","refreshScroll","elem","closeAllFlyoutsAndReenableScrolling","openFlyoutAndDisableScrolling","flyoutElement","disable","refresh","autoScrollIfOutOfScreen","flyoutLeft","flyoutWidth","isNotEnoughSpace","CampaignDownload","autoDownload","downloadLink","flowId","noActionForKnownUsers","closeButtonDisabled","themeAttribute","moduleName","lightboxComponent","lightbox","getModuleByDomNode","getMktoLightboxView","CategoryTags","Overlays","RegionLightbox","hasUserInteracted","adjustLinkUrl","getApiUrl","method","getRegionData","markUserHasInteracted","regionLabel","RegionId","countryLabel","CountryId","regionsList","Regions","regions","options","firstElementChild","RegionCode","Name","country","k","Countries","CountryCode","CountryName","postApiUrl","countries","Datasheet","DownloadItem","$select","_getLanguageSelect","updateDownloadButton","_getDownloadButton","getLanguageSelectValue","setDownloadURL","DownloadList","initSds","initLoadMoreEntries","showTitle","changeTitle","sdsElements","serviceUrl","onSdsAjaxSuccess","isArray","sdsDownloads","$selectElement","_a","link","activeEle","minOfShowEntries","$entries_1","dataAttributes","DownloadTable","filters","createFilters","showDescription","$element","facetAndList","updateLoadMore","results","getSelectedFacets","payload","facets","done","jqXhr","updateCounters","displayed","footer","showMore","initializeComponents","initializeShowMoreLinks","totalCount","enabled","startNode","$descText","instance","$gatedItem","FavouriteLayer","hideLayer","showLayer","FeaturedDownload","isOpen","showFileInfo","changeFileInfo","initLoadMore","activeElement","$downloadItems_1","minOfShowDownloadItems","PageSizeLoadMore_1","currentShowDownloadItems_1","allOfShowDownloadItems","eq","FilterMarketSwitch","FilterMultiselect","$confirmButton","$itemSecondLevel","$listFirstLevel","$itemFirstLevel","$itemFirstLevelHeaderMobile","$closeFilter","$floatLabel","onToggleOverlayClick","onConfirmButtonClick","onPrimaryfilterClick","setFilterCheckedClass","toggleFilter","closeFilter","$checkbox","setFilter","isAnyFilterChecked","some","toggleState","closeAllSubFilterValues","openFilter","openFilterValueClick","FilterProductsearch","FilterCategorysearch","FilterCategorysearchSingleLevel","FavouritesEntryTable","FavouritesList","FilterSingleselect","FilterTwoLevelMultiselect","registerProperties","bindEvents","setFilterDisabledClass","$layerSecondLevel","onBackButtonClick","onOpenCategoryClick","onCloseCategoryClick","onSubfilterClick","rebindEvents","closeFilterValueClick","adjustFirstLevelFilterAccordingToSubFilters","$allCheckboxesOnSameLevel","$firstLevelItem","FilterWrapper","ProductFilter","TechnicalPropertyPopup","_hidePropertyPopup","_triggerTab","num","FormOrder","$textareaWithFocus","$areaAdditionalFields_1","$buttonCancel","$buttonSubmit","GlobalContact","showLoadMoreSpinner","$wechatContainer","$header","setAccordionActions","setLanguageSelectActions","setAutoScrollActions","hideErrorMessages","responseRequest","$languageSelect","initializeOnRequest","async","res","hidePreloader","noDataAvailable","responseSuccess","noServerResponse","showPreloader","removeLocations","$accordionBtn","addLocations","shouldShowAccordionBtn","prepareLocationsMarkUp","numOfAddresses","str","getAccordionBtn","accordionToggleEvt","accordionSetToggleText","getSelect","baseUrl","selectedOptionChanged","checkLocationParamsAndSet","accordionToggleText","accordionClassToggle","$accordionBtnContainer","accordionToggleTextOn","accordionToggleTextOff","shouldScrollToElement","requiredNumOfAddressesForScrolling","scrollOnCloseAccordion","getParamNameFromBaseUrl","Map","map","param","hideShowLessContainer","$targetNoData","$targetNoResponse","dataAttr","HazardousSubstances","$languageContainer","updateLanguages","langCode","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","logEnabled","hiddenCheckEnabled","msgHeaderLen","msgId","msgIdLen","pagePosition","resetRequiredMethods","scroll","bodyScroll","documentElementScroll","settings","timer","defaults","autoResize","bodyBackground","bodyMargin","bodyMarginV1","bodyPadding","checkOrigin","inPageLinks","enablePublicMethods","heightCalculationMethod","interval","maxHeight","Infinity","maxWidth","minHeight","minWidth","resizeFrom","scrolling","sizeHeight","sizeWidth","tolerance","widthCalculationMethod","closedCallback","initCallback","messageCallback","warn","resizedCallback","scrollCallback","func","attachEvent","formatLogHeader","iframeId","retStr","parentIFrame","getId","getMyID","isLogEnabled","msg","output","info","iFrameListener","resizeIFrame","ensureInRange","syncResize","setSize","messageData","setPagePosition","Dimension","Number","dimension","toLowerCase","size","getMsgBody","getElementPosition","iFramePosition","getBoundingClientRect","getPagePosition","x","y","scrollRequestFromChild","addOffset","iframe","newPosition","scrollTo","unsetPagePosition","funcName","chkCallback","createOutgoingMsg","iFrameReadyMsgReceived","processMsg","retCode","true","false","isMessageFromMetaParent","retBool","hasSettings","checkIFrameExists","origin","constructor","checkList","remoteHost","checkSingle","isMessageFromIFrame","firstRun","closeIFrame","msgBody","forwardMsgFromIFrame","bodyPosition","clientHeight","clientWidth","offsetTop","offsetLeft","pageYOffset","pageXOffset","sendPageInfoToIframe","hashData","decodeURIComponent","getElementsByName","jumpPosition","jumpToTarget","moveToAnchor","findTarget","resetIFrame","actionMsg","retVal","TypeError","parentNode","removeChild","chkZero","checkIFrames","checkIFrame","settingId","chkDimension","style","offsetParent","isVisible","mutationObserved","mutations","debouce","MutationObserver","WebKitMutationObserver","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","createMutationObserver","fixHiddenIFrames","processDimension","setDimension","doNotSync","calleeMsg","targetOrigin","contentWindow","postMessage","setupIFrame","newId","src","ensureHasId","checkOptions","option","copyOptions","getTargetOrigin","processOptions","overflow","addStyle","chkMinMax","setLimits","resetRequertMethod","checkReset","Function","iFrameResizer","close","anchor","sendMessage","fn","resizeIFrames","sendTriggerMsg","tabVisible","visibilityState","isIFrameResizeEnabled","iFrameResize","end","createJQueryPublicMethod","tagName","iFrames","vendors","setupRequestAnimationFrame","t_id","servicename","paramsdata","Iframe","usercentricsservicename","onPostmessage","framename","$frame","$form_2","getOwnPropertyNames","submit","initUCPostCall","addUsercentricsIframe","addIframe","initPostCall","$form_1","originalEvent","source","ListIcons","initImageTooltip","$triggers","$trigger","tooltipster","theme","content","contentAsHTML","interactive","zIndex","functionReady","_$tooltip","functionPosition","helper","side","coord","MarketSwitch","cachedCountry","preventAutoSubmit","_updateSelectedOption","followOptionLink","marketo_form_global_1","MarketoForm","$blockedMessage","envId","formFullId","formHref","redirectHref","isExpired","submitSuccessfulMessage","isHiddenFormSubmit","isSendDataToGtmOnPageLoad","marketoService","timerRef_1","setInterval","clearInterval","loadMktoForm","loadForm","onSuccess","followUpUrl","submitDataToGtm","$teaser","className","formVersion","setFormStartDataToGtm","formNode","typeOfForm","form_id","form_name","form_destination","form_submit_text","ModalOverlay","copy","ModalActions","_submitModal","_openTooltip","_hidePopup","copyURLToClipboard","addEmaillAdress","changeTextareaCount","newListValidation","emailListValidation","$input","$newlistWrapper","$checkedbox","opts","getClipboardOpts","getLocationHref","showFeedbackMsg","hideFeedbackMsgTimer","showDebugInfo","$clipboardAnchor","hideFeedbackMsg","$openTooltip","$addEmail","$emailTemplate","$emailTemplateHtml","hashscrolling_1","NavigationInPage","winScrollY","mainSelector","attributeNameTarget","attributeNameId","attributeNameTitle","targetSelector","buttonSelector","statusBarWrapperSelector","statusBarSelector","targetWrapperSelector","pageTitleSelector","stickyCtaSelector","stickyShareBtn","stickyShareSelector","sharePopupView","shareShowPopup","fadeInBar","fadeOutBar","titleFlexEnd","scrollDirection","lastScrollTop","threshold","thresholdOffset","anchorBarButtons","targetNavElements","anchorBarBreakpoints","initInpage","initPageTitle","initStickyCta","initStickyShare","triggerHash","listItemPlaceholder","getListItemPlaceholder","shouldInpageNavgationBeShown","hasHash","pageHasHashTag","activeItem","regScrollEvent","setListItems","createArrayData","regAnchorBarButtonsEvt","setMobileAction","normalizedHash","elemWithHash","onload","targetValue","replacements","ä","ö","ü","ß"," ","&","-","+","char","replaceSpecialCharactersMain","targetElement","scrollIntoView","behavior","handleJump","removeInpageNavigation","formID","stickyCtaTheme","stickyCta","stickyCtaGroup","stickyCtaText","shareLocation","shareSelector","after","clone","stickyPopupShareShow","stickyPopupShare","setClipboardAnchorBtn","hasCanvasOffset","hasAnchorBarOffCanvas","setTargetData","createTargetNavElements","inpageNavElements","setAnchorBarBreakpoints","anchorAttributeName","targetAnchorIds","targetAnchorTitles","listItems","createListItem","$links","targetAttribute","navElements","attributeList","targetAttributeValue","anchorAttributeNameId","anchorTitle","$listItem","breakpoints","offsetHeight","onScroll","handleScrolling","showCtaThreshold","last","ctaSelector","shareOffsetTop","ctaOffsetTop","setScrollDirection","calcAndSetAnchorItemActive","showHideAnchorBar","moveAxisX","idx","actAnchorBarButtonEvt","showAnchorBar","hideAnchorBar","display","currentYScroll","topPos","progressBarSetWidth","progressBarCalcWidth","offsetWidth","dataAttrOfClickedElem","getWidthOfAnchorBar","anchorBarOffsetLeft","delay","getAnchorElement","calcOffsetY","elAttribute","getAttributeNode","replaceSpecialCharacters","hoverintent","hoverIntentOptions","timeout","NavigationMain","initNavigationOpening","initNavigationPositioning","uxResize","closeNavigation","currentFirstLevelNavigationElement","currentFirstLevelNavigationFlyout","positionOfFirstLevelNavigationElement","paddingLeftOfFirstLevelNavigationElement","parseFloat","widthOfOfFirstLevelNavigationElement","centerPositionOfNavElement","widthOfFlyout","leftOfFlyout","widthOfArrow","rightOfFlyout","totalUsuableWidth","isDesktopNavigationInitialized","NavigationMeta","initiallyMeasured","metaNaviFlyout","fadeOut","initUserStatus","initFavTooltip","$loginElement","$loginUsername","onUserStatusAjaxSuccess","login","FirstName","firstName","lastName","LastName","click","initDesktopNavigation","navigationItemLinks","sitesOpenerElement","countryRegions","countryContainer","sitesFlyout","activateRegionAndSetHeight","setHeaderMargin","toggleSitesNavigation","destroyDesktopNavigation","closeSitesNavigation","addClassWithTimeout","classname","NavigationWrapper","initNavigation","_getOpenTrigger","_getCloseTrigger","destroyMobileNavigation","initMobileNavigation","$open","$close","$wrapper","onClickOpenSubnavigation","onClickCloseSubnavigation","_getLayers","_getCurrentLayer","cta","_getParentsLayer","_getChildrenLayer","_getLevel","elm","level","stopImmediatePropagation","openLayer","$currentLayer","add","$layer","NewEvent","initCountdown","eventDescriptionEllipsis","onDownLoadCalendar","$countdown","totalseconds","calculator","nextseconds","h","$eventDescription","calendarResult","open","$eventItems","$event","OrderingPlatform","PageShare","isClipboardAnchorBtn","clipboardAnchor","previousElementSibling","ProductCompareHelper","ProductCompareButton","added","addText","removeText","productId","productName","onButtonClick","changeCompareProductItemState","initButtonState","setButtonState","updateCookieState","ProductCompareLayer","oneItemText","multiItemText","compareProductList","product","addNewCompareProductItem","removeNewCompareProductItem","onCloseClick","onSwitchClick","fetchCompareProductNameFromService","fetchProductCompareData","onProductCompareDataSuccess","compareData","responseItem","dataItem","handleCompareResult","compareProductList_1","compareItem","ProductFinderTeaser","$link","onButtonSubmitTeaser","separator","filterseperator","sortingParam","sortingparam","countryParam","countryparam","marketparam","serializedData","serializeArray","encodeURIComponent","materialAndIndustryParams","allParams","newLinkUrl","baseurl","queryparam","$paramValues","localStorage","setItem","event_list_1","$hiddenFieldTest","$hiddenFieldValues","showFilters","onButtonSubmit","checkboxes","tagsContainer","ProductList","ProductTable","PromptBox","$closeButton","hidePrompt","labels_1","videoCfg","SliderGallery","initVars","$items","itemMargin","_showDotsSlider","$sliderNavigation","addDataItemAttribute","initScroller","reinitScrollerWhenViewportChangedToOrFromSmall","handleSizeAndPosition","$list","ready","handleVideoImageLoading","handleCampaignTeaserClick","initNavigationArrows","setActiveDot","$arrowLeft","$arrowRight","$scroller","$imagesAndVideos","$dotContainers","$dots","$sliderPages","$campaignTeaserArea","itemsPerPage","getItemsPerPageConfig","numberOfItemsPerPageBeforeViewportChanged","getNumberOfItemsPerPage","activeItemBeforeViewportChanged","isMobileSlider","sliderIsScrolling","sliderPageIndex","itemsPerPageData","concat","isInteger","fill","mediaelements_1","Promise","all","then","sliderGalleryScroller","goToPageX","evtClickSkipBackOrForth","setFixedPageWidthAndArrowPosition","setScrollerHeightAccordingToPageHeight","openModalAndCopyText","numberOfItems","totalMarginWidth","itemWidth","biggestItem","getBiggestItemAndHeightOfPage","$imgVideoEl","biggestItemHeight","currentPage","pageX","page","itemToStartWith","setArrowPosition","arrowTopPosition","pages","numberOfItemsPerPage","initPageDots","newIscroll","initScrollerEvents","initItemLinkBehaviour","startSlide","trackSlide","showOrHideDots","evtClickDot","visibleDotContainers","snap","momentum","initMobileSlider","tap","startX","startY","sdeltaX","$elements","currentIndex","isMove","touches","clientX","clientY","items","getSlideIndex","ceil","changedTouches","indexItem","endX","endY","deltaX","deltaY","setActiveSlide","activePage","goToPage","$videosContainer","stopVideoInCurrentSlider","sliderIdxOffset","nextPage","prevSlide","$listItems","$videoElement","newVideoAttribute","callVideoAPIMethod","list","campaignName","ecommerce","promoView","promotions","_sliderPageIndex","SliderStage","setScrollerHeight","goToDotX","$captionWrapper","$caption","scrollToAnchor","$pages","$currentPage","$totalPage","$dot","$dotButton","$dotWrapper","$dotArea","$ScrollDownLink","dotIndex","sliderlength","itemPerWidth","nextIndex","oneDot","zeroDot","twoDot","threeDot","fourDot","nextIndex_1","scrollAnchor","StageBrand","handleCtaButtonClick","button","applyScrollToHandler","StageKeyvisual","$inputElement","_handleInputChange","inputString","$searchLink","keyCode","StageProduct","StageContent","StageCompact","StageCampaign","ticking","scrollArea","requestScrollTick","onResize","scrollUpdate","bgPosition","transform","StageEvent","initShare","toggleRegisterForm","$shareBtn","$registerBtn","$registerForm","TableFilter","_toggleContainer","closeContainer","TableFilterV2","Talks","$detailsWrap","$details","$listButton","$accordionButton","$leftImage","$leftImageItem","setHeight","accordionToggle","TeaserBenefit","_triggerAccordion","$currentTarget","optionValues","other","productSafetyDataSheets","TeaserContactForm","focusFromScrollReached","initFormHadling","onClickAnchor","onClickLink","onFocusAreaFocus","prefillFormData","$inputSelect","$inputCheckBox","inputSelecteOptionChanged","addOtherOptionForMaterialTag","setMaterialTagDefaultValue","onCancleClick","onFormSubmit","validate","dataValRequired","nextAll","unbind","opt","$sdsLinkCol","$sdsTextboxCol","showCheckMark","$categoryInputContainer_1","$firstInput_1","select","otherText","otherValue","meterialTag","TeaserVideo","$overlayButton","$overlayArea","$buttonClose","showTeaserVideo","hideTeaserVideo","startVideoPlayback","stopVideoPlayback","player","getVideoPlayer","play","pause","componentId","TeaserLarge","description","TeaserEvent","initHeight","textAreaHeight","Tooltip","_getTriggerElement","initTooltip","_getTooltipContent","TooltipActions","showActions","hideActions","_openActionsPopup","_hideActionsPopup","ScrollableTeaser","initScroll","onVideoTeaserClick","$timelineItem","initTimelineTeaser","showHideScroll","$leftControl","$rightControl","$scrollWrapper","$headWrapper","$contentWrapper","$contentScrollWrapper","$listWrapper","$teaserItem","$videoWrapper","$teaserItemGated","$mainContainer","onLeftControlClick","onRightControlClick","headWidth","videoCurrentLeft","currentScrollLeft","maxLength","mobileItemWidth","teaserLength","teaserScrollLeft","contentCurrentScrollLeft","teaserScrollRight","maxScrollArea","maxContentScrollArea","viewportSize","containerWidth","scrollWidth","SearchFlyout","_open","_deleteFromInput","Disclaimer","Survey","initSurvey","_showSurvey","_hideSurvey","showsurvey","waitingTime","cookieSurveyRead","setSurveyRead","CustomerLoungePopup","$checkDoNotAskAgain","setCookie","initializePopup","_showLoungePopup","_hideLoungePopup","getCookie","HTMLContainer","ICalDownload","downLoadCalendar","calendarString","InfoList","$tabButton","$tabPanel","initTab","onSwichTab","InvestorOverview","getDaxData","riccode","quote","update","isincrease","Lightbox","carouselLength","closeLightbox","carouselPrevClick","carouselNextClick","lightboxAnchorClick","lightboxCarousel","lightboxID","$lightbox","$currentCarousel","LanguagePopup","onAcceptClick","cookieLanguagePopupRead","setLanguagePopup","CustomerLoungeBrandIntro","openOtherUrl","$brandSelect","curBrand","brandUrl","CustomerLoungeBrandProductTable","_handleApplicationTeaserLoadMore","$teaserItems_1","minOfShowTeasers","currentShowTeasers_1","allOfShowTeasers","HeroArticleStage","$largeItem","$smallItem","$mainWrapper","$itemActive","activeIndex","verticalWrapperHeight","setActiveItem","setWrapperHeight","verticalActiveHeight","mainWrapperHeight","goToItemX","mouseenter","mouseleave","ContactTeaserCard","$weChatLabel","$weChatQRBox","hideQRCode","openQRCode","ContactTeaserPopup","initContactTeaserPopup","_showContactTeaserPopup","_hideContactTeaserPopup","ContactTeaserLarge","initMobileHide","ExpansionPanel","initExpansionPanel","togglePanel","panelAnchorClick","slideUp","slideDown","panelID","MarketoLightbox","_marketoFormInitialized","_marketoFormInitializationTimer","mktoflowId","pageHref","themeModeAttribute","getMktoLightboxData","originalHref","showLightbox","showIndicator","formProductName","productNameValue","endpoint","originLink","$dialog","doSubmitAction","clickEventTriggered","$lightboxContainer","IsHiddenFormSubmitrequired","HiddenFormSubmitId","createElement","download","appendChild","hiddenSubmitForm","triggerClickEvent","hideIndicator","displayFormBox","showMessage_1","$formNode_1","hiddenForm","form_hidden_submit_text","removeCloseEvents","displayConfirmationBox","hideFormBox","showConfirmationMsg","HTMLElement","onkeyup","which","HTMLInputElement","HTMLTextAreaElement","R","_","O","N","U","F","D","W","B","z","FPS","Ghost","v","S","P","u","f","L","E","getTick","w","eat","isVunerable","isDangerous","makeEatable","reset","move","g","isFloorSpace","isWallSpace","C","new","old","draw","blockSize","fillStyle","beginPath","moveTo","quadraticCurveTo","closePath","arc","User","H","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","direction","I","PI","drawDead","loseLife","getLives","score","addScore","theScore","keyDown","A","block","BISCUIT","PILL","setBlock","EMPTY","completedLevel","eatenPill","newLevel","resetPosition","MAP","BLOCK","fillRect","strokeStyle","lineWidth","lineCap","WALLS","line","lineTo","curve","stroke","drawBlock","drawPills","WALL","font","fillText","measureText","sqrt","pow","M","len","getContext","BACKSPACE","TAB","NUM_PAD_CLEAR","ENTER","SHIFT","CTRL","ALT","PAUSE","CAPS_LOCK","ESCAPE","SPACEBAR","PAGE_UP","PAGE_DOWN","END","HOME","PRINT_SCREEN","INSERT","DELETE","SEMICOLON","WINDOWS_LEFT","WINDOWS_RIGHT","SELECT","NUM_PAD_ASTERISK","NUM_PAD_PLUS_SIGN","NUM_PAD_HYPHEN-MINUS","NUM_PAD_FULL_STOP","NUM_PAD_SOLIDUS","NUM_LOCK","SCROLL_LOCK","EQUALS_SIGN","COMMA","HYPHEN-MINUS","FULL_STOP","SOLIDUS","GRAVE_ACCENT","LEFT_SQUARE_BRACKET","REVERSE_SOLIDUS","RIGHT_SQUARE_BRACKET","APOSTROPHE","String","fromCharCode","Error404","referredby","typeofform","jobProfileLocations","stepTwoFormLoaded","stepFourOneFormLoaded","stepFourTwoFormLoaded","stepFiveFormLoaded","Form","productValidation","_initTerrificModules","initMutationObserver","initAjaxListeners","scFormName","fetchCdpIdData","emailValidationChangeEventForWorkdayForm","workdayJobsFormData","$inputSelectCategory","categorySelectedOptionChanged","initUserVali","submitButtonClickForGA","sendFromStartDataToGtm","$inputSelect1","inputSelecteValidation","legalFormSectionYesOption","sectionStepTwo","sectionStepThree","sectionStepFour","sectionStepFive","radioButtons","radioButtonsStepTwo","radioButtonsStepThree","radioButtonsStepFourOne","radioButtonsStepFourTwo","buttonNext","buttonNextSecond","buttonNextThree","buttonNextFour","radio","bindRadioButtonClick","bindRadioButtonStepTwoClick","bindRadioButtonStepThreeClick","bindRadioButtonStepFourOneClick","bindRadioButtonStepFourTwoClick","bindStepOneButtonClick","bindStepTwoButtonClick","bindStepThreeOneButtonClick","bindStepThreeTwoButtonClick","bindStepFourButtonClick","section","legalFormSectionRegStromOption","legalFormSectionRegGasOption","spanFileUploadValidationMessage","selectBoxStepTwo","inputValue","from","bindFileUploadClick","fileInput","files","file_1","reader_1","FileReader","onloadend","fileData","base64","fileDataJson","hiddenField","readAsDataURL","alert","legalFormSectionNextYesOptionYes","legalFormSectionNo","bindRadioButtonStepFiveClick","bindSelectBoxStepTwoChange","hideStepTwoDateSection","hideStepTwoGasSection","hideStepTwoStromSection","hideStepTwoFileUploadSection","hideStepTwoMeterNoSection","clearStepTwoDateSection","triggerFileUploadValidation","inputFileUploadControl","bindStepTwoPreviousButtonClick","bindStepThreePreviousButtonClick","hiddenSectionsMeterNo","hiddenSectionsDate","hiddenSectionsFileUpload","bindStepFourPreviousButtonClick","bindStepFivePreviousButtonClick","$fieldValidationError","$fieldValidationErrorLength","$validationErrorCount","contactingCategoryField","hiddenMktoForm","mktoFormId","myHiddenMktoForm","getForm","myHiddenFormFields","myMktoHiddenMetaDataString","myMktoHiddenMetaData","materialTagValue","industryTagValue","email","company","addHiddenFields","formMessage","Email","Country","Company","mktoindustry","getValueFromObject","inferredMaterialInterest","privacyPolicyAcceptance","mktooptinchkbxacceptance","terrificName","componentAttr","helperClass","setAttr","$formControls","$select2Container","$select2Single","$categoryInputContainer","$vali","formName","scSendDataToGTMOnPageLoad","$emailAddressTextbox","emailAddress","test","serviceUrl_1","onScAjaxStart","onScAjaxComplete","emailAddressExistsErrorMessage","tagId","tagTitle","workdayapiEndpoint","WorkdayJobsTasks","tasksData","Report_Entry","jobEntries","$jobProfileDropdown_1","$jobProfileDropdownAlt_1","$locationDropdown_1","Option","entry","jobProfile","Job_Profile","Primary_Location","Job_Requisition_ID","Set","selectedProfile","locations","$preferredLocationDropdown","$preferredLocationDropdown_1","selectedLocation","getCustomerIdFromUrl","customerId","cdpApiEndpoint","cdpPreferenceData","cdpData","$cdpFirstName","$cdpLastName","$cdpCompany","$cdpCountry","$unsubscribeText","cov_primary_address","cov_country","$hiddenEmailField","primaryEmail","email_1","cov_interests_ind","industryData_1","checkbox","checkboxValue","cov_interests_mat","materialData_1","cov_interests_st","strategicData_1","selectedValues_1","formHash","imul","charCodeAt","applicationFormHiddenField","selectBox","legalFormSectionYesOption_1","legalFormSectionYesOption_2","legalFormSectionNextYesOptionYes_1","legalFormSectionNo_1","legalFormSectionNextYesOptionYes_2","legalFormSectionNo_2","preventStickyHeaderAppearing","preventStickyHeaderScrollBehaviour","noHasAnchor","noHasPageShare","Header","_initStickyHeader","windowHeight","headerMargin","gobackHistory","_initNavInPage","hideEmptyMenu","queryString","pageCampaignId","osc_id","referrer","go","_duplicateMetanavigation","destination","currentScrollTop","navBarHeight","delta","_calcTransitionTime","transitionString","numberPart","match","getElementsByTagName","HeaderCampaign","$headerTop","$ctaArea","pageStartToLogoEndHeight","lineHeightLargeHeadline","logoHeightPlusMarginTop","logoTouchesHeadlinePosition","CampaignCollectorPageHeader","ProductCompare","topThreshold","$table","$headline","headlineSingleText","headlineMultiText","updateHeadline","onRemoveClick","back","$products","handleScrollTop","isFixed","curScrollLeft","handleScrollLeft","$topRow","ProductCompareV2","onRemoveAllClick","updateColumnLength","highlightDifferences","showDifferences","onCategoryClick","onTooltipBtnClick","onTooltipCloserClick","hiddenControlArrows","setStaticTable","setTitleTableHeight","setTableTopOffset","setMiniTitleHeight","setTableTopWidth","$categoryTh","currentQuery","removeFromUrl","tableRemoveScoll","updateFavouritesBtnStatus","removeAllFromUrl","categoryID","$tooltipPopup","columns","$tableDataRow","$titleTable","$categoryTitle","$curCategoryTitle","$checkboxElement","that","$tabletop","$eIndex","$tableContent","curMarginLeft","maxScrollLeft","tableScrollRight","nextScrollLeft","tableScrollLeft","prdsetParamArr","prdSegArr","queryArr_1","$favouritesEle","responseText","TeaserContentArea","$teaserItems","CustomerLoungeNavigation","$currentLink","initDuplicate","initCollapseOverview","collapseContent","collapseOverview","CustomerLoungeProjectTeaser","initAccordion","sorting","showLoadingBar","loungeName","datasource","sortingProperties","sortBy","sortOrder","hideLoadingBar","slideToggle","favourites_share_1","actions","FavouritesOverview","$currentTitle","$favouritesFilter","$favouritesFilterClose","favorShare","FavouritesShare","showFavouritesFilter","hideFavouritesFilter","$dynamicContainer","$listContainer","$entryContainer","$action","listId","entryId","showLoadingIndicator","rebindEmailViewEvents","bindEmailSubmitEvent","bindClipboardEvents","hideLoadingIndicator","$textareaBox","prefillTxt","query_1","generateEmailTemplate","emailTemplateHtml","$template","date","getSeconds","getMilliseconds","$emailContainer","bindEmailContainerEvents","$emailMessageContainer","bindEmailMessageEvents","textareaTxt","textbox","getEmailAddresses","$btnEle_1","publicId","getReloadUrl","isUnavailable","$clipboardTitle","snapshot","Snapshot","validateEmailBox","$addEmailBtn","$emailGroupEles","addressArr","emailboxVal","ValidateEmailContainer","ValidateEmailAddress","$emailInputBox","$emailBox","sharedListId","resultArr","OverviewShareFavourites","loginViewEndpoint","expired","changeSelectAll","getSharedEntryIds","$allSubCheckboxes","areAllSubChecked","IArticleFinderFilterSortMode","favourite_button_1","counterForTabs","TeaserFilterArea","hasLoadedMore","apiEndpointFacetAndList","apiEndpointList","onMobileFiltersOpen","onMobileFiltersClose","clearFilters","None","sortMode","Value","backLinkText","twoLevelMultiselect","isTwoLevelFilter","originalId","initialRequest","initialcall","parts","keyValue","fromUrl","matches","heading","updateFacets","allowchangingprefiller","updateUri","updateFavoriteStatus","onFavoriteButtonClick","AssignTeaserVideoComponentEvents","AssignVideoComponentEvents","fail","border-top","margin-top","facet","theFilter","this_1","UpdateMultiLevelFacet","UpdateFacetLevelOne","updateFilterTags","updateFilterElements","hello","tags","this_2","disabled","tagsContainer_1","tag","onFilterTagClick","updateFilterElementsWithTwoLevels","updateFilterElementWithOneLevel","newItemsAdded","unhandledItems","match_1","humanReadableValue","hideDisableFilters","sorted","vA","vB","component","currentYear","getFullYear","levelOneContainer","newChildItemsAdded","levelTwoContainer","unhandledChildItems","childValue","match2","match2_1","filterTwoLevelMultiselect","isPreselected","urlParts","replaceState","childrenValue","videoComponentList","videoTeaserList","HomeScrollableTeaser","$tabItem","$tabItemLink","$contentItem","tabItemIndex","currentContentItemWidth","SafetyDataSheetSearch","topResultMsg","bottomResultMsg","urlLanAndCountry","materialNumberTHeader","productNameTHeader","dateTHeader","languageTHeader","linkTHeader","tableBodyEle","tableRowEle","resultContentEle","noResultContentEle","topResultMsgEle","bottomResultMsgEle","materialNumberInputEle","productNameInputEle","languageSelectEle","countrySelectEle","errorContainerEle","applyBtnEle","clearBtnEle","loadMoreBtnEle","contentLoadingEle","loadMoreLoadingEle","loadModalOverlayEle","handleKeyDown","applyFilter","getProductorMaterialData","preventBlurone","clear","getLanguagebyCountry","checkInputHasValue","sParameterName","sURLVariables","sParameterName1","langScript","getlanguageJsonData","languageInnerHtml","getUrlParameter","sParam","clearResults","showContentLoading","getData","cleardropdown","productNumber","lockButtons","jsonresponse","sdsSheet","resultsCountry_1","sdsCountry","elcountry","countryList","countryidx","countryitem","itemIndex","unlockButtons","countrySearch","hideContentLoading","resultResponse","selectedCountry_1","sdsLanguageBasedOnCountry_1","langidx","sdsElement","ellanguage","languageList","langItem","langSearch","lngDefaultText","lngRenderEle","coDefaultText","coRenderEle","setStaticPaging","updateResultMessage","total","updateResultContentState","renderResultDataOnPage","materialNumber","lng","languageAndCountry","generateHtmlData","LngAndArea","topMessage","bottomMessage","anyResult","getElementsByClassName","showLoadMoreLoading","hideLoadMoreLoading","TeaserTabs","$tabContent","updatestatus","$url","keyValue_1","splitUrl","pop"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,WAAAD,IAEAD,EAAA,WAAAC,IARA,CASCK,OAAA,WACD,mBCTA,SAAAC,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAA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C,GAAuB,GAAnBqpF,EAASnvF,OAAb,CACA,IAAM0C,EAAMysF,EAAS,GACPA,EAAS,GACvB,GAAY,QAARzsF,EAAe,CAChB,IAAI0sF,EAAWp/E,EAAIlK,MAAM,KACzBspF,EAASC,MACTr/E,EAAMo/E,EAAW,IAAM3J,EAAM,GAAGv7E,cAe9C+B,QAAQ48E,aAAa,KAAMhkF,SAAS2f,MAAOxU,IApG3C++E,EAAU76E,GADtBrG,EAAAsG,aAAa,eACD46E,GAAb,CARA5tF,EAAA,GAQgCiT,cAAnBlV,EAAA6vF","file":"js/covestro.pattern-library-footer.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CovestroUi\"] = factory();\n\telse\n\t\troot[\"CovestroUi\"] = factory();\n})(window, function() {\nreturn "," \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonpCovestroUi\"] = window[\"webpackJsonpCovestroUi\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([155,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export enum PublicEvents {\r\n\t// Generic UI events\r\n\t'uxChange',\r\n\t'uxClick',\r\n\t'uxInput',\r\n\t'uxSubmit',\r\n\t'uxShow',\r\n\t'uxHide',\r\n\t'uxResize',\r\n\t'uxSyncLabel',\r\n\r\n\t// Specific component events\r\n\t'overlayOpened',\r\n\t'overlayClosed',\r\n}\r\n\r\n// polyfill for custom events (IE)\r\n(function() {\r\n\tif (typeof (window as any)['CustomEvent'] === 'function') {\r\n\t\treturn false;\r\n\t}\r\n\tfunction CustomEvent(event: string, params: any) {\r\n\t\tparams = params || { bubbles: false, cancelable: false, detail: undefined };\r\n\t\tvar evt = document.createEvent('CustomEvent');\r\n\t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\r\n\t\treturn evt;\r\n\t}\r\n\tCustomEvent.prototype = (window as any)['Event'].prototype;\r\n\t(window as any)['CustomEvent'] = CustomEvent;\r\n})();\r\n\r\n/**\r\n * Triggers a public event for external single page applications\r\n * @param {PublicEvents} type Event type\r\n * @param {TerrificSpec} terrificModule Terrific module\r\n * @param {Element} target Target element\r\n * @param {Object} eventData Event Data Object\r\n * @return {boolean} true if event was not rejected\r\n */\r\nexport function triggerPublicEvent(\r\n\ttype: PublicEvents,\r\n\tterrificModule: any,\r\n\ttarget: Element,\r\n\teventData: Object = {}\r\n): boolean {\r\n\tconst eventName = PublicEvents[type];\r\n\tconst terrificModuleName = terrificModule ? (terrificModule._ctx.dataset.tName as string) : '';\r\n\tconst data: object = {\r\n\t\tmodule: terrificModule,\r\n\t\tname: terrificModuleName,\r\n\t\teventData: eventData,\r\n\t};\r\n\tconst event = new CustomEvent(`${eventName}`, { detail: data });\r\n\ttarget.dispatchEvent(event);\r\n\r\n\treturn true;\r\n}\r\n\r\n/**\r\n * Bind to a public event and returns an unbind helper\r\n *\r\n * @param {PublicEvents} type Event type\r\n * @param {Element|JQuery} element Target element\r\n * @param {Object} callback\r\n * @return {Object} Off-Function to Event\r\n */\r\nexport function onPublicEvent(\r\n\ttype: PublicEvents,\r\n\telement: Element,\r\n\tcallback: (event: Event, data: object) => void\r\n): () => void {\r\n\tconst eventName = PublicEvents[type];\r\n\tconst eventHandler: any = (event: Event) => callback(event as any, (event as any)['detail'] as object);\r\n\telement.addEventListener(`${eventName}`, eventHandler);\r\n\treturn () => element.removeEventListener(`${eventName}`, eventHandler);\r\n}\r\n\r\nexport default {\r\n\tPublicEvents,\r\n\tonPublicEvent,\r\n\ttriggerPublicEvent,\r\n};\r\n","/**\r\n * This script handles generic tracking\r\n */\r\n\r\nimport * as Cookies from 'js-cookie';\r\n\r\n/**\r\n * Function adds tracking to dataLayer\r\n *\r\n * @param {object} data tracking data\r\n * @returns {void}\r\n */\r\nexport function gtmTrack(data: object) {\r\n\tif ((window as any).dataLayer) {\r\n\t\t(window as any).dataLayer.push(data);\r\n\t}\r\n}\r\n\r\n/**\r\n * Persist Sitecore Analytics consent to technical cookie.\r\n * @param active true if consent is given; otherwise, false.\r\n */\r\nfunction setSitecoreAnalyticsCookiePref(active: boolean) {\r\n\tCookies.set('track_sc_allowed', active ? 'true' : 'false', { expires: 3650 });\r\n}\r\n\r\n/**\r\n * Check consent status on load.\r\n * - Check for Sitecore Analytics consent.\r\n * - Check for Marketo consent.\r\n */\r\n(window as any).addEventListener('UC_UI_INITIALIZED', function (e: CustomEvent) {\r\n\tconst services = (window as any).UC_UI.getServicesBaseInfo() as any[];\r\n\r\n\t// Sitecore\r\n\tvar sc = services.find(s => s.name === \"Sitecore\");\r\n\tsetSitecoreAnalyticsCookiePref(sc && sc.consent && sc.consent.status);\r\n\r\n\t// Marketo\r\n\tvar mkto = services.find(s => s.name === \"Marketo\")\r\n\tif (mkto && mkto.consent && mkto.consent.status) {\r\n\t\tcheckMarketoEmailLink();\r\n\t} else {\r\n\t\tsetKnownMarketoLead(false);\r\n\t}\r\n});\r\n\r\n/**\r\n * Handle Usercentrics consent changes. Check for Sitecore Analytics consent.\r\n */\r\n(window as any).addEventListener(\"ucEvent\", function (e: CustomEvent) {\r\n\tif (e.detail && e.detail.event == \"consent_status\") {\r\n\t\tconst sitecorePurposeName = \"Sitecore\";\r\n\t\tif (e.detail[sitecorePurposeName] === true) {\r\n\t\t\tsetSitecoreAnalyticsCookiePref(true);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetSitecoreAnalyticsCookiePref(false);\r\n\t\t}\r\n\r\n\t\tconst marketoPurposeName = \"Marketo\";\r\n\t\tif (e.detail[marketoPurposeName] === true) {\r\n\t\t\tcheckMarketoEmailLink();\r\n\t\t} else {\r\n\t\t\tsetKnownMarketoLead(false);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport function isKnownMarketoLead(): boolean {\r\n\tlet cookieValue = Cookies.get(\"mkto_submitted\");\r\n\tif (cookieValue != undefined) {\r\n\t\tif (cookieValue.length > 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nexport function setKnownMarketoLead(state: boolean): void {\r\n\tif (state) {\r\n\t\tCookies.set(\"mkto_submitted\", \"1\", { expires: 365 });\r\n\t} else {\r\n\t\tCookies.remove(\"mkto_submitted\");\r\n\t}\r\n}\r\n\r\nfunction checkMarketoEmailLink(): void {\r\n\tconst queryStr = window.location.search.substring(1);\r\n\tconst querySet = queryStr.split(\"&\");\r\n\tfor (let i = 0; i < querySet.length; i++) {\r\n\t\tif (querySet[i].indexOf(\"mkt_tok\") === 0) {\r\n\t\t\tsetKnownMarketoLead(true);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n","/**\r\n * This script returns the current active breakpoint\r\n */\r\nimport * as $ from 'jquery';\r\n// @ts-ignore\r\nimport * as throttle from 'lodash/throttle';\r\nimport '../css/breakpoint-helper.scss';\r\n\r\nexport type Breakpoint = 'small' | 'medium' | 'large' | 'extra-large';\r\n\r\nconst classes = {\r\n\thelper: 'h-breakpoint__helper',\r\n};\r\n\r\nlet cachedBreakpoint: Breakpoint;\r\n$(window).on('resize orientationchange', () => {\r\n\tcachedBreakpoint = undefined;\r\n});\r\n\r\nlet lastViewport: Breakpoint;\r\n$(window).on(\r\n\t'resize orientationchange',\r\n\tthrottle(\r\n\t\t() => {\r\n\t\t\tconst newViewport = getCurrentBreakpoint();\r\n\t\t\tif (lastViewport !== newViewport) {\r\n\t\t\t\tlastViewport = newViewport;\r\n\t\t\t\t$(window).trigger('uxViewPortChange', [newViewport]);\r\n\t\t\t}\r\n\t\t},\r\n\t\t25,\r\n\t\t{ leading: true, trailing: true }\r\n\t)\r\n);\r\n\r\nconst $meassureHelper = $(`
`);\r\n\r\nfunction meassureBreakpoint() {\r\n\tif (!document.body) {\r\n\t\tthrow new Error('Document is not ready');\r\n\t}\r\n\t$meassureHelper.appendTo(document.body);\r\n\r\n\treturn window\r\n\t\t.getComputedStyle($meassureHelper[0], ':before')\r\n\t\t.getPropertyValue('content')\r\n\t\t.replace(/['\"]/, '')\r\n\t\t.replace(/['\"]/, '') as Breakpoint;\r\n}\r\n\r\n/**\r\n * Register a handler to listen on breakpoint change\r\n * Passes the current viewport\r\n *\r\n * @param handler\r\n * @returns {()=>JQuery}\r\n */\r\nexport function onBreakpointChange(handler: (viewport?: Breakpoint) => void): () => any {\r\n\tconst callback = (event: any, viewport: any) => handler(viewport);\r\n\t$(window).on('uxViewPortChange', callback);\r\n\treturn () => $(window).off('uxViewPortChange', callback);\r\n}\r\n\r\n/**\r\n * Returns the current breakpoint using computed style to guarantee matching\r\n * the css breakpoints\r\n */\r\nexport default function getCurrentBreakpoint(): Breakpoint {\r\n\tif (!cachedBreakpoint) {\r\n\t\tcachedBreakpoint = meassureBreakpoint();\r\n\t}\r\n\treturn cachedBreakpoint;\r\n}\r\n\r\nexport function isSmall(viewport: string): boolean {\r\n\treturn viewport === 'small';\r\n}\r\n\r\nexport function isMedium(viewport: string): boolean {\r\n\treturn viewport === 'medium';\r\n}\r\n\r\nexport function isLarge(viewport: string): boolean {\r\n\treturn viewport === 'large';\r\n}\r\n\r\nexport function isExtraLarge(viewport: string): boolean {\r\n\treturn viewport === 'extra-large';\r\n}\r\n\r\nexport function isSmallOrMedium(viewport: string): boolean {\r\n\treturn isSmall(viewport) || isMedium(viewport);\r\n}\r\n","/**\r\n * Scroll to given element with animation.\r\n * Optional: Prevent sticky header from appearing.\r\n */\r\nexport function scrollToElement(\r\n\t$elm: any,\r\n\tpreventFixedHeader: boolean,\r\n\tadditionalOffsetTop: number = 0,\r\n\ttriggerScrollReached: boolean = false,\r\n\ttopOnly: boolean = false\r\n) {\r\n\tconst offset = $elm.offset();\r\n\r\n\tif (preventFixedHeader) {\r\n\t\t$(window).trigger('enablePreventStickyHeaderAppearing');\r\n\t}\r\n\tconst scrollProperties: { scrollTop: number; scrollLeft?: number } = {\r\n\t\tscrollTop: offset.top - additionalOffsetTop,\r\n\t};\r\n\tif (!topOnly) {\r\n\t\tscrollProperties.scrollLeft = offset.left;\r\n\t}\r\n\t$('html, body').animate(scrollProperties, 500, () => {\r\n\t\tsetTimeout(() => {\r\n\t\t\t$(window).trigger('disablePreventStickyHeaderAppearing');\r\n\t\t\tif (triggerScrollReached) {\r\n\t\t\t\t$elm.trigger('scrollReached');\r\n\t\t\t}\r\n\t\t}, 100);\r\n\t});\r\n}\r\n\r\nexport default { scrollToElement };\r\n","export enum FormControlLabelStateClass {\r\n\tDefault = 'a-label js-form__label' as any,\r\n\tRequired = 'state-a-label--is-required' as any,\r\n\tFloated = 'state-a-label--is-floated' as any,\r\n\tDoNotRemoveFloated = 'state-a-label--do-not-remove' as any,\r\n}\r\n\r\nexport const FormControlSiteCoreStateClass: string = 'input-validation-error';\r\n\r\n// use js-form_label selector, inform BE\r\nexport function getLabel(control: HTMLElement) {\r\n\tconst $this = $(control);\r\n\tconst placeholderTxt = $this.attr('placeholder');\r\n\tlet $label = $this.prev('label');\r\n\r\n\t// As discussed with design, there should be no placeholder when it is clicked end empty\r\n\t// because a placeholder can't be removed in all browsers via css, it has to be done with js.\r\n\t// Therefore => if there is only a placeholder, transform it to a label.\r\n\tif ($label.length === 0 && placeholderTxt) {\r\n\t\t$this.attr('placeholder', '');\r\n\t\t$label = $(``);\r\n\t\t$this.before($label);\r\n\t} else if ($label.length > 0 && placeholderTxt) {\r\n\t\t$this.attr('placeholder', '');\r\n\t}\r\n\r\n\tif ($this.attr('data-val-required')) {\r\n\t\t$label.addClass(FormControlLabelStateClass.Required.toString());\r\n\t}\r\n\r\n\tif (!$label.hasClass(FormControlLabelStateClass.Default.toString())) {\r\n\t\t$label.addClass(FormControlLabelStateClass.Default.toString());\r\n\t}\r\n\r\n\treturn $label;\r\n}\r\n\r\nexport function floatControlLabel(control: HTMLElement, isFocused: boolean = false) {\r\n\tconst $formControl = $(control);\r\n\r\n\tif ($formControl.length) {\r\n\t\t$formControl.each(function() {\r\n\t\t\tconst $this = $(this);\r\n\t\t\tconst $label = getLabel(control);\r\n\r\n\t\t\tif ($label && $this) {\r\n\t\t\t\t// enables floating label also for disabled selected options\r\n\t\t\t\tconst value =\r\n\t\t\t\t\tthis instanceof HTMLSelectElement && !$this.val()\r\n\t\t\t\t\t\t? $this.find('option[selected]').attr('value')\r\n\t\t\t\t\t\t: $this.val();\r\n\r\n\t\t\t\tif ((value && value.toString().length > 0) || isFocused) {\r\n\t\t\t\t\t$label.addClass(FormControlLabelStateClass.Floated.toString());\r\n\t\t\t\t\tlet $innerWidth;\r\n\t\t\t\t\tif ($this.hasClass('select2-hidden-accessible')) {\r\n\t\t\t\t\t\t$innerWidth = $this.next('.select2').innerWidth();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$innerWidth = $this.innerWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($innerWidth) {\r\n\t\t\t\t\t\t$label.css('max-width', `${Math.floor($innerWidth) - 30}px`);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($label.hasClass(FormControlLabelStateClass.DoNotRemoveFloated.toString())) {\r\n\t\t\t\t\t\t$label.css('max-width', 'none');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$label.removeClass(FormControlLabelStateClass.Floated.toString());\r\n\t\t\t\t\t\t$label.css('max-width', 'none');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isFocused) {\r\n\t\t\t\t\tconst $innerWidth = $this.innerWidth();\r\n\t\t\t\t\tif ($innerWidth) {\r\n\t\t\t\t\t\t$label.css('max-width', $innerWidth - 30 + 'px');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\t$this.on('blur', (ev: Event) => {\r\n\t\t\t\t\tisFocused = false;\r\n\t\t\t\t\tif (!$this.val()) {\r\n\t\t\t\t\t\t$label.removeClass(FormControlLabelStateClass.Floated.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nexport default {\r\n\tfloatControlLabel,\r\n\tFormControlLabelStateClass,\r\n\tFormControlSiteCoreStateClass,\r\n};\r\n","import { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\n/**\r\n * This script handles generic hashscrolling\r\n */\r\n\r\nlet initialized: boolean = false;\r\n/**\r\n * Initializes Hashscrolling\r\n *\r\n */\r\nexport function init(): void {\r\n\tif (!initialized) {\r\n\t\tinitialized = true;\r\n\t\tif (window.location.hash.length > 1) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tscrollToIdElement(window.location.hash);\r\n\t\t\t}, 1000);\r\n\t\t}\r\n\t\t$(window).on('hashchange.hashscrolling', () => {\r\n\t\t\tscrollToIdElement(window.location.hash);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nexport function addScrollClickTrigger($el: JQuery) {\r\n\t$el.on('click.hashscrolling', (ev: JQuery.Event) => {\r\n\t\tev.preventDefault();\r\n\t\tconst hash = (ev.currentTarget as any).hash;\r\n\t\thistoryPush(hash);\r\n\t\tscrollToIdElement(hash);\r\n\t});\r\n}\r\n\r\nfunction scrollToIdElement(hash: string) {\r\n\tconst $el = $(document.getElementById(hash.substring(1)));\r\n\tif ($el.length === 1) {\r\n\t\tif ($('.js-m-navigation-in-page__wrapper').length > 0) {\r\n\t\t\tscrollToElement($el, true, $('.js-m-navigation-in-page__wrapper').height() + 20 || 120, true);\r\n\t\t} else {\r\n\t\t\tscrollToElement($el, true, $('.js-o-header-wrapper').height() || 120, true);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction historyPush(hash: string): any {\r\n\tif (history.pushState) {\r\n\t\tconst newurl =\r\n\t\t\twindow.location.protocol +\r\n\t\t\t'//' +\r\n\t\t\twindow.location.host +\r\n\t\t\twindow.location.pathname +\r\n\t\t\twindow.location.search +\r\n\t\t\thash;\r\n\t\twindow.history.pushState({ path: newurl }, '', newurl);\r\n\t}\r\n}\r\n","import * as Events from '@project/shared/utils/events/js/events';\r\n\r\nconst overlayDataName: string = 'covestro-overlay';\r\nexport function IsOverlayDisplayed(): boolean {\r\n const value = $(window.document.documentElement).data(overlayDataName);\r\n if (value == undefined || value == null || typeof value !== 'boolean') return false;\r\n return value;\r\n}\r\n\r\nexport function ShowOverlay(openFunc: () => void, delayInMs: number = 0) {\r\n if (!IsOverlayDisplayed()) {\r\n ShowOverlayWithRetry(openFunc, delayInMs);\r\n } else {\r\n console.debug(`Detected an open overlay; waiting.`);\r\n\r\n let unsubscribeCloseHandler = Events.onPublicEvent(Events.PublicEvents.overlayClosed, window.document.documentElement, (e, d) => {\r\n unsubscribeCloseHandler();\r\n\r\n console.debug(`Detected closing of another overlay; registring.`);\r\n\r\n ShowOverlayWithRetry(openFunc, delayInMs);\r\n });\r\n }\r\n}\r\n\r\nfunction ShowOverlayWithRetry(openFunc: () => void, delayInMs: number = 0) {\r\n let unsubscribeOpenHandler: () => void,\r\n unsubscribeCloseHandler: () => void;\r\n\r\n console.debug(`Registering overlay with ${delayInMs}ms delay.`);\r\n\r\n const timeoutHandle = setTimeout(() => {\r\n if (unsubscribeOpenHandler != null) unsubscribeOpenHandler();\r\n if (unsubscribeCloseHandler != null) unsubscribeCloseHandler();\r\n\r\n DoShowOverlay(openFunc);\r\n }, delayInMs);\r\n\r\n // Abort the timeout in case another overlay opens\r\n unsubscribeOpenHandler = Events.onPublicEvent(Events.PublicEvents.overlayOpened, window.document.documentElement, (e, d) => {\r\n unsubscribeOpenHandler();\r\n unsubscribeOpenHandler = null;\r\n\r\n clearTimeout(timeoutHandle);\r\n\r\n console.debug(`Detected opening of another overlay; aborted.`);\r\n\r\n // And re-register when that overlay gets closed\r\n unsubscribeCloseHandler = Events.onPublicEvent(Events.PublicEvents.overlayClosed, window.document.documentElement, (e, d) => {\r\n unsubscribeCloseHandler();\r\n unsubscribeCloseHandler = null;\r\n\r\n console.debug(`Detected closing of another overlay; re-registring.`);\r\n\r\n ShowOverlayWithRetry(openFunc, delayInMs);\r\n });\r\n });\r\n}\r\n\r\nfunction DoShowOverlay(openFunc: () => void) {\r\n console.debug(`Opening overlay.`);\r\n\r\n Events.triggerPublicEvent(Events.PublicEvents.overlayOpened, null, window.document.documentElement);\r\n $(window.document.documentElement).data(overlayDataName, true);\r\n\r\n openFunc();\r\n\r\n console.debug(`Opening overlay complete.`)\r\n}\r\n\r\nexport function CloseOverlay(closeFunc: () => void) {\r\n console.debug(`Closing overlay.`);\r\n\r\n closeFunc();\r\n\r\n $(window.document.documentElement).data(overlayDataName, false);\r\n Events.triggerPublicEvent(Events.PublicEvents.overlayClosed, null, window.document.documentElement)\r\n\r\n console.debug(`Closing overlay complete.`);\r\n}","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { floatControlLabel } from '@project/shared/utils/form-control/js/form-control';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tstateValMsgVisible: \"state-field-validation-error--visible\",\r\n\tstateCountMax: \"state-textarea-count-max\",\r\n\tstatePopupVisible: \"state-favourite-popup--visible\",\r\n\tstatePopupClose: \"state-favourite-popup--close\",\r\n\r\n\tnoScrollingBar: \"no-scrolling--without-scrollbar\",\r\n\r\n\tpopupBox: \"js-m-modal-actions\",\r\n\ttextareaContainer: \"js-m-modal-actions-textarea-container\",\r\n\ttextareaBox: \"js-m-modal-actions__textarea\",\r\n\ttextareaValLength: \"js-m-modal-actions__textarea-count-length\",\r\n\ttextareaValLengthMax: \"js-m-modal-actions__textarea-count-max\",\r\n\r\n\tconfirmationBtn: \"js-m-modal-actions-confirmation\",\r\n\r\n\ttextcheckboxContainer: \"js-m-modal-actions-textcheckbox-container\",\r\n\ttextboxContainer: \"js-m-modal-actions-textbox-container\",\r\n\ttextboxGroup: \"m-modal-actions__new-list-input\",\r\n\ttextbox: \"js-m-modal-actions__newlist\",\r\n\r\n\tchecklistContainer: \"js-m-modal-actions-checklist-container\",\r\n\tallChecklistContainer: \"js-m-modal-actions-all-checklist-container\",\r\n\r\n\tinputValidationError: \"input-validation-error\",\r\n\tfieldValidationError: \"js-checklist-validation-error\",\r\n}\r\n\r\nconst submitApis = {\r\n\r\n\taddSharedEntry: \"addsharedentry\"\r\n}\r\n\r\n@createModule('FavouritesAction')\r\n\r\nexport class FavouritesAction extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\trebindCommonViewEvents($popup: JQuery) {\r\n\r\n\t\tconst _this = this;\r\n\r\n\t\t// bind textarea events\r\n\t\tconst $textareaContainer = $popup.find(`.${classes.textareaContainer}`);\r\n\t\tif ($textareaContainer.length > 0) {\r\n\t\t\t_this.bindTextareaContainerEvents($textareaContainer);\r\n\t\t}\r\n\r\n\t\t// bind textbox events\r\n\t\tconst $textBoxContainer = $popup.find(`.${classes.textboxContainer}`);\r\n\t\tif ($textBoxContainer.length > 0) {\r\n\t\t\t_this.bindTextboxContainerEvents($textBoxContainer);\r\n\t\t}\r\n\r\n\t\t// bind all checkbox validation\r\n\t\tconst $allChecklists = $popup.find(`.${classes.allChecklistContainer}`).find(\"input[type=checkbox]\");\r\n\t\tif ($allChecklists.length > 0) {\r\n\t\t\tthis.bindAllCheckboxesEvents($allChecklists);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tbindSubmitEvent($popup: JQuery, contentType: string) {\r\n\t\t// bind submit button\r\n\t\t$popup.find(`.${classes.confirmationBtn}`).on('click', (ev: any) => {\r\n\r\n\t\t\tif (this.canSubmit($popup)) {\r\n\r\n\t\t\t\tconst $btn = $(ev.currentTarget);\r\n\r\n\t\t\t\tthis.lockSubmitBtn($btn);\r\n\r\n\t\t\t\tthis.track(\"Own Favourites\", contentType);\r\n\r\n\t\t\t\tconst url = $popup.data(\"api-endpoint\");\r\n\t\t\t\tconst id = $popup.data(\"item-id\");\r\n\r\n\t\t\t\tconst textareaValue = $popup.find(\"textarea\").val();\r\n\t\t\t\t// get list ids\r\n\t\t\t\tconst ids = this.getCheckedListIds($popup);\r\n\r\n\t\t\t\tconst textboxValue = this.getTextCheckBoxValue($popup);\r\n\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: 'post',\r\n\t\t\t\t\turl: url,\r\n\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\tdata:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid: id,\r\n\t\t\t\t\t\tids: ids,\r\n\t\t\t\t\t\ttextareaInput: textareaValue,\r\n\t\t\t\t\t\ttextInput: textboxValue\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: (response: any) => {\r\n\t\t\t\t\t\tif (response.success) {\r\n\t\t\t\t\t\t\twindow.location.reload();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, error type: ${response.error.type}, detail: ${response.error.message}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tthis.unlockSubmitBtn($btn);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tbindAddSharedEntrySubmitEvent($popup: JQuery, contentType: string) {\r\n\t\t// bind submit button\r\n\t\t$popup.find(`.${classes.confirmationBtn}`).on('click', (ev: any) => {\r\n\r\n\t\t\tif (this.canSubmit($popup)) {\r\n\r\n\t\t\t\tconst $btn = $(ev.currentTarget);\r\n\r\n\t\t\t\tthis.lockSubmitBtn($btn);\r\n\r\n\t\t\t\tconst url = $popup.data(\"api-endpoint\");\r\n\t\t\t\tconst SharedEntryIds = $popup.data(\"item-id\");\r\n\t\t\t\t// get list ids\r\n\t\t\t\tconst ids = this.getCheckedListIds($popup);\r\n\r\n\t\t\t\tconst textboxValue = this.getTextCheckBoxValue($popup);\r\n\r\n\t\t\t\tthis.submitTrack(url, contentType);\r\n\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: 'post',\r\n\t\t\t\t\turl: url,\r\n\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\tdata:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSharedEntryIds: SharedEntryIds,\r\n\t\t\t\t\t\tids: ids,\r\n\t\t\t\t\t\ttextInput: textboxValue\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: (response: any) => {\r\n\t\t\t\t\t\tif (response.success) {\r\n\t\t\t\t\t\t\twindow.location.assign(response.redirectUrl);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, error type: ${response.error.type}, detail: ${response.error.message}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tthis.unlockSubmitBtn($btn);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tbindTextareaContainerEvents($textareaContainer: any) {\r\n\r\n\t\tconst _this = this;\r\n\r\n\t\t// bind text area floating label\r\n\t\t$textareaContainer.on(\"focus\", `.${classes.textareaBox}`, (ev: any) => {\r\n\t\t\tconst me = ev.currentTarget;\r\n\t\t\tfloatControlLabel(me, true)\r\n\t\t});\r\n\r\n\t\t// bind text area counter\r\n\t\t$textareaContainer.find(`.${classes.textareaBox}`).on(\"input propertychange\", function (ev: any) {\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\t_this.countTextarea($target);\r\n\t\t\t_this.validateInputTextBox($target);\r\n\t\t})\r\n\t}\r\n\r\n\tbindTextboxContainerEvents($textboxContainer: JQuery) {\r\n\t\tconst _this = this;\r\n\r\n\t\tconst $inputBox = $textboxContainer.find(`.${classes.textbox}`);\r\n\t\tconst $checkBox = $textboxContainer.parents(`.${classes.textcheckboxContainer}`).find(\"input[type=checkbox]\");\r\n\r\n\t\t// bind text box floating label\r\n\t\t$textboxContainer.on(\"focus\", `.${classes.textbox}`, (ev: any) => {\r\n\t\t\tconst me = ev.currentTarget;\r\n\t\t\tfloatControlLabel(me, true)\r\n\t\t});\r\n\r\n\t\t// bind textbox validation\r\n\t\t$inputBox.on(\"input propertychange\", function (ev: any) {\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\r\n\t\t\tlet value = $target.val();\r\n\t\t\tif (value.length > 0) {\r\n\t\t\t\t$checkBox.prop(\"checked\", true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$checkBox.prop(\"checked\", false);\r\n\t\t\t}\r\n\r\n\t\t\tif ($checkBox.prop(\"checked\")) {\r\n\t\t\t\t_this.validateInputTextBox($target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t})\r\n\r\n\t\t// bind textbox checkbox validation\r\n\t\t$checkBox.on(\"click\", function (ev: any) {\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\tif (!$target.prop(\"checked\")) {\r\n\t\t\t\t$inputBox.removeClass(classes.inputValidationError);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindAllCheckboxesEvents($allCheckboxContainer: JQuery) {\r\n\t\tconst _this = this;\r\n\t\tconst $allCheckboxes = $allCheckboxContainer.find(\"input[type=checkbox]\");\r\n\t\t$allCheckboxes.on(\"click\", function (ev: any) {\r\n\t\t\t_this.validateCheckList($allCheckboxContainer);\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tcountTextarea($textarea: any) {\r\n\t\tconst $textareaValLength = $textarea.parent().find(`.${classes.textareaValLength}`);\r\n\t\tconst $textareaValLengthMax = $textarea.parent().find(`.${classes.textareaValLengthMax}`);\r\n\t\tconst textVal = $textarea.val();\r\n\t\tconst currentCount = parseInt($textareaValLengthMax.text()) - textVal.length;\r\n\t\tif (currentCount > 0) {\r\n\t\t\t$textareaValLength.text(currentCount);\r\n\t\t\t$textareaValLength.parent().removeClass(classes.stateCountMax)\r\n\t\t} else {\r\n\t\t\t$textareaValLength.text('0');\r\n\t\t\t$textareaValLength.parent().addClass(classes.stateCountMax)\r\n\t\t};\r\n\t}\r\n\r\n\tgetCheckedListIds($currentPopup: JQuery) {\r\n\r\n\t\tlet $checkedItems = $currentPopup.find(`.${classes.checklistContainer}`).find(\"input[type='checkbox']:checked\");\r\n\t\tconst idArr = new Array();\r\n\t\t$checkedItems.each((i: any, e: any) => {\r\n\t\t\tconst value = $(e).attr(\"id\");\r\n\t\t\tif (typeof (value) != \"undefined\") {\r\n\t\t\t\tidArr.push(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconst ids = idArr.join(\",\");\r\n\r\n\t\treturn ids;\r\n\t}\r\n\r\n\tgetTextCheckBoxValue($popup: JQuery) {\r\n\t\t// get new list name\r\n\t\tlet textboxValue = \"\";\r\n\t\tconst newListChecked: boolean = $popup.find(`.${classes.textcheckboxContainer}`).find(\"input[type='checkbox']\").prop(\"checked\");\r\n\r\n\t\tif (newListChecked) {\r\n\t\t\ttextboxValue = $popup.find(`.${classes.textboxContainer}`).find(`.${classes.textbox}`).val() as string;\r\n\t\t}\r\n\r\n\t\treturn textboxValue\r\n\t}\r\n\r\n\tvalidateInputTextBox($inputBox: any): boolean {\r\n\r\n\t\tconst value = $inputBox.val();\r\n\r\n\t\tif (value == null || value == undefined || value == '' || value.length == 0) {\r\n\t\t\t$inputBox.addClass(classes.inputValidationError);\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t$inputBox.removeClass(classes.inputValidationError);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\t// validate all checkboxes, include new created one\r\n\tvalidateCheckList($allCheckboxesContainer: JQuery): boolean {\r\n\t\tlet chkVal = false;\r\n\r\n\t\tconst $chkList = $allCheckboxesContainer.find(\"input[type=checkbox]\");\r\n\r\n\t\t$chkList.each((i: any, e: any) => {\r\n\t\t\tconst $ele = $(e);\r\n\t\t\tif ($ele.prop(\"checked\")) {\r\n\t\t\t\tchkVal = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst $popup = $allCheckboxesContainer.parents(`.${classes.popupBox}`);\r\n\r\n\t\tconst $chkValMsgEle = $popup.find(`.${classes.fieldValidationError}`);\r\n\t\tif (!chkVal) {\r\n\t\t\t$chkValMsgEle.addClass(classes.stateValMsgVisible);\r\n\t\t} else {\r\n\t\t\t$chkValMsgEle.removeClass(classes.stateValMsgVisible);\r\n\t\t}\r\n\r\n\t\treturn chkVal;\r\n\t}\r\n\r\n\tcanSubmit($popup: JQuery): boolean {\r\n\r\n\t\t// validate textarea\r\n\t\tlet textareaVal = true;\r\n\t\tconst $textareaContainer = $popup.find(`.${classes.textareaContainer}`);\r\n\t\tif ($textareaContainer.length > 0) {\r\n\t\t\tconst $textarea = $textareaContainer.find(`.${classes.textareaBox}`);\r\n\t\t\ttextareaVal = this.validateInputTextBox($textarea);\r\n\t\t}\r\n\r\n\t\t// validate textbox\r\n\t\tlet textboxVal = true;\r\n\t\tconst $textcheckboxContainer = $popup.find(`.${classes.textcheckboxContainer}`);\r\n\t\tif ($textcheckboxContainer.length > 0) {\r\n\t\t\tconst $textbox = $textcheckboxContainer.find(`.${classes.textbox}`);\r\n\t\t\tconst $textboxChk = $textcheckboxContainer.find(\"input[type=checkbox]\");\r\n\t\t\tif ($textboxChk.prop(\"checked\")) {\r\n\t\t\t\ttextboxVal = this.validateInputTextBox($textbox);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// validate if at leaset one favor list is selected\r\n\t\tlet chkVal = true;\r\n\t\tconst $allChecklistContainer = $popup.find(`.${classes.allChecklistContainer}`);\r\n\t\tconst $allChecklists = $allChecklistContainer.find(\"input[type=checkbox]\");\r\n\t\tif ($allChecklists.length > 0) {\r\n\t\t\tchkVal = this.validateCheckList($allChecklistContainer);\r\n\t\t}\r\n\r\n\t\tif (textareaVal && textboxVal && chkVal) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false\r\n\t\t}\r\n\t}\r\n\r\n\tdisplayPopup($popup: JQuery) {\r\n\t\t$popup.addClass(classes.statePopupVisible);\r\n\t\t$('html').addClass(classes.noScrollingBar);\r\n\r\n\t\t// bind close button and icon\r\n\t\t$popup.find(`.${classes.statePopupClose}`).on('click', () => {\r\n\t\t\tthis.removePopup($popup);\r\n\t\t});\r\n\t}\r\n\r\n\tremovePopup($popup: JQuery) {\r\n\t\t$popup.parent().empty();\r\n\t\t$('html').removeClass(classes.noScrollingBar);\r\n\t}\r\n\r\n\tlockSubmitBtn($btnEle: JQuery) {\r\n\t\t$btnEle.attr(\"disabled\", \"disabled\");\r\n\t}\r\n\r\n\tunlockSubmitBtn($btnEle: JQuery) {\r\n\t\t$btnEle.removeAttr(\"disabled\");\r\n\t}\r\n\r\n\tsubmitTrack(submitUrl: string, contentType: string) {\r\n\t\tif (submitUrl.indexOf(submitApis.addSharedEntry) > -1) {\r\n\t\t\tthis.track(\"Own Favourites\", contentType);\r\n\t\t}\r\n\t}\r\n\r\n\ttrack(action: string, contentType: string) {\r\n\r\n\t\tconst trackdata: {\r\n\t\t\tevent: string;\r\n\t\t\teventCategory: string;\r\n\t\t\teventAction: string;\r\n\t\t\teventLabel: string;\r\n\t\t\teventValue?: string;\r\n\t\t} = {\r\n\t\t\tevent: 'share',\r\n\t\t\teventCategory: 'Share Favourites',\r\n\t\t\teventAction: action,\r\n\t\t\teventLabel: contentType,\r\n\t\t};\r\n\t\tTrack.gtmTrack(trackdata);\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","/**\r\n * This script handles product compare\r\n */\r\nimport * as Cookies from 'js-cookie';\r\n\r\nconst cookieInstance = Cookies.withConverter({\r\n\tread(value) {\r\n\t\treturn value;\r\n\t},\r\n\twrite(value) {\r\n\t\treturn value;\r\n\t},\r\n});\r\n\r\n/**\r\n * Gets the product compare data from cookie\r\n *\r\n * @returns {Array} Array of product compare\r\n */\r\nexport function getCookieData() {\r\n\treturn JSON.parse(cookieInstance.get('productCompare') || '[]');\r\n}\r\n\r\n/**\r\n * method gets array index of item with productId\r\n *\r\n * @param {Array} array array to search for\r\n * @param {string} id product id\r\n * @returns {number} index\r\n */\r\nfunction getArrayIndex(array: Array, id: string) {\r\n\treturn array.findIndex((el: any) => {\r\n\t\treturn `${el.number}` === `${id}`;\r\n\t});\r\n}\r\n\r\n/**\r\n * method saves data to cookie\r\n *\r\n * @param {Object} data cookiedate\r\n * @returns {void}\r\n */\r\nfunction saveCookie(data: object) {\r\n\tcookieInstance.set('productCompare', JSON.stringify(data));\r\n}\r\n\r\n/**\r\n * method updates compare layer\r\n *\r\n * @returns {void}\r\n */\r\nexport function updateLayer(): void {\r\n\tconst $compareLayerModule = $(\"[data-t-name='ProductCompareLayer']\");\r\n\tif ($compareLayerModule.length) {\r\n\t\tconst count = getCookieData().length;\r\n\t\tif (count > 0) {\r\n\t\t\tif (parseInt(cookieInstance.get('productCompareHidden'), 10) !== count) {\r\n\t\t\t\tcookieInstance.remove('productCompareHidden');\r\n\t\t\t\t$compareLayerModule.trigger('showLayer', count);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$compareLayerModule.trigger('hideLayer');\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * method add compare layer\r\n *\r\n * @returns {void}\r\n */\r\nexport function addNewProductLayer(id: string, market: string, name: string): void {\r\n\tconst $compareLayerModule = $(\"[data-t-name='ProductCompareLayer']\");\r\n\t$compareLayerModule.trigger('addNewProductLayer', {number: id, market: market, name: name});\r\n}\r\n\r\n/**\r\n * method add compare layer\r\n *\r\n * @returns {void}\r\n */\r\nexport function removeNewProductLayer(id: string): void {\r\n\tconst $compareLayerModule = $(\"[data-t-name='ProductCompareLayer']\");\r\n\t$compareLayerModule.trigger('removeNewProductLayer', id);\r\n}\r\n\r\n/**\r\n * when handle the remove action from compare list, we also need to change the button state in finder list.\r\n *\r\n * @returns {void}\r\n */\r\nexport function removeCompareProductLayerFromFinderList(id: string): void {\r\n\tconst $compareLayerModule = $(\"[data-t-name='ProductCompareButton']\");\r\n\t$compareLayerModule.trigger('onCompareProductListItemChangeEvent', id);\r\n}\r\n\r\n/**\r\n * method will set hide layer cookie\r\n *\r\n * @param {string} id productid string\r\n * @returns {void}\r\n */\r\nexport function setLayerHiddenCookie() {\r\n\tcookieInstance.set('productCompareHidden', getCookieData().length);\r\n}\r\n\r\n/**\r\n * method removes entry from product data\r\n *\r\n * @param {string} id productid string\r\n * @returns {void}\r\n */\r\nfunction removeProductData(id: string) {\r\n\tconst cookieVal = getCookieData();\r\n\tconst index = getArrayIndex(cookieVal, id);\r\n\tif (index > -1) {\r\n\t\tcookieVal.splice(index, 1);\r\n\t}\r\n\treturn cookieVal;\r\n}\r\n\r\n/**\r\n * method removes entry from cookie\r\n *\r\n * @param {string} id productid\r\n * @returns {void}\r\n */\r\nexport function removeProduct(id: string) {\r\n\tsaveCookie(removeProductData(id));\r\n\tremoveNewProductLayer(id);\r\n\tupdateLayer();\r\n}\r\n\r\n/**\r\n * method empty product compare from cookie\r\n *\r\n * @returns {void}\r\n */\r\nexport function removeAllProduct() {\r\n\tcookieInstance.remove('productCompare');\r\n}\r\n\r\n/**\r\n * method updates adds product to cookie\r\n *\r\n * @param {string} id productid\r\n * @param {string} market market\r\n * @returns {void}\r\n */\r\nexport function addProduct(id: string, market: string, name: string) {\r\n\tconst cookieVal = removeProductData(id);\r\n\tcookieVal.push({\r\n\t\tnumber: `${id}`,\r\n\t\tmarket,\r\n\t});\r\n\tsaveCookie(cookieVal);\r\n\taddNewProductLayer(id, market, name);\r\n\tupdateLayer();\r\n}\r\n\r\n/**\r\n * method updates cookie state\r\n *\r\n * @param {string} id id of product\r\n * @returns {void}\r\n */\r\nexport function isProductInCookie(id: string) {\r\n\treturn getArrayIndex(getCookieData(), id) > -1;\r\n}\r\n","/**\r\n * This script toggles burger navigation\r\n */\r\n\r\nexport enum Bodystate {\r\n\tvisible = 'state-m-burgernav--visible',\r\n\tsticky = 'no-scrolling--without-scrollbar',\r\n\tscrollbar = 'no-scrolling--without-scrollbar',\r\n}\r\n\r\nconst classes = {\r\n\touterParent: 'body',\r\n\tstateBurgerNav: Bodystate.visible,\r\n\tnoScrolling: Bodystate.scrollbar,\r\n};\r\n\r\n/**\r\n * change the current burger state\r\n *\r\n * @param handler\r\n * @returns {void}\r\n */\r\nexport function changeBodyState(bodyClass: string): void {\r\n\t$(`${classes.outerParent}`).toggleClass(bodyClass);\r\n}\r\n\r\n/**\r\n * removes the current burger state\r\n *\r\n * @param handler\r\n * @returns {()=>JQuery}\r\n */\r\nexport function removeBodyState(bodyClass: string) {\r\n\t$(`${classes.outerParent}`).removeClass(bodyClass);\r\n}\r\n\r\n/**\r\n * Returns the current burger State\r\n */\r\nexport function getBodyState(bodyClass: string): boolean {\r\n\treturn $(`${classes.outerParent}`).hasClass(bodyClass);\r\n}\r\n\r\nexport default { changeBodyState, getBodyState };\r\n\r\n$(window).on('lockScrolling', () => {\r\n\t$('html').addClass(classes.noScrolling);\r\n});\r\n\r\n$(window).on('unlockScrolling', () => {\r\n\t$('html').removeClass(classes.noScrolling);\r\n});\r\n","import { isKnownMarketoLead } from '@project/shared/utils/tracking/js/tracking';\r\nimport { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tcontactImage: 'js-m-marketo-form__contact-image',\r\n\tstateHasImage: 'm-marketo-form__has-contact-image',\r\n\tstateAdditionalFieldsVisible: 'm-marketo-form__show-additional-fields',\r\n\trowHide: \"mktoFormRowHide\",\r\n\tautoSuggestDropdown: \"js-m-marketo-form_product-autosuggest\",\r\n\tdropdownItem: \"js-m-marketo-form_dropdown-item\"\r\n};\r\n\r\ninterface IProductAutosuggest {\r\n\tFieldName: string;\r\n\tEndpoint: string;\r\n\tBrandLabel: string;\r\n\tProductLabel: string;\r\n\tNoResultLabel: string;\r\n\tMaxItem: number;\r\n\tPermissionQuery: string;\r\n\tLanguage: string;\r\n}\r\n\r\n\r\n@createModule('MarketoFormGlobal')\r\nexport class MarketoFormGlobal extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\t//this is for marketo lightbox not working\r\n\t\t//so changed to when for loaded call this method\r\n\t\t//this.initializeMarketoOnScriptLoad();\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitializeMarketoOnScriptLoad(): void {\r\n\t\tlet $this = this;\r\n\t\tlet timerRef = setTimeout(() => {\r\n\t\t\tlet MktoForms2 = (window as any)[\"MktoForms2\"];\r\n\t\t\tif (typeof (MktoForms2) != \"undefined\") {\r\n\t\t\t\tclearTimeout(timerRef);\r\n\r\n\t\t\t\tMktoForms2.whenReady(function (form: any) {\r\n\t\t\t\t\tlet $component = $(form.getFormElem()[0]).closest(\"div[data-t-name]\");\r\n\r\n\t\t\t\t\t$this.initMessageBox($component);\r\n\r\n\t\t\t\t\t// translate form\r\n\t\t\t\t\t$this.translate(form, $component);\r\n\r\n\t\t\t\t\t// sort select options\r\n\t\t\t\t\t$this.sortSelectOptions(form);\r\n\r\n\t\t\t\t\t// prefill form based on cookie\r\n\t\t\t\t\t$this.prefillForm(form, $component);\r\n\r\n\t\t\t\t\t// message photo\r\n\t\t\t\t\t$this.initContactImage($component);\r\n\r\n\t\t\t\t\t// checkbox order\r\n\t\t\t\t\t$this.initCheckboxOrder($component);\r\n\r\n\t\t\t\t\t// hide fields\r\n\t\t\t\t\t$this.hideFields($component);\r\n\r\n\t\t\t\t\t// to avoid duplicated id in page, update field id to a random id\r\n\t\t\t\t\t// currently we just update the checkbox id\r\n\t\t\t\t\t$this.updateFieldAttributes(form, $component);\r\n\r\n\t\t\t\t\t// init product search field\r\n\t\t\t\t\t$this.productAutoSuggest($component);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tMktoForms2.whenRendered(function (form: any) {\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, 250);\r\n\t}\r\n\r\n\t// translate field label by field name\r\n\ttranslate(form: any, $component: JQuery) {\r\n\t\tlet MktoForms2 = (window as any)[\"MktoForms2\"];\r\n\t\tvar formEl = form.getFormElem()[0];\r\n\t\tvar ANCESTORS_STOR = '.mktoFormRow, .mktoFormCol',\r\n\t\t\tINPUTS_STOR = 'INPUT, SELECT, TEXTAREA, BUTTON',\r\n\t\t\tattrTag = 'data-wrapper-for',\r\n\t\t\t_forEach = Array.prototype.forEach;\r\n\r\n\t\t// utility fn: tag outer wrapper DIVs with their inner inputs' names to make them seekable\r\n\t\t(function tagMktoWrappers(formEl) {\r\n\t\t\t_forEach.call(formEl.querySelectorAll(ANCESTORS_STOR), function (ancestor: any) {\r\n\t\t\t\tancestor.setAttribute(attrTag, '');\r\n\t\t\t\t_forEach.call(ancestor.querySelectorAll(INPUTS_STOR), function (input: any) {\r\n\t\t\t\t\tvar currentTag = ancestor.getAttribute(attrTag);\r\n\t\t\t\t\tancestor.setAttribute(attrTag, [currentTag ? currentTag : '', input.name].join(' ').trim());\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t})(formEl);\r\n\r\n\t\tlet translateMapEl = $component.find(`[data-map-id=\"translateMap\"]`);// get translations embedded in form rich text area\r\n\r\n\t\tlet jsonStr = translateMapEl.text();\r\n\r\n\t\tif (jsonStr.length > 0) {\r\n\t\t\tlet translateMap = JSON.parse(jsonStr);\r\n\t\t\tlet currentTranslations = translateMap;\r\n\r\n\t\t\t// loop over translatables\r\n\t\t\tvar fieldName, fieldTranslations, propertyName, propertyValue: any, translateTargetEl: any;\r\n\t\t\tfor (fieldName in currentTranslations) {\r\n\t\t\t\tfieldTranslations = currentTranslations[fieldName];\r\n\t\t\t\tfor (propertyName in fieldTranslations) {\r\n\t\t\t\t\tpropertyValue = fieldTranslations[propertyName];\r\n\t\t\t\t\tswitch (propertyName) {\r\n\t\t\t\t\t\tcase \"label\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('[data-wrapper-for=\"' + fieldName + '\"] LABEL');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\ttranslateTargetEl.lastChild.nodeValue = propertyValue\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"validation\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = MktoForms2.$(formEl.querySelector('[data-wrapper-for=\"' + fieldName + '\"] .mktoFieldDescriptor'));\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\tlet mktoFieldDescriptor = translateTargetEl.data('mktoFieldDescriptor');\r\n\t\t\t\t\t\t\t\tif (mktoFieldDescriptor != undefined) {\r\n\t\t\t\t\t\t\t\t\tmktoFieldDescriptor.validationMessage = propertyValue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"placeholder\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('[data-wrapper-for=\"' + fieldName + '\"] INPUT');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\ttranslateTargetEl.setAttribute('placeholder', propertyValue);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"submit\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('BUTTON[type=\"submit\"]');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\ttranslateTargetEl.innerHTML = propertyValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"html\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('[data-wrapper-for=\"' + fieldName + '\"]');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\ttranslateTargetEl.innerHTML = propertyValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"options\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelectorAll('[data-wrapper-for=\"' + fieldName + '\"] OPTION');\r\n\t\t\t\t\t\t\tfor (var i = 0; i < translateTargetEl.length; i++) {\r\n\t\t\t\t\t\t\t\tconst val = translateTargetEl[i].value\r\n\t\t\t\t\t\t\t\tconst txt = propertyValue[val];\r\n\t\t\t\t\t\t\t\tif (typeof (txt) !== \"undefined\") {\r\n\t\t\t\t\t\t\t\t\ttranslateTargetEl[i].text = txt;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"checkbox\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('[data-wrapper-for=\"' + fieldName + '\"] .mktoCheckboxList');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\tconst labelEle = translateTargetEl.parentElement.querySelector(\"label\");\r\n\t\t\t\t\t\t\t\tlabelEle.innerHTML = propertyValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"fieldset\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('[data-wrapper-for=\"' + fieldName + '\"] fieldset legend');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\ttranslateTargetEl.innerText = propertyValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"submitprogress\":\r\n\t\t\t\t\t\t\ttranslateTargetEl = formEl.querySelector('BUTTON[type=\"submit\"]');\r\n\t\t\t\t\t\t\tif (translateTargetEl != null) {\r\n\t\t\t\t\t\t\t\ttranslateTargetEl.setAttribute(\"data-submit-progress-text\", propertyValue);\r\n\t\t\t\t\t\t\t\tform.onSubmit(function (form: any) {\r\n\t\t\t\t\t\t\t\t\tif (form.submittable()) {\r\n\t\t\t\t\t\t\t\t\t\ttranslateTargetEl.innerHTML = translateTargetEl.getAttribute(\"data-submit-progress-text\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsortSelectOptions(form: any) {\r\n\t\tlet formEl = form.getFormElem()[0];\r\n\t\tlet $form = $(formEl);\r\n\t\tconst language = $(\"html\").attr(\"lang\");\r\n\t\tconst $selectEles = $form.find(\"select\");\r\n\r\n\t\t$selectEles.each((i: any, e: any) => {\r\n\t\t\tlet $options = $(e).find(\"option\");\r\n\t\t\tconst $defaultOption = $options.filter(\"option[value='']\");\r\n\r\n\t\t\t// get the \"Other\" option in dropdown list\r\n\t\t\tconst $othersOption = $options.filter((optIndex: number, optEle: any) => {\r\n\t\t\t\tlet optValue = $(optEle).val().toString().toLocaleLowerCase();\r\n\t\t\t\tlet result = (optValue == \"others\" || optValue == \"other\");\r\n\t\t\t\treturn result;\r\n\t\t\t});\r\n\r\n\t\t\tconst $optionEles = $options.toArray().sort(function (a, b) {\r\n\t\t\t\tvar aText = $(a).text() as string;\r\n\t\t\t\tvar bText = $(b).text() as string;\r\n\t\t\t\tvar result = aText.localeCompare(bText, language, { ignorePunctuation: true });\r\n\t\t\t\treturn result;\r\n\t\t\t});\r\n\r\n\t\t\t$(e).empty();\r\n\r\n\t\t\t$(e).append($optionEles);\r\n\r\n\t\t\t// make the \"Select...\" option at the top\r\n\t\t\tif ($defaultOption && $defaultOption.length > 0) {\r\n\t\t\t\t$(e).prepend($defaultOption);\r\n\t\t\t}\r\n\r\n\t\t\t// make the \"Others\" option at the bottom\r\n\t\t\tif ($othersOption && $othersOption.length > 0) {\r\n\t\t\t\t$(e).append($othersOption);\r\n\t\t\t}\r\n\r\n\t\t\tvar id = $(e).attr('id');\r\n\t\t\tif (id !== \"formVersion\" || (id == \"formVersion\" && isKnownMarketoLead() == false)) {\r\n\t\t\t\t// make sure the first option is selected\r\n\t\t\t\t$(e).find(\"option\").first().prop(\"selected\", true);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tformatPhoneNumber(form: any) {\r\n\t\tvar vals = form.vals();\r\n\t\tvar phone = vals.Phone;\r\n\t\tif (typeof (phone) !== \"undefined\") {\r\n\t\t\tvar formattedPhone = phone.replace(/[^0-9]/g, '').replace(/^0*/g, '');\r\n\t\t\tform.vals({ \"Phone\": formattedPhone });\r\n\t\t}\r\n\t}\r\n\r\n\tprefillForm(form: any, $component: JQuery) {\r\n\t\tlet _this = this;\r\n\r\n\t\tlet prefilledFieldsEle = $component.find(\"div[data-map-id='prefillFields']\");\r\n\t\tlet prefilledJsonStr = prefilledFieldsEle.text();\r\n\r\n\t\tif (prefilledJsonStr.length > 0) {\r\n\r\n\t\t\tlet prefillFields = JSON.parse(prefilledJsonStr);\r\n\t\t\tlet formFieldEles = $component.find(\"div.mktoFormRow\");\r\n\r\n\t\t\tfor (var fieldName in prefillFields) {\r\n\t\t\t\tlet fieldValue: any = prefillFields[fieldName];\r\n\r\n\t\t\t\tformFieldEles.each(function (i: any, e: any) {\r\n\t\t\t\t\tlet $fieldEle = $(e);\r\n\t\t\t\t\tlet formFieldId: string = $fieldEle.data(\"wrapper-for\");\r\n\r\n\t\t\t\t\tif (fieldName.toLocaleLowerCase() == formFieldId.toLocaleLowerCase()) {\r\n\r\n\t\t\t\t\t\tif (fieldValue != null) {\r\n\r\n\t\t\t\t\t\t\tlet type = $fieldEle.find(\"input\").attr(\"type\");\r\n\t\t\t\t\t\t\tif (type == \"checkbox\") {\r\n\t\t\t\t\t\t\t\tif (fieldValue == \"true\") {\r\n\t\t\t\t\t\t\t\t\tfieldValue = \"yes\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlet obj = _this.GenerateObject(formFieldId, fieldValue);\r\n\t\t\t\t\t\t\tform.vals(obj);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tGenerateObject(formFieldId: string, formFieldValue: string): any {\r\n\t\tlet jsonStr = `{\"${formFieldId}\":\"${formFieldValue}\"}`;\r\n\t\tlet obj = JSON.parse(jsonStr);\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tinitCheckboxOrder($component: JQuery) {\r\n\t\tconst $formCheckbox = $component.find('[type=\"checkbox\"]');\r\n\t\tif ($formCheckbox.length > 0) {\r\n\t\t\t$formCheckbox.parents('.mktoFormRow').css('order', '1')\r\n\t\t}\r\n\t}\r\n\r\n\tinitContactImage($component: JQuery) {\r\n\t\tconst $contactImage = $component.find(`.${classes.contactImage}`);\r\n\t\tconst $formMessage = $component.find(\"textarea[name='formMessage']\");\r\n\t\tif ($contactImage.length > 0 && $formMessage.length > 0) {\r\n\t\t\t$component.addClass(classes.stateHasImage);\r\n\t\t}\r\n\t}\r\n\r\n\tinitMessageBox($component: JQuery) {\r\n\t\t$component.find(\"textarea[name='formMessage']\").on('focus', (ev: any) => {\r\n\t\t\t$component.addClass(classes.stateAdditionalFieldsVisible);\r\n\t\t});\r\n\t}\r\n\r\n\tupdateFieldAttributes(form: any, $component: JQuery) {\r\n\r\n\t\tvar $formEl = $(form.getFormElem()[0]);\r\n\t\tvar rando = new Date().getTime() + parseInt((Math.random() * 1000).toString());\r\n\r\n\t\tvar $checkboxes = $formEl.find(\".mktoField\");\r\n\r\n\t\t$checkboxes.each((i: any, e: any) => {\r\n\t\t\tvar $chk = $(e);\r\n\t\t\tvar chkId = $chk.attr(\"id\");\r\n\t\t\tvar newChkId = `${chkId}_${rando}`;\r\n\r\n\t\t\tif (chkId != undefined) {\r\n\t\t\t\tif (!chkId.includes('_')) {\r\n\t\t\t\t\t// update checkbox id\r\n\t\t\t\t\t$chk.attr(\"id\", newChkId);\r\n\r\n\t\t\t\t\t// update label-for attribute\r\n\t\t\t\t\t$chk.parents(\".mktoFieldWrap\").find(`label[for=${chkId}]`).attr(\"for\", newChkId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar formId = $formEl.attr(\"id\");\r\n\t\tvar newFormId = `${formId}_${rando}`;\r\n\t\tif (formId != undefined) {\r\n\t\t\tif (!formId.includes('_', 9)) {\r\n\t\t\t\t$formEl.attr(\"id\", newFormId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thideFields($component: JQuery) {\r\n\t\tlet hiddenFieldsStr = $component.find(\"div[data-map-id='hiddenFields']\").text();\r\n\t\tlet hiddenFieldsArr = hiddenFieldsStr.split(',');\r\n\t\tlet campaignId = $component.data(\"mktoflow-campaignid\");\r\n\t\tlet formcampaignId = $component.data(\"mktoflow-formcampaignid\");\r\n\t\tlet siteCampaignId = $component.data(\"mktoflow-sitecampaignid\");\r\n\t\tlet $formContainer: JQuery = $component.find(\"div[data-id='formContainer']\");\r\n\r\n\t\tif (campaignId === undefined) {\r\n\t\t\tcampaignId = $formContainer.data(\"mktoflow-campaignid\");\r\n\t\t}\r\n\t\tif (formcampaignId === undefined) {\r\n\t\t\tformcampaignId = $formContainer.data(\"mktoflow-formcampaignid\");\r\n\t\t}\r\n\t\tif (siteCampaignId === undefined) {\r\n\t\t\tsiteCampaignId = $formContainer.data(\"mktoflow-sitecampaignid\");\r\n\t\t}\r\n\r\n\t\tlet formFieldEles = $component.find(\"div.mktoFormRow\");\r\n\t\tfor (var field in hiddenFieldsArr) {\r\n\r\n\t\t\tlet fieldName = hiddenFieldsArr[field];\r\n\r\n\t\t\tformFieldEles.each(function (i: any, e: any) {\r\n\t\t\t\tlet $fieldEle = $(e);\r\n\t\t\t\tlet formFieldId: string = $fieldEle.data(\"wrapper-for\");\r\n\r\n\t\t\t\tif (fieldName.toLocaleLowerCase() == formFieldId.toLocaleLowerCase()) {\r\n\t\t\t\t\t$fieldEle.addClass(classes.rowHide);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tformFieldEles.each(function (i: any, e: any) {\r\n\t\t\tlet $fieldEle = $(e);\r\n\t\t\tlet formFieldId: string = $fieldEle.data(\"wrapper-for\");\r\n\r\n\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden') {\r\n\t\t\t\t$fieldEle.addClass(classes.rowHide);\r\n\t\t\t}\r\n\r\n\t\t\tif (formFieldId == \"\") {\r\n\t\t\t\t$fieldEle.addClass(classes.rowHide);\r\n\t\t\t}\r\n\r\n\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden'\r\n\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'tempPreferenceIndustry') {\r\n\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val($(\"#frmPageIndustrytags\").val());\r\n\t\t\t}\r\n\r\n\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden'\r\n\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'tempPreferenceMaterial') {\r\n\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val($(\"#frmPageMaterialtags\").val());\r\n\t\t\t}\r\n\r\n\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden'\r\n\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'tempPreferenceTheme') {\r\n\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val($(\"#frmPagePreferenceTheme\").val());\r\n\t\t\t}\r\n\r\n\t\t\tvar urlParams = new URLSearchParams(window.location.search);\r\n\t\t\tvar utmId = \"\";\r\n\t\t\tif (urlParams.has('utm_id')) {\r\n\t\t\t\tutmId = urlParams.get('utm_id');\r\n\t\t\t}\r\n\t\t\tif ((typeof utmId === \"string\" && utmId.length === 0)) {\r\n\t\t\t\tif (typeof campaignId === 'undefined') {\r\n\t\t\t\t\tif (typeof formcampaignId === 'undefined') {\r\n\t\t\t\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden' \r\n\t\t\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'mktoCampaignID') {\r\n\t\t\t\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val(siteCampaignId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden' \r\n\t\t\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'mktoCampaignID') {\r\n\t\t\t\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val(formcampaignId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden' \r\n\t\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'mktoCampaignID') {\r\n\t\t\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val(campaignId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ($fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('type') == 'hidden' \r\n\t\t\t\t&& $fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").attr('name') == 'mktoCampaignID') {\r\n\t\t\t\t\t$fieldEle.find(\"input[name=\\\"\" + formFieldId + \"\\\"]\").val(utmId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tproductAutoSuggest($component: JQuery) {\r\n\r\n\t\tlet _this = this;\r\n\r\n\t\tlet autosuggestObjJsonStr = $component.find(\"div[data-map-id='autosuggestObj']\").text();\r\n\r\n\t\tif (autosuggestObjJsonStr.length > 0) {\r\n\r\n\t\t\tlet autoObj: IProductAutosuggest = JSON.parse(autosuggestObjJsonStr);\r\n\r\n\t\t\tif (autoObj.FieldName && autoObj.FieldName.length > 0) {\r\n\r\n\t\t\t\tlet $autoEle = $component.find(`.${classes.autoSuggestDropdown}`);\r\n\r\n\t\t\t\t// disable browser's autocomplete feature\r\n\t\t\t\t$component.find(`input[name='${autoObj.FieldName}']`).on(\"focus\", function (ev: any) {\r\n\t\t\t\t\t$(ev.currentTarget).attr(\"autocomplete\", \"off\");\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$component.find(`input[name='${autoObj.FieldName}']`).on(\"input propertychange\", function (ev: any) {\r\n\r\n\t\t\t\t\tlet $target: any = $(ev.currentTarget);\r\n\t\t\t\t\t$target.attr(\"data-t-uvpno\", \"\");\r\n\t\t\t\t\t$target.addClass(\"js-m-mkto-form-productname\", \"\");\r\n\t\t\t\t\tlet val = $target.val();\r\n\r\n\t\t\t\t\tif (val.length >= 2) {\r\n\r\n\t\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\t\turl: autoObj.Endpoint,\r\n\t\t\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\t\t\tdata:\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tterm: val,\r\n\t\t\t\t\t\t\t\tpermissionQuery: autoObj.PermissionQuery,\r\n\t\t\t\t\t\t\t\tmax: autoObj.MaxItem,\r\n\t\t\t\t\t\t\t\tlang: autoObj.Language\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tsuccess: (response: any) => {\r\n\r\n\t\t\t\t\t\t\t\tif (response) {\r\n\r\n\t\t\t\t\t\t\t\t\t// clear dropdown\r\n\t\t\t\t\t\t\t\t\t$autoEle.empty();\r\n\r\n\t\t\t\t\t\t\t\t\t// render brand dropdown items\r\n\t\t\t\t\t\t\t\t\t//_this.renderDropdown($autoEle, response.suggestions, autoObj.BrandLabel);\r\n\r\n\t\t\t\t\t\t\t\t\t// render product dropdown items\r\n\t\t\t\t\t\t\t\t\t_this.renderDropdown($autoEle, response.productSuggestions, autoObj.ProductLabel);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t// rebind dropdown items event\r\n\t\t\t\t\t\t\t\t\tif ($autoEle.children().length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t_this.rebindDropdownEvents($component, autoObj.FieldName);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// render no result found label\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tlet labelContent = _this.generateDropdownLabelContent(val, autoObj.NoResultLabel);\r\n\t\t\t\t\t\t\t\t\t\t$autoEle.append(labelContent);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t_this.showDropdown($autoEle, $target);\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tcomplete: () => {\r\n\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\t\t\tconsole.log(`marketo form, get product auto-suggest data error, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$autoEle.removeAttr('style');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t_this.resizeDropdown($component, autoObj.FieldName);\r\n\r\n\t\t\t\t_this.autoHideDropdown($component, autoObj.FieldName);\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateDropdownItemContent(text: string, uvptext: string) {\r\n\t\tlet htmlContent = `
  • ${text}
  • `;\r\n\t\treturn htmlContent;\r\n\r\n\t}\r\n\r\n\tgenerateDropdownLabelContent(text: string, NoResultLabel: string = \"\") {\r\n\t\tif (text == \"Product\") {\r\n\t\t\tlet htmlContent = `
  • ${text}
  • `;\r\n\t\t\treturn htmlContent;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet htmlContent = `
  • ${NoResultLabel} ${text}
  • `;\r\n\t\t\treturn htmlContent;\r\n\t\t}\r\n\r\n\r\n\t}\r\n\r\n\r\n\tresizeDropdown($component: JQuery, fieldName: string) {\r\n\t\t$(window).on('resize', () => {\r\n\t\t\tconst $target: any = $component.find(`input[name='${fieldName}']`);\r\n\t\t\tif ($target.length > 0) {\r\n\t\t\t\tconst currentTop = $target.closest('.mktoFormRow').position().top + $target.outerHeight();\r\n\t\t\t\tconst currentLeft = $target.closest('.mktoFormRow').position().left;\r\n\t\t\t\tconst currentWidth = $target.outerWidth();\r\n\r\n\t\t\t\t$component.find(`.${classes.autoSuggestDropdown}`).css({\r\n\t\t\t\t\t\"top\": `${currentTop}px`,\r\n\t\t\t\t\t\"left\": `${currentLeft}px`,\r\n\t\t\t\t\t\"width\": `${currentWidth}px`\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\trenderDropdown($autoEle: JQuery, data: any, label: string) {\r\n\r\n\t\tif (data && data.length > 0) {\r\n\r\n\t\t\tlet labelContent = this.generateDropdownLabelContent(label);\r\n\t\t\t$autoEle.append(labelContent);\r\n\r\n\t\t\tdata.forEach((d: any) => {\r\n\r\n\t\t\t\tlet htmlContent = this.generateDropdownItemContent(d.value, d.uvp);\r\n\t\t\t\t$autoEle.append(htmlContent);\r\n\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t}\r\n\r\n\trebindDropdownEvents($component: JQuery, fieldName: string) {\r\n\t\tlet _this = this;\r\n\t\t$component.find(`.${classes.dropdownItem}`).on(\"click\", function (e: any) {\r\n\t\t\tlet $target = $(e.target);\r\n\t\t\tlet value = $target.text();\r\n\t\t\tlet uvpno = $target.attr(\"data-t-uvp\");\r\n\t\t\t$component.find(`input[name='${fieldName}']`).val(value);\r\n\t\t\t$component.find(`input[name='${fieldName}']`).attr(\"data-t-uvpno\", uvpno);\r\n\t\t\t_this.setProductInfo($component, value);\r\n\t\t});\r\n\t}\r\n\r\n\tsetProductInfo($component: JQuery, value: string) {\r\n\t\tlet autosuggestObjJsonStr = $component.find(\"div[data-map-id='autosuggestObj']\").text();\r\n\t\tif (autosuggestObjJsonStr.length > 0) {\r\n\r\n\t\t\tlet autoObj: IProductAutosuggest = JSON.parse(autosuggestObjJsonStr);\r\n\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: autoObj.Endpoint,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tdata:\r\n\t\t\t\t{\r\n\t\t\t\t\tterm: value,\r\n\t\t\t\t\tpermissionQuery: autoObj.PermissionQuery,\r\n\t\t\t\t\tmax: autoObj.MaxItem,\r\n\t\t\t\t\tlang: autoObj.Language,\r\n\t\t\t\t\textended: 'true'\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: (response: any) => {\r\n\r\n\t\t\t\t\tif (response) {\r\n\t\t\t\t\t\tif (response.productSuggestions && response.productSuggestions.length > 0) {\r\n\t\t\t\t\t\t\tvar uvpFieldName = \"productUVP\";\r\n\t\t\t\t\t\t\t//set hidden productUVP value\r\n\t\t\t\t\t\t\tif ($component.attr(\"data-UvPFieldName\").length > 0) {\r\n\t\t\t\t\t\t\t\tuvpFieldName = $component.attr(\"data-UvPFieldName\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif ($component.find(`input[name='${uvpFieldName}']`).length > 0) {\r\n\t\t\t\t\t\t\t\tif (response.productSuggestions[0].uvp) {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${uvpFieldName}']`).val(response.productSuggestions[0].uvp);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${uvpFieldName}']`).val(\"\");\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//set hidden inferredProductBrandInterest value\r\n\t\t\t\t\t\t\tvar brandFieldName = \"inferredProductBrandInterest\";\r\n\t\t\t\t\t\t\tif ($component.attr(\"data-BrandFieldName\").length > 0) {\r\n\t\t\t\t\t\t\t\tbrandFieldName = $component.attr(\"data-BrandFieldName\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif ($component.find(`input[name='${brandFieldName}']`).length > 0) {\r\n\t\t\t\t\t\t\t\tif (response.productSuggestions[0].brand) {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${brandFieldName}']`).val(response.productSuggestions[0].brand);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${brandFieldName}']`).val(\"\");\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//set hidden inferredMaterialInterest value\r\n\t\t\t\t\t\t\tvar materialFieldName = \"inferredMaterialInterest\";\r\n\t\t\t\t\t\t\tif ($component.attr(\"data-MaterialFieldName\").length > 0) {\r\n\t\t\t\t\t\t\t\tmaterialFieldName = $component.attr(\"data-MaterialFieldName\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif ($component.find(`input[name='${materialFieldName}']`).length > 0) {\r\n\t\t\t\t\t\t\t\tif (response.productSuggestions[0].materials && response.productSuggestions[0].materials.length > 0) {\r\n\t\t\t\t\t\t\t\t\tvar value = \"\";\r\n\t\t\t\t\t\t\t\t\tif (response.productSuggestions[0].materials.length == 1) {\r\n\t\t\t\t\t\t\t\t\t\tvalue = response.productSuggestions[0].materials[0];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tresponse.productSuggestions[0].materials.forEach((d: any) => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvalue = value + d + \"; \";\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${materialFieldName}']`).val(value);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${materialFieldName}']`).val(\"\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//set hidden inferredApplicationInterest value\r\n\t\t\t\t\t\t\tvar applicationFieldName = \"inferredApplicationInterest\";\r\n\t\t\t\t\t\t\tif ($component.attr(\"data-ApplicationFieldName\").length > 0) {\r\n\t\t\t\t\t\t\t\tapplicationFieldName = $component.attr(\"data-ApplicationFieldName\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($component.find(`input[name='${applicationFieldName}']`).length > 0) {\r\n\t\t\t\t\t\t\t\tif (response.productSuggestions[0].applications && response.productSuggestions[0].applications.length > 0) {\r\n\t\t\t\t\t\t\t\t\tvar value = \"\";\r\n\t\t\t\t\t\t\t\t\tif (response.productSuggestions[0].applications.length == 1) {\r\n\t\t\t\t\t\t\t\t\t\tvalue = response.productSuggestions[0].applications[0]\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tresponse.productSuggestions[0].applications.forEach((d: any) => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvalue = value + d + \"; \";\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${applicationFieldName}']`).val(value);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${applicationFieldName}']`).val(\"\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//set hidden inferredIndustryInterest value\r\n\t\t\t\t\t\t\tvar industryFieldName = \"inferredIndustryInterest\";\r\n\t\t\t\t\t\t\tif ($component.attr(\"data-IndustryFieldName\").length > 0) {\r\n\t\t\t\t\t\t\t\tindustryFieldName = $component.attr(\"data-IndustryFieldName\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($component.find(`input[name='${industryFieldName}']`).length > 0) {\r\n\t\t\t\t\t\t\t\tif (response.productSuggestions[0].industries && response.productSuggestions[0].industries.length > 0) {\r\n\t\t\t\t\t\t\t\t\tvar value = \"\";\r\n\t\t\t\t\t\t\t\t\tif (response.productSuggestions[0].industries.length == 1) {\r\n\t\t\t\t\t\t\t\t\t\tvalue = response.productSuggestions[0].industries[0];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tresponse.productSuggestions[0].industries.forEach((d: any) => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvalue = value + d + \"; \";\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${industryFieldName}']`).val(value);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${industryFieldName}']`).val(\"\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//set hidden inferredBUInterest value\r\n\t\t\t\t\t\t\tvar businessUnitFieldName = \"inferredBUInterest\";\r\n\t\t\t\t\t\t\tif ($component.attr(\"data-BusinessUnitFieldName\").length > 0) {\r\n\t\t\t\t\t\t\t\tbusinessUnitFieldName = $component.attr(\"data-BusinessUnitFieldName\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($component.find(`input[name='${businessUnitFieldName}']`).length > 0) {\r\n\t\t\t\t\t\t\t\tif (response.productSuggestions[0].businessUnits && response.productSuggestions[0].businessUnits.length > 0) {\r\n\t\t\t\t\t\t\t\t\tvar value = \"\";\r\n\t\t\t\t\t\t\t\t\tif (response.productSuggestions[0].businessUnits.length = 1) {\r\n\t\t\t\t\t\t\t\t\t\tvalue = response.productSuggestions[0].businessUnits[0]\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tresponse.productSuggestions[0].businessUnits.forEach((d: any) => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvalue = value + d + \"; \";\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${businessUnitFieldName}']`).val(value);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$component.find(`input[name='${businessUnitFieldName}']`).val(\"\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: () => {\r\n\r\n\t\t\t\t},\r\n\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\tconsole.log(`marketo form, get product auto-suggest data error, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tshowDropdown($autoEle: JQuery, $fieldEle: JQuery) {\r\n\r\n\t\tconst currentTop = $fieldEle.closest('.mktoFormRow').position().top + $fieldEle.outerHeight();\r\n\t\tconst currentLeft = $fieldEle.closest('.mktoFormRow').position().left;\r\n\t\tconst currentWidth = $fieldEle.outerWidth();\r\n\r\n\t\t$autoEle.css({\r\n\t\t\t\"top\": `${currentTop}px`,\r\n\t\t\t\"left\": `${currentLeft}px`,\r\n\t\t\t\"width\": `${currentWidth}px`\r\n\t\t});\r\n\t\t$autoEle.show();\r\n\t}\r\n\r\n\tautoHideDropdown($component: JQuery, fieldName: string) {\r\n\r\n\t\t$component.find(`input[name='${fieldName}']`).on(\"click\", function (ev: any) {\r\n\t\t\tev.stopPropagation();\r\n\t\t});\r\n\r\n\t\t$('body').on('click', () => {\r\n\t\t\t$component.find(`.${classes.autoSuggestDropdown}`).removeAttr('style');\r\n\t\t\tlet uvpno = $component.find('.js-m-mkto-form-productname').attr(\"data-t-uvpno\")\r\n\t\t\tif (uvpno === undefined || uvpno === \"\") {\r\n\t\t\t\t$component.find('.js-m-mkto-form-productname').val('');\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","/**\r\n * This script toggles burger navigation\r\n */\r\n\r\nconst data = {\r\n\tnavLevel: 'data-level-open',\r\n};\r\n\r\n/**\r\n * updateNavLevel\r\n *\r\n * @param handler\r\n * @returns {void}\r\n */\r\nexport function updateNavLevel(nr: number = 1): void {\r\n\t$(`[${data.navLevel}]`).attr(`${data.navLevel}`, nr);\r\n}\r\n\r\n/**\r\n * Returns the current navigation Level\r\n */\r\nexport function getNavLevel(): number {\r\n\treturn parseInt($(`[${data.navLevel}]`).attr(`${data.navLevel}`));\r\n}\r\n\r\nexport default { getNavLevel, updateNavLevel };\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Cookies from 'js-cookie';\r\nimport { FavouritesAction } from '../../../molecules/favourites-action/js/favourites-action';\r\n\r\nconst classes = {\r\n\tstateBtnActive: \"state-m-favourite-button--active\",\r\n\tstateBtnLocked: \"state-m-favourite-button--locked\",\r\n\tstatePopupVisible: \"state-favourite-popup--visible\",\r\n\tstatePopupClose: \"state-favourite-popup--close\",\r\n\tstateValMsgVisible: \"state-field-validation-error--visible\",\r\n\tstateLoadingVisible: \"state-loading-wrapper--shown\",\r\n\tstateCountMax: \"state-textarea-count-max\",\r\n\r\n\tnoScrollingBar: \"no-scrolling--without-scrollbar\",\r\n\r\n\tfavouriteBtn: \"m-favourite-button\",\r\n\tdynamicPopupContainer: \"m-favourite-dynamic-popup-container\",\r\n\tstaticPopupContainer: \"m-favourite-static-popup-container\",\r\n\tsuccessPromptPopup: \"js-m-modal-actions-success-prompt\",\r\n\tfailurePromptPopup: \"js-m-modal-actions-failure-prompt\",\r\n\r\n\tloadingIndicator: \"m-favourite-button__loading-wrapper\",\r\n\r\n\tpopupContainer: \"m-modal-actions\",\r\n};\r\n\r\nconst productCompareClasses = {\r\n\tproductCompare: \"o-product-compare\",\r\n\tproductName: \"js-o-product-compare__productname\"\r\n}\r\n\r\nconst productFinderClasses = {\r\n\tselectedCountry: \"m-selected-filter-tags__country\",\r\n\ttagfilter: \"a-tag-filter \"\r\n}\r\n\r\nconst popupClasses = {\r\n\tpopupBox: \"js-m-modal-actions\",\r\n\ttextareaContainer: \"js-m-modal-actions-textarea-container\",\r\n\ttextareaBox: \"js-m-modal-actions__textarea\",\r\n\ttextareaValLength: \"js-m-modal-actions__textarea-count-length\",\r\n\ttextareaValLengthMax: \"js-m-modal-actions__textarea-count-max\",\r\n\r\n\tconfirmationBtn: \"js-m-modal-actions-confirmation\",\r\n\r\n\ttextcheckboxContainer: \"js-m-modal-actions-textcheckbox-container\",\r\n\ttextboxContainer: \"js-m-modal-actions-textbox-container\",\r\n\ttextboxGroup: \"m-modal-actions__new-list-input\",\r\n\ttextbox: \"js-m-modal-actions__newlist\",\r\n\r\n\tchecklistContainer: \"js-m-modal-actions-checklist-container\",\r\n\tallChecklistContainer: \"js-m-modal-actions-all-checklist-container\",\r\n\r\n\tinputValidationError: \"input-validation-error\",\r\n\tfieldValidationError: \"js-checklist-validation-error\",\r\n}\r\n\r\n@createModule('FavouriteButton')\r\n/**\r\n * FavouriteButton Component\r\n */\r\nexport class FavouriteButton extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$localFavouritesButton: any;\r\n\t$globalFavouritesButton: any;\r\n\t$dynamicPopupContainer: any;\r\n\t$staticPopupContainer: any;\r\n\t$successPopup: any;\r\n\t$failurePopup: any;\r\n\r\n\t$loadingIndicator: any;\r\n\r\n\tpageId: string;\r\n\ttemplateId: string;\r\n\tenableFavourite: boolean;\r\n\r\n\tstatusApiEndpoint: string;\r\n\tactionViewEndpoint: string;\r\n\r\n\t// the cookies-key of \"don't show this confirmation again\" message box\r\n\tconfirmationKey: string;\r\n\r\n\tfavorAction: any;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.confirmationKey = \"favor_confirmation\";\r\n\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.$localFavouritesButton = this.$ctx.find(`button.${classes.favouriteBtn}`);\r\n\r\n\t\t// for there may have multiple favourite button in a page, we use the global selector\r\n\t\tthis.$globalFavouritesButton = $(\"html\").find(`button.${classes.favouriteBtn}`);\r\n\r\n\t\tthis.$dynamicPopupContainer = this.$ctx.find(`.${classes.dynamicPopupContainer}`);\r\n\t\tthis.$staticPopupContainer = this.$ctx.find(`.${classes.staticPopupContainer}`);\r\n\r\n\t\tthis.$successPopup = this.$ctx.find(`.${classes.successPromptPopup}`);\r\n\t\tthis.$failurePopup = this.$ctx.find(`.${classes.failurePromptPopup}`);\r\n\r\n\t\tthis.$loadingIndicator = this.$ctx.find(`.${classes.loadingIndicator}`);\r\n\r\n\t\tthis.pageId = this.$ctx.data(\"page-id\");\r\n\t\tthis.enableFavourite = this.$ctx.data(\"enable-favourites\");\r\n\r\n\t\tthis.statusApiEndpoint = this.$ctx.data(\"status-api-endpoint\");\r\n\t\tthis.actionViewEndpoint = this.$ctx.data(\"action-view-endpoint\");\r\n\r\n\t\tthis.favorAction = new FavouritesAction();\r\n\r\n\t\tif (this.enableFavourite) {\r\n\t\t\tthis.updateStatus();\r\n\t\t}\r\n\t\t\r\n\t\tthis.$localFavouritesButton.on('click', (ev: any) => {\r\n\t\t\tconst $favorBtn = $(ev.currentTarget);\r\n\t\t\tlet actionType = \"\";\r\n\t\t\tif ($favorBtn.hasClass(classes.stateBtnActive)) {\r\n\t\t\t\tactionType = \"RemoveEntry\";\r\n\t\t\t} else {\r\n\t\t\t\tactionType = \"AddEntry\";\r\n\t\t\t}\r\n\t\t\tthis.getActionPartialView(actionType, this.pageId);\r\n\t\t});\r\n\r\n\t\tthis.$failurePopup.find(`.${classes.statePopupClose}`).on(\"click\", (event: any) => {\r\n\t\t\tconst $closeBtn = $(event.currentTarget);\r\n\t\t\tthis.closeStaticPopup($closeBtn);\r\n\t\t});\r\n\r\n\t\tthis.$successPopup.find(`.${classes.statePopupClose}`).on(\"click\", (ev: any) => {\r\n\t\t\tev.stopPropagation();\r\n\t\t\tthis.closeSuccessPopup();\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\r\n\tupdateStatus() {\r\n\t\tconst query = window.location.search.substr(1);\r\n\t\t$.ajax({\r\n\t\t\ttype: 'GET',\r\n\t\t\turl: this.statusApiEndpoint,\r\n\t\t\tdataType: 'json',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tpageid: this.pageId,\r\n\t\t\t\tquery: query\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tthis.updateFavouriteButton(response.isActive);\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`update status error, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tgetActionPartialView(actionType: string, id: string) {\r\n\t\tthis.lockScreen();\r\n\t\t$.ajax({\r\n\t\t\ttype: 'post',\r\n\t\t\turl: this.actionViewEndpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tactionType: actionType,\r\n\t\t\t\tpageId: id,\r\n\t\t\t\tCurrentUrl: window.location.href\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tthis.$dynamicPopupContainer.append(response);\r\n\t\t\t\tconst $popup = this.$dynamicPopupContainer.children();\r\n\r\n\t\t\t\tlet data = this.$dynamicPopupContainer.find(\"script[type='application/json']\");\r\n\t\t\t\tif (data.length > 0) {\r\n\t\t\t\t\tlet json = data[0].innerHTML;\r\n\t\t\t\t\tif (json.length > 0) {\r\n\r\n\t\t\t\t\t\tlet jsonData = JSON.parse(json);\r\n\r\n\t\t\t\t\t\t// if the page is only available on one list, won't show the popup\r\n\t\t\t\t\t\tif (jsonData.disablePopup) {\r\n\r\n\t\t\t\t\t\t\tthis.favorAction.removePopup($popup);\r\n\t\t\t\t\t\t\tthis.updateFavouriteButton(false);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.favorAction.displayPopup($popup);\r\n\t\t\t\tthis.favorAction.rebindCommonViewEvents($popup);\r\n\t\t\t\tthis.bindSubmitEvent($popup);\r\n\t\t\t\tthis.prefillTextareaBox();\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\tthis.unlockScreen();\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`get action-view error, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindSubmitEvent($popup: JQuery) {\r\n\r\n\t\t// bind submit button\r\n\t\t$popup.find(`.${popupClasses.confirmationBtn}`).on('click', (ev: any) => {\r\n\t\t\tif (this.favorAction.canSubmit($popup)) {\r\n\r\n\t\t\t\tconst $btn = $(ev.currentTarget);\r\n\r\n\t\t\t\tconst url = $popup.data(\"api-endpoint\");\r\n\t\t\t\tconst id = $popup.data(\"item-id\");\r\n\r\n\t\t\t\tconst textareaValue = $popup.find(\"textarea\").val();\r\n\r\n\t\t\t\tconst ids = this.favorAction.getCheckedListIds($popup);\r\n\r\n\t\t\t\tconst textboxValue = this.favorAction.getTextCheckBoxValue($popup);\r\n\r\n\t\t\t\tthis.favorAction.lockSubmitBtn($btn);\r\n\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: 'post',\r\n\t\t\t\t\turl: url,\r\n\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\tdata:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpageId: id,\r\n\t\t\t\t\t\tids: ids,\r\n\t\t\t\t\t\ttextareaInput: textareaValue,\r\n\t\t\t\t\t\ttextInput: textboxValue,\r\n\t\t\t\t\t\tcurrentUrl: window.location.href\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: (response: any) => {\r\n\t\t\t\t\t\tif (response.success) {\r\n\t\t\t\t\t\t\tthis.updateFavouriteButton(response.isActive);\r\n\t\t\t\t\t\t\tif (response.enablePrompt) {\r\n\t\t\t\t\t\t\t\tthis.showSuccessPopup();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.showStaticPopup(this.$failurePopup);\r\n\t\t\t\t\t\t\tconsole.log(response.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tthis.favorAction.removePopup($popup);\r\n\t\t\t\t\t\tthis.favorAction.unlockSubmitBtn($btn);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tlockScreen() {\r\n\t\tthis.$loadingIndicator.addClass(classes.stateLoadingVisible);\r\n\t}\r\n\r\n\tunlockScreen() {\r\n\t\tthis.$loadingIndicator.removeClass(classes.stateLoadingVisible);\r\n\r\n\t}\r\n\r\n\tupdateFavouriteButton(isActive: boolean) {\r\n\t\tif (isActive) {\r\n\t\t\tthis.$globalFavouritesButton.addClass(classes.stateBtnActive);\r\n\t\t} else {\r\n\t\t\tthis.$globalFavouritesButton.removeClass(classes.stateBtnActive);\r\n\t\t}\r\n\t}\r\n\r\n\tshowSuccessPopup() {\r\n\t\tlet confirmationCookie = Cookies.get(this.confirmationKey);\r\n\t\tif (!confirmationCookie) {\r\n\t\t\tthis.showStaticPopup(this.$successPopup);\r\n\t\t}\r\n\t}\r\n\r\n\tcloseSuccessPopup() {\r\n\t\tconst ckBox = this.$successPopup.find(\"input[type=checkbox]\").prop(\"checked\");\r\n\r\n\t\tif (ckBox) {\r\n\t\t\tCookies.set(this.confirmationKey, '1', { expires: 365 });\r\n\t\t\tconst curScrollTop = $(window).scrollTop();\r\n\r\n\t\t\t$(window).scrollTop(curScrollTop - 20);\r\n\t\t\t$('.m-navigation-meta__tooltip-favourite').fadeIn();\r\n\r\n\t\t}\r\n\r\n\t\tthis.$successPopup.removeClass(classes.statePopupVisible);\r\n\t}\r\n\r\n\tshowStaticPopup($container: any) {\r\n\t\t$container.addClass(classes.statePopupVisible);\r\n\t}\r\n\r\n\tcloseStaticPopup($closeBtn: any) {\r\n\t\t$closeBtn.parents(`.${classes.popupContainer}`).removeClass(classes.statePopupVisible);\r\n\t}\r\n\r\n\tprefillTextareaBox() {\r\n\r\n\t\tconst $descInputBox = this.$dynamicPopupContainer.find(`.${popupClasses.textareaBox}`);\r\n\r\n\t\tif ($descInputBox.length > 0) {\r\n\r\n\t\t\tlet descVal = \"\";\r\n\r\n\t\t\tconst $productCompareNameEles = $(\"html\").find(`.${productCompareClasses.productCompare}`).find(`.${productCompareClasses.productName}`);\r\n\r\n\t\t\tconst $productFinderSelectedCountry = $(\"html\").find(`.${productFinderClasses.selectedCountry}`).find(\"span\");\r\n\t\t\tconst $productFinderNameEles = $(\"html\").find(\"cov-tag-filter\").find(`button.${productFinderClasses.tagfilter}`);\r\n\r\n\t\t\tif ($productCompareNameEles.length > 0) {\r\n\t\t\t\tdescVal = this.getElementsText($productCompareNameEles);\r\n\r\n\t\t\t} else if ($productFinderSelectedCountry.length > 0 || $productFinderNameEles.length > 0) {\r\n\r\n\t\t\t\tdescVal = $productFinderSelectedCountry.text();\r\n\t\t\t\tconst filterTxt = this.getElementsText($productFinderNameEles);\r\n\r\n\t\t\t\tif (filterTxt.length > 0) {\r\n\t\t\t\t\tdescVal = `${descVal} - ${filterTxt}`\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tdescVal = this.getPageTitle();\r\n\t\t\t}\r\n\r\n\t\t\t$descInputBox.val(descVal);\r\n\r\n\t\t\t$descInputBox.focus();\r\n\r\n\t\t\tthis.favorAction.countTextarea($descInputBox);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tgetPageTitle(): string {\r\n\t\tconst docTitle = document.title;\r\n\r\n\t\tlet result = \"\";\r\n\r\n\t\tif (docTitle.indexOf(\"|\") != -1) {\r\n\t\t\tconst title = docTitle.split(\"|\");\r\n\t\t\tresult = title[0].trim();\r\n\t\t} else {\r\n\t\t\tresult = docTitle;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tgetElementsText($nameEles: any): string {\r\n\t\tlet result = \"\";\r\n\r\n\t\tconst nameArr = new Array();\r\n\t\t$nameEles.each((i: any, e: any) => {\r\n\t\t\tconst value = $(e).text().trim();\r\n\t\t\tif (typeof (value) != \"undefined\") {\r\n\t\t\t\tnameArr.push(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tresult = nameArr.join(\" - \");\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tgetActionPartialViewForEventList(actionType: string,ev: any) {\r\n\t\tconst $favorBtn = $(ev.currentTarget);\r\n\t\tvar favorAction = new FavouritesAction();\r\n\t\tvar favoriteCtx=$favorBtn.closest(\"div[data-t-name='FavouriteButton']\");\r\n\t\tvar pageid=favoriteCtx.attr(\"data-page-id\");\r\n\t\tvar actionViewEndpoint=favoriteCtx.attr(\"data-action-view-endpoint\");\r\n\t\t$favorBtn.siblings(`.${classes.loadingIndicator}`).addClass(classes.stateLoadingVisible);\r\n\t\t$.ajax({\r\n\t\t\ttype: 'post',\r\n\t\t\turl:actionViewEndpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tactionType: actionType,\r\n\t\t\t\tpageId: pageid,\r\n\t\t\t\tCurrentUrl: window.location.href\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\t$favorBtn.siblings((`.${classes.dynamicPopupContainer}`)).append(response);\r\n\t\t\t\tconst $popup = $favorBtn.siblings((`.${classes.dynamicPopupContainer}`)).children();\r\n\t\t\t\tconst $staicPopup=$favorBtn.siblings((`.${classes.staticPopupContainer}`));\r\n\t\t\t\tlet data =$favorBtn.siblings((`.${classes.dynamicPopupContainer}`)).find(\"script[type='application/json']\");\r\n\t\t\t\tif (data.length > 0) {\r\n\t\t\t\t\tlet json = data[0].innerHTML;\r\n\t\t\t\t\tif (json.length > 0) {\r\n\r\n\t\t\t\t\t\tlet jsonData = JSON.parse(json);\r\n\r\n\t\t\t\t\t\t// if the page is only available on one list, won't show the popup\r\n\t\t\t\t\t\tif (jsonData.disablePopup) {\r\n\r\n\t\t\t\t\t\t\tfavorAction.removePopup($popup);\r\n\t\t\t\t\t\t\t$favorBtn.removeClass(classes.stateBtnActive);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfavorAction.displayPopup($popup);\r\n\t\t\t\tfavorAction.rebindCommonViewEvents($popup);\r\n\t\t\t\tthis.bindSubmitEventForEventList($popup,$staicPopup,$favorBtn);\r\n\t\t\t\tthis.prefillTextareaBoxForEventList($popup);\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\t$favorBtn.siblings(`.${classes.loadingIndicator}`).removeClass(classes.stateLoadingVisible);\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`get action-view error, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindSubmitEventForEventList($popup: JQuery,$staicPopup: JQuery,$button: any) {\r\n\r\n\t\t// bind submit button\r\n\t\tvar favorAction = new FavouritesAction();\r\n\t\t$popup.find(`.${popupClasses.confirmationBtn}`).on('click', (ev: any) => {\r\n\t\t\tif (favorAction.canSubmit($popup)) {\r\n\r\n\t\t\t\tconst $btn = $(ev.currentTarget);\r\n\r\n\t\t\t\tconst url = $popup.data(\"api-endpoint\");\r\n\t\t\t\tconst id = $popup.data(\"item-id\");\r\n\r\n\t\t\t\tconst textareaValue = $popup.find(\"textarea\").val();\r\n\r\n\t\t\t\tconst ids = favorAction.getCheckedListIds($popup);\r\n\r\n\t\t\t\tconst textboxValue = favorAction.getTextCheckBoxValue($popup);\r\n\r\n\t\t\t\tfavorAction.lockSubmitBtn($btn);\r\n\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: 'post',\r\n\t\t\t\t\turl: url,\r\n\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\tdata:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpageId: id,\r\n\t\t\t\t\t\tids: ids,\r\n\t\t\t\t\t\ttextareaInput: textareaValue,\r\n\t\t\t\t\t\ttextInput: textboxValue,\r\n\t\t\t\t\t\tcurrentUrl: window.location.href\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: (response: any) => {\r\n\t\t\t\t\t\tif (response.success) {\r\n\t\t\t\t\t\t\tif (response.isActive) {\r\n\t\t\t\t\t\t\t\t$button.addClass(classes.stateBtnActive);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$button.removeClass(classes.stateBtnActive);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (response.enablePrompt) {\r\n\t\t\t\t\t\t\t\tlet confirmationCookie = Cookies.get(\"favor_confirmation\");\r\n\t\t\t\t\t\t\tif (!confirmationCookie) {\r\n\t\t\t\t\t\t\t\tvar $successPopup=$staicPopup.find(`.${classes.successPromptPopup}`);\r\n\t\t\t\t\t\t\t\t$successPopup.addClass(classes.statePopupVisible);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$successPopup.find(`.${classes.statePopupClose}`).on(\"click\", (ev: any) => {\r\n\t\t\t\t\t\t\t\t\tev.stopPropagation();\r\n\t\t\t\t\t\t\t\t\tconst ckBox = $successPopup.find(\"input[type=checkbox]\").prop(\"checked\");\r\n\r\n\t\t\t\t\t\t\t\t\tif (ckBox) {\r\n\t\t\t\t\t\t\t\t\t\tCookies.set(this.confirmationKey, '1', { expires: 365 });\r\n\t\t\t\t\t\t\t\t\t\tconst curScrollTop = $(window).scrollTop();\r\n\r\n\t\t\t\t\t\t\t\t\t\t$(window).scrollTop(curScrollTop - 20);\r\n\t\t\t\t\t\t\t\t\t\t$('.m-navigation-meta__tooltip-favourite').fadeIn();\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$successPopup.removeClass(classes.statePopupVisible);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tvar $failurePopup=$staicPopup.find(`.${classes.failurePromptPopup}`);\r\n\t\t\t\t\t\t\t$failurePopup.addClass(classes.statePopupVisible);\r\n\t\t\t\t\t\t\t$failurePopup.find(`.${classes.statePopupClose}`).on(\"click\", (event: any) => {\r\n\t\t\t\t\t\t\t\t$failurePopup.removeClass(classes.statePopupVisible);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tconsole.log(response.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tfavorAction.removePopup($popup);\r\n\t\t\t\t\t\tfavorAction.unlockSubmitBtn($btn);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tupdateStatusForEventList(ev: any) {\r\n\t\tconst query = window.location.search.substr(1);\r\n\t\tconst $favorBtn = $(ev);\r\n\t\tvar favoriteCtx=$favorBtn.closest(\"div[data-t-name='FavouriteButton']\");\r\n\t\tvar pageid=favoriteCtx.attr(\"data-page-id\");\r\n\t\tvar statusEndpoint=favoriteCtx.attr(\"data-status-api-endpoint\");\r\n\t\t$.ajax({\r\n\t\t\ttype: 'GET',\r\n\t\t\turl: statusEndpoint,\r\n\t\t\tdataType: 'json',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tpageid: pageid,\r\n\t\t\t\tquery: query\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response.isActive) {\r\n\t\t\t\t\t$favorBtn.addClass(classes.stateBtnActive);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$favorBtn.removeClass(classes.stateBtnActive);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`update status error, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprefillTextareaBoxForEventList($popup: JQuery) {\r\n\r\n\t\tconst $descInputBox = $popup.find(`.${popupClasses.textareaBox}`);\r\n\r\n\t\tif ($descInputBox.length > 0) {\r\n\t\t\t$descInputBox.focus();\r\n\t\t\tvar favorAction=new FavouritesAction();\r\n\t\t\tfavorAction.countTextarea($descInputBox);\r\n\t\t}\r\n\r\n\t}\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nexport const classes = {\r\n\tfilter: 'm-event-list__filter',\r\n\tfilterLabel: 'js-event-list__filter-label',\r\n\tfilterOpen: 'm-event-list__filter--open',\r\n\tfilterClose: 'js-event-list__filter--close',\r\n\tfilterTags: 'm-event-list__filter-tags',\r\n\tfilterTag: 'm-event-list__filter-tag',\r\n\tfilterTagContainer: 'm-event-list__filter-tags-container',\r\n\tcounterLabel: 'm-event-list__counter-label',\r\n\tcounterHeading: 'js-event-list_counter-heading',\r\n\tfilterSelect: 'm-event-list__select',\r\n\tclearFilterBtn: 'm-event-list__clear-filter',\r\n\tloadMoreBtn: 'js-load-more-button',\r\n\tteaserContainer: 'm-event-list__teaser-list',\r\n\tstateHidden: 'h-visuallyhidden',\r\n\tteaserBlock:'m-teaser-event',\r\n\tteaserColorBlock:'m-teaser-event__text-area',\r\n\r\n\ttwoLevelmainItemLink: 'js-m-filter-two-level-multiselect__item-link--main',\r\n\r\n\ttwoLevelSelector: 'm-filter-two-level-multiselect',\r\n\ttwoLevelList: 'm-filter-two-level-multiselect__list-level1',\r\n\ttwoLevelListOpen: 'm-filter-two-level-multiselect__list-level1--open',\r\n\r\n\ttwoLevelMainChecked: 'm-filter-two-level-multiselect__item-link--main-checked',\r\n\r\n\ttwoLevelParent: 'js-m-filter-two-level-multiselect__item--level2',\r\n\ttwoLevelParentHeader: 'js-m-filter-two-level-multiselect__layer-header-level3',\r\n\ttwoLevelParentLink: 'js-m-filter-two-level-multiselect__item-link',\r\n\ttwoLevelParentChecked: 'm-filter-two-level-multiselect__item-link--parent-checked',\r\n\ttwoLevelParentDisabled: 'm-filter-two-level-multiselect__item-link--parent-disabled',\r\n\r\n\t// ul\r\n\ttwoLevelChildList: 'js-m-filter-two-level-multiselect__list-level3',\r\n\t// li\r\n\ttwoLevelChild: 'js-m-filter-two-level-multiselect__item--level3',\r\n\ttwoLevelChildDisabled: 'm-filter-two-level-multiselect__item--child-disabled',\r\n\ttwoLevelChildInputDisabled: 'a-input-checkbox--disabled',\r\n\r\n\ttwoLevelMainClose: 'm-filter-two-level-multiselect__item-link--main-mobile-close-icon',\r\n\r\n\toneLevelSelector: 'm-filter-multiselect',\r\n\toneLevelItemContainer: 'm-filter-multiselect__list-level2',\r\n\toneLevelList: 'm-filter-multiselect__item--level1',\r\n\toneLevelListOpen: 'm-filter-multiselect__item--level1-open',\r\n\toneLevelMain: 'js-m-filter-multiselect__item-link--main',\r\n\toneLevelMainChecked: 'm-filter-multiselect__item-link--main-checked',\r\n\toneLevelDisabled: 'a-input-checkbox--disabled',\r\n\toneLevel: 'js-m-filter-multiselect__item--level2',\r\n\toneLevelClose: 's-filter-multiselect__item-link--main-close-icon'\r\n}\r\n\r\nconst placeholders = {\r\n\tdisplayNumber: \"{displaynumber}\",\r\n\ttotalNumber: \"{totalnumber}\"\r\n}\r\n\r\nconst names = {\r\n\tdateSelector: 'EventList-Date',\r\n\tregionSelector: 'EventList-Region',\r\n\tmaterialSelector: 'EventList-Material',\r\n\tindustrySelector: 'EventList-Industry'\r\n}\r\n\r\nconst parameterSet = {\r\n\tmaterial: 'material',\r\n\tindustry: 'industry',\r\n\tdate: 'date',\r\n\tregion: 'region'\r\n}\r\n\r\n@createModule('EventList')\r\n/**\r\n * event-list module implementation.\r\n *\r\n * @author Sandy Zhao \r\n */\r\nexport class EventList extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.$ctx.find(`.${classes.filterLabel}`).on('click', this.onOpenFilter.bind(this));\r\n\r\n\t\tthis.$ctx.find(`.${classes.filterClose}, .${classes.twoLevelMainClose},.${classes.oneLevelClose}`)\r\n\t\t\t.on('click', this.onCloseFilter.bind(this));\r\n\r\n\t\tthis.$ctx.on('FilterTwoLevelMultiCheckboxChanged',\r\n\t\t\t(event: any, clickEvent: Event) => {\r\n\t\t\t\tthis.dataChanged(clickEvent);\r\n\t\t\t});\r\n\r\n\t\tthis.$ctx.on('FilterMultiCheckboxChanged',\r\n\t\t\t(event: any, clickEvent: Event) => {\r\n\t\t\t\tthis.dataChanged(clickEvent);\r\n\t\t\t});\r\n\r\n\t\tthis.$ctx.find(\"input[type='checkbox']\").on(\"click\", () => false);\r\n\r\n\t\t$(document).on(\"click\", `.${classes.filterTag}`, this.removeSelectedTag.bind(this));\r\n\r\n\t\tthis.$ctx.find(`.${classes.clearFilterBtn}`).on(\"click\", this.clearAllFilters.bind(this));\r\n\r\n\t\tthis.$ctx.find(`.${classes.loadMoreBtn}`).on(\"click\", this.loadMore.bind(this));\r\n\r\n\t\tthis.initTeaserData();\r\n\r\n\t\t$(window).resize(function () {\r\n\t\t\tconst $teaserTextAreas = $(`.${classes.teaserColorBlock}`);\r\n\r\n\t\t\t$teaserTextAreas.each((i, e) => {\r\n\t\t\t\tconst $textArea = $(e);\r\n\t\t\t\tconst height = $textArea.height();\r\n\t\t\t\t$textArea.closest(`.${classes.teaserBlock}`).css(\"min-height\", height + 88);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitTeaserData() {\r\n\r\n\t\t//get url query string ids, for pre-check\r\n\t\tconst dateParaValue = this.getIdParameterValueFromUrl(parameterSet.date);\r\n\r\n\t\tconst regionIdParaValue = this.getIdParameterValueFromUrl(parameterSet.region);\r\n\r\n\t\tconst materialIdParaValue = this.getIdParameterValueFromUrl(parameterSet.material);\r\n\r\n\t\tconst industryIdParaValue = this.getIdParameterValueFromUrl(parameterSet.industry);\r\n\r\n\t\tthis.getTeaserData(1, dateParaValue, regionIdParaValue, materialIdParaValue, industryIdParaValue);\r\n\t}\r\n\r\n\tdataChanged(event: Event) {\r\n\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\r\n\t\tthis.$ctx.find(`.${classes.teaserContainer}`).empty();\r\n\r\n\t\tconst materialQuery = this.getIdParameterValue(names.materialSelector);\r\n\t\tconst industryQuery = this.getIdParameterValue(names.industrySelector);\r\n\t\tconst dateQuery = this.getIdParameterValue(names.dateSelector);\r\n\t\tconst regionQuery = this.getIdParameterValue(names.regionSelector);\r\n\r\n\t\tthis.getTeaserData(1, dateQuery, regionQuery, materialQuery, industryQuery);\r\n\r\n\t}\r\n\r\n\tgetTeaserData(pageNumber: number,\r\n\t\tdateQuery?: string,\r\n\t\tregionQuery?: string,\r\n\t\tmaterialQuery?: string,\r\n\t\tindustryQuery?: string) {\r\n\r\n\t\tthis.lockFilters();\r\n\t\tthis.lockLoadMoreButton();\r\n\t\tconst searchRootId = this.$ctx.data(\"search-root\");\r\n\t\tconst initNum = this.$ctx.data(\"init-number\");\r\n\t\tconst apiEndpoint = this.$ctx.data(\"api-endpoint\");\r\n\t\tconst pageSize = this.$ctx.data(\"page-size\");\r\n\t\tconst configuration = this.$ctx.data(\"configuration\");\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'POST',\r\n\t\t\turl: apiEndpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tdateQuery: dateQuery,\r\n\t\t\t\tregionQuery: regionQuery,\r\n\t\t\t\tmaterialQuery: materialQuery,\r\n\t\t\t\tindustryQuery: industryQuery,\r\n\t\t\t\tsearchRootId: searchRootId,\r\n\t\t\t\tpageSize: pageSize,\r\n\t\t\t\tpageNumber: pageNumber,\r\n\t\t\t\tinitNumber: initNum,\r\n\t\t\t\tConfiguration: configuration\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tconsole.log(\"success\");\r\n\t\t\t\t// ⚠\r\n\t\t\t\t// Add the response HTML to the bottom of the container - for now.\r\n\t\t\t\t// Additional logic will need to be added to decide whether it needs to be\r\n\t\t\t\t// added (in case of 'load more') or completely replaced instead.\r\n\t\t\t\t// ⚠\r\n\t\t\t\tlet container = this.$ctx.find(`.${classes.teaserContainer}`);\r\n\t\t\t\tcontainer.append(response);\r\n\t\t\t\t// Look for a script tag containing extra data.\r\n\t\t\t\tlet data = container.find(\"script[type='application/json']\");\r\n\t\t\t\tif (data.length > 0) {\r\n\t\t\t\t\tlet json = data[0].innerHTML;\r\n\t\t\t\t\tlet jsonData = JSON.parse(json);\r\n\r\n\t\t\t\t\tif (jsonData.totalNumber > 0) {\r\n\t\t\t\t\t\tthis.updateCounterLabel(jsonData.displayNumber, jsonData.totalNumber);\r\n\t\t\t\t\t\tthis.updateCounterHeading(jsonData.totalNumber);\r\n\t\t\t\t\t\tthis.updateLoadMoreButton(jsonData.enableLoadMore);\r\n\t\t\t\t\t\tthis.updatePageNumber(jsonData.pageNumber + 1);\r\n\t\t\t\t\t\tthis.updateFacet(jsonData.enabledFilterItems);\r\n\t\t\t\t\t\tthis.updateTeaserHeight();\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.updateNoResult();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove the script tag.\r\n\t\t\t\t\tdata.remove();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.updateNoResult();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\tthis.unlockFilters();\r\n\t\t\t\tthis.generateSelectedTags();\r\n\t\t\t\tthis.updateUrl();\r\n\t\t\t},\r\n\t\t\terror: () => {\r\n\t\t\t\tconsole.log(\"get teaser data error\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tupdateTeaserHeight() {\r\n\t\tconst $teaserTextAreas = this.$ctx.find(`.${classes.teaserColorBlock}`);\r\n\r\n\t\t$teaserTextAreas.each((i, e) => {\r\n\t\t\tconst $textArea = $(e);\r\n\t\t\tconst height = $textArea.height();\r\n\t\t\t$textArea.closest(`.${classes.teaserBlock}`).css(\"min-height\", height + 88);\r\n\t\t});\r\n\t}\r\n\r\n\tupdateUrl() {\r\n\t\tlet parameterList = new Array();\r\n\r\n\t\tconst dateParameter = this.getUniqueNameParameter(names.dateSelector, parameterSet.date);\r\n\t\tif (dateParameter.length > 0) {\r\n\t\t\tparameterList.push(dateParameter);\r\n\t\t}\r\n\r\n\t\tconst regionParameter = this.getUniqueNameParameter(names.regionSelector, parameterSet.region);\r\n\t\tif (regionParameter.length > 0) {\r\n\t\t\tparameterList.push(regionParameter);\r\n\t\t}\r\n\r\n\t\tconst materialParameter = this.getUniqueNameParameter(names.materialSelector, parameterSet.material);\r\n\t\tif (materialParameter.length > 0) {\r\n\t\t\tparameterList.push(materialParameter);\r\n\t\t}\r\n\r\n\t\tconst industryParameter = this.getUniqueNameParameter(names.industrySelector, parameterSet.industry);\r\n\t\tif (industryParameter.length > 0) {\r\n\t\t\tparameterList.push(industryParameter);\r\n\t\t}\r\n\r\n\t\tconst searchQuery = this.generateUniqueNameQueryString(parameterList);\r\n\r\n\t\tif (searchQuery.length > 0) {\r\n\t\t\thistory.pushState(null, null, searchQuery);\r\n\t\t} else {\r\n\t\t\thistory.pushState(null, null, \"?\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tgenerateSelectedTags() {\r\n\r\n\t\tconst $tagContainer = this.$ctx.find(`.${classes.filterTagContainer}`);\r\n\t\t$tagContainer.empty();\r\n\r\n\t\t//Two-Level Selector: if all child-item are ticked, show the parent-item tag\r\n\t\tconst $twoLevelParents = this.$ctx.find(`.${classes.twoLevelSelector}`).find(`.${classes.twoLevelParent}`);\r\n\r\n\t\t$twoLevelParents.each((i, e) => {\r\n\t\t\tconst selectorName = $(e).closest(`.${classes.filterSelect}`).attr(\"name\");\r\n\t\t\tlet $checkboxes = $(e).find(`.${classes.twoLevelChild}`).find(\"input[type='checkbox']\");\r\n\r\n\t\t\tif ($checkboxes.length > 0 && this.areAllSubFiltersChecked($checkboxes)) {\r\n\t\t\t\tlet $parentSelectedOption =\r\n\t\t\t\t\t$(e).find(`.${classes.twoLevelParentHeader}`).find(\"input[type='checkbox']\");\r\n\t\t\t\tconst tagHtml = this.getSelectedTagHtml($parentSelectedOption);\r\n\t\t\t\t$tagContainer.append(tagHtml);\r\n\t\t\t} else {\r\n\t\t\t\tlet $checkedboxes = $(e).find(`.${classes.twoLevelChild}`).find(\"input[type='checkbox']:checked\");\r\n\t\t\t\tif ($checkedboxes.length > 0) {\r\n\t\t\t\t\t$checkedboxes.each((childIndex, childEle) => {\r\n\t\t\t\t\t\tlet tagHtml: string;\r\n\t\t\t\t\t\t//if the selector is date-selector, add the \"year\" \r\n\t\t\t\t\t\tif (selectorName === names.dateSelector) {\r\n\t\t\t\t\t\t\ttagHtml = this.getSelectedDateMonthTagHtml($(childEle));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttagHtml = this.getSelectedTagHtml($(childEle));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$tagContainer.append(tagHtml);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\r\n\t\t//One-Level Selector\r\n\t\tconst $oneLevelSelectedOptions = this.$ctx.find(`.${classes.oneLevelSelector}`).find(\"input:checked\");\r\n\r\n\t\t$oneLevelSelectedOptions.each((oneLevelIndex, oneLevelEle) => {\r\n\t\t\tconst tagHtml = this.getSelectedTagHtml($(oneLevelEle));\r\n\t\t\t$tagContainer.append(tagHtml);\r\n\t\t});\r\n\r\n\t\tif ($tagContainer.html().length > 0) {\r\n\t\t\tthis.$ctx.find(`.${classes.filterTags}`).show();\r\n\t\t} else {\r\n\t\t\tthis.$ctx.find(`.${classes.filterTags}`).hide();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tremoveSelectedTag(event: Event) {\r\n\t\tconst $currentTargetElement = $(event.currentTarget);\r\n\r\n\t\tconst id = $currentTargetElement.find(\"span\").attr(\"data-selected-id\");\r\n\r\n\t\tthis.$ctx.find(`input[data-sc-id='${id}']`).parent().parent().triggerHandler(\"click\");\r\n\r\n\t\t$currentTargetElement.remove();\r\n\t}\r\n\r\n\tclearAllFilters() {\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(\"input\").prop('checked', false);\r\n\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(`.${classes.twoLevelMainChecked}`)\r\n\t\t\t.removeClass(`${classes.twoLevelMainChecked}`);\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(`.${classes.twoLevelParentChecked}`)\r\n\t\t\t.removeClass(`${classes.twoLevelParentChecked}`);\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(`.${classes.oneLevelMainChecked}`)\r\n\t\t\t.removeClass(`${classes.oneLevelMainChecked}`);\r\n\r\n\t\tthis.$ctx.find(`.${classes.filterTagContainer}`).empty();\r\n\t\tthis.$ctx.find(`.${classes.filterTags}`).hide();\r\n\t\tthis.$ctx.find(`.${classes.teaserContainer}`).empty();\r\n\r\n\t\tthis.getTeaserData(1);\r\n\t}\r\n\r\n\tloadMore() {\r\n\t\tconst pageNum = this.$ctx.data(\"page-number\");\r\n\r\n\t\tconst materialQuery = this.getIdParameterValue(names.materialSelector);\r\n\t\tconst industryQuery = this.getIdParameterValue(names.industrySelector);\r\n\t\tconst dateQuery = this.getIdParameterValue(names.dateSelector);\r\n\t\tconst regionQuery = this.getIdParameterValue(names.regionSelector);\r\n\r\n\t\tthis.getTeaserData(pageNum, dateQuery, regionQuery, materialQuery, industryQuery);\r\n\t}\r\n\r\n\tlockLoadMoreButton() {\r\n\t\tthis.$ctx.find(`.${classes.loadMoreBtn}`).addClass(`${classes.stateHidden}`);\r\n\t}\r\n\r\n\tunlockLoadMoreButton() {\r\n\t\tthis.$ctx.find(`.${classes.loadMoreBtn}`).removeClass(`${classes.stateHidden}`);\r\n\t}\r\n\r\n\tlockFilters() {\r\n\t\tthis.$ctx.find(`.${classes.oneLevelItemContainer}`).css(\"pointer-events\", \"none\");\r\n\t\tthis.$ctx.find(`.${classes.twoLevelParentHeader}`).css(\"pointer-events\", \"none\");\r\n\t\tthis.$ctx.find(`.${classes.twoLevelChildList}`).css(\"pointer-events\", \"none\");\r\n\t\tthis.$ctx.find(`.${classes.filterTags}`).css(\"pointer-events\", \"none\");\r\n\t}\r\n\r\n\tunlockFilters() {\r\n\t\tthis.$ctx.find(`.${classes.oneLevelItemContainer}`).css(\"pointer-events\", \"auto\");\r\n\t\tthis.$ctx.find(`.${classes.twoLevelParentHeader}`).css(\"pointer-events\", \"auto\");\r\n\t\tthis.$ctx.find(`.${classes.twoLevelChildList}`).css(\"pointer-events\", \"auto\");\r\n\t\tthis.$ctx.find(`.${classes.filterTags}`).css(\"pointer-events\", \"auto\");\r\n\t}\r\n\r\n\tupdateCounterLabel(displayNum: number, totalNumber: number) {\r\n\t\tconst text = this.$ctx.data(\"counter-label\")\r\n\t\t\t.replace(`${placeholders.displayNumber}`, displayNum.toString())\r\n\t\t\t.replace(`${placeholders.totalNumber}`, totalNumber.toString());\r\n\t\tthis.$ctx.find(`.${classes.counterLabel}`).show().text(text);\r\n\t}\r\n\r\n\tupdateCounterHeading(displayNum: number) {\r\n\t\tconst text = this.$ctx.data(\"counter-heading\")\r\n\t\t\t.replace(`${placeholders.displayNumber}`, displayNum.toString());\r\n\t\tthis.$ctx.find(`.${classes.counterHeading}`).text(text);\r\n\t}\r\n\r\n\tupdateLoadMoreButton(enable: boolean) {\r\n\t\tif (enable) {\r\n\t\t\tthis.unlockLoadMoreButton();\r\n\t\t} else {\r\n\t\t\tthis.lockLoadMoreButton();\r\n\t\t}\r\n\t}\r\n\r\n\tupdatePageNumber(pageNumber: number) {\r\n\t\tthis.$ctx.data(\"page-number\", pageNumber);\r\n\t}\r\n\r\n\tupdateFacet(enabledFilterItems: string[]) {\r\n\r\n\t\t// foreach all the checkboxes include the first-level and second-level,\r\n\t\t// but the \"enabledFilterItems\" only contain second-level items\r\n\t\tlet $checkboxes = this.$ctx.find(`.${classes.filterSelect} input[type=checkbox]`);\r\n\t\t$checkboxes.each((i, e) => {\r\n\t\t\tconst currentId = $(e).data(\"sc-id\");\r\n\t\t\tconst isEnabled = enabledFilterItems.indexOf(currentId) > -1;\r\n\t\t\t$(e).prop(\"disabled\", !isEnabled);\r\n\t\t});\r\n\r\n\t\t// after set the \"disabled\" property of second-level items, update first-level\r\n\t\tthis.setTwoLevelFilterDisabledClass();\r\n\r\n\t\t// update these items who are \"disabled\" and \"checked\"\r\n\t\tconst $ele = this.$ctx.find(`.${classes.filterSelect} input[type='checkbox']:checked:disabled`);\r\n\t\t$ele.prop(\"disabled\", false);\r\n\t\t$ele.closest(`.${classes.twoLevelChild}`).removeClass(classes.twoLevelChildDisabled);\r\n\r\n\t}\r\n\r\n\tupdateNoResult() {\r\n\t\tconst text = this.$ctx.data(\"no-result\");\r\n\t\tthis.$ctx.find(`.${classes.counterHeading}`).text(text);\r\n\t\tthis.$ctx.find(`.${classes.counterLabel}`).hide();\r\n\t\tthis.lockLoadMoreButton();\r\n\t}\r\n\r\n\r\n\tgetIdParameterValue(selector: string) {\r\n\r\n\t\tconst $ids = this.$ctx.find(`div[name='${selector}'] input:checked`);\r\n\r\n\t\tconst arr = new Array();\r\n\r\n\t\t$ids.each((i, e) => {\r\n\t\t\tconst value = $(e).data(\"sc-id\");\r\n\t\t\tif (typeof (value) != \"undefined\") {\r\n\t\t\t\tarr.push(value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst values = arr.join(\",\");\r\n\t\treturn values;\r\n\t}\r\n\r\n\tgetUniqueNameParameter(selector: string, parameterName: string) {\r\n\r\n\t\tlet parameter: string = \"\";\r\n\r\n\t\tconst $selectorInput = this.$ctx.find(`div[name=${selector}]`).find(\"input[type=checkbox]:checked\");\r\n\t\tconst nameArr = new Array();\r\n\r\n\t\t$selectorInput.each((i, e) => {\r\n\r\n\t\t\tvar uniqueName = $(e).data(\"unique-name\");\r\n\r\n\t\t\tif (typeof (uniqueName) != \"undefined\") {\r\n\t\t\t\tnameArr.push(uniqueName);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (nameArr.length > 0) {\r\n\t\t\tconst parameterValue = nameArr.join(\",\");\r\n\t\t\tparameter = `${parameterName}=${parameterValue}`;\r\n\t\t}\r\n\r\n\t\treturn parameter;\r\n\t}\r\n\r\n\tgetIdParameterValueFromUrl(parameterName: string) {\r\n\r\n\t\tconst query = window.location.search.substring(1);\r\n\r\n\t\tconst vars = query.split(\"&\");\r\n\r\n\t\tfor (let i = 0; i < vars.length; i++) {\r\n\t\t\tconst pair = vars[i].split(\"=\");\r\n\t\t\tif (pair[0] === parameterName) {\r\n\t\t\t\tconst uniqueNameVariables = decodeURI(pair[1]).split(\",\");\r\n\r\n\t\t\t\tlet valueArr = new Array();\r\n\r\n\t\t\t\tfor (let j = 0; j < uniqueNameVariables.length; j++) {\r\n\t\t\t\t\tconst searchId = this.getIdByUniqueName(uniqueNameVariables[j]);\r\n\r\n\t\t\t\t\tif (searchId.length > 0) {\r\n\t\t\t\t\t\tvalueArr.push(searchId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst idVariable = valueArr.join(\",\");\r\n\r\n\t\t\t\treturn idVariable;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tgetIdByUniqueName(uniqueName: string) {\r\n\r\n\t\tconst $item = this.$ctx.find(`input[type=checkbox][data-unique-name='${uniqueName}']`);\r\n\r\n\t\tif ($item.length > 0) {\r\n\t\t\treturn $item.data(\"sc-id\");\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tgenerateUniqueNameQueryString(parameters: string[]) {\r\n\r\n\t\tlet searchQuery = \"\";\r\n\r\n\t\tfor (let i = 0; i < parameters.length; i++) {\r\n\t\t\tif (parameters[i].length > 0) {\r\n\r\n\t\t\t\tsearchQuery += parameters[i];\r\n\t\t\t\tif (i !== parameters.length - 1) {\r\n\t\t\t\t\tsearchQuery += \"&\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (searchQuery.length > 0) {\r\n\t\t\tsearchQuery = `?${searchQuery}`;\r\n\t\t}\r\n\r\n\t\treturn searchQuery;\r\n\t}\r\n\r\n\tareAllSubFiltersChecked($checkboxes: JQuery): boolean {\r\n\t\treturn $checkboxes.toArray().every(this.isElementChecked);\r\n\t}\r\n\r\n\tisElementChecked(element: HTMLInputElement): any {\r\n\t\treturn element.checked;\r\n\t}\r\n\r\n\tgetSelectedTagHtml($inputItem: JQuery) {\r\n\t\tconst name = $inputItem.siblings(\"label\").text();\r\n\t\tconst id = $inputItem.data(\"sc-id\");\r\n\t\tconst template = this.getTagHtml(id, name);\r\n\t\treturn template;\r\n\t}\r\n\r\n\tgetSelectedDateMonthTagHtml($inputItem: JQuery) {\r\n\t\tconst year = $inputItem.parents(`.${classes.twoLevelParent}`).find(`.${classes.twoLevelParentHeader}`)\r\n\t\t\t.find(\"label\").text();\r\n\t\tconst month = $inputItem.siblings(\"label\").text();\r\n\t\tconst id = $inputItem.data(\"sc-id\");\r\n\t\tconst template = this.getTagHtml(id, `${year} ${month}`);\r\n\t\treturn template;\r\n\t}\r\n\r\n\tgetTagHtml(id: string, name: string) {\r\n\t\tconst tagHtml =\r\n\t\t\t`
    \r\n \t\t\t${name}\r\n \t
    `;\r\n\t\treturn tagHtml;\r\n\t}\r\n\r\n\tsetTwoLevelFilterDisabledClass() {\r\n\r\n\t\t//reset child-item class\r\n\t\tthis.$ctx.find(`.${classes.twoLevelChild}`).find('input[type=checkbox]').each((i, e) => {\r\n\t\t\t$(e).closest(`.${classes.twoLevelChild}`).toggleClass(classes.twoLevelChildDisabled, $(e).prop(\"disabled\"));\r\n\t\t});\r\n\r\n\t\t//reset parent-item class and state\r\n\t\tthis.$ctx.find(`.${classes.twoLevelParent}`).each((i, e) => {\r\n\t\t\tconst $parentItem = $(e);\r\n\t\t\tconst $checkboxes = $parentItem.find(`.${classes.twoLevelChild}`).find('input[type=checkbox]');\r\n\r\n\t\t\t$parentItem\r\n\t\t\t\t.find(`.${classes.twoLevelParentLink}`)\r\n\t\t\t\t.toggleClass(classes.twoLevelParentDisabled, this.areAllFilterDisabled($checkboxes));\r\n\r\n\t\t\t$parentItem\r\n\t\t\t\t.find(`.${classes.twoLevelParentHeader}`).find('input[type=checkbox]')\r\n\t\t\t\t.prop(\"disabled\", this.areAllFilterDisabled($checkboxes));\r\n\t\t});\r\n\t}\r\n\r\n\tareAllFilterDisabled($checkboxes: JQuery) {\r\n\t\treturn $checkboxes.toArray().every(this.isElementDisabled);\r\n\t}\r\n\r\n\tisElementDisabled(element: HTMLElement): any {\r\n\t\treturn $(element).prop(\"disabled\");\r\n\t}\r\n\r\n\tonOpenFilter() {\r\n\t\tthis.$ctx.find(`.${classes.filter}`).addClass(classes.filterOpen);\r\n\t}\r\n\r\n\tonCloseFilter(event: Event) {\r\n\t\tevent.stopPropagation();\r\n\t\tthis.$ctx.find(`.${classes.filter}`).removeClass(classes.filterOpen);\r\n\t\tthis.$ctx.find(`.${classes.twoLevelList}`).removeClass(classes.twoLevelListOpen);\r\n\t\tthis.$ctx.find(`.${classes.oneLevelList}`).removeClass(classes.oneLevelListOpen);\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","/**\r\n * Formats the given label with the passed parameters.\r\n * Be careful with the order of the passed array, since the placeholders will be replaced in the order of the array.\r\n * E.g. <\"This is a {0} text with {1}\", [\"sample\", \"parameters\"]> will return \"This is a sample text with parameters\".\r\n * @param {string} label\r\n * @param values\r\n * @returns {string}\r\n */\r\nexport function formatLabel(label: string, ...values: any[]): string {\r\n\t// console.log(label);\r\n\tlet formattedLabel = label || '';\r\n\tif (label) {\r\n\t\tlet count = 0;\r\n\t\tvalues.forEach((val) => {\r\n\t\t\t// console.log(val);\r\n\t\t\tformattedLabel = formattedLabel.replace('{' + count + '}', val);\r\n\t\t\tcount++;\r\n\t\t});\r\n\t}\r\n\treturn formattedLabel;\r\n}\r\n\r\nexport default {\r\n\tformatLabel,\r\n};\r\n","// exposing jQuery to window in order to be usable by external scripts\r\n(window as any)['$'] = jQuery;\r\n(window as any)['jQuery'] = jQuery;\r\n\r\nimport 'core-js';\r\nimport * as T from 'terrific-singleton';\r\n\r\n// **************************\r\n// BASE / HELPERS\r\n// **************************\r\n// Component Document\r\n\r\n\r\n// Component FontFaces\r\n\r\n\r\n// Component Resets\r\n\r\n\r\n// Component Security\r\nimport './lib/base/security/js/security';\r\n\r\n// Component ContentGrid\r\n\r\n\r\n// Component Grid\r\n\r\n\r\n// **************************\r\n// ATOMS\r\n// **************************\r\n// Component Burger\r\n\r\nimport './lib/atoms/burger/js/burger';\r\n\r\n// Component Button\r\n\r\nimport './lib/atoms/button/js/button';\r\n\r\n\r\n// Component Definitionlist\r\n\r\nimport './lib/atoms/definitionlist/js/definitionlist';\r\n\r\n// Component Heading\r\n\r\nimport './lib/atoms/heading/js/heading';\r\n\r\n// Component Icon\r\n\r\nimport './lib/atoms/icon/js/icon';\r\n\r\n// Component Image\r\n\r\nimport './lib/atoms/image/js/image';\r\n\r\n\r\n// Component Video\r\n\r\nimport './lib/atoms/video/js/video';\r\n\r\n// Component Input\r\n\r\nimport './lib/atoms/input/js/input';\r\n\r\n\r\n// Component InputAutocomplete\r\n\r\nimport './lib/atoms/input-autocomplete/js/input-autocomplete';\r\n\r\n// Component InputCheckbox\r\n\r\nimport './lib/atoms/input-checkbox/js/input-checkbox';\r\n\r\n\r\n// Component InputCheckswitch\r\n\r\n\r\n// Component InputDate\r\n\r\nimport './lib/atoms/input-date/js/input-date';\r\n\r\n// Component InputRangeSlider\r\n\r\nimport './lib/atoms/input-range-slider/js/input-range-slider';\r\n\r\n\r\n// Component InputSearch\r\n\r\nimport './lib/atoms/input-search/js/input-search';\r\n\r\n// Component InputSelect\r\n\r\nimport './lib/atoms/input-select/js/input-select';\r\n\r\n\r\n// Component InputTextarea\r\n\r\nimport './lib/atoms/input-textarea/js/input-textarea';\r\n\r\n// Component Label\r\n\r\nimport './lib/atoms/label/js/label';\r\n\r\n// Component Link\r\n\r\nimport './lib/atoms/link/js/link';\r\n\r\n// Component ListUnordered\r\nimport './lib/atoms/list-unordered/js/list-unordered';\r\n\r\n// Component LoadingIndicator\r\nimport './lib/atoms/loading-indicator/js/loading-indicator';\r\n\r\n\r\n// Component Page-Introtext\r\n\r\n\r\n// Component MessageBox\r\nimport './lib/atoms/message-box/css/message-box.scss';\r\n\r\n// Component Richtext\r\n\r\n\r\n// Component SearchTrigger\r\n\r\nimport './lib/atoms/search-trigger/js/search-trigger';\r\n\r\n// Component Tag\r\n\r\n\r\n// Component TagFilter\r\n\r\nimport './lib/atoms/tag-filter/js/tag-filter';\r\n\r\n\r\n// Component ValidationSummary\r\n\r\nimport './lib/atoms/validation-summary/js/validation-summary';\r\n\r\n// **************************\r\n// MOLECULES\r\n// **************************\r\n// Component Accordion\r\n\r\nimport './lib/molecules/accordion/js/accordion';\r\n\r\n// Component AccordionElement\r\n\r\n\r\n// Component BrandBenefitList\r\n\r\nimport './lib/molecules/brand-benefit-list/js/brand-benefit-list';\r\n\r\n// Component BrandProductAccordion\r\n\r\nimport './lib/molecules/brand-product-accordion/js/brand-product-accordion';\r\n\r\n// Component Breadcrumb\r\n\r\nimport './lib/molecules/breadcrumb/js/breadcrumb';\r\n\r\n// Component CampaignDownload\r\nimport './lib/molecules/campaign-download/js/campaign-download';\r\n\r\n// Component CategoryTags\r\n\r\nimport './lib/molecules/category-tags/js/category-tags';\r\n\r\n// Component ClientLogo\r\n\r\n\r\n// Component RegionLightbox\r\n\r\nimport './lib/molecules/region-lightbox/js/region-lightbox';\r\n\r\n// Component Datasheet\r\n\r\nimport './lib/molecules/datasheet/js/datasheet';\r\n\r\n// Component DownloadBar\r\n\r\n\r\n// Component DownloadItem\r\n\r\nimport './lib/molecules/download-item/js/download-item';\r\n\r\n// Component DownloadList\r\nimport './lib/molecules/download-list/js/download-list';\r\n\r\n\r\n// Component DownloadTable\r\n\r\nimport './lib/molecules/download-table/js/download-table';\r\n\r\n// Component FavouriteLayer\r\n\r\nimport './lib/molecules/favourite-layer/js/favourite-layer';\r\n\r\n// Component FavouriteButton\r\n\r\nimport './lib/molecules/favourite-button/js/favourite-button';\r\n\r\n// Component FeaturedDownload\r\nimport './lib/molecules/featured-download/js/featured-download';\r\n\r\n// Component FilterMarketSwitch\r\n\r\nimport './lib/molecules/filter-market-switch/js/filter-market-switch';\r\n\r\n// Component FilterMultiselect\r\n\r\nimport './lib/molecules/filter-multiselect/js/filter-multiselect';\r\n\r\n// Component FilterProductsearch\r\n\r\nimport './lib/molecules/filter-productsearch/js/filter-productsearch';\r\n\r\n// Component FilterCategorysearch\r\n\r\nimport './lib/molecules/filter-categorysearch/js/filter-categorysearch';\r\n\r\n// Component FilterCategorysearchSingleLevel\r\n\r\nimport './lib/molecules/filter-categorysearch-singlelevel/js/filter-categorysearch-singlelevel';\r\n\r\n// Component FavouritesEntryTable\r\n\r\nimport './lib/molecules/favourites-entry-table/js/favourites-entry-table';\r\n\r\n// Component FavouritesList\r\n\r\nimport './lib/molecules/favourites-list/js/favourites-list';\r\n\r\n// Component FilterSingleselect\r\n\r\nimport './lib/molecules/filter-singleselect/js/filter-singleselect';\r\n\r\n// Component FilterTwoLevelMultiselect\r\n\r\nimport './lib/molecules/filter-two-level-multiselect/js/filter-two-level-multiselect';\r\n\r\n// Component FilterWrapper\r\n\r\nimport './lib/molecules/filter-wrapper/js/filter-wrapper';\r\n\r\n// Component ProductFilter\r\n\r\nimport './lib/molecules/product-filter/js/product-filter';\r\n\r\n// Component TechnicalPropertyPopup\r\n\r\nimport './lib/molecules/technical-property-popup/js/technical-property-popup';\r\n\r\n// Component FormOrder\r\nimport './lib/molecules/form-order/js/form-order';\r\n\r\n// Component FormOrder\r\n\r\n\r\n// Component FormUserProfile\r\n\r\n\r\n// Component LoginData\r\n\r\n\r\n// Component GlobalContact\r\n\r\nimport './lib/molecules/global-contact/js/global-contact';\r\n\r\n// Component HazardousSubstances\r\n\r\nimport './lib/molecules/hazardous-substances/js/hazardous-substances';\r\n\r\n// Component HeadingWithIcon\r\n\r\n\r\n// Component HazardousSubstancesInfo\r\n\r\n\r\n// Component Iframe\r\nimport './lib/molecules/iframe/js/iframeResizer';\r\nimport './lib/molecules/iframe/js/iframe';\r\n\r\n// Component List\r\n\r\n\r\n// Component ListIcons\r\n\r\nimport './lib/molecules/list-icons/js/list-icons';\r\n\r\n// Component Logo\r\n\r\n\r\n// Component Login-Button\r\n\r\n\r\n// Component MarketSwitch\r\n\r\nimport './lib/molecules/market-switch/js/market-switch';\r\n\r\n// Component MarketoForm\r\nimport './lib/molecules/marketo-form/js/marketo-form';\r\n\r\n// Component MarketoFormGlobal\r\nimport './lib/molecules/marketo-form-global/js/marketo-form-global';\r\n\r\n// Component ModalOverlay\r\nimport './lib/molecules/modal-overlay/js/modal-overlay';\r\n\r\n// Component ModalOverlay\r\nimport './lib/molecules/modal-actions/js/modal-actions';\r\n\r\n// Component NavigationInPage\r\nimport './lib/molecules/navigation-in-page/js/navigation-in-page.model';\r\nimport './lib/molecules/navigation-in-page/js/navigation-in-page';\r\n\r\n// Component NavigationMain\r\n\r\nimport './lib/molecules/navigation-main/js/navigation-main';\r\n\r\n// Component NavigationMeta\r\nimport './lib/molecules/navigation-meta/js/navigation-meta';\r\n\r\n// Component NavigationWrapper\r\nimport './lib/molecules/navigation-wrapper/js/navigation-wrapper';\r\n\r\n// Component NewEvent\r\nimport './lib/molecules/new-event/js/new-event';\r\n\r\n// Component NoPermissions\r\n\r\n\r\n// Component OrderingPlatform\r\nimport './lib/molecules/ordering-platform/js/ordering-platform';\r\n\r\n// Component PageShare\r\nimport './lib/molecules/page-share/js/page-share';\r\n\r\n// Component Pageintro\r\n\r\n\r\n// Component ProductCompareButton\r\nimport './lib/molecules/product-compare-button/js/product-compare-button';\r\n\r\n// Component ProductCompareLayer\r\nimport './lib/molecules/product-compare-layer/js/product-compare-layer';\r\n\r\n// Component ProductFinderTeaser\r\nimport './lib/molecules/product-finder-teaser/js/product-finder-teaser';\r\n\r\n// Component ProductFinderTeaserV2\r\nimport './lib/molecules/product-finder-teaser-V2/js/product-finder-teaser-V2';\r\n\r\n// Component ProductList\r\nimport './lib/molecules/product-list/js/product-list';\r\n\r\n// Component ProductLogistics\r\n\r\n\r\n// Component ProductProperties\r\n\r\n\r\n// Component ProductPropertiesAndDownloads\r\n\r\n\r\n// Component ProductTable\r\n\r\nimport './lib/molecules/product-table/js/product-table';\r\n\r\n// Component ProductTableV2\r\n\r\n\r\n// Component PromptBox\r\nimport './lib/molecules/prompt-box/js/prompt-box';\r\n\r\n// Component Meta\r\n\r\n\r\n// Component Quote\r\n\r\n// Component SearchNoResults\r\n\r\n\r\n// Component SearchResultList\r\n\r\n\r\n// Component SearchTabs\r\n\r\n// Component SelectedFilterTags\r\n\r\n\r\n// Component SelectedFilterTags\r\n\r\n\r\n// Component SliderGallery\r\nimport './lib/molecules/slider-gallery/js/slider-gallery';\r\n\r\n\r\n// Component SliderStage\r\n\r\nimport './lib/molecules/slider-stage/js/slider-stage';\r\n\r\n// Component StageBrand\r\n\r\nimport './lib/molecules/stage-brand/js/stage-brand';\r\n\r\n// Component StageHome\r\n\r\n// Component StageKeyvisual\r\nimport './lib/molecules/stage-keyvisual/js/stage-keyvisual';\r\n\r\n// Component StageOverview\r\n\r\n\r\n// Component StageProduct\r\nimport './lib/molecules/stage-product/js/stage-product';\r\n\r\n// Component StageContent\r\nimport './lib/molecules/stage-content/js/stage-content';\r\n\r\n// Component StageContentHub\r\n\r\nimport './lib/molecules/stage-compact/js/stage-compact';\r\n\r\n// Component StageCampaign\r\n\r\nimport './lib/molecules/stage-campaign/js/stage-campaign';\r\n\r\n// Component StageEvent\r\n\r\nimport './lib/molecules/stage-event/js/stage-event';\r\n\r\n// Component Table\r\n\r\n\r\n// Component TableFilter\r\n\r\nimport './lib/molecules/table-filter/js/table-filter';\r\n\r\n// Component TableFilterV2\r\n\r\nimport './lib/molecules/table-filterv2/js/table-filterv2';\r\n\r\n// Component Talk\r\n\r\n\r\n// Component Talks\r\n\r\nimport './lib/molecules/talks/js/talks';\r\n\r\n// Component TeaserBenefit\r\n\r\nimport './lib/molecules/teaser-benefit/js/teaser-benefit';\r\n\r\n// Component TeaserApplication\r\n\r\n\r\n\r\n\r\n// Component TeaserContactForm\r\n\r\nimport './lib/molecules/teaser-contact-form/js/teaser-contact-form';\r\n\r\n\r\n// Component TeaserContent\r\n\r\n\r\n// Component TeaserBrands\r\n\r\n\r\n// Component TeaserVideo\r\n\r\nimport './lib/molecules/teaser-video/js/teaser-video';\r\n\r\n// Component TeaserBanner\r\n\r\n\r\n// Component TeaserFeatured\r\n\r\n\r\n// Component TeaserLarge\r\n\r\nimport'./lib/molecules/teaser-large/js/teaser-large';\r\n\r\n\r\n// Component TeaserEvent\r\n\r\nimport './lib/molecules/teaser-event/js/teaser-event';\r\n\r\n// Component Tooltip\r\n\r\nimport './lib/molecules/tooltip/js/tooltip';\r\n\r\n// Component Tooltip Actions\r\n\r\nimport './lib/molecules/tooltip-actions/js/tooltip-actions';\r\n\r\n// Component Scrollable Teaser\r\n\r\nimport './lib/molecules/scrollable-teaser/js/scrollable-teaser';\r\n\r\n\r\nimport './lib/molecules/search-flyout/js/search-flyout';\r\n\r\n// Component Disclaimer\r\n\r\nimport './lib/molecules/disclaimer/js/disclaimer';\r\n\r\n// Component Survey \r\n\r\nimport './lib/molecules/survey/js/survey';\r\n\r\n// Component Lounge popup \r\n\r\nimport './lib/molecules/lounge-popup/js/lounge-popup';\r\n\r\n// Component HTML container\r\n\r\nimport './lib/molecules/html-container/js/html-container';\r\n\r\n// Component ICal Download\r\n\r\nimport './lib/molecules/iCal-download/js/iCal-download';\r\n\r\n// Component Info List\r\n\r\nimport './lib/molecules/info-list/js/info-list';\r\n\r\n// Component Investor Overview\r\n\r\nimport './lib/molecules/investor-overview/js/investor-overview';\r\n\r\n// Component Lightbox\r\n\r\nimport './lib/molecules/lightbox/js/lightbox';\r\n\r\n// Component LanguagePopup\r\n\r\nimport './lib/molecules/language-popup/js/language-popup';\r\n\r\n// Component Customer lounge overview\r\n\r\n\r\n// Component customer lounge brand intro\r\n\r\nimport './lib/molecules/customer-lounge-brand-intro/js/customer-lounge-brand-intro';\r\n\r\n// Component customer lounge brand product table\r\n\r\nimport './lib/molecules/customer-lounge-brand-product-table/js/customer-lounge-brand-product-table';\r\n\r\n// Component Hero Article Stage\r\n\r\nimport './lib/molecules/hero-article-stage/js/hero-article-stage';\r\n\r\n// Component Customer lounge welcome\r\n\r\n\r\n// Component contact teaser card\r\n\r\nimport './lib/molecules/contact-teaser-card/js/contact-teaser-card';\r\n\r\n// Component contact teaser company card\r\n\r\n\r\n// Component contact teaser popup\r\n\r\nimport './lib/molecules/contact-teaser-popup/js/contact-teaser-popup';\r\n\r\n// Component contact teaser tile\r\n\r\n\r\n// Component contact teaser large\r\n\r\nimport './lib/molecules/contact-teaser-large/js/contact-teaser-large';\r\n\r\n// Component customer lounge project\r\n\r\n\r\n// Component customer lounge brand teaser\r\n\r\n\r\n// Component event list\r\n\r\nimport './lib/molecules/event-list/js/event-list';\r\n\r\n// Component expansion panel\r\n\r\nimport './lib/molecules/expansion-panel/js/expansion-panel';\r\n\r\n// Component marketo lightbox\r\n\r\nimport './lib/molecules/marketo-lightbox/js/marketo-lightbox';\r\n\r\n\r\n// **************************\r\n// ORGANISMS\r\n// **************************\r\n// Easteregg\r\nimport './lib/organisms/easteregg/js/pacman.min';\r\n\r\n// Component Error404\r\n\r\nimport './lib/organisms/error-404/js/error-404';\r\n\r\n// Component Footer\r\n\r\n// Component Form\r\n\r\nimport './lib/organisms/form/js/form';\r\n\r\n// Component Header\r\n\r\nimport './lib/organisms/header/js/header';\r\n\r\n// Component Campaign Header\r\n\r\nimport './lib/organisms/header-campaign/js/header-campaign';\r\n\r\n// Component Campaign Header\r\n\r\nimport './lib/organisms/header-campaign-collector/js/header-campaign-collector';\r\n\r\n// Component ProductCompare\r\n\r\nimport './lib/organisms/product-compare/js/product-compare';\r\n\r\n// Component ProductCompareV2\r\n\r\nimport './lib/organisms/product-compareV2/js/product-compareV2';\r\n\r\n// Component ProductFinder\r\n\r\n\r\n// Component SearchApp\r\n\r\n\r\n// Component TeaserContentArea\r\n\r\nimport './lib/organisms/teaser-content-area/js/teaser-content-area';\r\n\r\n// Component Customer lounge navigation\r\n\r\nimport './lib/organisms/customer-lounge-navigation/js/customer-lounge-navigation';\r\n\r\n// Component customer lounge project teaser\r\n\r\nimport './lib/organisms/customer-lounge-project-teaser/js/customer-lounge-project-teaser';\r\n\r\n// Component My favourites\r\n\r\nimport './lib/organisms/favourites-overview/js/favourites-overview';\r\n\r\n// Component Overview share favourites\r\n\r\nimport './lib/organisms/overview-share-favourites/js/overview-share-favourites';\r\n\r\n// Component teaser filter area\r\n\r\nimport './lib/organisms/teaser-filter-area/js/teaser-filter-area';\r\n\r\n// Component home scrollable teaser\r\n\r\nimport './lib/organisms/home-scrollable-teaser/js/home-scrollable-teaser';\r\n\r\n// Safety Data Sheet Search\r\n\r\nimport './lib/organisms/sds-search/js/sds-search';\r\n\r\n// Teaser Tabs\r\nimport './lib/organisms/teaser-tabs/js/teaser-tabs';\r\n\r\n// **************************\r\n// INIT\r\n// **************************\r\n(window as any)['Terrific'] = T;\r\n\r\n// polyfill for custom events (IE)\r\n(function() {\r\n\tif (typeof (window as any)['CustomEvent'] === 'function') {\r\n\t\treturn false;\r\n\t}\r\n\tfunction CustomEvent(event: string, params: any) {\r\n\t\tparams = params || { bubbles: false, cancelable: false, detail: undefined };\r\n\t\tvar evt = document.createEvent('CustomEvent');\r\n\t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\r\n\t\treturn evt;\r\n\t}\r\n\tCustomEvent.prototype = (window as any)['Event'].prototype;\r\n\t(window as any)['CustomEvent'] = CustomEvent;\r\n})();\r\n\r\nconst event = new CustomEvent('terrificAvailable');\r\ndocument.dispatchEvent(event);\r\n\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n\tT.bootstrap();\r\n});\r\n","// https://github.com/reeko/prevent-window-opener-attacks\r\nimport 'prevent-window-opener-attacks';\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { changeBodyState } from '@project/shared/utils/body-state/js/body-state';\r\nimport { getBodyState } from '@project/shared/utils/body-state/js/body-state';\r\nimport { updateNavLevel } from '@project/shared/utils/burger/js/burger';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst classes = {\r\n\touterParent: 'body',\r\n\tstateBurgerNav: 'state-m-burgernav--visible',\r\n};\r\n\r\n@createModule('Burger')\r\n/**\r\n * burger module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class Burger extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tthis.initBurger(this._ctx);\r\n\t\tonBreakpointChange(() => this.initBurger(this._ctx));\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\tinitBurger(ctx: HTMLElement) {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\t$(ctx)\r\n\t\t\t\t.off('click')\r\n\t\t\t\t.on('click', (ev: Event) => this.onClickBurger(ev));\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t// remove event binding for burger\r\n\t\t\t$(ctx).off('click');\r\n\r\n\t\t\t// close mobile menu if resize was done while mobile nav was open\r\n\t\t\tif (getBodyState(classes.stateBurgerNav)) {\r\n\t\t\t\tthis.toggleNavigation();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * On Click event\r\n\t */\r\n\tonClickBurger(ev: Event) {\r\n\t\tev.preventDefault();\r\n\t\tif (getBodyState(classes.stateBurgerNav)) {\r\n\t\t\tupdateNavLevel();\r\n\t\t\t$(window).trigger('burgerClosed');\r\n\t\t} else {\r\n\t\t\t$(window).trigger('burgerOpened');\r\n\t\t}\r\n\t\tthis.toggleNavigation();\r\n\t}\r\n\r\n\ttoggleNavigation() {\r\n\t\t// toggle bodyclass\r\n\t\tchangeBodyState(classes.stateBurgerNav);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\n@createModule('Button')\r\n/**\r\n * Button Component\r\n * @constructor\r\n */\r\nexport class Button extends TerrificSpec {\r\n\t/**\r\n\t * start/init Nitro lifecycle hook\r\n\t * @param {function} resolve - Required parameter for start lifecycle\r\n\t * @returns {void} void\r\n\t */\r\n\tstart(resolve: () => void): void {\r\n\t\tif (this.isScrollTopBtn()) {\r\n\t\t\tthis._ctx.addEventListener('click', () => this.scrollToTop());\r\n\t\t}\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * stop/destroy Nitro lifecycle hook\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {\r\n\t\tif (this.isScrollTopBtn()) {\r\n\t\t\tthis._ctx.removeEventListener('click', () => {});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll to top of the document\r\n\t * @returns {void}\r\n\t */\r\n\tscrollToTop() {\r\n\t\tscrollToElement($(document.body), false, 0);\r\n\t}\r\n\r\n\t/**\r\n\t * back-to-top button should contain the 'a-button--top' css class that comes from the button modifier 'top'\r\n\t * to separate its click event\r\n\t * @returns {boolean} boolean\r\n\t */\r\n\tisScrollTopBtn(): boolean {\r\n\t\treturn this._ctx.classList.contains('a-button--top');\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('Definitionlist')\r\n/**\r\n * definitionlist module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class Definitionlist extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('Heading')\r\n/**\r\n * heading module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class Heading extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","// https://github.com/aFarkas/lazysizes\r\nimport 'lazysizes/plugins/respimg/ls.respimg';\r\n\r\n// lazySizes.init();\r\nimport { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('Image')\r\n/**\r\n * image module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class Image extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\nimport * as Cookies from 'js-cookie';\r\n\r\nconst classes = {\r\n\tvideoEl: 'js-a-video__element',\r\n\tvideoConsentEl: 'js-a-video-consent__element',\r\n\tvideoCaption: 'js-a-video__caption',\r\n\tvideoPlay: 'mi-big-play-cover',\r\n\tvideoLocked: 'js-a-video__locked',\r\n\tvideoGatedPlay: 'js-a-video__gated-play',\r\n\tvideoOpenedBtn: 'js-a-video__opened-btn',\r\n};\r\n\r\nlet videoDataGlobal: any;\r\n\r\ninterface IvideoData {\r\n\tplayerId: string;\r\n\tvideoId: string;\r\n\tembedscript: string;\r\n\tflashPath: string;\r\n\tapiUrl: string;\r\n\tconfigType: string;\r\n\ttId: number;\r\n\tusercentricsDpsServiceName: string;\r\n\tmilestonePercentage: number;\r\n\tmktoenvId: string;\r\n}\r\n\r\n@createModule('VideoComponent')\r\n/**\r\n * Video component implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class VideoComponent extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tapi: any;\r\n\t$videoContainer: JQuery;\r\n\t$consentContainer: JQuery;\r\n\tvideoData: IvideoData;\r\n\tvideoName: string;\r\n\tcontainerId: string;\r\n\tconsentContainerId: string;\r\n\tprogressMarker: number[];\r\n\treachedMarker: number;\r\n\t$videoPlay: JQuery;\r\n\t$videoLocked: JQuery;\r\n\t$videoGatedPlay: JQuery;\r\n\t$videoOpenedBtn: JQuery;\r\n\tloggedPlayActivity: boolean;\r\n\tloggedReachedMilestoneActivity: boolean;\r\n\tmilestonePercentage: number;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$videoContainer = this.$ctx.find(`.${classes.videoEl}`);\r\n\t\tthis.$consentContainer = this.$ctx.find(`.${classes.videoConsentEl}`);\r\n\t\tthis.videoData = this.$ctx.data() as IvideoData;\r\n\t\tvideoDataGlobal = this.videoData;\r\n\t\tthis.milestonePercentage = this.videoData.milestonePercentage;\r\n\t\tthis.loggedPlayActivity = false;\r\n\t\tthis.loggedReachedMilestoneActivity = false;\r\n\t\tthis.addMiScript();\r\n\t\tthis.RegisteredUpdate();\r\n\t\t$(\"body\").addClass(\".state-m-navigation--scroll-0-position\");\r\n\r\n\t\tif (this.videoData.usercentricsDpsServiceName.length > 0) {\r\n\t\t\t/**\r\n\t\t * Handle Usercentrics consent changes.\r\n\t\t */\r\n\t\t\t(window as any).addEventListener(\"UC_UI_INITIALIZED\", function (e: CustomEvent) {\r\n\t\t\t\tconst services = (window as any).UC_UI.getServicesBaseInfo() as any[];\r\n\t\t\t\tvar sc = services.find(s => s.name === \"eVideo\");\r\n\r\n\t\t\t\tif (sc && sc.consent && sc.consent.status) {\r\n\t\t\t\t\tCookies.set(\"evideo_consent_accepted\", \"true\", { expires: 365 });\r\n\t\t\t\t\t$(\".js-a-video-consent__element\").hide();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlet cookieValue = Cookies.get(\"evideo_consent_accepted\");\r\n\t\t\t\t\tif (cookieValue != undefined) {\r\n\t\t\t\t\t\tif (cookieValue.length > 0) {\r\n\t\t\t\t\t\t\tCookies.remove(\"evideo_consent_accepted\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t/**\r\n\t\t\t * Handle Usercentrics consent changes. Check for Sitecore Analytics consent.\r\n\t\t\t */\r\n\t\t\t(window as any).addEventListener(\"ucEvent\", function (e: CustomEvent) {\r\n\t\t\t\tif (e.detail && e.detail.event == \"consent_status\") {\r\n\t\t\t\t\tconst dpsName = \"eVideo\";\r\n\t\t\t\t\tif (e.detail[dpsName] === true) {\r\n\t\t\t\t\t\t$(\".js-a-video-consent__element\").hide();\r\n\t\t\t\t\t\tif ((window as any).VideoPlayer != undefined) {\r\n\t\t\t\t\t\t\t(window as any).VideoPlayer.Collection.acceptAnalytics();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tif ((window as any).VideoPlayer != undefined) {\r\n\t\t\t\t\t\t\t(window as any).VideoPlayer.Collection.rejectAnalytics();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * method is called to initialize MiScript\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\taddMiScript() {\r\n\t\tthis.containerId = `a-video__mi-player-${this.videoData.tId}`;\r\n\t\tthis.consentContainerId = `e-video-container-${this.videoData.tId}`;\r\n\t\tthis.$videoContainer.attr('id', this.containerId);\r\n\t\tthis.$consentContainer.attr('id', this.consentContainerId);\r\n\t\tlet cookieValue = Cookies.get(\"evideo_consent_accepted\");\r\n\t\tconst $script = this.videoData.usercentricsDpsServiceName.length > 0 && (cookieValue == undefined || cookieValue == \"false\")\r\n\t\t\t? $(``)\r\n\t\t\t: $(``);\r\n\t\t$script.attr('onload', () => {\r\n\t\t\tthis.onScriptLoaded(this.containerId);\r\n\t\t});\r\n\t\t$script.attr('src', this.videoData.embedscript);\r\n\t\t$(document.body).append($script);\r\n\t}\r\n\r\n\t/**\r\n\t * method is called when script was loaded\r\n\t *\r\n\t * @param {string} id id of videoplayer container\r\n\t * @returns {void}\r\n\t */\r\n\tonScriptLoaded(id: string) {\r\n\t\tif ((window as any).UC_UI_INITIALIZED) {\r\n\t\t\tif (this.videoData.usercentricsDpsServiceName.length > 0) {\r\n\t\t\t\tlet cookieValueUC = Cookies.get(\"evideo_consent_accepted\");\r\n\t\t\t\tif (cookieValueUC == undefined) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif ((window as any).VideoPlayer) {\r\n\t\t\t\t\t\tthis.initVideoPlayer(id);\r\n\t\t\t\t\t\t$(\".js-a-video-consent__element\").hide();\r\n\r\n\t\t\t\t\t\tif (window.location.href.indexOf(\"#vc_\") > -1) {\r\n\t\t\t\t\t\t\tvar containerId = window.location.href.split(\"#\")[1];\r\n\t\t\t\t\t\t\tvar videoContainer = $(\"#\" + containerId);\r\n\t\t\t\t\t\t\tif (videoContainer !== undefined) {\r\n\t\t\t\t\t\t\t\t$('html, body').animate({\r\n\t\t\t\t\t\t\t\t\tscrollTop: $(\"#\" + containerId).offset().top\r\n\t\t\t\t\t\t\t\t}, 1000, () => {\r\n\t\t\t\t\t\t\t\t\t$(\"body\").addClass(\"state-m-navigation--scroll-0-position\")\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.onScriptLoaded(id);\r\n\t\t\t\t\t\t}, 500);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Hack to be sure the videoplayer script was loaded\r\n\t\t\tif ((window as any).VideoPlayer) {\r\n\t\t\t\tthis.initVideoPlayer(id);\r\n\t\t\t} else {\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.onScriptLoaded(id);\r\n\t\t\t\t}, 500);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method initializes movingimage video player\r\n\t *\r\n\t * @param {string} id id of videoplayer container\r\n\t * @returns {void}\r\n\t */\r\n\tinitVideoPlayer(id: string) {\r\n\t\tconst config: {\r\n\t\t\tsuccess: () => void;\r\n\t\t\tparameters: { configType: string; playerId: string; videoId: string; apiUrl: string; flashPath: string };\r\n\t\t} = {\r\n\t\t\tsuccess: this.onPlayerInit.bind(this),\r\n\t\t\tparameters: {\r\n\t\t\t\tconfigType: this.videoData.configType,\r\n\t\t\t\tplayerId: this.videoData.playerId,\r\n\t\t\t\tvideoId: this.videoData.videoId,\r\n\t\t\t\tapiUrl: this.videoData.apiUrl,\r\n\t\t\t\tflashPath: this.videoData.flashPath,\r\n\t\t\t},\r\n\t\t};\r\n\t\t(window as any).VideoPlayer.Collection.addPlayerById(this.containerId, config);\r\n\t}\r\n\r\n\t/**\r\n\t * method is called when player was initialized\r\n\t *\r\n\t * @param {object} api player api\r\n\t * @returns {void}\r\n\t */\r\n\tonPlayerInit(api: object) {\r\n\t\tthis.progressMarker = [25, 50, 75];\r\n\t\tthis.reachedMarker = 0;\r\n\t\tthis.api = api;\r\n\t\tthis.loggedPlayActivity = false;\r\n\t\tthis.loggedReachedMilestoneActivity = false;\r\n\t\tthis.videoName = this.getVideoName();\r\n\t\tthis.api.registerEventListener('play', this.onPlay.bind(this));\r\n\t\tthis.api.registerEventListener('pause', this.onPause.bind(this));\r\n\t\tthis.api.registerEventListener('ended', this.onEnded.bind(this));\r\n\t\tthis.api.registerEventListener('timeupdate', this.onTimeUpdate.bind(this));\r\n\t\tthis.api.registerEventListener('timeupdate', this.timeUpdateCallBack.bind(this));\r\n\t\tthis.api.registerEventListener('playing', this.playingCallback.bind(this));\r\n\t}\r\n\r\n\t/**\r\n\t * method trys to readout videoname and retuns best match\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tgetVideoName() {\r\n\t\tconst metaApi: any = this.api.getApi('metaData');\r\n\r\n\t\tif (metaApi) {\r\n\t\t\tconst metaTitle: string = metaApi.getVideoTitle();\r\n\t\t\tif (metaTitle) {\r\n\t\t\t\treturn metaTitle;\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst label: string = this.$ctx.find(`.${classes.videoCaption}`).text() || '';\r\n\t\tif (label.length) {\r\n\t\t\treturn label;\r\n\t\t}\r\n\t\treturn 'noName';\r\n\t}\r\n\r\n\t//Create a ClickLink Munchkin Activity when play is pressed\r\n\tplayingCallback() {\r\n\t\tif (this.loggedPlayActivity == false) {\r\n\t\t\t(window as any).Munchkin.init(this.videoData.mktoenvId);\r\n\t\t\t(window as any).Munchkin.munchkinFunction('clickLink', { href: '/VideoPlayed-' + this.videoData.videoId + '/?action=Pressed_Play' });\r\n\t\t\tthis.loggedPlayActivity = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//Create a ClickLink Munchkin Activity when the milestone is passed\r\n\ttimeUpdateCallBack() {\r\n\t\tif (this.loggedReachedMilestoneActivity == false && this.milestoneInSeconds() < (window as any).VideoPlayer.Collection.getPlayerById(this.containerId).getCurrentTime()) {\r\n\t\t\tvar percentWatched = this.milestonePercentage + 'percent';\r\n\t\t\t(window as any).Munchkin.munchkinFunction('clickLink', {\r\n\t\t\t\thref: '/VideoWatched-' + percentWatched + '-' + this.videoData.videoId + '/?action=Milestone_Reached-' + percentWatched\r\n\t\t\t});\r\n\t\t\tthis.loggedReachedMilestoneActivity = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//function to convert percentage to a number of seconds through loaded video\r\n\tmilestoneInSeconds() {\r\n\t\t//event.target is undefined, that is a bug that moving image should fix\r\n\t\t//that's the reason we need to fetch the video player again\r\n\t\tvar milestonePercentageAsDecimal = this.milestonePercentage / 100;\r\n\t\treturn milestonePercentageAsDecimal * (window as any).VideoPlayer.Collection.getPlayerById(this.containerId).getDuration();\r\n\t}\r\n\r\n\t/**\r\n\t * method is called when player starts to play\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonPlay() {\r\n\t\tthis.track('Played');\r\n\t}\r\n\r\n\t/**\r\n\t * method is called when player pauses\r\n\t *\r\n\t * @param {object} e event\r\n\t * @returns {void}\r\n\t */\r\n\tonPause(e: { time: number }) {\r\n\t\tconst currentTime = Math.round(e.time);\r\n\t\tif (currentTime < Math.floor(this.api.getDuration())) {\r\n\t\t\tthis.track('Paused', `${currentTime}`);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method is called when player ends\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonEnded() {\r\n\t\tthis.track('100%');\r\n\t}\r\n\r\n\t/**\r\n\t * method is called when player time gets updated\r\n\t *\r\n\t * @param {object} e event\r\n\t * @returns {void}\r\n\t */\r\n\tonTimeUpdate(e: { time: number }) {\r\n\t\tconst percentPosition: number = Math.floor((100 * Math.round(e.time)) / this.api.getDuration());\r\n\t\tfor (let i: number = 0; i < this.progressMarker.length; i++) {\r\n\t\t\tconst marker = this.progressMarker[i];\r\n\t\t\tif (percentPosition >= marker && marker > this.reachedMarker) {\r\n\t\t\t\tthis.reachedMarker = marker;\r\n\t\t\t\tthis.track(`${marker}%`);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method tracks event\r\n\t *\r\n\t * @param {string} action tracking action name\r\n\t * @param {string} value tracking value\r\n\t * @returns {void}\r\n\t */\r\n\ttrack(action: string, value?: string) {\r\n\t\tconst trackdata: {\r\n\t\t\tevent: string;\r\n\t\t\teventCategory: string;\r\n\t\t\teventAction: string;\r\n\t\t\teventLabel: string;\r\n\t\t\teventValue?: string;\r\n\t\t} = {\r\n\t\t\tevent: 'video',\r\n\t\t\teventCategory: 'Video',\r\n\t\t\teventAction: action,\r\n\t\t\teventLabel: `${this.videoData.videoId}|${this.videoName}`,\r\n\t\t};\r\n\t\tif (value) {\r\n\t\t\ttrackdata.eventValue = value;\r\n\t\t}\r\n\t\tTrack.gtmTrack(trackdata);\r\n\t}\r\n\r\n\tRegisteredUpdate() {\r\n\t\tthis.$videoGatedPlay = this.$ctx.find(`.${classes.videoGatedPlay}`);\r\n\t\tthis.$videoOpenedBtn = this.$ctx.find(`.${classes.videoOpenedBtn}`);\r\n\t\tif (Track.isKnownMarketoLead()) {\r\n\t\t\tthis.$ctx.removeClass('a-video--locked');\r\n\t\t\tthis.$videoGatedPlay.on('click', this.triggerPlay.bind(this));\r\n\t\t\tthis.$videoOpenedBtn.on('click', this.triggerPlay.bind(this));\r\n\t\t}\r\n\t}\r\n\ttriggerPlay() {\r\n\t\tthis.$videoPlay = this.$ctx.find(`.${classes.videoPlay}`);\r\n\t\tthis.$videoLocked = this.$ctx.find(`.${classes.videoLocked}`);\r\n\t\tthis.$videoPlay.trigger('click');\r\n\t\tthis.$videoLocked.remove();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {\r\n\t\ttry {\r\n\t\t\t(window as any).VideoPlayer.Collection.removePlayerById(this.containerId);\r\n\t\t} catch (e) {\r\n\t\t\t// Intentionaly Empty\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport { floatControlLabel } from '@project/shared/utils/form-control/js/form-control';\r\n\r\n@createModule('Input')\r\nexport class Input extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tthis._ctx.addEventListener('change', () => this._triggerChangeEvent());\r\n\t\t$ctx.on('change', () => this._triggerChangeEvent());\r\n\t\tthis._ctx.addEventListener('click', () => floatControlLabel(this._ctx, true));\r\n\t\tthis._ctx.addEventListener('focus', () => floatControlLabel(this._ctx, true));\r\n\t\tthis._ctx.addEventListener('keypress', (ev) => {\r\n\t\t\tif ($ctx.attr('type') === 'number' && isNaN(+ev.key)) {\r\n\t\t\t\tev.stopPropagation();\r\n\t\t\t\tev.preventDefault();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tfloatControlLabel(this._ctx);\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {\r\n\t\tthis._ctx.removeEventListener('change', () => {});\r\n\t\tthis._ctx.removeEventListener('click', () => {});\r\n\t}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t\tfloatControlLabel(this._ctx);\r\n\t}\r\n\r\n\t/**\r\n\t * Set the value of the input field\r\n\t */\r\n\tsetValue(value: string) {\r\n\t\t(this._ctx as HTMLInputElement).value = value;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the value of the input field\r\n\t */\r\n\tgetValue() {\r\n\t\treturn (this._ctx as HTMLInputElement).value;\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { PublicEvents, triggerPublicEvent } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('InputAutocomplete')\r\n/**\r\n * input-autocomplete module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class InputAutocomplete extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\nconst classes = {\r\n\tcheckboxElement: 'js-a-input-checkbox__input',\r\n};\r\n\r\n@createModule('InputCheckbox')\r\n/**\r\n * input-checkbox module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class InputCheckbox extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\tlet checkboxElement = $(`.${classes.checkboxElement}`, $ctx);\r\n\r\n\t\tcheckboxElement.change(() => {\r\n\t\t\tthis._triggerChangeEvent(checkboxElement.is(':checked'));\r\n\t\t});\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent(isChecked: boolean) {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx, isChecked);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('InputDate')\r\n/**\r\n * input-date module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class InputDate extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport * as noUiSlider from 'nouislider';\r\n\r\n@createModule('InputRangeSlider')\r\n/**\r\n * input-range-slider module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class InputRangeSlider extends TerrificSpec {\r\n\tslider: noUiSlider.Instance;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\tlet valueMin = $(this._ctx).data('value-min') as number;\r\n\t\tlet valueMax = $(this._ctx).data('value-max') as number;\r\n\r\n\t\tlet rangeMin = $(this._ctx).data('range-min') as number;\r\n\t\tlet rangeMax = $(this._ctx).data('range-max') as number;\r\n\r\n\t\tlet decimalSeparator = $(this._ctx).data('decimal-separator');\r\n\r\n\t\tthis.slider = $(this._ctx).find('.a-input-range-slider__container')[0] as noUiSlider.Instance;\r\n\r\n\t\tlet numberOfDecimals = this._calcNumberOfDecimals(rangeMin, rangeMax);\r\n\t\tlet marginBetweenHandles = this._calcMarginBetweenHandles(rangeMin, rangeMax);\r\n\r\n\t\t//const wNumb = require(\"wnumb\");\r\n\r\n\t\tnoUiSlider.create(this.slider, {\r\n\t\t\tstart: [valueMin, valueMax],\r\n\t\t\tconnect: true,\r\n\t\t\ttooltips: [true, true],\r\n\t\t\tmargin: marginBetweenHandles,\r\n\t\t\trange: {\r\n\t\t\t\tmin: rangeMin,\r\n\t\t\t\tmax: rangeMax,\r\n\t\t\t},\r\n\r\n\t\t\tformat: wNumb({\r\n\t\t\t\tdecimals: numberOfDecimals,\r\n\t\t\t\tmark: decimalSeparator,\r\n\t\t\t}),\r\n\t\t});\r\n\r\n\t\tthis.slider.noUiSlider.on('update', (values, handle) => {\r\n\t\t\t$ctx.find('.js-handle-' + handle).val(values[handle]);\r\n\t\t\tthis._triggerChangeEvent(values);\r\n\t\t});\r\n\r\n\t\tthis.slider.noUiSlider.on('start', (values, handle) => {\r\n\t\t\t$ctx.find(\"[data-handle='\" + handle + \"'] .noUi-tooltip\").addClass('noUi-tooltip--active');\r\n\t\t});\r\n\r\n\t\tthis.slider.noUiSlider.on('end', (values, handle) => {\r\n\t\t\t$ctx.find(\"[data-handle='\" + handle + \"'] .noUi-tooltip\").removeClass('noUi-tooltip--active');\r\n\t\t});\r\n\r\n\t\tthis.slider.noUiSlider.on('change', (values, handle) => {\r\n\t\t\t$ctx.find('.js-handle-' + handle).val(values[handle]);\r\n\t\t\tthis._triggerReleaseEvent(values);\r\n\t\t});\r\n\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\t_calcNumberOfDecimals(rangeMin: number, rangeMax: number) {\r\n\t\tlet range = this._calcRange(rangeMax, rangeMin);\r\n\t\tlet numberOfDecimals = 1;\r\n\r\n\t\tswitch (true) {\r\n\t\t\tcase range <= 10:\r\n\t\t\t\tnumberOfDecimals = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase range > 1000:\r\n\t\t\t\tnumberOfDecimals = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tnumberOfDecimals = 1;\r\n\t\t}\r\n\t\treturn numberOfDecimals;\r\n\t}\r\n\r\n\t_calcMarginBetweenHandles(rangeMin: number, rangeMax: number) {\r\n\t\tlet range = this._calcRange(rangeMax, rangeMin);\r\n\t\tlet marginBetweenHandles = range * 0.05;\r\n\t\tlet widthOfRangerSlider = $(this._ctx).width();\r\n\r\n\t\tswitch (true) {\r\n\t\t\tcase widthOfRangerSlider <= 400:\r\n\t\t\t\tmarginBetweenHandles = marginBetweenHandles * 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase widthOfRangerSlider > 700:\r\n\t\t\t\treturn marginBetweenHandles;\r\n\t\t\tdefault:\r\n\t\t\t\tmarginBetweenHandles = marginBetweenHandles * 1.5;\r\n\t\t}\r\n\r\n\t\treturn marginBetweenHandles;\r\n\t}\r\n\r\n\t_calcRange(rangeMin: number, rangeMax: number) {\r\n\t\treturn Math.abs(rangeMax - rangeMin);\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent(value: Object) {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx, value);\r\n\t}\r\n\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerReleaseEvent(value: Object) {\r\n\t\ttriggerPublicEvent(PublicEvents.uxSubmit, this, this._ctx, value);\r\n\t}\r\n\r\n\tadjustSlider(leftHandleValue: number, rightHandleValue: number) {\r\n\t\tthis.slider.noUiSlider.set([leftHandleValue, rightHandleValue]);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('InputSearch')\r\n/**\r\n * input-search module implementation.\r\n *\r\n * @author Dishan Sivakumaran \r\n */\r\nexport class InputSearch extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import 'select2/dist/js/select2.full';\r\nimport { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { PublicEvents, triggerPublicEvent } from '@project/shared/utils/events/js/events';\r\nimport * as $ from 'jquery';\r\nimport { highlight } from '@project/shared/utils/highlight/js/highlight';\r\nimport { floatControlLabel } from '@project/shared/utils/form-control/js/form-control';\r\n\r\n@createModule('InputSelect')\r\n/**\r\n * input-select module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class InputSelect extends TerrificSpec {\r\n\tanimationFrameId: number;\r\n\tstart(resolve: () => void) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tconst config = {\r\n\t\t\tsearch: $ctx.attr('data-search'),\r\n\t\t\tfullwidth: $ctx.attr('data-fullwidth'),\r\n\t\t\tautowidth: $ctx.attr('data-autowidth'),\r\n\t\t\tplaceholderWorkaroundList: $ctx.attr('data-placeholder-workaround-list'),\r\n\t\t\tplaceholderWorkaroundTop: $ctx.attr('data-placeholder-workaround-top'),\r\n\t\t\tcustomDropdownClass: $ctx.attr('data-custom-dropdown-class'),\r\n\t\t\tmodal: $ctx.attr('data-modal'),\r\n\t\t};\r\n\r\n\t\tthis._ctx.addEventListener('click', () => floatControlLabel(this._ctx, true));\r\n\t\tthis._ctx.addEventListener('focus', () => floatControlLabel(this._ctx, true));\r\n\t\tthis._ctx.addEventListener('uxSyncLabel', () => floatControlLabel(this._ctx, true));\r\n\t\tthis.animationFrameId = 0;\r\n\t\t$(window).on('resize', () => {\r\n\t\t\tif (this.animationFrameId > 0) {\r\n\t\t\t\twindow.cancelAnimationFrame(this.animationFrameId);\r\n\t\t\t}\r\n\t\t\tthis.animationFrameId = window.requestAnimationFrame(() => {\r\n\t\t\t\tthis.animationFrameId = 0;\r\n\t\t\t\tfloatControlLabel(this._ctx);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t// need to timeout in order to prevent select2 rendering timing issue\r\n\t\tsetTimeout(() => {\r\n\t\t\tfloatControlLabel(this._ctx);\r\n\t\t}, 500);\r\n\r\n\t\tconst me = this._ctx;\r\n\t\tconst self = this;\r\n\r\n\t\tconst minSearchResults = config.search ? 0 : -1;\r\n\t\tlet width = config.fullwidth ? '100%' : 'element';\r\n\t\tif (config.autowidth) {\r\n\t\t\twidth = 'auto';\r\n\t\t}\r\n\r\n\t\tconst $select2 = ($ctx as any).select2({\r\n\t\t\tminimumResultsForSearch: minSearchResults,\r\n\t\t\twidth,\r\n\t\t\tdropdownAutoWidth: width === 'auto',\r\n\r\n\t\t\tdropdownCssClass: config.customDropdownClass,\r\n\t\t\tmatcher: (params: any, data: any) => {\r\n\t\t\t\tif (!params.term) {\r\n\t\t\t\t\t// reset html\r\n\t\t\t\t\tdata.html = data.text;\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (data.text.toUpperCase().indexOf(params.term.toUpperCase()) === 0) {\r\n\t\t\t\t\tdata.html = highlight(data.text, params.term);\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tescapeMarkup(markup: string) {\r\n\t\t\t\treturn markup;\r\n\t\t\t},\r\n\t\t\ttemplateResult(item: any) {\r\n\t\t\t\treturn item.html || item.text;\r\n\t\t\t},\r\n\t\t\ttemplateSelection(item: any) {\r\n\t\t\t\treturn item.text;\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\t$ctx.on('select2:open', function() {\r\n\t\t\tif (config.modal) {\r\n\t\t\t\tconst $body = $('body');\r\n\t\t\t\tconst $html = $('html');\r\n\t\t\t\tif ($body.outerHeight() > $html.outerHeight()) {\r\n\t\t\t\t\t$html.addClass('no-scrolling--with-scrollbar');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$html.addClass('no-scrolling--without-scrollbar');\r\n\t\t\t\t}\r\n\t\t\t\t$body.addClass('state-select2-dropdown--product-finder-teaser');\r\n\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t$body.addClass('state-select2-dropdown--product-finder-teaser-activated');\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tfloatControlLabel(me, true);\r\n\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tconst $optionsElement = $('.select2-results__options');\r\n\t\t\t\tconst hasScrollbar = $optionsElement.get(0).scrollHeight > $optionsElement.height();\r\n\r\n\t\t\t\tif (hasScrollbar) {\r\n\t\t\t\t\t$('.select2-dropdown').addClass('select2-dropdown--add-space select2-dropdown--with-icon');\r\n\t\t\t\t} else if (!hasScrollbar && $('.select2-dropdown').hasClass('select2-dropdown--with-icon')) {\r\n\t\t\t\t\t$('.select2-dropdown').removeClass('select2-dropdown--with-icon');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add listeneer to control the scroll icon\r\n\t\t\t\t$optionsElement.on('scroll', function() {\r\n\t\t\t\t\t// bottom end of scroll container reached\r\n\t\t\t\t\tif ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {\r\n\t\t\t\t\t\t$('.select2-dropdown').removeClass('select2-dropdown--with-icon');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// scroll is somewhere else\r\n\t\t\t\t\t\t$('.select2-dropdown').addClass('select2-dropdown--with-icon');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (config.placeholderWorkaroundList) {\r\n\t\t\t\t\t$optionsElement.prepend(\r\n\t\t\t\t\t\t`
  • \r\n\t\t\t\t\t\t\t\t\t${config.placeholderWorkaroundList}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
  • `\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$('.js-trigger-dropdown-close').on('click', () => $select2.select2('close'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Overlay can have a closing text before the searchbox. As everything but the result list is cached, the\r\n\t\t\t\t * trigger inserted outside the result list needs to be deleted manually\r\n\t\t\t\t */\r\n\t\t\t\tif (config.placeholderWorkaroundTop) {\r\n\t\t\t\t\t$('.js-trigger-dropdown').remove();\r\n\t\t\t\t\t$('.select2-dropdown').prepend(\r\n\t\t\t\t\t\t`
    \r\n\t\t\t\t\t\t\t\t${config.placeholderWorkaroundTop}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    `\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$('.js-trigger-dropdown-close').on('click', () => $select2.select2('close'));\r\n\t\t\t\t}\r\n\t\t\t}, 5);\r\n\r\n\t\t\ttriggerPublicEvent(PublicEvents.uxShow, self, me);\r\n\t\t});\r\n\r\n\t\t$ctx.on('select2:close', () => {\r\n\t\t\tfloatControlLabel(me, false);\r\n\t\t\ttriggerPublicEvent(PublicEvents.uxHide, self, me);\r\n\t\t\t$('body')\r\n\t\t\t\t.removeClass('state-select2-dropdown--product-finder-teaser')\r\n\t\t\t\t.removeClass('state-select2-dropdown--product-finder-teaser-activated');\r\n\t\t\t$('html')\r\n\t\t\t\t.removeClass('no-scrolling--with-scrollbar')\r\n\t\t\t\t.removeClass('no-scrolling--without-scrollbar');\r\n\t\t});\r\n\r\n\t\t$ctx.on('select2:select', () => {\r\n\t\t\tfloatControlLabel(me, false);\r\n\t\t\ttriggerPublicEvent(PublicEvents.uxChange, self, me, {});\r\n\t\t});\r\n\r\n\t\tif (config.modal) {\r\n\t\t\t$ctx.on('select2:opening', this._openModal.bind(this));\r\n\t\t\t$ctx.on('select2:close', this._closeModal.bind(this));\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\t/**\r\n\t * Set the value of the input field\r\n\t */\r\n\tsetValue(value: string) {\r\n\t\t(this._ctx as HTMLSelectElement).value = value;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the value of the input field\r\n\t */\r\n\tgetValue() {\r\n\t\treturn $(this._ctx as HTMLSelectElement)\r\n\t\t\t.find(':selected')\r\n\t\t\t.get(0).innerText;\r\n\t}\r\n\r\n\tgetOptionValue() {\r\n\t\treturn (this._ctx as HTMLSelectElement).value;\r\n\t}\r\n\r\n\t/**\r\n\t * send event in order to open modal window\r\n\t * add class in order to set z-index\r\n\t *\r\n\t * @param ev\r\n\t */\r\n\t_openModal(ev: any) {\r\n\t\t$(window).trigger('modalWindow:open');\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.next('.select2.select2-container')\r\n\t\t\t.addClass('state-m-market-switch--overlay');\r\n\t}\r\n\r\n\t_closeModal(ev: any) {\r\n\t\t$(window).trigger('modalWindow:close');\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.next('.select2.select2-container')\r\n\t\t\t.removeClass('state-m-market-switch--overlay');\r\n\t}\r\n}\r\n","export function highlight(text: string, search: string, modifier?: string): string {\r\n\tconst pattern = new RegExp(search, 'i');\r\n\tconst mod = (modifier && ` a-highlight--${modifier}`) || '';\r\n\r\n\treturn (text && search) ? text.replace(pattern, `${pattern.exec(text)}`) : text;\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport { floatControlLabel } from '@project/shared/utils/form-control/js/form-control';\r\n\r\n@createModule('InputTextarea')\r\n/**\r\n * input-textarea module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class InputTextarea extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tthis._ctx.addEventListener('change', () => this._triggerChangeEvent());\r\n\t\tthis._ctx.addEventListener('click', () => floatControlLabel(this._ctx, true));\r\n\t\tthis._ctx.addEventListener('focus', () => floatControlLabel(this._ctx, true));\r\n\r\n\t\tfloatControlLabel(this._ctx);\r\n\t\tresolve();\r\n\t}\r\n\tstop() {\r\n\t\tthis._ctx.removeEventListener('change', () => {});\r\n\t\tthis._ctx.removeEventListener('click', () => {});\r\n\t}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t\tfloatControlLabel(this._ctx);\r\n\t}\r\n\r\n\t/**\r\n\t * Set the value of the input field\r\n\t */\r\n\tsetValue(value: string) {\r\n\t\t(this._ctx as HTMLInputElement).value = value;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the value of the input field\r\n\t */\r\n\tgetValue() {\r\n\t\treturn (this._ctx as HTMLInputElement).value;\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('Label')\r\n/**\r\n * label module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class Label extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { PublicEvents, triggerPublicEvent } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('Link')\r\n/**\r\n * heading module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class Link extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('ListUnordered')\r\n/**\r\n * list module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class ListUnordered extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { PublicEvents, triggerPublicEvent } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('LoadingIndicator')\r\n/**\r\n * loading-indicator module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class LoadingIndicator extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('SearchTrigger')\r\n/**\r\n * search-trigger module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class SearchTrigger extends TerrificSpec {\r\n\tsearchFlyoutIsOpen: boolean = false;\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t$($ctx)\r\n\t\t\t.find('.js-search-trigger')\r\n\t\t\t.on('click', this._handleTrigger.bind(this));\r\n\r\n\t\t$(window).on('searchFlyout:close', this._close.bind(this));\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n\r\n\t_close() {\r\n\t\t//toggle icon\r\n\t\t$('.js-search-trigger').removeClass('a-search-trigger__item-link--active');\r\n\t\t$(window).trigger('modalWindow:close');\r\n\t\t//apply header z-index Fix\r\n\t\t$('.o-header').removeClass('o-header--alter-zindex');\r\n\t\tthis.searchFlyoutIsOpen = false;\r\n\t}\r\n\r\n\t_handleTrigger(ev: Event) {\r\n\t\tif (this.searchFlyoutIsOpen === true) {\r\n\t\t\t//hide flyout\r\n\t\t\t$(window).trigger('searchFlyout:close');\r\n\t\t} else {\r\n\t\t\t$(window).trigger('modalWindow:open');\r\n\r\n\t\t\t//apply header z-index Fix\r\n\t\t\t$('.o-header').addClass('o-header--alter-zindex');\r\n\r\n\t\t\t//hide flyout\r\n\t\t\t$('.js-flyout-container').addClass('m-search-flyout--active');\r\n\r\n\t\t\t//toggle icon\r\n\t\t\t$('.js-search-trigger').addClass('a-search-trigger__item-link--active');\r\n\r\n\t\t\t$(window).trigger('searchFlyout:open');\r\n\r\n\t\t\tthis.searchFlyoutIsOpen = true;\r\n\t\t}\r\n\r\n\t\tev.preventDefault();\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('TagFilter')\r\n/**\r\n * tag-filter module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class TagFilter extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('ValidationSummary')\r\n/**\r\n * validation-summary module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class ValidationSummary extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\taccordionElement: 'js-m-accordion-element',\r\n\ttrigger: 'js-m-accordion-element__trigger',\r\n\tactiveState: 'state-m-accordion-element--active',\r\n\tdoNotClose: 'js-m-accordion--donotclose',\r\n};\r\n\r\n@createModule('Accordion')\r\n/**\r\n * Accordion module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class Accordion extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$accordionElements: JQuery;\r\n\tdoNotClose: boolean;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$accordionElements = this.$ctx.find(`.${classes.accordionElement}`);\r\n\t\tthis.doNotClose = this.$ctx.hasClass(classes.doNotClose);\r\n\t\tthis.$ctx.find(`.${classes.trigger}`).on('click', this.onTriggerClick.bind(this));\r\n\t\tresolve();\r\n\t}\r\n\r\n\tonTriggerClick(ev: Event) {\r\n\t\tconst $accordionElement = $(ev.currentTarget).closest(`.${classes.accordionElement}`) as JQuery;\r\n\t\t$accordionElement.toggleClass(classes.activeState);\r\n\t\tif (!this.doNotClose) {\r\n\t\t\tthis.$accordionElements.not($accordionElement).removeClass(classes.activeState);\r\n\t\t}\r\n\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('BrandBenefitList')\r\n/**\r\n * brand-benefit-list module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class BrandBenefitList extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('BrandProductAccordion')\r\n/**\r\n * product-accordion module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class BrandProductAccordion extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\n// @ts-ignore\r\nimport * as IScroll from 'iscroll';\r\n\r\nconst classes = {\r\n\tstateActive: 'state-m-breadcrumb__item--is-active',\r\n\tstateShowAll: 'state-m-breadcrumb--show-all',\r\n\tstateEllipsis: 'state-m-breadcrumb--show-ellipsis',\r\n\tflyoutOpener: 'js-m-breadcrumb__opener',\r\n\tflyout: 'js-m-breadcrumb__flyout',\r\n\tnavItem: 'js-m-breadcrumb__item',\r\n\tscroller: 'js-m-breadcrumb__scroller',\r\n\tscrollerContent: 'js-m-breadcrumb__scroller-content',\r\n\tellipsisToggle: 'js-m-breadcrumb__ellipsis-toggle',\r\n};\r\n\r\nlet initialContentWidth = 0;\r\nlet breadcrumbScroll: IScroll;\r\n\r\n@createModule('Breadcrumb')\r\n/**\r\n * Breadcrumb module implementation.\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class Breadcrumb extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t//adds event handler to open flyouts\r\n\t\tthis.initBreadcrumbOpening($ctx);\r\n\r\n\t\tbreadcrumbScroll = new IScroll(`.${classes.scroller}`, {\r\n\t\t\tmouseWheel: true,\r\n\t\t\tscrollbars: false,\r\n\t\t\tscrollX: true,\r\n\t\t\tscrollY: false,\r\n\t\t});\r\n\r\n\t\tinitialContentWidth = $(`.${classes.scrollerContent}`, $ctx).innerWidth();\r\n\r\n\t\tthis.setEllipsisWhenNotEnoughSpace($ctx);\r\n\r\n\t\t$(window).on('resize.BreadcrumbEllipsing', () => {\r\n\t\t\tthis.setEllipsisWhenNotEnoughSpace($ctx);\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\tinitBreadcrumbOpening($ctx: JQuery) {\r\n\t\tconst breadcrumbOpener = $(`.${classes.navItem}`, $ctx),\r\n\t\t\tellipsisToggle = $(`.${classes.ellipsisToggle}`, $ctx);\r\n\r\n\t\tellipsisToggle.on('click.EnterScrollMode', () => {\r\n\t\t\t$ctx.addClass(classes.stateShowAll);\r\n\t\t\tthis.refreshScroll();\r\n\t\t});\r\n\r\n\t\tbreadcrumbOpener.each((index, elem) => {\r\n\t\t\tlet flyoutOpener = $(elem).find(`.${classes.flyoutOpener}`);\r\n\t\t\tflyoutOpener.on('click.OpenBreadcrumb', (event: Event) => {\r\n\t\t\t\tif (!$(elem).hasClass(classes.stateActive)) {\r\n\t\t\t\t\tthis.openFlyoutAndDisableScrolling(elem, breadcrumbScroll, breadcrumbOpener);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.closeAllFlyoutsAndReenableScrolling(breadcrumbScroll, breadcrumbOpener);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.refreshScroll();\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tevent.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\t// needed to not trigger touchend on body on mobile devices when flyoutOpener is hit to prevent toggle off/on effect and closing when inner touch-scrolling ends\r\n\t\t\t$(elem).on('touchend.OpenBreadCrumb', (event: Event) => {\r\n\t\t\t\tif ($(elem).hasClass(classes.stateActive)) {\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t$('body').on('click.closeBreadCrumb touchend.closeBreadCrumb', () => {\r\n\t\t\tthis.closeAllFlyoutsAndReenableScrolling(breadcrumbScroll, breadcrumbOpener);\r\n\t\t});\r\n\t}\r\n\r\n\topenFlyoutAndDisableScrolling(flyoutElement: HTMLElement, breadcrumbScroll: IScroll, breadcrumbOpener: JQuery) {\r\n\t\tbreadcrumbScroll.disable();\r\n\t\tbreadcrumbOpener.removeClass(classes.stateActive);\r\n\t\t$(flyoutElement).addClass(classes.stateActive);\r\n\t\tbreadcrumbScroll.refresh();\r\n\t\tthis.autoScrollIfOutOfScreen(flyoutElement);\r\n\t}\r\n\r\n\tautoScrollIfOutOfScreen(flyoutElement: HTMLElement) {\r\n\t\tconst flyoutLeft = $(flyoutElement)\r\n\t\t\t.find(`.${classes.flyout}`)\r\n\t\t\t.offset().left;\r\n\t\tconst flyoutWidth = $(flyoutElement)\r\n\t\t\t.find(`.${classes.flyout}`)\r\n\t\t\t.width();\r\n\t\tconst offset = 10;\r\n\r\n\t\tif (flyoutLeft < offset) {\r\n\t\t\tbreadcrumbScroll.scrollToElement(flyoutElement, 300, -1 * offset);\r\n\t\t} else if (flyoutLeft >= offset && flyoutLeft + flyoutWidth + offset > $('body').width()) {\r\n\t\t\tbreadcrumbScroll.scrollToElement(flyoutElement, 300, offset - ($('body').width() - flyoutWidth));\r\n\t\t}\r\n\t}\r\n\r\n\tcloseAllFlyoutsAndReenableScrolling(breadcrumbScroll: IScroll, breadcrumbOpener: JQuery) {\r\n\t\tbreadcrumbScroll.enable();\r\n\t\tbreadcrumbOpener.removeClass(classes.stateActive);\r\n\t}\r\n\r\n\tsetEllipsisWhenNotEnoughSpace($ctx: JQuery) {\r\n\t\tconst isNotEnoughSpace = $(`.${classes.scroller}`, $ctx).outerWidth() < initialContentWidth;\r\n\t\t$ctx.toggleClass(classes.stateEllipsis, isNotEnoughSpace);\r\n\t\tthis.refreshScroll();\r\n\t}\r\n\r\n\trefreshScroll() {\r\n\t\tsetTimeout(() => {\r\n\t\t\tbreadcrumbScroll.refresh();\r\n\t\t}, 0);\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { MarketoLightbox } from '../../../molecules/marketo-lightbox/js/marketo-lightbox';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tlightboxComponent: \"js-m-marketo-lightbox-component\"\r\n}\r\n\r\nconst moduleName = \"CampaignDownload\";\r\n@createModule('CampaignDownload')\r\nexport class CampaignDownload extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tautoDownload: boolean;\r\n\tdownloadLink: string;\r\n\tflowId: string;\r\n\tnoActionForKnownUsers: boolean;\r\n\tcloseButtonDisabled: boolean;\r\n\tthemeAttribute: string;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.autoDownload = this.$ctx.data(\"auto-download\");\r\n\t\tthis.downloadLink = this.$ctx.data(\"download-url\");\r\n\t\tthis.flowId = this.$ctx.data(\"mkto-flowid\");\r\n\t\tthis.noActionForKnownUsers = this.$ctx.data(\"no-action\");\r\n\t\tthis.closeButtonDisabled = this.$ctx.data(\"mktoflow-close-disabled\");\r\n\t\tthis.themeAttribute = this.$ctx.data(\"mkto-themeattribute\");\r\n\r\n\t\tif (this.autoDownload) {\r\n\t\t\tif (this.flowId != undefined) {\r\n\t\t\t\tif (this.flowId.length > 0) {\r\n\t\t\t\t\tif (!Track.isKnownMarketoLead()) {\r\n\t\t\t\t\t\tlet lightboxComponent = $(\"html\").find(`.${classes.lightboxComponent}`);\r\n\t\t\t\t\t\tif (lightboxComponent.length > 0) {\r\n\t\t\t\t\t\t\tlet lightbox = getModuleByDomNode(lightboxComponent[0]) as MarketoLightbox;\r\n\t\t\t\t\t\t\tlightbox.start(resolve);\r\n\t\t\t\t\t\t\tlightbox.getMktoLightboxView(this.flowId, this.downloadLink, this.closeButtonDisabled, this.themeAttribute);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tconsole.log(`${moduleName}, lightboxComponent doesn't exist on current page.`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (Track.isKnownMarketoLead() && !this.noActionForKnownUsers) {\r\n\t\t\t\t\t\twindow.location.href = this.downloadLink;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tconsole.log(`${moduleName}, known user: ${Track.isKnownMarketoLead()}, no action: ${this.noActionForKnownUsers}`);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t}\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('CategoryTags')\r\n/**\r\n * category-tags module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class CategoryTags extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Overlays from '@project/shared/utils/overlays/js/overlays';\r\nimport * as Cookies from 'js-cookie';\r\n\r\nconst classes = {\r\n\tregionIcon: 'm-navigation-meta__selected-item',\r\n\tregionPopup: 'regionPopup',\r\n\tcloseIcon: 'closeIcon',\r\n\tlink: 'js-m-region-lightbox__link',\r\n};\r\n\r\n@createModule('RegionLightbox')\r\n\r\nexport class RegionLightbox extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\t\t\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tif (!this.hasUserInteracted()) {\r\n\t\t\tOverlays.ShowOverlay(() => {\r\n\t\t\t\tthis.$ctx.find(`.${classes.regionPopup}`).show();\r\n\r\n\t\t\t\tthis.$ctx.find(`.${classes.link}`).on('click', this.adjustLinkUrl.bind(this));\r\n\t\t\t\tvar getApiUrl = this.$ctx.find('.popupBody').attr(\"getUrl\")\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\tmethod: 'get',\r\n\t\t\t\t\turl: getApiUrl,\r\n\t\t\t\t\tsuccess: this.getRegionData.bind(this),\r\n\t\t\t\t});\r\n\t\t\t}, 250);\r\n\t\t}\r\n\t\t\r\n\t\tthis.$ctx.find(`.${classes.closeIcon}`).on('click', () => {\r\n\t\t\tthis.markUserHasInteracted();\r\n\r\n\t\t\tOverlays.CloseOverlay(() => { \r\n\t\t\t\tthis.$ctx.find(`.${classes.regionPopup}`).hide();\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tgetRegionData(data: any) {\r\n\t\tconsole.log(data);\r\n\t\tvar regionLabel = data.RegionId;\r\n\t\tvar countryLabel = data.CountryId;\r\n\t\tvar regionsList = data.Regions;\r\n\t\tvar regions = document.querySelector('[name=regions]');\r\n\t\tvar options = '';\r\n\t\tvar regionDropdown = $('.popupBody p')[0];\r\n\t\tregionDropdown.firstElementChild.innerHTML = regionLabel;\r\n\t\tvar countryDropdown = $('.popupBody p')[1];\r\n\t\tcountryDropdown.firstElementChild.innerHTML = countryLabel;\r\n\r\n\t\tfor(var i=0; i < regionsList.length; i++) {\r\n\t\t\toptions += '';\r\n\t\t}\r\n\t\tregions.innerHTML = options;\r\n\r\n\t\tregions.addEventListener('change', function(e) {\r\n\t\t\tfor (var j = 0; j < regionsList.length; j++) {\r\n\t\t\t\tif(regionsList[j][\"RegionCode\"] == this.value){\r\n\t\t\t\t\tvar country = '';\r\n\t\t\t\t\tfor (var k = 0; k < regionsList[j].Countries.length; k++) {\r\n\t\t\t\t\t\tcountry += '';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdocument.querySelector('[name=countries]').innerHTML = country;\r\n\t\t});\r\n\t}\r\n\r\n\tadjustLinkUrl() {\r\n\t\tthis.markUserHasInteracted();\r\n\r\n\t\tconst postApiUrl = $('.popupBody').attr(\"postUrl\");\t\t\r\n\t\tvar countries = document.querySelector('[name=countries]');\r\n\t\tconst CountryCode = $(countries).val();\r\n\r\n\t\t\r\n\t\tif(CountryCode){\r\n\t\t\t $.ajax({\r\n\t\t\t\t type: 'POST',\r\n\t\t\t\t url: postApiUrl,\r\n\t\t\t\t dataType: 'html',\r\n\t\t\t\t data: {CountryCode},\r\n\t\t\t\t success: (response: any) => {\r\n\t\t\t\t\t console.log(\"success\");\r\n\t\t\t\t\t console.log(response);\r\n\t\t\t\t\t $(`.${classes.regionPopup}`).hide();\r\n\t\t\t\t\t\tlocation.reload(); \r\n\t\t\t\t },\r\n\t\t\t\t complete: () => {\r\n\t\t\t\t\t console.log(\"complete\");\r\n\t\t\t\t },\r\n\t\t\t\t error: () => {\r\n\t\t\t\t\t console.log(\"post country name data error\");\r\n\t\t\t\t }\r\n\t\t\t });\r\n\t\t}\r\n\t}\r\n\t\r\n\tprivate hasUserInteracted(): boolean {\r\n\t\tconst cookie = Cookies.get('RegionPopup');\r\n\t\treturn cookie == \"1\";\r\n\t}\r\n\r\n\tprivate markUserHasInteracted(): void {\r\n\t\tCookies.set('RegionPopup', \"1\", { expires: 365 });\r\n\t}\r\n\r\n\tstop() { }\r\n\t\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('Datasheet')\r\n/**\r\n * datasheet module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class Datasheet extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nimport 'select2'; // TODO: DO NOT => globally assign select2 fn to $ element\r\n\r\nconst classes = {\r\n\tdownloadButton: 'js-m-download-item__button-download',\r\n\tlanguageSelect: 'js-m-download-item__language-selector',\r\n\tselected: 'state-m-download-item--selected',\r\n};\r\n\r\n@createModule('DownloadItem')\r\n/**\r\n * download-item module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class DownloadItem extends TerrificSpec {\r\n\tasync start(resolve: Function) {\r\n\t\tconst $select = this._getLanguageSelect() as any;\r\n\r\n\t\t$select.select2({\r\n\t\t\tminimumResultsForSearch: -1,\r\n\t\t\twidth: 'auto',\r\n\t\t});\r\n\r\n\t\t$select.on('change', () => this.updateDownloadButton());\r\n\r\n\t\t/**\r\n\t\t * update url on init\r\n\t\t */\r\n\t\tthis.updateDownloadButton();\r\n\r\n\t\tthis.RegisteredUpdate();\r\n\t\t\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t/**\r\n\t * returns jQuery ode Element\r\n\t */\r\n\t_getDownloadButton() {\r\n\t\treturn $(this._ctx).find(`.${classes.downloadButton}`);\r\n\t}\r\n\t/**\r\n\t * returns DOM Element\r\n\t */\r\n\t_getLanguageSelect() {\r\n\t\treturn $(this._ctx).find(`.${classes.languageSelect}`);\r\n\t}\r\n\r\n\t/**\r\n\t * Get input select value\r\n\t */\r\n\tgetLanguageSelectValue(): string {\r\n\t\treturn this._getLanguageSelect().val() as string;\r\n\t}\r\n\r\n\t/**\r\n\t * Setter for download button url\r\n\t */\r\n\tsetDownloadURL(href: string) {\r\n\t\tthis._getDownloadButton().attr('href', href);\r\n\t}\r\n\r\n\t/**\r\n\t * update download button\r\n\t */\r\n\tupdateDownloadButton() {\r\n\t\tthis.setDownloadURL(this.getLanguageSelectValue());\r\n\t}\r\n\r\n\tRegisteredUpdate() {\r\n\t\tif(Track.isKnownMarketoLead()) {\r\n\t\t\t$(this._ctx).removeClass('m-download-item--locked');\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tsdsTerm: 'js-m-download-list__term--sds',\r\n\tsdsTermActive: 'state-m-download-list__term--sds-active',\r\n\tsdsDefinition: 'js-m-download-list__definition--sds',\r\n\tsdsDefinitionActive: 'state-m-download-list__definition--sds-active',\r\n\tlanguageSelector: 'js-m-download-item__language-selector',\r\n\tentries: 'js-m-download-list__entry',\r\n\thideEntries: 'state-m-download-list--hide-entries',\r\n\tstateHidden: 'state-m-download-list__entry--hidden',\r\n\tloadMoreButton: 'js-m-download-list__load-more-button',\r\n\titemHeading: 'js-m-download-list__heading',\r\n};\r\n\r\n@createModule('DownloadList')\r\n/**\r\n * download-list module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class DownloadList extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tsdsElements: JQuery[];\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.initSds();\r\n\t\tthis.initLoadMoreEntries();\r\n\t\tthis.showTitle();\r\n\t\tthis.changeTitle();\r\n\t\tresolve();\r\n\t}\r\n\tinitSds() {\r\n\t\tthis.sdsElements = [this.$ctx.find(`.${classes.sdsTerm}`), this.$ctx.find(`.${classes.sdsDefinition}`)];\r\n\t\tif (this.sdsElements[0].length > 0 && this.sdsElements[1].length > 0) {\r\n\t\t\tconst serviceUrl = this.$ctx.data('sds-service');\r\n\t\t\tif (serviceUrl) {\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\tmethod: 'get',\r\n\t\t\t\t\turl: serviceUrl,\r\n\t\t\t\t\tsuccess: this.onSdsAjaxSuccess.bind(this),\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tonSdsAjaxSuccess(data: any) {\r\n\t\tif (data.error || !Array.isArray(data.sdsDownloads) || data.sdsDownloads.length < 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst $selectElement = this.sdsElements[1].find(`.${classes.languageSelector}`);\r\n\t\t$selectElement.empty();\r\n\t\tfor (let el of data.sdsDownloads) {\r\n\t\t\t$selectElement.append(``);\r\n\t\t}\r\n\t\t$selectElement.trigger('change');\r\n\t\tif (data.sdsDownloads.length === 1) {\r\n\t\t\t$selectElement.addClass('a-input-select--readonly').prop('disabled', true);\r\n\t\t}\r\n\t\tthis.sdsElements[0].addClass(classes.sdsTermActive);\r\n\t\tthis.sdsElements[1].addClass(classes.sdsDefinitionActive);\r\n\t}\r\n\tshowTitle() {\r\n\t\tconst $headingElement = this.$ctx.find(`.${classes.itemHeading}`);\r\n\t\t$headingElement.each((i,e) => {\r\n\t\t\tconst $headingItem = $(e);\r\n\t\t\t$headingItem.find(\"span\").first().addClass(\"active\");\r\n\t\t});\r\n\t}\r\n\tchangeTitle() {\r\n\t\tconst $languageSelect = this.$ctx.find(`.${classes.languageSelector}`);\r\n\t\t$languageSelect.on(\"change\",function(ev: Event){\r\n\t\t\tvar language = $(ev.currentTarget).find(\"option:selected\").text();\r\n\t\t\tvar activeEle = $(ev.currentTarget).parents(\"dd\").prev(\"dt\").find(\".active\");\r\n\t\t\tif(activeEle.length == 0) return;\r\n\t\t\tvar curLanguage = activeEle.attr(\"class\").substring(0,2);\r\n\t\t\tif (language!==curLanguage) {\r\n\t\t\t\t$(ev.currentTarget).parents(\"dd\").prev(\"dt\").find(\"span\").removeClass(\"active\");\r\n\t\t\t\t$(ev.currentTarget).parents(\"dd\").prev(\"dt\").find(\".\"+language).addClass(\"active\");\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\t/**\r\n\t * method handles hide/show of entries\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tinitLoadMoreEntries() {\r\n\t\tconst minOfShowEntries = this.$ctx.data('shown-entries');\r\n\t\tif (minOfShowEntries) {\r\n\t\t\tconst $entries = this.$ctx.find(`.${classes.entries}`);\r\n\r\n\t\t\tif ($entries.length / 2 > minOfShowEntries) {\r\n\t\t\t\tthis.$ctx.addClass(classes.hideEntries);\r\n\t\t\t\t$entries.filter(`:nth-child(n + ${minOfShowEntries * 2 + 1})`).addClass(classes.stateHidden);\r\n\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreButton}`).on('click', (ev: any) => {\r\n\t\t\t\t\tthis.$ctx.removeClass(classes.hideEntries);\r\n\t\t\t\t\t$entries.removeClass(classes.stateHidden);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { onPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport { createModule, startNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n container: 'js-m-download-table__container',\r\n\tcounterFooter: 'js-download-table__counter-footer',\r\n filterItem: 'js-m-download-table__filter-item',\r\n listItem: 'js-m-download-table__item',\r\n loadMoreButton: 'js-load-more-button',\r\n groupWrapper: 'js-m-download-table__group',\r\n stateHidden: 'state-m-download-table__hidden',\r\n stateItemHidden: 'state-m-download-table__item-hide',\r\n descText: 'm-download-table__item-description',\r\n stateDescExpanded: 'status-m-download-table__item-description--expanded',\r\n descShowBtn: 'js-m-download-table__show-description',\r\n stateBtnVisible: 'status-m-download-table__show-description--visible',\r\n gatedItem: 'm-download-table__item--gated',\r\n inputKeywordSearch: 'm-filter-keywordsearch__input',\r\n};\r\n\r\nconst dataAttributes = {\r\n apiEndpoint: 'api-endpoint',\r\n configuration: 'configuration',\r\n filterConfiguration: 'filters',\r\n};\r\n\r\nexport interface IDownloadTableOptions {\r\n\tapiEndpoint: string;\r\n\tconfiguration: string;\r\n\tfilters: {id:string}[];\r\n}\r\n\r\ninterface IDownloadTableFilter {\r\n\t$element: JQuery,\r\n\tid: string,\r\n}\r\n\r\n@createModule('DownloadTable')\r\n/**\r\n * download-table module implementation.\r\n */\r\nexport class DownloadTable extends TerrificSpec {\r\n private $ctx: JQuery;\r\n\r\n private currentCount: number;\r\n\tprivate totalCount: number;\r\n\r\n\tprivate filters: IDownloadTableFilter[];\r\n private options: IDownloadTableOptions;\r\n\r\n\tasync start(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.options = {\r\n\t\t\tapiEndpoint: this.$ctx.data(dataAttributes.apiEndpoint),\r\n\t\t\tconfiguration: this.$ctx.data(dataAttributes.configuration),\r\n\t\t\tfilters: this.$ctx.data(dataAttributes.filterConfiguration),\r\n\t\t};\r\n\t\tthis.filters = this.createFilters();\r\n\r\n\t\t// Assign events\r\n this.$ctx.on('click', `.${classes.descShowBtn}`, this.showDescription.bind(this));\r\n\t\tthis.$ctx.on('click', `.${classes.loadMoreButton}`, this.loadMore.bind(this));\r\n\r\n for (let i = 0; i < this.filters.length; i++) {\r\n const filter = this.filters[i];\r\n onPublicEvent(PublicEvents.uxChange, filter.$element[0], (event: Event, data: object) => {\r\n this.facetAndList();\r\n });\r\n }\r\n \r\n\t\t// Initiate\r\n\t\tthis.updateLoadMore(false);\r\n\t\tthis.facetAndList();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n stop() {\r\n }\r\n\r\n\tprivate createFilters(): IDownloadTableFilter[]{\r\n\t\tlet results: IDownloadTableFilter[] = [];\r\n\r\n\t\tfor (let i = 0; i < this.options.filters.length; i++) {\r\n\t\t\tconst filter = this.options.filters[i];\r\n\t\t\tconst element = document.getElementById(filter.id);\r\n\t\t\tif (element != null) {\r\n\t\t\t\tresults.push({\r\n\t\t\t\t\t$element: $(element),\r\n\t\t\t\t\tid: filter.id\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tprivate getSelectedFacets(): { id: string, value: string }[] {\r\n\t\tlet results: { id: string, value: string }[] = [];\r\n\r\n\t\tfor (let i = 0; i < this.filters.length; i++) {\r\n\t\t\tconst filter = this.filters[i];\r\n\t\t\tconst value = filter.$element.val();\r\n\t\t\tif (value) {\r\n\t\t\t\tresults.push({ id: filter.id, value: value });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n private facetAndList(): void {\r\n this.$ctx.find(`.${classes.inputKeywordSearch}`).val(\"\");\r\n const payload = {\r\n configuration: this.options.configuration,\r\n facets: this.getSelectedFacets(),\r\n offset: 0\r\n };\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: this.options.apiEndpoint,\r\n data: payload,\r\n dataType: 'html'\r\n }).done((response: string, status: JQuery.Ajax.SuccessTextStatus, jqXhr: JQuery.jqXHR) => {\r\n \r\n const container = this.$ctx.find(`.${classes.container}`);\r\n container.html(response);\r\n \r\n // Look for a script tag containing extra data.\r\n const data = container.find(\"script[type='application/json']\");\r\n if (data.length > 0) {\r\n const json = data[0].innerHTML;\r\n const jsonData = JSON.parse(json);\r\n\r\n\t\t\t\tthis.updateCounters(jsonData.count, jsonData.displayed, jsonData.footer);\r\n this.updateLoadMore(jsonData.showMore);\r\n this.initializeComponents();\r\n\r\n this.RegisteredUpdate();\r\n\r\n // Remove the script tag.\r\n data.remove();\r\n } else {\r\n // No response data.\r\n this.updateLoadMore(false);\r\n }\r\n });\r\n }\r\n\r\n\tprivate loadMore(): void {\r\n this.$ctx.find(`.${classes.inputKeywordSearch}`).val(\"\");\r\n const payload = {\r\n configuration: this.options.configuration,\r\n facets: this.getSelectedFacets(),\r\n offset: this.currentCount,\r\n }\r\n\t\t\r\n $.ajax({\r\n type: 'POST',\r\n url: this.options.apiEndpoint,\r\n data: payload,\r\n dataType: 'html'\r\n }).done((response: string, status: JQuery.Ajax.SuccessTextStatus, jqXhr: JQuery.jqXHR) => {\r\n \r\n const container = this.$ctx.find(`.${classes.container}`);\r\n container.append(response);\r\n \r\n // Look for a script tag containing extra data.\r\n const data = container.find(\"script[type='application/json']\");\r\n if (data.length > 0) {\r\n const json = data[0].innerHTML;\r\n const jsonData = JSON.parse(json);\r\n\r\n\t\t\t\tthis.updateCounters(jsonData.count, jsonData.displayed, jsonData.footer);\r\n\t\t\t\tthis.updateLoadMore(jsonData.showMore);\r\n this.initializeComponents();\r\n this.initializeShowMoreLinks();\r\n\r\n this.RegisteredUpdate();\r\n \r\n // Remove the script tag.\r\n data.remove();\r\n } else {\r\n // No response data.\r\n this.updateLoadMore(false);\r\n }\r\n });\r\n }\r\n\r\n\tprivate updateCounters(count: number, displayed: number, footer: string): void {\r\n\t\tthis.currentCount = displayed,\r\n\t\tthis.totalCount = count;\r\n\t\tthis.$ctx.find(`.${classes.counterFooter}`).text(footer);\r\n this.$ctx.find(`.${classes.counterFooter}`).attr(\"data-currentcount\", this.currentCount)\r\n\t}\r\n\r\n private updateLoadMore(enabled: boolean): void {\r\n if (enabled)\r\n this.$ctx.find(`.${classes.loadMoreButton}`).show();\r\n else\r\n this.$ctx.find(`.${classes.loadMoreButton}`).hide();\r\n }\r\n\r\n private initializeComponents(): void{\r\n // Find all non-initialized terrific components in the container \r\n const terrificSelector = '[data-t-name=\"DownloadItem\"]:not([data-t-id])';\r\n this.$ctx.find(`.${classes.container}`).find(terrificSelector).each((i,e) => {\r\n startNode(e);\r\n });\r\n }\r\n\r\n private initializeShowMoreLinks(): void {\r\n const $descText = this.$ctx.find(`.${classes.descText}`);\r\n setTimeout(() => {\r\n for (let i = 0; i < $descText.length; i++) {\r\n const instance = $descText[i];\r\n if (instance.scrollHeight > 44) {\r\n $(instance).next().addClass(classes.stateBtnVisible);\r\n };\r\n }\r\n }, 100);\r\n }\r\n\r\n private showDescription(e: JQuery.Event): void {\r\n $(e.currentTarget).prev().addClass(classes.stateDescExpanded);\r\n $(e.currentTarget).removeClass(classes.stateBtnVisible);\r\n }\r\n\r\n private RegisteredUpdate() {\r\n\t\tconst $gatedItem = this.$ctx.find(`.${classes.gatedItem}`);\r\n\t\tif(Track.isKnownMarketoLead()) {\r\n $gatedItem.each((i,e) => {\r\n $(e).removeClass('m-download-table__item--locked');\r\n });\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Overlays from '@project/shared/utils/overlays/js/overlays';\r\n\r\nconst classes = {\r\n\tcloseButton: 'js-m-favourite-layer__close',\r\n\tactiveClass: 'state-favourite-popup--visible',\r\n};\r\n\r\n@createModule('FavouriteLayer')\r\n/**\r\n * favourite-layer module implementation.\r\n */\r\nexport class FavouriteLayer extends TerrificSpec {\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t$(`.${classes.closeButton}`, $ctx).on('click', this.hideLayer.bind(this));\r\n\t\t\r\n\t\tthis.showLayer();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * method hides cookiebar\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thideLayer() {\r\n\t\tOverlays.CloseOverlay(() => $(this._ctx).removeClass(classes.activeClass));\r\n\t}\r\n\r\n\t/**\r\n\t * method hides cookiebar\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tshowLayer() {\r\n\t\tOverlays.ShowOverlay(() => $(this._ctx).addClass(classes.activeClass), 0);\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tlanguageSelector: 'js-m-download-item__language-selector',\r\n\tfileInfo: 'js-m-featured-download__file-info',\r\n\tdownloadItem: 'js-m-featured-download__item',\r\n\tstateHidden: 'h-visuallyhidden',\r\n\tloadMoreButton: 'js-load-more-button',\r\n\tloadMoreBar: 'js-load-more-bar',\r\n};\r\n\r\n@createModule('FeaturedDownload')\r\n/**\r\n * featured-download module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class FeaturedDownload extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tisOpen: boolean;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.isOpen = false;\r\n\t\tthis.showFileInfo();\r\n\t\tthis.changeFileInfo();\r\n\t\tthis.initLoadMore();\r\n\r\n\t\tresolve();\r\n\t}\r\n\t\r\n\t\r\n\tshowFileInfo() {\r\n\t\tconst $languageSelect = this.$ctx.find(`.${classes.languageSelector}`);\r\n\t\t$languageSelect.each((i,e) => {\r\n\t\t\tvar language = $(e).find(\"option:selected\").text();\r\n\t\t\t$(e).parents(`.${classes.downloadItem}`).find(\".\"+language).addClass(\"active\");\r\n\t\t});\r\n\t}\r\n\tchangeFileInfo() {\r\n\t\tconst $languageSelect = this.$ctx.find(`.${classes.languageSelector}`);\r\n\t\t$languageSelect.on(\"change\",function(ev: Event){\r\n\t\t\tvar language = $(ev.currentTarget).find(\"option:selected\").text();\r\n\t\t\tvar activeElement = $(ev.currentTarget).parents(`.${classes.downloadItem}`).find(\".active\");\r\n\t\t\tif(activeElement.length == 0) return;\r\n\t\t\tvar curLanguage = activeElement.attr(\"class\").substring(0,2);\r\n\t\t\tif (language!==curLanguage) {\r\n\t\t\t\t$(ev.currentTarget).parents(`.${classes.downloadItem}`).find(\"span\").removeClass(\"active\");\r\n\t\t\t\t$(ev.currentTarget).parents(`.${classes.downloadItem}`).find(\".\"+language).addClass(\"active\");\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\t/**\r\n\t * method handles hide/show of entries\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tinitLoadMore() {\r\n\t\t// if this an Application/Evergreen and not one of the other download items and it has not yet been opened:\r\n\t\tif (typeof this.$ctx.data('shown-items') !== 'undefined' && this.isOpen === false) {\r\n\t\t\tconst $downloadItems = this.$ctx.find(`.${classes.downloadItem}`);\r\n\t\t\tlet minOfShowDownloadItems = this.$ctx.data('shown-items');\r\n\t\t\tlet PageSizeLoadMore = this.$ctx.data('load-items');\r\n\r\n\t\t\tif ($downloadItems.length <= minOfShowDownloadItems) {\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreBar}`).addClass(classes.stateHidden);\r\n\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t\t\t} else {\r\n\t\t\t\tminOfShowDownloadItems++;\r\n\t\t\t\t$downloadItems.filter(`:nth-child(n + ` + minOfShowDownloadItems + `)`).addClass(classes.stateHidden);\r\n\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\r\n\t\t\t\tlet currentShowDownloadItems = minOfShowDownloadItems -1;\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreButton}`).on('click', (ev: any) => {\r\n\t\t\t\t\tlet allOfShowDownloadItems = currentShowDownloadItems + PageSizeLoadMore;\r\n\t\t\t\t\tfor( var i=0; i= $downloadItems.length) {\r\n\t\t\t\t\t\t\t$(ev.currentTarget)\r\n\t\t\t\t\t\t\t\t.parent(`.${classes.loadMoreBar}`)\r\n\t\t\t\t\t\t\t\t.addClass(classes.stateHidden);\r\n\r\n\t\t\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\n@createModule('FilterMarketSwitch')\r\n/**\r\n * filter-market-switch module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class FilterMarketSwitch extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\nconst classes = {\r\n\tlistFirstLevel: 'js-m-filter-multiselect__list-level1',\r\n\tlistFirstLevelOpen: 'm-filter-multiselect__list-level1--open',\r\n\tlistFirstLevelShadow: 'm-filter-multiselect__list-level1--shadow',\r\n\titemFirstLevel: 'js-m-filter-multiselect__item--level1',\r\n\titemFirstLevelOpen: 'm-filter-multiselect__item--level1-open',\r\n\titemFirstLevelHeaderMobile: 's-filter-multiselect__item-link--main',\r\n\titemFirstLevelHeaderMobileOpen: 's-filter-multiselect__item-link--main-header',\r\n\tmainItemLink: 'js-m-filter-multiselect__item-link--main',\r\n\tmainItemChecked: 'm-filter-multiselect__item-link--main-checked',\r\n\tlayerSecondLevelBacklink: 'js-m-filter-multiselect__backlink',\r\n\tlayerSecondLevelHeader: 'js-m-filter-multiselect__layer-header-level2',\r\n\tlayerSecondLevelSubfilterOpen: 'm-filter-multiselect__layer-level2--with-sublevel',\r\n\titemSecondLevel: 'js-m-filter-multiselect__item--level2',\r\n\tconfirmButton: 'js-m-filter-multiselect__confirm-button',\r\n\tfloatLabel: 'state-a-label--is-floated',\r\n\tfocusLabel: 'state-a-label--is-focus',\r\n\tcloseFilter: 's-filter-multiselect__item-link--main-close-icon'\r\n}\r\n\r\n@createModule('FilterMultiselect')\r\n/**\r\n * $filter-multiselect terrific module implementation\r\n *\r\n * @author Sandy Zhao \r\n */\r\nexport class FilterMultiselect extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$confirmButton: JQuery;\r\n\t$itemSecondLevel: JQuery;\r\n\t$listFirstLevel: JQuery;\r\n\t$itemFirstLevel: JQuery;\r\n\t$itemFirstLevelHeaderMobile: JQuery;\r\n\t$floatLabel: JQuery;\r\n\t$closeFilter: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$confirmButton = $(`.${classes.confirmButton}`, this.$ctx);\r\n\t\tthis.$itemSecondLevel = $(`.${classes.itemSecondLevel}`, this.$ctx);\r\n\t\tthis.$listFirstLevel = $(`.${classes.listFirstLevel}`, this.$ctx);\r\n\t\tthis.$itemFirstLevel = $(`.${classes.itemFirstLevel}`, this.$ctx);\r\n\t\tthis.$itemFirstLevelHeaderMobile = $(`.${classes.itemFirstLevelHeaderMobile}`, this.$ctx);\r\n\t\tthis.$closeFilter = $(`.${classes.closeFilter}`, this.$ctx);\r\n\r\n\t\tthis.$floatLabel = this.$ctx.prev();\r\n\t\tthis.$floatLabel.addClass(classes.floatLabel);\r\n\r\n\t\tthis.$ctx.on('click', `.${classes.listFirstLevel}, .${classes.layerSecondLevelHeader}`, this.onToggleOverlayClick.bind(this));\r\n\r\n\t\tthis.$confirmButton.on('click', this.onConfirmButtonClick.bind(this));\r\n\t\tthis.$closeFilter.on('click', this.onCloseFilter.bind(this));\r\n\r\n\t\tthis.$ctx.on('click', `.${classes.itemSecondLevel}`, this.onPrimaryfilterClick.bind(this));\r\n\r\n\t\t$('input[type=checkbox]', this.$ctx).on('click',\r\n\t\t\t(event: Event) => {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t});\r\n\r\n\t\tthis.setFilterCheckedClass();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tonToggleOverlayClick(event: Event) {\r\n\t\tthis.toggleFilter();\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\t}\r\n\r\n\tonConfirmButtonClick(event: Event) {\r\n\t\tthis.closeFilter();\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonCloseFilter(event: Event) {\r\n\t\tthis.closeFilter();\r\n\t\tthis.$ctx.trigger('FilterMultiCloseButton', [event]);\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonPrimaryfilterClick(event: Event) {\r\n\t\tconst $checkbox = $(event.currentTarget as HTMLElement).find('input[type=checkbox]');\r\n\t\tif ($checkbox.prop(\"disabled\")) return false;\r\n\t\tthis.setFilter($checkbox);\r\n\t\tthis.$ctx.trigger('FilterMultiCheckboxChanged',[event]);\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tsetFilter($checkbox: JQuery) {\r\n\t\t$checkbox.prop('checked', !$checkbox.prop('checked'));\r\n\t\tthis.$confirmButton.show();\r\n\r\n\t\tthis.setFilterCheckedClass();\r\n\t}\r\n\r\n\tisAnyFilterChecked($checkboxes: JQuery = $('input[type=checkbox]', this.$ctx)) {\r\n\t\treturn $checkboxes.toArray().some(this.isElementChecked);\r\n\t}\r\n\r\n\tisElementChecked(element: HTMLInputElement): any {\r\n\t\treturn element.checked;\r\n\t}\r\n\r\n\tsetFilterCheckedClass() {\r\n\t\t$(`.${classes.mainItemLink}`, this.$ctx).toggleClass(classes.mainItemChecked, this.isAnyFilterChecked());\r\n\t}\r\n\r\n\ttoggleFilter(toggleState?: any) {\r\n\t\tthis.closeAllSubFilterValues();\r\n\t\tthis.$confirmButton.hide();\r\n\t\tthis.$listFirstLevel\r\n\t\t\t.toggleClass(classes.listFirstLevelOpen, toggleState)\r\n\t\t\t.toggleClass(classes.listFirstLevelShadow, toggleState);\r\n\r\n\t\tthis.$itemFirstLevel.toggleClass(classes.itemFirstLevelOpen, toggleState);\r\n\t\tthis.$floatLabel.toggleClass(classes.focusLabel, toggleState);\r\n\t\tthis.$itemFirstLevelHeaderMobile.toggleClass(classes.itemFirstLevelHeaderMobileOpen, toggleState);\r\n\t}\r\n\r\n\topenFilter() {\r\n\t\tthis.toggleFilter(true);\r\n\t}\r\n\r\n\tcloseFilter() {\r\n\t\tthis.toggleFilter(false);\r\n\t}\r\n\r\n\topenFilterValueClick(event: Event) {\r\n\t\tconst $currentTargetElement = $(event.currentTarget);\r\n\r\n\t\tthis.$itemSecondLevel.hide();\r\n\t\t$currentTargetElement\r\n\t\t\t.closest(`.${classes.itemSecondLevel}`)\r\n\t\t\t.show();\r\n\t}\r\n\r\n\tcloseAllSubFilterValues() {\r\n\t\tthis.$itemSecondLevel.show();\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('FilterProductsearch')\r\n/**\r\n * filter-productsearch module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class FilterProductsearch extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('FilterCategorysearch')\r\n/**\r\n * filter-categorysearch module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class FilterCategorysearch extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('FilterCategorysearchSingleLevel')\r\n/**\r\n * filter-categorysearch module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class FilterCategorysearchSingleLevel extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\n@createModule('FavouritesEntryTable')\r\n/**\r\n * favourites-entry-table\r\n *\r\n */\r\nexport class FavouritesEntryTable extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule,getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n \r\n\r\n@createModule('FavouritesList')\r\n/**\r\n * favourites-list\r\n *\r\n */\r\nexport class FavouritesList extends TerrificSpec {\r\n\t$ctx: JQuery; \r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n \r\n \r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('FilterSingleselect')\r\n/**\r\n * filter-singleselect module implementation.\r\n *\r\n * @author Dishan Sivakumaran \r\n */\r\nexport class FilterSingleselect extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\nconst classes = {\r\n\tlistFirstLevel: 'js-m-filter-two-level-multiselect__list-level1',\r\n\tlistFirstLevelOpen: 'm-filter-two-level-multiselect__list-level1--open',\r\n\tlistFirstLevelShadow: 'm-filter-two-level-multiselect__list-level1--shadow',\r\n\titemFirstLevel: 'js-m-filter-two-level-multiselect__item--level1',\r\n\titemFirstLevelOpen: 'm-filter-two-level-multiselect__item--level1-open',\r\n\titemFirstLevelHeaderMobile: 'm-filter-two-level-multiselect__item-link--main-mobile',\r\n\titemFirstLevelHeaderMobileOpen: 'm-filter-two-level-multiselect__item-link--main-mobile-header',\r\n\tmainItemLink: 'js-m-filter-two-level-multiselect__item-link--main',\r\n\tmainItemChecked: 'm-filter-two-level-multiselect__item-link--main-checked',\r\n\tlayerSecondLevel: 'js-m-filter-two-level-multiselect__layer-level2',\r\n\tlayerFirstLevelBacklink: 'js-m-filter-two-level-multiselect__backlink',\r\n\tlayerSecondLevelBacklink: 'js-m-filter-two-level-multiselect__backlink-level2',\r\n\tlayerSecondLevelHeader: 'js-m-filter-two-level-multiselect__layer-header-level2',\r\n\tlayerSecondLevelSubfilterOpen: 'm-filter-two-level-multiselect__layer-level2--with-sublevel',\r\n\titemSecondLevel: 'js-m-filter-two-level-multiselect__item--level2',\r\n\titemSecondLevelOpen: 'm-filter-two-level-multiselect__item--level2-open',\r\n\titemLinkSecondLevel: 'js-m-filter-two-level-multiselect__item-link',\r\n\titemLinkSecondLevelDisabled: 'm-filter-two-level-multiselect__item-link--parent-disabled',\r\n\titemLinkSecondLevelChecked: 'm-filter-two-level-multiselect__item-link--parent-checked',\r\n\tlistThirdLevel: 'js-m-filter-two-level-multiselect__list-level3',\r\n\tlistThirdLevelDisabled:'m-filter-two-level-multiselect__item--child-disabled',\r\n\tlistThirdLevelOpen: 'm-filter-two-level-multiselect__list-level3--open',\r\n\theaderThirdLevel: 'js-m-filter-two-level-multiselect__layer-header-level3',\r\n\titemThirdLevel: 'js-m-filter-two-level-multiselect__item--level3',\r\n\tconfirmButton: 'js-m-filter-two-level-multiselect__confirm-button',\r\n\tfloatLabel:'state-a-label--is-floated',\r\n\tfocusLabel:'state-a-label--is-focus',\r\n\tcloseFilter:'m-filter-two-level-multiselect__item-link--main-mobile-close-icon'\r\n};\r\n\r\n@createModule('FilterTwoLevelMultiselect')\r\n/**\r\n * $filter-two-level-multiselect terrific module implementation\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class FilterTwoLevelMultiselect extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$confirmButton: JQuery;\r\n\t$layerSecondLevel: JQuery;\r\n\t$itemSecondLevel: JQuery;\r\n\t$listFirstLevel: JQuery;\r\n\t$itemFirstLevel: JQuery;\r\n\t$itemFirstLevelHeaderMobile: JQuery;\r\n\t$floatLabel: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.$floatLabel = this.$ctx.prev();\r\n\t\tthis.$floatLabel.addClass(classes.floatLabel);\r\n\r\n\t\tthis.registerProperties();\r\n\t\tthis.bindEvents();\r\n\r\n\t\tthis.setFilterCheckedClass();\r\n\t\tthis.setFilterDisabledClass();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tregisterProperties(): void {\r\n\t\tthis.$confirmButton = $(`.${classes.confirmButton}`, this.$ctx);\r\n\t\tthis.$layerSecondLevel = $(`.${classes.layerSecondLevel}`, this.$ctx);\r\n\t\tthis.$itemSecondLevel = $(`.${classes.itemSecondLevel}`, this.$ctx);\r\n\t\tthis.$listFirstLevel = $(`.${classes.listFirstLevel}`, this.$ctx);\r\n\t\tthis.$itemFirstLevel = $(`.${classes.itemFirstLevel}`, this.$ctx);\r\n\t\tthis.$itemFirstLevelHeaderMobile = $(`.${classes.itemFirstLevelHeaderMobile}`, this.$ctx);\r\n\t}\r\n\r\n\tbindEvents(): void {\r\n\t\t$(`.${classes.listFirstLevel}, .${classes.layerSecondLevelHeader}`, this.$ctx).on(\r\n\t\t\t'click',\r\n\t\t\tthis.onToggleOverlayClick.bind(this)\r\n\t\t);\r\n\t\tthis.$confirmButton.on('click', this.onConfirmButtonClick.bind(this));\r\n\t\t$(`.${classes.closeFilter}`, this.$ctx).on('click', this.onCloseFilter.bind(this));\r\n\t\t$(`.${classes.layerFirstLevelBacklink}`, this.$ctx).on('click', this.onBackButtonClick.bind(this));\r\n\t\t$(`.${classes.itemLinkSecondLevel}`, this.$ctx).on('click', this.onOpenCategoryClick.bind(this));\r\n\t\t$(`.${classes.layerSecondLevelBacklink}`, this.$ctx).on('click', this.onCloseCategoryClick.bind(this));\r\n\t\t$(`.${classes.headerThirdLevel}`, this.$ctx).on('click', this.onPrimaryfilterClick.bind(this));\r\n\t\t$(`.${classes.itemThirdLevel}`, this.$ctx).on('click', this.onSubfilterClick.bind(this));\r\n\r\n\t\tthis.$layerSecondLevel.on('click', (event: Event) => {\r\n\t\t\tevent.stopPropagation();\r\n\t\t});\r\n\t\t$('input[type=checkbox]', this.$ctx).on('click', (event: Event) => {\r\n\t\t\tevent.preventDefault();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Intended for (re)initializing event handlers after modifying the contents of the multiselect externally.\r\n\t */\r\n\tpublic rebindEvents(): void {\r\n\t\t$(`.${classes.listFirstLevel}, .${classes.layerSecondLevelHeader}`, this.$ctx).off('click');\r\n\t\tthis.$confirmButton.off('click');\r\n\t\t$(`.${classes.closeFilter}`, this.$ctx).off('click');\r\n\t\t$(`.${classes.layerFirstLevelBacklink}`, this.$ctx).off('click');\r\n\t\t$(`.${classes.itemLinkSecondLevel}`, this.$ctx).off('click');\r\n\t\t$(`.${classes.layerSecondLevelBacklink}`, this.$ctx).off('click');\r\n\t\t$(`.${classes.headerThirdLevel}`, this.$ctx).off('click');\r\n\t\t$(`.${classes.itemThirdLevel}`, this.$ctx).off('click');\r\n\r\n\t\tthis.$layerSecondLevel.off('click');\r\n\t\t$('input[type=checkbox]', this.$ctx).off('click');\r\n\r\n\t\tthis.registerProperties();\r\n\t\tthis.bindEvents();\r\n\t}\r\n\r\n\tonToggleOverlayClick(event: Event) {\r\n\t\tthis.toggleFilter();\r\n\t\tevent.stopPropagation();\r\n\t}\r\n\r\n\tonConfirmButtonClick(event: Event) {\r\n\t\tthis.closeFilter();\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonBackButtonClick(event: Event) {\r\n\t\tthis.closeFilter();\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonCloseFilter(event: Event) {\r\n\t\tthis.closeFilter();\r\n\t\tthis.$ctx.trigger('FilterTwoLevelMultiCloseButton', [event]);\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonCloseCategoryClick(event: Event) {\r\n\t\tthis.closeFilterValueClick(event);\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonOpenCategoryClick(event: Event) {\r\n\t\tvar $secondLevel = $(event.currentTarget);\r\n\r\n\t\tif($secondLevel.hasClass(classes.itemLinkSecondLevelDisabled)) return;\r\n\r\n\t\tthis.openFilterValueClick(event);\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n\r\n\tonPrimaryfilterClick(event: Event) {\r\n\t\tthis.setFilter(\r\n\t\t\t$(event.currentTarget as HTMLElement)\r\n\t\t\t\t.parent()\r\n\t\t\t\t.find('input[type=checkbox]:not(:disabled)')\r\n\t\t);\r\n\t\tthis.$ctx.trigger('FilterTwoLevelMultiCheckboxChanged',[event]);\r\n\t}\r\n\r\n\tonSubfilterClick(event: Event) {\r\n\t\tconst $checkbox = $(event.currentTarget as HTMLElement).find('input[type=checkbox]');\r\n\t\tif($checkbox.prop(\"disabled\")) return false;\r\n\t\tthis.setFilter($checkbox);\r\n\t\t\tthis.adjustFirstLevelFilterAccordingToSubFilters($checkbox);\r\n\t\t\tthis.$ctx.trigger('FilterTwoLevelMultiCheckboxChanged',[event]);\r\n\t\t\tthis.setFilterCheckedClass();\r\n\t\t}\r\n\t\t \r\n\tadjustFirstLevelFilterAccordingToSubFilters($checkbox: JQuery) {\r\n\t\tconst $allCheckboxesOnSameLevel = $checkbox.closest(`.${classes.listThirdLevel}`).find('input[type=checkbox]:not(:disabled)');\r\n\t\tconst $firstLevelCheckbox = $checkbox\r\n\t\t\t.closest(`.${classes.itemSecondLevel}`)\r\n\t\t\t.find(`.${classes.headerThirdLevel} input[type=checkbox]`);\r\n\t\t$firstLevelCheckbox.prop('checked', this.areAllSubFiltersChecked($allCheckboxesOnSameLevel));\r\n\t}\r\n\r\n\tsetFilter($checkbox: JQuery) { \r\n\t\t$checkbox.prop('checked', !$checkbox.prop('checked'));\r\n\t\tthis.$confirmButton.show();\r\n\r\n\t\tthis.setFilterCheckedClass();\r\n\t}\r\n\r\n\tisAnyFilterChecked($checkboxes: JQuery = $('input[type=checkbox]:not(:disabled)', this.$ctx)) {\r\n\t\treturn $checkboxes.toArray().some(this.isElementChecked);\r\n\t}\r\n\r\n\tareAllSubFiltersChecked($checkboxes: JQuery = $('input[type=checkbox]:not(:disabled)', this.$ctx)) {\r\n\t\treturn $checkboxes.toArray().every(this.isElementChecked);\r\n\t}\r\n\r\n\tisElementChecked(element: HTMLInputElement) {\r\n\t\treturn element.checked;\r\n\t}\r\n\r\n\tsetFilterCheckedClass() {\r\n\t\t$(`.${classes.mainItemLink}`, this.$ctx).toggleClass(classes.mainItemChecked, this.isAnyFilterChecked());\r\n\r\n\t\tthis.$ctx.find(`.${classes.itemSecondLevel}`).each((i,e) => {\r\n\t\t\tconst $firstLevelItem = $(e);\r\n\t\t\tconst $checkboxes = $firstLevelItem.find(`.${classes.itemThirdLevel}`).find('input[type=checkbox]');\r\n\r\n\t\t\t$firstLevelItem\r\n\t\t\t\t.find(`.${classes.itemLinkSecondLevel}`)\r\n\t\t\t\t.toggleClass(classes.itemLinkSecondLevelChecked, this.isAnyFilterChecked($checkboxes))\r\n\t\t});\r\n\t}\r\n\r\n\ttoggleFilter(toggleState?: any) {\r\n\t\tthis.closeAllSubFilterValues();\r\n\t\tthis.$confirmButton.hide();\r\n\t\tthis.$listFirstLevel\r\n\t\t\t.toggleClass(classes.listFirstLevelOpen, toggleState)\r\n\t\t\t.toggleClass(classes.listFirstLevelShadow, toggleState);\r\n\t\tthis.$itemFirstLevel.toggleClass(classes.itemFirstLevelOpen, toggleState);\r\n\t\tthis.$floatLabel.toggleClass(classes.focusLabel, toggleState);\r\n\t\tthis.$itemFirstLevelHeaderMobile.toggleClass(classes.itemFirstLevelHeaderMobileOpen, toggleState);\r\n\t}\r\n\r\n\topenFilter() {\r\n\t\tthis.toggleFilter(true);\r\n\t}\r\n\r\n\tcloseFilter() {\r\n\t\tthis.toggleFilter(false);\r\n\t}\r\n\r\n\topenFilterValueClick(event: Event) {\r\n\t\tconst $currentTargetElement = $(event.currentTarget);\r\n\r\n\t\tif($currentTargetElement.parent().hasClass(classes.itemLinkSecondLevelDisabled)) return false;\r\n\r\n\t\t$currentTargetElement.closest(`.${classes.layerSecondLevel}`).addClass(classes.layerSecondLevelSubfilterOpen);\r\n\t\tthis.$itemSecondLevel.hide();\r\n\t\t$currentTargetElement\r\n\t\t\t.closest(`.${classes.itemSecondLevel}`)\r\n\t\t\t.show()\r\n\t\t\t.addClass(classes.itemSecondLevelOpen)\r\n\t\t\t.find(`.${classes.listThirdLevel}`)\r\n\t\t\t.addClass(classes.listThirdLevelOpen);\r\n\t}\r\n\r\n\tcloseAllSubFilterValues() {\r\n\t\tthis.$layerSecondLevel.removeClass(classes.layerSecondLevelSubfilterOpen);\r\n\t\tthis.$itemSecondLevel\r\n\t\t\t.show()\r\n\t\t\t.removeClass(classes.itemSecondLevelOpen)\r\n\t\t\t.find(`.${classes.listThirdLevel}`)\r\n\t\t\t.removeClass(classes.listThirdLevelOpen);\r\n\t}\r\n\r\n\tcloseFilterValueClick(event: Event) {\r\n\t\tthis.$layerSecondLevel.removeClass(classes.layerSecondLevelSubfilterOpen);\r\n\t\tthis.$itemSecondLevel.show();\r\n\t\t$(event.currentTarget)\r\n\t\t\t.closest(`.${classes.itemSecondLevel}`)\r\n\t\t\t.removeClass(classes.itemSecondLevelOpen)\r\n\t\t\t.find(`.${classes.listThirdLevel}`)\r\n\t\t\t.removeClass(classes.listThirdLevelOpen);\r\n\t}\r\n\r\n\tsetFilterDisabledClass(){\r\n\t\tthis.$ctx.find(`.${classes.itemThirdLevel}`).find('input[type=checkbox]:disabled').closest(`.${classes.itemThirdLevel}`).addClass(classes.listThirdLevelDisabled);\r\n\r\n\t\tthis.$ctx.find(`.${classes.itemSecondLevel}`).each((i,e) => {\r\n\t\t\tconst $firstLevelItem = $(e);\r\n\t\t\tconst $checkboxes = $firstLevelItem.find(`.${classes.itemThirdLevel}`).find('input[type=checkbox]');\r\n\r\n\t\t\t$firstLevelItem\r\n\t\t\t\t.find(`.${classes.itemLinkSecondLevel}`)\r\n\t\t\t\t.toggleClass(classes.itemLinkSecondLevelDisabled, this.areAllFilterDisabled($checkboxes));\r\n\r\n\t\t\t$firstLevelItem\r\n\t\t\t\t.find(`.${classes.headerThirdLevel}`).find('input[type=checkbox]')\r\n\t\t\t\t.prop(\"disabled\", this.areAllFilterDisabled($checkboxes));\r\n\t\t});\r\n\t}\r\n\r\n\tareAllFilterDisabled($checkboxes: JQuery){\r\n\t\treturn $checkboxes.toArray().every(this.isElementDisabled);\r\n\t}\r\n\r\n\tisElementDisabled(element: HTMLElement): any {\r\n\t\treturn $(element).prop(\"disabled\");\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('FilterWrapper')\r\n/**\r\n * filter-wrapper module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class FilterWrapper extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('ProductFilter')\r\n/**\r\n * product-filter module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class ProductFilter extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('TechnicalPropertyPopup')\r\n/**\r\n * product-filter module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class TechnicalPropertyPopup extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t$($ctx)\r\n\t\t\t.find('.js-property-popup-closer')\r\n\t\t\t.on('click', this._hidePropertyPopup.bind(this));\r\n\r\n\t\t$($ctx)\r\n\t\t\t.find('.js-m-technical-property-popup__tab-nav')\r\n\t\t\t.on('click', this._triggerTab.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\t\r\n\t_hidePropertyPopup(ev: any) {\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.parent()\r\n\t\t\t.parent()\r\n\t\t\t.removeClass('state-m-technical-property-popup--shown');\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\t_triggerTab(ev: any) {\r\n\t\tvar num = $(ev.currentTarget).index();\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.addClass('m-technical-property-popup__tab-nav--active');\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.siblings()\r\n\t\t\t.removeClass('m-technical-property-popup__tab-nav--active');\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.parent()\r\n\t\t\t.next()\r\n\t\t\t.find('.m-technical-property-popup__tab-pane')\r\n\t\t\t.removeClass('m-technical-property-popup__tab-pane--active');\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.parent()\r\n\t\t\t.next()\r\n\t\t\t.find('.m-technical-property-popup__tab-pane')\r\n\t\t\t.eq(num)\r\n\t\t\t.addClass('m-technical-property-popup__tab-pane--active');\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\nconst classes = {\r\n\tsubmitForm: 'js-form__button-event--submit',\r\n\tcancelForm: 'js-form__button-event--cancel',\r\n\tfocusElement: 'js-form__event-show-additional-fields',\r\n\tadditionalFields: 'js-form__additional-fields',\r\n\t// inputCountrySelector: 'js-form__input-select',\r\n\tstateFormContactAdditionalFieldsVisible: 'state-m-form-order--show-additional-fields',\r\n\tstateFormContactHiddenAfterSubmit: 'state-m-form-order-form--hidden-after-submit',\r\n\tstateFormBuilderError: 'input-validation-error', // set by Sitecore form builder. no js- prefix\r\n\tstateFormIsHidden: 'state-m-form-order--is-hidden',\r\n};\r\n\r\n@createModule('FormOrder')\r\n/**\r\n * form-order module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class FormOrder extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\t// TODO: clarify why this class is not in use\r\n\t\t// const cssClassSectionNoteAvailable = 'state-m-form-order--is-hidden';\r\n\r\n\t\t// TODO: name-syntax-error js selector requires js- prefix. has to be checked with backend\r\n\t\tconst cssClassFormNotAvailable = 'm-form-order--is-hidden';\r\n\r\n\t\t// we have to check if the hidden class was set.\r\n\t\t// this is the case, when form-order is disabled for sitecore.\r\n\t\tif (this.$ctx.hasClass(cssClassFormNotAvailable)) {\r\n\t\t\t// if form order should not be displayed, whe also have\r\n\t\t\t// to hide the parent section container\r\n\t\t\t// NOTE: Sitecore can't set the related property on page level,\r\n\t\t\t// \t\t so that the section would be hidden automatically\r\n\t\t\tthis.$ctx.parent().addClass(classes.stateFormIsHidden);\r\n\t\t} else {\r\n\t\t\t// const $countrySelect = $(`.${classes.inputCountrySelector}`, $ctx);\r\n\t\t\tconst $textareaWithFocus = $(`.${classes.focusElement}`, this.$ctx);\r\n\t\t\tconst $areaAdditionalFields = $(`.${classes.additionalFields}`, this.$ctx);\r\n\t\t\tconst $buttonCancel = $(`.${classes.cancelForm}`, this.$ctx);\r\n\t\t\tconst $buttonSubmit = $(`.${classes.submitForm}`, this.$ctx);\r\n\r\n\t\t\tif ($textareaWithFocus.length > 0 && $areaAdditionalFields.length > 0) {\r\n\t\t\t\t$textareaWithFocus.on('focus', () => {\r\n\t\t\t\t\t$areaAdditionalFields.addClass(classes.stateFormContactAdditionalFieldsVisible);\r\n\t\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// check for cancel button placed from sitecore\r\n\t\t\tif ($buttonCancel.length !== 0) {\r\n\t\t\t\t// close the additional form field section\r\n\t\t\t\t$buttonCancel.on('click', (ev: Event) => {\r\n\t\t\t\t\t$areaAdditionalFields.removeClass(classes.stateFormContactAdditionalFieldsVisible);\r\n\t\t\t\t\tscrollToElement(this.$ctx, true, $(window).height() / 10);\r\n\t\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif ($buttonSubmit.length !== 0) {\r\n\t\t\t\t$buttonSubmit.on('click', (ev: Event) => {\r\n\t\t\t\t\tthis.$ctx.addClass(classes.stateFormContactHiddenAfterSubmit);\r\n\t\t\t\t\tconst $elm =\r\n\t\t\t\t\t\t$(`.${classes.stateFormBuilderError}`, this.$ctx).length > 0\r\n\t\t\t\t\t\t\t? $(`.${classes.stateFormBuilderError}`, this.$ctx)\r\n\t\t\t\t\t\t\t: this.$ctx;\r\n\t\t\t\t\tscrollToElement($elm, true, $(window).height() / 10);\r\n\t\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\nconst classes = {\r\n\tdependencyOptionValue: 'other',\r\n\tselectLink: '.js-m-language-switch__switch',\r\n\taccordionMoreBtnContainer: '.m-global-contact__more-accordion',\r\n\taccordionMoreBtn: '.m-global-contact__more-accordion .a-button',\r\n\taccordionMoreBtnActive: 'state-a-button--accordion-active',\r\n\taddressContainer: '.m-global-contact__contacts',\r\n\taddressElement: '.m-global-contact__contact',\r\n\taddressContainerShowLess: 'js-m-global-contact__contacts--show-less', \r\n\taddressCollector: '.js-m-global-contact__contact-collector',\r\n\tpreloader: '.m-global-contact__preloader .a-loading-indicator',\r\n\twechatContainer: '.m-global-contact__wechat',\r\n\twechatState: 'state-m-global-contact--cn',\r\n\terrorNoData: '.js-m-global-contact__error-handling-no-data',\r\n\terrorNoResponse: '.js-m-global-contact__error-handling-no-response',\r\n};\r\n\r\n@createModule('GlobalContact')\r\n/**\r\n * GlobalContact module implementation.\r\n */\r\nexport class GlobalContact extends TerrificSpec {\r\n\t/* eslint-disable no-undef */\r\n\t$ctx: any;\r\n\t$accordionBtn: any;\r\n\t$languageSelect: any;\r\n\t$categorySelect: any;\r\n\t$wechatContainer: any;\r\n\t$header: any;\r\n\tbaseUrl: string;\r\n\taccordionToggleTextOn: string;\r\n\taccordionToggleTextOff: string;\r\n\tshowLoadMoreSpinner = true;\r\n\tnumOfAddresses: number;\r\n\trequiredNumOfAddressesForScrolling: number;\r\n\tscrollOnCloseAccordion: boolean;\r\n\t/* eslint-enable no-undef */\r\n\r\n\t/**\r\n\t * Start Lifecycle\r\n\t * @param {Function} resolve Resolve\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$wechatContainer = this.$ctx.find(classes.wechatContainer);\r\n\t\tthis.$header = $('[data-t-name=\"header\"]');\r\n\t\tthis.setAccordionActions();\r\n\t\tthis.setLanguageSelectActions();\r\n\t\tthis.setAutoScrollActions();\r\n\t\tthis.hideErrorMessages();\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * Start ajax call\r\n\t * @param {string} lang lang\r\n\t * @returns {void}\r\n\t */\r\n\tresponseRequest(lang: string) {\r\n\t\tconst url = this.$languageSelect.attr('data-endpoint');\r\n\r\n\t\tthis.initializeOnRequest();\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: url + lang,\r\n\t\t\t\tcontentType: 'application/json; charset=utf-8',\r\n\t\t\t\tasync: true,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tsuccess: (res: string[]) => {\r\n\t\t\t\t\tthis.hidePreloader();\r\n\r\n\t\t\t\t\tif (res.length === 0) {\r\n\t\t\t\t\t\t// checked if address locations are available for this country\r\n\t\t\t\t\t\tthis.noDataAvailable();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// otherwise there is data available\r\n\t\t\t\t\t\tthis.responseSuccess(res, lang);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\terror: () => {\r\n\t\t\t\t\tthis.hidePreloader();\r\n\t\t\t\t\tthis.noServerResponse();\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t}, 250);\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes involved elemnts\r\n\t * @returns {void}\r\n\t */\r\n\tinitializeOnRequest() {\r\n\t\tthis.showPreloader();\r\n\t\tthis.removeLocations();\r\n\t\tthis.$accordionBtn.hide();\r\n\t\tthis.$wechatContainer.hide();\r\n\t\tthis.hideErrorMessages();\r\n\t}\r\n\r\n\t/**\r\n\t * showPreloader\r\n\t * @returns {void}\r\n\t */\r\n\tshowPreloader() {\r\n\t\tthis.$ctx.find(classes.preloader).show();\r\n\t}\r\n\r\n\t/**\r\n\t * hidePreloader\r\n\t * @returns {void}\r\n\t */\r\n\thidePreloader() {\r\n\t\tthis.$ctx.find(classes.preloader).hide();\r\n\t}\r\n\r\n\t/**\r\n\t * Success ajax callback\r\n\t * @param {Array} res res\r\n\t * @param {string} lang language\r\n\t * @returns {void}\r\n\t */\r\n\tresponseSuccess(res: any, lang: string) {\r\n\t\tthis.hidePreloader();\r\n\t\t// eslint-disable-next-line prefer-template\r\n\t\tthis.$ctx.find('.' + classes.addressContainerShowLess).show();\r\n\t\tthis.addLocations(res);\r\n\t\tif (this.shouldShowAccordionBtn()) {\r\n\t\t\tthis.$accordionBtn.show();\r\n\t\t}\r\n\r\n\t\t// Special case for china shows wechat qr code\r\n\t\tif (lang === 'CN') {\r\n\t\t\tthis.$wechatContainer.show();\r\n\t\t\tthis.$accordionBtn.closest(classes.accordionMoreBtnContainer).addClass(classes.wechatState);\r\n\t\t} else {\r\n\t\t\tthis.$wechatContainer.hide();\r\n\t\t\tthis.$accordionBtn.closest(classes.accordionMoreBtnContainer).removeClass(classes.wechatState);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Remove MarkUp From Dom\r\n\t * @returns {void}\r\n\t */\r\n\tremoveLocations() {\r\n\t\tthis.$ctx.find(classes.addressElement).remove();\r\n\t}\r\n\r\n\t/**\r\n\t * Add MarkUp To Dom\r\n\t * @param {Object} res res\r\n\t * @returns {void}\r\n\t */\r\n\taddLocations(res: any) {\r\n\t\t/* eslint-disable */\r\n\t\tconst $target = this.$ctx.find(classes.addressCollector);\r\n\t\t/* eslint-enable */\r\n\t\t$target.append(this.prepareLocationsMarkUp(res));\r\n\r\n\t\tthis.numOfAddresses = $target.find(classes.addressElement).length;\r\n\t}\r\n\r\n\t/**\r\n\t * Create MarkUp\r\n\t * @param {Object} res response\r\n\t * @returns {string} string\r\n\t */\r\n\tprepareLocationsMarkUp(res: any): string {\r\n\t\tlet str = '';\r\n\t\tres.forEach((d: string) => {\r\n\t\t\t/* eslint-disable */\r\n\t\t\tstr +=\r\n\t\t\t\t'
    ' + d + '
    ';\r\n\t\t\t/* eslint-enable */\r\n\t\t});\r\n\t\treturn str;\r\n\t}\r\n\r\n\t/**\r\n\t * Should show accordion btn\r\n\t * @returns {boolean} boolean\r\n\t */\r\n\tshouldShowAccordionBtn() {\r\n\t\t/* Disable linting to avoid warning for not allowed template concatenation rule */\r\n\t\t/* eslint-disable */\r\n\t\tconst $contacts: any = this.$ctx.find(classes.addressContainer + ' ' + classes.addressElement);\r\n\t\t/* eslint-enable */\r\n\t\treturn $contacts.length > 1;\r\n\t}\r\n\r\n\t/**\r\n\t * setAccordionActions\r\n\t * @returns {void}\r\n\t */\r\n\tsetAccordionActions() {\r\n\t\tthis.$accordionBtn = this.getAccordionBtn();\r\n\t\tthis.$accordionBtn.on('click', () => this.accordionToggleEvt());\r\n\t\tthis.accordionSetToggleText();\r\n\r\n\t\tif (!this.shouldShowAccordionBtn()) {\r\n\t\t\tthis.$accordionBtn.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * setLanguageSelectActions\r\n\t * @returns {void}\r\n\t */\r\n\tsetLanguageSelectActions() {\r\n\t\tthis.$languageSelect = this.getSelect();\r\n\t\tthis.baseUrl = this.$languageSelect.data('baseUrl');\r\n\t\tthis.$languageSelect.on('change', (ev: Event) => this.selectedOptionChanged(ev));\r\n\t\tthis.checkLocationParamsAndSet(this.$languageSelect);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Toggle Accordion Class to show or hide more locations\r\n\t * @returns {void}\r\n\t */\r\n\taccordionToggleEvt() {\r\n\t\tthis.accordionToggleText();\r\n\t\tthis.accordionClassToggle();\r\n\r\n\t\t/* Disable linting to avoid warning for .parent().parent() not allowed chaining rule */\r\n\t\t/* eslint-disable */\r\n\t\tconst $accordionBtnContainer: any = this.$ctx\r\n\t\t\t.find(classes.accordionMoreBtn)\r\n\t\t\t.parent()\r\n\t\t\t.parent();\r\n\t\t/* eslint-enable */\r\n\r\n\t\tif ($accordionBtnContainer.hasClass(classes.addressContainerShowLess)) {\r\n\t\t\t$accordionBtnContainer.removeClass(classes.addressContainerShowLess);\r\n\t\t} else {\r\n\t\t\t$accordionBtnContainer.addClass(classes.addressContainerShowLess);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set accordion text for on and off state\r\n\t * @returns {void}\r\n\t */\r\n\taccordionSetToggleText() {\r\n\t\tthis.accordionToggleTextOn = this.$ctx.find(classes.accordionMoreBtn).text();\r\n\t\tthis.accordionToggleTextOff = this.$ctx.find(classes.accordionMoreBtn).data('text-toggle');\r\n\t}\r\n\r\n\t/**\r\n\t * Accordion text toggle\r\n\t * @returns {void}\r\n\t */\r\n\taccordionToggleText() {\r\n\t\tconst $accordionBtn = this.$ctx.find(classes.accordionMoreBtn);\r\n\r\n\t\tif ($accordionBtn.text() === this.accordionToggleTextOn) {\r\n\t\t\t// Show less text\r\n\t\t\t$accordionBtn.attr('data-text-toggle', this.accordionToggleTextOn);\r\n\t\t\t$accordionBtn.text(this.accordionToggleTextOff);\r\n\t\t} else {\r\n\t\t\t// Show more text\r\n\t\t\t$accordionBtn.attr('data-text-toggle', this.accordionToggleTextOff);\r\n\t\t\t$accordionBtn.text(this.accordionToggleTextOn);\r\n\r\n\t\t\t// Perform action only when closing accordion button\r\n\t\t\tif (this.shouldScrollToElement()) {\r\n\t\t\t\tscrollToElement(this.$ctx, true, this.$header.outerHeight());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Should scroll to global contact's top position on the page when more than given addresses in variable\r\n\t * 'this.requiredNumOfAddressesForScrolling' has been shown after closing the accordion button.\r\n\t * Avoids destroying focus and keeps user visually in track.\r\n\t * @returns {boolean} Boolean value\r\n\t */\r\n\tshouldScrollToElement(): boolean {\r\n\t\treturn this.numOfAddresses > this.requiredNumOfAddressesForScrolling && this.scrollOnCloseAccordion;\r\n\t}\r\n\r\n\t/**\r\n\t * Accordion class toggle\r\n\t * @returns {void}\r\n\t */\r\n\taccordionClassToggle() {\r\n\t\tconst $accordionBtn = this.$ctx.find(classes.accordionMoreBtn);\r\n\r\n\t\tif ($accordionBtn.hasClass(classes.accordionMoreBtnActive)) {\r\n\t\t\t$accordionBtn.removeClass(classes.accordionMoreBtnActive);\r\n\t\t} else {\r\n\t\t\t$accordionBtn.addClass(classes.accordionMoreBtnActive);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Extract parameter name from baseUrl\r\n\t * @returns {void}\r\n\t */\r\n\tgetParamNameFromBaseUrl() {\r\n\t\treturn this.baseUrl.substr(1, this.baseUrl.length - 2);\r\n\t}\r\n\r\n\t/**\r\n\t * Check params for language in browser's location bar.\r\n\t * See inputSelect.attr.value = \"?SelectedCountry\" in global-contact.json\r\n\t *\r\n\t * @param {jQuery} $select Select option (drop down)\r\n\t * @returns {void}\r\n\t */\r\n\tcheckLocationParamsAndSet($select: any) {\r\n\t\tconst str = document.location.search;\r\n\t\tconst params = new Map(str\r\n\t\t\t.slice(1)\r\n\t\t\t.split('&')\r\n\t\t\t.map((m) => m.split('=')));\r\n\t\tconst param = this.getParamNameFromBaseUrl();\r\n\r\n\t\tif (params.has(param)) {\r\n\t\t\t$select.val(params.get(param));\r\n\t\t} else {\r\n\t\t\t$select.val('-1');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * follow link of selected option on change\r\n\t *\r\n\t * @param {Event} ev value of select option\r\n\t * @returns {void}\r\n\t */\r\n\tselectedOptionChanged(ev: any) {\r\n\t\tconst lang = ev.currentTarget.value;\r\n\t\tthis.responseRequest(lang);\r\n\t}\r\n \r\n\t/**\r\n\t * Error handling no data available\r\n\t * @returns {void}\r\n\t */\r\n\tnoDataAvailable() {\r\n\t\tconst $target = this.$ctx.find(classes.errorNoData);\r\n\t\t$target.show();\r\n\t\tthis.hideShowLessContainer();\r\n\t}\r\n\r\n\t/**\r\n\t * Error handling no ajax request\r\n\t * @returns {void}\r\n\t */\r\n\tnoServerResponse() {\r\n\t\tconst $target = this.$ctx.find(classes.errorNoResponse);\r\n\t\t$target.show();\r\n\t\tthis.hideShowLessContainer();\r\n\t}\r\n\r\n\t/**\r\n\t * Hide all error messages\r\n\t * @returns {void}\r\n\t */\r\n\thideErrorMessages() {\r\n\t\tconst $targetNoData = this.$ctx.find(classes.errorNoData);\r\n\t\tconst $targetNoResponse = this.$ctx.find(classes.errorNoResponse);\r\n\r\n\t\t// this.hideShowLessContainer();\r\n\t\t$targetNoData.hide();\r\n\t\t$targetNoResponse.hide();\r\n\t}\r\n\r\n\t/**\r\n\t * hide additional address container\r\n\t * @returns {void}\r\n\t */\r\n\thideShowLessContainer() {\r\n\t\t// eslint-disable-next-line prefer-template\r\n\t\tthis.$ctx.find('.' + classes.addressContainerShowLess).hide();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns jQuery select option DOM element\r\n\t * @returns {Object} jQuery object\r\n\t */\r\n\tgetSelect(): any {\r\n\t\tconst str = classes.selectLink;\r\n\t\treturn this.$ctx.find(str);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns jQuery select option DOM element\r\n\t * @returns {Object} jQuery object\r\n\t */\r\n\tgetAccordionBtn(): any {\r\n\t\tconst str = classes.accordionMoreBtn;\r\n\t\treturn this.$ctx.find(str);\r\n\t}\r\n\r\n\t/**\r\n\t * Start a scrolling to the top of the global contacts area\r\n\t * @returns {void}\r\n\t */\r\n\tsetAutoScrollActions() {\r\n\t\tthis.requiredNumOfAddressesForScrolling = 3;\r\n\t\tthis.scrollOnCloseAccordion = true;\r\n\t}\r\n\r\n\t/**\r\n\t * _triggerChangeEvent\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n\r\n\t/**\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tlanguageContainer: 'js-m-hazardous-substances__list-container',\r\n\tlanguageSelect: 'js-m-hazardous-substances__language-selector',\r\n\tstateActive: 'state-m-hazardous-substances__list-container--active',\r\n};\r\n\r\nconst dataAttr = {\r\n\tlangCode: 'data-langcode',\r\n};\r\n\r\n@createModule('HazardousSubstances')\r\n/**\r\n * hazardous-substances module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class HazardousSubstances extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$languageContainer: JQuery;\r\n\t$select: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$languageContainer = this.$ctx.find(`.${classes.languageContainer}`);\r\n\t\tthis.$select = this.$ctx.find(`.${classes.languageSelect}`);\r\n\t\tthis.$select.on('change', this.updateLanguages.bind(this));\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * update download button\r\n\t */\r\n\tupdateLanguages() {\r\n\t\tconst langCode = this.getLanguageSelectValue();\r\n\r\n\t\tthis.$languageContainer.removeClass(classes.stateActive);\r\n\t\tthis.$languageContainer.filter(`[${dataAttr.langCode}=\"${langCode}\"]`).addClass(classes.stateActive);\r\n\r\n\t\t// reInit InpageNavigation, as height of content changes\r\n\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t}\r\n\r\n\t/**\r\n\t * Get input select value\r\n\t */\r\n\tgetLanguageSelectValue(): string {\r\n\t\treturn this.$select.val() as string;\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","/*\r\n * File: iframeResizer.js\r\n * Desc: Force iframes to size to content.\r\n * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\r\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\r\n * Author: David J. Bradshaw - dave@bradshaw.net\r\n * Contributor: Jure Mav - jure.mav@gmail.com\r\n * Contributor: Reed Dadoune - reed@dadoune.com\r\n */\r\n\r\n(function(window) {\r\n\t'use strict';\r\n\r\n\tvar count = 0,\r\n\t\tlogEnabled = false,\r\n\t\thiddenCheckEnabled = false,\r\n\t\tmsgHeader = 'message',\r\n\t\tmsgHeaderLen = msgHeader.length,\r\n\t\tmsgId = '[iFrameSizer]', //Must match iframe msg ID\r\n\t\tmsgIdLen = msgId.length,\r\n\t\tpagePosition = null,\r\n\t\trequestAnimationFrame = window.requestAnimationFrame,\r\n\t\tresetRequiredMethods = { max: 1, scroll: 1, bodyScroll: 1, documentElementScroll: 1 },\r\n\t\tsettings = {},\r\n\t\ttimer = null,\r\n\t\tlogId = 'Host Page',\r\n\t\tdefaults = {\r\n\t\t\tautoResize: true,\r\n\t\t\tbodyBackground: null,\r\n\t\t\tbodyMargin: null,\r\n\t\t\tbodyMarginV1: 8,\r\n\t\t\tbodyPadding: null,\r\n\t\t\tcheckOrigin: true,\r\n\t\t\tinPageLinks: false,\r\n\t\t\tenablePublicMethods: true,\r\n\t\t\theightCalculationMethod: 'bodyOffset',\r\n\t\t\tid: 'iFrameResizer',\r\n\t\t\tinterval: 32,\r\n\t\t\tlog: false,\r\n\t\t\tmaxHeight: Infinity,\r\n\t\t\tmaxWidth: Infinity,\r\n\t\t\tminHeight: 0,\r\n\t\t\tminWidth: 0,\r\n\t\t\tresizeFrom: 'parent',\r\n\t\t\tscrolling: false,\r\n\t\t\tsizeHeight: true,\r\n\t\t\tsizeWidth: false,\r\n\t\t\ttolerance: 0,\r\n\t\t\twidthCalculationMethod: 'scroll',\r\n\t\t\tclosedCallback: function() {},\r\n\t\t\tinitCallback: function() {},\r\n\t\t\tmessageCallback: function() {\r\n\t\t\t\twarn('MessageCallback function not defined');\r\n\t\t\t},\r\n\t\t\tresizedCallback: function() {},\r\n\t\t\tscrollCallback: function() {\r\n\t\t\t\treturn true;\r\n\t\t\t},\r\n\t\t};\r\n\r\n\tfunction addEventListener(obj, evt, func) {\r\n\t\t/* istanbul ignore else */ // Not testable in PhantonJS\r\n\t\tif ('addEventListener' in window) {\r\n\t\t\tobj.addEventListener(evt, func, false);\r\n\t\t} else if ('attachEvent' in window) {\r\n\t\t\t//IE\r\n\t\t\tobj.attachEvent('on' + evt, func);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setupRequestAnimationFrame() {\r\n\t\tvar vendors = ['moz', 'webkit', 'o', 'ms'],\r\n\t\t\tx;\r\n\r\n\t\t// Remove vendor prefixing if prefixed and break early if not\r\n\t\tfor (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\r\n\t\t\trequestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n\t\t}\r\n\r\n\t\tif (!requestAnimationFrame) {\r\n\t\t\tlog('setup', 'RequestAnimationFrame not supported');\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getMyID(iframeId) {\r\n\t\tvar retStr = 'Host page: ' + iframeId;\r\n\r\n\t\tif (window.top !== window.self) {\r\n\t\t\tif (window.parentIFrame && window.parentIFrame.getId) {\r\n\t\t\t\tretStr = window.parentIFrame.getId() + ': ' + iframeId;\r\n\t\t\t} else {\r\n\t\t\t\tretStr = 'Nested host page: ' + iframeId;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retStr;\r\n\t}\r\n\r\n\tfunction formatLogHeader(iframeId) {\r\n\t\treturn msgId + '[' + getMyID(iframeId) + ']';\r\n\t}\r\n\r\n\tfunction isLogEnabled(iframeId) {\r\n\t\treturn settings[iframeId] ? settings[iframeId].log : logEnabled;\r\n\t}\r\n\r\n\tfunction log(iframeId, msg) {\r\n\t\toutput('log', iframeId, msg, isLogEnabled(iframeId));\r\n\t}\r\n\r\n\tfunction info(iframeId, msg) {\r\n\t\toutput('info', iframeId, msg, isLogEnabled(iframeId));\r\n\t}\r\n\r\n\tfunction warn(iframeId, msg) {\r\n\t\toutput('warn', iframeId, msg, true);\r\n\t}\r\n\r\n\tfunction output(type, iframeId, msg, enabled) {\r\n\t\tif (true === enabled && 'object' === typeof window.console) {\r\n\t\t\tconsole[type](formatLogHeader(iframeId), msg);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction iFrameListener(event) {\r\n\t\tfunction resizeIFrame() {\r\n\t\t\tfunction resize() {\r\n\t\t\t\tsetSize(messageData);\r\n\t\t\t\tsetPagePosition(iframeId);\r\n\t\t\t}\r\n\r\n\t\t\tensureInRange('Height');\r\n\t\t\tensureInRange('Width');\r\n\r\n\t\t\tsyncResize(resize, messageData, 'init');\r\n\t\t}\r\n\r\n\t\tfunction processMsg() {\r\n\t\t\tvar data = msg.substr(msgIdLen).split(':');\r\n\r\n\t\t\treturn {\r\n\t\t\t\tiframe: settings[data[0]].iframe,\r\n\t\t\t\tid: data[0],\r\n\t\t\t\theight: data[1],\r\n\t\t\t\twidth: data[2],\r\n\t\t\t\ttype: data[3],\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tfunction ensureInRange(Dimension) {\r\n\t\t\tvar max = Number(settings[iframeId]['max' + Dimension]),\r\n\t\t\t\tmin = Number(settings[iframeId]['min' + Dimension]),\r\n\t\t\t\tdimension = Dimension.toLowerCase(),\r\n\t\t\t\tsize = Number(messageData[dimension]);\r\n\r\n\t\t\tlog(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max);\r\n\r\n\t\t\tif (size < min) {\r\n\t\t\t\tsize = min;\r\n\t\t\t\tlog(iframeId, 'Set ' + dimension + ' to min value');\r\n\t\t\t}\r\n\r\n\t\t\tif (size > max) {\r\n\t\t\t\tsize = max;\r\n\t\t\t\tlog(iframeId, 'Set ' + dimension + ' to max value');\r\n\t\t\t}\r\n\r\n\t\t\tmessageData[dimension] = '' + size;\r\n\t\t}\r\n\r\n\t\tfunction isMessageFromIFrame() {\r\n\t\t\tfunction checkAllowedOrigin() {\r\n\t\t\t\tfunction checkList() {\r\n\t\t\t\t\tvar i = 0,\r\n\t\t\t\t\t\tretCode = false;\r\n\r\n\t\t\t\t\tlog(iframeId, 'Checking connection is from allowed list of origins: ' + checkOrigin);\r\n\r\n\t\t\t\t\tfor (; i < checkOrigin.length; i++) {\r\n\t\t\t\t\t\tif (checkOrigin[i] === origin) {\r\n\t\t\t\t\t\t\tretCode = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn retCode;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction checkSingle() {\r\n\t\t\t\t\tvar remoteHost = settings[iframeId].remoteHost;\r\n\t\t\t\t\tlog(iframeId, 'Checking connection is from: ' + remoteHost);\r\n\t\t\t\t\treturn origin === remoteHost;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn checkOrigin.constructor === Array ? checkList() : checkSingle();\r\n\t\t\t}\r\n\r\n\t\t\tvar origin = event.origin,\r\n\t\t\t\tcheckOrigin = settings[iframeId].checkOrigin;\r\n\r\n\t\t\tif (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t'Unexpected message received from: ' +\r\n\t\t\t\t\t\torigin +\r\n\t\t\t\t\t\t' for ' +\r\n\t\t\t\t\t\tmessageData.iframe.id +\r\n\t\t\t\t\t\t'. Message was: ' +\r\n\t\t\t\t\t\tevent.data +\r\n\t\t\t\t\t\t'. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tfunction isMessageForUs() {\r\n\t\t\treturn msgId === ('' + msg).substr(0, msgIdLen) && msg.substr(msgIdLen).split(':')[0] in settings; //''+Protects against non-string msg\r\n\t\t}\r\n\r\n\t\tfunction isMessageFromMetaParent() {\r\n\t\t\t//Test if this message is from a parent above us. This is an ugly test, however, updating\r\n\t\t\t//the message format would break backwards compatibity.\r\n\t\t\tvar retCode = messageData.type in { true: 1, false: 1, undefined: 1 };\r\n\r\n\t\t\tif (retCode) {\r\n\t\t\t\tlog(iframeId, 'Ignoring init message from meta parent page');\r\n\t\t\t}\r\n\r\n\t\t\treturn retCode;\r\n\t\t}\r\n\r\n\t\tfunction getMsgBody(offset) {\r\n\t\t\treturn msg.substr(msg.indexOf(':') + msgHeaderLen + offset);\r\n\t\t}\r\n\r\n\t\tfunction forwardMsgFromIFrame(msgBody) {\r\n\t\t\tlog(iframeId, 'MessageCallback passed: {iframe: ' + messageData.iframe.id + ', message: ' + msgBody + '}');\r\n\t\t\tcallback('messageCallback', {\r\n\t\t\t\tiframe: messageData.iframe,\r\n\t\t\t\tmessage: JSON.parse(msgBody),\r\n\t\t\t});\r\n\t\t\tlog(iframeId, '--');\r\n\t\t}\r\n\r\n\t\tfunction sendPageInfoToIframe() {\r\n\t\t\tvar bodyPosition = document.body.getBoundingClientRect(),\r\n\t\t\t\tiFramePosition = messageData.iframe.getBoundingClientRect(),\r\n\t\t\t\tposition = JSON.stringify({\r\n\t\t\t\t\tclientHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0),\r\n\t\t\t\t\tclientWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),\r\n\t\t\t\t\toffsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\r\n\t\t\t\t\toffsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\r\n\t\t\t\t\tscrollTop: window.pageYOffset,\r\n\t\t\t\t\tscrollLeft: window.pageXOffset,\r\n\t\t\t\t});\r\n\r\n\t\t\ttrigger('Send Page Info', 'pageInfo:' + position, settings[iframeId].iframe, iframeId);\r\n\t\t}\r\n\r\n\t\tfunction checkIFrameExists() {\r\n\t\t\tvar retBool = true;\r\n\r\n\t\t\tif (null === messageData.iframe) {\r\n\t\t\t\twarn(iframeId, 'IFrame (' + messageData.id + ') not found');\r\n\t\t\t\tretBool = false;\r\n\t\t\t}\r\n\t\t\treturn retBool;\r\n\t\t}\r\n\r\n\t\tfunction getElementPosition(target) {\r\n\t\t\tvar iFramePosition = target.getBoundingClientRect();\r\n\r\n\t\t\tgetPagePosition(iframeId);\r\n\r\n\t\t\treturn {\r\n\t\t\t\tx: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\r\n\t\t\t\ty: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y)),\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tfunction scrollRequestFromChild(addOffset) {\r\n\t\t\t/* istanbul ignore next */ //Not testable in Karma\r\n\t\t\tfunction reposition() {\r\n\t\t\t\tpagePosition = newPosition;\r\n\t\t\t\tscrollTo();\r\n\t\t\t\tlog(iframeId, '--');\r\n\t\t\t}\r\n\r\n\t\t\tfunction calcOffset() {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tx: Number(messageData.width) + offset.x,\r\n\t\t\t\t\ty: Number(messageData.height) + offset.y,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tfunction scrollParent() {\r\n\t\t\t\tif (window.parentIFrame) {\r\n\t\t\t\t\twindow.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](newPosition.x, newPosition.y);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twarn(iframeId, 'Unable to scroll to requested position, window.parentIFrame not found');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar offset = addOffset ? getElementPosition(messageData.iframe) : { x: 0, y: 0 },\r\n\t\t\t\tnewPosition = calcOffset();\r\n\r\n\t\t\tlog(iframeId, 'Reposition requested from iFrame (offset x:' + offset.x + ' y:' + offset.y + ')');\r\n\r\n\t\t\tif (window.top !== window.self) {\r\n\t\t\t\tscrollParent();\r\n\t\t\t} else {\r\n\t\t\t\treposition();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction scrollTo() {\r\n\t\t\tif (false !== callback('scrollCallback', pagePosition)) {\r\n\t\t\t\tsetPagePosition(iframeId);\r\n\t\t\t} else {\r\n\t\t\t\tunsetPagePosition();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction findTarget(location) {\r\n\t\t\tfunction jumpToTarget() {\r\n\t\t\t\tvar jumpPosition = getElementPosition(target);\r\n\r\n\t\t\t\tlog(\r\n\t\t\t\t\tiframeId,\r\n\t\t\t\t\t'Moving to in page link (#' + hash + ') at x: ' + jumpPosition.x + ' y: ' + jumpPosition.y\r\n\t\t\t\t);\r\n\t\t\t\tpagePosition = {\r\n\t\t\t\t\tx: jumpPosition.x,\r\n\t\t\t\t\ty: jumpPosition.y,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tscrollTo();\r\n\t\t\t\tlog(iframeId, '--');\r\n\t\t\t}\r\n\r\n\t\t\tfunction jumpToParent() {\r\n\t\t\t\tif (window.parentIFrame) {\r\n\t\t\t\t\twindow.parentIFrame.moveToAnchor(hash);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlog(iframeId, 'In page link #' + hash + ' not found and window.parentIFrame not found');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar hash = location.split('#')[1] || '',\r\n\t\t\t\thashData = decodeURIComponent(hash),\r\n\t\t\t\ttarget = document.getElementById(hashData) || document.getElementsByName(hashData)[0];\r\n\r\n\t\t\tif (target) {\r\n\t\t\t\tjumpToTarget();\r\n\t\t\t} else if (window.top !== window.self) {\r\n\t\t\t\tjumpToParent();\r\n\t\t\t} else {\r\n\t\t\t\tlog(iframeId, 'In page link #' + hash + ' not found');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction callback(funcName, val) {\r\n\t\t\treturn chkCallback(iframeId, funcName, val);\r\n\t\t}\r\n\r\n\t\tfunction actionMsg() {\r\n\t\t\tif (settings[iframeId].firstRun) firstRun();\r\n\r\n\t\t\tswitch (messageData.type) {\r\n\t\t\t\tcase 'close':\r\n\t\t\t\t\tcloseIFrame(messageData.iframe);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'message':\r\n\t\t\t\t\tforwardMsgFromIFrame(getMsgBody(6));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'scrollTo':\r\n\t\t\t\t\tscrollRequestFromChild(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'scrollToOffset':\r\n\t\t\t\t\tscrollRequestFromChild(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'pageInfo':\r\n\t\t\t\t\tsendPageInfoToIframe();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'inPageLink':\r\n\t\t\t\t\tfindTarget(getMsgBody(9));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'reset':\r\n\t\t\t\t\tresetIFrame(messageData);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'init':\r\n\t\t\t\t\tresizeIFrame();\r\n\t\t\t\t\tcallback('initCallback', messageData.iframe);\r\n\t\t\t\t\tcallback('resizedCallback', messageData);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresizeIFrame();\r\n\t\t\t\t\tcallback('resizedCallback', messageData);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction hasSettings(iframeId) {\r\n\t\t\tvar retBool = true;\r\n\r\n\t\t\tif (!settings[iframeId]) {\r\n\t\t\t\tretBool = false;\r\n\t\t\t\twarn(messageData.type + ' No settings for ' + iframeId + '. Message was: ' + msg);\r\n\t\t\t}\r\n\r\n\t\t\treturn retBool;\r\n\t\t}\r\n\r\n\t\tfunction iFrameReadyMsgReceived() {\r\n\t\t\tfor (var iframeId in settings) {\r\n\t\t\t\ttrigger(\r\n\t\t\t\t\t'iFrame requested init',\r\n\t\t\t\t\tcreateOutgoingMsg(iframeId),\r\n\t\t\t\t\tdocument.getElementById(iframeId),\r\n\t\t\t\t\tiframeId\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction firstRun() {\r\n\t\t\tsettings[iframeId].firstRun = false;\r\n\t\t}\r\n\r\n\t\tvar msg = event.data,\r\n\t\t\tmessageData = {},\r\n\t\t\tiframeId = null;\r\n\r\n\t\tif ('[iFrameResizerChild]Ready' === msg) {\r\n\t\t\tiFrameReadyMsgReceived();\r\n\t\t} else if (isMessageForUs()) {\r\n\t\t\tmessageData = processMsg();\r\n\t\t\tiframeId = logId = messageData.id;\r\n\r\n\t\t\tif (!isMessageFromMetaParent() && hasSettings(iframeId)) {\r\n\t\t\t\tlog(iframeId, 'Received: ' + msg);\r\n\r\n\t\t\t\tif (checkIFrameExists() && isMessageFromIFrame()) {\r\n\t\t\t\t\tactionMsg();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tinfo(iframeId, 'Ignored: ' + msg);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chkCallback(iframeId, funcName, val) {\r\n\t\tvar func = null,\r\n\t\t\tretVal = null;\r\n\r\n\t\tif (settings[iframeId]) {\r\n\t\t\tfunc = settings[iframeId][funcName];\r\n\r\n\t\t\tif ('function' === typeof func) {\r\n\t\t\t\tretVal = func(val);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new TypeError(funcName + ' on iFrame[' + iframeId + '] is not a function');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retVal;\r\n\t}\r\n\r\n\tfunction closeIFrame(iframe) {\r\n\t\tvar iframeId = iframe.id;\r\n\r\n\t\tlog(iframeId, 'Removing iFrame: ' + iframeId);\r\n\t\tiframe.parentNode.removeChild(iframe);\r\n\t\tchkCallback(iframeId, 'closedCallback', iframeId);\r\n\t\tlog(iframeId, '--');\r\n\t\tdelete settings[iframeId];\r\n\t}\r\n\r\n\tfunction getPagePosition(iframeId) {\r\n\t\tif (null === pagePosition) {\r\n\t\t\tpagePosition = {\r\n\t\t\t\tx: window.pageXOffset !== undefined ? window.pageXOffset : document.documentElement.scrollLeft,\r\n\t\t\t\ty: window.pageYOffset !== undefined ? window.pageYOffset : document.documentElement.scrollTop,\r\n\t\t\t};\r\n\t\t\tlog(iframeId, 'Get page position: ' + pagePosition.x + ',' + pagePosition.y);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setPagePosition(iframeId) {\r\n\t\tif (null !== pagePosition) {\r\n\t\t\twindow.scrollTo(pagePosition.x, pagePosition.y);\r\n\t\t\tlog(iframeId, 'Set page position: ' + pagePosition.x + ',' + pagePosition.y);\r\n\t\t\tunsetPagePosition();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unsetPagePosition() {\r\n\t\tpagePosition = null;\r\n\t}\r\n\r\n\tfunction resetIFrame(messageData) {\r\n\t\tfunction reset() {\r\n\t\t\tsetSize(messageData);\r\n\t\t\ttrigger('reset', 'reset', messageData.iframe, messageData.id);\r\n\t\t}\r\n\r\n\t\tlog(messageData.id, 'Size reset requested by ' + ('init' === messageData.type ? 'host page' : 'iFrame'));\r\n\t\tgetPagePosition(messageData.id);\r\n\t\tsyncResize(reset, messageData, 'reset');\r\n\t}\r\n\r\n\tfunction setSize(messageData) {\r\n\t\tfunction setDimension(dimension) {\r\n\t\t\tmessageData.iframe.style[dimension] = messageData[dimension] + 'px';\r\n\t\t\tlog(messageData.id, 'IFrame (' + iframeId + ') ' + dimension + ' set to ' + messageData[dimension] + 'px');\r\n\t\t}\r\n\r\n\t\tfunction chkZero(dimension) {\r\n\t\t\t//FireFox sets dimension of hidden iFrames to zero.\r\n\t\t\t//So if we detect that set up an event to check for\r\n\t\t\t//when iFrame becomes visible.\r\n\r\n\t\t\t/* istanbul ignore next */ //Not testable in PhantomJS\r\n\t\t\tif (!hiddenCheckEnabled && '0' === messageData[dimension]) {\r\n\t\t\t\thiddenCheckEnabled = true;\r\n\t\t\t\tlog(iframeId, 'Hidden iFrame detected, creating visibility listener');\r\n\t\t\t\tfixHiddenIFrames();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction processDimension(dimension) {\r\n\t\t\tsetDimension(dimension);\r\n\t\t\tchkZero(dimension);\r\n\t\t}\r\n\r\n\t\tvar iframeId = messageData.iframe.id;\r\n\r\n\t\tif (settings[iframeId]) {\r\n\t\t\tif (settings[iframeId].sizeHeight) {\r\n\t\t\t\tprocessDimension('height');\r\n\t\t\t}\r\n\t\t\tif (settings[iframeId].sizeWidth) {\r\n\t\t\t\tprocessDimension('width');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction syncResize(func, messageData, doNotSync) {\r\n\t\t/* istanbul ignore if */ //Not testable in PhantomJS\r\n\t\tif (doNotSync !== messageData.type && requestAnimationFrame) {\r\n\t\t\tlog(messageData.id, 'Requesting animation frame');\r\n\t\t\trequestAnimationFrame(func);\r\n\t\t} else {\r\n\t\t\tfunc();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction trigger(calleeMsg, msg, iframe, id) {\r\n\t\tfunction postMessageToIFrame() {\r\n\t\t\tlog(id, '[' + calleeMsg + '] Sending msg to iframe[' + id + '] (' + msg + ') targetOrigin: ' + target);\r\n\t\t\tiframe.contentWindow.postMessage(msgId + msg, target);\r\n\t\t}\r\n\r\n\t\tfunction iFrameNotFound() {\r\n\t\t\tinfo(id, '[' + calleeMsg + '] IFrame(' + id + ') not found');\r\n\t\t\tif (settings[id]) {\r\n\t\t\t\tdelete settings[id];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tid = id || iframe.id;\r\n\t\tvar target = settings[id].targetOrigin;\r\n\r\n\t\tif (iframe && 'contentWindow' in iframe) {\r\n\t\t\tpostMessageToIFrame();\r\n\t\t} else {\r\n\t\t\tiFrameNotFound();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction createOutgoingMsg(iframeId) {\r\n\t\treturn (\r\n\t\t\tiframeId +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyMarginV1 +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].sizeWidth +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].log +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].interval +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].enablePublicMethods +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].autoResize +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyMargin +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].heightCalculationMethod +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyBackground +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyPadding +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].tolerance +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].inPageLinks +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].resizeFrom +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].widthCalculationMethod\r\n\t\t);\r\n\t}\r\n\r\n\tfunction setupIFrame(iframe, options) {\r\n\t\tfunction setLimits() {\r\n\t\t\tfunction addStyle(style) {\r\n\t\t\t\tif (Infinity !== settings[iframeId][style] && 0 !== settings[iframeId][style]) {\r\n\t\t\t\t\tiframe.style[style] = settings[iframeId][style] + 'px';\r\n\t\t\t\t\tlog(iframeId, 'Set ' + style + ' = ' + settings[iframeId][style] + 'px');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction chkMinMax(dimension) {\r\n\t\t\t\tif (settings[iframeId]['min' + dimension] > settings[iframeId]['max' + dimension]) {\r\n\t\t\t\t\tthrow new Error('Value for min' + dimension + ' can not be greater than max' + dimension);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tchkMinMax('Height');\r\n\t\t\tchkMinMax('Width');\r\n\r\n\t\t\taddStyle('maxHeight');\r\n\t\t\taddStyle('minHeight');\r\n\t\t\taddStyle('maxWidth');\r\n\t\t\taddStyle('minWidth');\r\n\t\t}\r\n\r\n\t\tfunction newId() {\r\n\t\t\tvar id = (options && options.id) || defaults.id + count++;\r\n\t\t\tif (null !== document.getElementById(id)) {\r\n\t\t\t\tid = id + count++;\r\n\t\t\t}\r\n\t\t\treturn id;\r\n\t\t}\r\n\r\n\t\tfunction ensureHasId(iframeId) {\r\n\t\t\tlogId = iframeId;\r\n\t\t\tif ('' === iframeId) {\r\n\t\t\t\tiframe.id = iframeId = newId();\r\n\t\t\t\tlogEnabled = (options || {}).log;\r\n\t\t\t\tlogId = iframeId;\r\n\t\t\t\tlog(iframeId, 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')');\r\n\t\t\t}\r\n\r\n\t\t\treturn iframeId;\r\n\t\t}\r\n\r\n\t\tfunction setScrolling() {\r\n\t\t\tlog(\r\n\t\t\t\tiframeId,\r\n\t\t\t\t'IFrame scrolling ' + (settings[iframeId].scrolling ? 'enabled' : 'disabled') + ' for ' + iframeId\r\n\t\t\t);\r\n\t\t\tiframe.style.overflow = false === settings[iframeId].scrolling ? 'hidden' : 'auto';\r\n\t\t\tiframe.scrolling = false === settings[iframeId].scrolling ? 'no' : 'yes';\r\n\t\t}\r\n\r\n\t\t//The V1 iFrame script expects an int, where as in V2 expects a CSS\r\n\t\t//string value such as '1px 3em', so if we have an int for V2, set V1=V2\r\n\t\t//and then convert V2 to a string PX value.\r\n\t\tfunction setupBodyMarginValues() {\r\n\t\t\tif ('number' === typeof settings[iframeId].bodyMargin || '0' === settings[iframeId].bodyMargin) {\r\n\t\t\t\tsettings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;\r\n\t\t\t\tsettings[iframeId].bodyMargin = '' + settings[iframeId].bodyMargin + 'px';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction checkReset() {\r\n\t\t\t// Reduce scope of firstRun to function, because IE8's JS execution\r\n\t\t\t// context stack is borked and this value gets externally\r\n\t\t\t// changed midway through running this function!!!\r\n\t\t\tvar firstRun = settings[iframeId].firstRun,\r\n\t\t\t\tresetRequertMethod = settings[iframeId].heightCalculationMethod in resetRequiredMethods;\r\n\r\n\t\t\tif (!firstRun && resetRequertMethod) {\r\n\t\t\t\tresetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction setupIFrameObject() {\r\n\t\t\tif (Function.prototype.bind) {\r\n\t\t\t\t//Ignore unpolyfilled IE8.\r\n\t\t\t\tsettings[iframeId].iframe.iFrameResizer = {\r\n\t\t\t\t\tclose: closeIFrame.bind(null, settings[iframeId].iframe),\r\n\r\n\t\t\t\t\tresize: trigger.bind(null, 'Window resize', 'resize', settings[iframeId].iframe),\r\n\r\n\t\t\t\t\tmoveToAnchor: function(anchor) {\r\n\t\t\t\t\t\ttrigger('Move to anchor', 'inPageLink:' + anchor, settings[iframeId].iframe, iframeId);\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\tsendMessage: function(message) {\r\n\t\t\t\t\t\tmessage = JSON.stringify(message);\r\n\t\t\t\t\t\ttrigger('Send Message', 'message:' + message, settings[iframeId].iframe, iframeId);\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//We have to call trigger twice, as we can not be sure if all\r\n\t\t//iframes have completed loading when this code runs. The\r\n\t\t//event listener also catches the page changing in the iFrame.\r\n\t\tfunction init(msg) {\r\n\t\t\tfunction iFrameLoaded() {\r\n\t\t\t\ttrigger('iFrame.onload', msg, iframe);\r\n\t\t\t\tcheckReset();\r\n\t\t\t}\r\n\r\n\t\t\taddEventListener(iframe, 'load', iFrameLoaded);\r\n\t\t\ttrigger('init', msg, iframe);\r\n\t\t}\r\n\r\n\t\tfunction checkOptions(options) {\r\n\t\t\tif ('object' !== typeof options) {\r\n\t\t\t\tthrow new TypeError('Options is not an object');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction copyOptions(options) {\r\n\t\t\tfor (var option in defaults) {\r\n\t\t\t\tif (defaults.hasOwnProperty(option)) {\r\n\t\t\t\t\tsettings[iframeId][option] = options.hasOwnProperty(option) ? options[option] : defaults[option];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction getTargetOrigin(remoteHost) {\r\n\t\t\treturn '' === remoteHost || 'file://' === remoteHost ? '*' : remoteHost;\r\n\t\t}\r\n\r\n\t\tfunction processOptions(options) {\r\n\t\t\toptions = options || {};\r\n\t\t\tsettings[iframeId] = {\r\n\t\t\t\tfirstRun: true,\r\n\t\t\t\tiframe: iframe,\r\n\t\t\t\tremoteHost: iframe.src\r\n\t\t\t\t\t.split('/')\r\n\t\t\t\t\t.slice(0, 3)\r\n\t\t\t\t\t.join('/'),\r\n\t\t\t};\r\n\r\n\t\t\tcheckOptions(options);\r\n\t\t\tcopyOptions(options);\r\n\r\n\t\t\tsettings[iframeId].targetOrigin =\r\n\t\t\t\ttrue === settings[iframeId].checkOrigin ? getTargetOrigin(settings[iframeId].remoteHost) : '*';\r\n\t\t}\r\n\r\n\t\tfunction beenHere() {\r\n\t\t\treturn iframeId in settings && 'iFrameResizer' in iframe;\r\n\t\t}\r\n\r\n\t\tvar iframeId = ensureHasId(iframe.id);\r\n\r\n\t\tif (!beenHere()) {\r\n\t\t\tprocessOptions(options);\r\n\t\t\tsetScrolling();\r\n\t\t\tsetLimits();\r\n\t\t\tsetupBodyMarginValues();\r\n\t\t\tinit(createOutgoingMsg(iframeId));\r\n\t\t\tsetupIFrameObject();\r\n\t\t} else {\r\n\t\t\twarn(iframeId, 'Ignored iFrame, already setup.');\r\n\t\t}\r\n\t}\r\n\r\n\tfunction debouce(fn, time) {\r\n\t\tif (null === timer) {\r\n\t\t\ttimer = setTimeout(function() {\r\n\t\t\t\ttimer = null;\r\n\t\t\t\tfn();\r\n\t\t\t}, time);\r\n\t\t}\r\n\t} //Not testable in PhantomJS\r\n\r\n\t/* istanbul ignore next */ function fixHiddenIFrames() {\r\n\t\tfunction checkIFrames() {\r\n\t\t\tfunction checkIFrame(settingId) {\r\n\t\t\t\tfunction chkDimension(dimension) {\r\n\t\t\t\t\treturn '0px' === settings[settingId].iframe.style[dimension];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction isVisible(el) {\r\n\t\t\t\t\treturn null !== el.offsetParent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isVisible(settings[settingId].iframe) && (chkDimension('height') || chkDimension('width'))) {\r\n\t\t\t\t\ttrigger('Visibility change', 'resize', settings[settingId].iframe, settingId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (var settingId in settings) {\r\n\t\t\t\tcheckIFrame(settingId);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction mutationObserved(mutations) {\r\n\t\t\tlog('window', 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type);\r\n\t\t\tdebouce(checkIFrames, 16);\r\n\t\t}\r\n\r\n\t\tfunction createMutationObserver() {\r\n\t\t\tvar target = document.querySelector('body'),\r\n\t\t\t\tconfig = {\r\n\t\t\t\t\tattributes: true,\r\n\t\t\t\t\tattributeOldValue: false,\r\n\t\t\t\t\tcharacterData: true,\r\n\t\t\t\t\tcharacterDataOldValue: false,\r\n\t\t\t\t\tchildList: true,\r\n\t\t\t\t\tsubtree: true,\r\n\t\t\t\t},\r\n\t\t\t\tobserver = new MutationObserver(mutationObserved);\r\n\r\n\t\t\tobserver.observe(target, config);\r\n\t\t}\r\n\r\n\t\tvar MutationObserver = window.MutationObserver || window.WebKitMutationObserver;\r\n\r\n\t\tif (MutationObserver) createMutationObserver();\r\n\t}\r\n\r\n\tfunction resizeIFrames(event) {\r\n\t\tfunction resize() {\r\n\t\t\tsendTriggerMsg('Window ' + event, 'resize');\r\n\t\t}\r\n\r\n\t\tlog('window', 'Trigger event: ' + event);\r\n\t\tdebouce(resize, 16);\r\n\t} //Not testable in PhantomJS\r\n\r\n\t/* istanbul ignore next */ function tabVisible() {\r\n\t\tfunction resize() {\r\n\t\t\tsendTriggerMsg('Tab Visable', 'resize');\r\n\t\t}\r\n\r\n\t\tif ('hidden' !== document.visibilityState) {\r\n\t\t\tlog('document', 'Trigger event: Visiblity change');\r\n\t\t\tdebouce(resize, 16);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sendTriggerMsg(eventName, event) {\r\n\t\tfunction isIFrameResizeEnabled(iframeId) {\r\n\t\t\treturn (\r\n\t\t\t\t'parent' === settings[iframeId].resizeFrom &&\r\n\t\t\t\tsettings[iframeId].autoResize &&\r\n\t\t\t\t!settings[iframeId].firstRun\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tfor (var iframeId in settings) {\r\n\t\t\tif (isIFrameResizeEnabled(iframeId)) {\r\n\t\t\t\ttrigger(eventName, event, document.getElementById(iframeId), iframeId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setupEventListeners() {\r\n\t\taddEventListener(window, 'message', iFrameListener);\r\n\r\n\t\taddEventListener(window, 'resize', function() {\r\n\t\t\tresizeIFrames('resize');\r\n\t\t});\r\n\r\n\t\taddEventListener(document, 'visibilitychange', tabVisible);\r\n\t\taddEventListener(document, '-webkit-visibilitychange', tabVisible); //Andriod 4.4\r\n\t\taddEventListener(window, 'focusin', function() {\r\n\t\t\tresizeIFrames('focus');\r\n\t\t}); //IE8-9\r\n\t\taddEventListener(window, 'focus', function() {\r\n\t\t\tresizeIFrames('focus');\r\n\t\t});\r\n\t}\r\n\r\n\tfunction factory() {\r\n\t\tfunction init(options, element) {\r\n\t\t\tif (!element) {\r\n\t\t\t\treturn; //Stop mootools creating problems\r\n\t\t\t} else if (!element.tagName) {\r\n\t\t\t\tthrow new TypeError('Object is not a valid DOM element');\r\n\t\t\t} else if ('IFRAME' !== element.tagName.toUpperCase()) {\r\n\t\t\t\tthrow new TypeError('Expected `);\r\n\t\tthis.$ctx.append(this.$frame);\r\n\t\tif (!this.initPostCall()) {\r\n\t\t\tthis.$frame.attr('src', this.url);\r\n\t\t}\r\n\t\t(this.$frame as any).iFrameResize();\r\n\t}\r\n\r\n\tinitPostCall(): boolean {\r\n\t\tlet params: any = this.$ctx.data('params') || ',';\r\n\t\tparams = JSON.parse(`[${params.substr(0, params.length - 1)}]`);\r\n\t\tif (params.length > 0) {\r\n\t\t\tconst $form = $('
    ');\r\n\t\t\t$form.attr({\r\n\t\t\t\taction: this.url,\r\n\t\t\t\ttarget: this.framename,\r\n\t\t\t});\r\n\t\t\t$.each(params, (i, el) => {\r\n\t\t\t\tconst name: string = Object.getOwnPropertyNames(el)[0];\r\n\t\t\t\t$form.append(``);\r\n\t\t\t});\r\n\t\t\t$form\r\n\t\t\t\t.appendTo(this.$ctx)\r\n\t\t\t\t.submit()\r\n\t\t\t\t.remove();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tonPostmessage(e: any) {\r\n\t\tlet data = e.originalEvent.data;\r\n\t\tif (typeof data === 'string') {\r\n\t\t\tdata = data.split(',');\r\n\t\t}\r\n\t\tif (data[0] === 'setHeight') {\r\n\t\t\tif ((this.$frame[0] as any)['contentWindow'] === e.originalEvent.source) {\r\n\t\t\t\tthis.$frame.css('height', `${parseInt(data[1], 10) + 20}px`);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tstop() { }\r\n}\r\n\r\nfunction addUsercentricsIframe() {\r\n\tvar framename = `toolframe_${t_id}`;\r\n\tvar $frame = $(``);\r\n\t$(\"#m-iframe-\" + t_id).append($frame);\r\n\tif (!initUCPostCall()) {\r\n\t\t$(`#toolframe_${t_id}`).attr('src', url);\r\n\t}\r\n\t($(`#toolframe_${t_id}`) as any).iFrameResize();\r\n}\r\n\r\nfunction initUCPostCall() {\r\n\tlet params: any = paramsdata || ',';\r\n\tparams = JSON.parse(`[${params.substr(0, params.length - 1)}]`);\r\n\tif (params.length > 0) {\r\n\t\tconst $form = $('');\r\n\t\t$form.attr({\r\n\t\t\taction: url,\r\n\t\t\ttarget: `toolframe_${t_id}`,\r\n\t\t});\r\n\t\t$.each(params, (i, el) => {\r\n\t\t\tconst name: string = Object.getOwnPropertyNames(el)[0];\r\n\t\t\t$form.append(``);\r\n\t\t});\r\n\t\t$form\r\n\t\t\t.appendTo($(\"#m-iframe-\" + t_id))\r\n\t\t\t.submit()\r\n\t\t\t.remove();\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport 'tooltipster';\r\n\r\nconst classes = {\r\n\ttooltipTrigger: 'js-m-list-icons__image-tooltip',\r\n\tstateTooltipVisible: 'state-m-tooltip--is-visible',\r\n\tstateHeaderPos0: 'state-m-navigation--scroll-0-position',\r\n\ttooltipCloser: 'js-m-tooltip__closer',\r\n};\r\n\r\n@createModule('ListIcons')\r\n/**\r\n * ListIcons module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class ListIcons extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.initImageTooltip();\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitImageTooltip() {\r\n\t\tconst $triggers = this.$ctx.find(`.${classes.tooltipTrigger}`);\r\n\t\t$triggers.on('click', (e: any) => e.preventDefault());\r\n\t\t$triggers.each((i, el) => {\r\n\t\t\tconst $trigger = $(el) as any;\r\n\t\t\t$trigger.tooltipster({\r\n\t\t\t\ttheme: 'tooltipster-shadow',\r\n\t\t\t\tcontent: `
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    `,\r\n\t\t\t\tcontentAsHTML: true,\r\n\t\t\t\ttrigger: 'click',\r\n\t\t\t\tinteractive: true,\r\n\t\t\t\tzIndex: 2,\r\n\t\t\t\tfunctionReady(instance: any) {\r\n\t\t\t\t\tinstance._$tooltip.on('click', `.${classes.tooltipCloser}`, (ev: Event) => {\r\n\t\t\t\t\t\tev.preventDefault();\r\n\t\t\t\t\t\t$trigger.trigger('click');\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\tfunctionPosition(instance: any, helper: any, position: any) {\r\n\t\t\t\t\t// fine tuning of tooltip position relative to trigger element\r\n\t\t\t\t\tif (position.side === 'top') {\r\n\t\t\t\t\t\tposition.coord.top -= 16;\r\n\t\t\t\t\t} else if (position.side === 'bottom') {\r\n\t\t\t\t\t\tposition.coord.top += 4;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn position;\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nimport * as Cookies from 'js-cookie';\r\n\r\nconst classes = {\r\n\tselectLink: 'js-m-market-switch__switch',\r\n};\r\n\r\n@createModule('MarketSwitch')\r\n/**\r\n * market-switch module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class MarketSwitch extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tconst $select = this._getLanguageSelect();\r\n\t\tconst cachedCountry = Cookies.get('cov_market');\r\n\t\tconst baseUrl = $select.data('baseUrl');\r\n\t\tconst preventAutoSubmit = $(this._ctx).attr('data-preventautosubmit');\r\n\t\tthis._updateSelectedOption($select, cachedCountry);\r\n\r\n\t\t$select.on('change', (ev: Event) => this.followOptionLink(ev, baseUrl, preventAutoSubmit == 'true'));\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t/**\r\n\t * returns DOM Element\r\n\t */\r\n\t_getLanguageSelect(): JQuery {\r\n\t\treturn $(this._ctx).find(`.${classes.selectLink}`);\r\n\t}\r\n\r\n\t/**\r\n\t * update selected option of given select element if it is not already selected\r\n\t *\r\n\t * @param $select | jQuery Element tag select\r\n\t * @param value | value of select option\r\n\t */\r\n\t_updateSelectedOption($select: JQuery, value: string) {\r\n\t\tif (value && $select.val() !== value && $(`option[value=\"${value}\"]`, $select).length > 0) {\r\n\t\t\t$select.val(value);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * follow link of selected option on change\r\n\t *\r\n\t * @param $select | jQuery Element tag select\r\n\t * @param ev | value of select option\r\n\t */\r\n\tfollowOptionLink(ev: any, baseUrl: string, preventAutoSubmit: boolean) {\r\n\t\tlet market = ev.currentTarget.value;\r\n\t\tCookies.set('cov_market', market);\r\n\t\tif (preventAutoSubmit === false) {\r\n\t\t\twindow.location.href = baseUrl + market;\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\nimport { MarketoFormGlobal } from '../../../molecules/marketo-form-global/js/marketo-form-global';\r\nconst classes = {\r\n\tcontactImage: 'js-m-marketo-form__contact-image',\r\n\tstateHasImage: 'm-marketo-form__has-contact-image',\r\n\tstateAdditionalFieldsVisible: 'm-marketo-form__show-additional-fields',\r\n\tstateSuccess: 'state-m-marketo-form--success'\r\n};\r\n\r\n@createModule('MarketoForm')\r\nexport class MarketoForm extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$blockedMessage: JQuery;\r\n\r\n\tformId: string;\r\n\tformHref: string;\r\n\tformFullId: string;\r\n\tenvId: string;\r\n\tisExpired: boolean;\r\n\tredirectHref: string;\r\n\tsubmitSuccessfulMessage: string;\r\n\tisHiddenFormSubmit: boolean;\r\n\tisSendDataToGtmOnPageLoad: boolean;\r\n\r\n\tmarketoService: MarketoFormGlobal;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$blockedMessage = this.$ctx.find(\"p[data-id='blockedMsg']\");\r\n\t\tthis.envId = this.$ctx.data(\"environment-id\");\r\n\t\tthis.formId = this.$ctx.data(\"form-id\");\r\n\t\tthis.formFullId = `mktoForm_${this.$ctx.data(\"form-id\")}`;\r\n\t\tthis.formHref = this.$ctx.data(\"form-href\");\r\n\t\tthis.redirectHref = this.$ctx.data(\"redirect-href\");\r\n\t\tthis.isExpired = this.$ctx.data(\"expired\");\r\n\t\tthis.submitSuccessfulMessage = this.$ctx.data(\"submitsuccessful-message\");\r\n\t\tthis.isHiddenFormSubmit = this.$ctx.data(\"allow-hidden-form-submit\");\r\n\t\tthis.isSendDataToGtmOnPageLoad = this.$ctx.data(\"sc-send-data-to-gtm-pageload\");\r\n\t\tthis.marketoService = new MarketoFormGlobal();\r\n\r\n\t\tif (!this.isExpired) {\r\n\t\t\tthis.$blockedMessage.show();\r\n\r\n\t\t\tlet timerRef = setInterval(() => {\r\n\t\t\t\tlet MktoForms2 = (window as any)[\"MktoForms2\"];\r\n\t\t\t\tif (typeof (MktoForms2) != \"undefined\") {\r\n\t\t\t\t\tclearInterval(timerRef);\r\n\t\t\t\t\tthis.loadMktoForm();\r\n\t\t\t\t}\r\n\t\t\t}, 300);\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tloadMktoForm() {\r\n\t\tlet $this = this;\r\n\r\n\t\tlet MktoForms2 = (window as any)[\"MktoForms2\"];\r\n\t\tif (typeof (MktoForms2) != \"undefined\") {\r\n\r\n\t\t\tMktoForms2.loadForm($this.formHref, $this.envId, $this.formId, function (form: any) {\r\n\t\t\t\tform.onSuccess(function (values: any, followUpUrl: string) {\r\n\t\t\t\t\tTrack.setKnownMarketoLead(true);\r\n\t\t\t\t\t$this.submitDataToGtm();\r\n\t\t\t\t\tif ($this.submitSuccessfulMessage.length > 0 || $this.isHiddenFormSubmit == true) {\r\n\t\t\t\t\t\t$this.$ctx.addClass(classes.stateSuccess);\r\n\t\t\t\t\t\t$('html, body').animate({\r\n\t\t\t\t\t\t\tscrollTop: $this.$ctx.offset().top - 200\r\n\t\t\t\t\t\t}, 2000);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\twindow.location.href = $this.redirectHref;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//unlock\r\n\t\t\t\t\t$('.a-video--locked').removeClass('a-video--locked');\r\n\t\t\t\t\t$('.m-download-item--locked').removeClass('m-download-item--locked');\r\n\t\t\t\t\t$('.m-download-table__item--locked').removeClass('m-download-table__item--locked');\r\n\t\t\t\t\t$('.m-hero-article-stage--locked').removeClass('m-hero-article-stage--locked');\r\n\t\t\t\t\t$('.m-scrollable-teaser-item--locked').removeClass('m-scrollable-teaser-item--locked');\r\n\t\t\t\t\t$('.m-talk--locked').removeClass('m-talk--locked');\r\n\t\t\t\t\t$('.m-teaser-large--locked').removeClass('m-teaser-large--locked');\r\n\t\t\t\t\t$('.o-teaser-content-area__item').each((i, e) => {\r\n\t\t\t\t\t\tconst $teaser = $(e).children();\r\n\t\t\t\t\t\tconst classList = $teaser.attr('class');\r\n\t\t\t\t\t\tconst className = classList.split(' ');\r\n\t\t\t\t\t\t$teaser.removeClass(className[0] + '--locked');\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tform.onSubmit(function () {\r\n\t\t\t\t\t$this.marketoService.formatPhoneNumber(form);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (Track.isKnownMarketoLead()) {\r\n\t\t\t\t\tform.vals({ \"formVersion\": \"Known\" });\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Hide blocked test when form is initialized.\r\n\r\n\t\t\t\t$this.$blockedMessage.hide();\r\n\t\t\t\t$this.setFormStartDataToGtm();\r\n\t\t\t});\r\n\r\n\t\t\t$this.marketoService.initializeMarketoOnScriptLoad();\r\n\t\t}\r\n\t}\r\n\r\n\tsubmitDataToGtm() {\r\n\t\tlet $this = this;\r\n\t\tlet formNode = $this.$ctx.find(\"form\")\r\n\t\tlet IsSendDataToGtm = formNode.data(\"sc-send-data-to-gtm\");\r\n\t\tif (IsSendDataToGtm) {\r\n\t\t\tlet typeOfForm = formNode.data(\"form-name\");\r\n\r\n\t\t\tconst trackdata: {\r\n\t\t\t\tevent: string;\r\n\t\t\t\tform_id: string;\r\n\t\t\t\tform_name: string;\r\n\t\t\t\tform_destination: string;\r\n\t\t\t\tform_submit_text: string;\r\n\t\t\t} = {\r\n\t\t\t\tevent: 'form_submit',\r\n\t\t\t\tform_id: $(formNode).attr(\"id\"),\r\n\t\t\t\tform_name: typeOfForm,\r\n\t\t\t\tform_destination: '',\r\n\t\t\t\tform_submit_text: '',\r\n\t\t\t};\r\n\r\n\t\t\tTrack.gtmTrack(trackdata);\r\n\t\t}\r\n\t}\r\n\r\n\tsetFormStartDataToGtm() {\r\n\t\tlet $this = this;\r\n\t\tlet formNode = $this.$ctx.find(\"form\")\r\n\t\tlet isSendDataToGtmOnPageLoad = formNode.data(\"sc-send-data-to-gtm-pageload\");\r\n\t\tif (isSendDataToGtmOnPageLoad) {\r\n\t\t\tlet typeOfForm = formNode.data(\"form-name\");\r\n\r\n\t\t\tconst trackdata: {\r\n\t\t\t\tevent: string;\r\n\t\t\t\tform_id: string;\r\n\t\t\t\tform_name: string;\r\n\t\t\t\tform_destination: string;\r\n\t\t\t\tform_submit_text: string;\r\n\t\t\t} = {\r\n\t\t\t\tevent: 'form_start',\r\n\t\t\t\tform_id: $(formNode).attr(\"id\"),\r\n\t\t\t\tform_name: typeOfForm,\r\n\t\t\t\tform_destination: '',\r\n\t\t\t\tform_submit_text: '',\r\n\t\t\t};\r\n\r\n\t\t\tTrack.gtmTrack(trackdata);\r\n\t\t}\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('ModalOverlay')\r\n/**\r\n * modal-overlay module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class ModalOverlay extends TerrificSpec {\r\n\t$ctx: Object;\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\t$(window).on('modalWindow:open', this._openModal.bind(this));\r\n\t\t$(window).on('modalWindow:close', this._closeModal.bind(this));\r\n\r\n\t\t$(this.$ctx).on('click', this._closeModal.bind(this));\r\n\t\t$(document).on('keyup', (ev: any) => {\r\n\t\t\tif (ev.key === 'Escape') {\r\n\t\t\t\tthis._closeModal();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\r\n\t_openModal() {\r\n\t\t$(this.$ctx).addClass('state-m-modal-overlay--visible');\r\n\t}\r\n\r\n\t_closeModal() {\r\n\t\t$(this.$ctx).removeClass('state-m-modal-overlay--visible');\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\t$(this.$ctx).empty();\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { floatControlLabel } from '@project/shared/utils/form-control/js/form-control';\r\nimport * as copy from 'copy-to-clipboard';\r\n\r\nconst classes = {\r\n\tstateModalShow: 'state-favourite-popup--visible',\r\n\tmodalSubmit: 'js-m-modal-actions-submit',\r\n\tmodalClose: 'js-m-modal-actions-close',\r\n\tmodalDialog: \"js-m-modal-actions__dialog\",\r\n\tclipboardAnchor: \"js-m-modal-actions__clipboard-anchor\",\r\n\tremoveEmail: \"js-remove-email-input\",\r\n\taddEmail: \"js-add-email-input\",\r\n\taddEmailDisabled : 'state-m-modal-actions__add-email--disabled',\r\n\temailTemplate: \"js-m-modal-actions__email-template\",\r\n\ttextarea: \"js-m-modal-actions__textarea\",\r\n\ttextareaValLength: \"js-m-modal-actions__textarea-count-length\",\r\n\ttextareaValLengthMax: \"js-m-modal-actions__textarea-count-max\",\r\n\tstateCountMax: \"state-textarea-count-max\",\r\n\topenTooltip: \"js-m-modal-actions--open-tooltip\",\r\n\ttermsCheckbox: \"js-m-modal-actions__terms\",\r\n\tstateInputError: \"input-validation-error\",\r\n\tnewlistWrapper: \"js-m-modal-actions__new-list\",\r\n\temailWrapper: \"js-m-modal-actions__email-group\",\r\n};\r\n\r\n@createModule('ModalActions')\r\n/**\r\n * modal-actions module implementation.\r\n */\r\nexport class ModalActions extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis._closeModal();\r\n\t\tthis._submitModal();\r\n\t\tthis._openTooltip();\r\n\r\n\t\tthis.$ctx.on('click', this._hidePopup.bind(this));\r\n\r\n\t\tconst $modalDialog = this.$ctx.find(`.${classes.modalDialog}`);\r\n\t\t$modalDialog.on('click', (ev: Event) => {\r\n\t\t\tev.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\tconst $clipboardAnchor = this.$ctx.find(`.${classes.clipboardAnchor}`);\r\n\t\t$clipboardAnchor.on('click', () => this.copyURLToClipboard());\r\n\r\n\t\tthis.addEmaillAdress();\r\n\r\n\t\tthis.changeTextareaCount();\r\n\t\t\r\n\t\tresolve();\r\n\t}\r\n\r\n\t_submitModal() {\r\n\t\tconst $modalSubmit = this.$ctx.find(`.${classes.modalSubmit}`);\r\n\t\t$modalSubmit.on('click', () => {\r\n\t\t\tthis.newListValidation();\r\n\t\t\tthis.emailListValidation();\r\n\t\t});\r\n\t}\r\n\r\n\temailListValidation() {\r\n\t\tconst $emailWrapper = this.$ctx.find(`.${classes.emailWrapper}`);\r\n\t\tconst $input = $emailWrapper.find(\"input[type='email']\")\r\n\t\tif($input.val() == \"\") {\r\n\t\t\t$input.addClass(classes.stateInputError)\r\n\t\t\t$input.on(\"input propertychange\",function(ev: any){\r\n\t\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\t\t$target.removeClass(classes.stateInputError)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tnewListValidation() {\r\n\t\tconst $newlistWrapper = this.$ctx.find(`.${classes.newlistWrapper}`);\r\n\t\tconst $checkedbox = $newlistWrapper.find(\"input[type='checkbox']\")\r\n\t\tconst $input = $newlistWrapper.find(\"input[type='text']\")\r\n\t\tif($checkedbox.is(\":checked\") && $input.val() == \"\") {\r\n\t\t\t$input.addClass(classes.stateInputError)\r\n\t\t\t$input.on(\"input propertychange\",function(ev: any){\r\n\t\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\t\t$target.removeClass(classes.stateInputError)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tchangeTextareaCount() {\r\n\t\tconst $textarea = this.$ctx.find(`.${classes.textarea}`);\r\n\t\t$textarea.on(\"input propertychange\",function(ev: any){\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\tconst $textareaValLength = $target.parent().find(`.${classes.textareaValLength}`);\r\n\t\t\tconst $textareaValLengthMax = $target.parent().find(`.${classes.textareaValLengthMax}`);\r\n\t\t\tconst textVal = $target.val();\r\n\t\t\tconst currentCount = parseInt($textareaValLengthMax.text()) - textVal.length;\r\n\t\t\tif ( currentCount > 0) {\r\n\t\t\t\t$textareaValLength.text(currentCount);\r\n\t\t\t\t$textareaValLength.parent().removeClass(classes.stateCountMax)\r\n\t\t\t} else {\r\n\t\t\t\t$textareaValLength.text('0');\r\n\t\t\t\t$textareaValLength.parent().addClass(classes.stateCountMax)\r\n\t\t\t};\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * Copies the URL (location.href) into the browser clipboard\r\n\t * @constructor {function}\r\n\t * @returns {void}\r\n\t */\r\n\tcopyURLToClipboard(): void {\r\n\t\tconst opts: any = this.getClipboardOpts();\r\n\t\tconst data = this.getLocationHref();\r\n\r\n\t\tthis.showFeedbackMsg();\r\n\t\tcopy(data, opts);\r\n\t\tthis.hideFeedbackMsgTimer();\r\n\t}\r\n\r\n\t/**\r\n\t * getClipboardOpts\r\n\t * @constructor {function} getClipboardOpts\r\n\t * @returns {Object} any\r\n\t */\r\n\tgetClipboardOpts(): any {\r\n\t\treturn {\r\n\t\t\tdebug: false,\r\n\t\t\tmessage: 'Press #{⌘+C} on macOS or #{Ctrl+C} on Windows to copy',\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * getLocationHref\r\n\t * @constructor {function} getLocationHref\r\n\t * @returns {string} string\r\n\t */\r\n\tgetLocationHref(): string {\r\n\t\treturn document.location.href;\r\n\t}\r\n\r\n\t/**\r\n\t * showDebugInfo - Description\r\n\t * @constructor {function} showDebugInfo\r\n\t * @param {Object} opts holds thze options for the clipboard object\r\n\t * @param {string} data holds the data to be copied into the clipboard\r\n\t */\r\n\tshowDebugInfo(opts: any, data: string) {\r\n\t\tif (opts.debug) {\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.log('Copied to clipboard: ', data);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * showFeedbackMsg\r\n\t * @constructor {function} showFeedbackMsg\r\n\t */\r\n\tshowFeedbackMsg() {\r\n\t\tconst $clipboardAnchor = this.$ctx.find(`.${classes.clipboardAnchor}`);\r\n\t\t$clipboardAnchor.prev().removeClass('show');\r\n\t\t$clipboardAnchor.prev().addClass('show');\r\n\t}\r\n\r\n\t/**\r\n\t * hideFeedbackMsg\r\n\t * @constructor {function} hideFeedbackMsg\r\n\t */\r\n\thideFeedbackMsg() {\r\n\t\tconst $clipboardAnchor = this.$ctx.find(`.${classes.clipboardAnchor}`);\r\n\t\t$clipboardAnchor.prev().removeClass('show');\r\n\t}\r\n\r\n\t/**\r\n\t * showFeedbackMsg\r\n\t * @constructor {function} showFeedbackMsg\r\n\t */\r\n\thideFeedbackMsgTimer() {\r\n\t\twindow.setTimeout(() => {\r\n\t\t\tthis.hideFeedbackMsg();\r\n\t\t}, 3500);\r\n\t}\r\n\r\n\t_closeModal() {\r\n\t\tconst $modalClose = this.$ctx.find(`.${classes.modalClose}`);\r\n\t\t$modalClose.on('click', this._hidePopup.bind(this));\r\n\t}\r\n\r\n\t_openTooltip() {\r\n\t\tconst $openTooltip = this.$ctx.find(`.${classes.openTooltip}`);\r\n\t\tconst $checkedbox = this.$ctx.find(`.${classes.termsCheckbox}`).find(\"input[type='checkbox']\");\r\n\t\t$openTooltip.on('click', () => {\r\n\t\t\tconst curScrollTop = $(window).scrollTop();\r\n\t\t\tif($checkedbox.is(\":checked\")) {\r\n\t\t\t\t$(window).scrollTop(curScrollTop - 20);\r\n\t\t\t\t$('.m-navigation-meta__tooltip-favourite').fadeIn();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_hidePopup(ev: Event) {\r\n\t\tif($(ev.currentTarget).hasClass('js-m-modal-actions-confirmation')) {\r\n\t\t\tthis.$ctx.removeClass(classes.stateModalShow);\r\n\t\t} else {\r\n\t\t\tthis.$ctx.removeClass(classes.stateModalShow);\r\n\t\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\t}\r\n\t}\r\n\r\n\t// Add new email\r\n\taddEmaillAdress() {\r\n\t\tconst $addEmail = this.$ctx.find(`.${classes.addEmail}`);\r\n\t\tconst $emailTemplate = this.$ctx.find(`.${classes.emailTemplate}`);\r\n\t\tconst $emailTemplateHtml = $emailTemplate.html();\r\n\t\t$addEmail.on('click', () => {\r\n\t\t\tvar emailLength = this.$ctx.find('.m-modal-actions__email-group').length;\r\n\t\t\tif ( emailLength > 9 ) {\r\n\t\t\t\t$addEmail.addClass(classes.addEmailDisabled);\r\n\t\t\t}\r\n\t\t\t$emailTemplate.before($emailTemplateHtml);\r\n\t\t\t$('.m-modal-actions__sub-email-group').on(\"focus\",'.a-input',(ev: any) => {\r\n\t\t\t\tconst me = ev.currentTarget;\r\n\t\t\t\tfloatControlLabel(me, true)\r\n\t\t\t})\r\n\t\t});\r\n\t\t$('.m-modal-actions__form').on(\"click\",'.js-remove-email-input',(ev: Event) => {\r\n\t\t\t$(ev.currentTarget).parent().remove();\r\n\t\t\t$addEmail.removeClass(classes.addEmailDisabled);\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\nimport { NavigationInPageConfig } from './navigation-in-page.model';\r\nimport { addScrollClickTrigger, init as initHashScrolling } from '@project/shared/utils/hashscrolling/js/hashscrolling';\r\nimport * as copy from 'copy-to-clipboard';\r\n\r\n@createModule('NavigationInPage')\r\n\r\n/**\r\n * @author Guener Sakinc \r\n *\r\n * 1. Check if there are any AnchorIs and AnchorTitles available to show or remove it\r\n * 2. Grab properties from required attributes and generate mark up to be rendered\r\n * 3. Anchor bar container implemented in the existing header to take over the animation properties\r\n * 4. Handles the visibility/fading of the anchor bar by the target elements' top position and the calculated threshold\r\n * incl. its offset\r\n * 5. Calculate vertical scroll position of the document to hilite the proper anchor item\r\n * 6. Re-position the anchor bar vertical scrolling position when the viewport is too small for all items to be shown\r\n * 7. Calculate the width of the status bar under the anchor bar buttons and include a css transition\r\n * 8. Scroll vertically to content item when an anchor bar item is clicked\r\n *\r\n */\r\nexport class NavigationInPage extends TerrificSpec {\r\n\t/**\r\n\t * @var {NavigationInPageConfig} config - returns the model data\r\n\t */\r\n\tconfig: NavigationInPageConfig;\r\n\r\n\t/**\r\n\t * @var {?} timer - returns a timer object that is needed to handle the showHideAnchorBar() functionality\r\n\t * and avoid flickering of the anchor bar when scrolling quickly changing scroll directions over the threshold area\r\n\t */\r\n\ttimer: any = null;\r\n\r\n\t/**\r\n\t * @var {number} winScrollY - return the current window scroll top value.\r\n\t */\r\n\twinScrollY = 0;\r\n\r\n\t/**\r\n\t * @var listItemPlaceholder {string} - holds the list item mark-up completely given by the pattern\r\n\t *\r\n\t */\r\n\tlistItemPlaceholder: string;\r\n\r\n\t/**\r\n\t * hasCanvasOffset\r\n\t *\r\n\t */\r\n\thasCanvasOffset: boolean;\r\n\tactiveItem: number;\r\n\tanimationFrameId: number = 0;\r\n\t$links: JQuery;\r\n\t$ctx: JQuery;\r\n\t$shareBtn: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.config = {\r\n\t\t\tmainSelector: '.js-m-navigation-in-page',\r\n\t\t\tattributeNameTarget: 'data-anchor-id-target',\r\n\t\t\tattributeNameId: 'data-anchor-id',\r\n\t\t\tattributeNameTitle: 'data-anchor-title',\r\n\t\t\ttargetSelector: '.js-m-navigation-in-page__list-items',\r\n\t\t\tbuttonSelector: '.js-m-navigation-in-page__item-anchor',\r\n\t\t\tstatusBarWrapperSelector: '.js-m-navigation-in-page__wrapper',\r\n\t\t\tstatusBarSelector: '.js-m-navigation-in-page__status_wrapper .js-m-navigation-in-page__item-indicator-init',\r\n\t\t\ttargetWrapperSelector: '.js-m-navigation-in-page__wrapper',\r\n\t\t\tpageTitleSelector: '.js-m-navigation-in-page__page-title',\r\n\t\t\tstickyCtaSelector: '.js-m-navigation-in-page__cta',\r\n\t\t\tstickyShareBtn: '.js-m-navigation-in-page__share-btn',\r\n\t\t\tstickyShareSelector: '.js-m-navigation-in-page__share-container',\r\n\t\t\tsharePopupView: 'm-navigation-in-page__share-popup-view',\r\n\t\t\tshareShowPopup: 'state-m-navigation-in-page__share-popup-shown',\r\n\t\t\tactive: 'state-m-navigation-in-page__item-anchor--is-active',\r\n\t\t\tfadeInBar: 'state-m-navigation-in-page__fade--in',\r\n\t\t\tfadeOutBar: 'state-m-navigation-in-page__fade--out',\r\n\t\t\ttitleFlexEnd: 'state-m-navigation-in-page__cta-wrapper--flex-end',\r\n\t\t\tscrollDirection: 0,\r\n\t\t\tlastScrollTop: 0,\r\n\t\t\tthreshold: 0,\r\n\t\t\tthresholdOffset: 200,\r\n\t\t\tanchorBarButtons: [] as any,\r\n\t\t\ttargetNavElements: $() as JQuery,\r\n\t\t\tanchorBarBreakpoints: [] as any,\r\n\t\t};\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.initInpage(true);\r\n\t\t$(window).on('resize.NavigationInPage', this.initInpage.bind(this));\r\n\t\t$(window).on('NavigationInPage:reInit', () => this.initInpage(true));\r\n\t\t$(window).on('NavigationInPage:reInitNoClick', () => this.initInpage(false));\r\n\t\t$(window).on('hashchange', () => this.initInpage(true));\r\n\r\n\t\tthis.initPageTitle();\r\n\t\tthis.initStickyCta();\r\n\t\tthis.initStickyShare();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitInpage(triggerHash: boolean) {\r\n\t\tthis.listItemPlaceholder = this.getListItemPlaceholder();\r\n\t\tif (\r\n\t\t\tthis.shouldInpageNavgationBeShown() ||\r\n\t\t\t$('.js-sticky-cta').length !== 0 ||\r\n\t\t\t$('.js-sticky-buttons').length !== 0\r\n\t\t) {\r\n\t\t\tconst hasHash = this.pageHasHashTag();\r\n\r\n\t\t\tthis.activeItem = -1;\r\n\t\t\tthis.winScrollY = window.pageYOffset;\r\n\r\n\t\t\tthis.regScrollEvent();\r\n\r\n\t\t\tthis.setListItems(\r\n\t\t\t\tthis.config.attributeNameTarget,\r\n\t\t\t\tthis.createArrayData(this.config.attributeNameId, true),\r\n\t\t\t\tthis.createArrayData(this.config.attributeNameTitle, false)\r\n\t\t\t);\r\n\r\n\t\t\tthis.config.anchorBarButtons = (\r\n\t\t\t\tthis._ctx.querySelectorAll(this.config.targetSelector + ' ' + this.config.buttonSelector)\r\n\t\t\t);\r\n\t\t\tthis.regAnchorBarButtonsEvt();\r\n\t\t\tthis.setMobileAction();\r\n\r\n\t\t\tif (hasHash === true && triggerHash === true) {\r\n\t\t\t\tconst normalizedHash = window.location.hash.substr(1).toLowerCase(); // Convert hash to lowercase\r\n\t\t\t\tconst elemWithHash = $(`[${this.config.attributeNameTarget}=\"${normalizedHash}\"]`);\r\n\r\n\t\t\t\twindow.onload = function() {\r\n\t\t\t\t\tvar hash = window.location.hash;\r\n\t\t\t\t\tconsole.log(hash);\r\n\t\t\t\t\thandleJump(hash);\r\n\t\t\t\t};\r\n\t\t\t\t$(elemWithHash).on('click', (event: Event) => {\r\n\t\t\t\t\tevent.preventDefault(); // Prevent default anchor behavior\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($('.js-sticky-cta').length === 0 && $('.js-sticky-buttons').length === 0) {\r\n\t\t\t\tthis.removeInpageNavigation();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Function to handle the jump action\r\n\t\tfunction handleJump(targetValue: any) {\r\n\t\t\ttargetValue = replaceSpecialCharactersMain(targetValue);\r\n\t\t\ttargetValue = targetValue ? targetValue.toLowerCase() : targetValue;\r\n\t\t\tlet targetElement = document.querySelector(`div[data-anchor-id=\"${targetValue.slice(1).toLowerCase()}\"]`);\r\n\t\t\tif (targetElement) {\r\n\t\t\t\ttargetElement.scrollIntoView({ behavior: 'smooth' });\r\n\t\t\t\tconsole.log('Anchor ID targetElement::', targetElement); // Log the anchor element\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction replaceSpecialCharactersMain(input: string){\r\n\t\t\tconst replacements: Record = {\r\n\t\t\t\t\"ä\": \"ae\",\r\n\t\t\t\t\"ö\": \"oe\",\r\n\t\t\t\t\"ü\": \"ue\",\r\n\t\t\t\t\"ß\": \"ss\",\r\n\t\t\t\t\" \": \"\",\r\n\t\t\t\t\"&\": \"\",\r\n\t\t\t\t\"-\": \"\",\r\n\t\t\t\t\"+\": \"\"\r\n\t\t\t};\r\n\r\n\t\t\treturn input.replace(/[äöüß &+-]/g, (char: string) => replacements[char] || \"\");\r\n\t\t}\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\t/**\r\n\t * Sticky Title\r\n\t */\r\n\tinitPageTitle() {\r\n\t\tconst docTitle = document.title;\r\n\t\tif (docTitle.indexOf('|') != -1) {\r\n\t\t\tconst title = docTitle.split('|');\r\n\t\t\t$(this.config.pageTitleSelector).text(title[0]);\r\n\t\t} else {\r\n\t\t\t$(this.config.pageTitleSelector).text(docTitle);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * Sticky Cta\r\n\t */\r\n\tinitStickyCta() {\r\n\t\tconst formID = '#' + $('.m-teaser-contact-form').attr('data-anchor-id');\r\n\t\tif ($('.js-sticky-cta').length > 0) {\r\n\t\t\tconst stickyCta = $('.js-sticky-cta').eq(0);\r\n\t\t\tconst stickyCtaTheme = stickyCta.parent().attr('data-theme');\r\n\t\t\t$(this.config.stickyCtaSelector).text(stickyCta.text());\r\n\t\t\t$(this.config.stickyCtaSelector).attr('href', stickyCta.attr('href'));\r\n\t\t\t$(this.config.stickyCtaSelector).attr('target', stickyCta.attr('target'));\r\n\t\t\t$(this.config.stickyCtaSelector).attr('data-mktoflow-id', stickyCta.data('mktoflow-id'));\r\n\t\t\t$(this.config.stickyCtaSelector).addClass('a-button--' + stickyCtaTheme);\r\n\t\t\t// Scroll\r\n\t\t\tif ($('.js-m-stage-product__button').length > 0) {\r\n\t\t\t\tinitHashScrolling();\r\n\t\t\t\taddScrollClickTrigger($(this.config.stickyCtaSelector));\r\n\t\t\t} else if (stickyCta.attr('href') !== formID) {\r\n\t\t\t\tconst url = stickyCta.attr('href');\r\n\t\t\t\tconst idx = url.indexOf('#');\r\n\t\t\t\tif (idx === 0) {\r\n\t\t\t\t\tinitHashScrolling();\r\n\t\t\t\t\taddScrollClickTrigger($(this.config.stickyCtaSelector));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// if the is not an anchor, just do the 's original behavior\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if ($('.js-sticky-buttons').length > 0) {\r\n\t\t\tconst stickyCtaGroup = $('.js-sticky-buttons');\r\n\t\t\tconst stickyCtaTheme = stickyCtaGroup.attr('data-theme');\r\n\t\t\t$(this.config.stickyCtaSelector).addClass('a-button--' + stickyCtaTheme);\r\n\t\t\tif (stickyCtaGroup.children().length == 1) {\r\n\t\t\t\tconst stickyCta = stickyCtaGroup.children();\r\n\t\t\t\t$(this.config.stickyCtaSelector).text(stickyCta.text());\r\n\t\t\t\t$(this.config.stickyCtaSelector).attr('href', stickyCta.attr('href'));\r\n\t\t\t\t$(this.config.stickyCtaSelector).attr('target', stickyCta.attr('target'));\r\n\t\t\t} else {\r\n\t\t\t\tconst stickyCtaText = stickyCtaGroup.attr('data-title');\r\n\t\t\t\t$(this.config.stickyCtaSelector).text(stickyCtaText);\r\n\t\t\t\t$(this.config.stickyCtaSelector).addClass('m-navigation-in-page__cta-toggle');\r\n\t\t\t\t$(this.config.stickyCtaSelector)\r\n\t\t\t\t\t.next()\r\n\t\t\t\t\t.append($('.js-sticky-buttons').html());\r\n\t\t\t\t$(this.config.stickyCtaSelector).on('click', (ev: any) => {\r\n\t\t\t\t\tev.stopPropagation();\r\n\t\t\t\t\t$(ev.currentTarget)\r\n\t\t\t\t\t\t.parent()\r\n\t\t\t\t\t\t.toggleClass('is-expanded');\r\n\t\t\t\t});\r\n\t\t\t\t$('body').on('click', () => {\r\n\t\t\t\t\t$(this.config.stickyCtaSelector)\r\n\t\t\t\t\t\t.parent()\r\n\t\t\t\t\t\t.removeClass('is-expanded');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$(this.config.stickyCtaSelector)\r\n\t\t\t\t.parent()\r\n\t\t\t\t.parent()\r\n\t\t\t\t.addClass(this.config.titleFlexEnd);\r\n\t\t\t$(this.config.stickyCtaSelector)\r\n\t\t\t\t.parent()\r\n\t\t\t\t.remove();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sticky Share\r\n\t */\r\n\tinitStickyShare() {\r\n\t\tconst shareLocation = $('.m-page-share-container');\r\n\t\tconst shareSelector = $('.m-page-share');\r\n\t\tif (shareLocation.length > 0) {\r\n\t\t\tshareLocation.after(\"
    \");\r\n\t\t\t$(this.config.stickyShareSelector).append(shareSelector.clone());\r\n\t\t\tif ($('.o-header__sticky-bar--hide-navigation').length > 0) {\r\n\t\t\t\tthis.stickyPopupShareShow();\r\n\t\t\t} else {\r\n\t\t\t\tthis.stickyPopupShare();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$(this.config.stickyShareSelector).hide();\r\n\t\t}\r\n\t}\r\n\r\n\tsetClipboardAnchorBtn() {\r\n\t\t$(this.config.stickyShareSelector).on('click', '.m-page-share__anchor--hyperlink', () => {\r\n\t\t\tthis.copyURLToClipboard();\r\n\t\t});\r\n\t}\r\n\r\n\tstickyPopupShare() {\r\n\t\t$(this.config.stickyShareSelector).addClass(this.config.sharePopupView);\r\n\t\tthis.stickyPopupShareShow();\r\n\t}\r\n\tstickyPopupShareShow() {\r\n\t\t$(this.config.stickyShareBtn).on('click', (e: Event) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\t$(this.config.stickyShareSelector).toggleClass(this.config.shareShowPopup);\r\n\t\t});\r\n\t\t$(window).on('scroll', () => {\r\n\t\t\t$(this.config.stickyShareSelector).removeClass(this.config.shareShowPopup);\r\n\t\t});\r\n\t\t$(this.config.stickyShareSelector).on('click', (e: Event) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t$('body').on('click', () => {\r\n\t\t\t$(this.config.stickyShareSelector).removeClass(this.config.shareShowPopup);\r\n\t\t});\r\n\t}\r\n\r\n\t/* ####### SECTION - SET DATA MODEL */\r\n\r\n\t/**\r\n\t *\r\n\t */\r\n\r\n\tsetMobileAction() {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.hasCanvasOffset = this.hasAnchorBarOffCanvas();\r\n\t\t}, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a boolean value to indicate if a Inpage Navigation should be shown\r\n\t * @returns {boolean}\r\n\t */\r\n\tshouldInpageNavgationBeShown() {\r\n\t\tconst inpageNavElements = $('[' + this.config.attributeNameId + ']');\r\n\t\treturn inpageNavElements.length > 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Remove the Inpage Navigation from the DOM. Always when no AnchorIds and AnchorTitles are available\r\n\t */\r\n\tremoveInpageNavigation(): void {\r\n\t\t$(this.config.mainSelector).remove();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the placeholder from the mark up\r\n\t * @return {string} - Returns the placeholder item from the mark up\r\n\t */\r\n\tgetListItemPlaceholder(): string {\r\n\t\treturn this.$ctx.find(this.config.targetSelector).html();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the target elements of the inpage navigation\r\n\t * @param createTargetNavElements - boolean indicator to avoid redundant creation of target navigation elements\r\n\t * @param inpageNavElements - Array of all navigation inpage elements\r\n\t */\r\n\tsetTargetData(createTargetNavElements: boolean, inpageNavElements: JQuery) {\r\n\t\tif (createTargetNavElements && inpageNavElements.length !== 0) {\r\n\t\t\tthis.config.targetNavElements = inpageNavElements;\r\n\t\t\tthis.config.threshold = this.config.targetNavElements[0].offsetTop - this.config.thresholdOffset;\r\n\t\t\tthis.config.anchorBarBreakpoints = this.setAnchorBarBreakpoints();\r\n\t\t}\r\n\t}\r\n\r\n\t/* ####### SECTION - SECTION - RENDERING MARK UP */\r\n\r\n\t/**\r\n\t * Set HTML mark-up of generated list items\r\n\t * @param anchorAttributeName - Holds the attribute name of the anchor element\r\n\t * @param targetAnchorIds - Holds the anchor IDs of the targets\r\n\t * @param targetAnchorTitles - Holds the titles of the inpage navigation elements\r\n\t */\r\n\tsetListItems(anchorAttributeName: string, targetAnchorIds: any[], targetAnchorTitles: any[]) {\r\n\t\tconst $el = this.$ctx.find(this.config.targetSelector);\r\n\t\tlet listItems = '';\r\n\r\n\t\ttargetAnchorIds.forEach((el, index) => {\r\n\t\t\tlistItems += this.createListItem(anchorAttributeName, targetAnchorIds[index], targetAnchorTitles[index]);\r\n\t\t});\r\n\r\n\t\t$el.html(listItems);\r\n\t\tthis.$links = this.$ctx.find('[' + this.config.attributeNameTarget + ']');\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an array of the given attribute values\r\n\t * @param targetAttribute - Holds the attribute name of target elements\r\n\t * @param navElements - Holds a boolean value for transmitting it into the setTargetData function\r\n\t * @return array - Returns the created data as an array\r\n\t */\r\n\tcreateArrayData(targetAttribute: string, navElements: boolean): string[] {\r\n\t\tconst inpageNavElements: JQuery = $('[' + targetAttribute + ']');\r\n\t\tconst attributeList = [] as string[];\r\n\r\n\t\tinpageNavElements.each((index: number, el: HTMLElement) => {\r\n\t\t\tconst targetAttributeValue: string = $(el).attr(targetAttribute);\r\n\t\t\tattributeList.push(targetAttributeValue);\r\n\t\t});\r\n\r\n\t\tthis.setTargetData(navElements, inpageNavElements);\r\n\t\treturn attributeList;\r\n\t}\r\n\r\n\t/**\r\n\t * Create one list item (anchor) of the inpage navigation from the given placeholder of the mark up\r\n\t * @param anchorAttributeName - Holds the attribute name of the anchor element\r\n\t * @param anchorAttributeNameId - Holds the anchor IDs of the targets\r\n\t * @param anchorTitle - Holds the titles of the inpage navigation elements\r\n\t * @return {string} - Returns the final mark up that was generated with the placeholder mark up\r\n\t */\r\n\tcreateListItem(anchorAttributeName: string, anchorAttributeNameId: string, anchorTitle: string): string {\r\n\t\tconst $listItem = $(this.listItemPlaceholder);\r\n\r\n\t\t$listItem.find(this.config.buttonSelector).attr(anchorAttributeName, anchorAttributeNameId);\r\n\t\t$listItem.find(this.config.buttonSelector).attr('href', '#' + anchorAttributeNameId);\r\n\t\t$listItem.find(this.config.buttonSelector).text(anchorTitle);\r\n\r\n\t\treturn $listItem.prop('outerHTML');\r\n\t}\r\n\r\n\t/**\r\n\t * Get all offsetTop values of the relevant target elements and save them as an array containing the breakpoints\r\n\t * @return array - Returns an array of the corresponding breakpoints\r\n\t */\r\n\tsetAnchorBarBreakpoints(): number[] {\r\n\t\tconst breakpoints: number[] = [];\r\n\r\n\t\tthis.config.targetNavElements.each((index, item) => {\r\n\t\t\tbreakpoints[index] = item.offsetTop - this.config.thresholdOffset;\r\n\t\t});\r\n\r\n\t\tbreakpoints.push(document.body.offsetHeight);\r\n\r\n\t\treturn breakpoints;\r\n\t}\r\n\r\n\t/** ###### SECTION - SCROLLING & INTERACTIONS */\r\n\r\n\t/**\r\n\t * Register document scroll event which decides when to show or hide the inpage navigation\r\n\t */\r\n\tregScrollEvent(): void {\r\n\t\t$(window)\r\n\t\t\t.off('scroll.NavigationInPage')\r\n\t\t\t.on('scroll.NavigationInPage', this.onScroll.bind(this));\r\n\t\tthis.onScroll();\r\n\t}\r\n\r\n\tonScroll() {\r\n\t\tif (this.animationFrameId > 0) {\r\n\t\t\twindow.cancelAnimationFrame(this.animationFrameId);\r\n\t\t}\r\n\t\tthis.animationFrameId = window.requestAnimationFrame(() => {\r\n\t\t\tthis.animationFrameId = 0;\r\n\t\t\tthis.handleScrolling();\r\n\t\t});\r\n\t}\r\n\r\n\tshowCtaThreshold() {\r\n\t\tconst shareLocation = $('.m-page-share-container').last();\r\n\t\tconst ctaSelector = $('.js-sticky-cta');\r\n\t\tif (shareLocation.length > 0) {\r\n\t\t\tconst shareOffsetTop = shareLocation.offset().top;\r\n\r\n\t\t\tif (shareOffsetTop > 0) {\r\n\t\t\t\tthis.config.threshold = shareOffsetTop + shareLocation.height();\r\n\t\t\t}\r\n\t\t} else if (ctaSelector.length > 0) {\r\n\t\t\tconst ctaOffsetTop = ctaSelector.offset().top;\r\n\r\n\t\t\tif (ctaOffsetTop > 0) {\r\n\t\t\t\tthis.config.threshold = ctaOffsetTop + ctaSelector.height();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandleScrolling() {\r\n\t\tthis.hasCanvasOffset = this.hasAnchorBarOffCanvas();\r\n\t\tthis.winScrollY = window.pageYOffset;\r\n\t\tthis.setScrollDirection();\r\n\t\tthis.calcAndSetAnchorItemActive();\r\n\t\tthis.showCtaThreshold();\r\n\t\tthis.winScrollY > this.config.threshold ? this.showHideAnchorBar(true) : this.showHideAnchorBar(false);\r\n\t}\r\n\r\n\t/**\r\n\t * Move the inpage navigation vertically and calls the same function that is also used in the on\r\n\t * click handler of the anchor bar buttons\r\n\t *\r\n\t * @param {number} idx\r\n\t */\r\n\tmoveAxisX(idx: number) {\r\n\t\tif (this.hasCanvasOffset && idx >= 0) {\r\n\t\t\tif (this.activeItem !== idx && this.activeItem >= 0) {\r\n\t\t\t\tthis.actAnchorBarButtonEvt(false, idx);\r\n\t\t\t\t//this.progressBarSetWidth(idx);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Shows or hides the inpage navigation by the given boolean parameter\r\n\t * @param showAnchorBar - Boolean value to indicate the anchor bar to be shown\r\n\t */\r\n\tshowHideAnchorBar(showAnchorBar: boolean) {\r\n\t\tconst $target: any = this.$ctx.find(this.config.targetWrapperSelector);\r\n\t\tclearTimeout(this.timer);\r\n\t\tshowAnchorBar ? this.showAnchorBar($target) : this.hideAnchorBar($target);\r\n\t}\r\n\r\n\t/**\r\n\t * Show the inpage navigation\r\n\t * @param $target - Holds the target element to make actions on\r\n\t */\r\n\tshowAnchorBar($target: any) {\r\n\t\t$target.css({\r\n\t\t\tdisplay: 'flex',\r\n\t\t});\r\n\t\t$target.removeClass(this.config.fadeOutBar);\r\n\t\t$target.addClass(this.config.fadeInBar);\r\n\r\n\t\tthis.setClipboardAnchorBtn();\r\n\t}\r\n\r\n\t/**\r\n\t * Hide the inpage navigation\r\n\t * @param $target - Holds the target element to make actions on\r\n\t */\r\n\thideAnchorBar($target: any) {\r\n\t\t$target.removeClass(this.config.fadeInBar);\r\n\t\t$target.addClass(this.config.fadeOutBar);\r\n\t\tthis.activeItem = -1;\r\n\t\tthis.timer = setTimeout(() => {\r\n\t\t\t$target.hide();\r\n\t\t}, 500);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the direction which was scrolled\r\n\t */\r\n\tsetScrollDirection() {\r\n\t\tconst currentYScroll = this.winScrollY;\r\n\t\tcurrentYScroll > this.config.lastScrollTop\r\n\t\t\t? (this.config.scrollDirection = 1)\r\n\t\t\t: (this.config.scrollDirection = -1);\r\n\t\tthis.config.lastScrollTop = currentYScroll;\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates and set the highlighted anchor item. (If the current scroll Y - axis demands a highlighting of its element in the inpage navigation bar)\r\n\t */\r\n\tcalcAndSetAnchorItemActive() {\r\n\t\tthis.config.anchorBarBreakpoints.forEach((topPos, index) => {\r\n\t\t\tif (this.winScrollY >= topPos) {\r\n\t\t\t\t// Page is scrolled at the bottom, so it activates the last anchor bar item\r\n\t\t\t\tif ($(window).scrollTop() + window.innerHeight >= $(document).height()) {\r\n\t\t\t\t\t// Add increment to indicate that the page is scrolled down at the bottom of the page\r\n\t\t\t\t\tindex = this.config.anchorBarButtons.length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Substract the increment of +1 from above top avoid DOM reference failures,\r\n\t\t\t\t// after once scrolled to the bottom of the page\r\n\t\t\t\tif (this.config.anchorBarButtons.length === index) {\r\n\t\t\t\t\tindex = index - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.winScrollY <= this.config.anchorBarBreakpoints[index + 1]) {\r\n\t\t\t\t\t//this.progressBarSetWidth(index);\r\n\t\t\t\t\tthis.moveAxisX(index);\r\n\t\t\t\t\tthis.activeItem = index;\r\n\t\t\t\t\tthis.$links.removeClass(this.config.active);\r\n\t\t\t\t\tthis.$links.eq(index).addClass(this.config.active);\r\n\t\t\t\t} else if (this.activeItem === index) {\r\n\t\t\t\t\tthis.$links.eq(index).removeClass(this.config.active);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthis.$links.eq(index).removeClass(this.config.active);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Set the display property of the status bars' wrapper element to 'block' to enable this.progressBarCalcWidth()\r\n\t * returning the proper calculation value rather than returning 0\r\n\t * @param index - Holds the index of the element to be highlighted\r\n\t */\r\n\tprogressBarSetWidth(index: number) {\r\n\t\tthis.$ctx.find(this.config.statusBarWrapperSelector).css({\r\n\t\t\tdisplay: 'block',\r\n\t\t});\r\n\r\n\t\tthis.$ctx.find(this.config.statusBarSelector).css({\r\n\t\t\twidth: this.progressBarCalcWidth(index) + 'px',\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the width of the inpage navigation status bar\r\n\t * @param index - Holds the index of the highlighted element\r\n\t */\r\n\tprogressBarCalcWidth(index: number): number {\r\n\t\treturn (\r\n\t\t\tthis.config.anchorBarButtons[index].offsetLeft +\r\n\t\t\tthis.config.anchorBarButtons[index].offsetWidth -\r\n\t\t\tthis._ctx.querySelector(this.config.targetSelector).scrollLeft\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Register click event for inpage navigation items\r\n\t */\r\n\tregAnchorBarButtonsEvt() {\r\n\t\t$(this.config.anchorBarButtons)\r\n\t\t\t.off('click.NavigationInPage')\r\n\t\t\t.on('click.NavigationInPage', (ev: Event) => {\r\n\t\t\t\tev.preventDefault();\r\n\t\t\t\tconst dataAttrOfClickedElem = $(ev.currentTarget).data('anchor-id-target');\r\n\t\t\t\tconst formID = $('.m-teaser-contact-form').attr('data-anchor-id');\r\n\t\t\t\tif (dataAttrOfClickedElem !== formID) {\r\n\t\t\t\t\tthis.actAnchorBarButtonEvt(true, undefined, ev.currentTarget as HTMLElement);\r\n\t\t\t\t}\r\n\t\t\t\tthis.historyPush(dataAttrOfClickedElem);\r\n\t\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the width of the inpage navigation bar\r\n\t * @returns width - Returns the width of all elements of the navigation inpage anchor bar\r\n\t */\r\n\tgetWidthOfAnchorBar(): number {\r\n\t\tlet width = 0;\r\n\t\tfor (let i = 0; this.config.anchorBarButtons.length > i; i++) {\r\n\t\t\twidth += this.config.anchorBarButtons[i].offsetWidth + 40;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a boolean value that indicates that the inpage navigation items have more width as the document width\r\n\t */\r\n\thasAnchorBarOffCanvas(): boolean {\r\n\t\treturn this.getWidthOfAnchorBar() > document.body.offsetWidth;\r\n\t}\r\n\r\n\t/**\r\n\t * Action for the click event of each inpage navigation item\r\n\t * @param scrollTo\r\n\t * @param idx - Holds the index of the element to be make an action for\r\n\t * @param elem - trigger element\r\n\t */\r\n\tactAnchorBarButtonEvt(scrollTo: boolean, idx?: number, elem?: HTMLElement) {\r\n\t\tconst gradientSpacing = 20;\r\n\t\tconst offset = 50;\r\n\t\tif (elem) {\r\n\t\t\tidx = $(this.config.anchorBarButtons).index(elem);\r\n\t\t}\r\n\t\tconst anchorBarOffsetLeft: number = this.config.anchorBarButtons[idx].offsetLeft - gradientSpacing - offset;\r\n\r\n\t\tthis.$ctx\r\n\t\t\t.find(this.config.targetSelector)\r\n\t\t\t.delay(1)\r\n\t\t\t.animate(\r\n\t\t\t\t{\r\n\t\t\t\t\tscrollLeft: anchorBarOffsetLeft,\r\n\t\t\t\t},\r\n\t\t\t\t150,\r\n\t\t\t\t() => {\r\n\t\t\t\t\tif (scrollTo) {\r\n\t\t\t\t\t\tscrollToElement($(this.getAnchorElement(idx)), true, this.calcOffsetY());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the inpage navigation anchor element by the given index\r\n\t * @param idx - Holds the index of the element to target to\r\n\t * @returns - A jQuery object from the anchor element\r\n\t */\r\n\tgetAnchorElement(idx: number): object {\r\n\t\tconst obj: any = this.config.targetNavElements[idx];\r\n\t\tconst elAttribute: any = obj.getAttributeNode(this.config.attributeNameId).value;\r\n\t\treturn $('[' + this.config.attributeNameId + '=\"' + elAttribute + '\"]');\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the top offset of the parent element of this component\r\n\t */\r\n\tcalcOffsetY(): number {\r\n\t\treturn $(this.config.targetWrapperSelector).height() + 20;\r\n\t}\r\n\r\n\thistoryPush(hash: string): any {\r\n\t\tif (history.pushState) {\r\n\t\t\tconst newurl =\r\n\t\t\t\twindow.location.protocol +\r\n\t\t\t\t'//' +\r\n\t\t\t\twindow.location.host +\r\n\t\t\t\twindow.location.pathname +\r\n\t\t\t\twindow.location.search +\r\n\t\t\t\t'#' +\r\n\t\t\t\thash;\r\n\t\t\twindow.history.pushState({ path: newurl }, '', newurl);\r\n\t\t}\r\n\t}\r\n\r\n\treplaceSpecialCharacters(input: string): string {\r\n\t\tconst replacements: Record = {\r\n\t\t\t\"ä\": \"ae\",\r\n\t\t\t\"ö\": \"oe\",\r\n\t\t\t\"ü\": \"ue\",\r\n\t\t\t\"ß\": \"ss\",\r\n\t\t\t\" \": \"\",\r\n\t\t\t\"&\": \"\",\r\n\t\t\t\"-\": \"\",\r\n\t\t\t\"+\": \"\"\r\n\t\t};\r\n\r\n\t\treturn input.replace(/[äöüß &+-]/g, (char: string) => replacements[char] || \"\");\r\n\t}\r\n\r\n\tpageHasHashTag(): boolean {\r\n\t\tlet result = this.replaceSpecialCharacters(window.location.hash.substr(1));\r\n\t\tresult = result ? result.toLowerCase() : result;\r\n\t\tif (window.location.hash && $(`[${this.config.attributeNameId}=\"${result}\"]`).length > 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies the URL (location.href) into the browser clipboard\r\n\t * @constructor {function}\r\n\t * @returns {void}\r\n\t */\r\n\tcopyURLToClipboard(): void {\r\n\t\tconst opts: any = this.getClipboardOpts();\r\n\t\tconst data = this.getLocationHref();\r\n\r\n\t\tthis.showDebugInfo(opts, data);\r\n\t\tthis.showFeedbackMsg();\r\n\t\tcopy(data, opts);\r\n\t\tthis.hideFeedbackMsgTimer();\r\n\t}\r\n\r\n\t/**\r\n\t * getClipboardOpts\r\n\t * @constructor {function} getClipboardOpts\r\n\t * @returns {Object} any\r\n\t */\r\n\tgetClipboardOpts(): any {\r\n\t\treturn {\r\n\t\t\tdebug: false,\r\n\t\t\tmessage: 'Press #{⌘+C} on macOS or #{Ctrl+C} on Windows to copy',\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * getLocationHref\r\n\t * @constructor {function} getLocationHref\r\n\t * @returns {string} string\r\n\t */\r\n\tgetLocationHref(): string {\r\n\t\treturn document.location.href;\r\n\t}\r\n\r\n\t/**\r\n\t * showDebugInfo - Description\r\n\t * @constructor {function} showDebugInfo\r\n\t * @param {Object} opts holds thze options for the clipboard object\r\n\t * @param {string} data holds the data to be copied into the clipboard\r\n\t */\r\n\tshowDebugInfo(opts: any, data: string) {\r\n\t\tif (opts.debug) {\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.log('Copied to clipboard: ', data);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * showFeedbackMsg\r\n\t * @constructor {function} showFeedbackMsg\r\n\t */\r\n\tshowFeedbackMsg() {\r\n\t\t$(this.config.stickyShareSelector)\r\n\t\t\t.find('.m-page-share__copy-msg')\r\n\t\t\t.removeClass('show');\r\n\t\t$(this.config.stickyShareSelector)\r\n\t\t\t.find('.m-page-share__copy-msg')\r\n\t\t\t.addClass('show');\r\n\t}\r\n\r\n\t/**\r\n\t * hideFeedbackMsg\r\n\t * @constructor {function} hideFeedbackMsg\r\n\t */\r\n\thideFeedbackMsg() {\r\n\t\t$(this.config.stickyShareSelector)\r\n\t\t\t.find('.m-page-share__copy-msg')\r\n\t\t\t.removeClass('show');\r\n\t}\r\n\r\n\t/**\r\n\t * showFeedbackMsg\r\n\t * @constructor {function} showFeedbackMsg\r\n\t */\r\n\thideFeedbackMsgTimer() {\r\n\t\twindow.setTimeout(() => {\r\n\t\t\tthis.hideFeedbackMsg();\r\n\t\t}, 3500);\r\n\t}\r\n}\r\n","// @ts-ignore\r\nimport * as hoverintent from 'hoverintent';\r\nimport { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents, onPublicEvent } from '@project/shared/utils/events/js/events';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst widthOfArrow = 22,\r\n\tpaddingReserve = 0,\r\n\tclasses = {\r\n\t\tstateActive: 'state-a-navigation-main__item--active',\r\n\t\tlayerOpener: 'js-m-navigation-wrapper__item-level1',\r\n\t\tnavigationLayerWrapper: 'js-m-navigation-wrapper__layer',\r\n\t\twidthCalculationBase: 'js-m-navigation-wrapper',\r\n\t\tlevel1OpenLayer: 'js-m-navigation-wrapper__open-layer',\r\n\t},\r\n\thoverIntentOptions = {\r\n\t\ttimeout: 300,\r\n\t\tinterval: 100,\r\n\t};\r\n\r\n@createModule('NavigationMain')\r\n/**\r\n * navigation-main module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class NavigationMain extends TerrificSpec {\r\n\tme = this;\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t// initially: a) make flyout open with JS b) calculate flyout position\r\n\t\tthis.initNavigationOpening($ctx);\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.initNavigationPositioning($ctx);\r\n\t\t}, 10);\r\n\r\n\t\t// onResize recalc flyout positions\r\n\t\t$(window).resize((ev: any) => triggerPublicEvent(PublicEvents.uxResize, this.me, this._ctx, ev));\r\n\t\tonPublicEvent(PublicEvents.uxResize, this._ctx, () => this.initNavigationPositioning($ctx));\r\n\t\tonBreakpointChange(() => this.initNavigationOpening($ctx));\r\n\r\n\t\t$(window).on('closeNavigation', (ev: Event) => this.closeNavigation($ctx));\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\t// make flyout open\r\n\tinitNavigationOpening($ctx: JQuery) {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'large' || viewport === 'extra-large') {\r\n\t\t\tconst navigationItemLinks = $(`.${classes.layerOpener}`, $ctx);\r\n\r\n\t\t\tnavigationItemLinks.each((i, elem) => {\r\n\t\t\t\thoverintent(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t$(this).addClass(classes.stateActive);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t$(this).removeClass(classes.stateActive);\r\n\t\t\t\t\t}\r\n\t\t\t\t).options(hoverIntentOptions);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcloseNavigation($ctx: JQuery) {\r\n\t\tconst navigationItemLinks = $(`.${classes.layerOpener}`, $ctx);\r\n\t\tnavigationItemLinks.removeClass(classes.stateActive);\r\n\t}\r\n\r\n\t// calculate the position of each flyout in viewport large and extra-large\r\n\tinitNavigationPositioning($ctx: JQuery) {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'large' || viewport === 'extra-large') {\r\n\t\t\t$(`.${classes.layerOpener} > .${classes.level1OpenLayer}`, $ctx).each(function(index) {\r\n\t\t\t\tconst currentFirstLevelNavigationElement = $(this);\r\n\t\t\t\tconst currentFirstLevelNavigationFlyout = currentFirstLevelNavigationElement\r\n\t\t\t\t\t.parent()\r\n\t\t\t\t\t.find(`.${classes.navigationLayerWrapper}`);\r\n\r\n\t\t\t\t// in case there is a full width layout, the flyout will be set to left:0 , what is the correct positioning\r\n\t\t\t\tconst positionOfFirstLevelNavigationElement = currentFirstLevelNavigationElement.position();\r\n\t\t\t\tconst paddingLeftOfFirstLevelNavigationElement = parseFloat(\r\n\t\t\t\t\tcurrentFirstLevelNavigationElement.css('padding-left')\r\n\t\t\t\t);\r\n\t\t\t\tconst widthOfOfFirstLevelNavigationElement = currentFirstLevelNavigationElement.width();\r\n\t\t\t\tconst centerPositionOfNavElement =\r\n\t\t\t\t\tpositionOfFirstLevelNavigationElement.left + widthOfOfFirstLevelNavigationElement / 2;\r\n\t\t\t\tconst widthOfFlyout = currentFirstLevelNavigationFlyout.width();\r\n\t\t\t\tlet leftOfFlyout =\r\n\t\t\t\t\tcenterPositionOfNavElement -\r\n\t\t\t\t\twidthOfFlyout / 2 +\r\n\t\t\t\t\twidthOfArrow / 2 +\r\n\t\t\t\t\tpaddingLeftOfFirstLevelNavigationElement / 2;\r\n\t\t\t\tconst rightOfFlyout = leftOfFlyout + widthOfFlyout;\r\n\t\t\t\tconst totalUsuableWidth = $(`.${classes.widthCalculationBase}`).width();\r\n\r\n\t\t\t\t// => flyout would reach over right border\r\n\t\t\t\tif (rightOfFlyout > totalUsuableWidth) {\r\n\t\t\t\t\tleftOfFlyout = totalUsuableWidth - widthOfFlyout - paddingReserve;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// => flyout would reach over left border\r\n\t\t\t\tif (leftOfFlyout < 0) {\r\n\t\t\t\t\tleftOfFlyout = 0 + paddingReserve;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set 'left' position\r\n\t\t\t\tcurrentFirstLevelNavigationFlyout.css('left', leftOfFlyout);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t// delete all so far given 'left' positions\r\n\t\t\t$(`.${classes.layerOpener} > .${classes.level1OpenLayer}`, $ctx).each(function(index: number) {\r\n\t\t\t\tconst currentFirstLevelNavigationElement = $(this);\r\n\t\t\t\tconst currentFirstLevelNavigationFlyout = currentFirstLevelNavigationElement\r\n\t\t\t\t\t.parent()\r\n\t\t\t\t\t.find(`.${classes.navigationLayerWrapper}`);\r\n\r\n\t\t\t\tcurrentFirstLevelNavigationFlyout.removeAttr('style');\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst widthOfArrow = 22,\r\n\tpaddingReserve = 0,\r\n\tclasses = {\r\n\t\tbody: 'body',\r\n\t\tstateActive: 'state-m-navigation-meta__item--active',\r\n\t\tlayerOpener: 'js-m-navigation-wrapper__item-level1',\r\n\t\twidthCalculationBase: 'js-header-content',\r\n\t\tnavigationLayerWrapper: 'js-m-navigation-wrapper__layer',\r\n\t\tlevel1OpenLayer: 'js-m-navigation-wrapper__open-layer',\r\n\t\tsitesOpener: 'js-m-navigation-meta__flyout-trigger',\r\n\t\tstateSitesActive: 'state-m-navigation-meta__sites--active',\r\n\t\tsitesFlyout: 'js-m-navigation-meta__flyout',\r\n\t\tcountryRegion: 'js-m-navigation-meta__region',\r\n\t\topenCountryRegion: 'js-m-navigation-meta__open-region',\r\n\t\tcountryContainer: 'js-m-navigation-wrapper__country-container',\r\n\t\tloginElement: 'js-m-navigation-meta__item--login',\r\n\t\tlogedinState: 'state-m-navigation-meta__item--loggedin',\r\n\t\tloginUsername: 'js-m-navigation-meta__username',\r\n\t\tpositionFixer: 'm-navigation-meta__flyout--position-fixer',\r\n\t\tnavigationFavouriteTooltip: 'm-navigation-meta__tooltip-favourite',\r\n\t\ttooltipCloser: 'js-m-tooltip__closer'\r\n\t};\r\n\r\nlet isDesktopNavigationInitialized = false;\r\n\r\n@createModule('NavigationMeta')\r\n/**\r\n * navigation-meta module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class NavigationMeta extends TerrificSpec {\r\n\tmetaNaviFlyout: JQuery;\r\n\tinitiallyMeasured: boolean = false;\r\n\t$ctx: JQuery;\r\n\t$loginElement: JQuery;\r\n\t$loginUsername: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.metaNaviFlyout = $(`.${classes.sitesFlyout}`);\r\n\r\n\t\tthis.initNavigationOpening();\r\n\t\tthis.initNavigationPositioning();\r\n\t\t$(window).resize(() => this.initNavigationPositioning());\r\n\t\tonBreakpointChange(() => this.initNavigationOpening());\r\n\r\n\t\tthis.$ctx.find('.js-search-trigger').on('click', (event: Event) => {\r\n\t\t\tthis._handleTrigger(event);\r\n\t\t});\r\n\r\n\t\t$(`.${classes.tooltipCloser}`).on('click', () => {\r\n\t\t\t$(`.${classes.tooltipCloser}`).parents('.m-tooltip').fadeOut();\r\n\t\t});\r\n\r\n\t\tthis.initUserStatus();\r\n\r\n\t\tthis.initFavTooltip();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n\r\n\tinitFavTooltip() {\r\n\t\t$(`.${classes.navigationFavouriteTooltip}`).on('click', (ev: Event) => {\r\n\t\t\tev.stopPropagation();\r\n\t\t});\r\n\t\t$(`.${classes.navigationFavouriteTooltip}`).prev(`.${classes.level1OpenLayer}`).on('click', () => {\r\n\t\t\tif($(`.${classes.navigationFavouriteTooltip}`).css('display') == 'block') {\r\n\t\t\t\t$(`.${classes.navigationFavouriteTooltip}`).fadeOut();\r\n\t\t\t}\r\n\t\t});\r\n\t\t$('html').on(\"click\", () => {\r\n\t\t\tif($(`.${classes.navigationFavouriteTooltip}`).css('display') == 'block') {\r\n\t\t\t\t$(`.${classes.navigationFavouriteTooltip}`).fadeOut();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tinitUserStatus() {\r\n\t\tthis.$loginElement = this.$ctx.find(`.${classes.loginElement}`);\r\n\t\tthis.$loginUsername = this.$ctx.find(`.${classes.loginUsername}`);\r\n\t\tconst serviceUrl = this.$loginElement.data('userstatus-service');\r\n\t\tif (serviceUrl) {\r\n\t\t\t$.ajax({\r\n\t\t\t\tmethod: 'get',\r\n\t\t\t\turl: serviceUrl,\r\n\t\t\t\tsuccess: this.onUserStatusAjaxSuccess.bind(this),\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tonUserStatusAjaxSuccess(data: any) {\r\n\t\tif (data.login) {\r\n\t\t\tthis.$loginElement.addClass(classes.logedinState);\r\n\t\t\tif(data.FirstName == null && data.FirstName==null){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar firstName = \"\";\r\n\t\t\tvar lastName = \"\";\r\n\r\n\t\t\tif(data.FirstName != null){\r\n\t\t\t\tfirstName = data.FirstName;\r\n\t\t\t}\r\n\t\t\tif(data.LastName != null){\r\n\t\t\t\tlastName = data.LastName;\r\n\t\t\t}\r\n\r\n\t\t\tthis.$loginUsername.html(firstName+\" \"+lastName);\r\n\t\t}\r\n\t}\r\n\r\n\t_handleTrigger(event: Event) {\r\n\t\tevent.preventDefault();\r\n\t\tevent.stopPropagation();\r\n\t\t$('.a-search-trigger__item-link.js-search-trigger').click();\r\n\t}\r\n\r\n\t// calculate the position of each flyout in viewport large and extra-large\r\n\tinitNavigationPositioning() {\r\n\t\tconst $ctx = $(this._ctx),\r\n\t\t\tviewport = getCurrentBreakpoint() as string;\r\n\r\n\t\tif (viewport === 'large' || viewport === 'extra-large') {\r\n\t\t\t$(`.${classes.layerOpener} > .${classes.level1OpenLayer}`, $ctx).each(function() {\r\n\t\t\t\tconst currentFirstLevelNavigationElement = $(this);\r\n\t\t\t\tconst currentFirstLevelNavigationFlyout = currentFirstLevelNavigationElement\r\n\t\t\t\t\t.parent()\r\n\t\t\t\t\t.find(`.${classes.navigationLayerWrapper}`);\r\n\r\n\t\t\t\t// in case there is a full width layout, the flyout will be set to left:0 , what is the correct positioning\r\n\t\t\t\tconst positionOfFirstLevelNavigationElement = currentFirstLevelNavigationElement.position();\r\n\t\t\t\tconst paddingLeftOfFirstLevelNavigationElement = parseFloat(\r\n\t\t\t\t\tcurrentFirstLevelNavigationElement.css('padding-left')\r\n\t\t\t\t);\r\n\t\t\t\tconst widthOfOfFirstLevelNavigationElement = currentFirstLevelNavigationElement.width();\r\n\t\t\t\tconst centerPositionOfNavElement =\r\n\t\t\t\t\tpositionOfFirstLevelNavigationElement.left + widthOfOfFirstLevelNavigationElement / 2;\r\n\t\t\t\tconst widthOfFlyout = currentFirstLevelNavigationFlyout.width();\r\n\t\t\t\tlet leftOfFlyout =\r\n\t\t\t\t\tcenterPositionOfNavElement -\r\n\t\t\t\t\twidthOfFlyout / 2 +\r\n\t\t\t\t\twidthOfArrow / 2 +\r\n\t\t\t\t\tpaddingLeftOfFirstLevelNavigationElement / 2;\r\n\t\t\t\tconst rightOfFlyout = leftOfFlyout + widthOfFlyout;\r\n\t\t\t\tconst totalUsuableWidth = $(`.${classes.widthCalculationBase}`).width();\r\n\r\n\t\t\t\t// => flyout would reach over right border\r\n\t\t\t\tif (rightOfFlyout > totalUsuableWidth) {\r\n\t\t\t\t\tleftOfFlyout = totalUsuableWidth - widthOfFlyout - paddingReserve;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// => flyout would reach over left border\r\n\t\t\t\tif (leftOfFlyout < 0) {\r\n\t\t\t\t\tleftOfFlyout = 0 + paddingReserve;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set 'left' position\r\n\t\t\t\tcurrentFirstLevelNavigationFlyout.css('left', leftOfFlyout);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tinitDesktopNavigation(\r\n\t\tnavigationItemLinks: JQuery,\r\n\t\tsitesOpenerElement: JQuery,\r\n\t\tcountryRegions: JQuery,\r\n\t\tcountryContainer: JQuery,\r\n\t\tsitesFlyout: JQuery\r\n\t) {\r\n\t\tnavigationItemLinks.each((i: number, elem: HTMLElement) => {\r\n\t\t\t$(elem)\r\n\t\t\t\t.find(`.${classes.level1OpenLayer}`)\r\n\t\t\t\t.on('click.DesktopNavigationLink', (clickEvent: Event) => {\r\n\t\t\t\t\tconst $el = $(elem);\r\n\t\t\t\t\tconst isOpen = $el.hasClass(classes.stateActive);\r\n\t\t\t\t\tnavigationItemLinks.removeClass(classes.stateActive);\r\n\t\t\t\t\t$el.toggleClass(classes.stateActive, !isOpen);\r\n\t\t\t\t\tclickEvent.preventDefault();\r\n\t\t\t\t\tclickEvent.stopPropagation();\r\n\t\t\t\t});\r\n\t\t});\r\n\r\n\t\tcountryRegions.each((i: number, elem: HTMLElement) => {\r\n\t\t\t$(elem)\r\n\t\t\t\t.find(`.${classes.openCountryRegion}`)\r\n\t\t\t\t.on('click.DesktopCountrySitesRegionLink', (clickEvent: Event) => {\r\n\t\t\t\t\tthis.activateRegionAndSetHeight($(elem), countryRegions, countryContainer);\r\n\t\t\t\t\tthis.setHeaderMargin(sitesFlyout[0].offsetHeight);\r\n\t\t\t\t\tclickEvent.preventDefault();\r\n\t\t\t\t\tclickEvent.stopPropagation();\r\n\t\t\t\t});\r\n\t\t});\r\n\r\n\t\tcountryRegions.removeClass(classes.stateActive);\r\n\r\n\t\tsitesOpenerElement.on('click.DesktopSitesNavigationLink', (clickEvent: Event) => {\r\n\t\t\tthis.toggleSitesNavigation(sitesFlyout);\r\n\r\n\t\t\tif (!this.initiallyMeasured) {\r\n\t\t\t\tthis.activateRegionAndSetHeight($(countryRegions[0]), countryRegions, countryContainer);\r\n\t\t\t\tthis.setHeaderMargin(sitesFlyout[0].offsetHeight);\r\n\t\t\t\tthis.initiallyMeasured = true;\r\n\t\t\t}\r\n\t\t\tclickEvent.preventDefault();\r\n\t\t\tclickEvent.stopPropagation();\r\n\t\t});\r\n\r\n\t\t$(window).on('resize.DesktopNavigationMetaResize', () => {\r\n\t\t\tif ($(classes.body).hasClass(classes.stateSitesActive)) {\r\n\t\t\t\tthis.setHeaderMargin(sitesFlyout[0].offsetHeight);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tisDesktopNavigationInitialized = true;\r\n\t}\r\n\r\n\tdestroyDesktopNavigation(navigationItemLinks: JQuery, sitesOpenerElement: JQuery, countryRegions: JQuery) {\r\n\t\tthis.closeSitesNavigation();\r\n\r\n\t\tnavigationItemLinks.each((i: number, elem: HTMLElement) => {\r\n\t\t\t$(elem)\r\n\t\t\t\t.find(`.${classes.level1OpenLayer}`)\r\n\t\t\t\t.off('click.DesktopNavigationLink');\r\n\t\t\tconst currentFirstLevelNavigationElement = $(elem);\r\n\t\t\tconst currentFirstLevelNavigationFlyout = currentFirstLevelNavigationElement\r\n\t\t\t\t.parent()\r\n\t\t\t\t.find(`.${classes.navigationLayerWrapper}`);\r\n\r\n\t\t\tcurrentFirstLevelNavigationElement.removeClass(classes.stateActive);\r\n\t\t\tcurrentFirstLevelNavigationFlyout.css('left', '');\r\n\t\t});\r\n\r\n\t\tcountryRegions.each((i: number, elem: HTMLElement) => {\r\n\t\t\t$(elem)\r\n\t\t\t\t.find(`.${classes.openCountryRegion}`)\r\n\t\t\t\t.off('click.DesktopCountrySitesRegionLink');\r\n\t\t});\r\n\r\n\t\tsitesOpenerElement.off('click.DesktopSitesNavigationLink');\r\n\t\t$(window).off('scroll.DesktopNavigationMetaNavigationScrolling');\r\n\t\t$(window).off('resize.DesktopNavigationMetaResize');\r\n\r\n\t\tisDesktopNavigationInitialized = false;\r\n\t}\r\n\r\n\tinitNavigationOpening() {\r\n\t\tconst $ctx = $(this._ctx),\r\n\t\t\tviewport = getCurrentBreakpoint() as string,\r\n\t\t\tnavigationItemLinks = $(`.${classes.layerOpener}`, $ctx),\r\n\t\t\tsitesOpenerElement = $(`.${classes.sitesOpener}`, $ctx),\r\n\t\t\tcountryRegions = $(`.${classes.countryRegion}`, $ctx),\r\n\t\t\tcountryContainer = $(`.${classes.countryContainer}`, $ctx),\r\n\t\t\tsitesFlyout = $(`.${classes.sitesFlyout}`, $ctx);\r\n\r\n\t\tif (viewport === 'medium' || viewport === 'small') {\r\n\t\t\tthis.destroyDesktopNavigation(navigationItemLinks, sitesOpenerElement, countryRegions);\r\n\t\t} else if (!isDesktopNavigationInitialized) {\r\n\t\t\tthis.initDesktopNavigation(\r\n\t\t\t\tnavigationItemLinks,\r\n\t\t\t\tsitesOpenerElement,\r\n\t\t\t\tcountryRegions,\r\n\t\t\t\tcountryContainer,\r\n\t\t\t\tsitesFlyout\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeaderMargin(margin: number) {\r\n\t\t$(window).trigger('setHeaderMargin', [margin]);\r\n\t}\r\n\r\n\ttoggleSitesNavigation(sitesFlyout: JQuery) {\r\n\t\t// Bug: COVDCJMCP-1409\r\n\t\t// toggling 'classes.stateSitesActive' in necessary as in Win8 and 10, IE11 a flickering/shine through of the\r\n\t\t// slider appears, in case it is (partly) covered by the header.\r\n\t\t// for further information read about: 'transform breaking position: fixed'\r\n\t\t// as I did not see any posibility to work without the transformation, fixed positioning without going too deep,\r\n\t\t// I opted for: setting the in this case the class 'm-navigation-meta__flyout--position-fixer' with a display: none\r\n\t\tif ($(classes.body).hasClass(classes.stateSitesActive)) {\r\n\t\t\tthis.addClassWithTimeout(classes.positionFixer);\r\n\t\t\tthis.setHeaderMargin(0);\r\n\t\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\t\t$(window).trigger('disablePreventStickyScrollBehaviour');\r\n\t\t} else {\r\n\t\t\tthis.metaNaviFlyout.removeClass(classes.positionFixer);\r\n\t\t\tthis.setHeaderMargin(sitesFlyout[0].offsetHeight);\r\n\t\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t\t\t$(window).trigger('enablePreventStickyScrollBehaviour');\r\n\t\t}\r\n\t\t$(classes.body).toggleClass(classes.stateSitesActive);\r\n\t}\r\n\r\n\tcloseSitesNavigation() {\r\n\t\tthis.addClassWithTimeout(classes.positionFixer);\r\n\t\tthis.setHeaderMargin(0);\r\n\t\t$(classes.body).removeClass(classes.stateSitesActive);\r\n\t}\r\n\r\n\tactivateRegionAndSetHeight(elem: JQuery, countryRegions: JQuery, countryContainer: JQuery) {\r\n\t\tcountryRegions.removeClass(classes.stateActive);\r\n\t\t$(elem).addClass(classes.stateActive);\r\n\t\tcountryContainer.css('min-height', $(elem).find(`.${classes.navigationLayerWrapper}`)[0].offsetHeight + 'px');\r\n\t}\r\n\r\n\taddClassWithTimeout(classname: string) {\r\n\t\twindow.setTimeout(() => {\r\n\t\t\tthis.metaNaviFlyout.addClass(classname);\r\n\t\t}, 700);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { removeBodyState } from '@project/shared/utils/body-state/js/body-state';\r\nimport { updateNavLevel } from '@project/shared/utils/burger/js/burger';\r\n\r\nimport getCurrentBreakpoint, { Breakpoint, onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst classes = {\r\n\tlayer: 'js-m-navigation-wrapper__layer',\r\n\twrapper: 'js-m-navigation-wrapper__navigation-layer',\r\n\titemLevel1: 'js-m-navigation-wrapper__item-level1',\r\n\topenLevel: 'js-m-navigation-wrapper__open-layer',\r\n\tcloseLevel: 'js-m-navigation-wrapper__close-layer',\r\n\tstateOpen: 'state-m-navigation-wrapper__layer--open',\r\n\tstateItemOpen: 'state-m-navigation-wrapper__leveltrigger--is-open',\r\n\tstateItemActive: 'state-m-navigation-wrapper__leveltrigger--is-active',\r\n\tstateBurgerNav: 'state-m-burgernav--visible',\r\n};\r\n\r\n@createModule('NavigationWrapper')\r\n/**\r\n * navigation-wrapper module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class NavigationWrapper extends TerrificSpec {\r\n\tme = this;\r\n\t$ctx: JQuery;\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.initNavigation();\r\n\r\n\t\t/**\r\n\t\t * Terrific => Register & handle window resize event\r\n\t\t */\r\n\t\tonBreakpointChange(() => this.initNavigation());\r\n\r\n\t\tresolve();\r\n\r\n\t\t$(window).on('burgerOpened', () => {\r\n\t\t\t$(window).trigger('searchFlyout:close');\r\n\t\t\tthis._getOpenTrigger()\r\n\t\t\t\t.parent()\r\n\t\t\t\t.removeClass(classes.stateItemActive);\r\n\t\t});\r\n\r\n\t\r\n\r\n\t\t$(window).on('searchFlyout:open', this.closeNavigation.bind(this));\r\n\t}\r\n\r\n\tstop() {}\r\n\t_getOpenTrigger() {\r\n\t\treturn $(this._ctx).find(`.${classes.openLevel}`);\r\n\t}\r\n\t_getCloseTrigger() {\r\n\t\treturn $(this._ctx).find(`.${classes.closeLevel}`);\r\n\t}\r\n\r\n\tinitNavigation() {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\tthis.initMobileNavigation();\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tthis.destroyMobileNavigation();\r\n\t\t}\r\n\t}\r\n\r\n\tinitMobileNavigation() {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tconst $open = this._getOpenTrigger();\r\n\t\tconst $close = this._getCloseTrigger();\r\n\t\tconst $wrapper = $(`.${classes.wrapper}`, $ctx);\r\n\r\n\t\t// Used namespace to avoid conflict with navigation meta bindings and possible others\r\n\t\t$open.on('click.MobileNavigationLink', (ev: Event) => this.onClickOpenSubnavigation(ev));\r\n\t\t$close.on('click.MobileNavigationLink', (ev: Event) => this.onClickCloseSubnavigation(ev));\r\n\t\t$ctx.on('click.MobileNavigationLink', (ev: Event) => this.closeNavigation());\r\n\t\t$wrapper.on('click.MobileNavigationLink', (ev: Event) => {\r\n\t\t\tev.stopPropagation();\r\n\t\t});\r\n\t}\r\n\r\n\tdestroyMobileNavigation() {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tconst $open = this._getOpenTrigger();\r\n\t\tconst $close = this._getCloseTrigger();\r\n\t\tconst $wrapper = $(`.${classes.wrapper}`, $ctx);\r\n\r\n\t\t$open.off('click.MobileNavigationLink');\r\n\t\t$close.off('click.MobileNavigationLink');\r\n\t\t$ctx.off('click.MobileNavigationLink');\r\n\t\t$wrapper.off('click.MobileNavigationLink');\r\n\t}\r\n\r\n\t/**\r\n\t * return all layers\r\n\t */\r\n\t_getLayers() {\r\n\t\treturn $(this._ctx).find(`.${classes.layer}`);\r\n\t}\r\n\r\n\t/**\r\n\t * return current layer depending on the call-to-action of trigger elm.\r\n\t * @param trigger: jquery object\r\n\t * @param cta: 'close' / 'open', default= 'open'\r\n\t * @return currentLayer: jquery object\r\n\t */\r\n\t_getCurrentLayer(trigger: any, cta?: string) {\r\n\t\tlet result = cta === 'close' ? $(trigger).closest(`.${classes.layer}`) : $(trigger).next(`.${classes.layer}`);\r\n\t\t// fallback => check, if no layer was found, then check if the layer is inside the trigger element\r\n\t\tif (result.length === 0) {\r\n\t\t\tresult = $(trigger).find(`.${classes.layer}`);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\t_getParentsLayer(trigger: any, cta?: string) {\r\n\t\tconst $layer = this._getCurrentLayer(trigger, cta);\r\n\t\treturn $layer.parents(`.${classes.layer}`);\r\n\t}\r\n\t_getChildrenLayer(trigger: any, cta?: string) {\r\n\t\tconst $layer = this._getCurrentLayer(trigger, cta);\r\n\t\treturn $layer.next(`.${classes.layer}`);\r\n\t}\r\n\r\n\t/**\r\n\t * get the level data of an given jquery elm 'elm'\r\n\t * @return level: jquery object\r\n\t */\r\n\t_getLevel(elm: JQuery): number {\r\n\t\tconst level = $(elm).data('level');\r\n\t\treturn typeof level !== 'number' ? parseInt(level, 10) : level;\r\n\t}\r\n\r\n\tonClickOpenSubnavigation(ev: any) {\r\n\t\tev.preventDefault();\r\n\t\tev.stopImmediatePropagation();\r\n\t\t// close all layers but parents\r\n\t\tthis.openLayer(this._getLayers().not(this._getParentsLayer(ev.currentTarget)), false);\r\n\t\t// toggle active Item class\r\n\t\tthis._getOpenTrigger()\r\n\t\t\t.parent()\r\n\t\t\t.not($(ev.currentTarget).parents())\r\n\t\t\t.removeClass(classes.stateItemActive);\r\n\t\t$(ev.currentTarget)\r\n\t\t\t.parent()\r\n\t\t\t.addClass(classes.stateItemActive);\r\n\r\n\t\t// open current layer\r\n\t\tthis.openLayer(this._getCurrentLayer(ev.currentTarget), true);\r\n\r\n\t\t// update navigation level\r\n\t\tconst nr = this._getLevel(this._getCurrentLayer(ev.currentTarget));\r\n\t\tupdateNavLevel(nr);\r\n\t}\r\n\r\n\tonClickCloseSubnavigation(ev: Event) {\r\n\t\tev.preventDefault();\r\n\t\tev.stopImmediatePropagation();\r\n\t\t// close current layer and children\r\n\t\tconst $currentLayer = this._getCurrentLayer(ev.currentTarget, 'close');\r\n\t\t$currentLayer.find(`> .${classes.openLevel}`).removeClass(classes.stateItemActive);\r\n\t\tthis.openLayer($currentLayer.add(this._getChildrenLayer(ev.currentTarget, 'close')), false);\r\n\r\n\t\t// update navigation level\r\n\t\tconst nr = this._getLevel(this._getCurrentLayer(ev.currentTarget, 'close')) - 1;\r\n\t\tupdateNavLevel(nr);\r\n\t}\r\n\r\n\t/**\r\n\t * Toggle Subnavigation Layer\r\n\t */\r\n\topenLayer($layer: JQuery, show: boolean) {\r\n\t\t$layer.toggleClass(classes.stateOpen, show);\r\n\t\tif ($layer.hasClass(classes.stateOpen)) {\r\n\t\t\t$layer.find('*').each((index: number, element: HTMLElement) => {\r\n\t\t\t\telement.scrollTop = 0;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Close all Navigation Layers\r\n\t */\r\n\tcloseNavigation() {\r\n\t\tupdateNavLevel();\r\n\t\tremoveBodyState(classes.stateBurgerNav);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tcountdown: \"js-m-new-event__countdown-time\",\r\n\tactiveDays: \"state-m-new-event__show-days\",\r\n\teventDescription: \"js-m-new-event__description\",\r\n\teventItem: 'm-new-event__item',\r\n};\r\n\r\n@createModule('NewEvent')\r\n/**\r\n * NewEvent module implementation.\r\n *\r\n */\r\nexport class NewEvent extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.initCountdown();\r\n\t\tthis.eventDescriptionEllipsis();\r\n\t\tthis.onDownLoadCalendar();\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() { }\r\n\r\n\tinitCountdown() {\r\n\t\tconst $countdown = this.$ctx.find(`.${classes.countdown}`);\r\n\t\tconst totalseconds = parseInt($countdown.data('second'));\r\n\t\tif (totalseconds > 86400) {\r\n\t\t\t$countdown.text(Math.floor(totalseconds / 24 / 3600));\r\n\t\t\t$countdown.addClass(classes.activeDays)\r\n\t\t} else {\r\n\t\t\tvar me = this;\r\n\t\t\tsetInterval(function () {\r\n\t\t\t\tme.calculator();\r\n\t\t\t}, 1000);\r\n\t\t}\r\n\t}\r\n\r\n\tcalculator() {\r\n\t\tconst $countdown = this.$ctx.find(`.${classes.countdown}`);\r\n\t\tconst totalseconds = parseInt($countdown.data('second'));\r\n\t\tconst nextseconds = totalseconds - 1;\r\n\t\tconst h = Math.floor(nextseconds / 3600) < 10 ? '0' + Math.floor(nextseconds / 3600) : Math.floor(nextseconds / 3600);\r\n\t\tconst m = Math.floor((nextseconds / 60 % 60)) < 10 ? '0' + Math.floor((nextseconds / 60 % 60)) : Math.floor((nextseconds / 60 % 60));\r\n\t\tconst s = Math.floor((nextseconds % 60)) < 10 ? '0' + Math.floor((nextseconds % 60)) : Math.floor((nextseconds % 60));\r\n\t\t$countdown.data('second', nextseconds);\r\n\t\t$countdown.text(h + \":\" + m + \":\" + s);\r\n\t}\r\n\r\n\teventDescriptionEllipsis() {\r\n\t\tconst $eventDescription = this.$ctx.find(`.${classes.eventDescription}`);\r\n\t\tif ($eventDescription.text().length > 267) {\r\n\t\t\t$eventDescription.text($eventDescription.text().substring(0, 267) + \"...\");\r\n\t\t}\r\n\t}\r\n\r\n\tprivate onDownLoadCalendar()\r\n {\r\n $(document).off(\"click\").on(\"click\",\".js-a-download\", function () {\r\n\t\t\tvar calendarResult = $(this).attr(\"data-calendarresult\");\r\n\t\t\tif (calendarResult != undefined) {\r\n\t\t\t\tif (calendarResult.length > 0) {\r\n\r\n\t\t\t\t\twindow.open( \"data:text/calendar;charset=utf8,\" +calendarResult);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.log(\"calendarResult: calendarResult is empty\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconsole.log(\"calendarResult: calendarResult is undefined\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n }\r\n\tRegisteredUpdate() {\r\n\t\tconst $eventItems = this.$ctx.find(`.${classes.eventItem}`);\r\n\t\tif(Track.isKnownMarketoLead()) {\r\n\t\t\t$eventItems.each((i,e) => {\r\n\t\t\t\tconst $event = $(e).children();\r\n\t\t\t\tconst classList = $event.attr('class');\r\n\t\t\t\tconst className = classList.split(' ');\r\n\t\t\t\t$event.removeClass(className[0] + '--locked');\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('OrderingPlatform')\r\n/**\r\n * ordering-platform module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class OrderingPlatform extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { PublicEvents, triggerPublicEvent } from '@project/shared/utils/events/js/events';\r\nimport * as copy from 'copy-to-clipboard';\r\n\r\nconst jsClass = 'js-m-page-share__anchor';\r\n\r\n@createModule('PageShare')\r\n/**\r\n * ListIcons Component\r\n * @constructor\r\n */\r\nexport class PageShare extends TerrificSpec {\r\n\t// eslint-disable-next-line no-undef\r\n\tclipboardAnchor: HTMLElement;\r\n\r\n\t/**\r\n\t * Start / Init Nitro lifecycle hook\r\n\t * @param {function} resolve Required parameter for start lifecycle\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function): void {\r\n\t\tresolve();\r\n\r\n\t\tthis.setClipboardAnchorBtn();\r\n\r\n\t\tif (this.isClipboardAnchorBtn()) {\r\n\t\t\tthis.clipboardAnchor.addEventListener('click', () => this.copyURLToClipboard());\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * set clipboard anchor context reference\r\n\t * @returns {void}\r\n\t */\r\n\tsetClipboardAnchorBtn() {\r\n\t\tthis.clipboardAnchor = this._ctx.querySelectorAll('.m-icon-hyperlink')[0].parentNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies the URL (location.href) into the browser clipboard\r\n\t * @constructor {function}\r\n\t * @returns {void}\r\n\t */\r\n\tcopyURLToClipboard(): void {\r\n\t\tconst opts: any = this.getClipboardOpts();\r\n\t\tconst data = this.getLocationHref();\r\n\r\n\t\tthis.showDebugInfo(opts, data);\r\n\t\tthis.showFeedbackMsg();\r\n\t\tcopy(data, opts);\r\n\t\tthis.hideFeedbackMsgTimer();\r\n\t}\r\n\r\n\t/**\r\n\t * getClipboardOpts\r\n\t * @constructor {function} getClipboardOpts\r\n\t * @returns {Object} any\r\n\t */\r\n\tgetClipboardOpts(): any {\r\n\t\treturn {\r\n\t\t\tdebug: false,\r\n\t\t\tmessage: 'Press #{⌘+C} on macOS or #{Ctrl+C} on Windows to copy',\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * getLocationHref\r\n\t * @constructor {function} getLocationHref\r\n\t * @returns {string} string\r\n\t */\r\n\tgetLocationHref(): string {\r\n\t\treturn document.location.href;\r\n\t}\r\n\r\n\t/**\r\n\t * showDebugInfo - Description\r\n\t * @constructor {function} showDebugInfo\r\n\t * @param {Object} opts holds thze options for the clipboard object\r\n\t * @param {string} data holds the data to be copied into the clipboard\r\n\t */\r\n\tshowDebugInfo(opts: any, data: string) {\r\n\t\tif (opts.debug) {\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.log('Copied to clipboard: ', data);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * showFeedbackMsg\r\n\t * @constructor {function} showFeedbackMsg\r\n\t */\r\n\tshowFeedbackMsg() {\r\n\t\tconst ctx: HTMLElement = this._ctx;\r\n\t\tctx.previousElementSibling.classList.remove('show');\r\n\t\tctx.previousElementSibling.classList.add('show');\r\n\t}\r\n\r\n\t/**\r\n\t * hideFeedbackMsg\r\n\t * @constructor {function} hideFeedbackMsg\r\n\t */\r\n\thideFeedbackMsg() {\r\n\t\tconst ctx: HTMLElement = this._ctx;\r\n\t\tctx.previousElementSibling.classList.remove('show');\r\n\t}\r\n\r\n\t/**\r\n\t * showFeedbackMsg\r\n\t * @constructor {function} showFeedbackMsg\r\n\t */\r\n\thideFeedbackMsgTimer() {\r\n\t\twindow.setTimeout(() => {\r\n\t\t\tthis.hideFeedbackMsg();\r\n\t\t}, 3500);\r\n\t}\r\n\r\n\t/**\r\n\t * back-to-top button should contain the 'm-page-share' css class that comes from the button modifier 'top'\r\n\t * to separate its click event\r\n\t * @returns {boolean} boolean\r\n\t */\r\n\tisClipboardAnchorBtn(): boolean {\r\n\t\treturn this.clipboardAnchor.classList.contains(jsClass);\r\n\t}\r\n\r\n\t/**\r\n\t * stop/destroy Nitro lifecycle hook\r\n\t * @returns {void}\r\n\t */\r\n\tstop(): void {\r\n\t\tif (this.isClipboardAnchorBtn()) {\r\n\t\t\tthis._ctx.removeEventListener('click', () => {});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Nitro triggerPublicEvent\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent(): void {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n\r\nexport default PageShare;\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as ProductCompareHelper from '@project/shared/utils/product-compare/js/product-compare';\r\n\r\nconst classes = {\r\n\tbutton: 'js-m-product-compare-button__button',\r\n\taddedState: 'state-m-product-compare-button--added',\r\n};\r\n\r\n@createModule('ProductCompareButton')\r\n/**\r\n * product-compare-button module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class ProductCompareButton extends TerrificSpec {\r\n\tadded: boolean = false;\r\n\tproductId: string;\r\n\tproductName: string;\r\n\tmarket: string;\r\n\taddText: string;\r\n\tremoveText: string;\r\n\t$ctx: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.addText = this.$ctx.data('add-text');\r\n\t\tthis.removeText = this.$ctx.data('remove-text');\r\n\t\tthis.productId = this.$ctx.data('product-id');\r\n\t\tthis.productName = this.$ctx.data('product-name');\r\n\t\tthis.market = this.$ctx.data('market');\r\n\t\tconst $button = this.$ctx.find(`.${classes.button}`);\r\n\t\t$button.on('click', this.onButtonClick.bind(this));\r\n\r\n\t\t// the follow event is subscribe the action from compare popup.\r\n\t\tthis.$ctx.on('onCompareProductListItemChangeEvent', (e: any, id: string) => {\r\n\t\t\tif (this.productId === id && this.added) {\r\n\t\t\t\tthis.changeCompareProductItemState();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.initButtonState();\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * method sets initial buttons states from cookievalues\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tinitButtonState() {\r\n\t\tif (ProductCompareHelper.isProductInCookie(this.productId)) {\r\n\t\t\tthis.added = true;\r\n\t\t\tthis.setButtonState();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method updates button text according to state\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tsetButtonState() {\r\n\t\tthis.$ctx.toggleClass(classes.addedState, this.added);\r\n\t\tconst $button = this.$ctx.find(`.${classes.button}`);\r\n\t\t$button.text(this.added ? this.removeText : this.addText);\r\n\t}\r\n\t/**\r\n\t * method handles button click and updates Cookie accordingly\r\n\t *\r\n\t * @param {Object} ev eventObject\r\n\t * @returns {void}\r\n\t */\r\n\tonButtonClick(ev: Event) {\r\n\t\tev.preventDefault();\r\n\t\tthis.changeCompareProductItemState();\r\n\t}\r\n\r\n\t/**\r\n\t * change compare item state\r\n\t *\r\n\t * @param {Object} ev eventObject\r\n\t * @returns {void}\r\n\t */\r\n\tchangeCompareProductItemState() {\r\n\t\tthis.added = !this.added;\r\n\t\tthis.setButtonState();\r\n\t\tthis.updateCookieState();\r\n\t}\r\n\r\n\t/**\r\n\t * method updates cookie state\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tupdateCookieState() {\r\n\t\tif (this.added) {\r\n\t\t\tProductCompareHelper.addProduct(this.productId, this.market, this.productName);\r\n\t\t} else {\r\n\t\t\tProductCompareHelper.removeProduct(this.productId);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as ProductCompareHelper from '@project/shared/utils/product-compare/js/product-compare';\r\nimport {IProductCompareItem} from \"@covestro/models\";\r\n\r\nconst classes = {\r\n\theading: 'm-product-compare-layer__heading',\r\n\tquantity: 'm-product-compare-layer__number',\r\n\tswitch: 'm-product-compare-layer__switch',\r\n\tproduct: 'm-product-compare-layer__product',\r\n\tcloseButton: 'js-m-product-compare-layer__close',\r\n\tdeleteButton: 'm-product-compare-layer__delete',\r\n\tactiveClass: 'state-m-product-compare-layer--active',\r\n\tcollapseClass: 'state-m-product-compare-layer--open',\r\n\tcompareList: 'm-product-compare-layer__list',\r\n\tpreloader: '.m-product-compare-layer__product .a-loading-indicator',\r\n};\r\n\r\n@createModule('ProductCompareLayer')\r\n/**\r\n * product-compare-layer module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class ProductCompareLayer extends TerrificSpec {\r\n\toneItemText: string;\r\n\tmultiItemText: string;\r\n\tcompareProductList: IProductCompareItem[]; // define the varaiable.\r\n\t$ctx: JQuery;\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.oneItemText = this.$ctx.data('one-item-text');\r\n\t\tthis.multiItemText = this.$ctx.data('multi-item-text');\r\n\t\tthis.$ctx.on('hideLayer', this.hideLayer.bind(this));\r\n\t\tthis.$ctx.on('showLayer', (e: any, count: number) => {\r\n\t\t\tthis.showLayer(count);\r\n\t\t});\r\n\r\n\t\tthis.compareProductList = []; // the data for pop list.\r\n\r\n\t\t// to monitor the add action from product finder list, to receive the name id market from this event.\r\n\t\tthis.$ctx.on('addNewProductLayer', (e: any, product: IProductCompareItem) => {\r\n\t\t\tthis.addNewCompareProductItem(product);\r\n\t\t});\r\n\r\n\t\t// to monitor the remove action from product finder list, to receive the name id market from this event.\r\n\t\tthis.$ctx.on('removeNewProductLayer', (e: any, id: string) => {\r\n\t\t\tthis.removeNewCompareProductItem(id);\r\n\t\t});\r\n\r\n\t\tthis.$ctx.find(`.${classes.closeButton}`).on('click', this.onCloseClick.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.switch}`).on('click', this.onSwitchClick.bind(this));\r\n\t\t// this.$ctx.find(`.${classes.deleteButton}`).on('click', this.onRemoveClick.bind(this)); // empty action, so comment it.\r\n\t\tthis.$ctx.find(classes.preloader).hide(); // to hide the loading when initial\r\n\t\tProductCompareHelper.updateLayer();\r\n\t\tthis.fetchCompareProductNameFromService(); // to fetch the name data from service when initial.\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * to get the the product name data from server when the page initial\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tfetchCompareProductNameFromService() {\r\n\t\tconst compareData = ProductCompareHelper.getCookieData();\r\n\t\t// if the cookie data exist, will get the name from service.\r\n\t\tif (compareData.length > 0 ) {\r\n\t\t\tthis.fetchProductCompareData();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method is triggered on close click\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonCloseClick() {\r\n\t\tthis.hideLayer();\r\n\t}\r\n\r\n\t/**\r\n\t * method hides compare layer\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thideLayer() {\r\n\t\tthis.$ctx.removeClass(classes.activeClass);\r\n\t\tProductCompareHelper.setLayerHiddenCookie();\r\n\t\tthis.$ctx.removeClass(classes.collapseClass);\r\n\t}\r\n\r\n\t/**\r\n\t * method shows compare layer\r\n\t *\r\n\t * @param {number} count count of products in compare\r\n\t * @returns {void}\r\n\t */\r\n\tshowLayer(count: number) {\r\n\t\tlet text = this.oneItemText;\r\n\t\tif (count > 1) {\r\n\t\t\ttext = this.multiItemText.replace('{0}', `${count}`);\r\n\t\t}\r\n\t\tconst $statusText = this.$ctx.find(`.${classes.quantity}`);\r\n\t\t$statusText.text(text);\r\n\t\tthis.$ctx.addClass(classes.activeClass);\r\n\t}\r\n\r\n\t/**\r\n\t * to execute the request action by ajax.\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tfetchProductCompareData(){\r\n\t\tconst serviceUrl = this.$ctx.data('layer-compare-service');\r\n\t\tif (serviceUrl) {\r\n\t\t\tthis.$ctx.find(classes.preloader).show();\r\n\t\t\t$.ajax({\r\n\t\t\t\tmethod: 'get',\r\n\t\t\t\turl: serviceUrl,\r\n\t\t\t\tsuccess: this.onProductCompareDataSuccess.bind(this),\r\n\t\t\t\terror: () => {\r\n\t\t\t\t\tthis.$ctx.find(classes.preloader).hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * handle response data from service.\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonProductCompareDataSuccess(data: any) {\r\n\t\tthis.$ctx.find(classes.preloader).hide();\r\n\t\tif (data && data.length > 0) {\r\n\t\t\tthis.compareProductList = [];\r\n\t\t\tconst compareData = ProductCompareHelper.getCookieData();\r\n\t\t\tcompareData && compareData.forEach((item: any) => {\r\n\t\t\t\tconst responseItem:IProductCompareItem = data.find( (dataItem: any)=> dataItem.number === item.number);\r\n\t\t\t\tif (responseItem) {\r\n\t\t\t\t\tthis.compareProductList.push({number: responseItem.number, market: '', name: responseItem.name });\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.handleCompareResult(this.compareProductList);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * render the compare item from list.\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleCompareResult(compareProductList: IProductCompareItem[]) {\r\n\t\tconst $selectElement = this.$ctx.find(`.${classes.compareList}`);\r\n\t\t$selectElement.empty();\r\n\t\tfor (let compareItem of compareProductList) {\r\n\t\t\t$selectElement.append(`
  • \r\n\t\t\t\t\t\t\t\t\t\t${compareItem.name}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
  • `);\r\n\t\t\t$selectElement.on('click', 'li a', (event: any) => {\r\n\t\t\t\tconst productId = $(event.target).attr(\"id\");\r\n\t\t\t\tthis.removeNewCompareProductItem(productId);\r\n\t\t\t\tProductCompareHelper.removeProduct(productId); // to remove local data from cookies and update the layer count, remove action will check if the item exists.\r\n\t\t\t\tProductCompareHelper.removeCompareProductLayerFromFinderList(productId); // to notify the change if it is in product list page now.\r\n\t\t\t\tProductCompareHelper.updateLayer(); // update layer\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * remove new compare product item in list\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tremoveNewCompareProductItem(id: string) {\r\n\t\tconst index = this.compareProductList.findIndex( (item) => item.number === id);\r\n\t\tif (index > -1) {\r\n\t\t\tthis.compareProductList.splice(index, 1);\r\n\t\t\tthis.handleCompareResult(this.compareProductList);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * add new compare product item in list\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\taddNewCompareProductItem(product:IProductCompareItem) {\r\n\t\tthis.compareProductList.push(product);\r\n\t\tthis.handleCompareResult(this.compareProductList);\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\t\r\n\r\n\t/**\r\n\t * method hides compare layer\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonSwitchClick() {\r\n\t\tthis.$ctx.toggleClass(classes.collapseClass);\r\n\t}\r\n\r\n\t/**\r\n\t * method remove compare item\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t// onRemoveClick() {\r\n\t//\r\n\t// }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n/**\r\n * product-finder-teaser module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nconst classes = {\r\n\tmaterialSelect: 'js-m-product-finder-teaser__select-material',\r\n\tcountrySelect: 'js-m-product-finder-teaser__select-marketswitch',\r\n\tlink: 'js-m-product-finder-teaser__link',\r\n};\r\n\r\n@createModule('ProductFinderTeaser')\r\nexport class ProductFinderTeaser extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tdata: any;\r\n\t$form: JQuery;\r\n\t$link: JQuery;\r\n\t$paramValues: any;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.data = this.$ctx.data();\r\n\t\tthis.$form = $('.js-m-product-finder-teaser__form', this.$ctx);\r\n\t\tthis.$link = $(`.${classes.link}`, this._ctx);\r\n\r\n\t\tthis.$ctx.on('FilterTwoLevelMultiCheckboxChanged', this.adjustLinkUrl.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.link}`).on(\"click\", this.onButtonSubmitTeaser.bind(this));\r\n\r\n\t\tthis.adjustLinkUrl();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tadjustLinkUrl() {\r\n\t\tconst separator = this.data.filterseperator || ':';\r\n\t\tconst sortingParam = this.data.sortingparam ? separator + this.data.sortingparam : '';\r\n\t\tconst countryParam = separator + this.data.countryparam + separator + this.data.marketparam;\r\n\r\n\t\tconst serializedData = this.$form\r\n\t\t\t.serializeArray()\r\n\t\t\t.filter((e) => {\r\n\t\t\t\treturn e.value !== '';\r\n\t\t\t})\r\n\t\t\t.map((e) => {\r\n\t\t\t\treturn encodeURIComponent(e.value);\r\n\t\t\t});\r\n\t\tlet materialAndIndustryParams = '';\r\n\r\n\t\tif (serializedData.length) {\r\n\t\t\tmaterialAndIndustryParams = separator + serializedData.join(separator);\r\n\t\t}\r\n\r\n\t\tconst allParams = sortingParam + countryParam + materialAndIndustryParams;\r\n\t\tconst newLinkUrl = this.data.baseurl + '/?' + this.data.queryparam + '=' + allParams;\r\n\r\n\t\tthis.$paramValues = allParams;\r\n\t\tthis.$link.attr('href', newLinkUrl);\r\n\t}\r\n\r\n\tonButtonSubmitTeaser() {\r\n\t\tlocalStorage.setItem(\"productFinderTeaserQueryParams\", JSON.stringify(this.$paramValues));\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { classes as multiClasses } from '../../event-list/js/event-list';\r\n/**\r\n * product-finder-teaser module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\n\r\nconst classes = {\r\n\tfilter: 'm-product-finder-teaser-V2__filterwrapper',\r\n\tfilterTag: 'm-product-finder-teaser-V2__filter-tag',\r\n\tfilterTags: 'm-product-finder-teaser-V2__filter-tags',\r\n\tfilterTagContainer: 'm-product-finder-teaser-V2__filter-tags-container',\r\n\tmaterialSelect: 'js-m-product-finder-teaser-V2__select-material',\r\n\tcountrySelect: 'js-m-product-finder-teaser-V2__select-marketswitch',\r\n\tlink: 'js-m-product-finder-teaser__link',\r\n\tlabelText: 'm-product-finder-teaser-V2__filter-tag-text',\r\n\tselectorTag: 'm-filter-two-level-multiselect__layer-level3',\r\n\tfilterSelect: 'm-product-finder-teaser-V2__filter',\r\n\tbottomSection: 'm-product-finder-teaser-V2__bottom',\r\n\tclearFilterBtn: 'm-product-finder-teaser-V2__clear-filter'\r\n};\r\n\r\n@createModule('ProductFinderTeaserV2')\r\nexport class ProductFinderTeaser extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tdata: any;\r\n\t$form: JQuery;\r\n\t$link: JQuery;\r\n\t$paramValues: any;\r\n\t$hiddenFieldTest: JQuery;\r\n\t$hiddenFieldValues: JQuery;\r\n\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.data = this.$ctx.data();\r\n\t\tthis.$form = $('.js-m-product-finder-teaser-V2__form', this.$ctx);\r\n\t\tthis.$link = $(`.${classes.link}`, this._ctx);\r\n\t\tthis.$hiddenFieldTest = $('#hiddenLinkTestValues');\r\n\t\tthis.$hiddenFieldValues = $('#hiddenLinkValues');\r\n\t\tthis.$ctx.on('FilterTwoLevelMultiCheckboxChanged', this.adjustLinkUrl.bind(this));\r\n\t\tthis.adjustLinkUrl();\r\n\t\tthis.$ctx.find(`.${classes.selectorTag}`).on('click', this.showFilters.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.clearFilterBtn}`).on(\"click\", this.clearAllFilters.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.link}`).on(\"click\", this.onButtonSubmit.bind(this));\r\n\t\tresolve();\r\n\t}\r\n\r\n\tshowFilters(event: Event) {\r\n\t\tevent.stopPropagation();\r\n\t\tconst checkboxes = this.$ctx.find(\"input:checked\");\r\n\t\tconst tagsContainer = this.$ctx.find(`.${classes.filterTagContainer}`);\r\n\t\ttagsContainer.empty();\r\n\t\tif (checkboxes.length > 0) {\r\n\t\t\tfor (let i = 0; i < checkboxes.length; i++) {\r\n\t\t\t\tconst checkbox = checkboxes.eq(i);\r\n\t\t\t\tconst id = checkbox.attr('id');\r\n\t\t\t\tconst label = this.$ctx.find(\"label[for='\" + id + \"']\");\r\n\t\t\t\tconst o = \"
    \" + label.text() + \"
    \";\r\n\t\t\t\ttagsContainer.append(o);\r\n\t\t\t}\r\n\t\t\tthis.$ctx.find(`.${classes.filterTag}`).on('click', this.onCloseFilter.bind(this));\r\n\t\t\tthis.$ctx.find(`.${classes.filterTags}`).show();\r\n\t\t\tthis.$ctx.find(`.${classes.bottomSection}`).show();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.clearAllFilters();\r\n\t\t}\r\n\t}\r\n\r\n\tonCloseFilter(event: Event) {\r\n\t\tevent.stopPropagation();\r\n\t\t$(event.currentTarget).remove();\r\n\t\tconst text = $(event.currentTarget).text();\r\n\t\tconst checkboxes = this.$ctx.find(\"input:checked\");\r\n\r\n\t\tfor (let i = 0; i < checkboxes.length; i++) {\r\n\t\t\tconst checkbox = checkboxes.eq(i);\r\n\t\t\tconst id = checkbox.attr('id'); // get the id\r\n\t\t\tconst label = this.$ctx.find(\"label[for='\" + id + \"']\"); // look for matching label\r\n\t\t\tif (label.text() == text) {\r\n\t\t\t\tlabel.prev().prop('checked', false);\r\n\t\t\t\tif (checkboxes.length == 1) {\r\n\t\t\t\t\tthis.clearAllFilters();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tthis.$ctx.find(`.${multiClasses.twoLevelList}`).removeClass(multiClasses.twoLevelListOpen);\r\n\t\tthis.$ctx.find(`.${multiClasses.oneLevelList}`).removeClass(multiClasses.oneLevelListOpen);\r\n\t}\r\n\r\n\tclearAllFilters() {\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(\"input\").prop('checked', false);\r\n\t\tthis.$ctx.find(`.${classes.bottomSection}`).hide();\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(`.${multiClasses.twoLevelMainChecked}`)\r\n\t\t\t.removeClass(`${multiClasses.twoLevelMainChecked}`);\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(`.${multiClasses.twoLevelParentChecked}`)\r\n\t\t\t.removeClass(`${multiClasses.twoLevelParentChecked}`);\r\n\t\tthis.$ctx.find(`.${classes.filterSelect}`).find(`.${multiClasses.oneLevelMainChecked}`)\r\n\t\t\t.removeClass(`${multiClasses.oneLevelMainChecked}`);\r\n\t\tthis.$ctx.find(`.${classes.filterTagContainer}`).empty();\r\n\t\tthis.$ctx.find(`.${classes.filterTags}`).hide();\r\n\t\tthis.$ctx.find(`.${multiClasses.teaserContainer}`).empty();\r\n\t}\r\n\r\n\tadjustLinkUrl() {\r\n\t\tconst separator = this.data.filterseperator || ':';\r\n\t\tconst sortingParam = this.data.sortingparam ? separator + this.data.sortingparam : '';\r\n\t\tconst countryParam = separator + this.data.countryparam + separator + this.data.marketparam;\r\n\r\n\t\tconst serializedData = this.$form\r\n\t\t\t.serializeArray()\r\n\t\t\t.filter((e) => {\r\n\t\t\t\treturn e.value !== '';\r\n\t\t\t})\r\n\t\t\t.map((e) => {\r\n\t\t\t\treturn encodeURIComponent(e.value);\r\n\t\t\t});\r\n\t\tlet materialAndIndustryParams = '';\r\n\r\n\t\tif (serializedData.length) {\r\n\t\t\tmaterialAndIndustryParams = separator + serializedData.join(separator);\r\n\t\t}\r\n\r\n\t\tconst allParams = sortingParam + countryParam + materialAndIndustryParams;\r\n\t\tconst newLinkUrl = this.data.baseurl;\r\n\r\n\t\tthis.$paramValues = allParams;\r\n\t\tthis.$link.attr('href', newLinkUrl);\r\n\r\n\t}\r\n\r\n\tonButtonSubmit() {\r\n\t\tlocalStorage.setItem(\"productFinderTeaserQueryParams\", JSON.stringify(this.$paramValues));\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('ProductList')\r\n/**\r\n * product-list module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class ProductList extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\n@createModule('ProductTable')\r\n/**\r\n * product-table module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class ProductTable extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tcloseButton: 'js-m-prompt-box__close',\r\n\tstatePromptHide: 'state-m-prompt-box--hidden',\r\n};\r\n\r\n@createModule('PromptBox')\r\n/**\r\n * prompt-box\r\n */\r\nexport class PromptBox extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$closeButton: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$closeButton = $(`.${classes.closeButton}`, this.$ctx);\r\n\r\n\t\tthis.$closeButton.on('click', this.hidePrompt.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\thidePrompt() {\r\n\t\t$(this._ctx).addClass(classes.statePromptHide);\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\nimport { formatLabel } from '@project/shared/utils/labels/js/labels';\r\n\r\n// @ts-ignore\r\nimport * as IScroll from 'iscroll';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst classes = {\r\n\tscroller: 'js-m-slider-gallery__scroller',\r\n\tlist: 'js-m-slider-gallery__list',\r\n\titem: 'js-m-slider-gallery__item',\r\n\tdotButton: 'js-m-slider-gallery__dot-button',\r\n\tdot: 'js-m-slider-gallery__dot',\r\n\tactiveDot: 'state-m-slider-gallery--dot-is-active',\r\n\tsliderPages: 'js-m-slider-gallery__pages',\r\n\tsliderNavigation: 'js-m-slider-gallery__navigation',\r\n\tshowNumber: 'state-m-slider-gallery__show-number',\r\n\tshowArrow: 'state-m-slider-gallery--arrow-is-shown',\r\n\tarrowLeft: 'js-m-slider-gallery__arrow--left',\r\n\tarrowRight: 'js-m-slider-gallery__arrow--right',\r\n\tmetaNaviFlyout: 'js-m-navigation-meta__flyout',\r\n\tjsCaseStudyGallery: 'js-slider-gallery--case-studies',\r\n\tlink: 'js-m-slider-gallery__item-link',\r\n\tisInitialized: 'state-m-slider-gallery--is-initialized',\r\n\tvideosContainer: 'js-m-slider-gallery__list',\r\n\tvideosContainerListItem: 'js-m-slider-gallery__item',\r\n\tvideoElement: 'js-a-video__element',\r\n\tcampaignTeaserArea: 'js-m-slider-gallery__campaign-tease',\r\n};\r\n\r\n/**\r\n * Recommended settings for typeOnStopWhenSkippingSlide: \"pause\" or \"stop\" when skipping slides\r\n * @type {string}\r\n */\r\nconst videoCfg = {\r\n\ttypeOnStopWhenSkippingSlide: 'pause',\r\n\ttargetId: 'video-id',\r\n};\r\n\r\n@createModule('SliderGallery')\r\n/**\r\n * Breadcrumb module implementation.\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class SliderGallery extends TerrificSpec {\r\n\tsliderGalleryScroller: IScroll;\r\n\t$ctx: JQuery;\r\n\t$dots: JQuery;\r\n\t$sliderPages: JQuery;\r\n\t$sliderNavigation: JQuery;\r\n\t$campaignTeaserArea: JQuery;\r\n\t$arrowLeft: JQuery;\r\n\t$arrowRight: JQuery;\r\n\t$scroller: JQuery;\r\n\t$items: JQuery;\r\n\t$list: JQuery;\r\n\t$imagesAndVideos: JQuery;\r\n\t$dotContainers: JQuery;\r\n\t$links: JQuery;\r\n\titemMargin: number;\r\n\tnumberOfItemsPerPageBeforeViewportChanged: number;\r\n\tactiveItemBeforeViewportChanged: number;\r\n\tsliderIsScrolling: boolean;\r\n\titemsPerPage: Array;\r\n\tisMobileSlider: boolean;\r\n\t_sliderPageIndex: number;\r\n\t_showDotsSlider: number;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.initVars();\r\n\r\n\t\t// make sure margin of all bullets except the last one is set to known value in the javascript\r\n\t\tthis.$items.not(':last-child').css('margin-right', `${this.itemMargin}px`);\r\n\r\n\t\tif (this.$items.length > this._showDotsSlider) {\r\n\t\t\tthis.$sliderNavigation.addClass(classes.showNumber);\r\n\t\t}\r\n\r\n\t\tthis.addDataItemAttribute();\r\n\r\n\t\tthis.initScroller();\r\n\t\tonBreakpointChange(() => {\r\n\t\t\tthis.reinitScrollerWhenViewportChangedToOrFromSmall();\r\n\t\t});\r\n\r\n\t\t// do the positioning and sizing again, when window is resized\r\n\t\t$(window).on('resize.SliderGalleryAdjustPageWidth', () => {\r\n\t\t\tthis.handleSizeAndPosition();\r\n\t\t});\r\n\r\n\t\tif (this.$items.first().hasClass('m-slider-gallery__video-item')) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar interval = setInterval(function () {\r\n\t\t\t\tme.handleSizeAndPosition();\r\n\t\t\t\tif (me.$list.height() > 140) {\r\n\t\t\t\t\tclearInterval(interval)\r\n\t\t\t\t}\r\n\t\t\t}, 1000);\r\n\t\t}\r\n\r\n\t\t$(document).ready(function () {\r\n\t\t\t$(\".m-slider-gallery__tease-headline__descriptiontext\").each(function (i) {\r\n\t\t\t\tvar len = $(this).text().trim().length;\r\n\t\t\t\tif (len > 60) {\r\n\t\t\t\t\t$(this).text($(this).text().substr(0, 60));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tthis.handleVideoImageLoading();\r\n\t\tthis.handleSizeAndPosition();\r\n\t\tthis.handleCampaignTeaserClick();\r\n\t\tthis.initNavigationArrows();\r\n\t\tthis.setActiveDot(0);\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\taddDataItemAttribute() {\r\n\t\tthis.$ctx.find('li.js-m-slider-gallery__item').each((index: number, elem: HTMLElement) => {\r\n\t\t\t$(elem).attr('data-item', index);\r\n\t\t});\r\n\t}\r\n\r\n\tinitVars() {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$arrowLeft = $(`.${classes.arrowLeft}`, this.$ctx);\r\n\t\tthis.$arrowRight = $(`.${classes.arrowRight}`, this.$ctx);\r\n\t\tthis.$scroller = $(`.${classes.scroller}`, this.$ctx);\r\n\t\tthis.$items = $(`.${classes.item}`, this.$ctx);\r\n\t\tthis.$imagesAndVideos = $('img, video', this.$ctx);\r\n\t\tthis.$list = $(`.${classes.list}`, this.$ctx);\r\n\t\tthis.$links = $(`.${classes.link}`, this.$ctx);\r\n\t\tthis.$dotContainers = $(`.${classes.dot}`, this.$ctx);\r\n\t\tthis.$dots = $(`.${classes.dotButton}`, this.$ctx);\r\n\t\tthis.$sliderPages = $(`.${classes.sliderPages}`, this.$ctx);\r\n\t\tthis.$sliderNavigation = $(`.${classes.sliderNavigation}`, this.$ctx);\r\n\t\tthis.$campaignTeaserArea = $(`.${classes.campaignTeaserArea}`, this.$ctx);\r\n\t\tthis.itemsPerPage = this.getItemsPerPageConfig();\r\n\t\tthis.numberOfItemsPerPageBeforeViewportChanged = this.getNumberOfItemsPerPage();\r\n\t\tthis.itemMargin = 16;\r\n\t\tif (this.$ctx.hasClass('m-slider-gallery--campaign')) {\r\n\t\t\tthis.itemMargin = 20;\r\n\t\t}\r\n\t\tthis.activeItemBeforeViewportChanged = 0;\r\n\t\tthis.isMobileSlider = false;\r\n\t\tthis.sliderIsScrolling = false;\r\n\t\tthis.sliderPageIndex = 0;\r\n\t\tthis._showDotsSlider = this.$sliderNavigation.data('show-number');\r\n\t}\r\n\r\n\tgetItemsPerPageConfig() {\r\n\t\tconst defaultItemsPerPage = [1, 1, 1, 1];\r\n\t\tconst itemsPerPageData = this.$ctx.data('items-per-page');\r\n\t\tconst itemsPerPage = defaultItemsPerPage;\r\n\r\n\t\tif (itemsPerPageData instanceof Array) {\r\n\t\t\titemsPerPage.splice(0, itemsPerPageData.length, ...itemsPerPageData);\r\n\t\t} else if (Number.isInteger(itemsPerPageData)) {\r\n\t\t\titemsPerPage.fill(itemsPerPageData);\r\n\t\t}\r\n\r\n\t\treturn itemsPerPage;\r\n\t}\r\n\r\n\thandleVideoImageLoading() {\r\n\t\t// before being loaded completely the responsive image height is unknown so we wait for it to be loaded\r\n\t\tif (this.$imagesAndVideos.length > 0) {\r\n\t\t\tconst mediaelements = [] as Array>;\r\n\t\t\tthis.$imagesAndVideos.slice(0, this.getNumberOfItemsPerPage()).each((i: number, el: HTMLElement) => {\r\n\t\t\t\tmediaelements.push(\r\n\t\t\t\t\tnew Promise((resolve: any) => {\r\n\t\t\t\t\t\tconst $el = $(el);\r\n\t\t\t\t\t\t$el.on('load.SliderGalleryImages error.SliderGalleryImages', () => {\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t})\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t\t\tPromise.all(mediaelements).then(() => {\r\n\t\t\t\tthis.sliderGalleryScroller.refresh();\r\n\t\t\t\tthis.goToPageX(Math.floor(this.activeItemBeforeViewportChanged / this.getNumberOfItemsPerPage()));\r\n\t\t\t\tthis.handleSizeAndPosition();\r\n\r\n\t\t\t\t// timeout to get initial dimensions without transition\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.$ctx.addClass(classes.isInitialized);\r\n\t\t\t\t}, 500);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.$ctx.addClass(classes.isInitialized);\r\n\t\t}\r\n\t}\r\n\r\n\tinitNavigationArrows() {\r\n\t\t// bind event on the left arrow to go to active page minus 1 (to left)\r\n\t\tthis.$arrowLeft.on('click.SliderGalleryGotoLeft', (e: Event) => this.evtClickSkipBackOrForth(e, -1));\r\n\r\n\t\t// bind event on the right arrow to go to active page plus 1 (to right)\r\n\t\tthis.$arrowRight.on('click.SliderGalleryGotoRight', (e: Event) => this.evtClickSkipBackOrForth(e, 1));\r\n\t}\r\n\r\n\thandleSizeAndPosition() {\r\n\t\tthis.setFixedPageWidthAndArrowPosition();\r\n\t\tthis.setScrollerHeightAccordingToPageHeight();\r\n\t}\r\n\r\n\thandleCampaignTeaserClick() {\r\n\t\tthis.$campaignTeaserArea.on('click', this.openModalAndCopyText.bind(this));\r\n\t}\r\n\r\n\topenModalAndCopyText(e: any) {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tconst theme = this.$ctx.data('theme');\r\n\r\n\t\tif (viewport === 'small') {\r\n\t\t\t$(e.currentTarget)\r\n\t\t\t\t.clone()\r\n\t\t\t\t.appendTo($('.m-modal-overlay'));\r\n\t\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t\t\t$('.m-modal-overlay').addClass(theme);\r\n\t\t\t$(window).trigger('modalWindow:open');\r\n\t\t}\r\n\t}\r\n\r\n\t/* \twe set the page width fixed in px cause % is not working in horizontal iScroll\r\n\t\ton top there is some arrow positioning magic, centered to the height of the\r\n\t\tcontent of a page or it's image/video part if available\r\n\t */\r\n\tsetFixedPageWidthAndArrowPosition() {\r\n\t\tconst numberOfItems = this.getNumberOfItemsPerPage();\r\n\t\tconst totalMarginWidth = this.itemMargin * (numberOfItems - 1);\r\n\t\tconst itemWidth = (this.$scroller.outerWidth() - totalMarginWidth) / numberOfItems;\r\n\r\n\t\tthis.$items.css('width', `${itemWidth}px`);\r\n\t\tthis.sliderGalleryScroller.refresh();\r\n\r\n\t\tconst biggestItem = this.getBiggestItemAndHeightOfPage(0).item;\r\n\t\tconst $imgVideoEl = $('img, video', biggestItem);\r\n\t\tconst isFullPageSizeMedium = Math.floor($imgVideoEl.outerWidth()) >= Math.floor(itemWidth);\r\n\t}\r\n\r\n\tsetScrollerHeightAccordingToPageHeight() {\r\n\t\tconst biggestItemHeight = this.getBiggestItemAndHeightOfPage(this.sliderGalleryScroller.currentPage.pageX)\r\n\t\t\t.height;\r\n\t\tthis.$list.css('height', `${biggestItemHeight}px`);\r\n\t}\r\n\r\n\tgetBiggestItemAndHeightOfPage(page: number) {\r\n\t\tconst itemsPerPage = Math.min(this.$items.length, this.getNumberOfItemsPerPage());\r\n\t\tconst itemToStartWith = page * itemsPerPage;\r\n\r\n\t\tlet biggestItemHeight = 0;\r\n\t\tlet biggestItem = this.$items.eq(itemToStartWith);\r\n\r\n\t\tfor (let i = itemToStartWith; i < itemToStartWith + itemsPerPage; i++) {\r\n\t\t\tif (biggestItemHeight < this.$items[i].offsetHeight) {\r\n\t\t\t\tbiggestItemHeight = this.$items[i].offsetHeight;\r\n\t\t\t\tbiggestItem = this.$items.eq(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\theight: biggestItemHeight,\r\n\t\t\titem: biggestItem,\r\n\t\t};\r\n\t}\r\n\r\n\tsetArrowPosition(arrowTopPosition: number) {\r\n\t\tthis.$arrowLeft.css('top', `${arrowTopPosition}px`);\r\n\t\tthis.$arrowRight.css('top', `${arrowTopPosition}px`);\r\n\t}\r\n\r\n\tsetActiveDot(pageNumber: number) {\r\n\t\tif (!this.isMobileSlider) {\r\n\t\t\tthis.$dots\r\n\t\t\t\t.removeClass(classes.activeDot)\r\n\t\t\t\t.eq(pageNumber)\r\n\t\t\t\t.addClass(classes.activeDot);\r\n\t\t}\r\n\r\n\t\tthis.$sliderPages.text(formatLabel(this.$sliderNavigation.data('pages'), pageNumber + 1, this.$items.length))\r\n\r\n\t\tthis.$arrowLeft.toggleClass(classes.showArrow, this.sliderGalleryScroller.currentPage.pageX > 0);\r\n\t\tthis.$arrowRight.toggleClass(\r\n\t\t\tclasses.showArrow,\r\n\t\t\tthis.sliderGalleryScroller.currentPage.pageX < this.sliderGalleryScroller.pages.length - 1\r\n\t\t);\r\n\r\n\t\tthis.setScrollerHeightAccordingToPageHeight();\r\n\t\tthis.activeItemBeforeViewportChanged = pageNumber * this.getNumberOfItemsPerPage();\r\n\t\tthis.sliderPageIndex = pageNumber;\r\n\t}\r\n\r\n\treinitScrollerWhenViewportChangedToOrFromSmall() {\r\n\t\tconst numberOfItemsPerPage = this.getNumberOfItemsPerPage();\r\n\r\n\t\tif (numberOfItemsPerPage !== this.numberOfItemsPerPageBeforeViewportChanged) {\r\n\t\t\tthis.initScroller();\r\n\t\t\tthis.numberOfItemsPerPageBeforeViewportChanged = numberOfItemsPerPage;\r\n\t\t}\r\n\t}\r\n\r\n\t// the following function holds all logic for having different amount of items on viewports/cases. default is 1\r\n\tgetNumberOfItemsPerPage() {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\r\n\t\tswitch (viewport) {\r\n\t\t\tcase 'extra-large':\r\n\t\t\t\treturn this.itemsPerPage[3];\r\n\t\t\tcase 'large':\r\n\t\t\t\treturn this.itemsPerPage[2];\r\n\t\t\tcase 'medium':\r\n\t\t\t\treturn this.itemsPerPage[1];\r\n\t\t\tdefault:\r\n\t\t\t\treturn this.itemsPerPage[0];\r\n\t\t}\r\n\t}\r\n\r\n\t// inits scroller and it's pages\r\n\tinitScroller() {\r\n\t\tconst numberOfItemsPerPage = this.getNumberOfItemsPerPage();\r\n\r\n\t\tthis.initPageDots(numberOfItemsPerPage);\r\n\r\n\t\tthis.newIscroll(numberOfItemsPerPage);\r\n\r\n\t\tthis.initScrollerEvents();\r\n\r\n\t\tthis.initItemLinkBehaviour();\r\n\r\n\t\t// set initial active dot\r\n\t\tconst startSlide = Math.floor(this.activeItemBeforeViewportChanged / numberOfItemsPerPage);\r\n\t\tthis.goToPageX(startSlide);\r\n\t\tthis.trackSlide(startSlide);\r\n\t}\r\n\r\n\tinitPageDots(numberOfItemsPerPage: number) {\r\n\t\tthis.showOrHideDots(numberOfItemsPerPage);\r\n\r\n\t\t// bind event on the dots to click through all pages\r\n\t\tthis.$dots.each((index: number, elem: HTMLElement) => {\r\n\t\t\t$(elem).on('click.SliderGalleryDotGotoPage', (e: Event) => this.evtClickDot(e, index));\r\n\t\t\t$(elem).attr('data-item', index);\r\n\t\t});\r\n\t}\r\n\r\n\tshowOrHideDots(numberOfItemsPerPage: number) {\r\n\t\tthis.$dotContainers.show();\r\n\r\n\t\tif (numberOfItemsPerPage > 1) {\r\n\t\t\tthis.$dotContainers.not(`:nth-child(${numberOfItemsPerPage}n + 1)`).hide();\r\n\r\n\t\t\tconst visibleDotContainers = $(`.${classes.dot}:nth-child(${numberOfItemsPerPage}n + 1)`, this.$ctx);\r\n\t\t\tthis.$dots = $(`.${classes.dotButton}`, visibleDotContainers);\r\n\t\t} else {\r\n\t\t\tthis.$dots = $(`.${classes.dotButton}`, this.$ctx);\r\n\t\t}\r\n\r\n\t\t// dont show dots if only one page/dot available\r\n\t\tif (this.$dots.length > 1) {\r\n\t\t\tthis.$sliderNavigation.css('display', 'flex');\r\n\t\t} else {\r\n\t\t\tthis.$sliderNavigation.hide();\r\n\t\t}\r\n\t}\r\n\r\n\tnewIscroll(numberOfItemsPerPage: number) {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small') {\r\n\t\t\tthis.sliderGalleryScroller = new IScroll($(`.${classes.scroller}`, this.$ctx)[0], {\r\n\t\t\t\tsnap: true,\r\n\t\t\t\tmomentum: false,\r\n\t\t\t\tscrollX: false, // Enable horizontal scrolling\r\n\t\t\t\tscrollY: false,\r\n\t\t\t});\r\n\t\t\tthis.initMobileSlider();\r\n\t\t\tthis.isMobileSlider = true;\r\n\t\t} else {\r\n\t\t\tthis.sliderGalleryScroller = new IScroll($(`.${classes.scroller}`, this.$ctx)[0], {\r\n\t\t\t\tmouseWheel: false,\r\n\t\t\t\tscrollbars: false,\r\n\t\t\t\tscrollX: true,\r\n\t\t\t\tscrollY: false,\r\n\t\t\t\tsnap: numberOfItemsPerPage > 1 ? `li:nth-child(${numberOfItemsPerPage}n + 1)` : 'li',\r\n\t\t\t\ttap: true,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tinitMobileSlider() {\r\n\t\tconst $elements = this.$ctx.find('li.js-m-slider-gallery__item');\r\n\t\tconst dotItems = this.$ctx.find('.js-m-slider-gallery__dot-button');\r\n\t\tlet slideItemIndex = 0;\r\n\t\tlet currentIndex = 0;\r\n\t\tlet startX: any;\r\n\t\tlet startY: any;\r\n\t\tlet sdeltaX: any;\r\n\t\tlet sdeltaY: any;\r\n\t\tlet isMove = false;\r\n\t\tlet indexItem: number;\r\n\r\n\t\t$elements.each((index: number, elem: HTMLElement) => {\r\n\t\t\t$(elem).on('touchstart', (e: any) => {\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tstartX = e.originalEvent.touches[0].clientX;\r\n\t\t\t\tstartY = e.originalEvent.touches[0].clientY;\r\n\t\t\t\tisMove = false;\r\n\t\t\t});\r\n\t\t\t$(elem).on('touchmove', (e: any) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tisMove = true;\r\n\t\t\t});\r\n\t\t\t$(elem).on('touchend', (e: any) => {\r\n\t\t\t\tlet newItemIndex: number = 0;\r\n\t\t\t\tconst items = this.$items.length;\r\n\t\t\t\tlet getSlideIndex = parseInt(e.currentTarget.dataset.item);\r\n\r\n\t\t\t\tsdeltaX = Math.ceil(e.originalEvent.changedTouches[0].clientX - startX);\r\n\t\t\t\tsdeltaY = Math.ceil(e.originalEvent.changedTouches[0].clientY - startY);\r\n\t\t\t\tnewItemIndex = sdeltaX < 0 ? index + 1 : indexItem === 0 ? items - 1 : indexItem - 1;\r\n\r\n\t\t\t\tif (isMove) {\r\n\t\t\t\t\tlet endX = e.originalEvent.changedTouches[0].clientX;\r\n\t\t\t\t\tlet endY = e.originalEvent.changedTouches[0].clientY;\r\n\r\n\t\t\t\t\tlet deltaX = endX - startX;\r\n\t\t\t\t\tlet deltaY = endY - startY;\r\n\r\n\t\t\t\t\tif (Math.abs(deltaX) > Math.abs(deltaY)) {\r\n\t\t\t\t\t\t// Horizontal swipe\r\n\t\t\t\t\t\tif (deltaX > 0) {\r\n\t\t\t\t\t\t\t// Swipe right\r\n\t\t\t\t\t\t\tcurrentIndex = (getSlideIndex - 1 + items) % items;\r\n\t\t\t\t\t\t\tthis.setActiveSlide(currentIndex);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Swipe left\r\n\t\t\t\t\t\t\tcurrentIndex = (getSlideIndex + 1) % items;\r\n\t\t\t\t\t\t\tthis.setActiveSlide(currentIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t// bind event on the dots to click through all pages\r\n\t\tthis.$dots.each((index: number, elem: HTMLElement) => {\r\n\t\t\t$(elem).on('click.SliderGalleryDotGotoSlide', (e: Event) => this.setActiveSlide(index));\r\n\t\t});\r\n\t\t//this.$dotContainers.hide();\r\n\r\n\t\tthis.setActiveSlide(slideItemIndex);\r\n\t}\r\n\r\n\t// Set active Slide item\r\n\tsetActiveSlide(el: any) {\r\n\t\tthis.$items\r\n\t\t\t.addClass('inactive')\r\n\t\t\t.removeClass('active')\r\n\t\t\t.eq(el)\r\n\t\t\t.removeClass('inactive')\r\n\t\t\t.addClass('active');\r\n\t\tthis.$dots\r\n\t\t\t.removeClass(classes.activeDot)\r\n\t\t\t.eq(el)\r\n\t\t\t.addClass(classes.activeDot);\r\n\t}\r\n\r\n\t//this.$dotContainers.hide();\r\n\r\n\r\n\r\n\tinitScrollerEvents() {\r\n\t\tthis.sliderGalleryScroller.on('scrollStart', () => {\r\n\t\t\tthis.sliderIsScrolling = true;\r\n\t\t});\r\n\r\n\t\tthis.sliderGalleryScroller.on('scrollEnd', () => {\r\n\t\t\tconst activePage = this.sliderGalleryScroller.currentPage.pageX;\r\n\t\t\tthis.setActiveDot(activePage);\r\n\t\t\tthis.sliderIsScrolling = false;\r\n\t\t\tthis.trackSlide(activePage);\r\n\t\t});\r\n\t}\r\n\r\n\tinitItemLinkBehaviour() {\r\n\t\t// bind event on the links to prevent default while scrolling\r\n\t\tthis.$links.on('click.SliderGalleryClickLink', (ev: Event) => {\r\n\t\t\tif (this.sliderIsScrolling) {\r\n\t\t\t\tev.stopPropagation();\r\n\t\t\t\tev.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tgoToPageX(pageNumber: number) {\r\n\t\tthis.sliderGalleryScroller.goToPage(pageNumber, 0, 1000);\r\n\t\tthis.setActiveDot(pageNumber);\r\n\t\tthis.sliderPageIndex = pageNumber;\r\n\t}\r\n\r\n\t/**\r\n\t * Click Event for Dots in Slider-Gallery\r\n\t * @param {event} e event\r\n\t * @param {number} index index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tevtClickDot(e: any, index: number) {\r\n\t\tconst currentPage = this.sliderGalleryScroller.currentPage.pageX;\r\n\t\t// eslint-disable-next-line newline-per-chained-call\r\n\t\tconst $target = $(e.currentTarget)\r\n\t\t\t.parent()\r\n\t\t\t.parent()\r\n\t\t\t.prev();\r\n\t\tconst $videosContainer = $target.parent().find(`.${classes.videosContainer}`);\r\n\r\n\t\tthis.stopVideoInCurrentSlider($videosContainer, index, currentPage);\r\n\t\tthis.goToPageX(index);\r\n\t}\r\n\r\n\t/**\r\n\t * Click Event for Skip Back/Next slider in Slider-Gallery\r\n\t * @param {event} e event\r\n\t * @param {number} sliderIdxOffset Positive integer value will increase and negative will decrease the slider page\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tevtClickSkipBackOrForth(e: Event, sliderIdxOffset: number) {\r\n\t\tconst nextPage = this.sliderGalleryScroller.currentPage.pageX + sliderIdxOffset;\r\n\t\tconst $target = $(e.currentTarget)\r\n\t\t\t.parent()\r\n\t\t\t.find(`.${classes.videosContainer}`);\r\n\r\n\t\tthis.stopVideoInCurrentSlider($target, nextPage, this.sliderGalleryScroller.currentPage.pageX);\r\n\t\tthis.goToPageX(nextPage);\r\n\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t}\r\n\r\n\t/**\r\n\t * Stop Video In Current Slider\r\n\t * @param {Object} $videosContainer video container\r\n\t * @param {number} currentPage current page index\r\n\t * @param {number} prevSlide previous page index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tstopVideoInCurrentSlider($videosContainer: any, currentPage: number, prevSlide: number) {\r\n\t\tconst $listItems: any = $videosContainer.find(`.${classes.videosContainerListItem}`);\r\n\t\tconst $videoElement: any = $($listItems[prevSlide]).find(`.${classes.videoElement}`);\r\n\t\tconst videoElementId: any = $videoElement.attr(videoCfg.targetId);\r\n\t\t// eslint-disable-next-line prefer-template\r\n\t\tconst newVideoAttribute: string = videoElementId + '__active';\r\n\r\n\t\t// If undefined otherwise will throw an error, when there was image instead a video in slide where to stop a video\r\n\t\tconst hasAttr: boolean = $videoElement.attr(videoCfg.targetId) !== undefined;\r\n\r\n\t\tif (hasAttr) {\r\n\t\t\t$videoElement.attr('id', newVideoAttribute);\r\n\t\t\tthis.callVideoAPIMethod($videoElement.attr('id'));\r\n\t\t\t$videoElement.removeAttr('id');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Call Video API Methods\r\n\t *\r\n\t * \t\tPossible values for Transport Controls:\r\n\t *\r\n\t * \tplay\r\n\t * \tpause\r\n\t * \tstop\r\n\t * \tforward\r\n\t * \trewind\r\n\t * \tsetVolume\r\n\t * \ttoggleMute\r\n\t * \tgetCurrentTime\r\n\t * \tgetDuration\r\n\t * \tgetBufferedTime\r\n\t * \tswitchVideo\r\n\t *\r\n\t * \t\tActually makes window.VideoPlayer.Collection.getPlayerById('someId').pause(); or something else you define\r\n\t * \t\tDon't forget the dependency to the embed script of movingimages.com from http//e.video-cdn.net/v2/embed.js\r\n\t * \t\tOtherwise will not be reachable in the code and JS errors will occur\r\n\t * \t\tor the videos will not be loaded.\r\n\t *\r\n\t * @param {string} id id container for video player to be stopped or paused\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tcallVideoAPIMethod(id: string) {\r\n\t\t// eslint-disable-next-line dot-notation\r\n\t\t(window as any)['VideoPlayer'].Collection.getPlayerById(id)[videoCfg.typeOnStopWhenSkippingSlide]();\r\n\t}\r\n\r\n\ttrackSlide(pageNumber: number) {\r\n\t\tif (this.$items[pageNumber]) {\r\n\t\t\tconst activeItem = this.$items[pageNumber];\r\n\t\t\tconst title = activeItem.getAttribute('data-title');\r\n\t\t\tthis.track(title, pageNumber);\r\n\t\t}\r\n\t}\r\n\r\n\ttrack(name: string, position: number) {\r\n\t\tconst dataLayer = (window as any).dataLayer || [];\r\n\t\tlet list = '';\r\n\t\tif (dataLayer) {\r\n\t\t\tlist = dataLayer[0].campaignName || '';\r\n\t\t}\r\n\t\tconst trackdata: {\r\n\t\t\tevent: string;\r\n\t\t\tecommerce: {\r\n\t\t\t\tpromoView: {\r\n\t\t\t\t\tpromotions: Array<{\r\n\t\t\t\t\t\tname: string;\r\n\t\t\t\t\t\tposition: number;\r\n\t\t\t\t\t\tlist: string;\r\n\t\t\t\t\t}>;\r\n\t\t\t\t};\r\n\t\t\t};\r\n\t\t} = {\r\n\t\t\tevent: 'sliderImpression',\r\n\t\t\tecommerce: {\r\n\t\t\t\tpromoView: {\r\n\t\t\t\t\tpromotions: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tname: name,\r\n\t\t\t\t\t\t\tposition: position,\r\n\t\t\t\t\t\t\tlist: list,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t],\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t};\r\n\t\tTrack.gtmTrack(trackdata);\r\n\t}\r\n\r\n\t/**\r\n\t * Slider Page Index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tget sliderPageIndex(): number {\r\n\t\treturn this._sliderPageIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Slider Page Index\r\n\t * @param {number} value index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tset sliderPageIndex(value: number) {\r\n\t\tthis._sliderPageIndex = value;\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\nconst classes = {\r\n\tscroller: 'js-m-slider-stage__scroller',\r\n\tlist: 'js-m-slider-stage__list',\r\n\titem: 'js-m-slider-stage__item',\r\n\tfalseItem: 'false-item',\r\n\tactiveItem: 'state-m-slider-stage--item-is-active',\r\n\tactiveCaption: 'state-m-slider-stage--caption-is-active',\r\n\tcaptionWrapper: 'js-m-slider-stage__caption-wrapper',\r\n\tcaption: 'js-m-slider-stage__caption-item',\r\n\tdotButton: 'js-m-slider-stage__dot-button',\r\n\tdot: 'js-m-slider-stage__dot',\r\n\tactiveDot: 'state-m-slider-stage--dot-is-active',\r\n\tdotWrapper: 'js-m-slider-stage__dots-wrapper',\r\n\tdotArea: 'js-m-slider-stage__dots',\r\n\tshowArrow: 'state-m-slider-stage--arrow-is-shown',\r\n\tarrowLeft: 'js-m-slider-stage__arrow--left',\r\n\tarrowRight: 'js-m-slider-stage__arrow--right',\r\n\tlink: 'js-m-slider-stage__item-link',\r\n\tpages: \"js-m-slider-stage__pages\",\r\n\tcurrentPage: \"js-m-slider-stage__current-page\",\r\n\ttotalPage: \"js-m-slider-stage__total-page\",\r\n\tvideoElement: 'js-m-slider-stage__video',\r\n\tScrollDownLink: 'js-m-slider-stage__scroll-down-link',\r\n};\r\n\r\n@createModule('SliderStage')\r\n/**\r\n * Breadcrumb module implementation.\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class SliderStage extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$dot: JQuery;\r\n\t$dotButton: JQuery;\r\n\t$dotWrapper: JQuery;\r\n\t$dotArea: JQuery;\r\n\t$captionWrapper: JQuery;\r\n\t$caption: JQuery;\r\n\t$arrowLeft: JQuery;\r\n\t$arrowRight: JQuery;\r\n\t$scroller: JQuery;\r\n\t$items: JQuery;\r\n\t$list: JQuery;\r\n\t$links: JQuery;\r\n\t$pages: JQuery;\r\n\t$currentPage: JQuery;\r\n\t$totalPage: JQuery;\r\n\t$videoElement: JQuery;\r\n\t$ScrollDownLink: JQuery;\r\n\titemsPerPage: Array;\r\n\t_sliderPageIndex: number;\r\n\tsliderlength: number;\r\n\tdotIndex: number;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.initVars();\r\n\r\n\t\t$(window).on('resize', () => {\r\n\t\t\tthis.setScrollerHeight();\r\n\t\t});\r\n\r\n\t\tthis.initScroller();\r\n\t\tthis.initNavigationArrows();\r\n\t\tthis.setActiveDot(0);\r\n\t\tthis.goToDotX(0);\r\n\t\tthis.setScrollerHeight();\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.$captionWrapper.height(this.$caption.eq(0).innerHeight());\r\n\t\t}, 50);\r\n\r\n\t\tthis.scrollToAnchor();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitVars() {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$arrowLeft = $(`.${classes.arrowLeft}`, this.$ctx);\r\n\t\tthis.$arrowRight = $(`.${classes.arrowRight}`, this.$ctx);\r\n\t\tthis.$scroller = $(`.${classes.scroller}`, this.$ctx);\r\n\t\tthis.$items = $(`.${classes.item}`, this.$ctx);\r\n\t\tthis.$list = $(`.${classes.list}`, this.$ctx);\r\n\t\tthis.$links = $(`.${classes.link}`, this.$ctx);\r\n\t\tthis.$pages = $(`.${classes.pages}`, this.$ctx);\r\n\t\tthis.$currentPage = $(`.${classes.currentPage}`, this.$ctx);\r\n\t\tthis.$totalPage = $(`.${classes.totalPage}`, this.$ctx);\r\n\t\tthis.$videoElement = $(`.${classes.videoElement}`, this.$ctx);\r\n\t\tthis.$dot = $(`.${classes.dot}`, this.$ctx);\r\n\t\tthis.$dotButton = $(`.${classes.dotButton}`, this.$ctx);\r\n\t\tthis.$dotWrapper = $(`.${classes.dotWrapper}`, this.$ctx);\r\n\t\tthis.$dotArea = $(`.${classes.dotArea}`, this.$ctx);\r\n\t\tthis.$captionWrapper = $(`.${classes.captionWrapper}`, this.$ctx);\r\n\t\tthis.$caption = $(`.${classes.caption}`, this.$ctx);\r\n\t\tthis.$ScrollDownLink = $(`.${classes.ScrollDownLink}`, this.$ctx);\r\n\t\tthis.sliderPageIndex = 0;\r\n\t\tthis.dotIndex = 0;\r\n\t\tthis.sliderlength = this.$items.length;\r\n\t}\r\n\r\n\tinitNavigationArrows() {\r\n\t\t// bind event on the left arrow to go to active page minus 1 (to left)\r\n\t\tthis.$arrowLeft.on('click',\r\n\t\t\t(e: Event) => {\r\n\t\t\t\tthis.evtClickSkipBackOrForth(e, -1);\r\n\t\t\t});\r\n\r\n\t\t// bind event on the right arrow to go to active page plus 1 (to right)\r\n\t\tthis.$arrowRight.on('click', \r\n\t\t\t(e: Event) => {\r\n\t\t\t\tthis.evtClickSkipBackOrForth(e, 1);\r\n\t\t\t});\r\n\t}\r\n\r\n\tinitScroller() {\r\n\t\tthis.initPageDots(0);\r\n\r\n\t\tvar itemWidth = $(window).width();\r\n\t\tthis.$items.width(itemWidth);\r\n\t\tthis.$list.append(this.$items.first().clone().addClass(classes.falseItem).removeClass(classes.activeItem).width(itemWidth));\r\n\t\tthis.$list.prepend(this.$items.last().clone().addClass(classes.falseItem).width(itemWidth));\r\n\t\tthis.$list.css(\"left\", -itemWidth );\r\n\r\n\t\tthis.$totalPage.text(this.sliderlength);\r\n\t\tthis.$currentPage.text(1);\r\n\t\tif (this.sliderlength == 3) {\r\n\t\t\tthis.$pages.addClass(\"pages-pc-hide\")\r\n\t\t} else if (this.sliderlength == 2) {\r\n\t\t\tthis.$pages.addClass(\"pages-mobile-visible\")\r\n\t\t} else if(this.sliderlength < 2) {\r\n\t\t\tthis.$pages.hide();\r\n\t\t\tthis.$arrowLeft.parent().hide();\r\n\t\t\tthis.$dotWrapper.parent().hide();\r\n\t\t\tthis.$captionWrapper.addClass(\"alone\")\r\n\t\t}\r\n\t}\r\n\r\n\tinitPageDots(numberOfItemsPerPage: number) {\r\n\t\tthis.$dot.each((index: number, elem: HTMLElement) => {\r\n\t\t\t$(elem).on('click', (e: Event) => {\r\n\t\t\t\tthis.evtClickDot(e, index);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tsetScrollerHeight() {\r\n\t\tvar itemWidth = $(window).width();\r\n\t\tthis.$items.width(itemWidth);\r\n\t\t$(\".false-item\").width(itemWidth);\r\n\t\tthis.$list.css(\"left\", -( this.sliderPageIndex + 1 ) * itemWidth );\r\n\t\tthis.$captionWrapper.height(this.$caption.eq(this.sliderPageIndex).innerHeight());\r\n\t}\r\n\r\n\tsetActiveDot(pageNumber: number) {\r\n\t\tthis.$caption\r\n\t\t\t.removeClass(classes.activeCaption)\r\n\t\t\t.eq(pageNumber)\r\n\t\t\t.addClass(classes.activeCaption);\t\r\n\r\n\t\tthis.$videoElement.trigger('pause');\r\n\t\tthis.$items.eq(pageNumber).find(\"video\").trigger('play');\r\n\r\n\t\tthis.$captionWrapper.height(this.$caption.eq(pageNumber).innerHeight());\r\n\r\n\t\tthis.$currentPage.text(pageNumber + 1);\r\n\r\n\t\tthis.$dot\r\n\t\t.removeClass(classes.activeDot)\r\n\t\t.eq(pageNumber)\r\n\t\t.addClass(classes.activeDot);\r\n\r\n\t\tvar sliderlength = this.sliderlength;\r\n\t\tif(sliderlength < 3){\r\n\t\t\tthis.$dotArea.addClass(\"scroll-inactive\");\r\n\t\t} else if(sliderlength == 3){\r\n\t\t\tthis.$dotArea.addClass(\"scroll-tabet-active\");\r\n\t\t} else if(sliderlength > 3){\r\n\t\t\tthis.$dotArea.addClass(\"scroll-active\");\r\n\t\t};\r\n\r\n\t\tthis.sliderPageIndex = pageNumber;\r\n\t}\r\n\r\n\tgoToPageX(pageNumber: number) {\r\n\t\tvar itemPerWidth = 0 - $(window).width();\r\n\t\tvar me=this;\r\n\t\tthis.$list.animate({\r\n\t\t\t\"left\": ( pageNumber + 1 ) * itemPerWidth\r\n\t\t}, 500, () => {\r\n\t\t\tif (pageNumber < 0) {\r\n\t\t\t\tpageNumber = this.sliderlength - 1;\r\n\t\t\t\tthis.$list.css(\"left\", this.sliderlength * itemPerWidth );\r\n\t\t\t} else if (pageNumber == this.sliderlength) {\r\n\t\t\t\tpageNumber = 0;\r\n\t\t\t\tthis.$list.css('left', itemPerWidth);\r\n\t\t\t}\r\n\t\t\tme.setActiveDot(pageNumber);\r\n\t\t\tme.sliderPageIndex = pageNumber;\r\n\t\t});\r\n\t}\r\n\r\n\tgoToDotX(nextIndex: number) {\r\n\t\tvar sliderlength = this.sliderlength;\r\n\t\tthis.dotIndex = nextIndex;\r\n\t\tif(sliderlength > 2){\r\n\t\t\tvar oneDot = nextIndex;\r\n\t\t\tvar zeroDot = nextIndex-1;\r\n\t\t\tvar twoDot = nextIndex + 1;\r\n\t\t\tvar threeDot = nextIndex + 2;\r\n\t\t\tvar fourDot = nextIndex + 3;\r\n\r\n\t\t\tif (twoDot == sliderlength) {\r\n\t\t\t\ttwoDot = 0;\r\n\t\t\t\tthreeDot = 1;\r\n\t\t\t\tfourDot = 2;\r\n\t\t\t} else if (threeDot == sliderlength) {\r\n\t\t\t\tthreeDot = 0;\r\n\t\t\t\tfourDot = 1;\r\n\t\t\t} else if (fourDot == sliderlength) {\r\n\t\t\t\tfourDot = 0;\r\n\t\t\t}\r\n\t\t\tthis.$dot.removeClass(\"pc-prev-zero pc-next-one pc-next-two pc-next-three pc-next-four\");\r\n\t\t\tthis.$dot.eq(zeroDot).addClass(\"pc-prev-zero\");\r\n\t\t\tthis.$dot.eq(oneDot).addClass(\"pc-next-one\");\r\n\t\t\tthis.$dot.eq(twoDot).addClass(\"pc-next-two\");\r\n\t\t\tthis.$dot.eq(threeDot).addClass(\"pc-next-three\");\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.$dot.eq(fourDot).addClass(\"pc-next-four\");\r\n\t\t\t}, 300);\r\n\t\t};\r\n\t\t\r\n\t}\r\n\t/**\r\n\t * Click Event for Dots in Slider-Gallery\r\n\t * @param {event} e event\r\n\t * @param {number} index index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tevtClickDot(e: any, index: number) {\r\n\t\tthis.goToPageX(index);\r\n\t}\r\n\r\n\t/**\r\n\t * Click Event for Skip Back/Next slider in Slider-Gallery\r\n\t * @param {event} e event\r\n\t * @param {number} sliderIdxOffset Positive integer value will increase and negative will decrease the slider page\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tevtClickSkipBackOrForth(e: Event, sliderIdxOffset: number) {\r\n\t\tif (sliderIdxOffset<0) {\r\n\t\t\tthis.$dotArea.addClass('scroll-left');\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif (this.dotIndex == 0) {\r\n\t\t\t\t\tconst nextIndex = this.sliderlength-1;\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthis.goToDotX(nextIndex);\r\n\t\t\t\t\t}, 50);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst nextIndex = this.dotIndex + sliderIdxOffset;\r\n\t\t\t\t\tthis.goToDotX(nextIndex);\r\n\t\t\t\t}\r\n\t\t\t}, 50);\r\n\t\t} else {\r\n\t\t\tthis.$dotArea.removeClass('scroll-left');\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif (this.dotIndex == this.sliderlength-1) {\r\n\t\t\t\t\tconst nextIndex = 0;\r\n\t\t\t\t\tthis.goToDotX(nextIndex);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst nextIndex = this.dotIndex + sliderIdxOffset;\r\n\t\t\t\t\tthis.goToDotX(nextIndex);\r\n\t\t\t\t}\r\n\t\t\t}, 50);\r\n\t\t}\r\n\t\tconst nextPage = this.sliderPageIndex + sliderIdxOffset;\r\n\t\tthis.goToPageX(nextPage);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Slider Page Index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tget sliderPageIndex(): number {\r\n\t\treturn this._sliderPageIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Slider Page Index\r\n\t * @param {number} value index\r\n\t * @returns {void} return nothing\r\n\t */\r\n\tset sliderPageIndex(value: number) {\r\n\t\tthis._sliderPageIndex = value;\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll to top of the document\r\n\t * @returns {void}\r\n\t */\r\n\t\r\n\tscrollToAnchor() {\r\n\t\tvar scrollAnchor = this.$ScrollDownLink.attr(\"href\");\r\n\t\tthis.$ScrollDownLink.on('click', () => {\r\n\t\t\tif (typeof(this.$ScrollDownLink.attr(\"href\"))==\"undefined\") {\r\n\t\t\t\tscrollToElement(this.$ScrollDownLink, false, -20, undefined, true);\r\n\t\t\t} else {\r\n\t\t\t\tscrollToElement($(scrollAnchor), false, 0, undefined, true);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * back-to-top button should contain the 'a-button--anchor' css class that comes from the button modifier 'top'\r\n\t * to separate its click event\r\n\t * @returns {boolean} boolean\r\n\t */\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { addScrollClickTrigger, init as initHashScrolling } from '@project/shared/utils/hashscrolling/js/hashscrolling';\r\n\r\nconst classes: any = {\r\n\tbutton: 'js-m-stage-brand__button'\r\n};\r\n\r\n@createModule('StageBrand')\r\n/**\r\n * Stage Brand module implementation.\r\n */\r\nexport class StageBrand extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tif(this.$ctx.find(`.${classes.button}`).length > 0) {\r\n\t\t\tthis.handleCtaButtonClick();\r\n\t\t}\r\n\t\t\r\n\t\tresolve();\r\n\t}\r\n\r\n\tprivate handleCtaButtonClick(): void {\r\n\t\tconst button = this.$ctx.find(`.${classes.button}`);\r\n\t\tconst url = button.attr('href');\r\n\t\tconst idx = url.indexOf('#');\r\n\r\n\t\tif (idx === 0) {\r\n\t\t\tinitHashScrolling();\r\n\t\t\taddScrollClickTrigger(button);\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate applyScrollToHandler(button: JQuery): void {\r\n\t\tinitHashScrolling();\r\n\t\taddScrollClickTrigger(button);\r\n\t}\r\n\r\n\tstop() {\r\n\t\t// Stop\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as $ from 'jquery';\r\n\r\n@createModule('StageKeyvisual')\r\n/**\r\n * stage-keyvisual module implementation.\r\n *\r\n */\r\nexport class StageKeyvisual extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$inputElement: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$inputElement = this.$ctx.find('.js-m-stage-keyvisual__search-input');\r\n\t\tthis.$inputElement.on('keyup', this._handleInputChange.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\r\n\t_handleInputChange(event: any) {\r\n\t\tlet inputString = this.$inputElement.val() as string;\r\n\t\tlet $searchLink = $(this.$ctx).find('.js-m-stage-keyvisual__search-btn');\r\n\t\tlet newLinkUrl = $searchLink.data('baseurl') + inputString;\r\n\t\t\r\n\t\tif (event.keyCode == 13) {\r\n\t\t\twindow.location.href = newLinkUrl;\r\n\t\t}\r\n\r\n\t\t$searchLink.attr('href', newLinkUrl);\r\n\t}\r\n\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { addScrollClickTrigger, init as initHashScrolling } from '@project/shared/utils/hashscrolling/js/hashscrolling';\r\n\r\nconst classes: any = {\r\n\tbutton: 'js-m-stage-product__button'\r\n};\r\n\r\n@createModule('StageProduct')\r\n/**\r\n * Stage Product module implementation.\r\n */\r\nexport class StageProduct extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tinitHashScrolling();\r\n\t\taddScrollClickTrigger($(this._ctx).find(`.${classes.button}`));\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {\r\n\t\t// Stop\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { addScrollClickTrigger, init as initHashScrolling } from '@project/shared/utils/hashscrolling/js/hashscrolling';\r\n\r\nconst classes = {\r\n\tbutton: 'js-m-stage-content__button'\r\n};\r\n\r\n@createModule('StageContent')\r\n/**\r\n * Stage Content module implementation.\r\n */\r\nexport class StageContent extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tif(this.$ctx.find(`.${classes.button}`).length > 0) {\r\n\t\t\tthis.handleCtaButtonClick();\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tprivate handleCtaButtonClick(): void {\r\n\t\tconst button = this.$ctx.find(`.${classes.button}`);\r\n\t\tconst url = button.attr('href');\r\n\t\tconst idx = url.indexOf('#');\r\n\r\n\t\tif (idx === -1) {\r\n\t\t\t// The link does not contain a hash.\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst target = $(url.substring(idx));\r\n\t\tif (target.length === 1) {\r\n\t\t\tthis.applyScrollToHandler(button);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate applyScrollToHandler(button: JQuery): void {\r\n\t\tinitHashScrolling();\r\n\t\taddScrollClickTrigger(button);\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { addScrollClickTrigger, init as initHashScrolling } from '@project/shared/utils/hashscrolling/js/hashscrolling';\r\n\r\nconst classes: any = {\r\n\tbutton: 'js-m-stage-compact__button'\r\n};\r\n\r\n@createModule('StageCompact')\r\n/**\r\n * Stage Compact module implementation.\r\n */\r\nexport class StageCompact extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tif(this.$ctx.find(`.${classes.button}`).length > 0) {\r\n\t\t\tthis.handleCtaButtonClick();\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tprivate handleCtaButtonClick(): void {\r\n\t\tconst button = this.$ctx.find(`.${classes.button}`);\r\n\t\tconst url = button.attr('href');\r\n\t\tconst idx = url.indexOf('#');\r\n\r\n\t\tif (idx === -1) {\r\n\t\t\t// The link does not contain a hash.\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst target = $(url.substring(idx));\r\n\t\tif (target.length === 1) {\r\n\t\t\tthis.applyScrollToHandler(button);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate applyScrollToHandler(button: JQuery): void {\r\n\t\tinitHashScrolling();\r\n\t\taddScrollClickTrigger(button);\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\n@createModule('StageCampaign')\r\n/**\r\n * table-filter module implementation.\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class StageCampaign extends TerrificSpec {\r\n\tticking: boolean = false;\r\n\tscrollArea: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tthis.scrollArea = $('.js-m-stage-campaign__parallax', $ctx);\r\n\t\tthis.ticking = false;\r\n\r\n\t\twindow.addEventListener('scroll', this.requestScrollTick.bind(this), false);\r\n\t\twindow.addEventListener('resize', this.onResize.bind(this), false);\r\n\r\n\t\tthis.requestScrollTick();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * Debounces animation with browser's requestAnimation Frame to provide performance and\r\n\t * keep page smoothly scrollable even on older machines\r\n\t */\r\n\trequestScrollTick() {\r\n\t\tif (!this.ticking) {\r\n\t\t\trequestAnimationFrame(this.scrollUpdate.bind(this));\r\n\t\t\tthis.ticking = true;\r\n\t\t}\r\n\t}\r\n\r\n\tonResize() {\r\n\t\tthis.requestScrollTick();\r\n\t}\r\n\r\n\tscrollUpdate() {\r\n\t\tconst bgPosition = $(window).scrollTop() * 0.5;\r\n\r\n\t\tthis.scrollArea.css({\r\n\t\t\ttransform: 'translate3d(0, ' + bgPosition + 'px, 0)',\r\n\t\t});\r\n\r\n\t\tthis.ticking = false;\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tcountdown: \"js-m-stage-event__countdown-time\",\r\n\tactiveDays: \"state-m-stage-event__show-days\",\r\n\tshareBtn: \"js-m-stage-event__share-btn\",\r\n\tactiveShare: 'state-m-stage-event__share-container--open',\r\n\tregisterBtn: 'js-m-stage-event__register',\r\n\tregisterForm: 'js-m-stage-event__register-form',\r\n\tactiveRegisterBtn: 'state-m-stage-event__register--open',\r\n\tactiveRegisterForm: 'state-m-stage-event__register--open',\r\n};\r\n\r\n@createModule('StageEvent')\r\nexport class StageEvent extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.initCountdown();\r\n\t\tthis.initShare();\r\n\t\tthis.toggleRegisterForm();\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\tinitCountdown() {\r\n\t\tconst $countdown = this.$ctx.find(`.${classes.countdown}`);\r\n\t\tconst totalseconds = parseInt($countdown.data('second'));\r\n\t\tif (totalseconds > 86400) {\r\n\t\t\t$countdown.text(Math.floor(totalseconds / 24 / 3600));\r\n\t\t\t$countdown.addClass(classes.activeDays)\r\n\t\t} else {\r\n\t\t\tvar me = this;\r\n\t\t\tsetInterval(function () {\r\n\t\t\t\tme.calculator();\r\n\t\t\t}, 1000);\r\n\t\t}\r\n\t}\r\n\r\n\tcalculator() {\r\n\t\tconst $countdown = this.$ctx.find(`.${classes.countdown}`);\r\n\t\tconst totalseconds = parseInt($countdown.data('second'));\r\n\t\tconst nextseconds = totalseconds - 1;\r\n\t\tconst h = Math.floor(nextseconds / 3600) < 10 ? '0' + Math.floor(nextseconds / 3600) : Math.floor(nextseconds / 3600);\r\n\t\tconst m = Math.floor((nextseconds / 60 % 60)) < 10 ? '0' + Math.floor((nextseconds / 60 % 60)) : Math.floor((nextseconds / 60 % 60));\r\n\t\tconst s = Math.floor((nextseconds % 60)) < 10 ? '0' + Math.floor((nextseconds % 60)) : Math.floor((nextseconds % 60));\r\n\t\t$countdown.data('second', nextseconds);\r\n\t\t$countdown.text(h + \":\" + m + \":\" + s);\r\n\t}\r\n\r\n\tinitShare() {\r\n\t\tconst $shareBtn = this.$ctx.find(`.${classes.shareBtn}`);\r\n\t\t$shareBtn.on('click', (ev: Event) => {\r\n\t\t\tev.stopPropagation();\r\n\t\t\t$(ev.currentTarget).parent().toggleClass(classes.activeShare);\r\n\t\t});\r\n\t\t$('body').on('click', () => {\r\n\t\t\t$shareBtn.parent().removeClass(classes.activeShare);\r\n\t\t});\r\n\t}\r\n\r\n\ttoggleRegisterForm() {\r\n\t\tconst $registerBtn = this.$ctx.find(`.${classes.registerBtn}`);\r\n\t\tconst $registerForm = this.$ctx.find(`.${classes.registerForm}`);\r\n\t\t$registerBtn.on('click', (ev: Event) => {\r\n\t\t\tev.preventDefault(); // Prevent default anchor behavior\r\n\t\t\t$(ev.currentTarget).toggleClass(classes.activeRegisterBtn);\r\n\t\t\t$registerForm.toggleClass(classes.activeRegisterForm);\r\n\t\t});\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\n@createModule('TableFilter')\r\n/**\r\n * table-filter module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class TableFilter extends TerrificSpec {\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t$($ctx)\r\n\t\t\t.find('.js-toggle-trigger')\r\n\t\t\t.on('click', this._toggleContainer.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\t_toggleContainer(ev: Event) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\r\n\t\tif (viewport !== 'small') {\r\n\t\t\t$($ctx)\r\n\t\t\t\t.find('.js-toggle-trigger')\r\n\t\t\t\t.toggleClass('state-m-table-filter--active');\r\n\t\t\t$($ctx)\r\n\t\t\t\t.find('.js-toggle-container')\r\n\t\t\t\t.toggleClass('state-m-table-filter--active');\r\n\t\t} else {\r\n\t\t\t$('.m-table-filter').toggleClass('m-table-filter--open');\r\n\t\t\t$('.m-table-filter__container').toggleClass('state-m-table-filter--active');\r\n\t\t}\r\n\t}\r\n\r\n\tcloseContainer() {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\t$(window).trigger('enablePreventStickyHeaderAppearing');\r\n\t\t$($ctx)\r\n\t\t\t.find('.js-toggle-trigger')\r\n\t\t\t.removeClass('state-m-table-filter--active');\r\n\t\t$($ctx)\r\n\t\t\t.find('.js-toggle-container')\r\n\t\t\t.removeClass('state-m-table-filter--active');\r\n\r\n\t\tif (viewport === 'small') {\r\n\t\t\t$('.m-table-filter').removeClass('m-table-filter--open');\r\n\t\t\t$('.m-table-filter__container').removeClass('state-m-table-filter--active');\r\n\t\t}\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\t$(window).trigger('disablePreventStickyHeaderAppearing');\r\n\t\t}, 100);\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\n@createModule('TableFilterV2')\r\n/**\r\n * table-filter module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class TableFilterV2 extends TerrificSpec {\r\n\t\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t// $($ctx)\r\n\t\t// \t.find('.js-toggle-trigger')\r\n\t\t// \t.on('click', this._toggleContainer.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tdetailsWrap: 'js-m-talks__details-wrap',\r\n\tdetails: 'js-m-talks__details',\r\n\tlistButton: 'js-m-talks__list-button',\r\n\tstateButtonActive: 'state-m-talks__list-button--active',\r\n\tlist: 'js-m-talks__list',\r\n\taccordionButton: 'js-m-talks__accordion',\r\n\tstateAccordionOpen: 'state-m-talks__accordion--active',\r\n\tleftImage: 'm-talks__left-image',\r\n\tleftImageItem: 'js-m-talks__left-image-item',\r\n\tstatImageVisible: 'state-m-talks__left-image-item--visible',\r\n};\r\n\r\n@createModule('Talks')\r\n/**\r\n * talks module implementation.\r\n *\r\n */\r\nexport class Talks extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$detailsWrap: JQuery;\r\n\t$details: JQuery;\r\n\t$listButton: JQuery;\r\n\t$list: JQuery;\r\n\t$accordionButton: JQuery;\r\n\t$leftImage: JQuery;\r\n\t$leftImageItem: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$detailsWrap = this.$ctx.find(`.${classes.detailsWrap}`);\r\n\t\tthis.$details = this.$ctx.find(`.${classes.details}`);\r\n\t\tthis.$list = this.$ctx.find(`.${classes.list}`);\r\n\t\tthis.$listButton = this.$ctx.find(`.${classes.listButton}`);\r\n\t\tthis.$accordionButton = this.$ctx.find(`.${classes.accordionButton}`);\r\n\t\tthis.$leftImage = this.$ctx.find(`.${classes.leftImage}`);\r\n\t\tthis.$leftImageItem = this.$ctx.find(`.${classes.leftImageItem}`);\r\n\r\n\t\tthis.$leftImageItem.eq(0).addClass(classes.statImageVisible);\r\n\t\tthis.$listButton.eq(0).addClass(classes.stateButtonActive);\r\n\t\tthis.$details.attr('data-talk-selected', 0);\r\n\r\n\t\tthis.setHeight();\r\n\t\t$(window).on('resize', this.setHeight.bind(this));\r\n\r\n\t\tthis.$listButton.on('click', this.onTriggerClick.bind(this));\r\n\t\tthis.$accordionButton.on('click', this.accordionToggle.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\t// Set the background of color black\r\n\tsetHeight() {\r\n\t\tthis.$details.css('max-height', this.$details.children(\".m-talks__accordion-panel\")[0].offsetHeight);\r\n\t\tsetTimeout(() => {\r\n\t\t\tif(this.$leftImage.length > 0) {\r\n\t\t\t\tthis.$detailsWrap.css('min-height', this.$list.height() + 412);\r\n\t\t\t} else {\r\n\t\t\t\tthis.$detailsWrap.css('min-height', this.$list.height() - 20);\r\n\t\t\t}\r\n\t\t}, 300);\r\n\t}\r\n\r\n\tonTriggerClick(ev: any) {\r\n\t\t$(ev.currentTarget).parent().siblings().children().removeClass(classes.stateButtonActive);\r\n\t\t$(ev.currentTarget).addClass(classes.stateButtonActive);\r\n\t\tthis.$details.attr('data-talk-selected', $(ev.currentTarget).parent().index());\r\n\t\tthis.$leftImageItem.removeClass(classes.statImageVisible);\r\n\t\tthis.$leftImageItem.eq($(ev.currentTarget).parent().index()).addClass(classes.statImageVisible);\r\n\t\tthis.$details.css('max-height', this.$details.children(\".m-talks__accordion-panel\")[$(ev.currentTarget).parent().index()].offsetHeight);\r\n\t};\r\n\r\n\taccordionToggle(ev: any) {\r\n\t\t$(ev.currentTarget).siblings().removeClass(classes.stateAccordionOpen);\r\n\t\t$(ev.currentTarget).toggleClass(classes.stateAccordionOpen);\r\n\t};\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\n\r\nconst classes = {\r\n\tstateActive: 'state-m-teaser-benefit--active',\r\n\tongoingTransition: 'state-m-teaser-benefit--ongoing-transition',\r\n};\r\n\r\n@createModule('TeaserBenefit')\r\n/**\r\n * teaser-benefit module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class TeaserBenefit extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\t$(this.$ctx).on('click', (event: Event) => {\r\n\t\t\tthis._triggerAccordion(event);\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\r\n\t_triggerAccordion(event: Event) {\r\n\t\tconst $currentTarget = $(event.currentTarget);\r\n\t\t$currentTarget.toggleClass(classes.stateActive);\r\n\r\n\t\tif ($currentTarget.hasClass(classes.ongoingTransition)) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\t$currentTarget.removeClass(classes.ongoingTransition);\r\n\t\t\t}, 620);\r\n\t\t} else {\r\n\t\t\t$currentTarget.addClass(classes.ongoingTransition);\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\nimport 'select2'; // globally assign select2 fn to $ element\r\n\r\nconst classes = {\r\n\r\n\tsubmitForm: 'js-form__button-event--submit',\r\n\tcancelForm: 'js-form__button-event--cancel',\r\n\tfocusElement: 'js-form__event-show-additional-fields',\r\n\tadditionalFields: 'js-form__additional-fields',\r\n\tstateFormOrderAdditionalFieldsVisible: 'state-m-teaser-contact-form--show-additional-fields',\r\n\tstateFormOrderHiddenAfterSubmit: 'state-m-teaser-contact-form--hidden-after-submit',\r\n\tinputSelect: 'js-form__input-select',\r\n\tinput:'js-form__input',\r\n\tinputCheckBox:'a-input-checkbox__input',\r\n\tinquiryTypeInputSelect: \"js-form__input-inquiry-type\",\r\n\tsdsLinkColumn: \"js-o-form__grid-col-sds-link\",\r\n\tinquiryTextboxColumn: \"js-o-form__grid-col-inquiry-textbox\",\r\n\r\n\tinputSelectCategoryType: \"js-form__input-category-type\",\r\n\tinputSelectCheckMark: 'a-input-select--global-has-check',\r\n\tcategoryInputContainer: \"o-form__grid-col--input-category\",\r\n\tcategoryInputField: 'js-a-input--category',\r\n};\r\n\r\nconst optionValues = {\r\n\tother: \"other\",\r\n\tproductSafetyDataSheets: \"product safety data sheets\"\r\n}\r\n\r\n@createModule('TeaserContactForm')\r\n/**\r\n * teaser-contact-form module implementation.\r\n *\r\n * @author Robert Schork \r\n */\r\nexport class TeaserContactForm extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$inputSelect: JQuery;\r\n\t$inputCheckBox:JQuery;\r\n\t$input: JQuery;\r\n\r\n\tfocusFromScrollReached: boolean = false;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tconst formID = this.$ctx.attr('id');\r\n\r\n\t\tthis.initFormHadling();\r\n\r\n\t\tthis.onClickAnchor();\r\n\t\tthis.onClickLink($('.js-m-stage-product__button'));\r\n\t\tif ($('.js-m-stage-product__button').length > 0) {\r\n\t\t\tthis.onClickLink($('.js-m-navigation-in-page__cta'));\r\n\t\t}\r\n\r\n\t\t$('.js-m-navigation-in-page__list-items').on(\"click\", '[href=\"#' + formID + '\"]', (ev: Event) => {\r\n\t\t\tev.preventDefault();\r\n\t\t\tthis.onFocusAreaFocus();\r\n\t\t\tthis.$ctx.find(`.${classes.focusElement}`).focus();\r\n\t\t});\r\n\t\t// this.$ctx.on('scrollReached', this.onScrollReached.bind(this)); //remove feature again due to customer request\r\n\r\n\t\tif (this.$ctx.data('api-endpoint')) {\r\n\t\t\tthis.prefillFormData();\r\n\t\t}\r\n\r\n\t\tthis.$inputSelect = this.$ctx.find(`.${classes.inputSelect}`);\r\n\t\tthis.$inputCheckBox = this.$ctx.find(`.${classes.inputCheckBox}`);\r\n\t\tthis.$input = this.$ctx.find(`.${classes.input}`);\r\n\t\tthis.$inputSelect.on('change', (ev: Event) => this.inputSelecteOptionChanged(ev));\r\n\t\tthis.addOtherOptionForMaterialTag();\r\n\t\tthis.setMaterialTagDefaultValue();\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitFormHadling() {\r\n\t\tthis.$ctx.on('focus', `.${classes.focusElement}`, this.onFocusAreaFocus.bind(this));\r\n\t\tthis.$ctx.on('click', `.${classes.cancelForm}`, this.onCancleClick.bind(this));\r\n\t\tthis.$ctx.on('click', `.${classes.submitForm}`, this.onFormSubmit.bind(this));\r\n\t}\r\n\r\n\tonFocusAreaFocus() {\r\n\t\tthis.$ctx.find(`.${classes.additionalFields}`).addClass(classes.stateFormOrderAdditionalFieldsVisible);\r\n\t\tif (!this.focusFromScrollReached) {\r\n\t\t\tif ($('.js-m-navigation-in-page__wrapper').length > 0) {\r\n\t\t\t\tscrollToElement(this.$ctx, true, $('.js-m-navigation-in-page__wrapper').height() + 20);\r\n\t\t\t} else {\r\n\t\t\t\tscrollToElement(this.$ctx, true, 70);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.focusFromScrollReached = false;\r\n\t\t}\r\n\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t}\r\n\r\n\tonCancleClick() {\r\n\t\tthis.$ctx.find(`.${classes.additionalFields}`).removeClass(classes.stateFormOrderAdditionalFieldsVisible);\r\n\t\tscrollToElement(this.$ctx, true);\r\n\t}\r\n\r\n\tonFormSubmit(ev: Event) {\r\n\t\tconst $materialTag: any = this.$ctx.find('select[data-sc-field-name=\"materialTag\"]');\r\n\t\tvar validate=true;\r\n\t\tthis.$inputSelect.each(function(index,item){\r\n\t\t\tvar dataValRequired=$(item).attr(\"data-val\");\r\n\t\t\tif( typeof dataValRequired!== \"undefined\" && dataValRequired !== \"\" && dataValRequired !== null){\r\n\t\t\t\tif($(item).val()==\"\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$(item).addClass(\"state-a-input--has-error\");\r\n\t\t\t\t\t$(item).nextAll('.field-validation-valid').text($(item).attr(\"data-val-required\"));\r\n\t\t\t\t\t$(item).nextAll('.field-validation-valid').addClass('field-validation-error');\r\n\t\t\t\t\tvalidate=false;\r\n\t\t\t\t}\r\n\t\t\t}});\r\n\r\n\t\t\tthis.$input.each(function(index,item){\r\n\t\t\t\tvar dataValRequired=$(item).attr(\"data-val\");\r\n\t\t\t\tif( typeof dataValRequired!== \"undefined\" && dataValRequired !== \"\" && dataValRequired !== null){\r\n\t\t\t\t\tif($(item).val()==\"\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$(item).addClass(\"input-validation-error\");\r\n\t\t\t\t\t\t$(item).nextAll('.field-validation-valid').addClass('field-validation-error');\r\n\t\t\t\t\t\t$(item).nextAll('.field-validation-valid').text($(item).attr(\"data-val-required\"));\r\n\t\t\t\t\t\tvalidate=false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}});\r\n\r\n\t\t\tthis.$inputCheckBox.each(function(index,item){\r\n\t\t\t\t\tvar dataValRequired=$(item).attr(\"data-val\");\r\n\t\t\t\t\tif( typeof dataValRequired!== \"undefined\" && dataValRequired !== \"\" && dataValRequired !== null){\r\n\t\t\t\t\t\tif(!$(item).is(':checked'))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$(item).addClass(\"input-validation-error\");\r\n\t\t\t\t\t\t\tvalidate=false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}});\r\n\r\n\t\t\tif(!validate)\r\n\t\t\t{\r\n\t\t\t\tev.preventDefault();\r\n\t\t\t}\r\n\t\tthis.$ctx.addClass(classes.stateFormOrderHiddenAfterSubmit);\r\n\t}\r\n\r\n\t/*onScrollReached() { //remove feature again due to customer request\r\n\t\tthis.focusFromScrollReached = true;\r\n\t\tthis.$ctx.find(`.${classes.focusElement}`).focus();\r\n\t}*/\r\n\r\n\tonClickAnchor() {\r\n\t\tconst formID = this.$ctx.attr('id');\r\n\t\t$('[href=\"#' + formID + '\"]')\r\n\t\t\t.unbind(\"click\")\r\n\t\t\t.on(\"click\", (ev: Event) => {\r\n\t\t\t\tev.preventDefault();\r\n\t\t\t\tthis.onFocusAreaFocus();\r\n\t\t\t\tthis.$ctx.find(`.${classes.focusElement}`).focus();\r\n\t\t\t});\r\n\t}\r\n\r\n\tonClickLink($el: JQuery) {\r\n\t\tconst formID = this.$ctx.attr('id');\r\n\t\t$el.on('click', (ev: JQuery.Event) => {\r\n\t\t\tev.preventDefault();\r\n\t\t\tconst url = $el.attr('href');\r\n\t\t\tconst anchorIdx = url.indexOf('#' + formID);\r\n\t\t\tif (anchorIdx != -1) {\r\n\t\t\t\tthis.onFocusAreaFocus();\r\n\t\t\t\tthis.$ctx.find(`.${classes.focusElement}`).focus();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprefillFormData() {\r\n\t\tconst serviceUrl = this.$ctx.data('api-endpoint');\r\n\r\n\t\tif (serviceUrl) {\r\n\t\t\t$.ajax({\r\n\t\t\t\tmethod: 'get',\r\n\t\t\t\turl: serviceUrl,\r\n\t\t\t\tsuccess: (jsonData: any) => {\r\n\t\t\t\t\tfor (let key in jsonData) {\r\n\t\t\t\t\t\tconst $input = this.$ctx.find('input[data-sc-field-name=\"' + key + '\"]');\r\n\t\t\t\t\t\t$input.val(jsonData[key]);\r\n\t\t\t\t\t\t$input.trigger('change');\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tinputSelecteOptionChanged(ev: any) {\r\n\t\tconst opt: string = ev.currentTarget.value.toLowerCase();\r\n\t\tconst $target: any = $(ev.currentTarget);\r\n\r\n\t\tif($target.val()!==\"\")\r\n\t\t{\r\n\t\t\t$target.removeClass(\"state-a-input--has-error\");\r\n\t\t\t$target.nextAll('.field-validation-valid').text(\"\");\r\n\t\t\t$target.nextAll('.field-validation-valid').removeClass('field-validation-error');\r\n\t\t}\r\n\t\telse{\r\n\t\t\tvar dataValRequired=$target.attr(\"data-val\");\r\n\t\t\tif( typeof dataValRequired!== \"undefined\" && dataValRequired !== \"\" && dataValRequired !== null){\r\n\t\t\t$target.addClass(\"state-a-input--has-error\");\r\n\t\t\t$target.nextAll('.field-validation-valid').text($target.attr(\"data-val-required\"));\r\n\t\t\t$target.nextAll('.field-validation-valid').addClass('field-validation-error');\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Inquiry Type dropdown\r\n\t\tif ($target.hasClass(classes.inquiryTypeInputSelect)) {\r\n\r\n\t\t\tconst $sdsLinkCol: any = this.$ctx.find(`.${classes.sdsLinkColumn}`);\r\n\t\t\tconst $sdsTextboxCol: any = this.$ctx.find(`.${classes.inquiryTextboxColumn}`);\r\n\r\n\t\t\tlet showCheckMark = false;\r\n\t\t\t// show SDS link\r\n\t\t\tif (opt === optionValues.productSafetyDataSheets) {\r\n\t\t\t\t$sdsLinkCol.css(\"display\", \"flex\");\r\n\t\t\t\tshowCheckMark = true;\r\n\t\t\t} else {\r\n\t\t\t\t$sdsLinkCol.css(\"display\", \"none\");\r\n\t\t\t}\r\n\r\n\t\t\t// show SDS textbox\r\n\t\t\tif (opt === optionValues.other) {\r\n\t\t\t\t$('input[data-sc-field-name=\"otherInquiryType\"]').val(\"\");\r\n\t\t\t\t$sdsTextboxCol.show();\r\n\t\t\t\tshowCheckMark = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$('input[data-sc-field-name=\"otherInquiryType\"]').val(\"-\");\r\n\t\t\t\t$sdsTextboxCol.hide();\r\n\t\t\t}\r\n\r\n\t\t\tif (showCheckMark) {\r\n\t\t\t\t$target.addClass(classes.inputSelectCheckMark);\r\n\t\t\t} else {\r\n\t\t\t\t$target.removeClass(classes.inputSelectCheckMark);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Category Type dropdown\r\n\t\tif ($target.hasClass(classes.inputSelectCategoryType)) {\r\n\r\n\t\t\tconst $categoryInputContainer: any = this.$ctx.find(`.${classes.categoryInputContainer}`);\r\n\t\t\tconst $firstInput: any = this.$ctx.find(\".a-input-first .js-a-input--first-name\");\r\n\r\n\t\t\tif (opt === optionValues.other.toLowerCase()) {\r\n\t\t\t\t$('input[data-sc-field-name=\"OtherCategory\"]').val(\"\");\r\n\t\t\t\t$categoryInputContainer.show();\r\n\t\t\t\t$target.addClass(classes.inputSelectCheckMark);\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t$categoryInputContainer\r\n\t\t\t\t\t\t.find(classes.categoryInputField)\r\n\t\t\t\t\t\t.focus()\r\n\t\t\t\t\t\t.select();\r\n\t\t\t\t}, 150);\r\n\r\n\t\t\t} else {\r\n\t\t\t\t$('input[data-sc-field-name=\"OtherCategory\"]').val(\"-\");\r\n\t\t\t\t$categoryInputContainer.hide();\r\n\t\t\t\t$target.removeClass(classes.inputSelectCheckMark);\r\n\t\t\t\tif ($firstInput.length > 0) {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tif ($firstInput.val().length < 1) {\r\n\t\t\t\t\t\t\t$firstInput.focus().select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, 150);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Add Other Optioin For MaterialTag field\r\n\t * @returns {void}\r\n\t */\r\n\taddOtherOptionForMaterialTag()\r\n\t{\r\n\t\t var otherText=$('#OtherText').val();\r\n\t\t var otherValue=$('#OtherValue').val();\r\n\t\t const $materialTag: any = this.$ctx.find('select[data-sc-field-name=\"materialTag\"]');\r\n\r\n\t\t if ($materialTag.length > 0) {\r\n\t\t\t$('select[data-sc-field-name=\"materialTag\"]').append(``);\r\n\t\t}\r\n\t}\r\n\r\n\tsetMaterialTagDefaultValue()\r\n\t{\r\n\t\tvar urlParams = new URLSearchParams(window.location.search);\r\n\t\tvar meterialTag=$('#SelectTag').val();\r\n\t\tif(urlParams.has('materialtag'))\r\n\t\t{\r\n\t\t\tmeterialTag=urlParams.get('materialtag');\r\n\t\t}\r\n\t\t$('select[data-sc-field-name=\"materialTag\"]').val(meterialTag);\r\n\t}\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\toverlayButton: 'js-m-teaser-video__overlay-button',\r\n\toverlayArea: 'js-m-teaser-video__overlay',\r\n\tbuttonClose: 'js-m-teaser-video__close'\r\n};\r\n\r\n@createModule('TeaserVideo')\r\n/**\r\n * TeaserVideo module implementation.\r\n *\r\n * @author Ellen Xia\r\n */\r\nexport class TeaserVideo extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$overlayButton: JQuery;\r\n\t$overlayArea: JQuery;\r\n\t$buttonClose: JQuery;\r\n\t\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$overlayButton = $(`.${classes.overlayButton}`, this.$ctx);\r\n\t\tthis.$overlayArea = $(`.${classes.overlayArea}`, this.$ctx);\r\n\t\tthis.$buttonClose = $(`.${classes.buttonClose}`, this.$ctx);\r\n\r\n\t\tthis.showTeaserVideo();\r\n\t\tthis.hideTeaserVideo();\r\n\t\t\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\tshowTeaserVideo() {\r\n\t\tthis.$overlayButton.on('click',\r\n\t\t() => {\r\n\t\t\t// Show dialog\r\n\t\t\tthis.$ctx.addClass('state-m-teaser-video--visible');\r\n\t\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t\t\t// Start playback\r\n\t\t\tthis.startVideoPlayback();\r\n\t\t})\r\n\t}\r\n\t\r\n\thideTeaserVideo() {\r\n\t\tthis.$buttonClose.on('click',\r\n\t\t() => {\r\n\t\t\t// Stop playback\r\n\t\t\tthis.stopVideoPlayback();\r\n\t\t\t// Close dialog\r\n\t\t\tthis.$ctx.removeClass('state-m-teaser-video--visible ');\r\n\t\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\t})\r\n\t}\r\n\r\n\tprivate startVideoPlayback() : void{\r\n\t\tconst player = this.getVideoPlayer();\r\n\t\tif (player) player.play();\r\n\t}\r\n\r\n\tprivate stopVideoPlayback() : void{\r\n\t\tconst player = this.getVideoPlayer();\r\n\t\tif (player) player.pause();\r\n\t}\r\n\r\n\tprivate getVideoPlayer() : any{\r\n\t\tif ((window as any).VideoPlayer === undefined || (window as any).VideoPlayer.Collection === undefined ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tconst componentId = this.$ctx.find(\"[data-t-name=VideoComponent]\").data(\"t-id\");\r\n\t\tif (componentId === undefined || !componentId) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tconst playerId = `a-video__mi-player-${componentId}`;\r\n\t\t\treturn (window as any).VideoPlayer.Collection.getPlayerById(playerId);\t\r\n\t\t} catch (error) {\r\n\t\t\t// The remote library throws an exception when the video is not yet started.\r\n\t\t\t// This is also the case when the video is lazy-loading, and the user did not click start yet.\r\n\t\t\t// See: https://doc.movingimage.com/display/JA/VideoPlayer.Collection+Object\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\titemBtn: 'm-teaser-large__caption-button'\r\n};\r\n\r\n//const data = require('../_data/teaser-large.json');\r\n@createModule('TeaserLarge')\r\n/*\r\n * teaser-large module implementation.\r\n */\r\nexport class TeaserLarge extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\ttitle: any;\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tvar title = $('.m-teaser-large__caption-title');\r\n\t\t\tvar description = $('.m-teaser-large__caption');\r\n\t\t\tif (title.hasClass('SL') || description.hasClass('SL')) {\r\n\t\t\t\t$('.m-teaser-large__caption-title').removeClass('large').addClass('small');\r\n\t\t\t\t$('.m-teaser-large__caption').removeClass('small').addClass('large');\r\n\t\t\t} else if (title.hasClass('LS') || description.hasClass('LS')) {\r\n\t\t\t\t$('.m-teaser-large__caption-title').removeClass('small').addClass('large');\r\n\t\t\t\t$('.m-teaser-large__caption').removeClass('large').addClass('small');\r\n\t\t\t} else if (title.hasClass('LL') || description.hasClass('LL')) {\r\n\t\t\t\t$('.m-teaser-large__caption-title').removeClass('small').addClass('large');\r\n\t\t\t\t$('.m-teaser-large__caption').removeClass('small').addClass('large');\r\n\t\t\t} else if (title.hasClass('SS') || description.hasClass('SS')) {\r\n\t\t\t\t$('.m-teaser-large__caption-title').removeClass('large').addClass('small');\r\n\t\t\t\t$('.m-teaser-large__caption').removeClass('large').addClass('small');\r\n\t\t\t}\r\n\t\t}, 0);\r\n\t\t\r\n\t\tthis.RegisteredUpdate();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tRegisteredUpdate() {\r\n\t\tif (Track.isKnownMarketoLead()) {\r\n\t\t\tthis.$ctx.removeClass('m-teaser-large--locked');\r\n\t\t}\r\n\t}\r\n\r\n\tstop() { }\r\n\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\ttextArea: 'm-teaser-event__text-area'\r\n};\r\n\r\n@createModule('TeaserEvent')\r\n/**\r\n * TeaserEvent module implementation.\r\n *\r\n * @author Sandy Zhao\r\n */\r\nexport class TeaserEvent extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.initHeight();\r\n\t\t$(window).resize(() => this.initHeight());\r\n\t\t\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitHeight(){\r\n\t\tvar textAreaHeight = this.$ctx.find(`.${classes.textArea}`).height() + 88;\r\n\t\tthis.$ctx.css(\"min-height\",textAreaHeight);\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport 'tooltipster';\r\n\r\nconst classes = {\r\n\tstateTooltipVisible: 'state-m-tooltip--is-visible',\r\n\tstateHeaderPos0: 'state-m-navigation--scroll-0-position',\r\n\ttooltipCloser: 'js-m-tooltip__closer',\r\n};\r\n\r\n@createModule('Tooltip')\r\n/**\r\n * tooltip module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class Tooltip extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\t$ctx.hide();\r\n\r\n\t\tconst $trigger = this._getTriggerElement();\r\n\r\n\t\tthis.initTooltip();\r\n\r\n\t\tif ($ctx.hasClass(`${classes.stateTooltipVisible}`)) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\t$trigger.trigger('click');\r\n\t\t\t}, 1000);\r\n\t\t\t$ctx.removeClass(`${classes.stateTooltipVisible}`);\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\tinitTooltip() {\r\n\t\tconst $trigger = this._getTriggerElement() as any;\r\n\t\tconst content = this._getTooltipContent();\r\n\t\t$trigger.tooltipster({\r\n\t\t\ttheme: 'tooltipster-shadow',\r\n\t\t\tcontent: content,\r\n\t\t\tcontentAsHTML: true,\r\n\t\t\ttrigger: 'click',\r\n\t\t\tinteractive: true,\r\n\t\t\tzIndex: 2,\r\n\t\t\tfunctionReady(instance: any) {\r\n\t\t\t\tinstance._$tooltip.on('click', `.${classes.tooltipCloser}`, (ev: Event) => {\r\n\t\t\t\t\tev.preventDefault();\r\n\t\t\t\t\t$trigger.trigger('click');\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tfunctionPosition(instance: any, helper: any, position: any) {\r\n\t\t\t\t// fine tuning of tooltip position relative to trigger element\r\n\t\t\t\tif (position.side === 'top') {\r\n\t\t\t\t\tposition.coord.top -= 16;\r\n\t\t\t\t\tposition.coord.left += 8;\r\n\t\t\t\t} else if (position.side === 'bottom') {\r\n\t\t\t\t\tposition.coord.top += 4;\r\n\t\t\t\t}\r\n\t\t\t\treturn position;\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\t_getTooltipContent() {\r\n\t\treturn $(this._ctx).html();\r\n\t}\r\n\t_getTriggerElement() {\r\n\t\treturn $(this._ctx).prev();\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tactionsBtn: 'js-m-tooltip-actions__btn',\r\n\tstatePopupShow: 'state-m-tooltip-actions--open',\r\n\tactionsClose: 'm-tooltip-actions__close-layer',\r\n\tactionsPopup: 'js-m-tooltip-actions__popup',\r\n\tactionItem: 'js-m-tooltip-actions__list-item',\r\n};\r\n\r\n@createModule('TooltipActions')\r\n/**\r\n * Tooltip Actions\r\n *\r\n */\r\nexport class TooltipActions extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.showActions();\r\n\t\tthis.hideActions(); \r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tshowActions() {\r\n\t\tconst $actionsBtn = this.$ctx.find(`.${classes.actionsBtn}`);\r\n\t\t$actionsBtn.on('click', this._openActionsPopup.bind(this));\r\n\t}\r\n\r\n\t_openActionsPopup(ev: any) {\r\n\t\tif (!$(ev.currentTarget).parent().hasClass(classes.statePopupShow)) {\r\n\t\t\t$(ev.currentTarget).parent().addClass(classes.statePopupShow);\r\n\t\t} else {\r\n\t\t\t$(ev.currentTarget).parent().removeClass(classes.statePopupShow);\r\n\t\t}\r\n\t}\r\n\r\n\thideActions() {\r\n\t\tconst $actionsClose = this.$ctx.find(`.${classes.actionsClose}`);\r\n\t\t$actionsClose.on('click', this._hideActionsPopup.bind(this));\r\n\r\n\t\tconst $actionsPopup = this.$ctx.find(`.${classes.actionsPopup}`);\r\n\t\t$actionsPopup.on('click', this._hideActionsPopup.bind(this));\r\n\t}\r\n\r\n\t_hideActionsPopup() {\r\n\t\tthis.$ctx.removeClass(classes.statePopupShow);\r\n\t}\r\n \r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tleftControl: 'js-m-scrollable-teaser__left-control',\r\n\trightControl: 'js-m-scrollable-teaser__right-control',\r\n\thiddenControl: 'state-m-scrollable-teaser__slider-arrow-hidden',\r\n\tscrollWrapper: \"js-m-scrollable-teaser__scroll-wrapper\",\r\n\theadWrapper: \"js-m-scrollable-teaser__head\",\r\n\tcontentWrapper: \"js-m-scrollable-teaser__content\",\r\n\tcontentScrollWrapper: \"js-m-scrollable-teaser__content-scroll\",\r\n\tlistWrapper: \"js-m-scrollable-teaser__list\",\r\n\tteaserItem: \"js-m-scrollable-teaser__list-item\",\r\n\tvideoWrapper: \"js-m-scrollable-teaser-item__video-area\",\r\n\tlargeTeaser: 'm-scrollable-teaser__list-item--large',\r\n\ttimelineItem: \"js-m-scrollable-teaser__timeline-item\",\r\n\ttimelineItemBar: \"m-scrollable-teaser-item__time-bar\",\r\n\tdisabledSilder: 'm-scrollable-teaser--disabled-silder',\r\n\tteaserItemGated: 'm-scrollable-teaser-item--gated',\r\n\tmainContainer: \"js-m-scrollable-teaser__main-scroll-wrapper\"\r\n};\r\n\r\n@createModule('ScrollableTeaser')\r\n/**\r\n * scrollable-teaser module implementation.\r\n */\r\n\r\nexport class ScrollableTeaser extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$leftControl: JQuery;\r\n\t$rightControl: JQuery;\r\n\t$scrollWrapper: JQuery;\r\n\t$headWrapper: JQuery;\r\n\t$contentWrapper: JQuery;\r\n\t$contentScrollWrapper: JQuery;\r\n\t$listWrapper: JQuery;\r\n\t$teaserItem: JQuery;\r\n\t$videoWrapper: JQuery;\r\n\t$timelineItem: JQuery;\r\n\t$teaserItemGated: JQuery;\r\n\t$mainContainer: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.initVars();\r\n\t\tthis.initNavigationArrows();\r\n\t\tthis.initScroll();\r\n\t\tthis.onScroll();\r\n\t\tthis.onVideoTeaserClick();\r\n\t\tif (this.$timelineItem) {\r\n\t\t\tthis.initTimelineTeaser();\r\n\t\t}\r\n\t\tonBreakpointChange(() => {\r\n\t\t\tthis.initNavigationArrows();\r\n\t\t\tthis.onScroll();\r\n\t\t\tif (this.$timelineItem) {\r\n\t\t\t\tthis.initTimelineTeaser();\r\n\t\t\t}\r\n\t\t});\r\n\t\t$(window).resize(() => {\r\n\t\t\tthis.initScroll();\r\n\t\t});\r\n\r\n\t\tthis.RegisteredUpdate();\r\n\r\n\t\t\r\n\t\t$('.js-o-home-scrollable-teaser__tab-link').on('click', () => {\r\n this.showHideScroll();\r\n });\r\n\t\t\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitVars() {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$leftControl = $(`.${classes.leftControl}`, this.$ctx);\r\n\t\tthis.$rightControl = $(`.${classes.rightControl}`, this.$ctx);\r\n\t\tthis.$scrollWrapper = $(`.${classes.scrollWrapper}`, this.$ctx);\r\n\t\tthis.$headWrapper = $(`.${classes.headWrapper}`, this.$ctx);\r\n\t\tthis.$contentWrapper = $(`.${classes.contentWrapper}`, this.$ctx);\r\n\t\tthis.$contentScrollWrapper = $(`.${classes.contentScrollWrapper}`, this.$ctx);\r\n\t\tthis.$listWrapper = $(`.${classes.listWrapper}`, this.$ctx);\r\n\t\tthis.$teaserItem = $(`.${classes.teaserItem}`, this.$ctx);\r\n\t\tthis.$videoWrapper = $(`.${classes.videoWrapper}`, this.$ctx);\r\n\t\tthis.$timelineItem = $(`.${classes.timelineItem}`, this.$ctx);\r\n\t\tthis.$teaserItemGated = $(`.${classes.teaserItemGated}`, this.$ctx);\r\n\t\tthis.$mainContainer = $(`.${classes.mainContainer}`, this.$ctx).length > 0 ? $(`.${classes.mainContainer}`, this.$ctx) : this.$ctx.closest(`.${classes.mainContainer}`);\r\n\t}\r\n\tinitNavigationArrows() {\r\n\t\tthis.$leftControl.on('click', () => {\r\n\t\t\tthis.onLeftControlClick();\r\n\t\t});\r\n\r\n\t\tthis.$rightControl.on('click', () => {\r\n\t\t\tthis.onRightControlClick()\r\n\t\t});\r\n\t}\r\n\r\n\tinitScroll() {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small') {\r\n\t\t\tif (this.$listWrapper.width() < this.$contentScrollWrapper.width()) {\r\n\t\t\t\tthis.$ctx.addClass(classes.disabledSilder);\r\n\t\t\t} else {\r\n\t\t\t\tthis.$ctx.removeClass(classes.disabledSilder);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (viewport === 'large' || viewport === 'extra-large') {\r\n\t\t\tif (this.$headWrapper.width() + this.$listWrapper.width() < this.$mainContainer.width()) {\r\n\t\t\t\tthis.$ctx.addClass(classes.disabledSilder);\r\n\t\t\t} else {\r\n\t\t\t\tthis.$ctx.removeClass(classes.disabledSilder);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.showHideScroll();\r\n\t}\r\n\tonVideoTeaserClick() {\r\n\t\tthis.$videoWrapper.on('click', (ev: any) => {\r\n\t\t\t$(ev.currentTarget).parents(`.${classes.teaserItem}`).addClass(classes.largeTeaser);\r\n\t\t\t$(ev.currentTarget).closest('li').siblings().removeClass(classes.largeTeaser);\r\n\r\n\t\t\tvar itemWidth = 365;\r\n\t\t\tvar headWidth = this.$headWrapper.width();\r\n\t\t\tvar videoLeft = $(ev.currentTarget).closest('li').index() * itemWidth + headWidth;\r\n\t\t\tvar videoCurrentLeft = videoLeft + 641 - this.$scrollWrapper.width();\r\n\t\t\tvar currentScrollLeft = this.$scrollWrapper.scrollLeft();\r\n\t\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\t\tif (!$(ev.currentTarget).hasClass(classes.largeTeaser) || viewport === 'medium' || viewport === 'large' || viewport === 'extra-large') {\r\n\t\t\t\tif (currentScrollLeft < videoCurrentLeft) {\r\n\t\t\t\t\tthis.$scrollWrapper.animate(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tscrollLeft: videoCurrentLeft,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t250\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($('video').length > 1) {\r\n\t\t\t\t$('html').find(`.${classes.videoWrapper}`).not($(ev.currentTarget)).find('video').trigger('pause');\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tinitTimelineTeaser() {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tvar maxLength = this.$timelineItem.last().data('step-index');\r\n\t\tvar mobileItemWidth = $(window).width() * 0.768 + 20;\r\n\r\n\t\tfor (var i = 0; i < maxLength + 1; i++) {\r\n\t\t\tvar teaserLength = $($(this.$timelineItem).parent()).find('[data-step-index=\"' + i + '\"]').length;\r\n\t\t\tif (i == maxLength) {\r\n\t\t\t\t$($($(this.$timelineItem).parent()).find('[data-step-index=\"' + i + '\"]')).find(`.${classes.timelineItemBar}`).hide();\r\n\t\t\t} else {\r\n\t\t\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\t\t\t$($($(this.$timelineItem).parent()).find('[data-step-index=\"' + i + '\"]')).find(`.${classes.timelineItemBar}`).width(teaserLength * mobileItemWidth)\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$($($(this.$timelineItem).parent()).find('[data-step-index=\"' + i + '\"]')).find(`.${classes.timelineItemBar}`).width(teaserLength * 365)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method click left arrow\r\n\t */\r\n\tonLeftControlClick() {\r\n\t\tthis.$rightControl.parent().removeClass(classes.hiddenControl)\r\n\t\tthis.teaserScrollLeft();\r\n\t}\r\n\r\n\tteaserScrollLeft() {\r\n\t\tvar currentScrollLeft = this.$scrollWrapper.scrollLeft();\r\n\t\tvar contentCurrentScrollLeft = this.$contentScrollWrapper.scrollLeft();\r\n\t\tvar mobileItemWidth = $(window).width() * 0.768 + 20;\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\r\n\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\tthis.$contentScrollWrapper.animate(\r\n\t\t\t\t{\r\n\t\t\t\t\tscrollLeft: contentCurrentScrollLeft - mobileItemWidth,\r\n\t\t\t\t},\r\n\t\t\t\t150\r\n\t\t\t);\r\n\t\t\tif (contentCurrentScrollLeft <= mobileItemWidth) {\r\n\t\t\t\tthis.$leftControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.$scrollWrapper.animate(\r\n\t\t\t\t{\r\n\t\t\t\t\tscrollLeft: currentScrollLeft - 365,\r\n\t\t\t\t},\r\n\t\t\t\t150\r\n\t\t\t);\r\n\t\t\tif (currentScrollLeft <= 365) {\r\n\t\t\t\tthis.$leftControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * method click right arrow\r\n\t */\r\n\tonRightControlClick() {\r\n\t\tthis.$leftControl.parent().removeClass(classes.hiddenControl)\r\n\t\tthis.teaserScrollRight();\r\n\t}\r\n\r\n\tteaserScrollRight() {\r\n\t\tvar currentScrollLeft = this.$scrollWrapper.scrollLeft();\r\n\t\tvar contentCurrentScrollLeft = this.$contentScrollWrapper.scrollLeft();\r\n\t\tvar mobileItemWidth = $(window).width() * 0.768 + 20;\r\n\t\tvar maxScrollArea = this.$headWrapper.width() + this.$contentWrapper.width() - this.$scrollWrapper.width();\r\n\t\tvar maxContentScrollArea = this.$listWrapper.width() - this.$contentScrollWrapper.width();\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\r\n\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\tthis.$contentScrollWrapper.animate(\r\n\t\t\t\t{\r\n\t\t\t\t\tscrollLeft: contentCurrentScrollLeft + mobileItemWidth,\r\n\t\t\t\t},\r\n\t\t\t\t150\r\n\t\t\t);\r\n\t\t\tif (contentCurrentScrollLeft + mobileItemWidth > maxContentScrollArea - 1) {\r\n\t\t\t\tthis.$rightControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.$scrollWrapper.animate(\r\n\t\t\t\t{\r\n\t\t\t\t\tscrollLeft: currentScrollLeft + 365,\r\n\t\t\t\t},\r\n\t\t\t\t150\r\n\t\t\t);\r\n\t\t\tif (currentScrollLeft + 365 > maxScrollArea - 1) {\r\n\t\t\t\tthis.$rightControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonScroll() {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tthis.$contentScrollWrapper.on('scroll', () => {\r\n\t\t\tvar contentCurrentScrollLeft = this.$contentScrollWrapper.scrollLeft();\r\n\t\t\tvar maxContentScrollArea = this.$listWrapper.width() - this.$contentScrollWrapper.width();\r\n\t\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\t\tif (contentCurrentScrollLeft > 0) {\r\n\t\t\t\t\tthis.$leftControl.parent().removeClass(classes.hiddenControl)\r\n\t\t\t\t} else if (contentCurrentScrollLeft == 0) {\r\n\t\t\t\t\tthis.$leftControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t\t}\r\n\t\t\t\tif (contentCurrentScrollLeft > maxContentScrollArea - 1) {\r\n\t\t\t\t\tthis.$rightControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t\t} else if (contentCurrentScrollLeft < maxContentScrollArea - 1) {\r\n\t\t\t\t\tthis.$rightControl.parent().removeClass(classes.hiddenControl)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.$scrollWrapper.on('scroll', () => {\r\n\t\t\tvar currentScrollLeft = this.$scrollWrapper.scrollLeft();\r\n\t\t\tvar maxScrollArea = this.$headWrapper.width() + this.$contentWrapper.width() - this.$scrollWrapper.width();\r\n\t\t\tif (currentScrollLeft > 0) {\r\n\t\t\t\tthis.$leftControl.parent().removeClass(classes.hiddenControl)\r\n\t\t\t} else if (currentScrollLeft == 0) {\r\n\t\t\t\tthis.$leftControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t}\r\n\t\t\tif (currentScrollLeft > maxScrollArea - 1) {\r\n\t\t\t\tthis.$rightControl.parent().addClass(classes.hiddenControl)\r\n\t\t\t} else if (currentScrollLeft < maxScrollArea - 1) {\r\n\t\t\t\tthis.$rightControl.parent().removeClass(classes.hiddenControl)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tRegisteredUpdate() {\r\n\t\tif (Track.isKnownMarketoLead()) {\r\n\t\t\tthis.$teaserItemGated.removeClass('m-scrollable-teaser-item--locked');\r\n\t\t}\r\n\t}\r\n\t\r\n\tshowHideScroll() {\r\n\t\tconst viewportSize = getCurrentBreakpoint() as string;\r\n\t\tif (viewportSize === 'large' || viewportSize === 'extra-large') {\r\n\t\t\t$('.js-m-scrollable-teaser__list').each(function() {\r\n\t\t\t\tlet parent = $(this).closest('.js-o-home-scrollable-teaser__content-item');\r\n\t\t\t\tconst containerWidth = $(this).width();\r\n\t\t\t\tconst scrollWidth = $('.js-m-scrollable-teaser__content-scroll').width();\r\n\t\r\n\t\t\t\tconst itemWidth = $(this).children().first().outerWidth(true); \r\n\t\r\n\t\t\t\tconsole.log('Container width:', containerWidth);\r\n\t\t\t\tconsole.log('Item width:', itemWidth);\r\n\t\t\t\tconsole.log('Scroll width:', scrollWidth);\r\n\r\n\t\t\t\tconst itemsVisible = Math.floor(containerWidth / itemWidth); \r\n\t\r\n\t\t\t\tif (itemsVisible <= 2) {\r\n\t\t\t\t\tparent.addClass('m-scrollable-teaser--disabled-silder');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tparent.removeClass('m-scrollable-teaser--disabled-silder');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\t\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { triggerPublicEvent, PublicEvents } from '@project/shared/utils/events/js/events';\r\nimport * as $ from 'jquery';\r\n\r\n@createModule('SearchFlyout')\r\n/**\r\n * search-flyout module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class SearchFlyout extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$inputElement: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$inputElement = this.$ctx.find('.js-search-input');\r\n\t\tthis.$inputElement.on('click', (event: Event) => {\r\n\t\t\tevent.stopPropagation();\r\n\t\t});\r\n\t\tthis.$inputElement.on('keyup', this._handleInputChange.bind(this));\r\n\t\tthis.$ctx.find('.js-m-search-flyout__close').on('click', () => {\r\n\t\t\t$(window).trigger('searchFlyout:close');\r\n\t\t});\r\n\r\n\t\t//when the searchFlyout is opened we need to check if there is any content and then show the delete button\r\n\t\t$(window).on('searchFlyout:open', this._open.bind(this));\r\n\r\n\t\t$(window).on('searchFlyout:close', this._close.bind(this));\r\n\r\n\t\t$('.js-search-delete').on('click', (event: Event) => {\r\n\t\t\tthis._deleteFromInput(event);\r\n\t\t\tevent.stopPropagation();\r\n\t\t});\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\r\n\t_handleInputChange(event: any) {\r\n\t\tlet inputString = this.$inputElement.val() as string;\r\n\t\tlet newLinkUrl = this.$ctx.data('baseurl') + inputString;\r\n\t\tlet $searchLink = $(this.$ctx).find('.js-m-search-flyout__search-submit');\r\n\r\n\t\tif (inputString.length >= 1) {\r\n\t\t\t$('.js-search-delete').addClass('m-search-flyout__search-delete--active');\r\n\t\t} else {\r\n\t\t\t$('.js-search-delete').removeClass('m-search-flyout__search-delete--active');\r\n\t\t}\r\n\r\n\t\tif (event.keyCode == 13) {\r\n\t\t\twindow.location.href = newLinkUrl;\r\n\t\t}\r\n\r\n\t\t$searchLink.attr('href', newLinkUrl);\r\n\t}\r\n\r\n\t_deleteFromInput(event: Event) {\r\n\t\tthis.$inputElement.val('');\r\n\t\tthis._handleInputChange(event);\r\n\t\tthis.$inputElement.focus();\r\n\t}\r\n\r\n\t_open(event: Event) {\r\n\t\t$(window).trigger('enablePreventStickyScrollBehaviour');\r\n\t\t$(window).trigger('lockScrolling');\r\n\t\tthis.$inputElement.focus();\r\n\t\tthis._handleInputChange(event);\r\n\t}\r\n\r\n\t_close() {\r\n\t\t$(window).trigger('disablePreventStickyScrollBehaviour');\r\n\t\t$(window).trigger('unlockScrolling');\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\tthis.$inputElement.val('');\r\n\t\t$('.js-flyout-container').removeClass('m-search-flyout--active');\r\n\t}\r\n\r\n\t/**\r\n\t * method to trigger public event\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { scrollToElement } from '@project/shared/utils/scroll-to/js/scroll-to';\r\n\r\nconst classes = {\r\n\ttoggleButton: 'js-m-disclaimer__toggle-button',\r\n\tstateShowMore: 'state-m-disclaimer-show-more',\r\n};\r\n\r\n@createModule('Disclaimer')\r\n/**\r\n * disclaimer module implementation.\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class Disclaimer extends TerrificSpec {\r\n\tstart(resolve: () => void) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\t$(`.${classes.toggleButton}`, $ctx).on('click', () => {\r\n\t\t\tif ($ctx.hasClass(classes.stateShowMore)) {\r\n\t\t\t\tscrollToElement($ctx, true, $(window).height() / 10, undefined, true);\r\n\t\t\t}\r\n\r\n\t\t\t$ctx.toggleClass(classes.stateShowMore);\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Cookies from 'js-cookie';\r\nimport * as Overlays from '@project/shared/utils/overlays/js/overlays';\r\n\r\nconst classes = {\r\n\tbuttonClose: 'js-m-survey__close'\r\n};\r\n\r\n@createModule('Survey')\r\n/**\r\n * Survey module implementation.\r\n *\r\n * @author Ellen Xia\r\n */\r\nexport class Survey extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tconst $buttonClose = this.$ctx.find(`.${classes.buttonClose}`);\r\n\t\t$buttonClose.on('click', this.onCloseClick.bind(this));\r\n\r\n\t\tthis.initSurvey();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() { }\r\n\r\n\t_showSurvey() {\r\n\t\t$(this._ctx).addClass('state-m-survey--visible ');\r\n\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\t_hideSurvey() {\r\n\t\t$(this._ctx).removeClass('state-m-survey--visible ');\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\t//$(this.$ctx).empty();\r\n\t}\r\n\r\n\tinitSurvey() {\r\n\t\tlet showsurvey = false;\r\n\t\tif (location.search && location.search.indexOf('showsurvey=true') > -1) {\r\n\t\t\tshowsurvey = true;\r\n\t\t}\r\n\r\n\t\tlet waitingTime = parseInt($(this._ctx).attr(\"data-waitTime\"));\r\n\t\tif (isNaN(waitingTime)) {\r\n\t\t\twaitingTime = 10;\r\n\t\t}\r\n\r\n\t\tif (showsurvey || !this.cookieSurveyRead()) {\r\n\t\t\tOverlays.ShowOverlay(\r\n\t\t\t\t() => this._showSurvey(),\r\n\t\t\t\twaitingTime * 1000\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\tonCloseClick() {\r\n\t\tthis.setSurveyRead();\r\n\r\n\t\tOverlays.CloseOverlay(\r\n\t\t\t() => this._hideSurvey()\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * returns if cookie notice was already read (cookielifetime 1 year // \"not read\" after 2 month, if not all accepted)\r\n\t *\r\n\t * @returns {boolean} was read\r\n\t */\r\n\tprivate cookieSurveyRead(): boolean {\r\n\t\tconst readCookie = Cookies.get('survey_read');\r\n\t\tif (readCookie) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\t/**\r\n\t * Saves read status of survey, in not already set\r\n\t *\r\n\t * @param {boolean} force defines that cookie should be updated even if already set\r\n\t * @returns {void}\r\n\t */\r\n\tprivate setSurveyRead(): void {\r\n\t\tconst readCookie = Cookies.get('survey_read');\r\n\t\tif (readCookie) {\r\n\t\t\tCookies.remove('survey_read');\r\n\t\t}\r\n\t\tCookies.set('survey_read', '1', { expires: 60 });\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Cookies from 'js-cookie';\r\nimport * as Overlays from '@project/shared/utils/overlays/js/overlays';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tbuttonClose: 'js-m-lounge-popup__close',\r\n\tbuttonOpenLink: 'js-m-lounge-popup__open-link',\r\n\tdoNotAskAgainInput: 'js-donot-ask-again__input'\r\n};\r\n\r\n@createModule('CustomerLoungePopup')\r\n/**\r\n * CustomerLoungePopup module implementation.\r\n *\r\n * @author Ellen Xia\r\n */\r\nexport class CustomerLoungePopup extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$buttonClose: JQuery;\r\n\t$buttonOpenLink: JQuery;\r\n\t$checkDoNotAskAgain: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$buttonClose = $(`.${classes.buttonClose}`, this.$ctx);\r\n\t\tthis.$checkDoNotAskAgain = $(`.${classes.doNotAskAgainInput}`, this.$ctx);\r\n\r\n\t\tthis.$buttonClose.on('click', this.onCloseClick.bind(this));\r\n\t\tthis.$checkDoNotAskAgain.on('click', this.setCookie.bind(this));\r\n\r\n\t\tthis.initializePopup()\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() { }\r\n\r\n\t_showLoungePopup() {\r\n\t\t$(this._ctx).addClass('state-m-lounge-popup--visible ');\r\n\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\t_hideLoungePopup() {\r\n\t\t$(this._ctx).removeClass('state-m-lounge-popup--visible ');\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\tprivate initializePopup(): void {\r\n\t\t// Perform a check for the cookie to correctly handle browser-back-behavior (where the component is still on the page).\r\n\t\tif (this.getCookie() != null)\r\n\t\t\treturn;\r\n\r\n\t\tOverlays.ShowOverlay(\r\n\t\t\t() => {\r\n\t\t\t\tthis._showLoungePopup();\r\n\t\t\t\tthis.setCookie();\r\n\t\t\t});\r\n\t}\r\n\r\n\tprivate onCloseClick(): void {\r\n\t\tOverlays.CloseOverlay(() => {\r\n\t\t\tthis._hideLoungePopup();\r\n\r\n\t\t\t// Highlight the tooltip inside the header\r\n\t\t\t$('.m-navigation-meta__tooltip').fadeIn();\r\n\t\t});\r\n\t}\r\n\r\n\tprivate getCookie(): string {\r\n\t\tconst cookieName = 'loungepopup_read';\r\n\t\treturn Cookies.get(cookieName);\r\n\t}\r\n\r\n\tprivate setCookie(): void {\r\n\t\tconst cookieName = 'loungepopup_read';\r\n\t\tif (this.$checkDoNotAskAgain.prop('checked') === true) {\r\n\t\t\t// Store as a persistent cookie (replaces session cookie if exists).\r\n\t\t\tCookies.set(cookieName, '1', { 'expires': 365 });\r\n\t\t} else {\r\n\t\t\t// Store as a session cookie (must delete first; does not replace permanent cookie).\r\n\t\t\tCookies.remove(cookieName);\r\n\t\t\tCookies.set(cookieName, '1', {});\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport 'select2'; // globally assign select2 fn to $ element\r\nconst classes = {\r\n\ttinyfilterChannelContainer: \"tintup-filter-channel\",\r\n\t//buttonTest: 'js-m-html-container__button'\r\n};\r\n\r\n@createModule('HTMLContainer')\r\n/**\r\n * HTMLContainer module implementation.\r\n *\r\n * @author Ellen Xia\r\n */\r\nexport class HTMLContainer extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() { }\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\n@createModule('ICalDownload')\r\n/**\r\n * iCal-download module implementation.\r\n */\r\nexport class ICalDownload extends TerrificSpec {\r\n\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n $(\".js-button\").on('click', () => this.downLoadCalendar($ctx));\r\n\t\tresolve();\r\n\t}\r\n\r\n\t\r\n\tstop() { }\r\n\r\n\tdownLoadCalendar($container :JQuery){\r\n\t\tvar calendarString=$container.attr(\"data-CalendarResult\");\r\n\t\twindow.open( \"data:text/calendar;charset=utf8,\" +calendarString);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\ttabButton: 'js-m-info-list__tab',\r\n\ttabPanel: 'js-m-info-list__panel',\r\n\ttabButtonActive: 'state-m-info-list__tab--active',\r\n\ttabPanelActive: 'state-m-info-list__panel--active',\r\n};\r\n\r\n@createModule('InfoList')\r\n/**\r\n * info-list module implementation.\r\n *\r\n */\r\nexport class InfoList extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$tabButton: JQuery;\r\n\t$tabPanel: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$tabButton = $(`.${classes.tabButton}`, this.$ctx);\r\n\t\tthis.$tabPanel = $(`.${classes.tabPanel}`, this.$ctx);\r\n\r\n\t\tthis.initTab();\r\n\t\tthis.$tabButton.on('click', this.onSwichTab.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitTab() {\r\n\t\tthis.$tabButton.first().addClass(classes.tabButtonActive);\r\n\t\tthis.$tabPanel.first().addClass(classes.tabPanelActive);\r\n\t}\r\n\r\n\tonSwichTab(ev: any) {\r\n\t\t$(ev.currentTarget).addClass(classes.tabButtonActive);\r\n\t\t$(ev.currentTarget).siblings().removeClass(classes.tabButtonActive);\r\n\t\tthis.$tabPanel.removeClass(classes.tabPanelActive)\r\n\t\tthis.$tabPanel.eq($(ev.currentTarget).index()).addClass(classes.tabPanelActive);\r\n\t}\r\n \r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tricCode:'m-investor-overview__dax-ricCode',\r\n\tquote:'m-investor-overview__dax-quote',\r\n\tchange:'m-investor-overview__dax-change',\r\n\tupdate:'m-investor-overview__dax-update',\r\n};\r\n\r\n@createModule('InvestorOverview')\r\n/**\r\n * investor-overview module implementation.\r\n *\r\n */\r\nexport class InvestorOverview extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tvar me = this;\r\n\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tme.getDaxData();\r\n\t\t}, 0);\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tgetDaxData(){\r\n\t\tconst configuration = this.$ctx.data(\"configuration\");\r\n\t\tconst apiEndpoint = this.$ctx.data(\"api-endpoint\");\r\n\t\t$.ajax({\r\n\t\t\ttype: 'POST',\r\n\t\t\turl: apiEndpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tConfiguration: configuration\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tconsole.log(\"success\");\r\n\t\t\t\tif(response!=null){\r\n\t\t\t\tvar jsonData=JSON.parse(response);\r\n\t\t\t\tthis.$ctx.find(`.${classes.ricCode}`).text(jsonData.riccode);\r\n\t\t\t\tthis.$ctx.find(`.${classes.quote}`).text(jsonData.quote);\r\n\t\t\t\tthis.$ctx.find(`.${classes.change}`).text(jsonData.change);\r\n\t\t\t\tthis.$ctx.find(`.${classes.update}`).text(jsonData.update);\r\n\t\t\t\tif(jsonData.isincrease===true)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!this.$ctx.find(`.${classes.quote}`).hasClass(\"m-investor-overview__dax-increase\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t this.$ctx.find(`.${classes.quote}`).addClass(\"m-investor-overview__dax-increase\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(jsonData.isincrease===false)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(this.$ctx.find(`.${classes.quote}`).hasClass(\"m-investor-overview__dax-increase\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t \tthis.$ctx.find(`.${classes.quote}`).removeClass(\"m-investor-overview__dax-increase\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\terror: () => {\r\n\t\t\t\tconsole.log(\"get dax data error\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tbuttonClose: 'js-m-lightbox__close',\r\n\tlightboxMask: 'js-m-lightbox__mask',\r\n\tstateLightboxVisible: \"state-m-lightbox--visible\",\r\n\tstateLightboxCarousel: \"state-m-lightbox--carousel\",\r\n\tlightbox: \"m-lightbox\",\r\n\tcarouselPrev: \"js-m-lightbox__prev\",\r\n\tcarouselNext: \"js-m-lightbox__next\",\r\n};\r\n\r\n@createModule('Lightbox')\r\n/**\r\n * Lightbox module implementation.\r\n *\r\n * @author Ellen Xia\r\n */\r\nexport class Lightbox extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tcarouselLength: number;\r\n\tcurrentIndex: number;\r\n\tnextIndex: number;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.carouselLength = $(\"html\").find(`.${classes.lightbox}`).length;\r\n\r\n\t\tthis.$ctx.find(`.${classes.buttonClose}`).on(\"click\", this.closeLightbox.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.lightboxMask}`).on(\"click\", this.closeLightbox.bind(this));\r\n\t\t\r\n\t\tthis.$ctx.find(`.${classes.carouselPrev}`).on(\"click\", this.carouselPrevClick.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.carouselNext}`).on(\"click\", this.carouselNextClick.bind(this));\r\n\r\n\t\tthis.lightboxAnchorClick();\r\n\t\tthis.lightboxCarousel();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tcloseLightbox() {\r\n\t\tthis.$ctx.removeClass(classes.stateLightboxVisible);\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\tlightboxAnchorClick() {\r\n\t\tconst lightboxID = this.$ctx.attr('id');\r\n\t\t$('html').on(\"click\",'[href=\"#' + lightboxID + '\"]',() => {\r\n\t\t\tthis.$ctx.addClass(classes.stateLightboxVisible);\r\n\t\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t\t});\r\n\t}\r\n\r\n\tlightboxCarousel() {\r\n\t\tconst $lightbox = $(\"html\").find(`.${classes.lightbox}`);\r\n\t\tif($lightbox.length > 1) {\r\n\t\t\t$lightbox.addClass(classes.stateLightboxCarousel);\r\n\t\t\t$lightbox.each((i: any, e: any) => {\r\n\t\t\t\t$(e).attr(\"data-carousel-index\", i+1);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcarouselPrevClick(ev: any) {\r\n\t\tconst $currentCarousel = $(ev.currentTarget).parents(`.${classes.lightbox}`)\r\n\t\t$currentCarousel.removeClass(classes.stateLightboxVisible);\r\n\t\tthis.currentIndex = $currentCarousel.data('carousel-index');\r\n\t\tif(this.currentIndex == 1) {\r\n\t\t\tthis.nextIndex = this.carouselLength;\r\n\t\t} else {\r\n\t\t\tthis.nextIndex = this.currentIndex - 1;\r\n\t\t}\r\n\t\t$('[data-carousel-index=\"' + this.nextIndex + '\"]').addClass(classes.stateLightboxVisible);\r\n\t}\r\n\r\n\tcarouselNextClick(ev: any) {\r\n\t\tconst $currentCarousel = $(ev.currentTarget).parents(`.${classes.lightbox}`)\r\n\t\t$currentCarousel.removeClass(classes.stateLightboxVisible);\r\n\t\tthis.currentIndex = $currentCarousel.data('carousel-index');\r\n\t\tif(this.currentIndex == this.carouselLength) {\r\n\t\t\tthis.nextIndex = 1;\r\n\t\t} else {\r\n\t\t\tthis.nextIndex = this.currentIndex + 1;\r\n\t\t}\r\n\t\t$('[data-carousel-index=\"' + this.nextIndex + '\"]').addClass(classes.stateLightboxVisible);\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Cookies from 'js-cookie';\r\nimport * as Overlays from '@project/shared/utils/overlays/js/overlays';\r\n\r\nconst classes = {\r\n\tacceptButton: 'js-m-language-popup__button',\r\n\tcloseButton: 'js-m-language-popup__close',\r\n\tactiveClass: 'state-m-language-popup--active',\r\n};\r\n\r\n@createModule('LanguagePopup')\r\n/**\r\n * language-popup module implementation.\r\n *\r\n */\r\nexport class LanguagePopup extends TerrificSpec {\r\n\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\r\n\t\t$(`.${classes.acceptButton}`, $ctx).on('click', this.onAcceptClick.bind(this));\r\n\t\t$(`.${classes.closeButton}`, $ctx).on('click', this.onCloseClick.bind(this));\r\n\r\n\t\tif (!this.cookieLanguagePopupRead()) {\r\n\t\t\tthis.showLayer();\r\n\t\t}\r\n\t\tresolve();\r\n\t}\r\n\r\n\t/**\r\n\t * method will accept all cookies and set language-popup to read\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonAcceptClick() {\r\n\t\tthis.setLanguagePopup();\r\n\t\tthis.hideLayer();\r\n\t}\r\n\r\n\t/**\r\n\t * method will close language-popup in Utils\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonCloseClick() {\r\n\t\tthis.setLanguagePopup();\r\n\t\tthis.hideLayer();\r\n\t}\r\n\r\n\t/**\r\n\t * returns if cookie notice was already read (cookielifetime 1 year // \"not read\" after 2 month, if not all accepted)\r\n\t *\r\n\t * @returns {boolean} was read\r\n\t */\r\n\t private cookieLanguagePopupRead(): boolean {\r\n\t\tconst readCookie = Cookies.get('LanguagePopup');\r\n\t\tif (readCookie) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Saves read status of language-popup, in not already set\r\n\t *\r\n\t * @param {boolean} force defines that cookie should be updated even if already set\r\n\t * @returns {void}\r\n\t */\r\n\t private setLanguagePopup(): void {\r\n\t\tconst readCookie = Cookies.get('LanguagePopup');\r\n\t\tif (readCookie) {\r\n\t\t\tCookies.remove('LanguagePopup');\r\n\t\t}\r\n\t\tCookies.set('LanguagePopup', '1', { expires: 365 });\r\n\t}\r\n\r\n\t/**\r\n\t * method hides cookiebar\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thideLayer() {\r\n\t\tOverlays.CloseOverlay(() => $(this._ctx).removeClass(classes.activeClass));\r\n\t}\r\n\r\n\t/**\r\n\t * method hides cookiebar\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tshowLayer() {\r\n\t\tOverlays.ShowOverlay(() => $(this._ctx).addClass(classes.activeClass), 250);\r\n\t}\r\n\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tbrandsSelector: 'js-m-customer-lounge-brand-intro__brand-select',\r\n};\r\n\r\n@createModule('CustomerLoungeBrandIntro')\r\n/**\r\n * @author \r\n */\r\n\r\nexport class CustomerLoungeBrandIntro extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.openOtherUrl();\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\topenOtherUrl() {\r\n\t\tconst $brandSelect = this.$ctx.find(`.${classes.brandsSelector}`);\r\n\t\tvar curBrand = $brandSelect.find(\"option:selected\").text();\r\n\t\t$brandSelect.on(\"change\",function(ev: Event){\r\n\t\t\tvar brand = $(ev.currentTarget).find(\"option:selected\").text();\r\n\t\t\tvar brandUrl = $(ev.currentTarget).val();\r\n\t\t\tbrandUrl = brandUrl.toString();\r\n\t\t\tif (brand!==curBrand) {\r\n\t\t\t\twindow.location.href = brandUrl;\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tteaserItem: 'm-customer-lounge-brand-product-table__item',\r\n\tstateHidden: 'h-visuallyhidden',\r\n\tloadMoreButton: 'js-load-more-button',\r\n\tloadMoreBar: 'js-load-more-bar'\r\n};\r\n\r\n@createModule('CustomerLoungeBrandProductTable')\r\n/**\r\n * @author \r\n */\r\n\r\nexport class CustomerLoungeBrandProductTable extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tisOpen: boolean;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.isOpen = false;\r\n\t\tthis._handleApplicationTeaserLoadMore();\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\t_handleApplicationTeaserLoadMore() {\r\n\t\t// if this an Application/Evergreen and not one of the other teasers and it has not yet been opened:\r\n\t\tif (typeof this.$ctx.data('shown-teasers') !== 'undefined' && this.isOpen === false) {\r\n\t\t\tconst $teaserItems = this.$ctx.find(`.${classes.teaserItem}`);\r\n\t\t\tlet minOfShowTeasers = this.$ctx.data('shown-teasers');\r\n\t\t\tlet PageSizeLoadMore = this.$ctx.data('load-items');\r\n\r\n\t\t\tif ($teaserItems.length <= minOfShowTeasers) {\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreBar}`).addClass(classes.stateHidden);\r\n\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t\t\t} else {\r\n\t\t\t\tminOfShowTeasers++;\r\n\t\t\t\t$teaserItems.filter(`:nth-child(n + ` + minOfShowTeasers + `)`).addClass(classes.stateHidden);\r\n\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\r\n\t\t\t\tlet currentShowTeasers = minOfShowTeasers -1;\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreButton}`).on('click', (ev: any) => {\r\n\t\t\t\t\tlet allOfShowTeasers = currentShowTeasers + PageSizeLoadMore;\r\n\t\t\t\t\tfor( var i=0; i= $teaserItems.length) {\r\n\t\t\t\t\t\t\t$(ev.currentTarget)\r\n\t\t\t\t\t\t\t\t.parent(`.${classes.loadMoreBar}`)\r\n\t\t\t\t\t\t\t\t.addClass(classes.stateHidden);\r\n\r\n\t\t\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tisCarousel: 'm-hero-article-stage--is-carousel',\r\n\tlargeItem: 'js-m-hero-article--large-item',\r\n\tsmallItem: 'js-m-hero-article--small-item',\r\n\tmainWrapper: 'js-m-hero-article-stage__main',\r\n\titemActive: 'state-m-hero-article--item-is-active',\r\n};\r\n\r\n@createModule('HeroArticleStage')\r\n/**\r\n * HeroArticleStage\r\n */\r\nexport class HeroArticleStage extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$largeItem: JQuery;\r\n\t$smallItem: JQuery;\r\n\t$mainWrapper: JQuery;\r\n\t$itemActive: JQuery;\r\n\tactiveIndex: number;\r\n\tsliderlength: number;\r\n\tverticalWrapperHeight: number;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$largeItem = $(`.${classes.largeItem}`, this.$ctx);\r\n\t\tthis.$smallItem = $(`.${classes.smallItem}`, this.$ctx);\r\n\t\tthis.$mainWrapper = $(`.${classes.mainWrapper}`, this.$ctx);\r\n\t\tthis.$itemActive = $(`.${classes.itemActive}`, this.$ctx);\r\n\t\tthis.activeIndex = 0;\r\n\t\tthis.sliderlength = this.$smallItem.length;\r\n\t\tthis.verticalWrapperHeight = 215 * 3;\r\n\r\n\t\tif(this.$ctx.hasClass(classes.isCarousel)) {\r\n\t\t\tthis.initScroller();\r\n\t\t};\r\n\r\n\t\tthis.RegisteredUpdate();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() { }\r\n\r\n\tsetActiveItem(pageNumber: number) {\r\n\t\tthis.$largeItem\r\n\t\t\t.removeClass(classes.itemActive)\r\n\t\t\t.eq(pageNumber)\r\n\t\t\t.addClass(classes.itemActive);\r\n\r\n\t\tthis.$smallItem\r\n\t\t\t.removeClass(classes.itemActive)\r\n\t\t\t.eq(pageNumber)\r\n\t\t\t.addClass(classes.itemActive);\r\n\r\n\t\tthis.$smallItem\r\n\t\t\t.removeAttr('style')\r\n\t\t\t.eq(pageNumber)\r\n\t\t\t.animate({\r\n\t\t\t\theight: 'hide'\r\n\t\t\t});\r\n\t}\r\n\r\n\tsetWrapperHeight(pageNumber: number) {\r\n\t\tvar verticalActiveHeight = this.verticalWrapperHeight;\r\n\t\tvar mainWrapperHeight = this.$largeItem.eq(pageNumber).height();\r\n\t\tif (mainWrapperHeight > verticalActiveHeight) {\r\n\t\t\tthis.$ctx.height(mainWrapperHeight);\r\n\t\t} else {\r\n\t\t\tthis.$ctx.height(verticalActiveHeight);\r\n\t\t}\r\n\t}\r\n\r\n\tgoToItemX(pageNumber: number) {\r\n\t\tvar me = this;\r\n\t\tme.setActiveItem(pageNumber);\r\n\t\t// setTimeout(() => {\r\n\t\t// \tme.setWrapperHeight(pageNumber);\r\n\t\t// }, 500);\r\n\r\n\t\tvar interval = setInterval(function () {\r\n\t\t\tpageNumber++;\r\n\t\t\tif (pageNumber > me.sliderlength - 1) {\r\n\t\t\t\tpageNumber = 0;\r\n\t\t\t}\r\n\t\t\tme.setActiveItem(pageNumber);\r\n\t\t\t//me.setWrapperHeight(pageNumber);\r\n\t\t}, 4000);\r\n\r\n\t\tthis.$ctx.mouseenter(function () {\r\n\t\t\tclearInterval(interval);\r\n\t\t});\r\n\r\n\t\tthis.$ctx.mouseleave(function () {\r\n\t\t\tinterval = setInterval(function () {\r\n\t\t\t\tpageNumber++;\r\n\t\t\t\tif (pageNumber > me.sliderlength - 1) {\r\n\t\t\t\t\tpageNumber = 0;\r\n\t\t\t\t}\r\n\t\t\t\tme.setActiveItem(pageNumber);\r\n\t\t\t\t//me.setWrapperHeight(pageNumber);\r\n\t\t\t}, 4000);\r\n\t\t});\r\n\t}\r\n\r\n\tinitScroller() {\r\n\t\tthis.goToItemX(this.activeIndex);\r\n\t}\r\n\r\n\tRegisteredUpdate() {\r\n\t\tif(Track.isKnownMarketoLead()) {\r\n\t\t\tthis.$ctx.find('.m-hero-article-stage--gated').removeClass('m-hero-article-stage--locked');\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tweChatLabel: 'js-m-contact-teaser-card__weChat-label',\r\n\tweChatQRBox: 'js-m-contact-teaser-card__weChat-qr-box',\r\n\tstateQRShow: 'state-m-contact-teaser-card__weChat-qr-box--active'\r\n};\r\n\r\n@createModule('ContactTeaserCard')\r\n/**\r\n * @author \r\n */\r\n\r\nexport class ContactTeaserCard extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$weChatLabel: JQuery;\r\n\t$weChatQRBox: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$weChatLabel = $(`.${classes.weChatLabel}`, this.$ctx);\r\n\t\tthis.$weChatQRBox = $(`.${classes.weChatQRBox}`, this.$ctx);\r\n\r\n\t\t$('html').on('click', () => {\r\n\t\t\tthis.hideQRCode();\r\n\t\t})\r\n\r\n\t\tthis.$weChatLabel.on('click',this.openQRCode.bind(this));\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\thideQRCode() {\r\n\t\tthis.$weChatQRBox.removeClass(classes.stateQRShow);\r\n\t}\r\n\t\r\n\topenQRCode(ev:Event) { \r\n\t\tev.stopPropagation();\r\n\t\tthis.$weChatQRBox.toggleClass(classes.stateQRShow); \r\n\t}\r\n \r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tbuttonClose: 'js-m-contact-teaser-popup__close',\r\n\tstateContactTeaserPopupShow: 'state-m-contact-teaser-popup--visible'\r\n};\r\n\r\n@createModule('ContactTeaserPopup')\r\n/**\r\n * @author \r\n */\r\n\r\nexport class ContactTeaserPopup extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$buttonClose: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$buttonClose = $(`.${classes.buttonClose}`, this.$ctx);\r\n\r\n\t\tthis.$buttonClose.on('click', this.onCloseClick.bind(this));\r\n\r\n\t\tthis.initContactTeaserPopup();\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\t_showContactTeaserPopup() {\r\n\t\t$(this._ctx).addClass(classes.stateContactTeaserPopupShow);\r\n\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\t_hideContactTeaserPopup() {\r\n\t\t$(this._ctx).removeClass(classes.stateContactTeaserPopupShow);\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\tinitContactTeaserPopup() {\r\n\t\t$(this._ctx).parent().find(\".js-open-more-contacts\").on('click', () => {\r\n\t\t\tthis._showContactTeaserPopup();\r\n\t\t})\r\n\t}\r\n\r\n\tonCloseClick() {\r\n\t\tvar me=this;\r\n\t\tme._hideContactTeaserPopup();\r\n\t}\r\n\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\n\r\n@createModule('ContactTeaserLarge')\r\n/**\r\n * @author \r\n */\r\nexport class ContactTeaserLarge extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\t\r\n\t\tthis.initMobileHide(this._ctx);\r\n\t\tonBreakpointChange(() => this.initMobileHide(this._ctx));\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\tinitMobileHide(ctx: HTMLElement) {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small' || viewport === 'medium') {\r\n\t\t\tif ($(ctx).siblings().length == 0) {\r\n\t\t\t\t$(ctx).parent('.g-grid__item').hide();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$(ctx).parent('.g-grid__item').removeAttr(\"style\");\r\n\t\t}\r\n\t}\r\n \r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tstateExpanded: 'm-expansion-panel--expanded',\r\n\tcontentWrapper: 'm-expansion-panel--content-wrapper',\r\n};\r\n\r\n@createModule('ExpansionPanel')\r\n/**\r\n * expansion-panel\r\n *\r\n */\r\nexport class ExpansionPanel extends TerrificSpec {\r\n\t$ctx: JQuery; \r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tthis.initExpansionPanel();\r\n\t\tthis.$ctx.on('click', this.togglePanel.bind(this));\r\n\t\tthis.panelAnchorClick();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitExpansionPanel() {\r\n\t\tconst $panelHead = this.$ctx;\r\n\t\t$panelHead.each((index, element) => {\r\n\t\t\tconst $this = $(element);\r\n\t\t\tif (!$this.hasClass(classes.stateExpanded)) {\r\n\t\t\t\t$this.next().addClass(classes.contentWrapper);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\ttogglePanel(ev: Event) {\r\n\t\tconst $this = $(ev.currentTarget)\r\n\t\tif ($this.hasClass(classes.stateExpanded)) {\r\n\t\t\t$this.removeClass(classes.stateExpanded);\r\n\t\t\t$this.next().removeClass(classes.contentWrapper).slideUp();\r\n\t\t} else {\r\n\t\t\t$this.addClass(classes.stateExpanded);\r\n\t\t\t$this.next().removeClass(classes.contentWrapper).slideDown();\r\n\t\t}\r\n\t}\r\n\tpanelAnchorClick() {\r\n\t\tconst panelID = this.$ctx.attr('data-anchor-id');\r\n\t\t$('.o-header__sticky-bar').on(\"click\",'[href=\"#' + panelID + '\"]',() => {\r\n\t\t\tthis.$ctx.next().slideDown();\r\n\t\t\tthis.$ctx.addClass(classes.stateExpanded);\r\n\t\t});\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\nimport { MarketoFormGlobal } from '../../../molecules/marketo-form-global/js/marketo-form-global';\r\n\r\nconst classes = {\r\n\tbuttonClose: 'js-m-marketo-lightbox__close',\r\n\tstateLightboxVisible: 'state-m-marketo-lightbox--visible',\r\n\tlightboxDialog: 'm-marketo-lightbox__dialog',\r\n\tlightboxLoading: 'm-marketo-lightbox__dialog-loading',\r\n\tlightbox: 'm-marketo-lightbox',\r\n\tstateContentHide: 'm-marketo-lightbox--block-hidden',\r\n\tblockedMsg: 'js-m-marketo-lightbox-blocked-msg',\r\n\tformProductName: 'js-m-stage-product__headline',\r\n};\r\n\r\n@createModule('MarketoLightbox')\r\nexport class MarketoLightbox extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tmarketoService: MarketoFormGlobal;\r\n\tproductNameValue: string;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.marketoService = new MarketoFormGlobal();\r\n\r\n\t\tlet $this = this;\r\n\t\tsetTimeout(function() {\r\n\t\t\tvar mktoflowId = $this.$ctx.data('t-mktoflowid');\r\n\t\t\tvar pageHref = $this.$ctx.data('t-pagehref');\r\n\t\t\tvar closeButtonDisabled = $this.$ctx.data('t-closebuttondisabled');\r\n\t\t\tvar campaignId = $this.$ctx.data('t-mktocampaign-main-id');\r\n\t\t\tvar themeModeAttribute = $this.$ctx.data('t-thememodeattribute');\r\n\t\t\tvar target = $this.$ctx.data('t-target');\r\n\t\t\tif (mktoflowId != '' && mktoflowId != undefined && mktoflowId.length > 0) {\r\n\t\t\t\tif (!Track.isKnownMarketoLead()) {\r\n\t\t\t\t\t$this.getMktoLightboxView(\r\n\t\t\t\t\t\tmktoflowId,\r\n\t\t\t\t\t\tpageHref,\r\n\t\t\t\t\t\tcloseButtonDisabled,\r\n\t\t\t\t\t\tthemeModeAttribute,\r\n\t\t\t\t\t\tcampaignId,\r\n\t\t\t\t\t\ttarget\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, 1000);\r\n\r\n\t\tsetTimeout(function() {\r\n\t\t\t$('html')\r\n\t\t\t\t.find('a')\r\n\t\t\t\t.on('click', function(ev: Event) {\r\n\t\t\t\t\tvar flowId = $(this).data('mktoflow-id');\r\n\t\t\t\t\tvar closeButtonDisabled = $(this).data('mktoflow-close-disabled');\r\n\t\t\t\t\tvar videoId = $(this).data('video-id');\r\n\t\t\t\t\tvar campaignId = $(this).data('mktocampaign-main-id');\r\n\t\t\t\t\tlet href = $(this).attr('href');\r\n\t\t\t\t\tvar themeModeAttribute = $(this).data('mkto-themeattribute');\r\n\t\t\t\t\tvar target = $(this).attr('target');\r\n\t\t\t\t\tif (flowId != undefined) {\r\n\t\t\t\t\t\tif (flowId.length > 0) {\r\n\t\t\t\t\t\t\tif (!Track.isKnownMarketoLead()) {\r\n\t\t\t\t\t\t\t\t$this.getMktoLightboxView(\r\n\t\t\t\t\t\t\t\t\tflowId,\r\n\t\t\t\t\t\t\t\t\thref,\r\n\t\t\t\t\t\t\t\t\tcloseButtonDisabled,\r\n\t\t\t\t\t\t\t\t\tthemeModeAttribute,\r\n\t\t\t\t\t\t\t\t\tcampaignId,\r\n\t\t\t\t\t\t\t\t\tvideoId,\r\n\t\t\t\t\t\t\t\t\ttarget\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tev.preventDefault();\r\n\t\t\t\t\t\t\t\t$this.getMktoLightboxData(\r\n\t\t\t\t\t\t\t\t\tflowId,\r\n\t\t\t\t\t\t\t\t\thref,\r\n\t\t\t\t\t\t\t\t\tcloseButtonDisabled,\r\n\t\t\t\t\t\t\t\t\tthemeModeAttribute,\r\n\t\t\t\t\t\t\t\t\tcampaignId,\r\n\t\t\t\t\t\t\t\t\tvideoId,\r\n\t\t\t\t\t\t\t\t\ttarget\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.log('lightbox: flow-id is empty');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.log('lightbox: flow-id is undefined');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}, 1000);\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tgetMktoLightboxView(\r\n\t\tflowId: string,\r\n\t\toriginalHref: string,\r\n\t\tcloseButtonDisabled: boolean,\r\n\t\tthemeModeAttribute: string = '',\r\n\t\tcampaignId: string = '',\r\n\t\tvideoId: string = '',\r\n\t\ttarget: string = ''\r\n\t) {\r\n\t\t// partial view is called, show black-transparent overlay and loading indicator\r\n\t\tthis.showLightbox();\r\n\t\tthis.showIndicator();\r\n\r\n\t\tif (closeButtonDisabled == undefined) {\r\n\t\t\tcloseButtonDisabled = false;\r\n\t\t}\r\n\r\n\t\tif (originalHref == undefined) {\r\n\t\t\toriginalHref = '';\r\n\t\t}\r\n\t\tif (themeModeAttribute === undefined || themeModeAttribute === null || themeModeAttribute === '') {\r\n\t\t\tthemeModeAttribute = $('html').hasClass('l-campaign') ? 'l-campaign' : themeModeAttribute;\r\n\t\t}\r\n\r\n\t\tvar formProductName = $('html').find(`.${classes.formProductName}`);\r\n\t\tif (formProductName.length > 0) {\r\n\t\t\tthis.productNameValue = $(formProductName[0]).text();\r\n\t\t}\r\n\t\t\r\n\r\n\t\tconst endpoint = '/partial-updates/marketo/lightboxpartial';\r\n\t\t$.ajax({\r\n\t\t\ttype: 'get',\r\n\t\t\turl: endpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata: {\r\n\t\t\t\tflowId: flowId,\r\n\t\t\t\toriginLink: originalHref,\r\n\t\t\t\tcloseButtonDisabled: closeButtonDisabled,\r\n\t\t\t\tthemeModeAttribute: themeModeAttribute,\r\n\t\t\t\tcampaignId: campaignId,\r\n\t\t\t\tproductName: this.productNameValue,\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response.length > 2) {\r\n\t\t\t\t\tlet $dialog = this.$ctx.find(`div.${classes.lightboxDialog}`);\r\n\r\n\t\t\t\t\t$dialog.empty();\r\n\t\t\t\t\t$dialog.append(response);\r\n\t\t\t\t\tthis.rebindEvents();\r\n\t\t\t\t\tthis.loadForm(originalHref, videoId, target);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.log('lightbox: get partial-view failed');\r\n\t\t\t\t\tthis.closeLightbox();\r\n\t\t\t\t\tthis.doSubmitAction(false, originalHref, videoId, target);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcomplete: () => {},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(\r\n\t\t\t\t\t`lightbox: get partial-view error, endpoint: ${endpoint}, ${xhr.status}, ${\r\n\t\t\t\t\t\txhr.statusText\r\n\t\t\t\t\t}, ${error}`\r\n\t\t\t\t);\r\n\t\t\t\tthis.doSubmitAction(false, originalHref, videoId, target);\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tgetMktoLightboxData(\r\n\t\tflowId: string,\r\n\t\toriginalHref: string,\r\n\t\tcloseButtonDisabled: boolean,\r\n\t\tthemeModeAttribute: string = '',\r\n\t\tcampaignId: string = '',\r\n\t\tvideoId: string = '',\r\n\t\ttarget: string = ''\r\n\t) {\r\n\t\tlet _this = this;\r\n\t\tlet clickEventTriggered = false;\r\n\t\tif (closeButtonDisabled == undefined) {\r\n\t\t\tcloseButtonDisabled = false;\r\n\t\t}\r\n\r\n\t\tif (originalHref == undefined) {\r\n\t\t\toriginalHref = '';\r\n\t\t}\r\n\t\tif (themeModeAttribute === undefined || themeModeAttribute === null || themeModeAttribute === '') {\r\n\t\t\tthemeModeAttribute = $('html').hasClass('l-campaign') ? 'l-campaign' : themeModeAttribute;\r\n\t\t}\r\n\t\tthis.showLightbox();\r\n\t\tthis.showIndicator();\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'get',\r\n\t\t\turl:\r\n\t\t\t\twindow.location.origin +\r\n\t\t\t\t'/partial-updates/marketo/lightboxpartialformdata?' +\r\n\t\t\t\t'flowId=' +\r\n\t\t\t\tflowId +\r\n\t\t\t\t'&originLink=' +\r\n\t\t\t\toriginalHref +\r\n\t\t\t\t'&isDisplayForm=true' +\r\n\t\t\t\t'&campaignId=' +\r\n\t\t\t\tcampaignId,\r\n\t\t\tdataType: 'html',\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response.length > 2) {\r\n\t\t\t\t\tthis.closeLightbox();\r\n\t\t\t\t\tlet $dialog = _this.$ctx.find(`div.${classes.lightboxDialog}`);\r\n\t\t\t\t\t$dialog.empty();\r\n\t\t\t\t\t$dialog.append(response);\r\n\t\t\t\t\t_this.rebindEvents();\r\n\t\t\t\t\t_this.loadForm('', '', target);\r\n\t\t\t\t\tlet $lightboxContainer = _this.$ctx.find(`div[data-id=\"lightboxContainer\"]`);\r\n\r\n\t\t\t\t\tvar IsHiddenFormSubmitrequired = $lightboxContainer.data('hidden-form-submit-required');\r\n\t\t\t\t\tvar HiddenFormSubmitId = $lightboxContainer.data('lightbox-form-id');\r\n\t\t\t\t\tif (IsHiddenFormSubmitrequired == true) {\r\n\t\t\t\t\t\tconst MktoForms2 = (window as any)['MktoForms2'];\r\n\t\t\t\t\t\tMktoForms2.whenReady(function(form: any) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tHiddenFormSubmitId !== undefined &&\r\n\t\t\t\t\t\t\t\tNumber(HiddenFormSubmitId) == form.getId() &&\r\n\t\t\t\t\t\t\t\tclickEventTriggered !== true\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tform.submit();\r\n\t\t\t\t\t\t\t\tif (originalHref != undefined && originalHref.length > 0) {\r\n\t\t\t\t\t\t\t\t\t// Create the element\r\n\t\t\t\t\t\t\t\t\tclickEventTriggered = true;\r\n\t\t\t\t\t\t\t\t\tconst link: HTMLAnchorElement = document.createElement('a');\r\n\t\t\t\t\t\t\t\t\tlink.href = originalHref;\r\n\t\t\t\t\t\t\t\t\tlink.download = originalHref.split('/').slice(-1)[0];\r\n\t\t\t\t\t\t\t\t\tlink.target = target;\r\n\t\t\t\t\t\t\t\t\t// Append it to the DOM temporarily\r\n\t\t\t\t\t\t\t\t\tdocument.body.appendChild(link);\r\n\r\n\t\t\t\t\t\t\t\t\t// Perform any action, e.g., programmatic click\r\n\t\t\t\t\t\t\t\t\tlink.click();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t_this.hiddenSubmitForm(HiddenFormSubmitId);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.triggerClickEvent(originalHref, target);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.log('lightbox: get partial-view failed');\r\n\t\t\t\t\tthis.closeLightbox();\r\n\t\t\t\t\tthis.doSubmitAction(false, '', '', '');\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\tthis.hideIndicator();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\ttriggerClickEvent(originalHref: string, target: string) {\r\n\t\t// Create the element\r\n\t\tconst link: HTMLAnchorElement = document.createElement('a');\r\n\t\tlink.href = originalHref;\r\n\t\tlink.download = originalHref.split('/').slice(-1)[0];\r\n\t\tlink.target = target;\r\n\t\t// Append it to the DOM temporarily\r\n\t\tdocument.body.appendChild(link);\r\n\r\n\t\t// Perform any action, e.g., programmatic click\r\n\t\tlink.click();\r\n\r\n\t\t// Remove the element from the DOM\r\n\t\tlink.remove(); // Removes the element from the DOM\r\n\t}\r\n\r\n\tprivate _marketoFormInitialized: boolean = false;\r\n\tprivate _marketoFormInitializationTimer: number = null;\r\n\tloadForm(originalHref: string, videoId: string = '', target: string = '') {\r\n\t\tconst MktoForms2 = (window as any)['MktoForms2'];\r\n\t\tlet _this = this;\r\n\r\n\t\tif (typeof MktoForms2 != 'object' && this._marketoFormInitializationTimer == null) {\r\n\t\t\t// Watch for te Marketo script being loaded.\r\n\t\t\t//\tMechanism based on https://nation.marketo.com/t5/product-blogs/accurately-background-loading-the-mktoforms2-global-object/ba-p/309609\r\n\t\t\tdocument.addEventListener('load', () => this.loadForm(originalHref, videoId, target), true);\r\n\r\n\t\t\t// Display failure text after a delay (give the script some time to load)\r\n\t\t\tthis._marketoFormInitializationTimer = window.setTimeout(() => {\r\n\t\t\t\tthis._marketoFormInitializationTimer = null;\r\n\t\t\t\t// Marketo is broken, user has disabled tracking or scripts are blocked\r\n\t\t\t\tconsole.debug('Lightbox: form is blocked');\r\n\t\t\t\t_this.hideIndicator();\r\n\t\t\t\t_this.displayFormBox();\r\n\t\t\t\t_this.$ctx.find(`.${classes.blockedMsg}`).removeClass(classes.stateContentHide);\r\n\t\t\t}, 3000);\r\n\t\t} else if (typeof MktoForms2 == 'object' && !this._marketoFormInitialized) {\r\n\t\t\tdocument.removeEventListener('load', () => this.loadForm(originalHref, videoId, target), true);\r\n\t\t\tthis._marketoFormInitialized = true;\r\n\t\t\tif (this._marketoFormInitializationTimer) {\r\n\t\t\t\tclearTimeout(this._marketoFormInitializationTimer);\r\n\t\t\t}\r\n\r\n\t\t\tlet $formContainer = this.$ctx.find(`div[data-id=\"formContainer\"]`);\r\n\r\n\t\t\tlet showMessage = $formContainer.parent('div[data-id=\"lightboxContainer\"]').data('show-message');\r\n\t\t\tlet formHref = $formContainer.data('form-href');\r\n\t\t\tlet envId = $formContainer.data('environment-id');\r\n\t\t\tlet formId = $formContainer.data('form-id');\r\n\t\t\tlet $formNode = $formContainer.find('form');\r\n\r\n\t\t\tMktoForms2.loadForm(formHref, envId, formId, function(form: any) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// partial view is called successfully, hide indicator\r\n\t\t\t\t\t_this.hideIndicator();\r\n\t\t\t\t\t_this.displayFormBox();\r\n\r\n\t\t\t\t\tform.onSuccess(function(values: any, followUpUrl: string) {\r\n\t\t\t\t\t\tTrack.setKnownMarketoLead(true);\r\n\t\t\t\t\t\t_this.doSubmitAction(showMessage, originalHref, videoId, target);\r\n\t\t\t\t\t\tlet IsSendDataToGtm = $formNode.data('sc-send-data-to-gtm');\r\n\t\t\t\t\t\tif (IsSendDataToGtm) {\r\n\t\t\t\t\t\t\tvar typeOfForm = $formNode.data('show-message');\r\n\r\n\t\t\t\t\t\t\tconst trackdata: {\r\n\t\t\t\t\t\t\t\tevent: string;\r\n\t\t\t\t\t\t\t\tform_id: string;\r\n\t\t\t\t\t\t\t\tform_name: string;\r\n\t\t\t\t\t\t\t\tform_destination: string;\r\n\t\t\t\t\t\t\t\tform_submit_text: string;\r\n\t\t\t\t\t\t\t} = {\r\n\t\t\t\t\t\t\t\tevent: 'form_submit',\r\n\t\t\t\t\t\t\t\tform_id: $($formNode).attr('id'),\r\n\t\t\t\t\t\t\t\tform_name: typeOfForm,\r\n\t\t\t\t\t\t\t\tform_destination: '',\r\n\t\t\t\t\t\t\t\tform_submit_text: '',\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tTrack.gtmTrack(trackdata);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tform.onSubmit(function() {\r\n\t\t\t\t\t\t_this.marketoService.formatPhoneNumber(form);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif (Track.isKnownMarketoLead()) {\r\n\t\t\t\t\t\tform.vals({ formVersion: 'Known' });\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\t_this.$ctx.find(`.${classes.blockedMsg}`).removeClass(classes.stateContentHide);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t_this.marketoService.initializeMarketoOnScriptLoad();\r\n\t\t}\r\n\t}\r\n\r\n\thiddenSubmitForm(hiddenForm: any) {\r\n\t\tlet formId = hiddenForm;\r\n\t\tlet formName = jQuery('div[data-form-id=\"' + formId + '\"] form').attr('data-form-name');\t\t\t\r\n\t\tconst trackdata: {\r\n\t\t\tevent: string;\r\n\t\t\tform_id: string;\r\n\t\t\tform_name: string;\r\n\t\t\tform_destination: string;\r\n\t\t\tform_hidden_submit_text: string;\r\n\t\t} = {\r\n\t\t\tevent: 'hidden_form_submit',\r\n\t\t\tform_id: formId,\r\n\t\t\tform_name: formName.toString(),\r\n\t\t\tform_destination: '',\r\n\t\t\tform_hidden_submit_text: '',\r\n\t\t};\r\n\t\tTrack.gtmTrack(trackdata);\r\n\t}\r\n\trebindEvents() {\r\n\t\tlet $this = this;\r\n\r\n\t\tthis.$ctx.find(`.${classes.buttonClose}`).on('click', function() {\r\n\t\t\t$this.closeLightbox();\r\n\t\t});\r\n\t}\r\n\r\n\tremoveCloseEvents() {\r\n\t\tlet $this = this;\r\n\r\n\t\tthis.$ctx.find(`.${classes.buttonClose}`).off('click', function() {\r\n\t\t\t$this.closeLightbox();\r\n\t\t});\r\n\t}\r\n\r\n\tshowLightbox() {\r\n\t\t$('html')\r\n\t\t\t.find(`.${classes.lightbox}`)\r\n\t\t\t.addClass(classes.stateLightboxVisible);\r\n\t\t$('html').addClass('no-scrolling--without-scrollbar');\r\n\t}\r\n\r\n\tcloseLightbox() {\r\n\t\tthis.$ctx.removeClass(classes.stateLightboxVisible);\r\n\t\tthis.$ctx.find(`.${classes.lightboxDialog}`).empty();\r\n\t\t$('html').removeClass('no-scrolling--without-scrollbar');\r\n\t\tthis._marketoFormInitialized = false;\r\n\t\tthis._marketoFormInitializationTimer == null;\r\n\t}\r\n\r\n\tdisplayConfirmationBox() {\r\n\t\tlet $confirmContainer = this.$ctx.find(`div[data-id=\"confirmationContainer\"]`);\r\n\t\t$confirmContainer.removeClass(classes.stateContentHide);\r\n\t}\r\n\r\n\tdisplayFormBox() {\r\n\t\tlet $formContainer = this.$ctx.find(`div[data-id=\"formContainer\"]`);\r\n\t\t$formContainer.removeClass(classes.stateContentHide);\r\n\t}\r\n\r\n\thideFormBox() {\r\n\t\tlet $formContainer = this.$ctx.find(`div[data-id=\"formContainer\"]`);\r\n\t\t$formContainer.addClass(classes.stateContentHide);\r\n\t}\r\n\r\n\thideIndicator() {\r\n\t\tlet $dialog = this.$ctx.find(`.${classes.lightboxDialog}`);\r\n\t\t$dialog.removeClass(classes.stateContentHide);\r\n\r\n\t\tlet $indicator = this.$ctx.find(`.${classes.lightboxLoading}`);\r\n\t\t$indicator.addClass(classes.stateContentHide);\r\n\t}\r\n\r\n\tshowIndicator() {\r\n\t\tlet $dialog = this.$ctx.find(`.${classes.lightboxDialog}`);\r\n\t\t$dialog.addClass(classes.stateContentHide);\r\n\r\n\t\tlet $indicator = this.$ctx.find(`.${classes.lightboxLoading}`);\r\n\t\t$indicator.removeClass(classes.stateContentHide);\r\n\t}\r\n\r\n\tdoSubmitAction(showConfirmationMsg: boolean, originalHref: string, videoId: string = '', target: string = '') {\r\n\t\t// confirmation message\r\n\t\tif (showConfirmationMsg) {\r\n\t\t\tthis.hideFormBox();\r\n\t\t\tthis.displayConfirmationBox();\r\n\r\n\t\t\t// go to original link\r\n\t\t} else {\r\n\t\t\tthis.closeLightbox();\r\n\t\t\tif (videoId.length > 0) {\r\n\t\t\t\t//play\r\n\t\t\t\t$('[data-video-id=\"' + videoId + '\"] .mi-big-play-cover').trigger('click');\r\n\t\t\t\t$('[data-video-id=\"' + videoId + '\"] .js-a-video__locked').remove();\r\n\t\t\t} else {\r\n\t\t\t\tif (originalHref != undefined && originalHref.length > 0) {\r\n\t\t\t\t\tthis.triggerClickEvent(originalHref, target);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//unlock\r\n\t\t$('.a-video--locked').removeClass('a-video--locked');\r\n\t\t$('.m-download-item--locked').removeClass('m-download-item--locked');\r\n\t\t$('.m-download-table__item--locked').removeClass('m-download-table__item--locked');\r\n\t\t$('.m-hero-article-stage--locked').removeClass('m-hero-article-stage--locked');\r\n\t\t$('.m-scrollable-teaser-item--locked').removeClass('m-scrollable-teaser-item--locked');\r\n\t\t$('.m-talk--locked').removeClass('m-talk--locked');\r\n\t\t$('.m-teaser-large--locked').removeClass('m-teaser-large--locked');\r\n\t\t$('.o-teaser-content-area__item').each((i, e) => {\r\n\t\t\tconst $teaser = $(e).children();\r\n\t\t\tconst classList = $teaser.attr('class');\r\n\t\t\tconst className = classList.split(' ');\r\n\t\t\t$teaser.removeClass(className[0] + '--locked');\r\n\t\t});\r\n\t}\r\n\tstop() {}\r\n}\r\n","var t=\"\";if(document.querySelector(\".m-error-404\")instanceof HTMLElement){window.onkeyup=function(e){var n=e.keyCode?e.keyCode:e.which;var r=\"38384040373937396665\";if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement){t=\"\"}else{t+=\"\"+n;if(r.indexOf(t)!==0){t=\"\"}else if(r===t){t=\"\";var i=document.createElement(\"div\");i.id=\"pm\";i.style=\"height: 450px; width:342px; position: fixed; top:50%; left:50%; transform:translate(-50%,-50%); background: #fff; box-shadow: 0 0 15px 15px #fff; z-index: 9999;\";document.body.appendChild(i);l.init(document.getElementById(\"pm\"))}}};var p=4,R=3,_=2,b=1,O=11,N=5,U=6,F=7,D=8,W=9,B=10,z={};z.FPS=30;z.Ghost=function(v,s,e){var d=null,S=null,y=null,P=null,l=null;function u(e,n){var r=f()?1:c()?4:2,i=e===_&&-r||e===O&&r||0,t=e===b&&r||e===R&&-r||0;return{x:o(n.x,i),y:o(n.y,t)}}function o(e,n){var r=e%10,i=r+n;if(r!==0&&i>10){return e+(10-r)}else if(r>0&&i<0){return e-r}return e+n}function f(){return y!==null}function n(){return P===null}function c(){return y===null&&P!==null}function a(){var e=S===_||S===O?[R,b]:[_,O];return e[Math.floor(Math.random()*2)]}function r(){P=null;y=null;d={x:90,y:80};S=a();l=a()}function i(e){return e%10===0}function t(e){return e===_&&O||e===O&&_||e===R&&b||R}function h(){S=t(S);y=v.getTick()}function m(){y=null;P=v.getTick()}function L(e){return Math.round(e/10)}function T(e,n){var r=e%10;if(r===0){return e}else if(n===O||n===b){return e+(10-r)}else{return e-r}}function x(e){return i(e.y)&&i(e.x)}function E(e){return(v.getTick()-e)/z.FPS}function w(){if(y){if(E(y)>5){return v.getTick()%20>10?\"#FFFFFF\":\"#0000BB\"}else{return\"#0000BB\"}}else if(P){return\"#222\"}return e}function A(e){var n=s.blockSize,r=d.y/10*n,i=d.x/10*n;if(y&&E(y)>8){y=null}if(P&&E(P)>3){P=null}var t=i+n;var l=r+n-3;var u=n/10;var o=v.getTick()%10>5?3:-3;var f=v.getTick()%10>5?-3:3;e.fillStyle=w();e.beginPath();e.moveTo(i,l);e.quadraticCurveTo(i,r,i+n/2,r);e.quadraticCurveTo(i+n,r,i+n,l);e.quadraticCurveTo(t-u*1,l+o,t-u*2,l);e.quadraticCurveTo(t-u*3,l+f,t-u*4,l);e.quadraticCurveTo(t-u*5,l+o,t-u*6,l);e.quadraticCurveTo(t-u*7,l+f,t-u*8,l);e.quadraticCurveTo(t-u*9,l+o,t-u*10,l);e.closePath();e.fill();e.beginPath();e.fillStyle=\"#000\";e.arc(i+6,r+6,n/6,0,300,false);e.arc(i+n-6,r+6,n/6,0,300,false);e.closePath();e.fill();var c=n/12;var a={};a[O]=[c,0];a[_]=[-c,0];a[R]=[0,-c];a[b]=[0,c];e.beginPath();e.fillStyle=\"#fff\";e.arc(i+6+a[S][0],r+6+a[S][1],n/15,0,300,false);e.arc(i+n-6+a[S][0],r+6+a[S][1],n/15,0,300,false);e.closePath();e.fill()}function C(e){if(e.y===100&&e.x>=190&&S===O){return{y:100,x:-10}}if(e.y===100&&e.x<=-10&&S===_){return d={y:100,x:190}}return false}function g(e){var n=d,r=x(d),i=null;if(l!==S){i=u(l,d);if(r&&s.isFloorSpace({y:L(T(i.y,l)),x:L(T(i.x,l))})){S=l}else{i=null}}if(i===null){i=u(S,d)}if(r&&s.isWallSpace({y:L(T(i.y,S)),x:L(T(i.x,S))})){l=a();return g(e)}d=i;var t=C(d);if(t){d=t}l=a();return{new:d,old:n}}return{eat:m,isVunerable:f,isDangerous:n,makeEatable:h,reset:r,move:g,draw:A}};z.User=function(l,u){var o=null,f=null,c=null,a=null,n=null,r=5,i={};i[H.ARROW_LEFT]=_;i[H.ARROW_UP]=R;i[H.ARROW_RIGHT]=O;i[H.ARROW_DOWN]=b;function v(e){r+=e;if(r>=1e4&&r-e<1e4){n+=1}}function e(){return r}function t(){n-=1}function s(){return n}function d(){r=0;n=3;S()}function S(){y();c=0}function y(){o={x:90,y:120};f=_;a=_}function P(){d();y()}function h(e){if(typeof i[e.keyCode]!==\"undefined\"){a=i[e.keyCode];e.preventDefault();e.stopPropagation();return false}return true}function m(e,n){return{x:n.x+(e===_&&-2||e===O&&2||0),y:n.y+(e===b&&2||e===R&&-2||0)}}function L(e){return e%10===0}function T(e){return Math.round(e/10)}function x(e,n){var r=e%10;if(r===0){return e}else if(n===O||n===b){return e+(10-r)}else{return e-r}}function E(e,n){return{y:T(x(e.y,n)),x:T(x(e.x,n))}}function w(e){return L(e.y)&&L(e.x)}function A(e,n){return(e===_||e===O)&&(n===_||n===O)||(e===R||e===b)&&(n===R||n===b)}function C(e){var n=null,r=null,i=o,t=null;if(a!==f){n=m(a,o);if(A(a,f)||w(o)&&u.isFloorSpace(E(n,a))){f=a}else{n=null}}if(n===null){n=m(f,o)}if(w(o)&&u.isWallSpace(E(n,f))){f=p}if(f===p){return{new:o,old:o}}if(n.y===100&&n.x>=190&&f===O){n={y:100,x:-10}}if(n.y===100&&n.x<=-12&&f===_){n={y:100,x:190}}o=n;r=E(o,f);t=u.block(r);if((g(o.y)||g(o.x))&&t===z.BISCUIT||t===z.PILL){u.setBlock(r,z.EMPTY);v(t===z.BISCUIT?10:50);c+=1;if(c===182){l.completedLevel()}if(t===z.PILL){l.eatenPill()}}return{new:o,old:i}}function g(e){var n=e%10;return n>3||n<7}function I(e,n){if(e==O&&n.x%10<5){return{start:.25,end:1.75,direction:false}}else if(e===b&&n.y%10<5){return{start:.75,end:2.25,direction:false}}else if(e===R&&n.y%10<5){return{start:1.25,end:1.75,direction:true}}else if(e===_&&n.x%10<5){return{start:.75,end:1.25,direction:true}}return{start:0,end:2,direction:false}}function k(e,n){var r=u.blockSize,i=r/2;if(n>=1){return}e.fillStyle=\"#ffee00\";e.beginPath();e.moveTo(o.x/10*r+i,o.y/10*r+i);e.arc(o.x/10*r+i,o.y/10*r+i,i,0,Math.PI*2*n,true);e.fill()}function M(e){var n=u.blockSize,r=I(f,o);e.fillStyle=\"#ffee00\";e.beginPath();e.moveTo(o.x/10*n+n/2,o.y/10*n+n/2);e.arc(o.x/10*n+n/2,o.y/10*n+n/2,n/2,Math.PI*r.start,Math.PI*r.end,r.direction);e.fill()}d();return{draw:M,drawDead:k,loseLife:t,getLives:s,score:r,addScore:v,theScore:e,keyDown:h,move:C,newLevel:S,reset:P,resetPosition:y}};z.Map=function(e){var t=null,l=null,u=e,n=0,o=null;function r(e,n){return e>=0&&e=0&&n30){n=0}for(i=0;i0){e()}}function A(e){n=e;r=true}function C(e,n){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))<10}function g(){var e=y.height*y.blockSize,n=e+17;d.fillStyle=\"#fff\";d.fillRect(0,e,y.width*y.blockSize,30);d.fillStyle=\"#009fe4\";for(var r=0,i=P.getLives();rz.FPS/3){y.draw(d);A(F)}else if(n===B){if(f-v>z.FPS*2){w()}else{I(a);for(i=0,len=u.length;i\r\n */\r\nexport class Error404 extends TerrificSpec {\r\n\tstart(resolve: Function) {\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\t_triggerChangeEvent() {\r\n\t\ttriggerPublicEvent(PublicEvents.uxChange, this, this._ctx);\r\n\t}\r\n}\r\n","import { createModule, startNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\nimport {\r\n\tFormControlLabelStateClass,\r\n\tFormControlSiteCoreStateClass,\r\n} from '@project/shared/utils/form-control/js/form-control';\r\n\r\nconst optionValues = {\r\n\treferredby: 'applicant_source-referral_friends_family',\r\n\ttypeofform: 'hr application form',\r\n};\r\n\r\nconst classes = {\r\n\tsubmitForm: 'js-form__button-event--submit',\r\n\tselectErrorClass: 'input-validation-error',\r\n\tproductsDetailsSection: 'js-form-row-products-category',\r\n\tcategoryOptionsForCompany: 'js-form__input-category-type-main',\r\n\tinput: 'js-form__input',\r\n\tinputCheckBox: 'a-input-checkbox__input',\r\n};\r\n\r\nconst jobProfileLocations: { [key: string]: Set } = {};\r\nlet stepTwoFormLoaded: boolean = true;\r\nlet stepThreeFormLoaded: boolean = true;\r\nlet stepFourOneFormLoaded: boolean = true;\r\nlet stepFourTwoFormLoaded: boolean = true;\r\nlet stepFiveFormLoaded: boolean = true;\r\n@createModule('Form')\r\n/**\r\n * form module implementation.\r\n *\r\n * @author Nele Rabus \r\n */\r\nexport class Form extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$inputSelect: JQuery;\r\n\t$inputSelect1: JQuery;\r\n\t$inputSelectCategory: JQuery;\r\n\tproductValidation = false;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis._initTerrificModules(this.$ctx);\r\n\t\t// On Form Errors after Submit (e.g. email send fails on BE), Form-Builder does re-render\r\n\t\t// the form and all previous bindings are lost.\r\n\t\t// So we track changes on form-wrapper and re-initialize the Terrific controls\r\n\t\tthis.initMutationObserver(this.$ctx);\r\n\t\tthis.initAjaxListeners();\r\n\t\tconst scFormName = this.$ctx.find(\"input[data-sc-field-name='TypeOfForm']\").val();\r\n\r\n\t\tif (this.$ctx.data('api-endpoint')) {\r\n\t\t\tthis.fetchCdpIdData();\r\n\t\t\tthis.prefillFormData();\r\n\r\n\t\t\tif (\r\n\t\t\t\tscFormName !== undefined &&\r\n\t\t\t\tscFormName.toString().toLowerCase() === optionValues.typeofform.toLowerCase()\r\n\t\t\t) {\r\n\t\t\t\tthis.$ctx.find(`.o-form__grid-col--input-reffered-by`).hide();\r\n\t\t\t\tthis.$ctx.find('input[data-sc-field-name=\"yourReferral\"]').val('-');\r\n\t\t\t\tthis.emailValidationChangeEventForWorkdayForm();\r\n\t\t\t\tconst inputSelect = 'js-form__input-select-reffered-by';\r\n\t\t\t\tthis.$inputSelect = this.$ctx.find(`.${inputSelect}`);\r\n\t\t\t\tthis.$inputSelect.on('change', (ev: Event) => this.inputSelecteOptionChanged(ev));\r\n\t\t\t\tthis.$ctx.on('click', `.js-form__button-event--submit-application`, this.onFormSubmit.bind(this));\r\n\t\t\t\tthis.workdayJobsFormData();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initFormHadling();\r\n\t\tif (scFormName !== undefined && scFormName.toString().toLowerCase() === 'company contact') {\r\n\t\t\tthis.$ctx.find(`.${classes.productsDetailsSection}`).addClass('o-form-row-products-category--hide');\r\n\t\t\tthis.$inputSelectCategory = this.$ctx.find(`.${classes.categoryOptionsForCompany}`);\r\n\t\t\tthis.$inputSelectCategory.on('change', (ev: Event) => this.categorySelectedOptionChanged(ev));\r\n\t\t}\r\n\r\n\t\tthis.initUserVali();\r\n\t\tthis.submitButtonClickForGA();\r\n\t\tthis.sendFromStartDataToGtm();\r\n\r\n\t\tconst inputSelect1 = 'js-form__input-select';\r\n\t\tthis.$inputSelect1 = this.$ctx.find(`.${inputSelect1}`);\r\n\t\tthis.$inputSelect1.on('change', (ev: Event) => this.inputSelecteValidation(ev));\r\n\r\n\t\tif (scFormName !== undefined && scFormName.toString().toLowerCase() === 'legal form') {\r\n\t\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option');\r\n\t\t\tconst sectionStepTwo = $('.js-section__steptwo');\r\n\t\t\tconst sectionStepThree = $('.js-section__stepthree');\r\n\t\t\tconst sectionStepFour = $('.js-section__stepfour');\r\n\t\t\tconst sectionStepFive = $('.js-section__stepfive');\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tsectionStepTwo.hide();\r\n\t\t\tsectionStepThree.hide();\r\n\t\t\tsectionStepFour.hide();\r\n\t\t\tsectionStepFive.hide();\r\n\r\n\t\t\tconst radioButtons: any = document.querySelectorAll('.o-form__legal-radio input[type=\"radio\"]');\r\n\t\t\tconst radioButtonsStepTwo: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-steptwo-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst radioButtonsStepThree: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepthree-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst radioButtonsStepFourOne: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepfour-one-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst radioButtonsStepFourTwo: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepfour-two-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst buttonNext: any = document.querySelectorAll('.js-form__button-step-one--submit');\r\n\t\t\tconst buttonNextSecond: any = document.querySelectorAll('.js-form__button-step-two--submit');\r\n\t\t\tconst buttonNextThree: any = document.querySelectorAll('.js-form__button-step-three--submit');\r\n\t\t\tconst buttonNextFour: any = document.querySelectorAll('.js-form__button-step-four-submit');\r\n\r\n\t\t\tradioButtons.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tradioButtonsStepTwo.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepTwoClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tradioButtonsStepThree.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepThreeClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tradioButtonsStepFourOne.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepFourOneClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tradioButtonsStepFourTwo.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepFourTwoClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tbuttonNext.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepOneButtonClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tbuttonNextSecond.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepTwoButtonClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tbuttonNextThree.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepThreeOneButtonClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tbuttonNextThree.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepThreeTwoButtonClick(ev));\r\n\t\t\t});\r\n\t\t\tbuttonNextFour.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepFourButtonClick(ev));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tbindRadioButtonClick(event: any) {\r\n\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option');\r\n\t\tvar inputValue = $(event.target).attr('value');\r\n\t\tif (inputValue == 'Ja') {\r\n\t\t\tlegalFormSectionYesOption.show();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll('.js-form__section-for-yes-option');\r\n\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t$(field).val('');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll('.js-form__section-for-yes-option');\r\n\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\tif ($(field).attr('type') == 'email') {\r\n\t\t\t\t\t\t\t$(field).val('demo@demo.com');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'number') {\r\n\t\t\t\t\t\t\t$(field).val('1234567890');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'tel') {\r\n\t\t\t\t\t\t\t$(field).val('0');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tbindRadioButtonStepTwoClick(event: any) {\r\n\t\tconst legalFormSectionRegStromOption = $('.js-form__section-registration-strom');\r\n\t\tconst legalFormSectionRegGasOption = $('.js-form__section-registration-gas');\r\n\t\tconst spanFileUploadValidationMessage = $('.js-form__file-upload-validation-message');\r\n\t\tlegalFormSectionRegGasOption.hide();\r\n\t\tlegalFormSectionRegStromOption.hide();\r\n\t\tspanFileUploadValidationMessage.hide();\r\n\r\n\t\tconst selectBoxStepTwo: any = $('.o-form__legal-steptwo-select');\r\n\t\tif (\r\n\t\t\tselectBoxStepTwo.val() !== 'Veränderung Netzanschluss' &&\r\n\t\t\tselectBoxStepTwo.val() !== 'Abmeldung Netzanschluss'\r\n\t\t) {\r\n\t\t\tvar inputValue = $(event.target).attr('value');\r\n\t\t\tif (inputValue == 'Gas') {\r\n\t\t\t\tlegalFormSectionRegGasOption.show();\r\n\t\t\t\tconst hiddenSections: any = document.querySelectorAll(\r\n\t\t\t\t\t'.js-form__section-registration-strom,.js-form__section-registration-meter-number'\r\n\t\t\t\t);\r\n\t\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\t\tconst fields = section.querySelectorAll('input,textarea,select');\r\n\t\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\t\tif (field.tagName === 'SELECT') {\r\n\t\t\t\t\t\t\t$(field).val('10 kV*');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t} else if (inputValue == 'Strom') {\r\n\t\t\t\tlegalFormSectionRegStromOption.show();\r\n\t\t\t\tconst hiddenSections: any = document.querySelectorAll(\r\n\t\t\t\t\t'.js-form__section-registration-gas,.js-form__section-registration-meter-number'\r\n\t\t\t\t);\r\n\t\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst fileUploadControls = Array.from(\r\n\t\t\tdocument.querySelectorAll('.js-form__section-registration-file-upload-control')\r\n\t\t);\r\n\t\tfileUploadControls.forEach((control) => {\r\n\t\t\tcontrol.addEventListener('change', (ev) => this.bindFileUploadClick(ev));\r\n\t\t});\r\n\t}\r\n\r\n\tbindFileUploadClick(event: any) {\r\n\t\tconst fileInput = event.target as HTMLInputElement;\r\n\t\tif (fileInput.files && fileInput.files.length > 0) {\r\n\t\t\tconst file = fileInput.files[0];\r\n\r\n\t\t\t// Use FileReader to read the file as a base64 string\r\n\t\t\tconst reader = new FileReader();\r\n\t\t\treader.onloadend = function() {\r\n\t\t\t\tconst base64String = reader.result as string;\r\n\r\n\t\t\t\t// Create an object to hold the base64 string and the file name\r\n\t\t\t\tconst fileData = {\r\n\t\t\t\t\tbase64: base64String,\r\n\t\t\t\t\tname: file.name,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Convert the object to a JSON string\r\n\t\t\t\tconst fileDataJson = JSON.stringify(fileData);\r\n\r\n\t\t\t\t// Find the hidden field where we will store the base64 string and file name\r\n\t\t\t\tconst hiddenField = document.querySelector(\r\n\t\t\t\t\t'input[data-sc-field-name=\"hiddenFieldForFile\"]'\r\n\t\t\t\t) as HTMLInputElement | null;\r\n\t\t\t\tif (hiddenField) {\r\n\t\t\t\t\thiddenField.value = fileDataJson; // Store JSON string in the hidden field\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconsole.log('File Data JSON:', fileDataJson); // Optionally log the JSON string\r\n\t\t\t};\r\n\r\n\t\t\t// Read the file as a Data URL (Base64-encoded)\r\n\t\t\treader.readAsDataURL(file);\r\n\t\t} else {\r\n\t\t\talert('Please select a file to upload.');\r\n\t\t}\r\n\t}\r\n\r\n\tbindRadioButtonStepThreeClick(event: any) {\r\n\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option');\r\n\t\tlegalFormSectionYesOption.hide();\r\n\t\tvar inputValue = $(event.target).attr('value');\r\n\t\tif (inputValue == 'Ja') {\r\n\t\t\tlegalFormSectionYesOption.show();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll('.js-form__section-for-yes-option');\r\n\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t$(field).val('');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll('.js-form__section-for-yes-option');\r\n\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\tif ($(field).attr('type') == 'email') {\r\n\t\t\t\t\t\t\t$(field).val('demo@demo.com');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'number') {\r\n\t\t\t\t\t\t\t$(field).val('1234567890');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'tel') {\r\n\t\t\t\t\t\t\t$(field).val('0');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tbindRadioButtonStepFourOneClick(event: any) {\r\n\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option-next');\r\n\t\tconst legalFormSectionNextYesOptionYes = $('.js-form__section-for-next-yes-option-yes');\r\n\t\tconst legalFormSectionNo = $('.js-form__section-for-no-option');\r\n\t\tlegalFormSectionYesOption.hide();\r\n\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\tlegalFormSectionNo.hide();\r\n\t\tvar inputValue = $('.o-form__legal-stepfour-one-radio input[type=\"radio\"]:checked').val();\r\n\t\tif (inputValue == 'Ja') {\r\n\t\t\tconst radioButtonsStepFourTwo = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepfour-two-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst radioButtonsStepFourArray = Array.from(radioButtonsStepFourTwo);\r\n\t\t\tradioButtonsStepFourArray.forEach((radio: any) => {\r\n\t\t\t\t$(radio).prop('checked', false);\r\n\t\t\t});\r\n\t\t\tlegalFormSectionYesOption.show();\r\n\t\t} else {\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\tlegalFormSectionNo.hide();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll(\r\n\t\t\t\t'.js-form__section-for-no-option,.js-form__section-for-next-yes-option-yes,.js-form__section-for-yes-option-next'\r\n\t\t\t);\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea, input[type=\"radio\"]');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\tif ($(field).attr('type') == 'email') {\r\n\t\t\t\t\t\t\t$(field).val('demo@demo.com');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'number') {\r\n\t\t\t\t\t\t\t$(field).val('1234567890');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'tel') {\r\n\t\t\t\t\t\t\t$(field).val('0');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'radio') {\r\n\t\t\t\t\t\t\t$(field).prop('checked', true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tbindRadioButtonStepFourTwoClick(event: any) {\r\n\t\tconst legalFormSectionNextYesOptionYes = $('.js-form__section-for-next-yes-option-yes');\r\n\t\tconst legalFormSectionNo = $('.js-form__section-for-no-option');\r\n\t\tlegalFormSectionNo.hide();\r\n\t\tvar inputValue = $('.o-form__legal-stepfour-two-radio input[type=\"radio\"]:checked').val();\r\n\t\tif (inputValue == 'Ja') {\r\n\t\t\tlegalFormSectionNextYesOptionYes.show();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll('.js-form__section-for-next-yes-option-yes');\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t$(field).val('');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tconst hiddenSectionNo: any = document.querySelectorAll('.js-form__section-for-no-option');\r\n\t\t\thiddenSectionNo.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea,input[type=\"radio\"]');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\tif ($(field).attr('type') == 'email') {\r\n\t\t\t\t\t\t\t$(field).val('demo@demo.com');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'number') {\r\n\t\t\t\t\t\t\t$(field).val('1234567890');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'tel') {\r\n\t\t\t\t\t\t\t$(field).val('0');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'radio') {\r\n\t\t\t\t\t\t\t$(field).prop('checked', true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t} else if (inputValue == 'Nein') {\r\n\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\tlegalFormSectionNo.show();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll('.js-form__section-for-no-option');\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t$(field).val('');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tconst hiddenSectionYes: any = document.querySelectorAll('.js-form__section-for-next-yes-option-yes');\r\n\t\t\thiddenSectionYes.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\tlegalFormSectionNo.hide();\r\n\t\t\tconst hiddenSections: any = document.querySelectorAll(\r\n\t\t\t\t'.js-form__section-for-no-option,.js-form__section-for-next-yes-option-yes'\r\n\t\t\t);\r\n\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea,input[type=\"radio\"]');\r\n\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\tif ($(field).attr('type') == 'email') {\r\n\t\t\t\t\t\t\t$(field).val('demo@demo.com');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'number') {\r\n\t\t\t\t\t\t\t$(field).val('1234567890');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'tel') {\r\n\t\t\t\t\t\t\t$(field).val('0');\r\n\t\t\t\t\t\t} else if ($(field).attr('type') == 'radio') {\r\n\t\t\t\t\t\t\t$(field).prop('checked', true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tbindRadioButtonStepFiveClick(event: any) {}\r\n\r\n\tbindSelectBoxStepTwoChange(event: any) {\r\n\t\tif (event.currentTarget.value === 'Veränderung Netzanschluss') {\r\n\t\t\tthis.hideStepTwoDateSection();\r\n\t\t\tthis.hideStepTwoGasSection();\r\n\t\t\tthis.hideStepTwoStromSection();\r\n\t\t\tthis.hideStepTwoFileUploadSection();\r\n\t\t\t$('.js-form__file-upload-validation-message').hide();\r\n\t\t\tthis.hideStepTwoMeterNoSection();\r\n\t\t} else if (event.currentTarget.value === 'Abmeldung Netzanschluss') {\r\n\t\t\t$('.js-form__section-registration-date').show();\r\n\t\t\t$('.js-form__section-registration-meter-number').show();\r\n\t\t\tthis.hideStepTwoGasSection();\r\n\t\t\tthis.hideStepTwoStromSection();\r\n\t\t\tthis.hideStepTwoFileUploadSection();\r\n\t\t\t$('.js-form__file-upload-validation-message').hide();\r\n\t\t} else {\r\n\t\t\t$('.js-form__section-registration-date').show();\r\n\t\t\t$('.js-form__file-upload-validation-message').hide();\r\n\t\t\t$('.js-form__section-registration-file-upload').show();\r\n\t\t\tthis.hideStepTwoMeterNoSection();\r\n\t\t\tthis.clearStepTwoDateSection();\r\n\t\t}\r\n\t}\r\n\r\n\thideStepTwoDateSection() {\r\n\t\t$('.js-form__section-registration-date').hide();\r\n\t\tconst hiddenSectionsDate: any = document.querySelectorAll('.js-form__section-registration-date');\r\n\r\n\t\thiddenSectionsDate.forEach((section: any) => {\r\n\t\t\tconst fields = section.querySelectorAll('input, select, textarea, input[type=\"date\"]');\r\n\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t$(field).val('1900-01-01');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tclearStepTwoDateSection() {\r\n\t\tconst hiddenSectionsDate: any = document.querySelectorAll('.js-form__section-registration-date');\r\n\r\n\t\thiddenSectionsDate.forEach((section: any) => {\r\n\t\t\tconst fields = section.querySelectorAll('input, select, textarea, input[type=\"date\"]');\r\n\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\tif ($(field).attr('type') !== 'hidden' && $(field).val() === '1900-01-01') {\r\n\t\t\t\t\t$(field).val('');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\thideStepTwoMeterNoSection() {\r\n\t\t$('.js-form__section-registration-meter-number').hide();\r\n\t\tconst hiddenSectionsMeterNo: any = document.querySelectorAll('.js-form__section-registration-meter-number');\r\n\r\n\t\thiddenSectionsMeterNo.forEach((section: any) => {\r\n\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\thideStepTwoGasSection() {\r\n\t\t$('.js-form__section-registration-gas').hide();\r\n\t\tconst hiddenSectionsGas: any = document.querySelectorAll('.js-form__section-registration-gas');\r\n\r\n\t\thiddenSectionsGas.forEach((section: any) => {\r\n\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\thideStepTwoStromSection() {\r\n\t\t$('.js-form__section-registration-strom').hide();\r\n\t\tconst hiddenSectionsStrom: any = document.querySelectorAll('.js-form__section-registration-strom');\r\n\r\n\t\thiddenSectionsStrom.forEach((section: any) => {\r\n\t\t\tconst fields = section.querySelectorAll('input, select, textarea');\r\n\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\tif (field.tagName === 'SELECT') {\r\n\t\t\t\t\t$(field).val('10 kV*');\r\n\t\t\t\t} else if ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\thideStepTwoFileUploadSection() {\r\n\t\t$('.js-form__section-registration-file-upload').hide();\r\n\t\tconst hiddenSectionsFileUpload: any = document.querySelectorAll('.js-form__section-registration-file-upload');\r\n\r\n\t\thiddenSectionsFileUpload.forEach((section: any) => {\r\n\t\t\tconst fields = section.querySelectorAll('input, select, textarea, input[type=\"file\"]');\r\n\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t$(field).removeClass('field-validation-error');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\ttriggerFileUploadValidation(event: any) {\r\n\t\tlet stepThreeFormLoaded = false;\r\n\t\tconst inputFileUploadControl: any = document.querySelector(\r\n\t\t\t'.js-form__section-registration-file-upload-control'\r\n\t\t);\r\n\t\tconst spanFileUploadValidationMessage: any = document.querySelector('.js-form__file-upload-validation-message');\r\n\t\tif (inputFileUploadControl && inputFileUploadControl.files.length !== 0) {\r\n\t\t\tspanFileUploadValidationMessage.style.display = 'none';\r\n\t\t\tstepThreeFormLoaded = true;\r\n\t\t} else {\r\n\t\t\tspanFileUploadValidationMessage.style.display = 'block';\r\n\t\t\tevent.preventDefault();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tbindStepOneButtonClick(event: any) {\r\n stepTwoFormLoaded = true;\r\n }\r\n\r\n\tbindStepTwoButtonClick(event: any) {\r\n\t\tconst selectBoxStepTwo: any = $('.o-form__legal-steptwo-select');\r\n\t\tif (\r\n\t\t\tselectBoxStepTwo.val() !== 'Veränderung Netzanschluss' &&\r\n\t\t\tselectBoxStepTwo.val() !== 'Abmeldung Netzanschluss'\r\n\t\t) {\r\n\t\t\tthis.triggerFileUploadValidation(event);\r\n\t\t}\r\n\t}\r\n\tbindStepThreeOneButtonClick(event: any) {\r\n\t\tstepFourOneFormLoaded = true;\r\n\t}\r\n\tbindStepThreeTwoButtonClick(event: any) {\r\n\t\tstepFourTwoFormLoaded = true;\r\n\t}\r\n\tbindStepFourButtonClick(event: any) {\r\n\t\tstepFiveFormLoaded = true;\r\n\t}\r\n\t/// Preview Button From 2 to 1 Start\r\n\tbindStepTwoPreviousButtonClick(event: any) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tconst radioButtons: any = document.querySelectorAll('.o-form__legal-radio input[type=\"radio\"]');\r\n\t\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option');\r\n\t\t\tradioButtons.forEach((radio: any) => {\r\n\t\t\t\tif (radio.checked) {\r\n\t\t\t\t\tif (radio.value !== 'Ja') {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tradioButtons.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tconst buttonNext: any = document.querySelectorAll('.js-form__button-step-one--submit');\r\n\t\t\tbuttonNext.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepOneButtonClick(ev));\r\n\t\t\t});\r\n\t\t}, 1000);\r\n\t}\r\n\t/// Preview Button From 2 to 1 End\r\n\t/// Preview Button From 3 to 2 Start\r\n\tbindStepThreePreviousButtonClick(event: any) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tconst legalFormSectionRegStromOption = $('.js-form__section-registration-strom');\r\n\t\t\tconst legalFormSectionRegGasOption = $('.js-form__section-registration-gas');\r\n\t\t\tconst hiddenSectionsMeterNo = $('.js-form__section-registration-meter-number');\r\n\t\t\tconst spanFileUploadValidationMessage = $('.js-form__file-upload-validation-message');\r\n\t\t\tconst hiddenSectionsDate = $('.js-form__section-registration-date');\r\n\t\t\tconst hiddenSectionsFileUpload = $('.js-form__section-registration-file-upload');\r\n\t\t\thiddenSectionsMeterNo.hide();\r\n\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\tspanFileUploadValidationMessage.hide();\r\n\t\t\thiddenSectionsDate.hide();\r\n\t\t\thiddenSectionsFileUpload.hide();\r\n\r\n\t\t\tconst radioButtonsStepTwo: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-steptwo-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst selectBoxStepTwo: any = $('.o-form__legal-steptwo-select');\r\n\t\t\tif (\r\n\t\t\t\tselectBoxStepTwo.val() !== 'Veränderung Netzanschluss' &&\r\n\t\t\t\tselectBoxStepTwo.val() !== 'Abmeldung Netzanschluss'\r\n\t\t\t) {\r\n\t\t\t\thiddenSectionsFileUpload.show();\r\n\t\t\t\thiddenSectionsDate.show();\r\n\t\t\t\tvar inputValue = $('input[type=\"radio\"]:checked').val();\r\n\t\t\t\tif (inputValue == 'Gas') {\r\n\t\t\t\t\tlegalFormSectionRegGasOption.show();\r\n\t\t\t\t} else if (inputValue == 'Strom') {\r\n\t\t\t\t\tlegalFormSectionRegStromOption.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\t\t}\r\n\t\t\t} else if (selectBoxStepTwo.val() === 'Veränderung Netzanschluss') {\r\n\t\t\t\tthis.hideStepTwoDateSection();\r\n\t\t\t\tthis.hideStepTwoGasSection();\r\n\t\t\t\tthis.hideStepTwoStromSection();\r\n\t\t\t\tthis.hideStepTwoFileUploadSection();\r\n\t\t\t\tthis.hideStepTwoMeterNoSection();\r\n\t\t\t\tspanFileUploadValidationMessage.hide();\r\n\t\t\t\thiddenSectionsFileUpload.hide();\r\n\t\t\t\thiddenSectionsDate.hide();\r\n\t\t\t} else {\r\n\t\t\t\t$('.js-form__section-registration-date').show();\r\n\t\t\t\t$('.js-form__section-registration-meter-number').show();\r\n\t\t\t\tthis.hideStepTwoGasSection();\r\n\t\t\t\tthis.hideStepTwoStromSection();\r\n\t\t\t\tthis.hideStepTwoFileUploadSection();\r\n\t\t\t\tspanFileUploadValidationMessage.hide();\r\n\t\t\t\tthis.clearStepTwoDateSection();\r\n\t\t\t}\r\n\t\t\tradioButtonsStepTwo.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepTwoClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tconst buttonNextSecond: any = document.querySelectorAll('.js-form__button-step-two--submit');\r\n\t\t\tbuttonNextSecond.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepTwoButtonClick(ev));\r\n\t\t\t});\r\n\t\t}, 1000);\r\n\t}\r\n\t/// Preview Button From 3 to 2 End\r\n\t/// Preview Button From 4 to 3 Start\r\n\tbindStepFourPreviousButtonClick(event: any) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tconst radioButtonsStepThree: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepthree-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option');\r\n\t\t\tradioButtonsStepThree.forEach((radio: any) => {\r\n\t\t\t\tif (radio.checked) {\r\n\t\t\t\t\tif (radio.value !== 'Ja') {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.show();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tradioButtonsStepThree.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepThreeClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tconst buttonNextThree: any = document.querySelectorAll('.js-form__button-step-three--submit');\r\n\t\t\tbuttonNextThree.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepThreeOneButtonClick(ev));\r\n\t\t\t});\r\n\t\t}, 1000);\r\n\t}\r\n\t/// Preview Button From 4 to 3 End\r\n\t/// Preview Button From 5 to 4 Start\r\n\tbindStepFivePreviousButtonClick(event: any) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tconst radioButtonsStepFourOne: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepfour-one-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option-next');\r\n\t\t\tconst legalFormSectionNextYesOptionYes = $('.js-form__section-for-next-yes-option-yes');\r\n\t\t\tconst legalFormSectionNo = $('.js-form__section-for-no-option');\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\tlegalFormSectionNo.hide();\r\n\r\n\t\t\tvar inputValue = $('.o-form__legal-stepfour-one-radio input[type=\"radio\"]:checked').val();\r\n\t\t\tif (inputValue == 'Ja') {\r\n\t\t\t\tlegalFormSectionYesOption.show();\r\n\t\t\t\tvar inputValueTwo = $('.o-form__legal-stepfour-two-radio input[type=\"radio\"]:checked').val();\r\n\t\t\t\tif (inputValueTwo == 'Ja') {\r\n\t\t\t\t\tlegalFormSectionNextYesOptionYes.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlegalFormSectionNo.show();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\t\tlegalFormSectionNo.hide();\r\n\t\t\t\tconst hiddenSections: any = document.querySelectorAll(\r\n\t\t\t\t\t'.js-form__section-for-no-option,.js-form__section-for-next-yes-option-yes,.js-form__section-for-yes-option-next'\r\n\t\t\t\t);\r\n\t\t\t\thiddenSections.forEach((section: any) => {\r\n\t\t\t\t\tconst fields = section.querySelectorAll('input, select, textarea, input[type=\"radio\"]');\r\n\t\t\t\t\tfields.forEach((field: any) => {\r\n\t\t\t\t\t\tif ($(field).attr('type') !== 'hidden') {\r\n\t\t\t\t\t\t\tif ($(field).attr('type') == 'email') {\r\n\t\t\t\t\t\t\t\t$(field).val('demo@demo.com');\r\n\t\t\t\t\t\t\t} else if ($(field).attr('type') == 'number') {\r\n\t\t\t\t\t\t\t\t$(field).val('1234567890');\r\n\t\t\t\t\t\t\t} else if ($(field).attr('type') == 'tel') {\r\n\t\t\t\t\t\t\t\t$(field).val('0');\r\n\t\t\t\t\t\t\t} else if ($(field).attr('type') == 'radio') {\r\n\t\t\t\t\t\t\t\t$(field).prop('checked', true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$(field).val('-');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\tradioButtonsStepFourOne.forEach((radio: any) => {\r\n\t\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepFourOneClick(ev));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconst buttonNextFour: any = document.querySelectorAll('.js-form__button-step-four-submit');\r\n\t\t\t\tbuttonNextFour.forEach((button: any) => {\r\n\t\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepFourButtonClick(ev));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, 1000);\r\n\t}\r\n\t/// Preview Button From 5 to 4 End\r\n\tonFormSubmit(ev: Event) {\r\n\t\tconst $fieldValidationError = this.$ctx.find('.field-validation-error');\r\n\t\tconst $fieldValidationErrorLength = this.$ctx.find('.field-validation-error').length;\r\n\t\tvar $validationErrorCount = 0;\r\n\r\n\t\tif ($fieldValidationErrorLength === 0) {\r\n\t\t\tthis.$ctx.find('input[data-sc-field-name=\"applicationFormSubmitClicked\"]').val('true');\r\n\t\t} else {\r\n\t\t\t$fieldValidationError.each((index, element) => {\r\n\t\t\t\tconst $validationError = $(element);\r\n\t\t\t\tif (!$validationError.is(':visible')) {\r\n\t\t\t\t\t$validationErrorCount = $validationErrorCount + 1;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif ($fieldValidationErrorLength === $validationErrorCount) {\r\n\t\t\t\tthis.$ctx.find('input[data-sc-field-name=\"applicationFormSubmitClicked\"]').val('true');\r\n\t\t\t} else {\r\n\t\t\t\tev.preventDefault();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst contactingCategoryField = this.$ctx.find(\"[data-sc-field-name='ContactingCategory']\");\r\n\t\tif (contactingCategoryField.length !== 0) {\r\n\t\t\tvar productvalue: any = $(contactingCategoryField).val();\r\n\t\t\tif (productvalue.toLowerCase() === 'products') {\r\n\t\t\t\tlet MktoForms2 = (window as any)['MktoForms2'];\r\n\t\t\t\tif (typeof MktoForms2 != 'undefined') {\r\n\t\t\t\t\tconst hiddenMktoForm: any = this.$ctx.find(\"div[data-allow-hidden-form-submit='true']\");\r\n\t\t\t\t\tif (hiddenMktoForm.length > 0) {\r\n\t\t\t\t\t\tvar mktoFormId = $(hiddenMktoForm[0]).attr('data-form-id');\r\n\t\t\t\t\t\tlet myHiddenMktoForm: any = MktoForms2.getForm(mktoFormId);\r\n\t\t\t\t\t\tlet myHiddenFormFields: any = myHiddenMktoForm.vals();\r\n\t\t\t\t\t\tvar myMktoHiddenMetaDataString = this.$ctx.find(`#dynamicDataSourceFieldsJsonString`).text();\r\n\t\t\t\t\t\tlet myMktoHiddenMetaData: any;\r\n\t\t\t\t\t\tif (myMktoHiddenMetaDataString.length > 0) {\r\n\t\t\t\t\t\t\tmyMktoHiddenMetaDataString = myMktoHiddenMetaDataString.replace('][', ',');\r\n\t\t\t\t\t\t\tmyMktoHiddenMetaData = JSON.parse(myMktoHiddenMetaDataString);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlet materialTagValue = this.$ctx.find(\"[data-sc-field-name='materialTag']\").val();\r\n\t\t\t\t\t\tlet industryTagValue = this.$ctx.find(\"[data-sc-field-name='industryType']\").val();\r\n\r\n\t\t\t\t\t\tvar firstName = this.$ctx.find(\"[data-sc-field-name='FirstName']\").val();\r\n\t\t\t\t\t\tvar lastName = this.$ctx.find(\"[data-sc-field-name='LastName']\").val();\r\n\t\t\t\t\t\tvar email = this.$ctx.find(\"[data-sc-field-name='Email']\").val();\r\n\t\t\t\t\t\tvar country = this.$ctx.find(\"[data-sc-field-name='Country']\").val();\r\n\t\t\t\t\t\tvar company = this.$ctx.find(\"[data-sc-field-name='Company']\").val();\r\n\r\n\t\t\t\t\t\tif (typeof myHiddenFormFields != 'undefined') {\r\n\t\t\t\t\t\t\tmyHiddenMktoForm.addHiddenFields({\r\n\t\t\t\t\t\t\t\t//These are the values which will be submitted to Marketo\r\n\t\t\t\t\t\t\t\tformMessage: this.$ctx.find(\"[data-sc-field-name='FormMessage']\").val(),\r\n\t\t\t\t\t\t\t\tFirstName: firstName,\r\n\t\t\t\t\t\t\t\tLastName: lastName,\r\n\t\t\t\t\t\t\t\tEmail: email,\r\n\t\t\t\t\t\t\t\tCountry: country,\r\n\t\t\t\t\t\t\t\tCompany: company,\r\n\t\t\t\t\t\t\t\tmktoindustry: this.getValueFromObject(myMktoHiddenMetaData, industryTagValue),\r\n\t\t\t\t\t\t\t\tinferredMaterialInterest: this.getValueFromObject(\r\n\t\t\t\t\t\t\t\t\tmyMktoHiddenMetaData,\r\n\t\t\t\t\t\t\t\t\tmaterialTagValue\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tprivacyPolicyAcceptance: true,\r\n\t\t\t\t\t\t\t\tmktooptinchkbxacceptance: true,\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\ttypeof firstName !== 'undefined' &&\r\n\t\t\t\t\t\t\t\tfirstName.toString().length > 0 &&\r\n\t\t\t\t\t\t\t\ttypeof lastName !== 'undefined' &&\r\n\t\t\t\t\t\t\t\tlastName.toString().length > 0 &&\r\n\t\t\t\t\t\t\t\ttypeof email !== 'undefined' &&\r\n\t\t\t\t\t\t\t\temail.toString().length > 0 &&\r\n\t\t\t\t\t\t\t\ttypeof country !== 'undefined' &&\r\n\t\t\t\t\t\t\t\tcountry.toString().length > 0 &&\r\n\t\t\t\t\t\t\t\ttypeof company !== 'undefined' &&\r\n\t\t\t\t\t\t\t\tcompany.toString().length > 0\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tmyHiddenMktoForm.submit();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitFormHadling() {\r\n\t\tthis.$ctx.on('click', `.${classes.submitForm}`, this.onFormSubmit.bind(this));\r\n\t}\r\n\r\n\tstop() {\r\n\t\t// needs to be here for terrific\r\n\t}\r\n\r\n\t_initTerrificModules($ctx: JQuery) {\r\n\t\tconst cancelButtonSelector = 'js-form__button-event--cancel';\r\n\t\tconst terrificControlMap = [\r\n\t\t\t{\r\n\t\t\t\tselector: '.js-form__input, .js-form__input-number, .js-form__input-email, .js-form__input-date',\r\n\t\t\t\tterrificName: 'Input',\r\n\t\t\t\tcomponentAttr: [],\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tselector: '.js-form__input-textarea',\r\n\t\t\t\tterrificName: 'InputTextarea',\r\n\t\t\t\tcomponentAttr: [],\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tselector: '.js-form__input-select',\r\n\t\t\t\tterrificName: 'InputSelect',\r\n\t\t\t\tcomponentAttr: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thelperClass: 'js-form__input-select',\r\n\t\t\t\t\t\tsetAttr: 'data-fullwidth',\r\n\t\t\t\t\t\tsetValue: 'true',\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thelperClass: 'js-form__input-select--search',\r\n\t\t\t\t\t\tsetAttr: 'data-search',\r\n\t\t\t\t\t\tsetValue: 'true',\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thelperClass: 'js-form__input-select--market',\r\n\t\t\t\t\t\tsetAttr: 'data-cookie',\r\n\t\t\t\t\t\tsetValue: 'cov_market',\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\t// make a reset button out of it\r\n\t\tconst $buttonCancel = $(`.${cancelButtonSelector}`, $ctx);\r\n\r\n\t\t// late bind terrfic modules\r\n\t\tterrificControlMap.forEach((control) => {\r\n\t\t\tconst $formControls = $(control.selector, $ctx);\r\n\t\t\tconst $formControlValidationErrorSelector = 'field-validation-error';\r\n\t\t\tif (!$formControls) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$formControls.each((index, element) => {\r\n\t\t\t\tconst $this = $(element);\r\n\t\t\t\t$this.attr('data-t-name', control.terrificName);\r\n\r\n\t\t\t\t// add additional attributes before startNode\r\n\t\t\t\tcontrol.componentAttr.forEach((attr) => {\r\n\t\t\t\t\tif ($this.hasClass(attr.helperClass)) {\r\n\t\t\t\t\t\t$this.attr(attr.setAttr, attr.setValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tstartNode(element);\r\n\r\n\t\t\t\tif ($this.hasClass('input-validation-error')) {\r\n\t\t\t\t\t$this.prev('label').addClass('state-a-label--has-error');\r\n\r\n\t\t\t\t\tconst $select2Container = $this.next('.select2-container');\r\n\t\t\t\t\tif ($select2Container.length) {\r\n\t\t\t\t\t\tconst $select2Single = $select2Container.find('.select2-selection--single');\r\n\t\t\t\t\t\t// Get value from select2 container\r\n\t\t\t\t\t\tconst value =\r\n\t\t\t\t\t\t\t$this instanceof HTMLSelectElement && !$this.val()\r\n\t\t\t\t\t\t\t\t? $select2Container.find('.select2-selection__rendered').attr('title')\r\n\t\t\t\t\t\t\t\t: $this.val();\r\n\r\n\t\t\t\t\t\tif (value) {\r\n\t\t\t\t\t\t\t$select2Single.removeClass('select2-validation-error');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$select2Single.addClass('select2-validation-error');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// hide error on focus\r\n\t\t\t\t$this.on('focus', () => {\r\n\t\t\t\t\tif ($this.next().hasClass($formControlValidationErrorSelector)) {\r\n\t\t\t\t\t\t$this.next().hide();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Handle select2 components\r\n\t\t\t\t\tif ($this.hasClass('input-validation-error')) {\r\n\t\t\t\t\t\tconst $select2Container = $this.next('.select2-container');\r\n\t\t\t\t\t\tif ($select2Container.length) {\r\n\t\t\t\t\t\t\tconst $select2Single = $select2Container.find('.select2-selection--single');\r\n\r\n\t\t\t\t\t\t\t// Get value from select2 container\r\n\t\t\t\t\t\t\tconst value =\r\n\t\t\t\t\t\t\t\t$this instanceof HTMLSelectElement && !$this.val()\r\n\t\t\t\t\t\t\t\t\t? $select2Container.find('.select2-selection__rendered').attr('title')\r\n\t\t\t\t\t\t\t\t\t: $this.val();\r\n\r\n\t\t\t\t\t\t\tif (value) {\r\n\t\t\t\t\t\t\t\t$select2Single.removeClass('select2-validation-error');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$select2Single.addClass('select2-validation-error');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// show error on blur if value did not change\r\n\t\t\t\t$this.on('blur', () => {\r\n\t\t\t\t\t$this.next().show();\r\n\r\n\t\t\t\t\t// Check if the current field is invalid and has validation error class\r\n\t\t\t\t\tif ($this.hasClass('input-validation-error')) {\r\n\t\t\t\t\t\t// Handle select2 components\r\n\t\t\t\t\t\tconst $select2Container = $this.next('.select2-container');\r\n\t\t\t\t\t\tif ($select2Container.length) {\r\n\t\t\t\t\t\t\tconst $select2Single = $select2Container.find('.select2-selection--single');\r\n\r\n\t\t\t\t\t\t\t// Get value from select2 container\r\n\t\t\t\t\t\t\tconst value =\r\n\t\t\t\t\t\t\t\t$this instanceof HTMLSelectElement && !$this.val()\r\n\t\t\t\t\t\t\t\t\t? $select2Container.find('.select2-selection__rendered').attr('title')\r\n\t\t\t\t\t\t\t\t\t: $this.val();\r\n\r\n\t\t\t\t\t\t\tif (!value) {\r\n\t\t\t\t\t\t\t\t$select2Single.addClass('select2-validation-error');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t// check for cancel button placed from sitecore\r\n\t\tif ($buttonCancel.length !== 0) {\r\n\t\t\t// set type to reset\r\n\t\t\t$buttonCancel.attr('type', 'reset');\r\n\t\t\t// cleanup errors on the form & update label state (cause sitecore won't do this for us)\r\n\t\t\t$buttonCancel.on('click', (ev: Event) => {\r\n\t\t\t\t$('input + span, select + span, label + span', $ctx)\r\n\t\t\t\t\t.not('.select2')\r\n\t\t\t\t\t.text('');\r\n\t\t\t\t$('.state-a-label--has-error', $ctx)\r\n\t\t\t\t\t.removeClass('state-a-label--has-error')\r\n\t\t\t\t\t.css('max-width', '');\r\n\t\t\t\t$(`.${FormControlLabelStateClass.Floated.toString()}`, $ctx).each((index, element) => {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!$(element)\r\n\t\t\t\t\t\t\t.next()\r\n\t\t\t\t\t\t\t.is('select')\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t$(element).removeClass(FormControlLabelStateClass.Floated.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t$(`.${FormControlSiteCoreStateClass}`, $ctx).removeClass(FormControlSiteCoreStateClass);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// init normal terrific components\r\n\t\t$.each($ctx.find('[data-t-name]'), (i: number, module: Node) => {\r\n\t\t\tstartNode(module);\r\n\t\t});\r\n\t}\r\n\r\n\tinputSelecteOptionChanged(ev: any) {\r\n\t\tconst opt: string = ev.currentTarget.value.toLowerCase();\r\n\r\n\t\tconst $categoryInputContainer: any = this.$ctx.find(`.o-form__grid-col--input-reffered-by`);\r\n\t\tif (opt === optionValues.referredby.toLowerCase()) {\r\n\t\t\t$('input[data-sc-field-name=\"yourReferral\"]').val('');\r\n\t\t\t$categoryInputContainer.show();\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\t$categoryInputContainer\r\n\t\t\t\t\t.find('.js-a-input--referredby')\r\n\t\t\t\t\t.focus()\r\n\t\t\t\t\t.select();\r\n\t\t\t}, 150);\r\n\t\t} else {\r\n\t\t\t$categoryInputContainer.hide();\r\n\t\t\t$('input[data-sc-field-name=\"yourReferral\"]').val('-');\r\n\t\t}\r\n\t}\r\n\r\n\tcategorySelectedOptionChanged(ev: any) {\r\n\t\tconst opt: string = ev.currentTarget.value.toLowerCase();\r\n\r\n\t\tif (opt.toLowerCase() === 'products') {\r\n\t\t\tthis.$ctx.find(`.${classes.productsDetailsSection}`).removeClass('o-form-row-products-category--hide');\r\n\t\t\tthis.productValidation = true;\r\n\t\t\tthis.$ctx.find('.js-form__input-category-type').val('');\r\n\t\t\tthis.$ctx.find('.js-form__input-material-type').val('');\r\n\t\t\tthis.$ctx.find('.js-form__input-industry-type').val('');\r\n\t\t\tthis.$ctx.find('.js-form__input-inquiry-type').val('');\r\n\t\t} else {\r\n\t\t\tthis.$ctx.find(`.${classes.productsDetailsSection}`).addClass('o-form-row-products-category--hide');\r\n\t\t\tthis.productValidation = false;\r\n\t\t\tthis.$ctx.find('.js-form__input-category-type').val('Supplier');\r\n\t\t\tthis.$ctx.find('.js-form__input-material-type').val('M2_Adhesives');\r\n\t\t\tthis.$ctx.find('.js-form__input-industry-type').val('Automotive');\r\n\t\t\tthis.$ctx.find('.js-form__input-inquiry-type').val('Technical');\r\n\t\t}\r\n\t}\r\n\r\n\tinputSelecteValidation(ev: any) {\r\n\t\tconst $target: any = $(ev.currentTarget);\r\n\t\tconst $formControlValidationErrorSelector = 'field-validation-error';\r\n\r\n\t\tif ($target.val() !== '') {\r\n\t\t\tif ($target.nextAll().hasClass($formControlValidationErrorSelector)) {\r\n\t\t\t\t$target.nextAll('.' + $formControlValidationErrorSelector).hide();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar dataValRequired = $target.attr('data-val');\r\n\t\t\tif (typeof dataValRequired !== 'undefined' && dataValRequired !== '' && dataValRequired !== null) {\r\n\t\t\t\t$target.nextAll('.' + $formControlValidationErrorSelector).show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitMutationObserver($ctx: any) {\r\n\t\tnew MutationObserver(() => {\r\n\t\t\tthis._initTerrificModules($ctx);\r\n\t\t\tthis.initAjaxListeners();\r\n\t\t}).observe(this._ctx, {\r\n\t\t\tchildList: true,\r\n\t\t\tsubtree: true,\r\n\t\t});\r\n\t}\r\n\r\n\tinitUserVali() {\r\n\t\tconst $vali = this.$ctx.find('.js-vali');\r\n\t\tif ($vali.length) {\r\n\t\t\t$vali.val(`${this.$ctx.find('form:eq(0)').data('sc-fxb')}-jsvali`);\r\n\t\t}\r\n\t}\r\n\r\n\tsubmitButtonClickForGA() {\r\n\t\t// Script to submit the data to GA\r\n\t\tconst submitButtonSelector = 'js-form__button-gtm-event--submit';\r\n\t\tconst $buttonSubmit = $(`.${submitButtonSelector}`, this.$ctx);\r\n\t\tif ($buttonSubmit.length !== 0) {\r\n\t\t\t$buttonSubmit.on('click', (ev: Event) => {\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tif ($($($(ev.target).parents('form:first')[0]).find('.field-validation-error')).length === 0) {\r\n\t\t\t\t\t\tconst formId = $($(ev.target).parents('form:first')[0]).attr('id');\r\n\t\t\t\t\t\tconst formName = $(\r\n\t\t\t\t\t\t\t$($(ev.target).parents('form:first')[0]).find(\"input[data-sc-field-name='HiddenFormName']\")\r\n\t\t\t\t\t\t).val();\r\n\r\n\t\t\t\t\t\tconst trackdata: {\r\n\t\t\t\t\t\t\tevent: string;\r\n\t\t\t\t\t\t\tform_id: string;\r\n\t\t\t\t\t\t\tform_name: string;\r\n\t\t\t\t\t\t\tform_destination: string;\r\n\t\t\t\t\t\t\tform_submit_text: string;\r\n\t\t\t\t\t\t} = {\r\n\t\t\t\t\t\t\tevent: 'form_submit',\r\n\t\t\t\t\t\t\tform_id: formId,\r\n\t\t\t\t\t\t\tform_name: formName.toString(),\r\n\t\t\t\t\t\t\tform_destination: '',\r\n\t\t\t\t\t\t\tform_submit_text: '',\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tTrack.gtmTrack(trackdata);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, 1000);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tsendFromStartDataToGtm() {\r\n\t\tconst formId = this.$ctx.find('form:first').attr('id');\r\n\t\tconst formName = this.$ctx.find(\"input[data-sc-field-name='HiddenFormName']\").val();\r\n\t\tconst scSendDataToGTMOnPageLoad = this.$ctx.find('input[data-sc-field-name=\"SendDataToGTMOnPageLoad\"]').val();\r\n\t\tconst sendDataToGtm = scSendDataToGTMOnPageLoad !== undefined && scSendDataToGTMOnPageLoad === 'Yes';\r\n\t\tif (sendDataToGtm) {\r\n\t\t\tconst trackdata: {\r\n\t\t\t\tevent: string;\r\n\t\t\t\tform_id: string;\r\n\t\t\t\tform_name: string;\r\n\t\t\t\tform_destination: string;\r\n\t\t\t\tform_submit_text: string;\r\n\t\t\t} = {\r\n\t\t\t\tevent: 'form_start',\r\n\t\t\t\tform_id: formId,\r\n\t\t\t\tform_name: formName.toString(),\r\n\t\t\t\tform_destination: '',\r\n\t\t\t\tform_submit_text: '',\r\n\t\t\t};\r\n\r\n\t\t\tTrack.gtmTrack(trackdata);\r\n\t\t}\r\n\t}\r\n\r\n\temailValidationChangeEventForWorkdayForm() {\r\n\t\tconst emailAddressTextboxSelector = 'js-form__input-email-address';\r\n\t\tconst $emailAddressTextbox = $(`.${emailAddressTextboxSelector}`, this.$ctx);\r\n\r\n\t\tif ($emailAddressTextbox.length !== 0) {\r\n\t\t\t$emailAddressTextbox.on('blur touchend', (ev: Event) => {\r\n\t\t\t\tconst emailPattern = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,17}$/;\r\n\t\t\t\tconst emailAddress = $(ev.target)\r\n\t\t\t\t\t.val()\r\n\t\t\t\t\t.toString();\r\n\t\t\t\tif (emailPattern.test(emailAddress)) {\r\n\t\t\t\t\tconst serviceUrl = window.location.origin + '/api/verifyemail?emailAddress=' + emailAddress;\r\n\r\n\t\t\t\t\tif (serviceUrl) {\r\n\t\t\t\t\t\tthis.onScAjaxStart();\r\n\t\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\t\tmethod: 'get',\r\n\t\t\t\t\t\t\turl: serviceUrl,\r\n\t\t\t\t\t\t\tsuccess: (jsonData: any) => {\r\n\t\t\t\t\t\t\t\tthis.onScAjaxComplete('', 'success');\r\n\t\t\t\t\t\t\t\tvar emailAddressExistsErrorMessage = this.$ctx\r\n\t\t\t\t\t\t\t\t\t.find('input[data-sc-field-name=\"emailAlreadyExistsErrorMessage\"]')\r\n\t\t\t\t\t\t\t\t\t.val();\r\n\t\t\t\t\t\t\t\tfor (const key in jsonData) {\r\n\t\t\t\t\t\t\t\t\tif (jsonData[key] !== null && jsonData['emailExists'] == true) {\r\n\t\t\t\t\t\t\t\t\t\t$(ev.target).addClass('input-validation-error');\r\n\t\t\t\t\t\t\t\t\t\t$(ev.target)\r\n\t\t\t\t\t\t\t\t\t\t\t.nextAll('.field-validation-valid')\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('field-validation-error');\r\n\t\t\t\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t\t\t\temailAddressExistsErrorMessage !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\temailAddressExistsErrorMessage != null\r\n\t\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t\t$(ev.target)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.nextAll('.field-validation-valid')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.text(emailAddressExistsErrorMessage.toString());\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$(ev.target)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.nextAll('.field-validation-valid')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.text($(ev.target).attr('data-val-required'));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tthis.onScAjaxComplete('', 'success');\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tcomplete: () => {},\r\n\t\t\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\t\t\tconsole.log(\r\n\t\t\t\t\t\t\t\t\t`lightbox: get partial-view error, endpoint: ${serviceUrl}, ${xhr.status}, ${\r\n\t\t\t\t\t\t\t\t\t\txhr.statusText\r\n\t\t\t\t\t\t\t\t\t}, ${error}`\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tthis.onScAjaxComplete(xhr, status);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tprefillFormData() {\r\n\t\tlet serviceUrl = this.$ctx.data('api-endpoint');\r\n\t\tif (serviceUrl) {\r\n\t\t\tserviceUrl =\r\n\t\t\t\tserviceUrl.toString().indexOf('?') > -1\r\n\t\t\t\t\t? serviceUrl + '&callForWorkdayApi=false&callForCdpIdApi=false'\r\n\t\t\t\t\t: serviceUrl + '?callForWorkdayApi=false&callForCdpIdApi=false';\r\n\t\t\t$.ajax({\r\n\t\t\t\tmethod: 'get',\r\n\t\t\t\turl: serviceUrl,\r\n\t\t\t\tsuccess: (jsonData: any) => {\r\n\t\t\t\t\tfor (const key in jsonData) {\r\n\t\t\t\t\t\tif (jsonData[key] !== null) {\r\n\t\t\t\t\t\t\tconst $input = this.$ctx.find('[data-sc-field-name=\"' + key + '\"]');\r\n\t\t\t\t\t\t\t$input.val(jsonData[key]);\r\n\t\t\t\t\t\t\t$input.trigger('change');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tgetValueFromObject(myMktoHiddenMetaData: any, materialTagValue: any): string {\r\n\t\tlet title: string = '';\r\n\t\tmyMktoHiddenMetaData.forEach((element: any) => {\r\n\t\t\tif (element.tagId === materialTagValue) {\r\n\t\t\t\ttitle = element.tagTitle.toString();\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn title;\r\n\t}\r\n\r\n\tworkdayJobsFormData() {\r\n\t\tlet workdayapiEndpoint = this.$ctx.data('api-endpoint');\r\n\t\tif (!workdayapiEndpoint) return;\r\n\t\tworkdayapiEndpoint =\r\n\t\t\tworkdayapiEndpoint.toString().indexOf('?') > -1\r\n\t\t\t\t? workdayapiEndpoint + '&callForWorkdayApi=true&callForCdpIdApi=false'\r\n\t\t\t\t: workdayapiEndpoint + '?callForWorkdayApi=true&callForCdpIdApi=false';\r\n\r\n\t\t$.ajax({\r\n\t\t\tmethod: 'GET',\r\n\t\t\turl: workdayapiEndpoint,\r\n\t\t\tsuccess: (jsonData: any) => {\r\n\t\t\t\tif (jsonData && jsonData.WorkdayJobsTasks) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tconst tasksData = JSON.parse(jsonData.WorkdayJobsTasks);\r\n\r\n\t\t\t\t\t\tif (tasksData && tasksData.Report_Entry && Array.isArray(tasksData.Report_Entry)) {\r\n\t\t\t\t\t\t\tconst jobEntries: any[] = tasksData.Report_Entry;\r\n\r\n\t\t\t\t\t\t\tconst $jobProfileDropdown = this.$ctx.find('[data-sc-field-name=\"yourPreferredJob\"]');\r\n\t\t\t\t\t\t\tconst $jobProfileDropdownAlt = this.$ctx.find('[data-sc-field-name=\"yourAlternativeJob\"]');\r\n\t\t\t\t\t\t\tconst $locationDropdown = this.$ctx.find('[data-sc-field-name=\"yourAlternateLocation\"]');\r\n\r\n\t\t\t\t\t\t\t$jobProfileDropdown.empty(); // Clear existing options\r\n\t\t\t\t\t\t\t$jobProfileDropdownAlt.empty(); // Clear existing options\r\n\t\t\t\t\t\t\t$locationDropdown.empty(); // Clear existing options\r\n\r\n\t\t\t\t\t\t\t$jobProfileDropdown.append(new Option('', ''));\r\n\r\n\t\t\t\t\t\t\t// Populate jobProfiles and jobProfileLocations\r\n\t\t\t\t\t\t\tjobEntries.forEach((entry: any) => {\r\n\t\t\t\t\t\t\t\tconst jobProfile = entry.Job_Profile;\r\n\t\t\t\t\t\t\t\tconst location = entry.Primary_Location;\r\n\t\t\t\t\t\t\t\tconst jobRequisitionId = entry.Job_Requisition_ID;\r\n\r\n\t\t\t\t\t\t\t\tif ($jobProfileDropdown.find(`option[value=\"${jobProfile}\"]`).length === 0) {\r\n\t\t\t\t\t\t\t\t\t$jobProfileDropdown.append(new Option(jobProfile, jobProfile));\r\n\t\t\t\t\t\t\t\t\t$jobProfileDropdownAlt.append(new Option(jobProfile, jobProfile));\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif ($locationDropdown.find(`option[value=\"${location}\"]`).length === 0) {\r\n\t\t\t\t\t\t\t\t\t$locationDropdown.append(new Option(location, location));\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (!jobProfileLocations[jobProfile]) {\r\n\t\t\t\t\t\t\t\t\tjobProfileLocations[jobProfile] = new Set();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tjobProfileLocations[jobProfile].add(location);\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t// Handle change event for job profile dropdown (yourPreferredJob)\r\n\t\t\t\t\t\t\t$jobProfileDropdown.on('change', () => {\r\n\t\t\t\t\t\t\t\tconst selectedProfile = $jobProfileDropdown.val() as string;\r\n\t\t\t\t\t\t\t\tconst locations = jobProfileLocations[selectedProfile] || new Set();\r\n\r\n\t\t\t\t\t\t\t\tconst $preferredLocationDropdown = this.$ctx.find(\r\n\t\t\t\t\t\t\t\t\t'[data-sc-field-name=\"yourPreferredLocation\"]'\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t$preferredLocationDropdown.empty(); // Clear existing options\r\n\r\n\t\t\t\t\t\t\t\t$preferredLocationDropdown.append(new Option('', ''));\r\n\t\t\t\t\t\t\t\tlocations.forEach((location: string) => {\r\n\t\t\t\t\t\t\t\t\t$preferredLocationDropdown.append(new Option(location, location));\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t// Enable all options first/\r\n\t\t\t\t\t\t\t\t$jobProfileDropdownAlt.find('option').prop('disabled', false);\r\n\r\n\t\t\t\t\t\t\t\t// Disable selected profile in yourAlternativeJob dropdown\r\n\t\t\t\t\t\t\t\tif (selectedProfile) {\r\n\t\t\t\t\t\t\t\t\t$jobProfileDropdownAlt\r\n\t\t\t\t\t\t\t\t\t\t.find(`option[value=\"${selectedProfile}\"]`)\r\n\t\t\t\t\t\t\t\t\t\t.prop('disabled', true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t// Disable selected location in yourAlternateLocation dropdown based on yourPreferredLocation\r\n\t\t\t\t\t\t\tconst $preferredLocationDropdown = this.$ctx.find(\r\n\t\t\t\t\t\t\t\t'[data-sc-field-name=\"yourPreferredLocation\"]'\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$preferredLocationDropdown.on('change', () => {\r\n\t\t\t\t\t\t\t\tconst selectedLocation = $preferredLocationDropdown.val() as string;\r\n\r\n\t\t\t\t\t\t\t\t// Enable all options first\r\n\t\t\t\t\t\t\t\t$locationDropdown.find('option').prop('disabled', false);\r\n\r\n\t\t\t\t\t\t\t\t// Disable selected location in yourAlternateLocation dropdown\r\n\t\t\t\t\t\t\t\tif (selectedLocation) {\r\n\t\t\t\t\t\t\t\t\t$locationDropdown\r\n\t\t\t\t\t\t\t\t\t\t.find(`option[value=\"${selectedLocation}\"]`)\r\n\t\t\t\t\t\t\t\t\t\t.prop('disabled', true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('No valid Report_Entry found in WorkdayJobsTasks.');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (error) {\r\n\t\t\t\t\t\tconsole.error('Error parsing WorkdayJobsTasks:', error);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.error('No WorkdayJobsTasks data found in response.');\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: any, error: any) => {\r\n\t\t\t\tconsole.error('Error fetching data:', error);\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tgetCustomerIdFromUrl(): string {\r\n\t\tconst urlParams = new URLSearchParams(window.location.search);\r\n\t\treturn urlParams.get('cdpid') || ''; // Return the customerId from the URL, or an empty string if not present\r\n\t}\r\n\r\n\tfetchCdpIdData() {\r\n\t\tconst customerId = this.getCustomerIdFromUrl();\r\n\t\tif (customerId) {\r\n\t\t\tconst cdpApiEndpoint = window.location.origin + '/api/getCdpIdData?customerId=' + customerId;\r\n\r\n\t\t\t$.ajax({\r\n\t\t\t\tmethod: 'GET',\r\n\t\t\t\turl: cdpApiEndpoint,\r\n\t\t\t\tsuccess: (jsonData: any) => {\r\n\t\t\t\t\tif (jsonData && jsonData.cdpPreferenceData) {\r\n\t\t\t\t\t\tconst cdpData = JSON.parse(jsonData.cdpPreferenceData);\r\n\t\t\t\t\t\tif (cdpData && cdpData.attributes) {\r\n\t\t\t\t\t\t\tconst attributes = cdpData.attributes;\r\n\r\n\t\t\t\t\t\t\t// Prefill simple fields like FirstName, LastName, Company, and Email\r\n\t\t\t\t\t\t\tconst $cdpFirstName = this.$ctx.find('[data-sc-field-name=\"FirstName\"]');\r\n\t\t\t\t\t\t\tconst $cdpLastName = this.$ctx.find('[data-sc-field-name=\"LastName\"]');\r\n\t\t\t\t\t\t\tconst $cdpCompany = this.$ctx.find('[data-sc-field-name=\"Company\"]');\r\n\t\t\t\t\t\t\tconst $cdpCountry = this.$ctx.find('[data-sc-field-name=\"Country\"]');\r\n\t\t\t\t\t\t\tconst $unsubscribeText = this.$ctx.find('.a-heading--style6.a-unsubscribe-email');\r\n\r\n\t\t\t\t\t\t\tif ($cdpFirstName.length > 0 && attributes.firstName) {\r\n\t\t\t\t\t\t\t\t$cdpFirstName.val(attributes.firstName).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($cdpLastName.length > 0 && attributes.lastName) {\r\n\t\t\t\t\t\t\t\t$cdpLastName.val(attributes.lastName).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($cdpCompany.length > 0 && attributes.company && attributes.company.name) {\r\n\t\t\t\t\t\t\t\t$cdpCompany.val(attributes.company.name).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t$cdpCountry.length > 0 &&\r\n\t\t\t\t\t\t\t\tattributes.cov_primary_address &&\r\n\t\t\t\t\t\t\t\tattributes.cov_primary_address.cov_country\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t$cdpCountry.val(attributes.cov_primary_address.cov_country).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Fill the hidden field (Email in this case) from API response\r\n\t\t\t\t\t\t\tconst $hiddenEmailField = this.$ctx.find('[data-sc-field-name=\"Email\"]'); // Target hidden field with the data-sc-field-name=\"Email\"\r\n\t\t\t\t\t\t\tif ($hiddenEmailField.length > 0 && attributes.primaryEmail) {\r\n\t\t\t\t\t\t\t\t// Set the value of the hidden email field\r\n\t\t\t\t\t\t\t\t$hiddenEmailField.val(attributes.primaryEmail).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Check if the unsubscribe email text element exists and update it with the email\r\n\t\t\t\t\t\t\tif ($unsubscribeText.length > 0 && attributes.primaryEmail) {\r\n\t\t\t\t\t\t\t\tconst email = attributes.primaryEmail;\r\n\t\t\t\t\t\t\t\t$unsubscribeText.html(function(_, html) {\r\n\t\t\t\t\t\t\t\t\treturn html.replace('{email}', email); // Replace the {email} placeholder\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Prefill checkboxes based on \"cov_interests_ind\", \"cov_interests_mat\", \"cov_interests_st\" from API response\r\n\r\n\t\t\t\t\t\t\t// For \"cov_interests_ind\" (Industry Interest Types)\r\n\t\t\t\t\t\t\tif (cdpData.attributes.cov_interests_ind) {\r\n\t\t\t\t\t\t\t\tconst industryData = cdpData.attributes.cov_interests_ind;\r\n\t\t\t\t\t\t\t\tconst $industryCheckboxes = this.$ctx.find(\r\n\t\t\t\t\t\t\t\t\t'[data-sc-field-name=\"IndustryInterestTypes\"]'\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t$industryCheckboxes.each((index, checkbox) => {\r\n\t\t\t\t\t\t\t\t\tconst checkboxValue = $(checkbox).val(); // Get the value of the checkbox\r\n\r\n\t\t\t\t\t\t\t\t\t// Ensure checkboxValue is a string\r\n\t\t\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t\t\ttypeof checkboxValue === 'string' &&\r\n\t\t\t\t\t\t\t\t\t\tindustryData.hasOwnProperty(checkboxValue)\r\n\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t// Check if the value in industryData is true and mark the checkbox as checked\r\n\t\t\t\t\t\t\t\t\t\tif (industryData[checkboxValue] === true) {\r\n\t\t\t\t\t\t\t\t\t\t\t$(checkbox).prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$(checkbox).prop('checked', false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// For \"cov_interests_mat\" (Material Interest Types)\r\n\t\t\t\t\t\t\tif (cdpData.attributes.cov_interests_mat) {\r\n\t\t\t\t\t\t\t\tconst materialData = cdpData.attributes.cov_interests_mat;\r\n\t\t\t\t\t\t\t\tconst $materialCheckboxes = this.$ctx.find(\r\n\t\t\t\t\t\t\t\t\t'[data-sc-field-name=\"MaterialInterestTypes\"]'\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t$materialCheckboxes.each((index, checkbox) => {\r\n\t\t\t\t\t\t\t\t\tconst checkboxValue = $(checkbox).val();\r\n\t\t\t\t\t\t\t\t\t// Ensure checkboxValue is a string\r\n\t\t\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t\t\ttypeof checkboxValue === 'string' &&\r\n\t\t\t\t\t\t\t\t\t\tmaterialData.hasOwnProperty(checkboxValue)\r\n\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t// Check if the value in materialData is true and mark the checkbox as checked\r\n\t\t\t\t\t\t\t\t\t\tif (materialData[checkboxValue] === true) {\r\n\t\t\t\t\t\t\t\t\t\t\t$(checkbox).prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$(checkbox).prop('checked', false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// For \"cov_interests_st\" (Strategic Interest Types)\r\n\t\t\t\t\t\t\tif (cdpData.attributes.cov_interests_st) {\r\n\t\t\t\t\t\t\t\tconst strategicData = cdpData.attributes.cov_interests_st;\r\n\t\t\t\t\t\t\t\tconst $strategicCheckboxes = this.$ctx.find(\r\n\t\t\t\t\t\t\t\t\t'[data-sc-field-name=\"StrategicInterestTypes\"]'\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t$strategicCheckboxes.each((index, checkbox) => {\r\n\t\t\t\t\t\t\t\t\tconst checkboxValue = $(checkbox).val();\r\n\t\t\t\t\t\t\t\t\t// Ensure checkboxValue is a string\r\n\t\t\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t\t\ttypeof checkboxValue === 'string' &&\r\n\t\t\t\t\t\t\t\t\t\tstrategicData.hasOwnProperty(checkboxValue)\r\n\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t// Check if the value in strategicData is true and mark the checkbox as checked\r\n\t\t\t\t\t\t\t\t\t\tif (strategicData[checkboxValue] === true) {\r\n\t\t\t\t\t\t\t\t\t\t\t$(checkbox).prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$(checkbox).prop('checked', false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Listen for user changes to checkboxes\r\n\t\t\t\t\t\t\t// Define the type of selectedValues explicitly\r\n\t\t\t\t\t\t\tconst selectedValues: { [key: string]: string[] } = {}; // Object with string keys and array of string values\r\n\t\t\t\t\t\t\tthis.$ctx.find('input[type=\"checkbox\"]').on('change', function() {\r\n\t\t\t\t\t\t\t\tconst checkboxValue = $(this).val();\r\n\t\t\t\t\t\t\t\tconst isChecked = $(this).prop('checked');\r\n\r\n\t\t\t\t\t\t\t\t// Collect selected values and store them for submission\r\n\t\t\t\t\t\t\t\tif (typeof checkboxValue === 'string') {\r\n\t\t\t\t\t\t\t\t\tconst fieldName = $(this).data('sc-field-name'); // Get the field name\r\n\t\t\t\t\t\t\t\t\tif (!selectedValues[fieldName]) {\r\n\t\t\t\t\t\t\t\t\t\tselectedValues[fieldName] = [];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (isChecked) {\r\n\t\t\t\t\t\t\t\t\t\tselectedValues[fieldName].push(checkboxValue);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t// If unchecked, remove the value\r\n\t\t\t\t\t\t\t\t\t\tselectedValues[fieldName] = selectedValues[fieldName].filter(\r\n\t\t\t\t\t\t\t\t\t\t\t(value) => value !== checkboxValue\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tconsole.log(selectedValues); // Log the selected values for testing\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('No cdpPreferenceData found in response.');\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tinitAjaxListeners() {\r\n\t\tconst $form = this.$ctx.find('form[data-ajax]');\r\n\t\tif ($form.length > 0) {\r\n\t\t\tconst formHash = this.hash($form.attr('id'));\r\n\t\t\t(window as any)[`scFromAjaxBegin_${formHash}`] = this.onScAjaxStart.bind(this);\r\n\t\t\t(window as any)[`scFromAjaxComplete_${formHash}`] = this.onScAjaxComplete.bind(this);\r\n\t\t\t$form.attr('data-ajax-begin', `scFromAjaxBegin_${formHash}`);\r\n\t\t\t$form.attr('data-ajax-complete', `scFromAjaxComplete_${formHash}`);\r\n\t\t}\r\n\t}\r\n\r\n\thash(id: string) {\r\n\t\t/* tslint:disable */\r\n\t\t// very basic hashing function\r\n\t\tfor (var i = 0, h = 6; i < id.length; ) h = Math.imul(h ^ id.charCodeAt(i++), 9 ** 9);\r\n\t\treturn h ^ (h >>> 9);\r\n\t\t/* tslint:enable */\r\n\t}\r\n\r\n\tonScAjaxStart() {\r\n\t\tthis.$ctx.append(`\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t
    `);\r\n\t}\r\n\r\n\tonScAjaxComplete(xhr: any, status: string) {\r\n\t\tif (status !== 'success') {\r\n\t\t\tconsole.info('error', xhr);\r\n\t\t\t// @todo: Add error handling here\r\n\t\t}\r\n\t\tif (!this.productValidation) {\r\n\t\t\tthis.$ctx.find(`.${classes.productsDetailsSection}`).addClass('o-form-row-products-category--hide');\r\n\t\t}\r\n\t\tvar applicationFormHiddenField = this.$ctx\r\n\t\t\t.find('input[data-sc-field-name=\"applicationFormSubmitClicked\"]')\r\n\t\t\t.val();\r\n\t\tif (applicationFormHiddenField !== undefined && applicationFormHiddenField == 'true') {\r\n\t\t\tthis.$ctx.find('input[data-sc-field-name=\"applicationFormSubmitClicked\"]').val('');\r\n\t\t\tconst scFormName = this.$ctx.find(\"input[data-sc-field-name='TypeOfForm']\").val();\r\n\t\t\tif (\r\n\t\t\t\tscFormName !== undefined &&\r\n\t\t\t\tscFormName.toString().toLowerCase() === optionValues.typeofform.toLowerCase()\r\n\t\t\t) {\r\n\t\t\t\tthis.$ctx.find(`.o-form__grid-col--input-reffered-by`).hide();\r\n\t\t\t\tthis.$ctx.find('input[data-sc-field-name=\"yourReferral\"]').val('-');\r\n\t\t\t\tthis.workdayJobsFormData();\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.$ctx.find('.js-o-form__spinner').remove();\r\n\t\tif (stepTwoFormLoaded == true) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tconst legalFormSectionRegStromOption = $('.js-form__section-registration-strom');\r\n\t\t\t\tconst legalFormSectionRegGasOption = $('.js-form__section-registration-gas');\r\n\t\t\t\tconst spanFileUploadValidationMessage = $('.js-form__file-upload-validation-message');\r\n\t\t\t\tconst hiddenSectionsFileUpload = $('.js-form__section-registration-file-upload');\r\n\t\t\t\tconst hiddenSectionsDate = $('.js-form__section-registration-date');\r\n\t\t\t\tconst hiddenSectionsMeterNo = $('.js-form__section-registration-meter-number');\r\n\t\t\t\tspanFileUploadValidationMessage.hide();\r\n\t\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\t\thiddenSectionsMeterNo.hide();\r\n\t\t\t\thiddenSectionsFileUpload.hide();\r\n\t\t\t\tconst radioButtons: any = document.querySelectorAll('.o-form__legal-radio input[type=\"radio\"]');\r\n\t\t\t\tconst radioButtonsStepTwo: any = document.querySelectorAll(\r\n\t\t\t\t\t'.o-form__legal-steptwo-radio input[type=\"radio\"]'\r\n\t\t\t\t);\r\n\t\t\t\tconst selectBoxStepTwo: any = $('.o-form__legal-steptwo-select');\r\n\t\t\t\tif (\r\n\t\t\t\t\tselectBoxStepTwo.val() !== 'Veränderung Netzanschluss' &&\r\n\t\t\t\t\tselectBoxStepTwo.val() !== 'Abmeldung Netzanschluss'\r\n\t\t\t\t) {\r\n\t\t\t\t\thiddenSectionsFileUpload.show();\r\n\t\t\t\t\thiddenSectionsDate.show();\r\n\t\t\t\t\tvar inputValue = $('input[type=\"radio\"]:checked').val();\r\n\t\t\t\t\tif (inputValue == 'Gas') {\r\n\t\t\t\t\t\tlegalFormSectionRegGasOption.show();\r\n\t\t\t\t\t} else if (inputValue == 'Strom') {\r\n\t\t\t\t\t\tlegalFormSectionRegStromOption.show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\t\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (selectBoxStepTwo.val() === 'Veränderung Netzanschluss') {\r\n\t\t\t\t\tthis.hideStepTwoDateSection();\r\n\t\t\t\t\tthis.hideStepTwoGasSection();\r\n\t\t\t\t\tthis.hideStepTwoStromSection();\r\n\t\t\t\t\tthis.hideStepTwoFileUploadSection();\r\n\t\t\t\t\tthis.hideStepTwoMeterNoSection();\r\n\t\t\t\t\tspanFileUploadValidationMessage.hide();\r\n\t\t\t\t\thiddenSectionsFileUpload.hide();\r\n\t\t\t\t\thiddenSectionsDate.hide();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$('.js-form__section-registration-date').show();\r\n\t\t\t\t\t$('.js-form__section-registration-meter-number').show();\r\n\t\t\t\t\tthis.hideStepTwoGasSection();\r\n\t\t\t\t\tthis.hideStepTwoStromSection();\r\n\t\t\t\t\tthis.hideStepTwoFileUploadSection();\r\n\t\t\t\t\tspanFileUploadValidationMessage.hide();\r\n\t\t\t\t\tthis.clearStepTwoDateSection();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst radioButtonsStepThree: any = document.querySelectorAll(\r\n\t\t\t\t\t'.o-form__legal-stepthree-radio input[type=\"radio\"]'\r\n\t\t\t\t);\r\n\r\n\t\t\t\tradioButtons.forEach((radio: any) => {\r\n\t\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonClick(ev));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tradioButtonsStepTwo.forEach((radio: any) => {\r\n\t\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepTwoClick(ev));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tradioButtonsStepThree.forEach((radio: any) => {\r\n\t\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepThreeClick(ev));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tArray.from(selectBoxStepTwo).forEach((selectBox: any) => {\r\n\t\t\t\t\t$(selectBox).on('change', (ev: Event) => this.bindSelectBoxStepTwoChange(ev));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tradioButtonsStepTwo.forEach((radio: any) => {\r\n\t\t\t\t\tif (radio.checked) {\r\n\t\t\t\t\t\tif (radio.value == 'Gas' && selectBoxStepTwo.val() === 'Veränderung Netzanschluss') {\r\n\t\t\t\t\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\t\t\t\t} else if (radio.value == 'Strom' && selectBoxStepTwo.val() === 'Veränderung Netzanschluss') {\r\n\t\t\t\t\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\t\t\t\t} else if (radio.value == 'Gas' && selectBoxStepTwo.val() === 'Abmeldung Netzanschluss') {\r\n\t\t\t\t\t\t\tlegalFormSectionRegGasOption.hide();\r\n\t\t\t\t\t\t} else if (radio.value == 'Strom' && selectBoxStepTwo.val() === 'Abmeldung Netzanschluss') {\r\n\t\t\t\t\t\t\tlegalFormSectionRegStromOption.hide();\r\n\t\t\t\t\t\t} else if (radio.value == 'Gas' && selectBoxStepTwo.val() === 'Anmeldung Netzanschluss') {\r\n\t\t\t\t\t\t\tlegalFormSectionRegGasOption.show();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlegalFormSectionRegStromOption.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconst buttonPrevious: any = document.querySelectorAll('.js-form__button--previous');\r\n\t\t\t\tbuttonPrevious.forEach((button: any) => {\r\n\t\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepTwoPreviousButtonClick(ev));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconst buttonNextSecond: any = document.querySelectorAll('.js-form__button-step-two--submit');\r\n\t\t\t\tbuttonNextSecond.forEach((button: any) => {\r\n\t\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepTwoButtonClick(ev));\r\n\t\t\t\t});\r\n\t\t\t}, 1000);\r\n\t\t}\r\n\t\tif (stepThreeFormLoaded == true) {\r\n\t\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option');\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tconst radioButtonsStepThree: any = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepthree-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tradioButtonsStepThree.forEach((radio: any) => {\r\n\t\t\t\tif (radio.checked) {\r\n\t\t\t\t\tif (radio.value !== 'Ja') {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.show();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tradioButtonsStepThree.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => this.bindRadioButtonStepThreeClick(ev));\r\n\t\t\t});\r\n\t\t\tconst buttonPrevious: any = document.querySelectorAll('.js-form__button--previous');\r\n\t\t\tbuttonPrevious.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepThreePreviousButtonClick(ev));\r\n\t\t\t});\r\n\t\t\tconst buttonNextThree: any = document.querySelectorAll('.js-form__button-step-three--submit');\r\n\t\t\tbuttonNextThree.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepThreeOneButtonClick(ev));\r\n\t\t\t});\r\n\t\t}\r\n\t\tif (stepFourOneFormLoaded == true) {\r\n\t\t\tconst legalFormSectionYesOption = $('.js-form__section-for-yes-option-next');\r\n\t\t\tconst legalFormSectionNextYesOptionYes = $('.js-form__section-for-next-yes-option-yes');\r\n\t\t\tconst legalFormSectionNo = $('.js-form__section-for-no-option');\r\n\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\tlegalFormSectionNo.hide();\r\n\t\t\tconst radioButtonsStepFourOne = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepfour-one-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst radioButtonsStepFourOneArray = Array.from(radioButtonsStepFourOne);\r\n\t\t\tradioButtonsStepFourOneArray.forEach((radio: any) => {\r\n\t\t\t\tif (radio.checked) {\r\n\t\t\t\t\tif (radio.value !== 'Ja') {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.hide();\r\n\t\t\t\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\t\t\t\tlegalFormSectionNo.hide();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlegalFormSectionYesOption.show();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tconst radioButtonsStepFourArray = Array.from(radioButtonsStepFourOne);\r\n\t\t\tradioButtonsStepFourArray.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => {\r\n\t\t\t\t\tthis.bindRadioButtonStepFourOneClick(ev);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tconst buttonPrevious: any = document.querySelectorAll('.js-form__button--previous');\r\n\t\t\tbuttonPrevious.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepFourPreviousButtonClick(ev));\r\n\t\t\t});\r\n\r\n\t\t\tconst buttonNextThree: any = document.querySelectorAll('.js-form__button-step-three--submit');\r\n\t\t\tbuttonNextThree.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepThreeTwoButtonClick(ev));\r\n\t\t\t});\r\n\t\t}\r\n\t\tif (stepFourTwoFormLoaded == true) {\r\n\t\t\tconst legalFormSectionNextYesOptionYes = $('.js-form__section-for-next-yes-option-yes');\r\n\t\t\tconst legalFormSectionNo = $('.js-form__section-for-no-option');\r\n\t\t\tlegalFormSectionNextYesOptionYes.hide();\r\n\t\t\tlegalFormSectionNo.hide();\r\n\t\t\tconst radioButtonsStepFourTwo = document.querySelectorAll(\r\n\t\t\t\t'.o-form__legal-stepfour-two-radio input[type=\"radio\"]'\r\n\t\t\t);\r\n\t\t\tconst radioButtonsStepFourTwoArray = Array.from(radioButtonsStepFourTwo);\r\n\t\t\tradioButtonsStepFourTwoArray.forEach((radio: any) => {\r\n\t\t\t\tif (radio.checked) {\r\n\t\t\t\t\tif (radio.value !== 'Ja') {\r\n\t\t\t\t\t\tlegalFormSectionNo.show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlegalFormSectionNextYesOptionYes.show();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tconst radioButtonsStepFourArray = Array.from(radioButtonsStepFourTwo);\r\n\t\t\tradioButtonsStepFourArray.forEach((radio: any) => {\r\n\t\t\t\tradio.addEventListener('click', (ev: Event) => {\r\n\t\t\t\t\tthis.bindRadioButtonStepFourTwoClick(ev);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tconst buttonPrevious: any = document.querySelectorAll('.js-form__button--previous');\r\n\t\t\tbuttonPrevious.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepFourPreviousButtonClick(ev));\r\n\t\t\t});\r\n\t\t\tconst buttonNextFour: any = document.querySelectorAll('.js-form__button-step-four-submit');\r\n\t\t\tbuttonNextFour.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepFourButtonClick(ev));\r\n\t\t\t});\r\n\t\t}\r\n\t\tif (stepFiveFormLoaded == true) {\r\n\t\t\tconst buttonPrevious: any = document.querySelectorAll('.js-form__button--previous');\r\n\t\t\tbuttonPrevious.forEach((button: any) => {\r\n\t\t\t\tbutton.addEventListener('click', (ev: Event) => this.bindStepFivePreviousButtonClick(ev));\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nimport getCurrentBreakpoint from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst classes: any = {\r\n\twrapper: 'body',\r\n\tstateSticky: 'state-m-navigation--is-sticky',\r\n\tstateOnTop: 'state-m-navigation--scroll-0-position',\r\n\tstateScrollUp: 'state-m-navigation--scroll-forward',\r\n\tstateScrollTopNoTransition: 'state-m-navigation--scroll-0-position-no-transition',\r\n\tburgerActiveClass: 'state-m-burgernav--visible',\r\n\tinitSticky: 'state-m-navigation--initialized',\r\n\theaderWrapper: 'js-o-header-wrapper',\r\n\theaderStickyBar: 'js-o-header__sticky-bar',\r\n\theaderStickyBarHideNav: 'o-header__sticky-bar--hide-navigation',\r\n\tpageShare: 'm-page-share',\r\n\tctaButton: \"js-sticky-cta\",\r\n\tlogoLink: \"m-logo\",\r\n};\r\n\r\nlet preventStickyHeaderAppearing = false;\r\nlet preventStickyHeaderScrollBehaviour = false;\r\nlet noHasAnchor = false;\r\nlet noHasPageShare = false;\r\n\r\n@createModule('Header')\r\n/**\r\n* Header module implementation.\r\n*\r\n* @author Heiko Frosch \r\n*/\r\nexport class Header extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tstart(resolve: Function) {\r\n\t\tconst $ctx = $(this._ctx);\r\n\t\tthis._initStickyHeader($ctx);\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.track();\r\n\t\t$(window).on('enablePreventStickyHeaderAppearing', () => {\r\n\t\t\tpreventStickyHeaderAppearing = true;\r\n\t\t});\r\n\r\n\t\t$(window).on('enablePreventStickyScrollBehaviour', () => {\r\n\t\t\tpreventStickyHeaderScrollBehaviour = true;\r\n\t\t});\r\n\r\n\t\t$(window).on('disablePreventStickyScrollBehaviour', () => {\r\n\t\t\tpreventStickyHeaderScrollBehaviour = false;\r\n\t\t});\r\n\t\t$(window).on('setHeaderMargin', (event: any, margin: number) => {\r\n\t\t\tconst windowHeight = $(window).height();\r\n\t\t\tmargin = Math.min(margin, windowHeight);\r\n\r\n\t\t\tif (margin >= windowHeight) {\r\n\t\t\t\t$(classes.wrapper).css('max-width', $(classes.wrapper).innerWidth());\r\n\t\t\t\t$(classes.wrapper).css('overflow', 'hidden');\r\n\t\t\t} else {\r\n\t\t\t\t$(classes.wrapper).css('overflow', '');\r\n\t\t\t\t$(classes.wrapper).css('max-width', '');\r\n\t\t\t}\r\n\r\n\t\t\tconst headerMargin = $(classes.wrapper).hasClass(classes.stateOnTop)\r\n\t\t\t\t? 0\r\n\t\t\t\t: margin;\r\n\t\t\t$(classes.wrapper).css('margin-top', margin + 'px');\r\n\t\t\t$(`.${classes.headerWrapper}`, $ctx).css('top', headerMargin + 'px');\r\n\t\t});\r\n\r\n\t\t$(window).on('disablePreventStickyHeaderAppearing', () => {\r\n\t\t\tpreventStickyHeaderAppearing = false;\r\n\t\t});\r\n\r\n\t\t$(\"html\").addClass(this.$ctx.data(\"t-classname\"));\r\n\r\n\t\tthis.$ctx.find(\".js-backhistory\").on(\"click\", this.gobackHistory);\r\n\r\n\t\tthis._initNavInPage();\r\n\r\n\t\tif (window.location.search.substr(1).indexOf('event') > -1) {\r\n\t\t\t$(`.${classes.logoLink}`).attr(\r\n\t\t\t\t'href',\r\n\t\t\t\t$('header[data-t-name=\"header\"]').attr('data-t-newlisturl')\r\n\t\t\t);\r\n\t\t}\r\n\t\tthis.hideEmptyMenu();\r\n\t\t$(window).on('resize', () => { this.hideEmptyMenu(); });\r\n\t\tresolve();\r\n\t}\r\n\tstop() { }\r\n\r\n\t/**\r\n\t * method tracks event\r\n\t *\r\n\t * @param {string} action tracking action name\r\n\t * @param {string} value tracking value\r\n\t * @returns {void}\r\n\t */\r\n\ttrack() {\r\n\t\tvar queryString = location.search.substr(1);\r\n\t\tlet pageCampaignId = $(\"header\").data(\"page-mktocampaign-id\");\r\n\t\tlet utmId = queryString !== undefined\r\n\t\t\t\t\t\t\t? queryString.indexOf(\"utm_id=\") !== -1 ? queryString.split(\"utm_id=\")[1].split(\"&\")[0] : undefined : undefined;\r\n\r\n\t\tif (utmId === undefined) {\r\n\t\t\tif (pageCampaignId === undefined) {\r\n\t\t\t\tutmId = \"\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tutmId = pageCampaignId;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst trackdata: {\r\n\t\t\tosc_id: string;\r\n\t\t} = {\r\n\t\t\tosc_id: utmId,\r\n\t\t};\r\n\r\n\t\tTrack.gtmTrack(trackdata);\r\n\t}\r\n\r\n\thideEmptyMenu() {\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\t/* if (viewport === 'small' || viewport === 'medium') {} */\r\n\t\tif (viewport === \"small\") {\r\n\t\t\t$(\".m-navigation-main__list-level1\").each(function (e) {\r\n\t\t\t\tif ($(this).children().length > 0) {\r\n\t\t\t\t\t$(this).closest(\".js-m-navigation-wrapper\").show();\r\n\t\t\t\t\t$(\".js-search-trigger\").show();\r\n\t\t\t\t\t$(\".a-search-trigger\").show();\r\n\t\t\t\t\t$(\".a-burger\").show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(this).closest(\".js-m-navigation-wrapper\").hide();\r\n\t\t\t\t\t$(\".js-search-trigger\").hide();\r\n\t\t\t\t\t$(\".a-burger\").hide();\r\n\t\t\t\t\t$(\".a-search-trigger\").hide();\r\n\t\t\t\t\t$('a.js-backhistory[href=\"#\"]').hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tgobackHistory() {\r\n\t\tif (document.referrer == \"\") {\r\n\t\t\twindow.location.href = $('header[data-t-name=\"header\"]').attr(\"data-t-newlisturl\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\thistory.go(-1);\r\n\t\t}\r\n\t}\r\n\r\n\t_duplicateMetanavigation() {\r\n\t\tconst source = $('.js-metanavigation-container--source');\r\n\t\tconst destination = $('.js-metanavigation-container--destination');\r\n\r\n\t\t$(source)\r\n\t\t\t.clone()\r\n\t\t\t.appendTo(destination);\r\n\t}\r\n\t_initStickyHeader($ctx: JQuery) {\r\n\t\tlet lastScrollTop: number = 0;\r\n\t\tlet currentScrollTop = 0;\r\n\r\n\t\t$(classes.wrapper).addClass(classes.initSticky);\r\n\t\t$(classes.wrapper).addClass(classes.stateScrollTopNoTransition);\r\n\r\n\t\tif ($(window).scrollTop() < $ctx.outerHeight()) {\r\n\t\t\t$(classes.wrapper).addClass(classes.stateOnTop);\r\n\t\t} else {\r\n\t\t\t$(classes.wrapper).addClass(classes.stateScrollUp);\r\n\t\t\t$(classes.wrapper).removeClass(classes.stateOnTop);\r\n\t\t}\r\n\r\n\t\t$(window).scroll(function () {\r\n\t\t\tif (preventStickyHeaderScrollBehaviour) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcurrentScrollTop = $(window).scrollTop();\r\n\t\t\tconst navBarHeight = $ctx.height();\r\n\t\t\tconst delta =\r\n\t\t\t\tcurrentScrollTop < navBarHeight || preventStickyHeaderAppearing\r\n\t\t\t\t\t? 0\r\n\t\t\t\t\t: 10;\r\n\t\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\r\n\t\t\tif (!$(classes.wrapper).hasClass(classes.burgerActiveClass)) {\r\n\t\t\t\tif (lastScrollTop < currentScrollTop) {\r\n\t\t\t\t\tif (currentScrollTop >= navBarHeight) {\r\n\t\t\t\t\t\t$(classes.wrapper).addClass(classes.stateScrollUp);\r\n\t\t\t\t\t\tif (viewport === 'large' || viewport === 'extra-large') {\r\n\t\t\t\t\t\t\t$(window).trigger('closeNavigation');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (lastScrollTop - currentScrollTop > delta) {\r\n\t\t\t\t\t\tif (preventStickyHeaderAppearing) {\r\n\t\t\t\t\t\t\t// if \"Prevent Sticky Header Mode\" is active, always hide header, also on scrolling to top\r\n\t\t\t\t\t\t\t$(classes.wrapper).addClass(classes.stateScrollUp);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(classes.wrapper).removeClass(classes.stateScrollUp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (lastScrollTop >= navBarHeight && currentScrollTop >= navBarHeight) {\r\n\t\t\t\t\t\t$(classes.wrapper).removeClass(classes.stateScrollTopNoTransition);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (currentScrollTop === 0) {\r\n\t\t\t\t\t$(classes.wrapper).addClass(classes.stateOnTop);\r\n\t\t\t\t\t$(classes.wrapper).addClass(classes.stateScrollTopNoTransition);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlastScrollTop = currentScrollTop;\r\n\r\n\t\t\t\tif (currentScrollTop < navBarHeight) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$(classes.wrapper).removeClass(classes.stateOnTop);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t_calcTransitionTime(transitionString: string) {\r\n\t\tconst numberPart = transitionString.match(/[\\d\\.]+/)[0];\r\n\t\tconst number = parseFloat(numberPart);\r\n\t\treturn !isNaN(number) ? number * 500 : 200;\r\n\t}\r\n\t_initNavInPage() {\r\n\t\tconst bodyHtml = document.getElementsByTagName('body')[0].innerHTML;\r\n\t\tconst anchorNameId = 'data-anchor-id';\r\n\t\tif (\r\n\t\t\tbodyHtml.indexOf(anchorNameId) == -1 ||\r\n\t\t\t$(`.${classes.headerStickyBarHideNav}`).length > 0\r\n\t\t) {\r\n\t\t\tnoHasAnchor = true;\r\n\t\t}\r\n\t\tif (\r\n\t\t\t$(`.${classes.pageShare}`).length == 0 &&\r\n\t\t\t$(`.${classes.ctaButton}`).length == 0\r\n\t\t) {\r\n\t\t\tnoHasPageShare = true;\r\n\t\t}\r\n\t\tif (noHasAnchor && noHasPageShare) {\r\n\t\t\t$(`.${classes.headerStickyBar}`).hide();\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule, getModuleByDomNode } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { addScrollClickTrigger, init as initHashScrolling } from '@project/shared/utils/hashscrolling/js/hashscrolling';\r\n\r\nconst classes: any = {\r\n\theaderTop: 'js-o-header-campaign__top',\r\n\twrapper: 'js-o-header-campaign__wrapper',\r\n\tctaArea: 'js-o-header-campaign__cta-area',\r\n\tbutton: 'js-o-header-campaign__button',\r\n\tstateFixed: 'state-o-header-campaign--fixed',\r\n\tstateNearTop: 'state-o-header-campaign--near-top',\r\n\tstateLogoTouchedHeadline: 'state-o-header-campaign--logo-touched-headline',\r\n};\r\n\r\n@createModule('HeaderCampaign')\r\n/**\r\n * Header module implementation.\r\n *\r\n * @author Christoph Merkelbach \r\n */\r\nexport class HeaderCampaign extends TerrificSpec {\r\n\tticking: boolean = false;\r\n\t$ctx: JQuery;\r\n\t$headerTop: JQuery;\r\n\t$wrapper: JQuery;\r\n\t$ctaArea: JQuery;\r\n\tpageStartToLogoEndHeight: number;\r\n\tlineHeightLargeHeadline: number;\r\n\tlogoHeightPlusMarginTop: number;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$headerTop = this.$ctx.find(`.${classes.headerTop}`);\r\n\t\tthis.$wrapper = this.$ctx.find(`.${classes.wrapper}`);\r\n\t\tthis.$ctaArea = this.$ctx.find(`.${classes.ctaArea}`);\r\n\t\tthis.pageStartToLogoEndHeight = 118;\r\n\t\tthis.lineHeightLargeHeadline = 48;\r\n\t\tthis.logoHeightPlusMarginTop = 77;\r\n\r\n\t\twindow.addEventListener('scroll', this.requestScrollTick.bind(this), false);\r\n\t\twindow.addEventListener('resize', this.onResize.bind(this), false);\r\n\r\n\t\tthis.handleCtaButtonClick();\r\n\t\tthis.requestScrollTick();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tscrollUpdate() {\r\n\t\tconst scrollTop = $(window).scrollTop();\r\n\t\tthis.$ctx.toggleClass(classes.stateFixed, scrollTop > this.$ctaArea.offset().top);\r\n\t\tthis.$ctx.toggleClass(classes.stateNearTop, scrollTop > this.$ctaArea.offset().top - 20);\r\n\r\n\t\tconst logoTouchesHeadlinePosition = this.$wrapper.offset().top - this.pageStartToLogoEndHeight;\r\n\r\n\t\tthis.$ctx.toggleClass(\r\n\t\t\tclasses.stateLogoTouchedHeadline,\r\n\t\t\tscrollTop > this.$ctaArea.offset().top - this.logoHeightPlusMarginTop\r\n\t\t);\r\n\r\n\t\tif (scrollTop < logoTouchesHeadlinePosition) {\r\n\t\t\tthis.$headerTop.addClass('state-o-header-campaign__top--expand');\r\n\t\t\tthis.$headerTop.removeClass('state-o-header-campaign__top--collapse');\r\n\t\t} else {\r\n\t\t\tthis.$headerTop.addClass('state-o-header-campaign__top--collapse');\r\n\t\t\tthis.$headerTop.removeClass('state-o-header-campaign__top--expand');\r\n\t\t}\r\n\t\tthis.ticking = false;\r\n\t}\r\n\r\n\tonResize() {\r\n\t\tthis.requestScrollTick();\r\n\t}\r\n\r\n\t/**\r\n\t * Debounces animation with browser's requestAnimation Frame to provide performance and\r\n\t * keep page smoothly scrollable even on older machines\r\n\t */\r\n\trequestScrollTick() {\r\n\t\tif (!this.ticking) {\r\n\t\t\trequestAnimationFrame(this.scrollUpdate.bind(this));\r\n\t\t\tthis.ticking = true;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleCtaButtonClick(): void {\r\n\t\tconst button = this.$ctx.find(`.${classes.button}`);\r\n\t\tconst url = button.attr('href');\r\n\t\tconst idx = url.indexOf('#');\r\n\r\n\t\tif (idx === 0) {\r\n\t\t\tthis.applyScrollToHandler(button);\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate applyScrollToHandler(button: JQuery): void {\r\n\t\tinitHashScrolling();\r\n\t\taddScrollClickTrigger(button);\r\n\t}\r\n\r\n\tstop() {\r\n\t\t// Stop\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes: any = {\r\n\t\r\n};\r\n\r\n@createModule('CampaignCollectorPageHeader')\r\n/**\r\n * Header module implementation.\r\n *\r\n * @author \r\n */\r\nexport class CampaignCollectorPageHeader extends TerrificSpec {\r\n\tticking: boolean = false;\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as ProductCompareHelper from '@project/shared/utils/product-compare/js/product-compare';\r\nimport { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst classes = {\r\n\theadline: 'js-o-product-compare__headline',\r\n\tremovebutton: 'js-o-product-compare__remove',\r\n\tbackbutton: 'js-o-product-compare__back',\r\n\tproductname: 'js-o-product-compare__productname',\r\n\ttable: 'js-o-product-compare__table',\r\n\ttablerow: 'js-o-product-compare__table-row',\r\n\ttabletop: 'js-o-product-compare__table-top',\r\n\tfixedState: 'state-o-product-compare--fixed',\r\n\ttableHidden: 'state-o-product-compare--table-is-hidden',\r\n};\r\n\r\n@createModule('ProductCompare')\r\n/**\r\n * product-compare module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class ProductCompare extends TerrificSpec {\r\n\theadlineSingleText: string;\r\n\theadlineMultiText: string;\r\n\tanimationFrameId: number;\r\n\tcurScrollTop: number;\r\n\tcurScrollLeft: number;\r\n\tisFixed: boolean;\r\n\ttopThreshold: number = 20;\r\n\t$ctx: JQuery;\r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst $headline = this.$ctx.find(`.${classes.headline}`);\r\n\t\tthis.topThreshold = $table.offset().top;\r\n\t\tthis.headlineSingleText = $headline.data('single-headline');\r\n\t\tthis.headlineMultiText = $headline.data('multi-headline');\r\n\t\tthis.updateHeadline();\r\n\t\tthis.$ctx.find(`.${classes.removebutton}`).on('click', this.onRemoveClick.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.backbutton}`).on('click', () => {\r\n\t\t\twindow.history.back();\r\n\t\t});\r\n\t\t$(window).on('scroll', this.onScroll.bind(this));\r\n\r\n\t\tconst $products = $(`.${classes.productname}`, this.$ctx);\r\n\t\tthis.$ctx.toggleClass(classes.tableHidden, $products.length <= 0);\r\n\r\n\t\tonBreakpointChange(() => (this.topThreshold = $table.offset().top));\r\n\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() {}\r\n\r\n\t/**\r\n\t * method updates headline and sets count of products\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tupdateHeadline() {\r\n\t\tconst $headline = this.$ctx.find(`.${classes.headline}`);\r\n\t\tconst count = this.$ctx.find(`.${classes.productname}`).length;\r\n\t\tif (count === 1) {\r\n\t\t\t$headline.text(this.headlineSingleText);\r\n\t\t} else {\r\n\t\t\t$headline.text(this.headlineMultiText.replace(/\\{0\\}/, `${count}`));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method handels remove click and therefor removes product from list and cookie\r\n\t *\r\n\t * @param {Object} ev eventObject\r\n\t * @returns {void}\r\n\t */\r\n\tonRemoveClick(ev: Event) {\r\n\t\tev.preventDefault();\r\n\t\tconst $el = $(ev.currentTarget).closest(`.${classes.productname}`);\r\n\t\tProductCompareHelper.removeProduct($el.data('prod-id'));\r\n\t\tthis.$ctx.toggleClass(classes.tableHidden, $el.siblings().length <= 1);\r\n\r\n\t\tif ($el.siblings().length > 0) {\r\n\t\t\tthis.$ctx.find(`.${classes.tablerow} > td:nth-child(${$el.index() + 1})`).remove();\r\n\t\t}\r\n\r\n\t\tthis.updateHeadline();\r\n\t}\r\n\r\n\t/**\r\n\t * method is called on scroll and debounces by requestAnimationFrame\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonScroll() {\r\n\t\tif (this.animationFrameId > 0) {\r\n\t\t\twindow.cancelAnimationFrame(this.animationFrameId);\r\n\t\t}\r\n\t\tthis.animationFrameId = window.requestAnimationFrame(() => {\r\n\t\t\tthis.animationFrameId = 0;\r\n\t\t\tthis.handleScrolling();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * method handles scroll position and calls corresponding methods if scrollposition has changed till last processing\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleScrolling() {\r\n\t\tconst scrollTop = window.scrollY;\r\n\t\tconst scrollLeft = window.scrollX;\r\n\r\n\t\tif (scrollTop !== this.curScrollTop) {\r\n\t\t\tthis.curScrollTop = scrollTop;\r\n\t\t\tthis.handleScrollTop();\r\n\t\t}\r\n\t\tif (this.isFixed && scrollLeft !== this.curScrollLeft) {\r\n\t\t\tthis.curScrollLeft = scrollLeft;\r\n\t\t\tthis.handleScrollLeft();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method handles scroll top position and sets tableheader fix when threshold was crossed and viceversa\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleScrollTop() {\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst $topRow = $table.find(`.${classes.tabletop}`);\r\n\t\tif (this.curScrollTop > this.topThreshold) {\r\n\t\t\tif (!this.isFixed) {\r\n\t\t\t\tthis.isFixed = true;\r\n\t\t\t\t$table.css('padding-top', `${$topRow.height()}px`);\r\n\t\t\t\tthis.$ctx.addClass(classes.fixedState);\r\n\t\t\t\tthis.handleScrollLeft();\r\n\t\t\t}\r\n\t\t} else if (this.isFixed) {\r\n\t\t\tthis.isFixed = false;\r\n\t\t\t$table.css('padding-top', '0');\r\n\t\t\tthis.$ctx.removeClass(classes.fixedState);\r\n\t\t\t$topRow.css('transform', 'translateX(0)');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method handles scroll left position and moves the tableheader accordingly\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleScrollLeft() {\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst $topRow = $table.find(`.${classes.tabletop}`);\r\n\t\t$topRow.css('transform', `translateX(-${this.curScrollLeft}px)`);\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as ProductCompareHelper from '@project/shared/utils/product-compare/js/product-compare';\r\nimport getCurrentBreakpoint, { onBreakpointChange } from '@project/shared/utils/breakpoints/js/breakpoints';\r\n\r\nconst classes = {\r\n\theadline: 'js-o-product-compare__headline',\r\n\tremovebutton: 'js-o-product-compare__remove',\r\n\tremoveAllbutton: 'js-o-product-compare__remove-all',\r\n\tbackbutton: 'js-o-product-compare__back',\r\n\tproductname: 'js-o-product-compare__productname',\r\n\ttable: 'js-o-product-compare__table',\r\n\ttablerow: 'js-o-product-compare__table-row',\r\n\ttableDataRow: 'js-o-product-compare__data-row',\r\n\ttabletop: 'js-o-product-compare__table-top',\r\n\tfixedState: 'state-o-product-compare--fixed',\r\n\ttableHidden: 'state-o-product-compare--table-is-hidden',\r\n\tarrowsHidden: 'state-o-product-compare--arrows-is-hidden',\r\n\ttitleTable: 'js-o-product-compare__title-table',\r\n\tfixedStateLeft: 'state-o-product-compare--fixed-left',\r\n\tminiTitle: 'js-o-product-compare__mini-title',\r\n\tcategoryTitle: 'js-o-product-compare__category-title',\r\n\tcategoryChild: 'js-o-product-compare__category-child',\r\n\tcategoryTh: 'js-o-product-compare__category-th',\r\n\tcategoryCollapse : 'state-o-product-compare--category-collapse',\r\n\trightControl : 'js-o-product-compare__right-control',\r\n\tleftControl : 'js-o-product-compare__left-control',\r\n\ttableContent : 'js-o-product-compare__table-content',\r\n\thighlightRowActive : 'state-o-product-compare--highlight-row',\r\n\tshowDifferences : 'js-o-product-compare__show-differences',\r\n\tshowDifferencesActive: 'state-o-product-compare--show-differences',\r\n\ttooltipBtn: 'o-product-compare__tooltip',\r\n\ttooltipPopup: 'o-product-compare__tooltip-popup',\r\n\ttooltipCloser: 'js-m-tooltip__closer',\r\n\r\n\tfavouriteBtn: \"m-favourite-button\",\r\n\tstateFavorBtnActive: \"state-m-favourite-button--active\",\r\n};\r\n\r\n@createModule('ProductCompareV2')\r\n/**\r\n * product-compare module implementation.\r\n *\r\n * @author Lars-Olof Kreim \r\n */\r\nexport class ProductCompareV2 extends TerrificSpec {\r\n\theadlineSingleText: string;\r\n\theadlineMultiText: string;\r\n\tanimationFrameId: number;\r\n\tcurScrollTop: number;\r\n\tcurScrollLeft: number;\r\n\tisFixed: boolean;\r\n\ttopThreshold: number = 0;\r\n\t$ctx: JQuery; \r\n\r\n\t/**\r\n\t * start method, called on terrific bootstap\r\n\t *\r\n\t * @param {Object} resolve function to call at the end of component start\r\n\t * @returns {void}\r\n\t */\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\t$('html.l-product-compare').addClass('l-product-compare--improvements');\r\n\t\tconst $headline = this.$ctx.find(`.${classes.headline}`);\r\n\t\tthis.headlineSingleText = $headline.data('single-headline');\r\n\t\tthis.headlineMultiText = $headline.data('multi-headline');\r\n\t\tthis.updateHeadline();\r\n\t\tthis.$ctx.find(`.${classes.removebutton}`).on('click', this.onRemoveClick.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.removeAllbutton}`).on('click', this.onRemoveAllClick.bind(this));\r\n\t\tthis.updateColumnLength();\r\n\t\tthis.$ctx.find(`.${classes.backbutton}`).on('click', () => {\r\n\t\t\twindow.history.back();\r\n\t\t});\r\n\t\tthis.highlightDifferences();\r\n\t\tthis.showDifferences();\r\n\t\tthis.$ctx.find(`.${classes.categoryTitle}`).on('click', this.onCategoryClick.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.tooltipBtn}`).on('click', this.onTooltipBtnClick.bind(this));\r\n\t\tthis.$ctx.find(`.${classes.tooltipCloser}`).on('click', this.onTooltipCloserClick.bind(this));\r\n\r\n\t\tthis.$ctx.find(`.${classes.rightControl}`).on('click', () => {\r\n\t\t\tthis.onRightControlClick()\r\n\t\t});\r\n\t\tthis.$ctx.find(`.${classes.leftControl}`).parent().addClass('disabled');\r\n\t\tthis.$ctx.find(`.${classes.leftControl}`).on('click', () => {\r\n\t\t\tthis.onLeftControlClick()\r\n\t\t});\r\n\t\tthis.hiddenControlArrows();\r\n\t\tthis.setStaticTable();\r\n\t\t$(window).on('scroll', this.onScroll.bind(this));\r\n\t\t$('body').on('scroll', this.onScroll.bind(this));\r\n\t\t$(window).on('resize', () => {\r\n\t\t\tthis.$ctx.find(`.${classes.tooltipPopup}`).hide();\r\n\t\t\tthis.setTitleTableHeight();\r\n\t\t\tthis.setTableTopOffset();\r\n\t\t\tthis.setMiniTitleHeight();\r\n\t\t\tthis.hiddenControlArrows();\r\n\t\t\tthis.setTableTopWidth();\r\n\t\t});\r\n\r\n\t\tconst $products = $(`.${classes.productname}`, this.$ctx);\r\n\t\tthis.$ctx.toggleClass(classes.tableHidden, $products.length <= 0);\r\n\r\n\t\tonBreakpointChange(() => {\r\n\t\t\tthis.setStaticTable();\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\t/**\r\n\t * stop method, called on terrific stop\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tstop() { }\r\n\r\n\t/**\r\n\t * method updates headline and sets count of products\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tupdateHeadline() {\r\n\t\tconst $headline = this.$ctx.find(`.${classes.headline}`);\r\n\t\tconst count = this.$ctx.find(`.${classes.productname}`).length;\r\n\t\tif (count === 1) {\r\n\t\t\t$headline.text(this.headlineSingleText);\r\n\t\t} else {\r\n\t\t\t$headline.text(this.headlineMultiText.replace(/\\{0\\}/, `${count}`));\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnLength() {\r\n\t\tconst $categoryTh = this.$ctx.find(`.${classes.categoryTh}`);\r\n\t\tconst count = this.$ctx.find(`.${classes.productname}`).length + 1;\r\n\t\t$categoryTh.attr('colspan', `${count}`);\r\n\r\n\t\tconst $rightControl = this.$ctx.find(`.${classes.rightControl}`);\r\n\t\tif (count < $(window).width() / 250) {\r\n\t\t\t$rightControl.parent().hide();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * method handels remove click and therefor removes product from list and cookie\r\n\t *\r\n\t * @param {Object} ev eventObject\r\n\t * @returns {void}\r\n\t */\r\n\tonRemoveClick(ev: Event) {\r\n\t\tev.preventDefault();\r\n\t\tconst $el = $(ev.currentTarget).closest(`.${classes.productname}`);\r\n\t\tconst productId = $el.data('prod-id');\r\n\r\n\t\t// url won't overwrite cookies\r\n\t\tconst currentQuery = window.location.search.substr(1);\r\n\t\tif (currentQuery.length > 0 && currentQuery.toLocaleLowerCase().indexOf(\"prdset\") > -1) {\r\n\t\t\tthis.removeFromUrl(productId);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tProductCompareHelper.removeProduct(productId);\r\n\t\t}\r\n\t\t\r\n\t\tthis.$ctx.toggleClass(classes.tableHidden, $el.siblings().length <= 1);\r\n\r\n\t\tif ($el.siblings().length > 0) {\r\n\t\t\tthis.$ctx.find(`.${classes.tablerow} > td:nth-child(${$el.index() + 1})`).remove();\r\n\t\t}\r\n\r\n\t\tthis.updateHeadline();\r\n\t\tthis.updateColumnLength();\r\n\t\tthis.setTitleTableHeight();\r\n\t\tthis.setTableTopOffset();\r\n\t\tthis.setTableTopWidth();\r\n\t\tthis.setMiniTitleHeight();\r\n\t\tthis.highlightDifferences();\r\n\t\tthis.hiddenControlArrows();\r\n\t\tthis.setStaticTable();\r\n\t\tthis.tableRemoveScoll();\r\n\t\tthis.updateFavouritesBtnStatus();\r\n\t}\r\n\r\n\tonRemoveAllClick() {\r\n\t\t// url won't overwrite cookies\r\n\t\tconst currentQuery = window.location.search.substr(1);\r\n\t\tif (currentQuery.length > 0 && currentQuery.toLocaleLowerCase().indexOf(\"prdset\") > -1) {\r\n\t\t\tthis.removeAllFromUrl();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tProductCompareHelper.removeAllProduct();\r\n\t\t}\r\n\t\tthis.$ctx.addClass(classes.tableHidden);\r\n\t\tthis.$ctx.find(`.${classes.tablerow} > td`).remove();\r\n\r\n\t\tthis.updateHeadline();\r\n\t\tthis.updateFavouritesBtnStatus();\r\n\t}\r\n\r\n\tonCategoryClick(ev: Event) {\r\n\t\tconst categoryID = $(ev.currentTarget).data('toggle-parent');\r\n\t\t$(`.${classes.categoryTitle}[data-toggle-parent='${categoryID}']`).toggleClass(classes.categoryCollapse);\r\n\t\t$(`.${classes.categoryChild}[data-toggle-child='${categoryID}']`).toggleClass(classes.categoryCollapse);\r\n\t\tthis.setTitleTableHeight();\r\n\t}\r\n\r\n\tonTooltipBtnClick(ev: Event) {\r\n\t\tconst $tooltipPopup = this.$ctx.find(`.${classes.tooltipPopup}`);\r\n\t\tconst currentTop = $(ev.currentTarget).offset().top - 14;\r\n\t\tconst currentLeft = $(ev.currentTarget).offset().left + 14;\r\n\t\t$tooltipPopup.show();\r\n\t\t$tooltipPopup.css('top',currentTop)\r\n\t\t$tooltipPopup.css('left',currentLeft)\r\n\t}\r\n\r\n\tonTooltipCloserClick(ev: Event) {\r\n\t\tev.preventDefault();\r\n\t\t$(ev.currentTarget).parents(`.${classes.tooltipPopup}`).hide();\r\n\t}\r\n\t/**\r\n\t * Highlight all differences\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thighlightDifferences() {\r\n\t\tconst columns = this.$ctx.find(`.${classes.productname}`).length - 1;\r\n\t\tconst $tableDataRow = this.$ctx.find(`.${classes.tableDataRow}`);\r\n\t\tconst $titleTable = this.$ctx.find(`.${classes.titleTable}`);\r\n\t\tconst $categoryTitle = this.$ctx.find(`.${classes.categoryTitle}`);\r\n\t\tif(columns > 0) {\r\n\t\t\t$categoryTitle.removeClass(classes.highlightRowActive);\r\n\t\t\t$tableDataRow.each((i, elem) => {\r\n\t\t\t\tlet highlight: boolean = false;\r\n\t\t\t\tfor (let num: number = 0; num < columns; ++num) {\r\n\t\t\t\t\tif ($(elem).find('td').eq(num).text() != $(elem).find('td').eq(num + 1).text()) {\r\n\t\t\t\t\t\thighlight = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tconst categoryID = $(elem).data('toggle-child');\r\n\t\t\t\tconst $curCategoryTitle = $(`.${classes.categoryTitle}[data-toggle-parent='${categoryID}']`);\r\n\t\t\t\tif (highlight == true) {\r\n\t\t\t\t\t$(elem).addClass(classes.highlightRowActive);\r\n\t\t\t\t\t$titleTable.find('tr').eq($(elem).index()).addClass(classes.highlightRowActive);\r\n\t\t\t\t\t$curCategoryTitle.addClass(classes.highlightRowActive);\r\n\t\t\t\t\t$titleTable.find('tr').eq($curCategoryTitle.index()).addClass(classes.highlightRowActive);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(elem).removeClass(classes.highlightRowActive);\r\n\t\t\t\t\t$titleTable.find('tr').eq($(elem).index()).removeClass(classes.highlightRowActive);\r\n\t\t\t\t}\r\n\t\t\t\thighlight = false;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t$tableDataRow.removeClass(classes.highlightRowActive);\r\n\t\t\t$titleTable.find('tr').removeClass(classes.highlightRowActive);\r\n\t\t\t$categoryTitle.removeClass(classes.highlightRowActive);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * Show only the differences\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tshowDifferences() {\r\n\t\tlet $checkboxElement = this.$ctx.find(`.${classes.showDifferences}`).find(\"input[type='checkbox']\");\r\n\t\tconst me = this.$ctx;\r\n\t\tconst that = this;\r\n\t\t$checkboxElement.on(\"input propertychange\", function(ev: any){\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\tif ($target.is(\":checked\")) {\r\n\t\t\t\tme.addClass(classes.showDifferencesActive);\r\n\t\t\t} else {\r\n\t\t\t\tme.removeClass(classes.showDifferencesActive);\r\n\t\t\t}\r\n\r\n\t\t\tthat.setTitleTableHeight();\r\n\t\t\tthat.setTableTopOffset();\r\n\t\t});\r\n\t}\r\n\t/**\r\n\t * method is called on scroll and debounces by requestAnimationFrame\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonScroll() {\r\n\t\tif (this.animationFrameId > 0) {\r\n\t\t\twindow.cancelAnimationFrame(this.animationFrameId);\r\n\t\t}\r\n\t\tthis.animationFrameId = window.requestAnimationFrame(() => {\r\n\t\t\tthis.animationFrameId = 0;\r\n\t\t\tthis.handleScrolling();\r\n\t\t\t//this.rightControlToggle();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * method handles scroll position and calls corresponding methods if scrollposition has changed till last processing\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleScrolling() {\r\n\t\tconst scrollTop = jQuery(window).scrollTop();\r\n\t\tconst scrollLeft = document.body.scrollLeft;\r\n\t\tthis.setTitleTableHeight();\r\n\t\tthis.setTableTopOffset();\r\n\t\tthis.setTableTopWidth();\r\n\t\tthis.setMiniTitleHeight();\r\n\r\n\t\tthis.curScrollTop = scrollTop;\r\n\t\tthis.handleScrollTop();\r\n\r\n\t\tif (this.isFixed && scrollLeft !== this.curScrollLeft) {\r\n\t\t\tthis.curScrollLeft = scrollLeft;\r\n\t\t\tthis.handleScrollLeft();\r\n\t\t}\r\n\t}\r\n\r\n\tsetMiniTitleHeight() {\r\n\t\tconst $tabletop = this.$ctx.find(`.${classes.tabletop}`);\r\n\t\tconst $miniTitle = this.$ctx.find(`.${classes.miniTitle}`);\r\n\t\t$miniTitle.find('th').height($tabletop.find('th').height());\r\n\t}\r\n\r\n\tsetTitleTableHeight() {\r\n\t\tconst $titleTable = this.$ctx.find(`.${classes.titleTable}`);\r\n\t\t$titleTable.find('th').each((i, elem) => {\r\n\t\t\tconst $eIndex = $(elem).parent().index();\r\n\t\t\t$(elem).height(\r\n\t\t\t\tthis.$ctx.find(`.${classes.tablerow}`).eq($eIndex).find('th').height()\r\n\t\t\t)\r\n\t\t});\r\n\t}\r\n\r\n\tsetTableTopWidth() {\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst $tabletop = this.$ctx.find(`.${classes.tabletop}`);\r\n\t\t$tabletop.width($table.width());\r\n\t}\r\n\r\n\thiddenControlArrows() {\r\n\t\tconst $tableContent = this.$ctx.find(`.${classes.tableContent}`);\r\n\t\tconst $screenWidth = this.$ctx.width() - 48;\r\n\t\tconst maxLength = $screenWidth / 250 - 1;\r\n\t\tconst $products = $(`.${classes.productname}`, this.$ctx);\r\n\t\tif ($products.length <= maxLength) {\r\n\t\t\tthis.$ctx.addClass(classes.arrowsHidden);\r\n\t\t\t$tableContent.css('margin-left', 0);\r\n\t\t} else {\r\n\t\t\tthis.$ctx.removeClass(classes.arrowsHidden);\r\n\t\t}\r\n\t}\r\n\r\n\tsetStaticTable() {\r\n\t\tconst $products = $(`.${classes.productname}`, this.$ctx);\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small' && $products.length <= 2) {\r\n\t\t\tthis.$ctx.addClass(classes.arrowsHidden);\r\n\t\t}\r\n\t}\r\n\r\n\ttableRemoveScoll() {\r\n\t\tconst $tableContent = this.$ctx.find(`.${classes.tableContent}`);\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst curMarginLeft = parseInt($tableContent.css(\"margin-left\"));\r\n\t\tconst maxScrollLeft = $table.width() - this.$ctx.width() + 96;\r\n\t\tif ( -curMarginLeft >= maxScrollLeft ) {\r\n\t\t\t$tableContent.css('margin-left', `-${maxScrollLeft}px`);\r\n\t\t\tthis.$ctx.find(`.${classes.rightControl}`).parent().addClass('disabled');\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * method click right arrow\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonRightControlClick() {\r\n\t\tthis.$ctx.find(`.${classes.leftControl}`).parent().removeClass('disabled');\r\n\t\tthis.tableScrollRight();\r\n\t\tthis.setTitleTableHeight();\r\n\r\n\t\tconst $titleTable = this.$ctx.find(`.${classes.titleTable}`);\r\n\t\t$titleTable.addClass(classes.fixedStateLeft);\r\n\t}\r\n\r\n\ttableScrollRight() {\r\n\t\tconst $tableContent = this.$ctx.find(`.${classes.tableContent}`);\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst curMarginLeft = parseInt($tableContent.css(\"margin-left\"));\r\n\t\tconst maxScrollLeft = $table.width() - this.$ctx.width() + 96;\r\n\t\tconst nextScrollLeft = curMarginLeft - 250;\r\n\r\n\t\tif ( - curMarginLeft < maxScrollLeft - 250) {\r\n\t\t\t$tableContent.css('margin-left', nextScrollLeft + 'px');\r\n\t\t} else {\r\n\t\t\t$tableContent.css('margin-left', `-${maxScrollLeft}px`);\r\n\t\t\tthis.$ctx.find(`.${classes.rightControl}`).parent().addClass('disabled');\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * method click left arrow\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tonLeftControlClick() {\r\n\t\tthis.$ctx.find(`.${classes.rightControl}`).parent().removeClass('disabled');\r\n\t\tthis.tableScrollLeft();\r\n\t}\r\n\r\n\ttableScrollLeft() {\r\n\t\tconst $tableContent = this.$ctx.find(`.${classes.tableContent}`);\r\n\t\tconst curMarginLeft = parseInt($tableContent.css(\"margin-left\"));\r\n\t\tconst nextScrollLeft = curMarginLeft + 250;\r\n\t\tif ( - curMarginLeft > 250) {\r\n\t\t\t$tableContent.css('margin-left', nextScrollLeft + 'px');\r\n\t\t} else {\r\n\t\t\t$tableContent.css('margin-left', 0);\r\n\t\t\tthis.$ctx.find(`.${classes.leftControl}`).parent().addClass('disabled');\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * method handles scroll top position and sets tableheader fix when threshold was crossed and viceversa\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleScrollTop() {\r\n\t\tconst $topRow = this.$ctx.find(`.${classes.tabletop}`);\r\n\t\tconst viewport = getCurrentBreakpoint() as string;\r\n\t\tif (viewport === 'small') {\r\n\t\t\tthis.topThreshold = 188;\r\n\t\t} else {\r\n\t\t\tthis.topThreshold = 0;\r\n\t\t}\r\n\r\n\t\tif (this.curScrollTop > this.topThreshold) {\r\n\t\t\tif (!this.isFixed) {\r\n\t\t\t\tthis.isFixed = true;\r\n\t\t\t\tthis.$ctx.addClass(classes.fixedState);\r\n\t\t\t\tif (viewport === 'small') {\r\n\t\t\t\t\tthis.handleScrollLeft();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (this.isFixed) {\r\n\t\t\tthis.isFixed = false;\r\n\t\t\tthis.$ctx.removeClass(classes.fixedState);\r\n\t\t\t$topRow.css('transform', 'translateX(0)');\r\n\t\t}\r\n\t}\r\n\r\n\tsetTableTopOffset() {\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst $topRow = $table.find(`.${classes.tabletop}`);\r\n\t\t$table.css('padding-top', `${$topRow.height()}px`);\r\n\t}\r\n\r\n\t/**\r\n\t * method handles scroll left position and moves the tableheader accordingly\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\thandleScrollLeft() {\r\n\t\tconst $table = this.$ctx.find(`.${classes.table}`);\r\n\t\tconst $tabletop = $table.find(`.${classes.tabletop}`);\r\n\t\t$tabletop.css('transform', `translateX(-${this.curScrollLeft}px)`);\r\n\t}\r\n\r\n\tremoveFromUrl(productId: string) {\r\n\r\n\t\tconst currentQuery = window.location.search.substr(1);\r\n\r\n\t\tif (currentQuery.length > 0) {\r\n\r\n\t\t\tif (currentQuery.toLocaleLowerCase().indexOf(\"prdset\") > -1) {\r\n\r\n\t\t\t\tconst paramArr = currentQuery.split(\"&\");\r\n\r\n\t\t\t\tparamArr.forEach((value: string, index: number, array: string[]) => {\r\n\t\t\t\t\tif (value.toLocaleLowerCase().indexOf(\"prdset\") > -1) {\r\n\t\t\t\t\t\tconst prdsetParamArr = value.split(\"=\");\r\n\t\t\t\t\t\tif(prdsetParamArr.length > 1){\r\n\t\t\t\t\t\t\tconst prdQuery = prdsetParamArr[1]; //eg: \"04196414-12942213:US|00004582-05125840:US|04874625-10771105:US\"\r\n \r\n\t\t\t\t\t\t\tconst prdSegArr = prdQuery.split(\"|\"); // \"04196414-12942213:US\"\r\n\t\t\t\t\t\t\tlet queryArr = new Array();\r\n\r\n\t\t\t\t\t\t\tprdSegArr.forEach((v: string, i: number, a: string[]) => {\r\n\t\t\t\t\t\t\t\tif(v.indexOf(productId)==-1){\r\n\t\t\t\t\t\t\t\t\tqueryArr.push(v); \r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(queryArr.length > 0){\r\n\t\t\t\t\t\t\t\tlet query = queryArr.join(\"|\");\r\n\t\t\t\t\t\t\t\tquery = `prdset=${query}`;\t\t\t\t\r\n\t\t\t\t\t\t\t\tconst search = `?${query}`; \r\n\t\t\t\t\t\t\t\thistory.pushState(null, null, search);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\thistory.pushState(null, null, \"?\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}); \r\n\r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\tremoveAllFromUrl(){\r\n\t\tconst currentQuery = window.location.search.substr(1);\r\n\t\tif (currentQuery.length > 0) {\r\n\t\t\tif (currentQuery.toLocaleLowerCase().indexOf(\"prdset\") > -1) {\r\n\t\t\t\thistory.pushState(null, null, \"?\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateFavouritesBtnStatus() {\r\n\t\tconst query = window.location.search.substr(1);\r\n\t\tconst $favouritesEle = $(\"html div[data-t-name='FavouriteButton']\");\r\n\r\n\t\tif($favouritesEle.length > 0){\r\n\t\t\tconst url = $favouritesEle.data(\"status-api-endpoint\");\r\n\t\t\tconst pageId = $favouritesEle.data(\"page-id\");\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: url,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tdata:\r\n\t\t\t\t{\r\n\t\t\t\t\tpageid: pageId,\r\n\t\t\t\t\tquery: query\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: (response: any) => {\r\n\r\n\t\t\t\t\tif (response.isActive) {\r\n\t\t\t\t\t\t$(\"html\").find(`button.${classes.favouriteBtn}`).addClass(classes.stateFavorBtnActive);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$(\"html\").find(`button.${classes.favouriteBtn}`).removeClass(classes.stateFavorBtnActive);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: () => {\r\n\t\r\n\t\t\t\t},\r\n\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\tconsole.log(`after updating url of product-compare page, update status error, ${xhr.status}, ${xhr.statusText}, ${xhr.responseText}, ${error}`);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport * as Track from '@project/shared/utils/tracking/js/tracking';\r\n\r\nconst classes = {\r\n\tteaserItem: 'o-teaser-content-area__item',\r\n\tstateHidden: 'h-visuallyhidden',\r\n\tloadMoreButton: 'js-load-more-button',\r\n\tloadMoreBar: 'js-load-more-bar',\r\n};\r\n\r\n@createModule('TeaserContentArea')\r\n/**\r\n * teaser-content-area module implementation.\r\n *\r\n * @author Heiko Frosch \r\n */\r\nexport class TeaserContentArea extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\tisOpen: boolean;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.isOpen = false;\r\n\t\tthis._handleApplicationTeaserLoadMore();\r\n\r\n\t\tthis.RegisteredUpdate();\r\n\r\n\t\tresolve();\r\n\t}\r\n\tstop() {}\r\n\r\n\t/**\r\n\t * method handles hide/show of the application/evergreen teasers\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\t_handleApplicationTeaserLoadMore() {\r\n\t\t// if this an Application/Evergreen and not one of the other teasers and it has not yet been opened:\r\n\t\tif (typeof this.$ctx.data('shown-teasers') !== 'undefined' && this.isOpen === false) {\r\n\t\t\tconst $teaserItems = this.$ctx.find(`.${classes.teaserItem}`);\r\n\t\t\tlet minOfShowTeasers = this.$ctx.data('shown-teasers');\r\n\t\t\tlet PageSizeLoadMore = this.$ctx.data('load-items');\r\n\r\n\t\t\tif ($teaserItems.length <= minOfShowTeasers) {\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreBar}`).addClass(classes.stateHidden);\r\n\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\t\t\t} else {\r\n\t\t\t\tminOfShowTeasers++;\r\n\t\t\t\t$teaserItems.filter(`:nth-child(n + ` + minOfShowTeasers + `)`).addClass(classes.stateHidden);\r\n\t\t\t\t$(window).trigger('NavigationInPage:reInitNoClick');\r\n\r\n\t\t\t\tlet currentShowTeasers = minOfShowTeasers -1;\r\n\t\t\t\tthis.$ctx.find(`.${classes.loadMoreButton}`).on('click', (ev: any) => {\r\n\t\t\t\t\tlet allOfShowTeasers = currentShowTeasers + PageSizeLoadMore;\r\n\t\t\t\t\tfor( var i=0; i= $teaserItems.length) {\r\n\t\t\t\t\t\t\t$(ev.currentTarget)\r\n\t\t\t\t\t\t\t\t.parent(`.${classes.loadMoreBar}`)\r\n\t\t\t\t\t\t\t\t.addClass(classes.stateHidden);\r\n\r\n\t\t\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tRegisteredUpdate() {\r\n\t\tconst $teaserItems = this.$ctx.find(`.${classes.teaserItem}`);\r\n\t\tif(Track.isKnownMarketoLead()) {\r\n\t\t\t$teaserItems.each((i,e) => {\r\n\t\t\t\tconst $teaser = $(e).children();\r\n\t\t\t\tconst classList = $teaser.attr('class');\r\n\t\t\t\tconst className = classList.split(' ');\r\n\t\t\t\t$teaser.removeClass(className[0] + '--locked');\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\tcurrentLink: 'o-customer-lounge-navigation__link-current',\r\n};\r\n\r\n@createModule('CustomerLoungeNavigation')\r\n/**\r\n * customer-lounge-navigation module\r\n */\r\nexport class CustomerLoungeNavigation extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$currentLink: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$currentLink = $(`.${classes.currentLink}`, this.$ctx);\r\n\r\n\t\tthis.initDuplicate();\r\n\t\tthis.initCollapseOverview();\r\n\t\tthis.collapseContent();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tstop() {}\r\n\r\n\tinitDuplicate() {\r\n\t\t$('.g-grid--customerLounge').prepend(this.$currentLink.nextAll().clone());\r\n\t}\r\n\r\n\tinitCollapseOverview() {\r\n\t\tlet collapseOverview = false;\r\n\t\tif (location.search && location.search.indexOf('nav=true') > -1) {\r\n\t\t\tcollapseOverview = true;\r\n\t\t} \r\n\r\n\t\tif(this.$currentLink.index() == 0){\r\n\t\t\tif (collapseOverview) {\r\n\t\t\t\t$('.g-grid--customerLounge__content').addClass(\"collapsed\");\r\n\t\t\t\tthis.$currentLink.addClass('collapsed');\r\n\t\t\t}else{\r\n\t\t\t\t$('.g-grid--customerLounge__content').removeClass(\"collapsed\");\r\n\t\t\t\tthis.$currentLink.removeClass('collapsed');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\r\n\tcollapseContent() {\r\n\t\tthis.$currentLink.on('click', () => {\r\n\t\t\tif (this.$currentLink.hasClass('collapsed')) {\r\n\t\t\t\t$('.g-grid--customerLounge__content').slideDown('fast');\r\n\t\t\t\tthis.$currentLink.removeClass('collapsed');\r\n\t\t\t} else {\r\n\t\t\t\t$('.g-grid--customerLounge__content').slideUp('fast');\r\n\t\t\t\tthis.$currentLink.addClass('collapsed');\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n stateHidden: 'h-visuallyhidden',\r\n loadMoreButton: 'js-load-more-button',\r\n loadMoreBar: 'js-load-more-bar',\r\n activeState: 'm-customer-lounge-project--active',\r\n selectLink: 'js-o-customer-lounge-project-teaser__sort',\r\n projectBody: 'js-m-customer-lounge-project__body',\r\n projectHead: 'js-m-customer-lounge-project__head',\r\n collapseHide: 'js-m-customer-lounge-project__collapse-hide',\r\n teaserContainer: 'o-customer-lounge-project-teaser__container',\r\n loadingBar: 'o-customer-lounge-project-teaser__loading-wrapper',\r\n showLoadingBar: 'state-loading-wrapper--shown'\r\n};\r\n\r\n@createModule('CustomerLoungeProjectTeaser')\r\n/**\r\n * customer-lounge-project-teaser module implementation.\r\n */\r\nexport class CustomerLoungeProjectTeaser extends TerrificSpec {\r\n $ctx: JQuery;\r\n isOpen: boolean;\r\n\r\n start(resolve: Function) {\r\n this.$ctx = $(this._ctx);\r\n\r\n this.initAccordion();\r\n\r\n // init teaser data\r\n this.getTeaserData();\r\n\r\n this.$ctx.find(`.${classes.loadMoreButton}`).on(\"click\", this.loadMore.bind(this));\r\n\r\n this.$ctx.find(`.${classes.selectLink}`).on('change', (ev: Event) => this.sorting());\r\n\r\n resolve();\r\n }\r\n\r\n getTeaserData() {\r\n this.lockLoadMoreButton();\r\n this.showLoadingBar();\r\n\r\n const apiEndpoint = this.$ctx.data(\"api-endpoint\");\r\n const pageNumber = this.$ctx.data(\"page-number\");\r\n const loungeName = this.$ctx.data(\"lounge-name\");\r\n const datasource = this.$ctx.data(\"datasource\");\r\n\r\n const sortingValue = this.$ctx.find(`.${classes.selectLink}`).find(\"option:selected\").val() as string;\r\n const sortingProperties = sortingValue.split(\",\");\r\n const sortBy = sortingProperties[0];\r\n const sortOrder = sortingProperties[1];\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: apiEndpoint,\r\n dataType: 'html',\r\n data:\r\n {\r\n pageNumber: pageNumber,\r\n sortBy: sortBy,\r\n sortOrder: sortOrder,\r\n loungeName: loungeName,\r\n datasource: datasource\r\n },\r\n success: (response: any) => {\r\n console.log(\"get teaser data success\");\r\n\r\n let container = this.$ctx.find(`.${classes.teaserContainer}`);\r\n container.append(response);\r\n\r\n let data = container.find(\"script[type='application/json']\");\r\n\r\n if (data.length > 0) {\r\n let json = data[0].innerHTML;\r\n let jsonData = JSON.parse(json);\r\n\r\n if (jsonData.totalNumber > 0) {\r\n this.updatePageNumber(jsonData.pageNumber + 1);\r\n this.updateLoadMoreButton(jsonData.enableLoadMore);\r\n\r\n } else {\r\n //this.updateNoResult();\r\n }\r\n data.remove();\r\n } else {\r\n //this.updateNoResult();\r\n }\r\n\r\n },\r\n complete: () => {\r\n this.hideLoadingBar();\r\n },\r\n error: () => {\r\n console.log(\"get project teaser data error\");\r\n }\r\n });\r\n }\r\n\r\n loadMore() {\r\n this.getTeaserData();\r\n }\r\n\r\n\r\n updateLoadMoreButton(enable: boolean) {\r\n if (enable) {\r\n this.unlockLoadMoreButton();\r\n } else {\r\n this.lockLoadMoreButton();\r\n }\r\n }\r\n\r\n lockLoadMoreButton() {\r\n this.$ctx.find(`.${classes.loadMoreBar}`).addClass(`${classes.stateHidden}`);\r\n }\r\n\r\n unlockLoadMoreButton() {\r\n this.$ctx.find(`.${classes.loadMoreBar}`).removeClass(`${classes.stateHidden}`);\r\n }\r\n\r\n showLoadingBar() {\r\n this.$ctx.find(`.${classes.loadingBar}`).addClass(`${classes.showLoadingBar}`);\r\n }\r\n\r\n hideLoadingBar() {\r\n this.$ctx.find(`.${classes.loadingBar}`).removeClass(`${classes.showLoadingBar}`);\r\n }\r\n\r\n updatePageNumber(pageNumber: number) {\r\n this.$ctx.data(\"page-number\", pageNumber);\r\n }\r\n\r\n sorting() {\r\n this.$ctx.find(`.${classes.teaserContainer}`).empty();\r\n this.updatePageNumber(0);\r\n this.getTeaserData();\r\n }\r\n\r\n initAccordion() {\r\n $(document).on(\"click\",\r\n `.${classes.projectHead}`,\r\n function () {\r\n $(this).parent().toggleClass(`${classes.activeState}`);\r\n $(this).parent().find(`.${classes.projectBody}`).slideToggle();\r\n });\r\n $(document).on('click',\r\n `.${classes.collapseHide}`,\r\n function () {\r\n $(this).parent().parent().parent().removeClass(classes.activeState);\r\n $(this).parent().parent().slideUp();\r\n });\r\n }\r\n\r\n stop() { }\r\n} \r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { FavouritesShare } from '../../../molecules/favourites-share/js/favourites-share';\r\nimport { FavouritesAction } from '../../../molecules/favourites-action/js/favourites-action';\r\n\r\nconst classes = {\r\n\tstatePopupVisible: \"state-favourite-popup--visible\",\r\n\tstatePopupClose: \"state-favourite-popup--close\",\r\n\tstateCountMax: \"state-textarea-count-max\",\r\n\tstateLoadingVisible: \"state-loading-wrapper--shown\",\r\n\tstateValMsgVisible: \"state-field-validation-error--visible\",\r\n\tstatePromptBoxVisible: \"state-m-prompt-box--hidden\",\r\n\r\n\tcurrentTitle: 'js-m-favourites-entry-table__heading',\r\n\tlistContainer: 'js-o-favourites-overview__filter',\r\n\tentryContainer: \"js-o-favourites-overview-entry\",\r\n\r\n\tfavouritesFilterClose: 'js-o-favourites-overview__filter-closer',\r\n\tstateFavouritesFilterShow: 'state-o-favourites-overview__filter--open',\r\n\r\n\tdynamicContainer: \"js-m-favourites-overview-dynamic-container\",\r\n\r\n\tnoScrollingBar: \"no-scrolling--without-scrollbar\",\r\n\tlistItem: \"js-m-favourites-list-item\",\r\n\tentryItem: \"js-m-favourites-entry-item\",\r\n\tactionItem: \"js-m-tooltip-actions__list-item\",\r\n\taddListItem: \"js-m-favourites-list__add-item\",\r\n\r\n\tloadingIndicator: \"m-favourite-button__loading-wrapper\",\r\n\r\n\tpromptSharedSuccess: \"js-prompt-shared-success\",\r\n\tpromptSharedFailure: \"js-prompt-shared-failure\"\r\n\r\n};\r\n\r\nconst popupClasses = {\r\n\tpopupBox: \"js-m-modal-actions\",\r\n\ttextareaBox: \"js-m-modal-actions__textarea\"\r\n}\r\n\r\nconst actions = {\r\n\taddList: \"AddList\",\r\n\teditList: \"EditList\",\r\n\tdeleteList: \"DeleteList\",\r\n\tcopyList: \"CopyList\",\r\n\tshareList: \"ShareList\",\r\n\r\n\teditEntry: \"EditEntry\",\r\n\tcopyEntry: \"CopyEntry\",\r\n\tmoveEntry: \"MoveEntry\",\r\n\tdeleteEntry: \"DeleteEntry\"\r\n};\r\n\r\nconst params = {\r\n\tsharedSuccess: \"sharedsuccess\",\r\n\tlistId: \"listid\",\r\n};\r\n\r\n@createModule('FavouritesOverview')\r\n/**\r\n * favourites-overview module\r\n */\r\nexport class FavouritesOverview extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$currentTitle: JQuery;\r\n\t$favouritesFilter: JQuery;\r\n\t$favouritesFilterClose: JQuery;\r\n\r\n\t$dynamicContainer: JQuery;\r\n\t$listContainer: JQuery;\r\n\t$entryContainer: JQuery;\r\n\r\n\t$loadingIndicator: JQuery;\r\n\r\n\tactionViewEndpoint: string;\r\n\tcontentType: string;\r\n\r\n\tfavorShare: FavouritesShare;\r\n\tfavorAction: FavouritesAction;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$currentTitle = $(`.${classes.currentTitle}`, this.$ctx);\r\n\t\tthis.$favouritesFilter = $(`.${classes.listContainer}`, this.$ctx);\r\n\t\tthis.$favouritesFilterClose = $(`.${classes.favouritesFilterClose}`, this.$ctx);\r\n\r\n\t\tthis.actionViewEndpoint = this.$ctx.data(\"action-view-endpoint\");\r\n\t\tthis.contentType = this.$ctx.data(\"content-type\");\r\n\r\n\t\tthis.favorShare = new FavouritesShare();\r\n\t\tthis.favorAction = new FavouritesAction();\r\n\r\n\t\tthis.showFavouritesFilter();\r\n\t\tthis.hideFavouritesFilter();\r\n\r\n\t\tthis.$dynamicContainer = this.$ctx.find(`.${classes.dynamicContainer}`);\r\n\t\tthis.$listContainer = this.$ctx.find(`.${classes.listContainer}`);\r\n\t\tthis.$entryContainer = this.$ctx.find(`.${classes.entryContainer}`);\r\n\r\n\t\tthis.$loadingIndicator = this.$ctx.find(`.${classes.loadingIndicator}`);\r\n\r\n\t\tthis.$ctx.find(`.${classes.addListItem}`).on(\"click\", () => {\r\n\t\t\tthis.getActionPartialView(actions.addList, 0);\r\n\t\t});\r\n\r\n\t\tthis.updateUrl();\r\n\r\n\t\tthis.$listContainer.find(`.${classes.actionItem}`).on(\"click\", (ev: any) => {\r\n\t\t\tconst $action = $(ev.currentTarget);\r\n\r\n\t\t\tconst actionType = $action.data(\"action-name\");\r\n\t\t\tconst listId = $action.data(\"item-id\");\r\n\r\n\t\t\tthis.getActionPartialView(actionType, listId);\r\n\r\n\t\t});\r\n\r\n\t\tthis.$entryContainer.find(`.${classes.actionItem}`).on(\"click\", (ev: any) => {\r\n\t\t\tconst $action = $(ev.currentTarget);\r\n\r\n\t\t\tconst actionType = $action.data(\"action-name\");\r\n\t\t\tconst entryId = $action.data(\"item-id\");\r\n\r\n\t\t\tthis.getActionPartialView(actionType, entryId);\r\n\t\t});\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tgetActionPartialView(actionType: string, id: number) {\r\n\t\tconst url = window.location.pathname;\r\n\t\tthis.showLoadingIndicator();\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'post',\r\n\t\t\turl: this.actionViewEndpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tactionType: actionType,\r\n\t\t\t\tid: id,\r\n\t\t\t\tcurrentUrl: url\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response.length > 2) {\r\n\r\n\t\t\t\t\tthis.$dynamicContainer.append(response);\r\n\t\t\t\t\tconst $popup = this.$dynamicContainer.children();\r\n\t\t\t\t\tthis.favorAction.displayPopup($popup);\r\n\r\n\t\t\t\t\tif (actionType == actions.shareList) {\r\n\t\t\t\t\t\tthis.favorShare.rebindEmailViewEvents($popup);\r\n\t\t\t\t\t\tthis.favorShare.bindEmailSubmitEvent($popup, this.contentType);\r\n\t\t\t\t\t\tthis.favorShare.bindClipboardEvents($popup, this.contentType);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.favorAction.rebindCommonViewEvents($popup);\r\n\t\t\t\t\t\tthis.favorAction.bindSubmitEvent($popup, this.contentType);\r\n\t\t\t\t\t\tthis.prefillTextareaBox();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\tthis.hideLoadingIndicator();\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`get action-view error, action type: ${actionType}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprefillTextareaBox() {\r\n\r\n\t\tconst $textareaBox = this.$dynamicContainer.find(`.${popupClasses.textareaBox}`);\r\n\r\n\t\tif ($textareaBox.length > 0) {\r\n\t\t\tconst prefillTxt = $textareaBox.attr(\"value\");\r\n\r\n\t\t\tif (prefillTxt.length > 0) {\r\n\t\t\t\t$textareaBox.val(prefillTxt);\r\n\r\n\t\t\t\t$textareaBox.focus();\r\n\r\n\t\t\t\tthis.favorAction.countTextarea($textareaBox);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowLoadingIndicator() {\r\n\t\tthis.$loadingIndicator.addClass(classes.stateLoadingVisible);\r\n\t}\r\n\r\n\thideLoadingIndicator() {\r\n\t\tthis.$loadingIndicator.removeClass(classes.stateLoadingVisible);\r\n\t}\r\n\r\n\tshowFavouritesFilter() {\r\n\t\tthis.$currentTitle.on('click', () => {\r\n\t\t\tthis.$favouritesFilter.addClass(classes.stateFavouritesFilterShow);\r\n\t\t})\r\n\t}\r\n\r\n\thideFavouritesFilter() {\r\n\t\tthis.$favouritesFilterClose.on('click', () => {\r\n\t\t\tthis.$favouritesFilter.removeClass(classes.stateFavouritesFilterShow);\r\n\t\t})\r\n\t}\r\n\r\n\tupdateUrl() {\r\n\t\tconst currentQuery = window.location.search.substr(1).toLocaleLowerCase();\r\n\r\n\t\tif (currentQuery.indexOf(params.listId) > -1) {\r\n\t\t\tconst paramArr = currentQuery.split(\"&\");\r\n\t\t\tlet query = \"\";\r\n\t\t\tparamArr.forEach((value: string, index: number, array: string[]) => {\r\n\t\t\t\tif (value.indexOf(params.listId) > -1) {\r\n\t\t\t\t\tquery = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tquery = `?${query}`;\r\n\r\n\t\t\thistory.pushState(null, null, query);\r\n\t\t} else {\r\n\t\t\thistory.pushState(null, null, document.location.origin + document.location.pathname);\r\n\t\t}\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { floatControlLabel } from '@project/shared/utils/form-control/js/form-control';\r\nimport { FavouritesAction } from '../../../molecules/favourites-action/js/favourites-action';\r\nimport * as copy from 'copy-to-clipboard';\r\n\r\nconst classes = {\r\n\tpopupBox: \"js-m-modal-actions\",\r\n\ttextareaContainer: \"js-m-modal-actions-textarea-container\",\r\n\ttextareaBox: \"js-m-modal-actions__textarea\",\r\n\ttextareaValLength: \"js-m-modal-actions__textarea-count-length\",\r\n\ttextareaValLengthMax: \"js-m-modal-actions__textarea-count-max\",\r\n\r\n\tconfirmationBtn: \"js-m-modal-actions-confirmation\",\r\n\r\n\temailContainer: \"js-m-modal-actions-email-container\",\r\n\temailAdd: \"js-add-email-input\",\r\n\temailRemove: \"js-remove-email-input\",\r\n\temailTemplate: \"js-m-modal-actions__email-template\",\r\n\temailGroup: \"js-m-modal-actions__email-group\",\r\n\temailRequired: \"js-email-required\",\r\n\taddEmailDisabled: 'state-m-modal-actions__add-email--disabled',\r\n\r\n\tclipboardTitle: \"js-m-modal-actions__clipboard-anchor\",\r\n\r\n\tinputValidationError: \"input-validation-error\",\r\n\tinputAvailableError: \"input-available-error\",\r\n\tfieldValidationError: \"js-checklist-validation-error\",\r\n}\r\n\r\n@createModule('FavouritesShare')\r\n/**\r\n * favourites-prompt\r\n *\r\n */\r\nexport class FavouritesShare extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tstart(resolve: () => void) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tresolve();\r\n\t}\r\n\r\n\tgenerateEmailTemplate(emailTemplateHtml: string) {\r\n\r\n\t\tconst $template = $(emailTemplateHtml);\r\n\t\t// get a random id\r\n\t\tconst date = new Date();\r\n\t\tconst id = `emailtemp_${date.getSeconds()}${date.getMilliseconds()}`;\r\n\r\n\t\t$template.find(\"label\").attr(\"for\", id);\r\n\t\t$template.find(\"input\").attr(\"id\", id);\r\n\r\n\t\treturn $template.prop(\"outerHTML\");\r\n\t}\r\n\r\n\trebindEmailViewEvents($popup: JQuery) {\r\n\r\n\t\t// bind Email events\r\n\t\tconst $emailContainer = $popup.find(`.${classes.emailContainer}`);\r\n\t\tif ($emailContainer.length > 0) {\r\n\t\t\tthis.bindEmailContainerEvents($emailContainer);\r\n\t\t}\r\n\r\n\t\tconst $emailMessageContainer = $popup.find(`.${classes.textareaContainer}`);\r\n\t\tif ($emailMessageContainer.length > 0) {\r\n\t\t\tthis.bindEmailMessageEvents($emailMessageContainer);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tbindEmailSubmitEvent($popup: JQuery, contentType: string) {\r\n\t\t// bind submit button\r\n\t\t$popup.find(`.${classes.confirmationBtn}`).on('click', (ev: any) => {\r\n\t\t\tconst url = $popup.data(\"api-endpoint\");\r\n\t\t\tconst id = $popup.data(\"item-id\");\r\n\r\n\t\t\tconst textareaTxt = $popup.find(\"textarea\").val();\r\n\t\t\tconst textbox = this.getEmailAddresses($popup);\r\n\r\n\t\t\tif (this.canSubmit($popup)) {\r\n\r\n\t\t\t\tconst $btnEle = $(ev.currentTarget);\r\n\t\t\t\t$btnEle.attr(\"disabled\", \"disabled\");\r\n\r\n\t\t\t\tnew FavouritesAction().track(\"E-Mail\", contentType);\r\n\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: 'post',\r\n\t\t\t\t\turl: url,\r\n\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\tdata:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpublicId: id,\r\n\t\t\t\t\t\ttextareaInput: textareaTxt,\r\n\t\t\t\t\t\ttextInput: textbox\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: (response: any) => {\r\n\r\n\t\t\t\t\t\tif (response.success) {\r\n\t\t\t\t\t\t\tconst url = this.getReloadUrl(response.id);\r\n\t\t\t\t\t\t\twindow.location.replace(url);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (response.isUnavailable) {\r\n\t\t\t\t\t\t\t\t$popup.find(`.${classes.textareaContainer}`).find(\"textarea\").addClass(classes.inputValidationError);;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tconst url = this.getReloadUrl(\"0\");\r\n\t\t\t\t\t\t\t\twindow.location.replace(url);\r\n\t\t\t\t\t\t\t\tconsole.log(response.message);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\t$btnEle.removeAttr(\"disabled\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\t\t\tconsole.log(`submit action-view error, endpoint: ${url}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindClipboardEvents($popup: JQuery, contentType: string) {\r\n\r\n\t\tconst $clipboardTitle = $popup.find(`.${classes.clipboardTitle}`);\r\n\t\t$clipboardTitle.on(\"click\", (ev: any) => {\r\n\r\n\t\t\tnew FavouritesAction().track(\"Copy Link\", contentType);\r\n\r\n\t\t\tconst opts = {\r\n\t\t\t\tdebug: false,\r\n\t\t\t\tmessage: 'Press #{⌘+C} on macOS or #{Ctrl+C} on Windows to copy',\r\n\t\t\t};\r\n\r\n\t\t\tlet snapshot = \"\";\r\n\t\t\tlet data = $popup.find(\"script[type='application/json']\");\r\n\t\t\tif (data.length > 0) {\r\n\t\t\t\tlet json = data[0].innerHTML;\r\n\t\t\t\tif (json.length > 0) {\r\n\r\n\t\t\t\t\tlet jsonData = JSON.parse(json);\r\n\t\t\t\t\tsnapshot = jsonData.Snapshot;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcopy(snapshot, opts);\r\n\r\n\t\t\t$clipboardTitle.prev().removeClass('show');\r\n\t\t\t$clipboardTitle.prev().addClass('show');\r\n\t\t\twindow.setTimeout(() => {\r\n\t\t\t\t$clipboardTitle.prev().removeClass('show');\r\n\t\t\t}, 3500);\r\n\r\n\t\t});\r\n\r\n\t}\r\n\r\n\tbindEmailContainerEvents($emailContainer: JQuery) {\r\n\r\n\t\tconst _this = this;\r\n\r\n\t\t// bind email-box floating label\r\n\t\t$emailContainer.find(\".a-input\").on(\"focus\", (ev: any) => {\r\n\t\t\tconst me = ev.currentTarget;\r\n\t\t\tfloatControlLabel(me, true)\r\n\t\t});\r\n\r\n\t\t// bind email box event\r\n\t\t$emailContainer.find(\"input[type=email]\").first().on(\"input propertychange\", function (ev: any) {\r\n\t\t\tconst $target = $(ev.currentTarget);\r\n\t\t\t_this.validateEmailBox($target);\r\n\t\t});\r\n\r\n\t\t// bind add-email event\r\n\t\t$emailContainer.find(`.${classes.emailAdd}`).on(\"click\", (ev: any) => {\r\n\t\t\tconst $emailTemplate = $emailContainer.find(`.${classes.emailTemplate}`);\r\n\r\n\t\t\tconst $emailTemplateHtml = this.generateEmailTemplate($emailTemplate.html());\r\n\r\n\t\t\tconst $addEmailBtn = $(ev.currentTarget);\r\n\r\n\t\t\tvar emailLength = $emailContainer.find(`.${classes.emailGroup}`).length;\r\n\t\t\tif (emailLength > 9) {\r\n\t\t\t\t$addEmailBtn.addClass(classes.addEmailDisabled);\r\n\t\t\t}\r\n\r\n\t\t\t$emailTemplate.before($emailTemplateHtml);\r\n\r\n\t\t\t// bind float event to new created emailbox\r\n\t\t\t$emailTemplate.prev().find(\".a-input\").on(\"focus\", (ev: any) => {\r\n\t\t\t\tconst me = ev.currentTarget;\r\n\t\t\t\tfloatControlLabel(me, true)\r\n\t\t\t});\r\n\r\n\t\t\t// bind remove emailbox event to new created emailbox\r\n\t\t\t$emailTemplate.prev().find(`.${classes.emailRemove}`).on(\"click\", (ev: any) => {\r\n\t\t\t\t$(ev.currentTarget).parent().remove();\r\n\t\t\t\t$addEmailBtn.removeClass(classes.addEmailDisabled);\r\n\t\t\t});\r\n\r\n\t\t\t// bind emailvalidate event to new created emailbox\r\n\t\t\t$emailTemplate.find(\"input[type=email]\").on(\"input propertychange\", function (ev: any) {\r\n\t\t\t\tconst $target = $(ev.currentTarget);\r\n\t\t\t\t_this.validateEmailBox($target);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tbindEmailMessageEvents($textareaContainer: any) {\r\n\r\n\t\tconst _this = this;\r\n\t\tconst favorAction = new FavouritesAction();\r\n\r\n\t\t// bind text area floating label\r\n\t\t$textareaContainer.on(\"focus\", `.${classes.textareaBox}`, (ev: any) => {\r\n\t\t\tconst me = ev.currentTarget;\r\n\t\t\tfloatControlLabel(me, true)\r\n\r\n\t\t\t// remove textarea malicious content validation message\r\n\t\t\tif ($(me).hasClass(classes.inputValidationError)) {\r\n\t\t\t\t$(me).removeClass(classes.inputValidationError);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// bind text area counter\r\n\t\t$textareaContainer.find(`.${classes.textareaBox}`).on(\"input propertychange\", function (ev: any) {\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\tfavorAction.countTextarea($target);\r\n\t\t})\r\n\t}\r\n\r\n\tgetEmailAddresses($popup: JQuery): string {\r\n\t\tconst $emailGroupEles = $popup.find(`.${classes.emailContainer}`).children(`.${classes.emailGroup}`).find(\"input[type='email']\");\r\n\t\tconst addressArr = new Array();\r\n\t\t$emailGroupEles.each((i: any, e: any) => {\r\n\t\t\tconst value = $(e).val() as string;\r\n\t\t\tif (typeof (value) != \"undefined\") {\r\n\t\t\t\taddressArr.push(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconst addressStr = addressArr.join(\";\");\r\n\r\n\t\treturn addressStr;\r\n\r\n\t}\r\n\r\n\t// logic: \r\n\t// 1. first email is required\r\n\t// 2. email addresses are available\r\n\t// 3. email message \r\n\tcanSubmit($popup: JQuery): boolean {\r\n\t\t// validate textbox\r\n\t\tlet emailboxVal = true;\r\n\r\n\t\tconst $emailContainer = $popup.find(`.${classes.emailContainer}`);\r\n\t\tif ($emailContainer.length > 0) {\r\n\t\t\temailboxVal = this.ValidateEmailContainer($emailContainer);\r\n\t\t}\r\n\r\n\t\treturn emailboxVal;\r\n\t}\r\n\r\n\tValidateEmailAddress(email: string): boolean {\r\n\t\tif (email == null || email == undefined || email == '' || email.length == 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tconst re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\t\treturn re.test(String(email).toLowerCase());\r\n\t}\r\n\r\n\tValidateEmailContainer($emailContainer: JQuery) {\r\n\r\n\t\tlet result = true;\r\n\r\n\t\tconst $emailGroupEles = $emailContainer.children(`.${classes.emailGroup}`);\r\n\r\n\t\t$emailGroupEles.each((i: number, e: any) => {\r\n\r\n\t\t\tconst $emailInputBox = $(e).find(\"input[type=email]\");\r\n\r\n\t\t\tconst boxResult = this.validateEmailBox($emailInputBox);\r\n\t\t\tif (!boxResult) {\r\n\t\t\t\tresult = false;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tvalidateEmailBox($emailBox: any): boolean {\r\n\r\n\t\tconst email = $emailBox.val();\r\n\r\n\t\tlet result = true;\r\n\t\tif ($emailBox.parents(`.${classes.emailGroup}`).hasClass(classes.emailRequired)) {\r\n\r\n\t\t\tif (email == null || email == undefined || email == '' || email.length == 0) {\r\n\t\t\t\t$emailBox.addClass(classes.inputValidationError);\r\n\t\t\t\tresult = false;\r\n\t\t\t} else {\r\n\t\t\t\t$emailBox.removeClass(classes.inputValidationError);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst emailVal = this.ValidateEmailAddress(email);\r\n\r\n\t\tif (emailVal) {\r\n\t\t\t$emailBox.removeClass(classes.inputAvailableError);\r\n\t\t} else {\r\n\t\t\t$emailBox.addClass(classes.inputAvailableError);\r\n\t\t\tresult = false;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tgetReloadUrl(sharedListId: string): string {\r\n\r\n\t\tlet result = window.location.href;\r\n\r\n\t\tlet currentQuery = window.location.search.substr(1);\r\n\r\n\t\tlet resultArr = new Array();\r\n\t\tconst paramArr = currentQuery.split(\"&\");\r\n\r\n\t\tparamArr.forEach((value: string, index: number, array: string[]) => {\r\n\t\t\tif (value.indexOf(\"sharedsuccess\") < 0) {\r\n\t\t\t\tresultArr.push(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tresultArr.push(`sharedsuccess=${sharedListId}`);\r\n\r\n\t\tconst query = resultArr.join(\"&\");\r\n\t\tresult = `${window.location.origin}${window.location.pathname}?${query}`;\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { FavouritesAction } from '../../../molecules/favourites-action/js/favourites-action';\r\n\r\nconst classes = {\r\n\tstateLoadingVisible: \"state-loading-wrapper--shown\",\r\n\r\n\taddFavouritesBtn: 'js-add-to-favourites',\r\n\tcheckboxColumn: 'm-table__column-checkbox',\r\n\tloadingIndicator: \"m-favourite-button__loading-wrapper\",\r\n\tdynamicContainer: \"js-m-favourites-sharing-overview-dynamic-container\",\r\n\tcheckbox: 'js-a-input-checkbox__input',\r\n\r\n\ttbody: \"m-table__body\"\r\n};\r\n\r\nconst popupClasses = {\r\n\tpopupBox: \"js-m-modal-actions\",\r\n\ttextareaBox: \"js-m-modal-actions__textarea\"\r\n}\r\n\r\n@createModule('OverviewShareFavourites')\r\n/**\r\n * overview-share-favourites module\r\n */\r\nexport class OverviewShareFavourites extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$loadingIndicator: JQuery;\r\n\t$dynamicContainer: JQuery;\r\n\r\n\tactionViewEndpoint: string;\r\n\tloginViewEndpoint: string;\r\n\r\n\tfavorAction: FavouritesAction;\r\n\r\n\texpired: boolean;\r\n\tcontentType: string;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$loadingIndicator = this.$ctx.find(`.${classes.loadingIndicator}`);\r\n\t\tthis.$dynamicContainer = this.$ctx.find(`.${classes.dynamicContainer}`);\r\n\r\n\t\tthis.actionViewEndpoint = this.$ctx.data(\"action-view-endpoint\");\r\n\t\tthis.loginViewEndpoint = this.$ctx.data(\"login-view-endpoint\");\r\n\r\n\t\tthis.favorAction = new FavouritesAction();\r\n\r\n\t\tthis.expired = this.$ctx.data(\"expired\");\r\n\t\tthis.contentType = this.$ctx.data(\"content-type\");\r\n\r\n\t\tthis.changeSelectAll();\r\n\r\n\t\tthis.$ctx.find(`.${classes.addFavouritesBtn}`).on(\"click\", () => {\r\n\r\n\t\t\tconst $selectedEntries = this.$ctx.find(`.${classes.tbody}`).find(\"input[type=checkbox]:checked\");\r\n\r\n\t\t\tif ($selectedEntries.length > 0) {\r\n\t\t\t\tthis.getActionPartialView();\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tif (this.expired) {\r\n\t\t\tthis.favorAction.track(\"List past timeline\", this.contentType);\r\n\t\t} else {\r\n\t\t\tthis.favorAction.track(\"List within timeline\", this.contentType);\r\n\t\t}\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tgetActionPartialView() {\r\n\t\tthis.showLoadingIndicator();\r\n\r\n\t\tconst ids = this.getSharedEntryIds();\r\n\t\tconst actionType = \"AddSharedEntry\";\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'post',\r\n\t\t\turl: this.actionViewEndpoint,\r\n\t\t\tdataType: 'html',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tactionType: actionType,\r\n\t\t\t\tids: ids\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response.length > 2) {\r\n\r\n\t\t\t\t\tthis.$dynamicContainer.append(response);\r\n\t\t\t\t\tconst $popup = this.$dynamicContainer.children(`.${popupClasses.popupBox}`);\r\n\t\t\t\t\tthis.favorAction.displayPopup($popup);\r\n\t\t\t\t\tthis.favorAction.rebindCommonViewEvents($popup);\r\n\t\t\t\t\tthis.favorAction.bindAddSharedEntrySubmitEvent($popup, this.contentType);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\tcomplete: () => {\r\n\t\t\t\tthis.hideLoadingIndicator();\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`get action-view error, action type: ${actionType}, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tgetSharedEntryIds() {\r\n\r\n\t\tlet $checkedItems = this.$ctx.find(`.${classes.tbody}`).find(\"input[type=checkbox]:checked\");\r\n\t\tconst idArr = new Array();\r\n\t\t$checkedItems.each((i: any, e: any) => {\r\n\t\t\tconst value = $(e).attr(\"id\");\r\n\t\t\tif (typeof (value) != \"undefined\") {\r\n\t\t\t\tidArr.push(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconst ids = idArr.join(\",\");\r\n\r\n\t\treturn ids;\r\n\t}\r\n\r\n\tshowLoadingIndicator() {\r\n\t\tthis.$loadingIndicator.addClass(classes.stateLoadingVisible);\r\n\t}\r\n\r\n\thideLoadingIndicator() {\r\n\t\tthis.$loadingIndicator.removeClass(classes.stateLoadingVisible);\r\n\t}\r\n\r\n\r\n\t//Select All\r\n\tchangeSelectAll() {\r\n\t\tconst $allSubCheckboxes = $('.m-table__body').find('input[type=checkbox]:not(:disabled)');\r\n\t\tvar i = 0;\r\n\t\t$('#SelectAll').on(\"input propertychange\", function (ev: any) {\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\tif ($target.is(\":checked\")) {\r\n\t\t\t\ti = $allSubCheckboxes.length;\r\n\t\t\t\t$allSubCheckboxes.prop('checked', true);\r\n\t\t\t} else {\r\n\t\t\t\ti = 0;\r\n\t\t\t\t$allSubCheckboxes.prop('checked', false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t$allSubCheckboxes.on(\"input propertychange\", function (ev: any) {\r\n\t\t\tconst $target: any = $(ev.currentTarget);\r\n\t\t\tif ($target.is(\":checked\")) {\r\n\t\t\t\ti++;\r\n\t\t\t\tif (i == $allSubCheckboxes.length) {\r\n\t\t\t\t\t$('#SelectAll').prop('checked', true);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ti--;\r\n\t\t\t\t$('#SelectAll').prop('checked', false);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tareAllSubChecked($checkboxes: JQuery = $('input[type=checkbox]:not(:disabled)', this.$ctx)) {\r\n\t\treturn $checkboxes.toArray().every(this.isElementChecked);\r\n\t}\r\n\r\n\tisElementChecked(element: HTMLInputElement) {\r\n\t\treturn element.checked;\r\n\t}\r\n\r\n\r\n\tstop() { }\r\n\r\n}\r\n","import { createModule, getModuleByDomNode, startNode } from 'terrific-singleton'\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { FilterMultiselect } from '../../../molecules/filter-multiselect/js/filter-multiselect';\r\nimport { FilterTwoLevelMultiselect } from '../../../molecules/filter-two-level-multiselect/js/filter-two-level-multiselect';\r\nimport { FavouriteButton } from '../../../molecules/favourite-button/js/favourite-button';\r\nimport { VideoComponent } from '../../../atoms/video/js/video';\r\nimport * as Cookies from 'js-cookie';\r\n\r\nconst dataAttributes = {\r\n apiEndpointFacetAndList: 'api-endpoint-facetandlist',\r\n apiEndpointList: 'api-endpoint-list',\r\n configuration: 'configuration',\r\n pageid: 'pagid',\r\n filterConfiguration: 'filters',\r\n noResults: 'noresults',\r\n updateUrl: 'update-url',\r\n};\r\n\r\nlet counterForTabs: number = 0;\r\nconst classes = {\r\n container: 'js-teaser-filter-area__container',\r\n counterFooter: 'js-teaser-filter-area__counter-footer',\r\n counterHeading: 'js-teaser-filter-area__counter-heading',\r\n filterClearButton: 'js-teaser-filter-area__clear-filter',\r\n filterOneLevelListSelector: 'm-filter-multiselect__list-level2',\r\n filterOneLevelItemSelector: 'js-m-filter-multiselect__item--level2',\r\n filterTwoLevelFirstLevelListSelector: 'm-filter-two-level-multiselect__list-level2',\r\n filterTwoLevelFirstLevelItemSelector: 'js-m-filter-two-level-multiselect__item--level2',\r\n filterTwoLevelSecondLevelListSelector: 'js-m-filter-two-level-multiselect__list-level3',\r\n filterTwoLevelSecondLevelItemSelector: 'js-m-filter-two-level-multiselect__item--level3',\r\n filterTagsContainer: 'js-teaser-filter-area__filter-tags-container',\r\n loadMoreButton: 'js-load-more-button',\r\n mobileFilterArea: 'js-teaser-filter-area__filter-area',\r\n mobileFilterLabel: 'js-teaser-filter-area__filter-label',\r\n mobileFilterOpen: 'o-teaser-filter-area__filter--open',\r\n mobileFilterClose: 'js-teaser-filter-area__filter--close',\r\n countdown: \"js-m-new-event__countdown-time\",\r\n activeDays: \"state-m-new-event__show-days\",\r\n eventDescription: \"js-m-new-event__description\",\r\n stateBtnActive: \"state-m-favourite-button--active\",\r\n tabsContainer: \"o-teaser-tabs\",\r\n videoEl: 'js-a-video__element',\r\n videoConsentEl: 'js-a-video-consent__element',\r\n videoCaption: 'js-a-video__caption',\r\n videoPlay: 'mi-big-play-cover',\r\n videoLocked: 'js-a-video__locked',\r\n videoGatedPlay: 'js-a-video__gated-play',\r\n videoOpenedBtn: 'js-a-video__opened-btn',\r\n};\r\n\r\ninterface IFilterConfiguration {\r\n id: string;\r\n isTwoLevelFilter: boolean;\r\n backLinkText: string;\r\n sortMode: string;\r\n originalId: string;\r\n}\r\n\r\nlet videoDataGlobalForFilter: any;\r\n\r\ninterface IvideoDataForFilter {\r\n\tplayerId: string;\r\n\tvideoId: string;\r\n\tembedscript: string;\r\n\tflashPath: string;\r\n\tapiUrl: string;\r\n\tconfigType: string;\r\n\ttId: number;\r\n\tusercentricsDpsServiceName: string;\r\n\tmilestonePercentage: number;\r\n\tmktoenvId: string;\r\n}\r\n\r\ninterface IArticleFinderOptions {\r\n apiEndpointFacetAndList: string;\r\n apiEndpointList: string;\r\n configuration: string;\r\n pageid: string;\r\n filters: IFilterConfiguration[];\r\n updateUrl: boolean;\r\n}\r\n\r\ninterface IArticleFinderFilter {\r\n $element: JQuery;\r\n backLinkText: string;\r\n id: string;\r\n sortMode: IArticleFinderFilterSortMode,\r\n twoLevelMultiselect: boolean;\r\n values: IArticleFinderFilterValue[];\r\n originalId: string;\r\n}\r\n\r\nenum IArticleFinderFilterSortMode { None, Label, Value }\r\n\r\ninterface IArticleFinderFilterValue {\r\n checked: boolean;\r\n children: IArticleFinderFilterValue[];\r\n count: number;\r\n disabled: boolean;\r\n humanReadableValue: string;\r\n isPreselected: boolean;\r\n label: string;\r\n value: string;\r\n hideDisableFilters: boolean;\r\n}\r\n\r\n@createModule('TeaserFilterArea')\r\nexport class TeaserFilterArea extends TerrificSpec {\r\n private $ctx: JQuery;\r\n\r\n private currentCount: number = 0;\r\n private hasLoadedMore: boolean = false;\r\n private totalCount: number = 0;\r\n\r\n private filters: IArticleFinderFilter[];\r\n private options: IArticleFinderOptions;\r\n\r\n start(resolve: Function) {\r\n this.$ctx = $(this._ctx);\r\n\r\n this.options = {\r\n apiEndpointFacetAndList: this.$ctx.data(dataAttributes.apiEndpointFacetAndList),\r\n apiEndpointList: this.$ctx.data(dataAttributes.apiEndpointList),\r\n configuration: this.$ctx.data(dataAttributes.configuration),\r\n filters: this.$ctx.data(dataAttributes.filterConfiguration), // Automatically parsed as JSON\r\n updateUrl: this.$ctx.data(dataAttributes.updateUrl), // Automatically parsed as boolean\r\n pageid: this.$ctx.data(dataAttributes.pageid),\r\n };\r\n\r\n // Assign events\r\n this.$ctx.on('click', `.${classes.mobileFilterLabel}`, this.onMobileFiltersOpen.bind(this));\r\n this.$ctx.on('click', `.${classes.mobileFilterClose}`, this.onMobileFiltersClose.bind(this));\r\n this.$ctx.on('FilterMultiCloseButton FilterTwoLevelMultiCloseButton', this.onMobileFiltersClose.bind(this));\r\n this.$ctx.on('FilterMultiCheckboxChanged FilterTwoLevelMultiCheckboxChanged',\r\n (event: any, clickEvent: Event) => { this.facetAndList(false); });\r\n this.$ctx.on('click', `.${classes.loadMoreButton}`, this.loadMore.bind(this));\r\n this.$ctx.on('click', `.${classes.filterClearButton}`, this.clearFilters.bind(this));\r\n\r\n // Initiate\r\n this.filters = this.createFilters();\r\n this.updateLoadMore(false);\r\n this.facetAndList(true);\r\n resolve();\r\n }\r\n\r\n stop() {\r\n }\r\n\r\n private createFilters(): IArticleFinderFilter[] {\r\n let results: IArticleFinderFilter[] = [];\r\n for (let i = 0; i < this.options.filters.length; i++) {\r\n const filter = this.options.filters[i];\r\n const element = document.getElementById(filter.id);\r\n if (element != null) {\r\n let sort = IArticleFinderFilterSortMode.None;\r\n if (filter.sortMode === \"value\") {\r\n sort = IArticleFinderFilterSortMode.Value\r\n } else if (filter.sortMode === \"label\") {\r\n sort = IArticleFinderFilterSortMode.Label\r\n }\r\n results.push({\r\n $element: $(element),\r\n backLinkText: filter.backLinkText,\r\n id: filter.id,\r\n sortMode: sort,\r\n twoLevelMultiselect: filter.isTwoLevelFilter,\r\n values: [],\r\n originalId: filter.originalId,\r\n });\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n private facetAndList(initialRequest: boolean): void {\r\n\r\n let payload: { configuration: string, pageid: string, count?: number, facets: { id: string, values: string[] }[], fromUrl?: boolean, offset: number, initialcall: boolean } = {\r\n configuration: this.options.configuration,\r\n pageid: this.options.pageid,\r\n facets: [],\r\n offset: 0,\r\n initialcall: initialRequest,\r\n };\r\n\r\n if (initialRequest && window.location.search.length > 1) {\r\n let parts = location.search.substr(1).split('&');\r\n for (let i = 0; i < parts.length; i++) {\r\n const keyValue = parts[i].split('=', 2);\r\n if (keyValue.length != 2) continue;\r\n\r\n const key = keyValue[0];\r\n const value = keyValue[1];\r\n //for new events\r\n if (key === \"tab\") {\r\n continue;\r\n }\r\n\r\n if (key === \"show\") {\r\n payload.count = parseInt(value);\r\n payload.fromUrl = true;\r\n } else {\r\n let matches = payload.facets.filter(x => x.id == key);\r\n if (matches && matches.length == 1) {\r\n matches[0].values.push(value);\r\n } else {\r\n payload.facets.push({ id: key, values: [value], });\r\n payload.fromUrl = true;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n payload.facets = this.getSelectedFacets();\r\n }\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: this.options.apiEndpointFacetAndList,\r\n dataType: 'html',\r\n data: payload,\r\n }).done((response: string) => {\r\n this.hasLoadedMore = false;\r\n\r\n var container = this.$ctx.find(`.${classes.container}`);\r\n container.html('').append(response);\r\n\r\n // Look for a script tag containing extra data.\r\n const data = container.find(\"script[type='application/json']\");\r\n if (data.length > 0) {\r\n const json = data[0].innerHTML;\r\n const jsonData = JSON.parse(json);\r\n\r\n this.updateCounters(jsonData.count, jsonData.displayed, jsonData.heading, jsonData.footer);\r\n this.updateFacets(jsonData.facets, jsonData.initialcall, jsonData.allowchangingprefiller);\r\n this.updateLoadMore(jsonData.showMore);\r\n this.updateUri(initialRequest);\r\n this.updateFavoriteStatus();\r\n this.onFavoriteButtonClick();\r\n // Remove the script tag.\r\n data.remove();\r\n } else {\r\n counterForTabs = counterForTabs + 1;\r\n var message = this.$ctx.data(dataAttributes.noResults);\r\n $(container)\r\n .closest('.js-o-teaser-tabs__content')\r\n .find(`.js-teaser-filter-area__counter-footer`)\r\n .text(message);\r\n if ($('.o-teaser-tabs').find('.js-o-teaser-tabs__content').length > 1) {\r\n $(container)\r\n .closest('.js-o-teaser-tabs__content')\r\n .hide();\r\n if (counterForTabs == $('.o-teaser-tabs').find('.js-o-teaser-tabs__content').length) {\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.o-teaser-tabs')\r\n .hide();\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.event-container-general-title')\r\n .hide();\r\n }\r\n } else {\r\n //DCJMCP-1673 hide tab if no events instead showing failed to load\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.o-teaser-tabs')\r\n .hide();\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.event-container-general-title')\r\n .hide();\r\n }\r\n }\r\n this.eventDescriptionEllipsis();\r\n this.initCountdown();\r\n this.AssignTeaserVideoComponentEvents();\r\n this.AssignVideoComponentEvents();\r\n }).fail(() => {\r\n // Request failed.\r\n var message = this.$ctx.data(dataAttributes.noResults);\r\n this.$ctx.find(`.${classes.counterFooter}`).text(message);\r\n\r\n });\r\n }\r\n\r\n private loadMore(): void {\r\n var payload = {\r\n configuration: this.options.configuration,\r\n facets: this.getSelectedFacets(),\r\n offset: this.currentCount,\r\n pageid: this.options.pageid,\r\n initialcall: false,\r\n }\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: this.options.apiEndpointList,\r\n dataType: 'html',\r\n data: payload,\r\n }).done((response: string) => {\r\n this.hasLoadedMore = true;\r\n\r\n var container = this.$ctx.find(`.${classes.container}`);\r\n container.append(response);\r\n\r\n // Look for a script tag containing extra data.\r\n const data = container.find(\"script[type='application/json']\");\r\n if (data.length > 0) {\r\n const json = data[0].innerHTML;\r\n const jsonData = JSON.parse(json);\r\n\r\n this.updateCounters(jsonData.count, jsonData.displayed, jsonData.heading, jsonData.footer);\r\n this.updateFacets(jsonData.facets, jsonData.initialcall, jsonData.allowchangingprefiller);\r\n this.updateLoadMore(jsonData.showMore);\r\n this.updateUri(false);\r\n this.updateFavoriteStatus();\r\n this.onFavoriteButtonClick();\r\n // Remove the script tag.\r\n data.remove();\r\n } else {\r\n counterForTabs = counterForTabs + 1;\r\n var message = this.$ctx.data(dataAttributes.noResults);\r\n $(container)\r\n .closest('.js-o-teaser-tabs__content')\r\n .find(`.js-teaser-filter-area__counter-footer`)\r\n .text(message);\r\n if ($('.o-teaser-tabs').find('.js-o-teaser-tabs__content').length > 1) {\r\n $(container)\r\n .closest('.js-o-teaser-tabs__content')\r\n .hide();\r\n if (counterForTabs == $('.o-teaser-tabs').find('.js-o-teaser-tabs__content').length) {\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.o-teaser-tabs')\r\n .hide();\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.event-container-general-title')\r\n .hide();\r\n }\r\n } else {\r\n //DCJMCP-1673 hide tab if no events instead showing failed to load\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.o-teaser-tabs')\r\n .hide();\r\n $('.js-teaser-filter-area__counter-footer')\r\n .closest('.event-container-general-title')\r\n .hide();\r\n }\r\n }\r\n this.eventDescriptionEllipsis();\r\n this.AssignTeaserVideoComponentEvents();\r\n this.AssignVideoComponentEvents();\r\n }).fail(() => {\r\n // Request failed.\r\n var message = this.$ctx.data(dataAttributes.noResults);\r\n this.$ctx.find(`.${classes.counterFooter}`).text(message);\r\n });\r\n }\r\n\r\n private updateCounters(count: number, displayed: number, heading: string, footer: string): void {\r\n this.totalCount = count;\r\n this.currentCount = displayed;\r\n this.$ctx.find(`.${classes.counterHeading}`).text(heading);\r\n this.$ctx.find(`.${classes.counterFooter}`).text(footer);\r\n }\r\n\r\n private updateLoadMore(enabled: boolean): void {\r\n if (enabled) {\r\n this.$ctx.find(`.${classes.loadMoreButton}`).show();\r\n this.$ctx.find(\".o-teaser-filter-area__load-more-bar\").css({ \"border-top\": \"2px solid #e6e6e6\", \"margin-top\": \"20px\" });\r\n }\r\n else {\r\n this.$ctx.find(`.${classes.loadMoreButton}`).hide();\r\n }\r\n }\r\n\r\n private updateFacets(facets: any[], initialcall: boolean, allowchangingprefiller: boolean): void {\r\n if (typeof facets === \"undefined\" || !facets || facets.length === 0) {\r\n return;\r\n }\r\n\r\n for (let i = 0; i < facets.length; i++) {\r\n const facet = facets[i];\r\n\r\n let theFilter = this.filters.find(x => x.originalId == facet.id);\r\n if (!theFilter) {\r\n console.warn(`Filter ${facet.id} was not found.`);\r\n continue;\r\n }\r\n\r\n theFilter.values = [];\r\n if (theFilter.twoLevelMultiselect) {\r\n\r\n this.UpdateMultiLevelFacet(facet, theFilter, initialcall, allowchangingprefiller)\r\n }\r\n else {\r\n this.UpdateFacetLevelOne(facet, theFilter, initialcall, allowchangingprefiller);\r\n }\r\n }\r\n\r\n this.updateFilterTags();\r\n this.updateFilterElements();\r\n }\r\n\r\n private updateFilterTags(): void {\r\n const hello = 'o-teaser-filter-area__filter-tags';\r\n\r\n let tags: { value: string, label: string, filter: string }[] = [];\r\n for (let i = 0; i < this.filters.length; i++) {\r\n const filter = this.filters[i];\r\n\r\n if (filter.twoLevelMultiselect) {\r\n filter.values.forEach(x => {\r\n x.children.forEach(y => {\r\n if (y.checked && !y.disabled) tags.push({\r\n filter: filter.id,\r\n value: y.value,\r\n label: y.label,\r\n });\r\n });\r\n });\r\n } else {\r\n filter.values.forEach(x => {\r\n if (x.checked && !x.disabled) tags.push({\r\n filter: filter.id,\r\n value: x.value,\r\n label: x.label,\r\n });\r\n });\r\n }\r\n }\r\n\r\n if (tags.length) {\r\n const tagsContainer = this.$ctx.find(`.${classes.filterTagsContainer}`);\r\n tagsContainer.empty();\r\n\r\n tags.forEach(x => {\r\n var tag = $(`
    \r\n ${x.label}
    `);\r\n tag.on('click', this.onFilterTagClick.bind(this));\r\n tagsContainer.append(tag);\r\n });\r\n\r\n this.$ctx.find(`.${hello}`).show();\r\n } else {\r\n this.$ctx.find(`.${hello}`).hide();\r\n }\r\n }\r\n\r\n private onFilterTagClick(e: Event): void {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n let tag = $(e.currentTarget);\r\n for (let i = 0; i < this.filters.length; i++) {\r\n const filter = this.filters[i];\r\n if (filter.id == tag.data('sc-filter')) {\r\n if (filter.twoLevelMultiselect) {\r\n filter.$element\r\n .find(`.${classes.filterTwoLevelSecondLevelItemSelector}`)\r\n .find(`input[data-sc-id='${tag.data(\"sc-id\")}']`)\r\n .prop('checked', false);\r\n } else {\r\n filter.$element\r\n .find(`input[data-sc-id='${tag.data(\"sc-id\")}']`)\r\n .prop('checked', false);\r\n }\r\n this.facetAndList(false);\r\n return;\r\n }\r\n }\r\n }\r\n\r\n private clearFilters(e: Event): void {\r\n e.preventDefault();\r\n\r\n for (let i = 0; i < this.filters.length; i++) {\r\n this.filters[i].$element.find('input:checked').prop('checked', false);\r\n }\r\n this.facetAndList(false);\r\n }\r\n\r\n private updateFilterElements(): void {\r\n for (let i = 0; i < this.filters.length; i++) {\r\n const filter = this.filters[i];\r\n if (filter.twoLevelMultiselect) {\r\n this.updateFilterElementsWithTwoLevels(filter);\r\n } else {\r\n this.updateFilterElementWithOneLevel(filter);\r\n }\r\n }\r\n }\r\n\r\n private updateFilterElementWithOneLevel(filter: IArticleFinderFilter): void {\r\n const terrificSelector = '[data-t-name=\"FilterMultiselect\"]';\r\n\r\n let newItemsAdded = false;\r\n let container = filter.$element.find(`.${classes.filterOneLevelListSelector}`);\r\n let unhandledItems = container.find(`.${classes.filterOneLevelItemSelector}`);\r\n\r\n for (let j = 0; j < filter.values.length; j++) {\r\n const value = filter.values[j];\r\n\r\n // Try to find existing item in list.\r\n let match = unhandledItems.filter((i, e) => {\r\n return $(e).find('input').data('sc-id') == value.value;\r\n }).first();\r\n\r\n if (match.length > 0) {\r\n unhandledItems = unhandledItems.not(match);\r\n\r\n match.find('input')\r\n .prop('checked', value.checked)\r\n .prop('disabled', value.disabled);\r\n } else {\r\n let match = $(`
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • `);\r\n match.find('input')\r\n .prop('checked', value.checked)\r\n .prop('disabled', value.disabled);\r\n if (value.disabled === false || value.hideDisableFilters === false) {\r\n container.append(match);\r\n newItemsAdded = true;\r\n }\r\n }\r\n }\r\n\r\n // Disable filter values that are no longer recieved.\r\n for (let j = 0; j < unhandledItems.length; j++) {\r\n const unhandledItem = unhandledItems.eq(j);\r\n\r\n unhandledItem.find('input')\r\n .prop('checked', false)\r\n .prop('disabled', true);\r\n }\r\n\r\n // Sort filter values in case new entries were added.\r\n if (newItemsAdded) {\r\n if (filter.sortMode === IArticleFinderFilterSortMode.Label) {\r\n let all = container.find(`.${classes.filterOneLevelItemSelector}`);\r\n let sorted = Array.prototype.sort.apply(all, [(a: HTMLElement, b: HTMLElement) => {\r\n const vA = $('.a-input-checkbox__label', a).text().toLowerCase();\r\n const vB = $('.a-input-checkbox__label', b).text().toLowerCase();\r\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\r\n }]);\r\n container.append(sorted);\r\n } else if (filter.sortMode === IArticleFinderFilterSortMode.Value) {\r\n let all = container.find(`.${classes.filterOneLevelItemSelector}`);\r\n let sorted = Array.prototype.sort.apply(all, [(a: HTMLElement, b: HTMLElement) => {\r\n const vA = $('.a-input-checkbox__input', a).val();\r\n const vB = $('.a-input-checkbox__input', b).val();\r\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\r\n }]);\r\n container.append(sorted);\r\n }\r\n }\r\n\r\n // Execute methods and/or rebind events on the filter-multiselect.\r\n let component = filter.$element.closest(terrificSelector);\r\n if (component.length > 0) {\r\n let filterTwoLevelMultiselect = getModuleByDomNode(component[0]) as FilterMultiselect;\r\n filterTwoLevelMultiselect.setFilterCheckedClass();\r\n }\r\n }\r\n\r\n private updateFilterElementsWithTwoLevels(filter: IArticleFinderFilter): void {\r\n const terrificSelector = '[data-t-name=\"FilterTwoLevelMultiselect\"]';\r\n\r\n let newItemsAdded = false;\r\n const currentYear = new Date().getFullYear().toString();\r\n const levelOneContainer = filter.$element.find(`.${classes.filterTwoLevelFirstLevelListSelector}`);\r\n let unhandledItems = levelOneContainer.find(`.${classes.filterTwoLevelFirstLevelItemSelector}`);\r\n\r\n for (let i = 0; i < filter.values.length; i++) {\r\n const value = filter.values[i];\r\n\r\n // See if we can locate the matching level 1 item.\r\n let match = unhandledItems.filter((i, e) => {\r\n return $(e).find('input').data('sc-id') == value.value;\r\n }).first();\r\n\r\n if (match.length > 0) {\r\n unhandledItems = unhandledItems.not(match);\r\n\r\n match.find('input')\r\n .prop('checked', value.checked)\r\n .prop('disabled', value.disabled);\r\n } else {\r\n match = $(`
  • \r\n \r\n
    \r\n
    \r\n ${filter.backLinkText}\r\n ${value.label}\r\n
    \r\n\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
      \r\n
      \r\n
    • `);\r\n match.find('input')\r\n .prop('checked', value.checked)\r\n .prop('disabled', value.disabled);\r\n if ((filter.id === \"date_Event Finder Container\" && value.humanReadableValue === currentYear) ||\r\n (filter.id === \"date_Event Finder Container past webinars\" && value.humanReadableValue < currentYear) ||\r\n value.hideDisableFilters === false) {\r\n levelOneContainer.append(match);\r\n newItemsAdded = true;\r\n } else {\r\n continue;\r\n }\r\n }\r\n\r\n let newChildItemsAdded = false;\r\n const levelTwoContainer = match.find(`.${classes.filterTwoLevelSecondLevelListSelector}`);\r\n let unhandledChildItems = levelTwoContainer.find(`.${classes.filterTwoLevelSecondLevelItemSelector}`);\r\n\r\n for (let j = 0; j < value.children.length; j++) {\r\n const childValue = value.children[j];\r\n\r\n let match2 = unhandledChildItems.filter((i, e) => {\r\n return $(e).find('input').data('sc-id') == childValue.value;\r\n }).first();\r\n\r\n if (match2.length > 0) {\r\n unhandledChildItems = unhandledChildItems.not(match2);\r\n\r\n match2.find('input')\r\n .prop('checked', childValue.checked)\r\n .prop('disabled', childValue.disabled);\r\n } else {\r\n let match2 = $(`
    • \r\n
      \r\n \r\n \r\n
      \r\n
    • `);\r\n match2.find('input')\r\n .prop('checked', childValue.checked)\r\n .prop('disabled', childValue.disabled);\r\n if (childValue.disabled === false || childValue.hideDisableFilters === false) {\r\n levelTwoContainer.append(match2);\r\n newChildItemsAdded = true;\r\n }\r\n }\r\n }\r\n\r\n // Disable filter values that are no longer recieved.\r\n for (let j = 0; j < unhandledChildItems.length; j++) {\r\n const unhandledChildItem = unhandledChildItems.eq(j);\r\n unhandledChildItem\r\n .prop('checked', false)\r\n .prop('disabled', true);\r\n }\r\n\r\n // Sort filter values in case new entries were added.\r\n if (newChildItemsAdded) {\r\n if (filter.sortMode === IArticleFinderFilterSortMode.Label) {\r\n let all = levelTwoContainer.find(`.${classes.filterTwoLevelSecondLevelItemSelector}`);\r\n let sorted = Array.prototype.sort.apply(all, [(a: HTMLElement, b: HTMLElement) => {\r\n const vA = $('.a-input-checkbox__label', a).text().toLowerCase();\r\n const vB = $('.a-input-checkbox__label', b).text().toLowerCase();\r\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\r\n }]);\r\n levelTwoContainer.append(sorted);\r\n } else if (filter.sortMode === IArticleFinderFilterSortMode.Value) {\r\n let all = levelTwoContainer.find(`.${classes.filterTwoLevelSecondLevelItemSelector}`);\r\n let sorted = Array.prototype.sort.apply(all, [(a: HTMLElement, b: HTMLElement) => {\r\n const vA = $('.a-input-checkbox__input', a).val();\r\n const vB = $('.a-input-checkbox__input', b).val();\r\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\r\n }]);\r\n levelTwoContainer.append(sorted);\r\n }\r\n }\r\n }\r\n\r\n // Disable filter values that are no longer recieved.\r\n for (let i = 0; i < unhandledItems.length; i++) {\r\n const unhandledItem = unhandledItems.eq(i);\r\n unhandledItem\r\n .prop('checked', false)\r\n .prop('disabled', true);\r\n }\r\n\r\n // Sort filter values in case new entries were added.\r\n if (newItemsAdded) {\r\n if (filter.sortMode === IArticleFinderFilterSortMode.Label) {\r\n let all = levelOneContainer.find(`.${classes.filterTwoLevelFirstLevelItemSelector}`);\r\n let sorted = Array.prototype.sort.apply(all, [(a: HTMLElement, b: HTMLElement) => {\r\n const vA = $('.a-input-checkbox__label', a).text().toLowerCase();\r\n const vB = $('.a-input-checkbox__label', b).text().toLowerCase();\r\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\r\n }]);\r\n levelOneContainer.append(sorted);\r\n } else if (filter.sortMode === IArticleFinderFilterSortMode.Value) {\r\n let all = levelOneContainer.find(`.${classes.filterTwoLevelFirstLevelItemSelector}`);\r\n let sorted = Array.prototype.sort.apply(all, [(a: HTMLElement, b: HTMLElement) => {\r\n const vA = $('.a-input-checkbox__input', a).val();\r\n const vB = $('.a-input-checkbox__input', b).val();\r\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\r\n }]);\r\n levelOneContainer.append(sorted);\r\n }\r\n }\r\n\r\n // Execute methods and/or rebind events on the filter-two-level-multiselect.\r\n let component = filter.$element.closest(terrificSelector);\r\n if (component.length > 0) {\r\n let filterTwoLevelMultiselect = getModuleByDomNode(component[0]) as FilterTwoLevelMultiselect;\r\n filterTwoLevelMultiselect.rebindEvents();\r\n filterTwoLevelMultiselect.setFilterCheckedClass();\r\n filterTwoLevelMultiselect.setFilterDisabledClass();\r\n }\r\n }\r\n\r\n private updateUri(initialRequest: boolean): void {\r\n // Don't update the URL when working in the page editor\r\n if (!this.options.updateUrl) { return; }\r\n\r\n var parts: string[] = [];\r\n\r\n\r\n this.filters.forEach(x => {\r\n x.values.forEach(y => {\r\n if (y.isPreselected) {\r\n parts.push(`${y.value}=${y.humanReadableValue}`);\r\n // Exclude preselected values from being displayed in the query string.\r\n }\r\n\r\n if (x.twoLevelMultiselect) {\r\n // Two level: check the child items.\r\n y.children.forEach(z => {\r\n if (z.checked) {\r\n parts.push(`${x.originalId}=${z.humanReadableValue}`);\r\n\r\n }\r\n });\r\n } else {\r\n // Single level: check these items.\r\n if (y.checked) {\r\n parts.push(`${x.originalId}=${y.humanReadableValue}`);\r\n }\r\n }\r\n });\r\n });\r\n\r\n if (this.hasLoadedMore) {\r\n parts.push(`show=${this.currentCount}`);\r\n }\r\n\r\n //for new events\r\n let urlParts = location.search.substr(1).split('&');\r\n for (let i = 0; i < urlParts.length; i++) {\r\n const keyValue = urlParts[i].split('=', 2);\r\n if (keyValue.length != 2) continue;\r\n\r\n const key = keyValue[0];\r\n const value = keyValue[1];\r\n if (key === \"tab\") {\r\n parts.push(`tab=${value}`);\r\n }\r\n }\r\n\r\n let url = document.location.origin + document.location.pathname;\r\n if (initialRequest) {\r\n url = url + document.location.search;\r\n if (parts.length > 0 && url.includes(\"?\")) {\r\n for (let i = 0; i < parts.length; i++) {\r\n if (url.indexOf(parts[i]) == -1) {\r\n url += '&' + parts[i];\r\n }\r\n }\r\n }\r\n else {\r\n if (parts.length > 0) {\r\n url += \"?\" + parts.join(\"&\");\r\n }\r\n }\r\n }\r\n else {\r\n if (parts.length > 0) url += \"?\" + parts.join(\"&\");\r\n }\r\n\r\n history.replaceState(null, document.title, url);\r\n }\r\n\r\n private getSelectedFacets() {\r\n var results: { id: string, values: string[] }[] = [];\r\n for (let i = 0; i < this.filters.length; i++) {\r\n const filter = this.filters[i];\r\n\r\n if (filter.twoLevelMultiselect) {\r\n let checked = filter.$element.find(`.${classes.filterTwoLevelSecondLevelItemSelector} input:checked`);\r\n if (checked.length) {\r\n var result = {\r\n id: filter.originalId,\r\n values: []\r\n };\r\n for (let j = 0; j < checked.length; j++) {\r\n const value = checked.eq(j).data('sc-id');\r\n // Ensure that the selected values are known, and not preselected.\r\n for (let k = 0; k < filter.values.length; k++) {\r\n const filterValue = filter.values[k];\r\n if (filterValue.children.find(x => x.value == value && !x.isPreselected)) {\r\n result.values.push(value);\r\n break;\r\n }\r\n }\r\n }\r\n if (result.values.length) {\r\n results.push(result);\r\n }\r\n }\r\n } else {\r\n let checked = filter.$element.find('input:checked');\r\n if (checked.length) {\r\n var result = {\r\n id: filter.originalId,\r\n values: []\r\n };\r\n for (let j = 0; j < checked.length; j++) {\r\n const value = checked.eq(j).data('sc-id');\r\n // Ensure that the selected values are known, and not preselected.\r\n if (filter.values.find(x => x.value == value && !x.isPreselected)) {\r\n result.values.push(value);\r\n }\r\n }\r\n if (result.values.length) {\r\n results.push(result);\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n return results;\r\n }\r\n\r\n private onMobileFiltersOpen(e: Event): void {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n this.$ctx\r\n .find(`.${classes.mobileFilterArea}`)\r\n .toggleClass(classes.mobileFilterOpen, true);\r\n }\r\n\r\n private onMobileFiltersClose(e: Event): void {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n this.$ctx\r\n .find(`.${classes.mobileFilterArea}`)\r\n .toggleClass(classes.mobileFilterOpen, false);\r\n }\r\n\r\n\r\n private onFavoriteButtonClick() {\r\n this.$ctx.find(\".m-favourite-button\").off(\"click\").on(\"click\", function (ev: any) {\r\n const $favorBtn = $(ev.currentTarget);\r\n let actionType = \"\";\r\n if ($favorBtn.hasClass(classes.stateBtnActive)) {\r\n actionType = \"RemoveEntry\";\r\n } else {\r\n actionType = \"AddEntry\";\r\n }\r\n var favouriteButton = new FavouriteButton();\r\n favouriteButton.getActionPartialViewForEventList(actionType, ev);\r\n });\r\n }\r\n\r\n private updateFavoriteStatus() {\r\n this.$ctx.find(\".m-favourite-button\").each((i: any, e: any) => {\r\n var favouriteButton = new FavouriteButton();\r\n favouriteButton.updateStatusForEventList(e);\r\n });\r\n }\r\n private initCountdown() {\r\n var me = this;\r\n setInterval(function () {\r\n me.calculator();\r\n }, 1000);\r\n }\r\n\r\n private calculator() {\r\n const $countdown = this.$ctx.find(`.${classes.countdown}`);\r\n $countdown.each((i, e) => {\r\n const totalseconds = parseInt($(e).data('second'));\r\n if (totalseconds > 86400) {\r\n $(e).text(Math.floor(totalseconds / 24 / 3600));\r\n $(e).addClass(classes.activeDays)\r\n } else {\r\n const nextseconds = totalseconds - 1;\r\n const h = Math.floor(nextseconds / 3600) < 10 ? '0' + Math.floor(nextseconds / 3600) : Math.floor(nextseconds / 3600);\r\n const m = Math.floor((nextseconds / 60 % 60)) < 10 ? '0' + Math.floor((nextseconds / 60 % 60)) : Math.floor((nextseconds / 60 % 60));\r\n const s = Math.floor((nextseconds % 60)) < 10 ? '0' + Math.floor((nextseconds % 60)) : Math.floor((nextseconds % 60));\r\n $(e).data('second', nextseconds);\r\n $(e).text(h + \":\" + m + \":\" + s);\r\n }\r\n });\r\n }\r\n\r\n private eventDescriptionEllipsis() {\r\n const $eventDescription = this.$ctx.find(`.${classes.eventDescription}`);\r\n $eventDescription.each((i, e) => {\r\n if ($(e).text().length > 267) {\r\n $(e).text($(e).text().substring(0, 267) + \"...\");\r\n }\r\n });\r\n }\r\n\r\n private UpdateFacetLevelOne(facet: any, filter: IArticleFinderFilter, initialcall: boolean, allowchangingprefiller: boolean): void {\r\n for (let j = 0; j < facet.values.length; j++) {\r\n const value = facet.values[j];\r\n if (initialcall && allowchangingprefiller && value.isPreselected) {\r\n value.disabled = false;\r\n }\r\n\r\n if (!initialcall && value.checked && value.isPreselected) {\r\n value.isPreselected = '';\r\n value.checked = '';\r\n }\r\n filter.values.push({\r\n checked: value.checked,\r\n children: (value.children ? value.children : []),\r\n count: value.count,\r\n disabled: value.disabled,\r\n humanReadableValue: value.humanReadableValue,\r\n isPreselected: value.isPreselected,\r\n label: value.label,\r\n value: value.value,\r\n hideDisableFilters: value.hideDisableFilters\r\n });\r\n }\r\n\r\n }\r\n\r\n private UpdateMultiLevelFacet(facet: any, filter: IArticleFinderFilter, initialcall: boolean, allowchangingprefiller: boolean): void {\r\n for (let j = 0; j < facet.values.length; j++) {\r\n const value = facet.values[j];\r\n if (initialcall && allowchangingprefiller && value.isPreselected) {\r\n value.disabled = false;\r\n }\r\n\r\n if (!initialcall && value.checked && value.isPreselected) {\r\n value.isPreselected = '';\r\n value.checked = '';\r\n }\r\n for (let k = 0; k < value.children.length; k++) {\r\n const childrenValue = value.children[k];\r\n if (initialcall && allowchangingprefiller && childrenValue.isPreselected) {\r\n value.disabled = false;\r\n childrenValue.disabled = false;\r\n }\r\n\r\n }\r\n filter.values.push({\r\n checked: value.checked,\r\n children: (value.children ? value.children : []),\r\n count: value.count,\r\n disabled: value.disabled,\r\n humanReadableValue: value.humanReadableValue,\r\n isPreselected: value.isPreselected,\r\n label: value.label,\r\n value: value.value,\r\n hideDisableFilters: value.hideDisableFilters\r\n });\r\n }\r\n }\r\n\r\n private AssignVideoComponentEvents() {\r\n let videoComponentList = this.$ctx.find(\"div[data-t-name='VideoComponent']\");\r\n if (videoComponentList !== undefined && videoComponentList.length > 0) {\r\n videoComponentList.each((i: any, e: any) => {\r\n if ($(e).length > 0) {\r\n startNode($(e)[0]);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private AssignTeaserVideoComponentEvents() {\r\n let videoTeaserList = this.$ctx.find(\"div[data-t-name='TeaserVideo']\");\r\n if (videoTeaserList !== undefined && videoTeaserList.length > 0) {\r\n videoTeaserList.each((i: any, e: any) => {\r\n if ($(e).length > 0) {\r\n startNode($(e)[0]);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n\ttabItem: 'js-o-home-scrollable-teaser__tab-item',\r\n\ttabItemActive: 'state-o-home-scrollable-teaser__tab-item-active',\r\n\ttabItemLink: 'js-o-home-scrollable-teaser__tab-link',\r\n\tcontentItem: 'o-home-scrollable-teaser__content-item',\r\n\tcontentItemVisible: 'state-o-home-scrollable-teaser__content-item-visible',\r\n\titemList: 'js-m-scrollable-teaser__list'\r\n};\r\n\r\n@createModule('HomeScrollableTeaser')\r\n/**\r\n * home-scrollable-teaser module implementation.\r\n */\r\n\r\nexport class HomeScrollableTeaser extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\t$tabItem: JQuery;\r\n\t$tabItemLink: JQuery;\r\n\t$contentItem: JQuery;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\tthis.$tabItem = $(`.${classes.tabItem}`, this.$ctx);\r\n\t\tthis.$tabItemLink = $(`.${classes.tabItemLink}`, this.$ctx);\r\n\t\tthis.$contentItem = $(`.${classes.contentItem}`, this.$ctx);\r\n\r\n\t\tthis.initTab();\r\n\t\tthis.$tabItemLink.on('click', this.onSwichTab.bind(this));\r\n\t\tthis.onDownLoadCalendar();\r\n\r\n\t\tresolve();\r\n\t}\r\n\r\n\tinitTab() {\r\n\t\tthis.$tabItem.first().addClass(classes.tabItemActive);\r\n\t\tthis.$contentItem.first().addClass(classes.contentItemVisible);\r\n\t}\r\n\r\n\tonSwichTab(ev: any) {\r\n\t\t$(ev.currentTarget).parent().addClass(classes.tabItemActive);\r\n\t\t$(ev.currentTarget).parent().siblings().removeClass(classes.tabItemActive);\r\n\t\tthis.$contentItem.removeClass(classes.contentItemVisible);\r\n\r\n\t\tlet tabItemIndex = $(ev.currentTarget).parent().index();\r\n\t\tthis.$contentItem.eq(tabItemIndex).addClass(classes.contentItemVisible);\r\n let currentContentItemWidth = this.$contentItem.eq(tabItemIndex).find(`.${classes.itemList}`).width();\r\n\r\n\t\tif (this.$contentItem.eq(tabItemIndex).width() >= currentContentItemWidth) {\r\n this.$contentItem.eq(tabItemIndex).addClass('m-scrollable-teaser--disabled-silder');\r\n }\r\n\t}\r\n\r\n\tprivate onDownLoadCalendar()\r\n {\r\n $(document).off(\"click\").on(\"click\",\".js-a-download\", function () {\r\n\t\t\tvar calendarResult = $(this).attr(\"data-calendarresult\");\r\n\t\t\tif (calendarResult != undefined) {\r\n\t\t\t\tif (calendarResult.length > 0) {\r\n\r\n\t\t\t\t\twindow.open( \"data:text/calendar;charset=utf8,\" +calendarResult);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.log(\"calendarResult: calendarResult is empty\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconsole.log(\"calendarResult: calendarResult is undefined\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n }\r\n\r\n\tstop() { }\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\nimport { formatLabel } from '@project/shared/utils/labels/js/labels';\r\nimport 'select2';\r\n\r\nconst classes = {\r\n\tfilterBtn: \"o-sds-search__apply-button\",\r\n\tclearBtn: \"o-sds-search__clear-button\",\r\n\tloadMoreBtn: \"o-sds-search__load-more-button\",\r\n\tloadMoreBar: \"js-load-more-bar\",\r\n\tmaterialNumber: \"js-o-sds-search_material-number\",\r\n\tproductName: \"js-o-sds-search_product-name\",\r\n\tcountry: \"js-o-sds-search_country\",\r\n\tlanguage: \"js-o-sds-search_language\",\r\n\r\n\ttbody: \"js-m-table__body\",\r\n\ttRow: \"js-o-sds-search__result-item\",\r\n\tresultContent: \"js-result-content\",\r\n\tnoResultContent: \"js-no-result-content\",\r\n\r\n\tstateLoadMoreHide: \"state-o-sds-search__load-more--hidden\",\r\n\tstateResultContentHide: \"state-o-sds-search__result-content--hidden\",\r\n\tstateErrorMsgHide: \"o-sds-search__error-hidden\",\r\n\tstateLoadingIndicatorHide: \"state-o-sds-search__loading--hidden\",\r\n\tstateResultItemHide: \"state-o-sds-search__result-item--hidden\",\r\n\r\n\ttopMessage: \"js-o-sds-search__top-message\",\r\n\tbottomMessage: \"js-o-sds-search__bottom-message\",\r\n\r\n\tmaterialNumberTHeader: \"js-materialnumber-header\",\r\n\tproductNameTHeader: \"js-productname-header\",\r\n\tdateTHeader: \"js-date-header\",\r\n\tlanguageTHeader: \"js-language-header\",\r\n\tlinkTHeader: \"js-link-header\",\r\n\r\n\terrorContainer: \"validation-summary-errors\",\r\n\tnameNumberError: \"js-error-number-name\",\r\n\teithernameNumberError: \"js-error-either-number-name\",\r\n\tlanguageError: \"js-error-language\",\r\n\tareError: \"js-error-area\",\r\n\r\n\tcontentLoading: \"js-content-loading\",\r\n\tloadMoreLoading: \"js-loadmore-loading\",\r\n\r\n\tloadModalOverlay: \"m-modal-overlay\",\r\n\tloadModalOverlayVisible: \"state-m-modal-overlay--visible\"\r\n}\r\n\r\n@createModule('SafetyDataSheetSearch')\r\nexport class SafetyDataSheetSearch extends TerrificSpec {\r\n\t$ctx: JQuery;\r\n\r\n\tpageSize: number;\r\n\ttopResultMsg: string;\r\n\tbottomResultMsg: string;\r\n\turl: string;\r\n\turlLanAndCountry: string;\r\n\r\n\tmaterialNumberTHeader: string;\r\n\tproductNameTHeader: string;\r\n\tdateTHeader: string;\r\n\tlanguageTHeader: string;\r\n\tlinkTHeader: string;\r\n\tlanguageInnerHtml: any;\r\n\tresultResponse: any;\r\n\tlangScript: any;\r\n\r\n\ttableBodyEle: JQuery;\r\n\ttableRowEle: JQuery;\r\n\tresultContentEle: JQuery;\r\n\tnoResultContentEle: JQuery;\r\n\ttopResultMsgEle: JQuery;\r\n\tbottomResultMsgEle: JQuery;\r\n\r\n\tmaterialNumberInputEle: JQuery;\r\n\tproductNameInputEle: JQuery;\r\n\tlanguageSelectEle: JQuery;\r\n\tcountrySelectEle: JQuery;\r\n\r\n\terrorContainerEle: JQuery;\r\n\r\n\tapplyBtnEle: JQuery;\r\n\tclearBtnEle: JQuery;\r\n\tloadMoreBtnEle: JQuery;\r\n\tloadModalOverlayEle: JQuery;\r\n\r\n\tcontentLoadingEle: JQuery;\r\n\tloadMoreLoadingEle: JQuery;\r\n\tSearchDigit: any;\r\n\tSearchName: any;\r\n\r\n\tstart(resolve: Function) {\r\n\t\tthis.$ctx = $(this._ctx);\r\n\t\t\r\n\t\tthis.pageSize = this.$ctx.data(\"page-size\");\r\n\t\tthis.topResultMsg = this.$ctx.data(\"top-message\");\r\n\t\tthis.bottomResultMsg = this.$ctx.data(\"bottom-message\");\r\n\t\tthis.url = \"/api/uwsi/getsdslist\";\r\n\t\tthis.urlLanAndCountry = \"/api/uwsi/getsdslangandcountrylist\";\r\n\r\n\t\tthis.materialNumberTHeader = this.$ctx.find(`.${classes.materialNumberTHeader}`).text();\r\n\t\tthis.productNameTHeader = this.$ctx.find(`.${classes.productNameTHeader}`).text();\r\n\t\tthis.dateTHeader = this.$ctx.find(`.${classes.dateTHeader}`).text();\r\n\t\tthis.languageTHeader = this.$ctx.find(`.${classes.languageTHeader}`).text();\r\n\t\tthis.linkTHeader = this.$ctx.find(`.${classes.linkTHeader}`).text();\r\n\r\n\t\tthis.tableBodyEle = this.$ctx.find(`.${classes.tbody}`);\r\n\t\tthis.tableRowEle = this.$ctx.find(`.${classes.tRow}`);\r\n\t\tthis.resultContentEle = this.$ctx.find(`.${classes.resultContent}`);\r\n\t\tthis.noResultContentEle = this.$ctx.find(`.${classes.noResultContent}`);\r\n\r\n\t\tthis.topResultMsgEle = this.$ctx.find(`.${classes.topMessage}`);\r\n\t\tthis.bottomResultMsgEle = this.$ctx.find(`.${classes.bottomMessage}`);\r\n\r\n\t\tthis.materialNumberInputEle = this.$ctx.find(`.${classes.materialNumber}`);\r\n\t\tthis.productNameInputEle = this.$ctx.find(`.${classes.productName}`);\r\n\r\n\t\tthis.languageSelectEle = this.$ctx.find(`.${classes.language}`);\r\n\t\tthis.countrySelectEle = this.$ctx.find(`.${classes.country}`);\r\n\r\n\t\tthis.errorContainerEle = this.$ctx.find(`.${classes.errorContainer}`);\r\n\r\n\t\tthis.applyBtnEle = this.$ctx.find(`.${classes.filterBtn}`);\r\n\t\tthis.clearBtnEle = this.$ctx.find(`.${classes.clearBtn}`);\r\n\t\tthis.loadMoreBtnEle = this.$ctx.find(`.${classes.loadMoreBtn}`);\r\n\r\n\t\tthis.contentLoadingEle = this.$ctx.find(`.${classes.contentLoading}`);\r\n\t\tthis.loadMoreLoadingEle = this.$ctx.find(`.${classes.loadMoreLoading}`);\r\n\t\tthis.loadModalOverlayEle = $(`.${classes.loadModalOverlay}`);\r\n\r\n\t\tconst handleKeyDown = (event: JQuery.Event) => {\r\n\t\t\tconst inputValue = $(event.target).val().toString();\r\n\t\t\tif (event.key === \"Enter\" && inputValue.length > 0) {\r\n\t\t\t\tthis.applyFilter();\r\n\t\t\t\tthis.getProductorMaterialData();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t$(this.productNameInputEle).on(\"keydown\", handleKeyDown);\r\n\t\t$(this.materialNumberInputEle).on(\"keydown\", handleKeyDown);\t\t\r\n\r\n\t\tlet preventBlurone = false;\r\n\t\tthis.applyBtnEle.on('mousedown', function () {\r\n\t\t\tpreventBlurone = true;\r\n\t\t});\r\n\r\n\t\tthis.applyBtnEle.on(\"click\", () => {\r\n\t\t\tthis.applyFilter();\r\n\t\t});\r\n\t\tthis.clearBtnEle.on(\"click\", this.clear.bind(this));\r\n\t\tthis.loadMoreBtnEle.on(\"click\", this.loadMore.bind(this));\r\n\r\n\t\tthis.countrySelectEle.on(\"change\", this.getLanguagebyCountry.bind(this));\r\n\t\tthis.productNameInputEle.on('blur', () => {\r\n\t\t\tif (preventBlurone) {\r\n\t\t\t\tpreventBlurone = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.checkInputHasValue();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.materialNumberInputEle.on('blur', () => {\r\n\t\t\tif (preventBlurone) {\r\n\t\t\t\tpreventBlurone = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.checkInputHasValue();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$(window).on(\"load\", () => {\r\n\t\t\t$('.js-o-sds-search_language').prop(\"disabled\", true);\r\n\t\t\t$('.js-o-sds-search_country').prop(\"disabled\", true);\r\n\t\t});\r\n\r\n\t\tvar sPageURL = window.location.search.substring(1),\r\n\t\t\tsURLVariables = sPageURL.split('&'),\r\n\t\t\tsParameterName: string[],\r\n\t\t\ti: number;\r\n\t\tfor (i = 0; i < sURLVariables.length; i++) {\r\n\t\t\tsParameterName = sURLVariables[i].split('=');\r\n\t\t\tif (sParameterName[0] === 'SearchDigit') {\r\n\t\t\t\tsParameterName[1] === undefined ? true : $(\".js-o-sds-search_material-number\").val(decodeURIComponent(sParameterName[1]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sPageURL = window.location.search.substring(1),\r\n\t\t\tsURLVariables = sPageURL.split('&'),\r\n\t\t\tsParameterName1: string[],\r\n\t\t\ti: number;\r\n\t\tfor (i = 0; i < sURLVariables.length; i++) {\r\n\t\t\tsParameterName1 = sURLVariables[i].split('=');\r\n\t\t\tif (sParameterName1[0] === 'SearchName') {\r\n\t\t\t\tsParameterName1[1] === undefined ? true : $(\".js-o-sds-search_product-name\").val(decodeURIComponent(sParameterName1[1]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$(classes.filterBtn).trigger(\"click\");\r\n\t\tthis.langScript = document.createElement(\"script\");\r\n\t\tthis.langScript.type = \"application/json\";\r\n\r\n\t\tresolve();\r\n\r\n\t}\r\n\r\n\tgetlanguageJsonData() {\r\n\t\tthis.languageInnerHtml = this.$ctx.find(\"script[type='application/json']\");\r\n\t\tconst json = this.languageInnerHtml[0].innerHTML;\r\n\t\tconst jsonData = JSON.parse(json);\r\n\t\treturn jsonData;\r\n\t}\r\n\r\n\tgetUrlParameter(sParam: any) {\r\n\t\tvar sPageURL = window.location.search.substring(1),\r\n\t\t\tsURLVariables = sPageURL.split('&'),\r\n\t\t\tsParameterName: string[],\r\n\t\t\ti: number;\r\n\r\n\t\tfor (i = 0; i < sURLVariables.length; i++) {\r\n\t\t\tsParameterName = sURLVariables[i].split('=');\r\n\r\n\t\t\tif (sParameterName[0] === sParam) {\r\n\t\t\t\treturn sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tapplyFilter() {\r\n\t\tthis.clearResults();\r\n\t\tif (this.validate()) {\r\n\t\t\tthis.showContentLoading();\r\n\t\t\tthis.getData();\r\n\t\t}\r\n\t}\r\n\r\n\tcheckInputHasValue() {\r\n\t\tthis.cleardropdown();\r\n\t\tif (this.validate()) {\r\n\t\t\tthis.getProductorMaterialData();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\tgetProductorMaterialData() {\r\n\t\tlet productNumber = $.trim(this.materialNumberInputEle.val().toString());\r\n\t\tlet productName = $.trim(this.productNameInputEle.val().toString());\r\n\t\tthis.showContentLoading();\r\n\t\tthis.lockButtons();\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'POST',\r\n\t\t\turl: this.urlLanAndCountry,\r\n\t\t\tdataType: 'json',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tproductNumber: productNumber,\r\n\t\t\t\tproductName: productName,\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response) {\r\n\t\t\t\t\t$('.js-o-sds-search_language').prop(\"disabled\", true);\r\n\t\t\t\t\t$('.js-o-sds-search_country').prop(\"disabled\", false);\r\n\t\t\t\t\tlet jsonresponse = JSON.stringify(response.sdsSheet);\r\n\t\t\t\t\tconst container = this.$ctx.find(\"body\");\r\n\t\t\t\t\tconst data = container.find(\"script[type='application/json']\");\r\n\t\t\t\t\tif (data != null && jsonresponse != null && this.langScript.type.length > 0) {\r\n\t\t\t\t\t\tthis.langScript.innerHTML = jsonresponse;\r\n\t\t\t\t\t\tthis.$ctx.append(this.langScript);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet resultsCountry = response.sdsCountry;\r\n\t\t\t\t\tlet elcountry = $('.js-o-sds-search_country') as any;\r\n\t\t\t\t\tvar countryList = $(\"option\", elcountry);\r\n\t\t\t\t\tif (resultsCountry.length > 0) {\r\n\t\t\t\t\t\t$.each(countryList, function (countryidx, countryitem: any) {\r\n\t\t\t\t\t\t\tif (countryidx !== 0 && $.trim(countryitem.value) !== \"\") {\r\n\t\t\t\t\t\t\t\tvar itemIndex = resultsCountry.indexOf($.trim(countryitem.value));\r\n\t\t\t\t\t\t\t\tif (itemIndex === -1) {\r\n\t\t\t\t\t\t\t\t\tcountryitem.disabled = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tcountryitem.disabled = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.unlockButtons();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$.each(countryList, function (countryidx, countryitem: any) {\r\n\t\t\t\t\t\t\tif (countryidx !== 0 && $.trim(countryitem.value) !== \"\") {\r\n\t\t\t\t\t\t\t\tcountryitem.disabled = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.lockButtons();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar countrySearch = elcountry.attr('data-search') ? 0 : -1;\r\n\t\t\t\t\telcountry.select2({\r\n\t\t\t\t\t\tminimumResultsForSearch: countrySearch,\r\n\t\t\t\t\t\twidth: '100%'\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tthis.hideContentLoading();\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`get sds data errror, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\tthis.hideContentLoading();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tgetLanguagebyCountry() {\r\n\t\tthis.resultResponse = this.getlanguageJsonData();\r\n\t\tif (this.resultResponse != null) {\r\n\t\t\t$('.js-o-sds-search_language').prop(\"disabled\", false);\r\n\t\t\tlet selectedCountry = $('.js-o-sds-search_country').val();\r\n\t\t\tlet sdsLanguageBasedOnCountry: Array = [];\r\n\t\t\t$.each(this.resultResponse, function (langidx: any, sdsElement: any) {\r\n\t\t\t\tif (sdsElement.country == selectedCountry) {\r\n\t\t\t\t\tsdsLanguageBasedOnCountry.push(sdsElement.language);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tlet ellanguage = $('.js-o-sds-search_language') as any;\r\n\t\t\tvar languageList = $(\"option\", ellanguage);\r\n\t\t\tif (sdsLanguageBasedOnCountry.length > 0) {\r\n\t\t\t\t$.each(languageList, function (langidx: any, langItem: any) {\r\n\t\t\t\t\tif (langidx !== 0 && $.trim(langItem.value) !== \"\") {\r\n\t\t\t\t\t\tvar itemIndex = sdsLanguageBasedOnCountry.indexOf($.trim(langItem.value));\r\n\t\t\t\t\t\tif (itemIndex === -1) {\r\n\t\t\t\t\t\t\tlangItem.disabled = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tlangItem.disabled = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$.each(languageList, function (langidx, langItem: any) {\r\n\t\t\t\t\tif (langidx !== 0 && $.trim(langItem.value) !== \"\") {\r\n\t\t\t\t\t\tlangItem.disabled = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tvar langSearch = ellanguage.attr('data-search') ? 0 : -1;\r\n\t\t\tellanguage.select2({\r\n\t\t\t\tminimumResultsForSearch: langSearch,\r\n\t\t\t\twidth: '100%'\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\tcleardropdown() {\r\n\t\t// reset language dropdown\r\n\t\tthis.languageSelectEle.find(\"option[value='']\").prop(\"selected\", true);\r\n\t\tlet lngDefaultText = this.languageSelectEle.find(\"option[value='']\").text();\r\n\t\tlet lngRenderEle = this.languageSelectEle.next(\".select2\").find(\".select2-selection__rendered\");\r\n\t\tlngRenderEle.text(lngDefaultText);\r\n\t\tlngRenderEle.attr(\"title\", lngDefaultText);\r\n\r\n\t\t// reset area dropdown\r\n\t\tthis.countrySelectEle.find(\"option[value='']\").prop(\"selected\", true);\r\n\t\tlet coDefaultText = this.countrySelectEle.find(\"option[value='']\").text();\r\n\t\tlet coRenderEle = this.countrySelectEle.next(\".select2\").find(\".select2-selection__rendered\");\r\n\t\tcoRenderEle.text(coDefaultText);\r\n\t\tcoRenderEle.attr(\"title\", coDefaultText);\r\n\t}\r\n\tclear() {\r\n\t\tthis.clearFilters();\r\n\t\tthis.clearResults();\r\n\t\tvar newurl = window.location.protocol + \"//\" + window.location.host + window.location.pathname;\r\n\t\twindow.history.pushState({ path: newurl }, '', newurl);\r\n\t}\r\n\r\n\tloadMore() {\r\n\t\tthis.setStaticPaging();\r\n\t\tthis.updateResultMessage();\r\n\t}\r\n\r\n\tclearResults() {\r\n\t\tthis.tableBodyEle.empty();\r\n\t\tthis.topResultMsgEle.empty();\r\n\t\tthis.bottomResultMsgEle.empty();\r\n\r\n\t\tthis.resultContentEle.addClass(classes.stateResultContentHide);\r\n\t\tthis.noResultContentEle.addClass(classes.stateResultContentHide);\r\n\t}\r\n\r\n\tclearFilters() {\r\n\t\tthis.productNameInputEle.val(\"\");\r\n\t\tthis.materialNumberInputEle.val(\"\");\r\n\r\n\t\t// reset language dropdown\r\n\t\tthis.languageSelectEle.find(\"option[value='']\").prop(\"selected\", true);\r\n\t\tlet lngDefaultText = this.languageSelectEle.find(\"option[value='']\").text();\r\n\t\tlet lngRenderEle = this.languageSelectEle.next(\".select2\").find(\".select2-selection__rendered\");\r\n\t\tlngRenderEle.text(lngDefaultText);\r\n\t\tlngRenderEle.attr(\"title\", lngDefaultText);\r\n\r\n\t\t// reset area dropdown\r\n\t\tthis.countrySelectEle.find(\"option[value='']\").prop(\"selected\", true);\r\n\t\tlet coDefaultText = this.countrySelectEle.find(\"option[value='']\").text();\r\n\t\tlet coRenderEle = this.countrySelectEle.next(\".select2\").find(\".select2-selection__rendered\");\r\n\t\tcoRenderEle.text(coDefaultText);\r\n\t\tcoRenderEle.attr(\"title\", coDefaultText);\r\n\t}\r\n\r\n\tgetData() {\r\n\t\tlet productNumber = $.trim(this.materialNumberInputEle.val().toString());\r\n\t\tlet productName = $.trim(this.productNameInputEle.val().toString());\r\n\t\tlet language = this.languageSelectEle.find(\"option:selected\").val();\r\n\t\tlet country = this.countrySelectEle.find(\"option:selected\").val();\r\n\t\tthis.lockButtons();\r\n\t\tthis.showContentLoading();\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'POST',\r\n\t\t\turl: this.url,\r\n\t\t\tdataType: 'json',\r\n\t\t\tdata:\r\n\t\t\t{\r\n\t\t\t\tproductNumber: productNumber,\r\n\t\t\t\tproductName: productName,\r\n\t\t\t\tlanguage: language,\r\n\t\t\t\tcountry: country,\r\n\t\t\t},\r\n\t\t\tsuccess: (response: any) => {\r\n\t\t\t\tif (response) {\r\n\t\t\t\t\tif (response.total > 0) {\r\n\t\t\t\t\t\tthis.updateResultContentState(true);\r\n\t\t\t\t\t\tlet results = response.results;\r\n\t\t\t\t\t\tif (results) {\r\n\t\t\t\t\t\t\tthis.renderResultDataOnPage(results);\r\n\t\t\t\t\t\t\tthis.setStaticPaging();\r\n\t\t\t\t\t\t\tthis.updateResultMessage();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.updateResultContentState(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.updateResultContentState(false);\r\n\t\t\t\t}\r\n\t\t\t\tthis.unlockButtons();\r\n\t\t\t\tthis.hideContentLoading();\r\n\t\t\t},\r\n\t\t\terror: (xhr: any, status: string, error: string) => {\r\n\t\t\t\tconsole.log(`get sds data errror, ${xhr.status}, ${xhr.statusText}, ${error}`);\r\n\t\t\t\tthis.unlockButtons();\r\n\t\t\t\tthis.hideContentLoading();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\trenderResultDataOnPage(results: any) {\r\n\t\tresults.forEach((r: any) => {\r\n\r\n\t\t\tlet materialNumber = r.productNumber;\r\n\t\t\tlet productName = r.productName;\r\n\t\t\tlet date = r.date;\r\n\t\t\tlet lng = r.languageAndCountry;\r\n\t\t\tlet link = r.link;\r\n\r\n\t\t\tlet htmlContent = this.generateHtmlData(materialNumber, productName, date, lng, link);\r\n\t\t\tthis.tableBodyEle.append(htmlContent);\r\n\r\n\t\t});\r\n\r\n\t}\r\n\r\n\tgenerateHtmlData(materialNumber: string, productName: string, date: string, LngAndArea: string, link: string) {\r\n\t\tvar htmlContent =\r\n\t\t\t`\r\n ${materialNumber}\r\n ${productName}\r\n ${date}\r\n ${LngAndArea}\r\n
      \r\n `\r\n\t\treturn htmlContent;\r\n\t}\r\n\r\n\tupdateResultMessage() {\r\n\t\tlet currentCount = this.$ctx.find(`.${classes.tRow}:not(.${classes.stateResultItemHide})`).length;\r\n\t\tlet total = this.$ctx.find(`.${classes.tRow}`).length;\r\n\r\n\t\tlet topMessage = formatLabel(this.topResultMsg, total);\r\n\t\tlet bottomMessage = formatLabel(this.bottomResultMsg, currentCount, total);\r\n\r\n\t\tthis.topResultMsgEle.html(topMessage);\r\n\t\tthis.bottomResultMsgEle.html(bottomMessage);\r\n\r\n\t\tif (currentCount >= total) {\r\n\t\t\tthis.$ctx.find(`.${classes.loadMoreBar}`).addClass(classes.stateLoadMoreHide);\r\n\t\t} else {\r\n\t\t\tthis.$ctx.find(`.${classes.loadMoreBar}`).removeClass(classes.stateLoadMoreHide);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tsetStaticPaging() {\r\n\t\tthis.$ctx.find(`.${classes.stateResultItemHide}:lt(${this.pageSize})`).removeClass(classes.stateResultItemHide);\r\n\t}\r\n\r\n\tvalidate(): boolean {\r\n\t\tvar result = true;\r\n\t\tlet number = $.trim(this.materialNumberInputEle.val().toString());\r\n\t\tlet name = $.trim(this.productNameInputEle.val().toString());\r\n\t\tlet lng = this.languageSelectEle.find(\"option:selected\").val();\r\n\t\tlet country = this.countrySelectEle.find(\"option:selected\").val();\r\n\r\n\t\tvar newurl = window.location.protocol + \"//\" + window.location.host + window.location.pathname + '?SearchDigit=' + number + '&SearchName=' + name + '&SelectedLanguage=' + lng + '&SelectedCountry=' + country;\r\n\t\twindow.history.pushState({ path: newurl }, '', newurl);\r\n\r\n\t\tif (number === \"\" && name === \"\") {\r\n\t\t\tthis.errorContainerEle.find(`.${classes.nameNumberError}`).removeClass(classes.stateErrorMsgHide);\r\n\t\t\tthis.materialNumberInputEle.css('border', '1px solid red');\r\n\t\t\tthis.productNameInputEle.css('border', '1px solid red');\r\n\t\t\tresult = false;\r\n\t\t} else {\r\n\t\t\tif (number !== \"\" && name !== \"\") {\r\n\t\t\t\tthis.errorContainerEle.find(`.${classes.eithernameNumberError}`).removeClass(classes.stateErrorMsgHide);\r\n\t\t\t\tthis.materialNumberInputEle.css('border', '1px solid red');\r\n\t\t\t\tthis.productNameInputEle.css('border', '1px solid red');\r\n\t\t\t\tresult = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.materialNumberInputEle.css('border', '');\r\n\t\t\t\tthis.productNameInputEle.css('border', '');\r\n\t\t\t\tthis.errorContainerEle.find(`.${classes.nameNumberError}`).addClass(classes.stateErrorMsgHide);\r\n\t\t\t\tthis.errorContainerEle.find(`.${classes.eithernameNumberError}`).addClass(classes.stateErrorMsgHide);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// update error messages contianer\r\n\t\tlet totalErrors = this.errorContainerEle.find(\"li\").length;\r\n\t\tlet activeErrors = this.errorContainerEle.find(`li.${classes.stateErrorMsgHide}`).length;\r\n\t\tif (totalErrors == activeErrors) {\r\n\t\t\tthis.errorContainerEle.addClass(classes.stateErrorMsgHide);\r\n\t\t} else {\r\n\r\n\t\t\tthis.errorContainerEle.removeClass(classes.stateErrorMsgHide);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\r\n\tupdateResultContentState(anyResult: boolean) {\r\n\t\tif (anyResult) {\r\n\t\t\tthis.noResultContentEle.addClass(classes.stateResultContentHide);\r\n\t\t\tthis.resultContentEle.removeClass(classes.stateResultContentHide);\r\n\t\t} else {\r\n\t\t\tthis.noResultContentEle.removeClass(classes.stateResultContentHide);\r\n\t\t\tthis.resultContentEle.addClass(classes.stateResultContentHide);\r\n\t\t}\r\n\t}\r\n\r\n\t// lock \"apply filter\", \"clear\", \"load more\" button before ajax returns\r\n\tlockButtons() {\r\n\t\tthis.applyBtnEle.attr(\"disabled\", \"disabled\");\r\n\t\tthis.clearBtnEle.attr(\"disabled\", \"disabled\");\r\n\t\tthis.loadMoreBtnEle.attr(\"disabled\", \"disabled\");\r\n\t}\r\n\r\n\tunlockButtons() {\r\n\t\tthis.applyBtnEle.removeAttr(\"disabled\");\r\n\t\tthis.clearBtnEle.removeAttr(\"disabled\");\r\n\t\tthis.loadMoreBtnEle.removeAttr(\"disabled\");\r\n\t}\r\n\r\n\tshowContentLoading() {\r\n\t\tthis.contentLoadingEle.removeClass(classes.stateLoadingIndicatorHide);\r\n\t\tdocument.getElementsByClassName(\"m-modal-overlay\")[0].classList.add(\"state-m-modal-overlay--visible\")\r\n\t}\r\n\r\n\thideContentLoading() {\r\n\t\tthis.contentLoadingEle.addClass(classes.stateLoadingIndicatorHide);\r\n\t\tdocument.getElementsByClassName(\"m-modal-overlay\")[0].classList.remove(\"state-m-modal-overlay--visible\");\r\n\t}\r\n\r\n\tshowLoadMoreLoading() {\r\n\t\tthis.loadMoreLoadingEle.removeClass(classes.stateLoadingIndicatorHide);\r\n\t}\r\n\r\n\thideLoadMoreLoading() {\r\n\t\tthis.loadMoreLoadingEle.addClass(classes.stateLoadingIndicatorHide);\r\n\t}\r\n\r\n\tstop() { }\r\n\r\n}\r\n","import { createModule } from 'terrific-singleton';\r\nimport { TerrificSpec } from 'terrific-singleton/terrific-module';\r\n\r\nconst classes = {\r\n tabItem: 'js-o-teaser-tabs__item',\r\n tabContent: 'js-o-teaser-tabs__content',\r\n};\r\n\r\n@createModule('TeaserTabs')\r\nexport class TeaserTabs extends TerrificSpec {\r\n $ctx: JQuery;\r\n $tabItem: JQuery;\r\n $tabContent: JQuery;\r\n\r\n start(resolve: Function) {\r\n const _this = this;\r\n this.$ctx = $(this._ctx);\r\n this.$tabItem = $(`.${classes.tabItem}`, this.$ctx);\r\n this.$tabContent = $(`.${classes.tabContent}`, this.$ctx);\r\n this.$tabItem.on(\"click\", function (ev: any) {\r\n\t\t\t_this.updatestatus($(ev.currentTarget));\r\n _this.updateUri(ev);\r\n\t\t});\r\n this.initTab();\r\n resolve();\r\n }\r\n\r\n stop() {\r\n }\r\n\r\n initTab() {\r\n const _this = this;\r\n\r\n this.$tabItem.first().addClass('active');\r\n this.$tabContent.first().addClass('active');\r\n\r\n if (window.location.search.length > 1) {\r\n let parts = location.search.substr(1).split('&');\r\n for (let i = 0; i < parts.length; i++) {\r\n const keyValue = parts[i].split('=', 2);\r\n if (keyValue.length != 2) continue;\r\n const key = keyValue[0];\r\n const value = keyValue[1];\r\n if (key === \"tab\") {\r\n if(this.$ctx.find(`.${classes.tabItem}`).length>parseInt(value))\r\n {\r\n _this.updatestatus($(this.$ctx.find(`.${classes.tabItem}`)[parseInt(value)]));\r\n }\r\n else\r\n {\r\n _this.updatestatus($(this.$ctx.find(`.${classes.tabItem}`).last()));\r\n }\r\n } \r\n }\r\n }\r\n }\r\n\r\n \r\n private updatestatus(ev: any):void\r\n {\r\n const $target: any = ev;\r\n const $url:any=document.location;\r\n $target.siblings().each( function () {\r\n if($(this).hasClass('active'))\r\n {\r\n $(this).attr(\"data-tab-link\",$url);\r\n }\r\n });\r\n $target.siblings().removeClass('active');\r\n $target.addClass('active');\r\n this.$tabContent.removeClass('active');\r\n\t\tthis.$tabContent.eq($target.index()).addClass('active');\r\n }\r\n\r\n private updateUri(ev: any): void {\r\n const $target: any = $(ev.currentTarget);\r\n \r\n var parts: string[] = [];\r\n const _this = this;\r\n parts.push(`tab=${$target.index()}`);\r\n let url = document.location.origin + document.location.pathname;\r\n if(document.location.href.indexOf(\"?\") !== -1) {\r\n url = url + document.location.search;\r\n const keyValue = parts[0].split('=', 2);\r\n if (parts.length > 0 && keyValue[0] === \"tab\") \r\n {\r\n for (let i = 0; i < parts.length; i++) {\r\n const keyValue = parts[i].split('=', 2);\r\n if (keyValue.length != 2) continue;\r\n const key = keyValue[0];\r\n const value = keyValue[1];\r\n if (key === \"tab\") {\r\n var splitUrl = url.split(\"?\");\r\n splitUrl.pop();\r\n url = splitUrl + \"?\" + parts[0].toString();\r\n } \r\n }\r\n }\r\n /* else\r\n {\r\n url += parts.join(\"&\");\r\n }\r\n */\r\n\r\n }\r\n /* else{\r\n if (parts.length > 0) url += \"?\" + parts.join(\"&\");\r\n }\r\n */\r\n history.replaceState(null, document.title, url);\r\n \r\n }\r\n}"],"sourceRoot":""}