samsung-logo-blue

Kup smartfon Galaxy A51, 

a słuchawki Galaxy Buds+ otrzymasz w prezencie.

Kup Galaxy A51, a słuchawki Galaxy Buds+ otrzymasz w prezencie

*Promocja trwa od 22.02 do 07.03.2021 r. Pula nagród ograniczona. Szczegóły w regulaminie.

Jak skorzystać z promocji?

Krok 1

Kup swój smartfon 

Galaxy A51 w dniach 

od 22.02 do 07.03.2021 r.*

Krok 2

Aktywuj swój telefon 

i uruchom na nim aplikację Samsung Members do 10.03.2021 r. W aplikacji Samsung Members kliknij 

w banner promocyjny.

Krok 3

Wypełnij poprawnie formularz zgłoszeniowy 

do 12.03.2021 r. Załącz dowód zakupu.

Krok 4

Po pozytywnej weryfikacji zgłoszenia, w ciągu 10 dni roboczych wyślemy do Ciebie nagrodę - słuchawki Galaxy Buds+ w kolorze czarnym. 

*Promocja trwa od 22.02 do 07.03.2021 r. Pula nagród ograniczona. Szczegóły w regulaminie.

Smartfon objęty promocją

Poznaj Galaxy Buds+

samsung

Doskonały dźwięk

Słuchaj wspaniałego dźwięku, dostrojonego przez inżynierów z AKG.

samsung

Dwudrożny dynamiczny głośnik

Mocne basy oraz czyste i szczegółowe dźwięki wysokie.

samsung

Z Tobą przez cały dzień

Słuchaj ulubionej muzyki bez przerwy przez 11 godzin*.

samsung

Superszybkie ładowanie

Już po 3 minutach ładowania możesz cieszyć się godziną słuchania*.


samsung

Bezprzewodowe ładowanie

Uzupełnisz w nich energię za pomocą ładowarki bezprzewodowej lub smartfona

Galaxy Buds+' title=

*Rzeczywista żywotność baterii i czas ładowania mogą się różnić w zależności od warunków użytkowania.

