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QAAUL,EACjBjS,SAASuS,KAAKrM,YAAYgM,MAIjBM,EAAWX,GAClB7R,SAASC,cAAc,cAAc4R,OAChCE,QAAQC,UAEV,IAAID,SAAQ,CAACC,EAASC,KAC3B,IAAIQ,EAAOzS,SAASwM,qBAAqB,QAAQ,GAC7CkG,EAAO1S,SAASiG,cAAc,QAClCyM,EAAKC,IAAM,aACXD,EAAK7H,KAAO,WACZ6H,EAAKE,KAAOf,EACZa,EAAKG,MAAQ,MACbH,EAAKL,OAASL,EACdU,EAAKJ,QAAUL,EACfQ,EAAKvM,YAAYwM","sources":["scripts/src/glider/index.ts","node_modules/glider-js/glider.js","node_modules/lodash.throttle/index.js","scripts/src/react/utils/browserUtils.ts"],"sourcesContent":["import Glider from \"glider-js\";\r\nimport $ from \"jquery\";\r\nimport throttle from \"lodash.throttle\";\nimport { isIos, isTouchDevice } from \"../react/utils/browserUtils\";\r\n\r\nexport interface IGliderWrapper {\r\n id: number;\r\n settings: Glider.Options;\r\n glider: any;\r\n navigateTo?: (y: boolean, n: number) => void;\r\n}\r\n\r\n// Stores the gliders with their methods.\r\nconst gliders = new Array();\r\n\r\nexport const gliderCarousel = (target: string | HTMLElement = \".js-glider\") => {\r\n const $target = target instanceof HTMLElement ? $(target) : $(target);\r\n\r\n // determins if the object observer should treat the scroll as a users action \r\n let touchEvent = false;\r\n\r\n // Go to next slide using local glider method scrollItem \r\n const imageNavigation = (element: JQuery, product: boolean) => {\r\n $(element)\r\n .find(\".glider-slide\")\r\n .on(\"click\", e => {\r\n // use external navigate to method \r\n const $this = $(e.currentTarget);\r\n\r\n if ($this.hasClass(\"glide-slide--product\")) {\r\n navigateTo(false, $this.index());\r\n return;\r\n }\r\n\r\n //get the id for the current slider \r\n const thisId = $(e.currentTarget)\r\n .closest(\".js-glider\")\r\n .data(\"id\");\r\n // uses the local glider stored methods \r\n for (let i = 0; i < gliders.length; i++) {\r\n if (gliders[i].id == thisId) {\r\n gliders[i].glider.scrollItem($(e.currentTarget).index());\r\n if (product) {\r\n setActiveButton($(e.currentTarget).index());\r\n }\r\n }\r\n }\r\n });\r\n };\n const setActiveButton = (index: number) => {\r\n $(\".js-glider-button\")\r\n .removeClass(\"active\")\r\n .eq(index)\r\n .addClass(\"active\");\r\n };\r\n const navigateTo = (isModal: boolean = false, selectedIndex: number) => {\r\n const $glider = isModal ? $(\".js-glider--modal\") : $(\".js-glider--product\");\n const glideSlide = isModal ? \".js-glide-slide\" : \"glide-slide--product\"\r\n let glideLeft: number = 0;\r\n $(glideSlide).each((index, element) => {\r\n if (index < selectedIndex) {\r\n glideLeft += $(element).width() || 0;\r\n }\r\n });\n // Modal uses own spacing between slides.\r\n let margins = selectedIndex * (isModal ? 0 : 16);\r\n // Set margin for all sides other than first\n if (!isModal) {\r\n margins = margins == 0 ? 8 : margins;\n }\r\n glideLeft = glideLeft + margins;\r\n $glider.animate({ scrollLeft: glideLeft }, 700);\r\n setActiveButton(selectedIndex);\r\n };\n\n interface touchEventValues {\n xDown?: number | null;\n yDown?: number | null;\n }\n\r\n var xDown: touchEventValues = { xDown: null};\r\n var yDown: touchEventValues = { yDown: null };\r\n const getTouches = (evt: TouchEvent) => {\n\r\n return evt.touches ||\r\n evt.originalEvent.touches \r\n }\n\n\n\r\n const handleTouchStart = (evt: TouchEvent): void => {\r\n const firstTouch = getTouches(evt)[0];\r\n xDown.xDown = firstTouch.clientX;\r\n yDown.yDown = firstTouch.clientY;\n\r\n };\r\n\n\r\n const handleTouchMove = (evt: TouchEvent) => {\r\n if (!xDown.xDown || !yDown.yDown) {\r\n return;\r\n }\r\n\r\n var xUp = evt.touches[0].clientX;\r\n var yUp = evt.touches[0].clientY;\r\n\r\n var xDiff = xDown.xDown - xUp;\r\n var yDiff = yDown.yDown - yUp;\r\n\r\n if (Math.abs(xDiff) > Math.abs(yDiff)) {\n var index = 0;\n if (xDiff > 0) {\r\n index = getSelectedIndex(false);\r\n } else {\r\n index = getSelectedIndex(true);\r\n }\n navigateTo(true, index);\r\n }\r\n\r\n xDown.xDown = null;\r\n yDown.yDown = null;\r\n };\n\r\n\n const modalGlider = (): void => {\n if (window.matchMedia(\"(min-width: 414px)\").matches) {\n $('.js-modal-fullscreen .js-glider-button.inactive').removeClass('inactive')\n }\n }\n const modalNav = (): void => {\n const nav = document.querySelector('.js-glider-current[data-id=\"' + $target.data('id') + '\"] .js-nav-current');\n const index = $target.find('.glider-slide.active').index();\n $('.js-glider-button').removeClass('disabled')\n if (index == 0) {\n $('.js-glider-button').first().addClass('disabled');\n }\n else if (index + 1 == ($target.find('.glider-slide').length)) {\n $('.js-glider-button').last().addClass('disabled');\n }\n\n if (!!nav) {\n nav.innerHTML = (index + 1).toString();\n }\n $('.js-modal-caption-text-slide').removeClass('active');\n $('.js-modal-caption-text-slide').eq(index).addClass('active');\n\n }\n const getSelectedIndex = (backwards: boolean): number => {\n var index = $('.js-glider--modal .glider-slide.active').index();\n if (backwards) {\n return index = index - 1;\n }\n return index + 1;\n }\r\n // used on product page templates.\r\n const productGlider = (): void => {\r\n // creates a new glider instance or destroys one or refreshes the existing instance \r\n if (window.matchMedia(\"(max-width: 768px)\").matches) {\r\n // only create an instance if one does not exist already \r\n if (gliders[0].glider == null) {\r\n // tslint:disable \r\n const glider = new Glider(\r\n $(\".js-glider--product\")[0],\r\n gliders[0].settings\r\n );\r\n // update with new glider instance \r\n gliders[0].glider = glider;\r\n // assign the event to the navigate the images \r\n imageNavigation($(\".js-glider--product\"), true);\r\n } else {\r\n // Refresh after glider events finish \r\n setTimeout(e => {\r\n gliders[0].glider.refresh();\r\n }, 0);\r\n\r\n const setActive = () => {\r\n // stores the index of nodes that intersect \r\n let values = new Array();\r\n const sections = document.querySelectorAll(\".js-glide-product-slide\");\r\n touchEvent = true;\r\n let observer = new IntersectionObserver(function (entries, self) {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n values.push($(entry.target).index());\r\n }\r\n });\r\n // assign active to the last observed node \r\n if (touchEvent) {\r\n setActiveButton(values[values.length - 1]);\r\n }\r\n });\r\n sections.forEach(section => {\r\n observer.observe(section);\r\n });\r\n };\r\n\r\n // create the touch events for small screens \r\n // throttle costly event to avoid browser performance issues \r\n const touchMove = throttle(setActive, 1000);\r\n document\r\n .querySelector(\".glider-track\")\r\n ?.addEventListener(\"touchmove\", touchMove);\r\n }\r\n }\n else if (gliders[0] != null && gliders[0].glider != null) {\r\n // resets the modified html \r\n gliders[0].glider.destroy();\r\n // resets the glider instance \r\n gliders[0].glider = null;\r\n // resets the external controls to 0 when destroyed \r\n setActiveButton(0);\r\n return;\r\n }\r\n };\r\n\n\r\n const instances = $target\r\n .map((i, element) => {\r\n let $this = $(element);\r\n\r\n // used to determine local settings for glider\n // TODO update all instances to use c# model id.\r\n let id = $this.data(\"id\");\n if (!id) {\n id = Math.floor(Math.random() * 99999);\n $this.attr(\"data-id\", id);\n }\n\r\n // variables for glider types \r\n const productPageGlider = $this.hasClass(\"js-glider--product\");\r\n const landingPageGlider = $this.hasClass(\"js-glider--landing-page\");\r\n const productDetailPageGlider = $this.hasClass(\"js-glider--product-page\");\n const modalGliderNode = $this.hasClass(\"js-glider--modal\");\r\n const settings: Glider.Options = {\n draggable: modalGliderNode ? false : true,\r\n scrollLock: modalGliderNode && !isIos ? true : false,\n scrollLockDelay: 0,\n dragVelocity: 0,\r\n dots: \".js-glider[data-id='\" + id + \"'] ~ .glider__dots\",\r\n rewind: true,\r\n itemWidth: 336,\r\n arrows: {\r\n prev: \".js-glider[data-id='\" + id + \"'] ~ .glider__glider-prev\",\r\n next: \".js-glider[data-id='\" + id + \"'] ~ .glider__glider-next\"\r\n },\r\n // mobile first, fractional slides: slides to show \r\n responsive: [\r\n {\r\n breakpoint: 414,\r\n settings: {\n draggable: modalGliderNode ? false : true,\r\n slidesToScroll: 1,\r\n slidesToShow: productDetailPageGlider ? 1.2 : 1\r\n }\r\n },\r\n {\r\n breakpoint: 768,\r\n settings: {\n draggable: modalGliderNode ? false : true,\r\n slidesToScroll: 1,\r\n slidesToShow: productPageGlider ? 1 : landingPageGlider ? 2.1 : modalGliderNode ? 1 : 2\r\n }\r\n },\r\n {\r\n breakpoint: 1024,\r\n settings: {\n draggable: modalGliderNode ? false : true,\r\n slidesToScroll: 1,\r\n slidesToShow: productDetailPageGlider ? 3.5 : productPageGlider\r\n ? 1\r\n : landingPageGlider\r\n ? 2.1\r\n : modalGliderNode ? 1 : 2\r\n }\r\n },\r\n {\r\n breakpoint: 1200,\r\n settings: {\n draggable: modalGliderNode ? false : true,\r\n slidesToScroll: 1,\r\n slidesToShow: productDetailPageGlider ? 3.5 : modalGliderNode ? 1 : 2\r\n }\r\n }\r\n ]\r\n };\n\n if (modalGliderNode) {\n delete settings.arrows;\n }\n\r\n // Store glider methods and id \r\n const g: IGliderWrapper = {\r\n id: id,\r\n settings: settings,\r\n // tslint:disable \r\n glider: new Glider($(element)[0], settings),\r\n navigateTo\r\n };\n\r\n gliders.push(g);\r\n\r\n if (productPageGlider) {\r\n productGlider();\r\n window.matchMedia(\"(max-width: 768px)\").addListener(productGlider);\r\n window.matchMedia(\"(max-width: 414px)\").addListener(productGlider);\r\n }\n if (modalGlider != null && !!$target[0] && !!$target.data('id')) {\n window.matchMedia(\"(min-width: 414px)\").addListener(modalGlider);\r\n window.matchMedia(\"(max-width: 414px)\").addListener(modalGlider);\n\n const modalLoading = $('.js-modal-fullscreen .js-loading');\n const gliderTrack = document.querySelector(\".glider-track\");\n\n $target[0].addEventListener('glider-animated', function (event) {\n modalNav();\n });\n\n let shownArrows = false;\n // Animate nav buttons on interaction.\n const animateArrowVisibilitySmallScreen = (): void => {\n if (window.matchMedia(\"(max-width: 414px)\").matches) {\n const element = $('.js-modal-fullscreen .js-glider-button')\n if (!shownArrows) {\n shownArrows = true;\n element.not('.active').addClass('active');\n setTimeout(() => {\n element.removeClass('active').addClass('inactive');\n }, 1000)\n }\n }\n }\n\n const touchStartThrottle = throttle(animateArrowVisibilitySmallScreen, 1000);\n const touchMoveThrottle = throttle(modalNav, 1000);\n const handleTouchStartThrottle = throttle(handleTouchStart, 1);\n const handleTouchMoveThrottle = throttle(handleTouchMove, 1);\n\n if (!!gliderTrack) {\n gliderTrack.addEventListener('touchstart', handleTouchStartThrottle, false);\r\n gliderTrack.addEventListener('touchmove', handleTouchMoveThrottle, false);\n gliderTrack.addEventListener(\"touchstart\", touchStartThrottle);\n gliderTrack.addEventListener(\"touchmove\", touchMoveThrottle);\n }\n modalLoading.removeClass('btn--loading');\n\n\n }\n\n // Navigate the slides based of their current width.\r\n $(\".js-glider-button\").on(\"click\", e => {\r\n e.stopImmediatePropagation();\n const $this = $(e.currentTarget);\n const isModal = $this.hasClass('js-glider-prev') || $this.hasClass('js-glider-next');\r\n let index = $this.index();\n if (isModal) {\n index = getSelectedIndex($this.hasClass('js-glider-prev'));\n }\r\n touchEvent = false;\r\n navigateTo(true, index);\n if (isModal) {\n // Update after animation.\n setTimeout(() => {\n modalNav();\n }, 700);\n }\r\n });\n\n\n // Add image navigation for all instances except modal\n // Where Modal only ever displays a maximum of one image at a time.\n if (!modalGliderNode) {\r\n imageNavigation($(element), false);\n }\r\n return g;\r\n })\r\n .get();\r\n return instances;\r\n};\r\n","/* @preserve\n _____ __ _ __ _\n / ___// /(_)___/ /___ ____ (_)___\n / (_ // // // _ // -_)/ __/_ / /(_-<\n \\___//_//_/ \\_,_/ \\__//_/ (_)__/ //___/\n |___/\n\n Version: 1.7.4\n Author: Nick Piscitelli (pickykneee)\n Website: https://nickpiscitelli.com\n Documentation: http://nickpiscitelli.github.io/Glider.js\n License: MIT License\n Release Date: October 25th, 2018\n\n*/\n\n/* global define */\n\n(function (factory) {\n typeof define === 'function' && define.amd\n ? define(factory)\n : typeof exports === 'object'\n ? (module.exports = factory())\n : factory()\n})(function () {\n ('use strict') // eslint-disable-line no-unused-expressions\n\n /* globals window:true */\n var _window = typeof window !== 'undefined' ? window : this\n\n var Glider = (_window.Glider = function (element, settings) {\n var _ = this\n\n if (element._glider) return element._glider\n\n _.ele = element\n _.ele.classList.add('glider')\n\n // expose glider object to its DOM element\n _.ele._glider = _\n\n // merge user setting with defaults\n _.opt = Object.assign(\n {},\n {\n slidesToScroll: 1,\n slidesToShow: 1,\n resizeLock: true,\n duration: 0.5,\n // easeInQuad\n easing: function (x, t, b, c, d) {\n return c * (t /= d) * t + b\n }\n },\n settings\n )\n\n // set defaults\n _.animate_id = _.page = _.slide = 0\n _.arrows = {}\n\n // preserve original options to\n // extend breakpoint settings\n _._opt = _.opt\n\n if (_.opt.skipTrack) {\n // first and only child is the track\n _.track = _.ele.children[0]\n } else {\n // create track and wrap slides\n _.track = document.createElement('div')\n _.ele.appendChild(_.track)\n while (_.ele.children.length !== 1) {\n _.track.appendChild(_.ele.children[0])\n }\n }\n\n _.track.classList.add('glider-track')\n\n // start glider\n _.init()\n\n // set events\n _.resize = _.init.bind(_, true)\n _.event(_.ele, 'add', {\n scroll: _.updateControls.bind(_)\n })\n _.event(_window, 'add', {\n resize: _.resize\n })\n })\n\n var gliderPrototype = Glider.prototype\n gliderPrototype.init = function (refresh, paging) {\n var _ = this\n\n var width = 0\n\n var height = 0\n\n _.slides = _.track.children;\n\n [].forEach.call(_.slides, function (_, i) {\n _.classList.add('glider-slide')\n _.setAttribute('data-gslide', i)\n })\n\n _.containerWidth = _.ele.clientWidth\n\n var breakpointChanged = _.settingsBreakpoint()\n if (!paging) paging = breakpointChanged\n\n if (\n _.opt.slidesToShow === 'auto' ||\n typeof _.opt._autoSlide !== 'undefined'\n ) {\n var slideCount = _.containerWidth / _.opt.itemWidth\n\n _.opt._autoSlide = _.opt.slidesToShow = _.opt.exactWidth\n ? slideCount\n : Math.max(1, Math.floor(slideCount))\n }\n if (_.opt.slidesToScroll === 'auto') {\n _.opt.slidesToScroll = Math.floor(_.opt.slidesToShow)\n }\n\n _.itemWidth = _.opt.exactWidth\n ? _.opt.itemWidth\n : _.containerWidth / _.opt.slidesToShow;\n\n // set slide dimensions\n [].forEach.call(_.slides, function (__) {\n __.style.height = 'auto'\n __.style.width = _.itemWidth + 'px'\n width += _.itemWidth\n height = Math.max(__.offsetHeight, height)\n })\n\n _.track.style.width = width + 'px'\n _.trackWidth = width\n _.isDrag = false\n _.preventClick = false\n\n _.opt.resizeLock && _.scrollTo(_.slide * _.itemWidth, 0)\n\n if (breakpointChanged || paging) {\n _.bindArrows()\n _.buildDots()\n _.bindDrag()\n }\n\n _.updateControls()\n\n _.emit(refresh ? 'refresh' : 'loaded')\n }\n\n gliderPrototype.bindDrag = function () {\n var _ = this\n _.mouse = _.mouse || _.handleMouse.bind(_)\n\n var mouseup = function () {\n _.mouseDown = undefined\n _.ele.classList.remove('drag')\n if (_.isDrag) {\n _.preventClick = true\n }\n _.isDrag = false\n }\n\n var events = {\n mouseup: mouseup,\n mouseleave: mouseup,\n mousedown: function (e) {\n e.preventDefault()\n e.stopPropagation()\n _.mouseDown = e.clientX\n _.ele.classList.add('drag')\n },\n mousemove: _.mouse,\n click: function (e) {\n if (_.preventClick) {\n e.preventDefault()\n e.stopPropagation()\n }\n _.preventClick = false\n }\n }\n\n _.ele.classList.toggle('draggable', _.opt.draggable === true)\n _.event(_.ele, 'remove', events)\n if (_.opt.draggable) _.event(_.ele, 'add', events)\n }\n\n gliderPrototype.buildDots = function () {\n var _ = this\n\n if (!_.opt.dots) {\n if (_.dots) _.dots.innerHTML = ''\n return\n }\n\n if (typeof _.opt.dots === 'string') {\n _.dots = document.querySelector(_.opt.dots)\n } else _.dots = _.opt.dots\n if (!_.dots) return\n\n _.dots.innerHTML = ''\n _.dots.classList.add('glider-dots')\n\n for (var i = 0; i < Math.ceil(_.slides.length / _.opt.slidesToShow); ++i) {\n var dot = document.createElement('button')\n dot.dataset.index = i\n dot.setAttribute('aria-label', 'Page ' + (i + 1))\n dot.setAttribute('role', 'tab')\n dot.className = 'glider-dot ' + (i ? '' : 'active')\n _.event(dot, 'add', {\n click: _.scrollItem.bind(_, i, true)\n })\n _.dots.appendChild(dot)\n }\n }\n\n gliderPrototype.bindArrows = function () {\n var _ = this\n if (!_.opt.arrows) {\n Object.keys(_.arrows).forEach(function (direction) {\n var element = _.arrows[direction]\n _.event(element, 'remove', { click: element._func })\n })\n return\n }\n ['prev', 'next'].forEach(function (direction) {\n var arrow = _.opt.arrows[direction]\n if (arrow) {\n if (typeof arrow === 'string') arrow = document.querySelector(arrow)\n if (arrow) {\n arrow._func = arrow._func || _.scrollItem.bind(_, direction)\n _.event(arrow, 'remove', {\n click: arrow._func\n })\n _.event(arrow, 'add', {\n click: arrow._func\n })\n _.arrows[direction] = arrow\n }\n }\n })\n }\n\n gliderPrototype.updateControls = function (event) {\n var _ = this\n\n if (event && !_.opt.scrollPropagate) {\n event.stopPropagation()\n }\n\n var disableArrows = _.containerWidth >= _.trackWidth\n\n if (!_.opt.rewind) {\n if (_.arrows.prev) {\n _.arrows.prev.classList.toggle(\n 'disabled',\n _.ele.scrollLeft <= 0 || disableArrows\n )\n _.arrows.prev.classList.contains('disabled')\n ? _.arrows.prev.setAttribute('aria-disabled', true)\n : _.arrows.prev.setAttribute('aria-disabled', false)\n }\n if (_.arrows.next) {\n _.arrows.next.classList.toggle(\n 'disabled',\n Math.ceil(_.ele.scrollLeft + _.containerWidth) >=\n Math.floor(_.trackWidth) || disableArrows\n )\n _.arrows.next.classList.contains('disabled')\n ? _.arrows.next.setAttribute('aria-disabled', true)\n : _.arrows.next.setAttribute('aria-disabled', false)\n }\n }\n\n _.slide = Math.round(_.ele.scrollLeft / _.itemWidth)\n _.page = Math.round(_.ele.scrollLeft / _.containerWidth)\n\n var middle = _.slide + Math.floor(Math.floor(_.opt.slidesToShow) / 2)\n\n var extraMiddle = Math.floor(_.opt.slidesToShow) % 2 ? 0 : middle + 1\n if (Math.floor(_.opt.slidesToShow) === 1) {\n extraMiddle = 0\n }\n\n // the last page may be less than one half of a normal page width so\n // the page is rounded down. when at the end, force the page to turn\n if (_.ele.scrollLeft + _.containerWidth >= Math.floor(_.trackWidth)) {\n _.page = _.dots ? _.dots.children.length - 1 : 0\n }\n\n [].forEach.call(_.slides, function (slide, index) {\n var slideClasses = slide.classList\n\n var wasVisible = slideClasses.contains('visible')\n\n var start = _.ele.scrollLeft\n\n var end = _.ele.scrollLeft + _.containerWidth\n\n var itemStart = _.itemWidth * index\n\n var itemEnd = itemStart + _.itemWidth;\n\n [].forEach.call(slideClasses, function (className) {\n /^left|right/.test(className) && slideClasses.remove(className)\n })\n slideClasses.toggle('active', _.slide === index)\n if (middle === index || (extraMiddle && extraMiddle === index)) {\n slideClasses.add('center')\n } else {\n slideClasses.remove('center')\n slideClasses.add(\n [\n index < middle ? 'left' : 'right',\n Math.abs(index - (index < middle ? middle : extraMiddle || middle))\n ].join('-')\n )\n }\n\n var isVisible =\n Math.ceil(itemStart) >= Math.floor(start) &&\n Math.floor(itemEnd) <= Math.ceil(end)\n slideClasses.toggle('visible', isVisible)\n if (isVisible !== wasVisible) {\n _.emit('slide-' + (isVisible ? 'visible' : 'hidden'), {\n slide: index\n })\n }\n })\n if (_.dots) {\n [].forEach.call(_.dots.children, function (dot, index) {\n dot.classList.toggle('active', _.page === index)\n })\n }\n\n if (event && _.opt.scrollLock) {\n clearTimeout(_.scrollLock)\n _.scrollLock = setTimeout(function () {\n clearTimeout(_.scrollLock)\n // dont attempt to scroll less than a pixel fraction - causes looping\n if (Math.abs(_.ele.scrollLeft / _.itemWidth - _.slide) > 0.02) {\n if (!_.mouseDown) {\n // Only scroll if not at the end (#94)\n if (_.trackWidth > _.containerWidth + _.ele.scrollLeft) {\n _.scrollItem(_.getCurrentSlide())\n }\n }\n }\n }, _.opt.scrollLockDelay || 250)\n }\n }\n\n gliderPrototype.getCurrentSlide = function () {\n var _ = this\n return _.round(_.ele.scrollLeft / _.itemWidth)\n }\n\n gliderPrototype.scrollItem = function (slide, dot, e) {\n if (e) e.preventDefault()\n\n var _ = this\n\n var originalSlide = slide\n ++_.animate_id\n\n if (dot === true) {\n slide = slide * _.containerWidth\n slide = Math.round(slide / _.itemWidth) * _.itemWidth\n } else {\n if (typeof slide === 'string') {\n var backwards = slide === 'prev'\n\n // use precise location if fractional slides are on\n if (_.opt.slidesToScroll % 1 || _.opt.slidesToShow % 1) {\n slide = _.getCurrentSlide()\n } else {\n slide = _.slide\n }\n\n if (backwards) slide -= _.opt.slidesToScroll\n else slide += _.opt.slidesToScroll\n\n if (_.opt.rewind) {\n var scrollLeft = _.ele.scrollLeft\n slide =\n backwards && !scrollLeft\n ? _.slides.length\n : !backwards &&\n scrollLeft + _.containerWidth >= Math.floor(_.trackWidth)\n ? 0\n : slide\n }\n }\n\n slide = Math.max(Math.min(slide, _.slides.length), 0)\n\n _.slide = slide\n slide = _.itemWidth * slide\n }\n\n _.scrollTo(\n slide,\n _.opt.duration * Math.abs(_.ele.scrollLeft - slide),\n function () {\n _.updateControls()\n _.emit('animated', {\n value: originalSlide,\n type:\n typeof originalSlide === 'string' ? 'arrow' : dot ? 'dot' : 'slide'\n })\n }\n )\n\n return false\n }\n\n gliderPrototype.settingsBreakpoint = function () {\n var _ = this\n\n var resp = _._opt.responsive\n\n if (resp) {\n // Sort the breakpoints in mobile first order\n resp.sort(function (a, b) {\n return b.breakpoint - a.breakpoint\n })\n\n for (var i = 0; i < resp.length; ++i) {\n var size = resp[i]\n if (_window.innerWidth >= size.breakpoint) {\n if (_.breakpoint !== size.breakpoint) {\n _.opt = Object.assign({}, _._opt, size.settings)\n _.breakpoint = size.breakpoint\n return true\n }\n return false\n }\n }\n }\n // set back to defaults in case they were overriden\n var breakpointChanged = _.breakpoint !== 0\n _.opt = Object.assign({}, _._opt)\n _.breakpoint = 0\n return breakpointChanged\n }\n\n gliderPrototype.scrollTo = function (scrollTarget, scrollDuration, callback) {\n var _ = this\n\n var start = new Date().getTime()\n\n var animateIndex = _.animate_id\n\n var animate = function () {\n var now = new Date().getTime() - start\n _.ele.scrollLeft =\n _.ele.scrollLeft +\n (scrollTarget - _.ele.scrollLeft) *\n _.opt.easing(0, now, 0, 1, scrollDuration)\n if (now < scrollDuration && animateIndex === _.animate_id) {\n _window.requestAnimationFrame(animate)\n } else {\n _.ele.scrollLeft = scrollTarget\n callback && callback.call(_)\n }\n }\n\n _window.requestAnimationFrame(animate)\n }\n\n gliderPrototype.removeItem = function (index) {\n var _ = this\n\n if (_.slides.length) {\n _.track.removeChild(_.slides[index])\n _.refresh(true)\n _.emit('remove')\n }\n }\n\n gliderPrototype.addItem = function (ele) {\n var _ = this\n\n _.track.appendChild(ele)\n _.refresh(true)\n _.emit('add')\n }\n\n gliderPrototype.handleMouse = function (e) {\n var _ = this\n if (_.mouseDown) {\n _.isDrag = true\n _.ele.scrollLeft +=\n (_.mouseDown - e.clientX) * (_.opt.dragVelocity || 3.3)\n _.mouseDown = e.clientX\n }\n }\n\n // used to round to the nearest 0.XX fraction\n gliderPrototype.round = function (double) {\n var _ = this\n var step = _.opt.slidesToScroll % 1 || 1\n var inv = 1.0 / step\n return Math.round(double * inv) / inv\n }\n\n gliderPrototype.refresh = function (paging) {\n var _ = this\n _.init(true, paging)\n }\n\n gliderPrototype.setOption = function (opt, global) {\n var _ = this\n\n if (_.breakpoint && !global) {\n _._opt.responsive.forEach(function (v) {\n if (v.breakpoint === _.breakpoint) {\n v.settings = Object.assign({}, v.settings, opt)\n }\n })\n } else {\n _._opt = Object.assign({}, _._opt, opt)\n }\n\n _.breakpoint = 0\n _.settingsBreakpoint()\n }\n\n gliderPrototype.destroy = function () {\n var _ = this\n\n var replace = _.ele.cloneNode(true)\n\n var clear = function (ele) {\n ele.removeAttribute('style');\n [].forEach.call(ele.classList, function (className) {\n /^glider/.test(className) && ele.classList.remove(className)\n })\n }\n // remove track\n replace.children[0].outerHTML = replace.children[0].innerHTML\n clear(replace);\n [].forEach.call(replace.getElementsByTagName('*'), clear)\n _.ele.parentNode.replaceChild(replace, _.ele)\n _.event(_window, 'remove', {\n resize: _.resize\n })\n _.emit('destroy')\n }\n\n gliderPrototype.emit = function (name, arg) {\n var _ = this\n\n var e = new _window.CustomEvent('glider-' + name, {\n bubbles: !_.opt.eventPropagate,\n detail: arg\n })\n _.ele.dispatchEvent(e)\n }\n\n gliderPrototype.event = function (ele, type, args) {\n var eventHandler = ele[type + 'EventListener'].bind(ele)\n Object.keys(args).forEach(function (k) {\n eventHandler(k, args[k])\n })\n }\n\n return Glider\n})\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","export const isIos =\r\n !!navigator.userAgent.match(/Version\\/[\\d\\.]+.*Safari/) ||\r\n (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);\r\n\r\nexport const isTouchDevice = () => {\r\n return (('ontouchstart' in window) ||\r\n (navigator.maxTouchPoints > 0) ||\r\n (navigator.msMaxTouchPoints > 0));\r\n}\r\n\r\nexport const isAndroid = /Android/i.test(navigator.userAgent);\r\n\r\nexport const isIosNoSafari = /iPad|iPhone|iPod/.test(navigator.userAgent);\r\n\r\nlet webp: boolean | undefined;\r\n\r\nexport const supportsWebP = () => {\r\n if (typeof webp !== \"undefined\") {\r\n return webp;\r\n }\r\n\r\n webp = getWebPSupport();\r\n return webp;\r\n};\r\n\r\nconst getWebPSupport = () =>\r\n document\r\n .createElement(\"canvas\")\r\n .toDataURL(\"image/webp\")\r\n .indexOf(\"data:image/webp\") == 0;\r\n\r\nexport const loadScript = (url: string, crossOrigin: string = \"\") => {\r\n if (document.querySelector(`script[src='${url}']`)) {\r\n return Promise.resolve();\r\n }\r\n return new Promise((resolve, reject) => {\r\n const script = document.createElement(\"script\");\r\n script.src = url;\r\n script.async = true;\r\n if (crossOrigin) {\r\n script.crossOrigin = crossOrigin;\r\n }\r\n script.onload = resolve;\r\n script.onerror = reject;\r\n document.body.appendChild(script);\r\n });\r\n};\r\n\r\nexport const loadCss = (url: string) => {\r\n if (document.querySelector(`link[href='${url}']`)) {\r\n return Promise.resolve();\r\n }\r\n return new Promise((resolve, reject) => {\r\n var head = document.getElementsByTagName(\"head\")[0];\r\n var link = document.createElement(\"link\");\r\n link.rel = \"stylesheet\";\r\n link.type = \"text/css\";\r\n link.href = url;\r\n link.media = \"all\";\r\n link.onload = resolve;\r\n link.onerror = reject;\r\n head.appendChild(link);\r\n });\r\n};\r\n"],"names":["$8fiwo","parcelRequire","$17fe2b3f8c4a3834$var$gliders","Array","$17fe2b3f8c4a3834$export$4d016e0fc76c33a1","target","$target","HTMLElement","$parcel$interopDefault","$4sYka","touchEvent","imageNavigation","element","product","find","on","e","$this","currentTarget","hasClass","navigateTo","index","thisId","closest","data","i","length","id","glider","scrollItem","setActiveButton","removeClass","eq","addClass","isModal","selectedIndex","$glider","glideSlide","glideLeft","each","width","margins","animate","scrollLeft","xDown","yDown","handleTouchStart","evt","firstTouch","touches","originalEvent","getTouches","clientX","clientY","handleTouchMove","xUp","yUp","xDiff","yDiff","Math","abs","getSelectedIndex","modalGlider","window","matchMedia","matches","modalNav","nav","document","querySelector","first","last","innerHTML","toString","backwards","productGlider","settings","ref","setTimeout","refresh","setActive","values","sections","querySelectorAll","observer","IntersectionObserver","entries","self","forEach","entry","isIntersecting","push","section","observe","touchMove","$leeC5","addEventListener","destroy","map","element1","$this1","floor","random","attr","productPageGlider","landingPageGlider","productDetailPageGlider","modalGliderNode","draggable","scrollLock","$eOe28","isIos","scrollLockDelay","dragVelocity","dots","rewind","itemWidth","arrows","prev","next","responsive","breakpoint","slidesToScroll","slidesToShow","g","addListener","modalLoading","gliderTrack","event","shownArrows","animateArrowVisibilitySmallScreen","not","touchStartThrottle","touchMoveThrottle","handleTouchStartThrottle","handleTouchMoveThrottle","stopImmediatePropagation","get","factory","_window","this","Glider","_","_glider","ele","classList","add","opt","Object","assign","resizeLock","duration","easing","x","t","b","c","d","animate_id","page","slide","_opt","skipTrack","track","children","createElement","appendChild","init","resize","bind","scroll","updateControls","gliderPrototype","prototype","paging","_1","height","slides","call","setAttribute","containerWidth","clientWidth","breakpointChanged","settingsBreakpoint","_autoSlide","slideCount","exactWidth","max","__","style","offsetHeight","trackWidth","isDrag","preventClick","scrollTo","bindArrows","buildDots","bindDrag","emit","mouse","handleMouse","mouseup","mouseDown","undefined","remove","events","mouseleave","mousedown","preventDefault","stopPropagation","mousemove","click","toggle","ceil","dot","dataset","className","direction","arrow","_func","keys","scrollPropagate","disableArrows","contains","round","middle","extraMiddle","slideClasses","wasVisible","start","end","itemStart","itemEnd","test","join","isVisible","clearTimeout","getCurrentSlide","originalSlide","min","value","type","resp","sort","a","size","innerWidth","scrollTarget","scrollDuration","callback","Date","getTime","animateIndex","now","requestAnimationFrame","removeItem","removeChild","addItem","double","inv","setOption","global","v","replace","cloneNode","clear","removeAttribute","outerHTML","getElementsByTagName","parentNode","replaceChild","name","arg","CustomEvent","bubbles","eventPropagate","detail","dispatchEvent","args","eventHandler","k","define","amd","module","exports","$f7463db15f187b9d$var$FUNC_ERROR_TEXT","$f7463db15f187b9d$var$reTrim","$f7463db15f187b9d$var$reIsBadHex","$f7463db15f187b9d$var$reIsBinary","$f7463db15f187b9d$var$reIsOctal","$f7463db15f187b9d$var$freeParseInt","parseInt","$f7463db15f187b9d$var$freeGlobal","$parcel$global","$f7463db15f187b9d$var$freeSelf","$f7463db15f187b9d$var$root","Function","$f7463db15f187b9d$var$objectToString","$f7463db15f187b9d$var$nativeMax","$f7463db15f187b9d$var$nativeMin","$f7463db15f187b9d$var$now","$f7463db15f187b9d$var$debounce","func","wait","options","lastArgs","lastThis","maxWait","result1","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","thisArg","apply","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","result","remainingWait","debounced","isInvoking","arguments","$f7463db15f187b9d$var$toNumber","$f7463db15f187b9d$var$isObject","cancel","flush","$f7463db15f187b9d$var$isObjectLike","$f7463db15f187b9d$var$isSymbol","other","valueOf","isBinary","slice","$eeb1221ea67d69d7$export$41a665f744414057","navigator","userAgent","match","MSStream","$eeb1221ea67d69d7$export$a11b0059900ceec8","$eeb1221ea67d69d7$export$b2fcdee8e6d02d24","$eeb1221ea67d69d7$var$webp","$eeb1221ea67d69d7$export$f11e265520c94ffe","$eeb1221ea67d69d7$var$getWebPSupport","toDataURL","indexOf","$eeb1221ea67d69d7$export$2cb99e4be0dc4646","url","crossOrigin","Promise","resolve","reject","script","src","async","onload","onerror","body","$eeb1221ea67d69d7$export$82219ea58a717c3f","head","link","rel","href","media"],"version":3,"file":"glider.11da3d33.js.map"}