[script](function() { /** * Widget script environment runtime */ /** * This module is reponsible for populating window object with proper values. */// setup widget repository object as empty object initiallywindow.__forge2_widgets = {};window.__forge2_themes = {};// create runtime context object with useful methods in runtimewindow.__forge2_context = { /** * Returns theme with particular ID from registered themes */ getTheme: function (themeId) { // check if theme exists on runtime if (!window.__forge2_themes[themeId]) { throw new Error('Theme with name ' + themeId + ' does not exist in runtime.'); } // get widget runtime class and create its instance var themeClass = window.__forge2_themes[themeId]; return new themeClass(); },};// setup register function for runtimewindow.__forge2_widget_register = function (widgetType, widgetClass) { if (window.__forge2_widgets[widgetType]) { throw new Error('Error: trying to register widget ' + widgetType + ' more than once!'); } window.__forge2_widgets[widgetType] = widgetClass;};// setup theme register function for runtimewindow.__forge2_theme_register = function (widgetType, themeId, themeClass) { if (window.__forge2_themes[themeId]) { throw new Error('Error: trying to register theme ' + themeId + ' more than once!'); } window.__forge2_themes[themeId] = themeClass; }; /** * Widget scripts */ /** * Runtime implementation for e-slider widget */// runtime widget behaviour classvar ESliderWidget = /** @class */ (function () { function ESliderWidget() { } /** * Initializes widget behaviour */ ESliderWidget.prototype.init = function (htmlElement, context) { var widgetData = JSON.parse(htmlElement.getAttribute('data-widget-data')); var customTheme = widgetData.theme; // if there is custom theme if (customTheme) { // search theme in context this.fTheme = context.getTheme(customTheme); // and use it this.fTheme.init(htmlElement, context); } }; /** * Called when widget is no longer needed */ ESliderWidget.prototype.destroy = function () { // cleanup theme if necessary if (this.fTheme) { this.fTheme.destroy(); } }; return ESliderWidget;}());window.__forge2_widget_register('e-slider', ESliderWidget); /** * End of widget scripts */ /** * Widget themes */ /** * Runtime implementation for w-slider widget */// runtime widget behaviour classvar mSliderThemeBase1 = /** @class */ (function () { function mSliderThemeBase1() { // holds navigation arrows for slider this.fNextSlideButtonEl = null; this.fPreviousSlideButtonEl = null; // holds initial number of slides this.fNumberOfSlides = null; // holds data of the widget this.fData = null; // holds interval that automatically switches slides // this should be cleared if user has manually switched slide this.fAutoSlideTimeout = null; // holds wrapper for jump-to-slide buttons this.fJumpToSlideWrapperEl = null; // holds array of slide ids this.fSlidesIds = null; // holds a flag whether autoslide should be programatically disabled in some cases // for example, that user is hovering over the slide this.fAutoSlideDisabled = false; } /** * Initializes w-slider widget behaviour */ mSliderThemeBase1.prototype.init = function (htmlElement) { // save current htmlElement root to variable this.fHtmlElement = htmlElement; // save widget data to local variable this.fData = JSON.parse(htmlElement.getAttribute('data-widget-data')); this.fSlidesIds = JSON.parse(htmlElement.getAttribute('data-widget-children')); // initialize the component this.initSlider(); }; /** * Enables a little bit of accessibility in exporeted widget */ mSliderThemeBase1.prototype.makeAccessible = function () { // carousel elements should be displayed as lists, but there's too much risk // to wrap them in actual li element due to type of content that might be injeceted // make wrapper appear like a list for screen readers this.fHtmlElement.querySelector('.m-slider-theme-base-1_wrapper > div:first-child').setAttribute('role', 'list'); var slideCollection = Array.from(this.fHtmlElement.querySelectorAll('.m-slider-theme-base-1_wrapper > div > div')); slideCollection.forEach(function (slideEl) { // make focusable AND dont change keyboard navigation order slideEl.setAttribute('tabindex', '0'); // make entries appear like a list-item for screen readers slideEl.setAttribute('role', 'listitem'); }); // hide all duplicated elements created by siema (used to make loop work) slideCollection.slice(this.fNumberOfSlides).forEach(function (element) { element.setAttribute('aria-hidden', 'true'); }); }; Object.defineProperty(mSliderThemeBase1.prototype, "widgetId", { /** * Returns current widget id, taken from className */ get: function () { var result = this.fHtmlElement.className.match(/c-(\w+)/); if (result === null) { return undefined; } else { return result[1]; } }, enumerable: true, configurable: true }); /** * Sets up the swiping library and controls */ mSliderThemeBase1.prototype.initSlider = function () { var _this = this; // save the number of slides before initializing siema this.fNumberOfSlides = Array.from(this.fHtmlElement.querySelectorAll('.m-slider-theme-base-1_entry')).length; // just a safety measure - if ID gets undefined for whatever reason, Siema will throw try { // setup new slider, scoped to current widget this.fSiemaInstance = new window.Siema({ selector: ".c-' + this.widgetId + ' .m-slider-theme-base-1_wrapper", duration: this.fData.transitionTime, easing: 'ease-out', perPage: 1, startIndex: 0, draggable: true, loop: true, onInit: function () { _this.makeAccessible(); }, onChange: function () { var currentSlideNr = Math.round(_this.fSiemaInstance.currentSlide); if (_this.fSiemaInstance.config.loop) { if (currentSlideNr < 0) { currentSlideNr = _this.fSiemaInstance.innerElements.length + currentSlideNr; } } _this.updateNavigation(currentSlideNr); }, }); // init additional features this.initArrows(); this.runAutoSlide(true); this.initNavigation(); this.initListeners(); } catch (e) { console.info('Could not initialize slider'); } }; /** * Installs all event listeners on current widget */ mSliderThemeBase1.prototype.initListeners = function () { this.fHtmlElement.addEventListener('mouseenter', this.handleMouseEnter.bind(this)); this.fHtmlElement.addEventListener('mouseleave', this.handleMouseLeave.bind(this)); }; /** * Handles action on mouse leave (enables auto slide) */ mSliderThemeBase1.prototype.handleMouseLeave = function () { this.fAutoSlideDisabled = false; this.runAutoSlide(true); }; /** * Handles action on mouse enter (disables auto slide) */ mSliderThemeBase1.prototype.handleMouseEnter = function () { this.fAutoSlideDisabled = true; clearTimeout(this.fAutoSlideTimeout); }; /** * Updates jump to slide navigation, activating requested slide and disactivating other */ mSliderThemeBase1.prototype.updateNavigation = function (index) { // if slider shouldn't have navigation, quit if (!this.fData.showNavigation || !this.fJumpToSlideWrapperEl) { return; } // helper variable that holds collection of wrapper children var jumpToSlideButtonElCollection = Array.from(this.fJumpToSlideWrapperEl.children); // remove all `is-active` classes from navigation jumpToSlideButtonElCollection.forEach(function (slide) { return slide.classList.remove('is-active'); }); // set `is-active` class only for requested slide var targetEl = jumpToSlideButtonElCollection[index]; if (targetEl) { targetEl.classList.add('is-active'); } }; /** * Initializes jump-to-slide navigation */ mSliderThemeBase1.prototype.initNavigation = function () { var _this = this; // if slider shouldn't have navigation, quit if (!this.fData.showNavigation) { return; } // get jump-toslide wrapper this.fJumpToSlideWrapperEl = this.fHtmlElement.querySelector('.m-slider-theme-base-1_slide-shortcuts'); // if element was found (security check) proceed if (this.fJumpToSlideWrapperEl) { if (this.fNumberOfSlides <= 1) { this.fJumpToSlideWrapperEl.remove(); this.fJumpToSlideWrapperEl = null; return; } // add event-delegated click listener to the wrapper this.fJumpToSlideWrapperEl.addEventListener('click', function (e) { // save target of the event in a helper variable var pickedEl = e.target; // if the element was not a proper jump-to-slide element, quit if (!pickedEl.matches('.m-slider-theme-base-1_slide-shortcut')) { return; } // get target index of the slide var targetIndex = Array.from(_this.fJumpToSlideWrapperEl.children).indexOf(pickedEl); // proceed to requested slide _this.fSiemaInstance.goTo(targetIndex, function () { // disable automatic scrolling when user has interacted with slider clearTimeout(_this.fAutoSlideTimeout); }); }); } }; /** * Initializes arrow (previous, next slide) navigation */ mSliderThemeBase1.prototype.initArrows = function () { var _this = this; // if slider shouldn't have arrows, quit if (!this.fData.showArrows) { return; } // get elements from the widget this.fNextSlideButtonEl = this.fHtmlElement.querySelector('.m-slider-theme-base-1_button.is-next'); this.fPreviousSlideButtonEl = this.fHtmlElement.querySelector('.m-slider-theme-base-1_button.is-previous'); // setup navigation buttons if (this.fNextSlideButtonEl) { if (this.fNumberOfSlides <= 1) { this.fNextSlideButtonEl.remove(); this.fNextSlideButtonEl = null; } else { this.fNextSlideButtonEl.addEventListener('click', function () { _this.fSiemaInstance.next(); clearTimeout(_this.fAutoSlideTimeout); }); } } if (this.fPreviousSlideButtonEl) { if (this.fNumberOfSlides <= 1) { this.fPreviousSlideButtonEl.remove(); this.fPreviousSlideButtonEl = null; } else { this.fPreviousSlideButtonEl.addEventListener('click', function () { _this.fSiemaInstance.prev(); clearTimeout(_this.fAutoSlideTimeout); }); } } }; /** * Creates interval that updates slide position every N seconds */ mSliderThemeBase1.prototype.runAutoSlide = function (isStartingSlide) { var _this = this; if (isStartingSlide === void 0) { isStartingSlide = false; } clearTimeout(this.fAutoSlideTimeout); // if slider shouldn't have autoslide feature, quit if (!this.fData.autoSlide) { return; } // holds current slide hash ID var currentSlideId = this.fSlidesIds[this.fSiemaInstance.currentSlide]; // holds transition delay, based on `isStartingSlide` // (first slide has no transition taken into calc) var transitionDelay = (isStartingSlide ? 0 : this.fData.transitionTime); // holds display time for current slide var autoSlideDelay = this.getDisplayTimeOfSlide(currentSlideId) + transitionDelay; // creates new timeout this.fAutoSlideTimeout = window.setTimeout(function () { _this.fSiemaInstance.next(); _this.runAutoSlide(); }, autoSlideDelay); }; /** * Returns display time of slide with given id. Fallbacks to generic display time */ mSliderThemeBase1.prototype.getDisplayTimeOfSlide = function (id) { // takes display time of this particular slide from widget data var individualDisplayTime = this.fData.slidesDisplayTime[id]; // checks if passed variable is actually a number // returns false for NaN, undefined etc, but treats 0 as valid // floating point numbers (strings) are considered invalid if (!Number.isFinite(individualDisplayTime)) { // return default display time if something went wrong with individual display time return this.fData.displayTime; } // return display data for requested slide return individualDisplayTime; }; /** * Called when widget is no longer needed, cleans up listners and timeouts */ mSliderThemeBase1.prototype.destroy = function () { clearTimeout(this.fAutoSlideTimeout); this.fHtmlElement.removeEventListener('mouseenter', this.handleMouseEnter.bind(this)); this.fHtmlElement.removeEventListener('mouseleave', this.handleMouseLeave.bind(this)); }; return mSliderThemeBase1;}());window.__forge2_theme_register('w-slider', 'SystemPackage:SliderThemeBase1', mSliderThemeBase1);/** * Runtime implementation for w-slider widget */// runtime widget behaviour classvar mSliderThemeColumn = /** @class */ (function () { function mSliderThemeColumn() { // slides count per page, dynamicaly updated on scene resize this.fPerPage = 4; // holds navigation arrows for slider this.fNextSlideButtonEl = null; this.fPreviousSlideButtonEl = null; // holds initial number of slides this.fNumberOfSlides = null; // holds data of the widget this.fData = null; // holds interval that automatically switches slides // this should be cleared if user has manually switched slide this.fAutoSlideTimeout = null; // holds wrapper for jump-to-slide buttons this.fJumpToSlideWrapperEl = null; // holds array of slide ids this.fSlidesIds = null; // holds a flag whether autoslide should be programatically disabled in some cases // for example, that user is hovering over the slide this.fAutoSlideDisabled = false; // default column slider numbers of slides this.fSliderColums = 4; } /** * Initializes w-slider widget behaviour */ mSliderThemeColumn.prototype.init = function (htmlElement) { // save current htmlElement root to variable this.fHtmlElement = htmlElement; // save widget data to local variable this.fData = JSON.parse(htmlElement.getAttribute('data-widget-data')); this.fSlidesIds = JSON.parse(htmlElement.getAttribute('data-widget-children')); // initialize the component this.initSlider(); }; /** * Enables a little bit of accessibility in exporeted widget */ mSliderThemeColumn.prototype.makeAccessible = function () { // carousel elements should be displayed as lists, but there's too much risk // to wrap them in actual li element due to type of content that might be injeceted // make wrapper appear like a list for screen readers this.fHtmlElement.querySelector('.m-slider-theme-column_wrapper > div:first-child').setAttribute('role', 'list'); var slideCollection = Array.from(this.fHtmlElement.querySelectorAll('.m-slider-theme-column_wrapper > div > div')); slideCollection.forEach(function (slideEl) { // make focusable AND dont change keyboard navigation order slideEl.setAttribute('tabindex', '0'); // make entries appear like a list-item for screen readers slideEl.setAttribute('role', 'listitem'); }); // hide all duplicated elements created by siema (used to make loop work) slideCollection.slice(this.fNumberOfSlides).forEach(function (element) { element.setAttribute('aria-hidden', 'true'); }); }; Object.defineProperty(mSliderThemeColumn.prototype, "widgetId", { /** * Returns current widget id, taken from className */ get: function () { var result = this.fHtmlElement.className.match(/c-(\w+)/); if (result === null) { return undefined; } else { return result[1]; } }, enumerable: true, configurable: true }); /** * Sets up the swiping library and controls */ mSliderThemeColumn.prototype.initSlider = function () { var _this = this; // save the number of slides before initializing siema this.fNumberOfSlides = Array.from(this.fHtmlElement.querySelectorAll('.m-slider-theme-column_entry')).length; // just a safety measure - if ID gets undefined for whatever reason, Siema will throw try { // get columns number this.fPerPage = this.getColumns(); var perPage = this.fPerPage; // setup new slider, scoped to current widget this.fSiemaInstance = new window.Siema({ perPage: perPage, selector: ".c-' + this.widgetId + ' .m-slider-theme-column_wrapper", duration: this.fData.transitionTime, easing: 'ease-out', startIndex: 0, draggable: true, loop: true, onInit: function () { _this.makeAccessible(); }, onChange: function () { var currentSlide = Math.round(_this.fSiemaInstance.currentSlide); if (_this.fSiemaInstance.config.loop) { if (currentSlide < 0) { currentSlide = _this.fSiemaInstance.innerElements.length + currentSlide; } } _this.updateNavigation(currentSlide); }, }); // init additional features this.initArrows(); this.runAutoSlide(true); this.initNavigation(); this.initListeners(); } catch (e) { console.info('Could not initialize slider'); } }; /** * Installs all event listeners on current widget */ mSliderThemeColumn.prototype.initListeners = function () { this.initResizeListener(); this.fHtmlElement.addEventListener('mouseenter', this.handleMouseEnter.bind(this)); this.fHtmlElement.addEventListener('mouseleave', this.handleMouseLeave.bind(this)); }; /** * Init resize listener based on scene size */ mSliderThemeColumn.prototype.initResizeListener = function () { // create debounced resize function this.debouncedUpdateResize = this.debounce(this.handleResize, 100); // if there is ResizeObserver in window api then use it to observer slider element if (window.ResizeObserver) { this.debouncedResizeObserver = new window.ResizeObserver(this.debouncedUpdateResize.bind(this)); this.debouncedResizeObserver.observe(this.fHtmlElement); } else { window.addEventListener('resize', this.debouncedUpdateResize.bind(this)); } }; /** * remove ResizeObserver or window observer based on window api */ mSliderThemeColumn.prototype.removeResizeListener = function () { if (window.ResizeObserver) { if (this.debouncedResizeObserver) { this.debouncedResizeObserver.disconnect(); } } else { window.removeEventListener('resize', this.debouncedUpdateResize.bind(this)); } }; /** * Change slides per page and resize slider */ mSliderThemeColumn.prototype.handleResize = function () { // get columns number this.fPerPage = this.getColumns(); // set slides per page for slider instance this.fSiemaInstance.perPage = this.fPerPage; this.fSiemaInstance.config.perPage = this.fPerPage; // use slider instance method to resize slider this.fSiemaInstance.resizeHandler(); this.checkArrows(); }; /** * Resolves columns number for slider */ mSliderThemeColumn.prototype.getColumns = function () { // we need to get slide min width // it's based on max scene size and default slider columns var slideWidth = this.fData.sceneSize / this.fSliderColums; // get current scene element var sceneEl = document.querySelector('.e-scene'); // it checks how much slides fits to scene var getSliderColumns = function (columns) { var sliderWidth = columns * slideWidth; return (sliderWidth <= sceneEl.clientWidth) ? columns : getSliderColumns(columns - 1); }; var sliderColumns = getSliderColumns(this.fSliderColums); // if there is less slides then we can show columns then use slides number return (this.fNumberOfSlides < sliderColumns) ? this.fNumberOfSlides : sliderColumns; }; /** * Handles action on mouse leave (enables auto slide) */ mSliderThemeColumn.prototype.handleMouseLeave = function () { this.fAutoSlideDisabled = false; this.runAutoSlide(true); }; /** * Handles action on mouse enter (disables auto slide) */ mSliderThemeColumn.prototype.handleMouseEnter = function () { this.fAutoSlideDisabled = true; clearTimeout(this.fAutoSlideTimeout); }; /** * Updates jump to slide navigation, activating requested slide and disactivating other */ mSliderThemeColumn.prototype.updateNavigation = function (index) { // if slider shouldn't have navigation, quit if (!this.fData.showNavigation || !this.fJumpToSlideWrapperEl) { return; } // helper variable that holds collection of wrapper children var jumpToSlideButtonElCollection = Array.from(this.fJumpToSlideWrapperEl.children); // remove all `is-active` classes from navigation jumpToSlideButtonElCollection.forEach(function (slide) { return slide.classList.remove('is-active'); }); // set `is-active` class only for requested slide var targetEl = jumpToSlideButtonElCollection[index]; if (targetEl) { targetEl.classList.add('is-active'); } }; /** * Initializes jump-to-slide navigation */ mSliderThemeColumn.prototype.initNavigation = function () { var _this = this; // if slider shouldn't have navigation, quit if (!this.fData.showNavigation) { return; } // get jump-toslide wrapper this.fJumpToSlideWrapperEl = this.fHtmlElement.querySelector('.m-slider-theme-column_slide-shortcuts'); // if element was found (security check) proceed if (this.fJumpToSlideWrapperEl) { this.fJumpToSlideWrapperEl.style.display = (this.fNumberOfSlides <= this.fPerPage) ? 'none' : 'flex'; // add event-delegated click listener to the wrapper this.fJumpToSlideWrapperEl.addEventListener('click', function (e) { // save target of the event in a helper variable var pickedEl = e.target; // if the element was not a proper jump-to-slide element, quit if (!pickedEl.matches('.m-slider-theme-column_slide-shortcut')) { return; } // get target index of the slide var targetIndex = Array.from(_this.fJumpToSlideWrapperEl.children).indexOf(pickedEl); // proceed to requested slide _this.fSiemaInstance.goTo(targetIndex, function () { // disable automatic scrolling when user has interacted with slider clearTimeout(_this.fAutoSlideTimeout); }); }); } }; mSliderThemeColumn.prototype.checkArrows = function () { if (this.fNextSlideButtonEl) { this.fNextSlideButtonEl.style.display = (this.fNumberOfSlides <= this.fPerPage) ? 'none' : 'block'; } if (this.fPreviousSlideButtonEl) { this.fPreviousSlideButtonEl.style.display = (this.fNumberOfSlides <= this.fPerPage) ? 'none' : 'block'; } if (this.fJumpToSlideWrapperEl) { this.fJumpToSlideWrapperEl.style.display = (this.fNumberOfSlides <= this.fPerPage) ? 'none' : 'flex'; } }; /** * Initializes arrow (previous, next slide) navigation */ mSliderThemeColumn.prototype.initArrows = function () { var _this = this; // if slider shouldn't have arrows, quit if (!this.fData.showArrows) { return; } // get elements from the widget this.fNextSlideButtonEl = this.fHtmlElement.querySelector('.m-slider-theme-column_button.is-next'); this.fPreviousSlideButtonEl = this.fHtmlElement.querySelector('.m-slider-theme-column_button.is-previous'); // setup navigation buttons if (this.fNextSlideButtonEl) { this.fNextSlideButtonEl.addEventListener('click', function () { _this.fSiemaInstance.next(); clearTimeout(_this.fAutoSlideTimeout); }); this.fNextSlideButtonEl.style.display = (this.fNumberOfSlides <= this.fPerPage) ? 'none' : 'block'; } if (this.fPreviousSlideButtonEl) { this.fPreviousSlideButtonEl.addEventListener('click', function () { _this.fSiemaInstance.prev(); clearTimeout(_this.fAutoSlideTimeout); }); this.fPreviousSlideButtonEl.style.display = (this.fNumberOfSlides <= this.fPerPage) ? 'none' : 'block'; } }; /** * Creates interval that updates slide position every N seconds */ mSliderThemeColumn.prototype.runAutoSlide = function (isStartingSlide) { var _this = this; if (isStartingSlide === void 0) { isStartingSlide = false; } clearTimeout(this.fAutoSlideTimeout); // if slider shouldn't have autoslide feature, quit if (!this.fData.autoSlide) { return; } // holds current slide hash ID var currentSlideId = this.fSlidesIds[this.fSiemaInstance.currentSlide]; // holds transition delay, based on `isStartingSlide` // (first slide has no transition taken into calc) var transitionDelay = (isStartingSlide ? 0 : this.fData.transitionTime); // holds display time for current slide var autoSlideDelay = this.getDisplayTimeOfSlide(currentSlideId) + transitionDelay; // creates new timeout this.fAutoSlideTimeout = window.setTimeout(function () { _this.fSiemaInstance.next(); _this.runAutoSlide(); }, autoSlideDelay); }; /** * Returns display time of slide with given id. Fallbacks to generic display time */ mSliderThemeColumn.prototype.getDisplayTimeOfSlide = function (id) { // takes display time of this particular slide from widget data var individualDisplayTime = this.fData.slidesDisplayTime[id]; // checks if passed variable is actually a number // returns false for NaN, undefined etc, but treats 0 as valid // floating point numbers (strings) are considered invalid if (!Number.isFinite(individualDisplayTime)) { // return default display time if something went wrong with individual display time return this.fData.displayTime; } // return display data for requested slide return individualDisplayTime; }; /** * Called when widget is no longer needed, cleans up listners and timeouts */ mSliderThemeColumn.prototype.destroy = function () { clearTimeout(this.fAutoSlideTimeout); this.removeResizeListener(); this.fHtmlElement.removeEventListener('mouseenter', this.handleMouseEnter.bind(this)); this.fHtmlElement.removeEventListener('mouseleave', this.handleMouseLeave.bind(this)); }; /** * Generic debounce function, invokes `cb` after `duration` secs of being idle (when the function was not requested) * * @param cb * @param duration */ mSliderThemeColumn.prototype.debounce = function (cb, duration) { var _this = this; var timeout; return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } window.clearTimeout(timeout); timeout = window.setTimeout(function () { cb.call.apply(cb, [_this].concat(args)); }, duration); }; }; return mSliderThemeColumn;}());window.__forge2_theme_register('w-slider', 'SystemPackage:SliderThemeColumn', mSliderThemeColumn); /** * End of widget themes */ /** * Basic runtime code */ /** * This module is reponsible for providing support for runtime widgets. *//** * Define enableWidget function that will accept widgetType and will inject * runtime behaviour to DOM element based on widgetType argument. */function enableWidget(widgetType) { // if this widget type does not have runtime behaviour class, // just skip it if (!window.__forge2_widgets[widgetType]) { return; } // get widget runtime class for particular widget type var widgetClass = window.__forge2_widgets[widgetType]; // get all elements with class matching widget type (eg: w-countdown -> .w-countdown) var elements = Array.from(document.querySelectorAll('.' + widgetType)); // initialize all widgett elements found elements.forEach(function (rootElement) { // create widget class instance for this element var widgetClassInstance = new widgetClass(); // and inject it widgetClassInstance.init(rootElement, window.__forge2_context); });}/** * Called when window is fully loaded, enables all widgets runtime behaviour. */window.addEventListener('load', function () { // get array of widget types from repository var widgetTypes = Array.from(Object.keys(window.__forge2_widgets)); // enable all widgets widgetTypes.forEach(function (widgetType) { return enableWidget(widgetType); });});})(); [/script]
Zapisz się do newslettera

Szanowny Użytkowniku w naszym serwisie wykorzystujemy pliki cookies w celu świadczenia usług, dostosowania serwisu do indywidualnych preferencji użytkowników oraz w celach statystycznych i reklamowych. Możesz wyłączyć ten mechanizm w ustawieniach swojej przeglądarki. Korzystanie z naszego serwisu bez zmiany ustawień przeglądarki oznacza, że cookies będą zapisane w pamięci urządzenia. Więcej w Polityce Prywatności.

Potwierdzam

Proponowane kategorie

    Proponowane produkty