{ "version": 3, "sources": ["../../FiberlineCommerce.Assets/node_modules/object-fit-images/dist/ofi.common-js.js", "../../FiberlineCommerce.Assets/node_modules/object-fit-videos/object-fit-videos.js", "../../FiberlineCommerce.Assets/node_modules/lazysizes/lazysizes.js", "../../FiberlineCommerce.Assets/styles/tailwind/tailwind.screens.js", "../../FiberlineCommerce.Assets/scripts/components/xCutOffsConfigurator.js", "../../FiberlineCommerce.Assets/scripts/components/xQuantitySpinner.js", "../../FiberlineCommerce.Assets/scripts/components/xAddToBasket.js", "../../FiberlineCommerce.Assets/scripts/components/xAsyncForm.js", "../../FiberlineCommerce.Assets/scripts/components/xDiscountCode.js", "../../FiberlineCommerce.Assets/scripts/components/xImageModal.js", "../../FiberlineCommerce.Assets/scripts/components/xFavorites.js", "../../FiberlineCommerce.Assets/scripts/components/xButtonState.js", "../../FiberlineCommerce.Assets/scripts/components/xChangePackagingProduct.js", "../../FiberlineCommerce.Assets/scripts/components/xPromoCode.js", "../../FiberlineCommerce.Assets/scripts/components/xMemberAddresses.js", "../../FiberlineCommerce.Assets/scripts/components/xContactForm.js", "../../FiberlineCommerce.Assets/scripts/index.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/raf.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/caf.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/extend.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/checkStorageValue.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/setLocalStorage.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/getSlideId.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/getBody.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/docElement.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/setFakeBody.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/resetFakeBody.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/calc.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/percentageLayout.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/mediaquerySupport.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/createStyleSheet.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/addCSSRule.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/removeCSSRule.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/getCssRulesLength.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/toDegree.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/getTouchDirection.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/forEach.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/classListSupport.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/hasClass.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/addClass.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/removeClass.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/hasAttr.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/getAttr.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/isNodeList.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/setAttrs.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/removeAttrs.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/arrayFromNodeList.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/hideElement.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/showElement.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/isVisible.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/whichProperty.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/has3DTransforms.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/getEndProperty.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/passiveOption.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/addEvents.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/removeEvents.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/events.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/helpers/jsTransform.js", "../../FiberlineCommerce.Assets/node_modules/tiny-slider/src/tiny-slider.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/types/options.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/l10n/default.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/utils/index.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/utils/dom.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/utils/formatting.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/utils/dates.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/utils/polyfills.js", "../../FiberlineCommerce.Assets/node_modules/flatpickr/dist/esm/index.js", "../../FiberlineCommerce.Assets/node_modules/alpinejs/dist/module.esm.js", "../../FiberlineCommerce.Assets/scripts/utils.js", "../../FiberlineCommerce.Assets/scripts/components/xOverflow.js", "../../FiberlineCommerce.Assets/scripts/components/xCheckout.js"], "sourcesContent": ["/*! npm.im/object-fit-images 3.2.4 */\n'use strict';\n\nvar OFI = 'bfred-it:object-fit-images';\nvar propRegex = /(object-fit|object-position)\\s*:\\s*([-.\\w\\s%]+)/g;\nvar testImg = typeof Image === 'undefined' ? {style: {'object-position': 1}} : new Image();\nvar supportsObjectFit = 'object-fit' in testImg.style;\nvar supportsObjectPosition = 'object-position' in testImg.style;\nvar supportsOFI = 'background-size' in testImg.style;\nvar supportsCurrentSrc = typeof testImg.currentSrc === 'string';\nvar nativeGetAttribute = testImg.getAttribute;\nvar nativeSetAttribute = testImg.setAttribute;\nvar autoModeEnabled = false;\n\nfunction createPlaceholder(w, h) {\n\treturn (\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='\" + w + \"' height='\" + h + \"'%3E%3C/svg%3E\");\n}\n\nfunction polyfillCurrentSrc(el) {\n\tif (el.srcset && !supportsCurrentSrc && window.picturefill) {\n\t\tvar pf = window.picturefill._;\n\t\t// parse srcset with picturefill where currentSrc isn't available\n\t\tif (!el[pf.ns] || !el[pf.ns].evaled) {\n\t\t\t// force synchronous srcset parsing\n\t\t\tpf.fillImg(el, {reselect: true});\n\t\t}\n\n\t\tif (!el[pf.ns].curSrc) {\n\t\t\t// force picturefill to parse srcset\n\t\t\tel[pf.ns].supported = false;\n\t\t\tpf.fillImg(el, {reselect: true});\n\t\t}\n\n\t\t// retrieve parsed currentSrc, if any\n\t\tel.currentSrc = el[pf.ns].curSrc || el.src;\n\t}\n}\n\nfunction getStyle(el) {\n\tvar style = getComputedStyle(el).fontFamily;\n\tvar parsed;\n\tvar props = {};\n\twhile ((parsed = propRegex.exec(style)) !== null) {\n\t\tprops[parsed[1]] = parsed[2];\n\t}\n\treturn props;\n}\n\nfunction setPlaceholder(img, width, height) {\n\t// Default: fill width, no height\n\tvar placeholder = createPlaceholder(width || 1, height || 0);\n\n\t// Only set placeholder if it's different\n\tif (nativeGetAttribute.call(img, 'src') !== placeholder) {\n\t\tnativeSetAttribute.call(img, 'src', placeholder);\n\t}\n}\n\nfunction onImageReady(img, callback) {\n\t// naturalWidth is only available when the image headers are loaded,\n\t// this loop will poll it every 100ms.\n\tif (img.naturalWidth) {\n\t\tcallback(img);\n\t} else {\n\t\tsetTimeout(onImageReady, 100, img, callback);\n\t}\n}\n\nfunction fixOne(el) {\n\tvar style = getStyle(el);\n\tvar ofi = el[OFI];\n\tstyle['object-fit'] = style['object-fit'] || 'fill'; // default value\n\n\t// Avoid running where unnecessary, unless OFI had already done its deed\n\tif (!ofi.img) {\n\t\t// fill is the default behavior so no action is necessary\n\t\tif (style['object-fit'] === 'fill') {\n\t\t\treturn;\n\t\t}\n\n\t\t// Where object-fit is supported and object-position isn't (Safari < 10)\n\t\tif (\n\t\t\t!ofi.skipTest && // unless user wants to apply regardless of browser support\n\t\t\tsupportsObjectFit && // if browser already supports object-fit\n\t\t\t!style['object-position'] // unless object-position is used\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// keep a clone in memory while resetting the original to a blank\n\tif (!ofi.img) {\n\t\tofi.img = new Image(el.width, el.height);\n\t\tofi.img.srcset = nativeGetAttribute.call(el, \"data-ofi-srcset\") || el.srcset;\n\t\tofi.img.src = nativeGetAttribute.call(el, \"data-ofi-src\") || el.src;\n\n\t\t// preserve for any future cloneNode calls\n\t\t// https://github.com/bfred-it/object-fit-images/issues/53\n\t\tnativeSetAttribute.call(el, \"data-ofi-src\", el.src);\n\t\tif (el.srcset) {\n\t\t\tnativeSetAttribute.call(el, \"data-ofi-srcset\", el.srcset);\n\t\t}\n\n\t\tsetPlaceholder(el, el.naturalWidth || el.width, el.naturalHeight || el.height);\n\n\t\t// remove srcset because it overrides src\n\t\tif (el.srcset) {\n\t\t\tel.srcset = '';\n\t\t}\n\t\ttry {\n\t\t\tkeepSrcUsable(el);\n\t\t} catch (err) {\n\t\t\tif (window.console) {\n\t\t\t\tconsole.warn('https://bit.ly/ofi-old-browser');\n\t\t\t}\n\t\t}\n\t}\n\n\tpolyfillCurrentSrc(ofi.img);\n\n\tel.style.backgroundImage = \"url(\\\"\" + ((ofi.img.currentSrc || ofi.img.src).replace(/\"/g, '\\\\\"')) + \"\\\")\";\n\tel.style.backgroundPosition = style['object-position'] || 'center';\n\tel.style.backgroundRepeat = 'no-repeat';\n\tel.style.backgroundOrigin = 'content-box';\n\n\tif (/scale-down/.test(style['object-fit'])) {\n\t\tonImageReady(ofi.img, function () {\n\t\t\tif (ofi.img.naturalWidth > el.width || ofi.img.naturalHeight > el.height) {\n\t\t\t\tel.style.backgroundSize = 'contain';\n\t\t\t} else {\n\t\t\t\tel.style.backgroundSize = 'auto';\n\t\t\t}\n\t\t});\n\t} else {\n\t\tel.style.backgroundSize = style['object-fit'].replace('none', 'auto').replace('fill', '100% 100%');\n\t}\n\n\tonImageReady(ofi.img, function (img) {\n\t\tsetPlaceholder(el, img.naturalWidth, img.naturalHeight);\n\t});\n}\n\nfunction keepSrcUsable(el) {\n\tvar descriptors = {\n\t\tget: function get(prop) {\n\t\t\treturn el[OFI].img[prop ? prop : 'src'];\n\t\t},\n\t\tset: function set(value, prop) {\n\t\t\tel[OFI].img[prop ? prop : 'src'] = value;\n\t\t\tnativeSetAttribute.call(el, (\"data-ofi-\" + prop), value); // preserve for any future cloneNode\n\t\t\tfixOne(el);\n\t\t\treturn value;\n\t\t}\n\t};\n\tObject.defineProperty(el, 'src', descriptors);\n\tObject.defineProperty(el, 'currentSrc', {\n\t\tget: function () { return descriptors.get('currentSrc'); }\n\t});\n\tObject.defineProperty(el, 'srcset', {\n\t\tget: function () { return descriptors.get('srcset'); },\n\t\tset: function (ss) { return descriptors.set(ss, 'srcset'); }\n\t});\n}\n\nfunction hijackAttributes() {\n\tfunction getOfiImageMaybe(el, name) {\n\t\treturn el[OFI] && el[OFI].img && (name === 'src' || name === 'srcset') ? el[OFI].img : el;\n\t}\n\tif (!supportsObjectPosition) {\n\t\tHTMLImageElement.prototype.getAttribute = function (name) {\n\t\t\treturn nativeGetAttribute.call(getOfiImageMaybe(this, name), name);\n\t\t};\n\n\t\tHTMLImageElement.prototype.setAttribute = function (name, value) {\n\t\t\treturn nativeSetAttribute.call(getOfiImageMaybe(this, name), name, String(value));\n\t\t};\n\t}\n}\n\nfunction fix(imgs, opts) {\n\tvar startAutoMode = !autoModeEnabled && !imgs;\n\topts = opts || {};\n\timgs = imgs || 'img';\n\n\tif ((supportsObjectPosition && !opts.skipTest) || !supportsOFI) {\n\t\treturn false;\n\t}\n\n\t// use imgs as a selector or just select all images\n\tif (imgs === 'img') {\n\t\timgs = document.getElementsByTagName('img');\n\t} else if (typeof imgs === 'string') {\n\t\timgs = document.querySelectorAll(imgs);\n\t} else if (!('length' in imgs)) {\n\t\timgs = [imgs];\n\t}\n\n\t// apply fix to all\n\tfor (var i = 0; i < imgs.length; i++) {\n\t\timgs[i][OFI] = imgs[i][OFI] || {\n\t\t\tskipTest: opts.skipTest\n\t\t};\n\t\tfixOne(imgs[i]);\n\t}\n\n\tif (startAutoMode) {\n\t\tdocument.body.addEventListener('load', function (e) {\n\t\t\tif (e.target.tagName === 'IMG') {\n\t\t\t\tfix(e.target, {\n\t\t\t\t\tskipTest: opts.skipTest\n\t\t\t\t});\n\t\t\t}\n\t\t}, true);\n\t\tautoModeEnabled = true;\n\t\timgs = 'img'; // reset to a generic selector for watchMQ\n\t}\n\n\t// if requested, watch media queries for object-fit change\n\tif (opts.watchMQ) {\n\t\twindow.addEventListener('resize', fix.bind(null, imgs, {\n\t\t\tskipTest: opts.skipTest\n\t\t}));\n\t}\n}\n\nfix.supportsObjectFit = supportsObjectFit;\nfix.supportsObjectPosition = supportsObjectPosition;\n\nhijackAttributes();\n\nmodule.exports = fix;\n", "/**\n * Object Fit Videos\n * Polyfill for object-fit and object-position CSS properties on video elements\n * Covers IE9, IE10, IE11, Edge, Safari <10\n *\n * Usage\n * In your CSS, add a special font-family tag for IE/Edge\n * video {\n * object-fit: cover;\n * font-family: 'object-fit: cover;';\n * }\n *\n * Before the closing body tag, or whenever the DOM is ready,\n * make the JavaScript call\n * objectFitVideos();\n *\n * All video elements with the special CSS property will be targeted\n *\n * @license MIT (https://opensource.org/licenses/MIT)\n * @author Todd Miller \n * @version 1.0.2\n * @changelog\n * 2016-08-19 - Adds object-position support.\n * 2016-08-19 - Add throttle function for more performant resize events\n * 2016-08-19 - Initial release with object-fit support, and\n * object-position default 'center'\n * 2016-10-14 - No longer relies on window load event, instead requires a specific\n * function call to initialize the videos for object fit and position.\n * 2016-11-28 - Support CommonJS environment, courtesy of @msorensson\n * 2016-12-05 - Refactors the throttling function to support IE\n * 2017-09-26 - Fix an issue with autplay not working on polyfilled videos\n * - Adds the capability to specify elements to polyfill,\n * instead of just checking every video element for the\n * CSS property. Slight performance gain in most usecases,\n * and a bigger gain in a few usecases.\n * 2017-10-24 - Add user agent check to enable polyfill for all Edge browsers.\n * object-fit is supported on Edge >= 16, but currently just for images.\n */\nvar objectFitVideos = function (videos) {\n 'use strict';\n\n var isEdge = navigator.userAgent.indexOf('Edge/') >= 0;\n\n var testImg = new Image(),\n supportsObjectFit = 'object-fit' in testImg.style && !isEdge,\n supportsObjectPosition = 'object-position' in testImg.style && !isEdge,\n propRegex = /(object-fit|object-position)\\s*:\\s*([-\\w\\s%]+)/g;\n\n if (!supportsObjectFit || !supportsObjectPosition) {\n initialize(videos);\n throttle('resize', 'optimizedResize');\n }\n\n /**\n * Parse the style and look for the special font-family tag\n * @param {object} $el The element to parse\n * @return {object} The font-family properties we're interested in\n */\n function getStyle ($el) {\n var style = getComputedStyle($el).fontFamily,\n parsed = null,\n props = {};\n\n while ((parsed = propRegex.exec(style)) !== null) {\n props[parsed[1]] = parsed[2];\n }\n\n if (props['object-position'])\n return parsePosition(props);\n\n return props;\n }\n\n /**\n * Initialize all the relevant video elements and get them fitted\n */\n function initialize (videos) {\n var index = -1;\n\n if (!videos) {\n // if no videos given, query all video elements\n videos = document.querySelectorAll('video');\n } else if (!('length' in videos)) {\n // convert to an array for proper looping if an array or NodeList\n // was not given\n videos = [videos];\n }\n\n while (videos[++index]) {\n var style = getStyle(videos[index]);\n\n // only do work if the property is on the element\n if (style['object-fit'] || style['object-position']) {\n // set the default values\n style['object-fit'] = style['object-fit'] || 'fill';\n fitIt(videos[index], style);\n }\n }\n }\n\n /**\n * Object Fit\n * @param {object} $el Element to fit\n * @return {object} The element's relevant properties\n */\n function fitIt ($el, style) {\n // fill is the default behavior, no action is necessary\n if (style['object-fit'] === 'fill')\n return;\n\n // convenience style properties on the source element\n var setCss = $el.style,\n getCss = window.getComputedStyle($el);\n\n // create and insert a wrapper element\n var $wrap = document.createElement('object-fit');\n $wrap.appendChild($el.parentNode.replaceChild($wrap, $el));\n\n // style the wrapper element to mostly match the source element\n var wrapCss = {\n height: '100%',\n width: '100%',\n boxSizing: 'content-box',\n display: 'inline-block',\n overflow: 'hidden'\n };\n\n 'backgroundColor backgroundImage borderColor borderStyle borderWidth bottom fontSize lineHeight left opacity margin position right top visibility'.replace(/\\w+/g, function (key) {\n wrapCss[key] = getCss[key];\n });\n\n for (var key in wrapCss)\n $wrap.style[key] = wrapCss[key];\n\n // give the source element some saner styles\n setCss.border = setCss.margin = setCss.padding = 0;\n setCss.display = 'block';\n setCss.opacity = 1;\n\n // set up the event handlers\n $el.addEventListener('loadedmetadata', doWork);\n window.addEventListener('optimizedResize', doWork);\n\n // we may have missed the loadedmetadata event, so if the video has loaded\n // enough data, just drop the event listener and execute\n if ($el.readyState >= 1) {\n $el.removeEventListener('loadedmetadata', doWork);\n doWork();\n }\n\n /**\n * Do the actual sizing. Math.\n * @methodOf fitIt\n */\n function doWork () {\n // the actual size and ratio of the video\n // we do this here, even though it doesn't change, because\n // at this point we can be sure the metadata has loaded\n var videoWidth = $el.videoWidth,\n videoHeight = $el.videoHeight,\n videoRatio = videoWidth / videoHeight;\n\n var wrapWidth = $wrap.clientWidth,\n wrapHeight = $wrap.clientHeight,\n wrapRatio = wrapWidth / wrapHeight;\n\n var newHeight = 0,\n newWidth = 0;\n setCss.marginLeft = setCss.marginTop = 0;\n\n // basically we do the opposite action for contain and cover,\n // depending on whether the video aspect ratio is less than or\n // greater than the wrapper's aspect ratio\n if (videoRatio < wrapRatio ?\n style['object-fit'] === 'contain' : style['object-fit'] === 'cover') {\n newHeight = wrapHeight * videoRatio;\n newWidth = wrapWidth / videoRatio;\n\n setCss.width = Math.round(newHeight) + 'px';\n setCss.height = wrapHeight + 'px';\n\n if (style['object-position-x'] === 'left')\n setCss.marginLeft = 0;\n else if (style['object-position-x'] === 'right')\n setCss.marginLeft = Math.round(wrapWidth - newHeight) + 'px';\n else\n setCss.marginLeft = Math.round((wrapWidth - newHeight) / 2) + 'px';\n } else {\n newWidth = wrapWidth / videoRatio;\n\n setCss.width = wrapWidth + 'px';\n setCss.height = Math.round(newWidth) + 'px';\n\n if (style['object-position-y'] === 'top')\n setCss.marginTop = 0;\n else if (style['object-position-y'] === 'bottom')\n setCss.marginTop = Math.round(wrapHeight - newWidth) + 'px';\n else\n setCss.marginTop = Math.round((wrapHeight - newWidth) / 2) + 'px';\n }\n\n // play the video if autoplay is set\n if ($el.autoplay)\n $el.play();\n }\n }\n\n /**\n * Split the object-position property into x and y position properties\n * @param {object} style Relevant element styles\n * @return {object} The style object with the added x and y props\n */\n function parsePosition (style) {\n if (~style['object-position'].indexOf('left'))\n style['object-position-x'] = 'left';\n else if (~style['object-position'].indexOf('right'))\n style['object-position-x'] = 'right';\n else\n style['object-position-x'] = 'center';\n\n if (~style['object-position'].indexOf('top'))\n style['object-position-y'] = 'top';\n else if (~style['object-position'].indexOf('bottom'))\n style['object-position-y'] = 'bottom';\n else\n style['object-position-y'] = 'center';\n\n return style;\n }\n\n /**\n * Throttle an event with RequestAnimationFrame API for better performance\n * @param {string} type The event to throttle\n * @param {string} name Custom event name to listen for\n * @param {object} obj Optional object to attach the event to\n */\n function throttle (type, name, obj) {\n obj = obj || window;\n var running = false,\n evt = null;\n\n // IE does not support the CustomEvent constructor\n // so if that fails do it the old way\n try {\n evt = new CustomEvent(name);\n } catch (e) {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n var func = function () {\n if (running) return;\n\n running = true;\n requestAnimationFrame(function () {\n obj.dispatchEvent(evt);\n running = false;\n });\n };\n\n obj.addEventListener(type, func);\n }\n};\n\nif (typeof module !== 'undefined' && typeof module.exports !== 'undefined')\n module.exports = objectFitVideos;\n", "(function(window, factory) {\n\tvar lazySizes = factory(window, window.document, Date);\n\twindow.lazySizes = lazySizes;\n\tif(typeof module == 'object' && module.exports){\n\t\tmodule.exports = lazySizes;\n\t}\n}(typeof window != 'undefined' ?\n window : {}, \n/**\n * import(\"./types/global\")\n * @typedef { import(\"./types/lazysizes-config\").LazySizesConfigPartial } LazySizesConfigPartial\n */\nfunction l(window, document, Date) { // Pass in the window Date function also for SSR because the Date class can be lost\n\t'use strict';\n\t/*jshint eqnull:true */\n\n\tvar lazysizes,\n\t\t/**\n\t\t * @type { LazySizesConfigPartial }\n\t\t */\n\t\tlazySizesCfg;\n\n\t(function(){\n\t\tvar prop;\n\n\t\tvar lazySizesDefaults = {\n\t\t\tlazyClass: 'lazyload',\n\t\t\tloadedClass: 'lazyloaded',\n\t\t\tloadingClass: 'lazyloading',\n\t\t\tpreloadClass: 'lazypreload',\n\t\t\terrorClass: 'lazyerror',\n\t\t\t//strictClass: 'lazystrict',\n\t\t\tautosizesClass: 'lazyautosizes',\n\t\t\tfastLoadedClass: 'ls-is-cached',\n\t\t\tiframeLoadMode: 0,\n\t\t\tsrcAttr: 'data-src',\n\t\t\tsrcsetAttr: 'data-srcset',\n\t\t\tsizesAttr: 'data-sizes',\n\t\t\t//preloadAfterLoad: false,\n\t\t\tminSize: 40,\n\t\t\tcustomMedia: {},\n\t\t\tinit: true,\n\t\t\texpFactor: 1.5,\n\t\t\thFac: 0.8,\n\t\t\tloadMode: 2,\n\t\t\tloadHidden: true,\n\t\t\tricTimeout: 0,\n\t\t\tthrottleDelay: 125,\n\t\t};\n\n\t\tlazySizesCfg = window.lazySizesConfig || window.lazysizesConfig || {};\n\n\t\tfor(prop in lazySizesDefaults){\n\t\t\tif(!(prop in lazySizesCfg)){\n\t\t\t\tlazySizesCfg[prop] = lazySizesDefaults[prop];\n\t\t\t}\n\t\t}\n\t})();\n\n\tif (!document || !document.getElementsByClassName) {\n\t\treturn {\n\t\t\tinit: function () {},\n\t\t\t/**\n\t\t\t * @type { LazySizesConfigPartial }\n\t\t\t */\n\t\t\tcfg: lazySizesCfg,\n\t\t\t/**\n\t\t\t * @type { true }\n\t\t\t */\n\t\t\tnoSupport: true,\n\t\t};\n\t}\n\n\tvar docElem = document.documentElement;\n\n\tvar supportPicture = window.HTMLPictureElement;\n\n\tvar _addEventListener = 'addEventListener';\n\n\tvar _getAttribute = 'getAttribute';\n\n\t/**\n\t * Update to bind to window because 'this' becomes null during SSR\n\t * builds.\n\t */\n\tvar addEventListener = window[_addEventListener].bind(window);\n\n\tvar setTimeout = window.setTimeout;\n\n\tvar requestAnimationFrame = window.requestAnimationFrame || setTimeout;\n\n\tvar requestIdleCallback = window.requestIdleCallback;\n\n\tvar regPicture = /^picture$/i;\n\n\tvar loadEvents = ['load', 'error', 'lazyincluded', '_lazyloaded'];\n\n\tvar regClassCache = {};\n\n\tvar forEach = Array.prototype.forEach;\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar hasClass = function(ele, cls) {\n\t\tif(!regClassCache[cls]){\n\t\t\tregClassCache[cls] = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n\t\t}\n\t\treturn regClassCache[cls].test(ele[_getAttribute]('class') || '') && regClassCache[cls];\n\t};\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar addClass = function(ele, cls) {\n\t\tif (!hasClass(ele, cls)){\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').trim() + ' ' + cls);\n\t\t}\n\t};\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar removeClass = function(ele, cls) {\n\t\tvar reg;\n\t\tif ((reg = hasClass(ele,cls))) {\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').replace(reg, ' '));\n\t\t}\n\t};\n\n\tvar addRemoveLoadEvents = function(dom, fn, add){\n\t\tvar action = add ? _addEventListener : 'removeEventListener';\n\t\tif(add){\n\t\t\taddRemoveLoadEvents(dom, fn);\n\t\t}\n\t\tloadEvents.forEach(function(evt){\n\t\t\tdom[action](evt, fn);\n\t\t});\n\t};\n\n\t/**\n\t * @param elem { Element }\n\t * @param name { string }\n\t * @param detail { any }\n\t * @param noBubbles { boolean }\n\t * @param noCancelable { boolean }\n\t * @returns { CustomEvent }\n\t */\n\tvar triggerEvent = function(elem, name, detail, noBubbles, noCancelable){\n\t\tvar event = document.createEvent('Event');\n\n\t\tif(!detail){\n\t\t\tdetail = {};\n\t\t}\n\n\t\tdetail.instance = lazysizes;\n\n\t\tevent.initEvent(name, !noBubbles, !noCancelable);\n\n\t\tevent.detail = detail;\n\n\t\telem.dispatchEvent(event);\n\t\treturn event;\n\t};\n\n\tvar updatePolyfill = function (el, full){\n\t\tvar polyfill;\n\t\tif( !supportPicture && ( polyfill = (window.picturefill || lazySizesCfg.pf) ) ){\n\t\t\tif(full && full.src && !el[_getAttribute]('srcset')){\n\t\t\t\tel.setAttribute('srcset', full.src);\n\t\t\t}\n\t\t\tpolyfill({reevaluate: true, elements: [el]});\n\t\t} else if(full && full.src){\n\t\t\tel.src = full.src;\n\t\t}\n\t};\n\n\tvar getCSS = function (elem, style){\n\t\treturn (getComputedStyle(elem, null) || {})[style];\n\t};\n\n\t/**\n\t *\n\t * @param elem { Element }\n\t * @param parent { Element }\n\t * @param [width] {number}\n\t * @returns {number}\n\t */\n\tvar getWidth = function(elem, parent, width){\n\t\twidth = width || elem.offsetWidth;\n\n\t\twhile(width < lazySizesCfg.minSize && parent && !elem._lazysizesWidth){\n\t\t\twidth = parent.offsetWidth;\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\treturn width;\n\t};\n\n\tvar rAF = (function(){\n\t\tvar running, waiting;\n\t\tvar firstFns = [];\n\t\tvar secondFns = [];\n\t\tvar fns = firstFns;\n\n\t\tvar run = function(){\n\t\t\tvar runFns = fns;\n\n\t\t\tfns = firstFns.length ? secondFns : firstFns;\n\n\t\t\trunning = true;\n\t\t\twaiting = false;\n\n\t\t\twhile(runFns.length){\n\t\t\t\trunFns.shift()();\n\t\t\t}\n\n\t\t\trunning = false;\n\t\t};\n\n\t\tvar rafBatch = function(fn, queue){\n\t\t\tif(running && !queue){\n\t\t\t\tfn.apply(this, arguments);\n\t\t\t} else {\n\t\t\t\tfns.push(fn);\n\n\t\t\t\tif(!waiting){\n\t\t\t\t\twaiting = true;\n\t\t\t\t\t(document.hidden ? setTimeout : requestAnimationFrame)(run);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\trafBatch._lsFlush = run;\n\n\t\treturn rafBatch;\n\t})();\n\n\tvar rAFIt = function(fn, simple){\n\t\treturn simple ?\n\t\t\tfunction() {\n\t\t\t\trAF(fn);\n\t\t\t} :\n\t\t\tfunction(){\n\t\t\t\tvar that = this;\n\t\t\t\tvar args = arguments;\n\t\t\t\trAF(function(){\n\t\t\t\t\tfn.apply(that, args);\n\t\t\t\t});\n\t\t\t}\n\t\t;\n\t};\n\n\tvar throttle = function(fn){\n\t\tvar running;\n\t\tvar lastTime = 0;\n\t\tvar gDelay = lazySizesCfg.throttleDelay;\n\t\tvar rICTimeout = lazySizesCfg.ricTimeout;\n\t\tvar run = function(){\n\t\t\trunning = false;\n\t\t\tlastTime = Date.now();\n\t\t\tfn();\n\t\t};\n\t\tvar idleCallback = requestIdleCallback && rICTimeout > 49 ?\n\t\t\tfunction(){\n\t\t\t\trequestIdleCallback(run, {timeout: rICTimeout});\n\n\t\t\t\tif(rICTimeout !== lazySizesCfg.ricTimeout){\n\t\t\t\t\trICTimeout = lazySizesCfg.ricTimeout;\n\t\t\t\t}\n\t\t\t} :\n\t\t\trAFIt(function(){\n\t\t\t\tsetTimeout(run);\n\t\t\t}, true)\n\t\t;\n\n\t\treturn function(isPriority){\n\t\t\tvar delay;\n\n\t\t\tif((isPriority = isPriority === true)){\n\t\t\t\trICTimeout = 33;\n\t\t\t}\n\n\t\t\tif(running){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trunning = true;\n\n\t\t\tdelay = gDelay - (Date.now() - lastTime);\n\n\t\t\tif(delay < 0){\n\t\t\t\tdelay = 0;\n\t\t\t}\n\n\t\t\tif(isPriority || delay < 9){\n\t\t\t\tidleCallback();\n\t\t\t} else {\n\t\t\t\tsetTimeout(idleCallback, delay);\n\t\t\t}\n\t\t};\n\t};\n\n\t//based on http://modernjavascript.blogspot.de/2013/08/building-better-debounce.html\n\tvar debounce = function(func) {\n\t\tvar timeout, timestamp;\n\t\tvar wait = 99;\n\t\tvar run = function(){\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tvar later = function() {\n\t\t\tvar last = Date.now() - timestamp;\n\n\t\t\tif (last < wait) {\n\t\t\t\tsetTimeout(later, wait - last);\n\t\t\t} else {\n\t\t\t\t(requestIdleCallback || run)(run);\n\t\t\t}\n\t\t};\n\n\t\treturn function() {\n\t\t\ttimestamp = Date.now();\n\n\t\t\tif (!timeout) {\n\t\t\t\ttimeout = setTimeout(later, wait);\n\t\t\t}\n\t\t};\n\t};\n\n\tvar loader = (function(){\n\t\tvar preloadElems, isCompleted, resetPreloadingTimer, loadMode, started;\n\n\t\tvar eLvW, elvH, eLtop, eLleft, eLright, eLbottom, isBodyHidden;\n\n\t\tvar regImg = /^img$/i;\n\t\tvar regIframe = /^iframe$/i;\n\n\t\tvar supportScroll = ('onscroll' in window) && !(/(gle|ing)bot/.test(navigator.userAgent));\n\n\t\tvar shrinkExpand = 0;\n\t\tvar currentExpand = 0;\n\n\t\tvar isLoading = 0;\n\t\tvar lowRuns = -1;\n\n\t\tvar resetPreloading = function(e){\n\t\t\tisLoading--;\n\t\t\tif(!e || isLoading < 0 || !e.target){\n\t\t\t\tisLoading = 0;\n\t\t\t}\n\t\t};\n\n\t\tvar isVisible = function (elem) {\n\t\t\tif (isBodyHidden == null) {\n\t\t\t\tisBodyHidden = getCSS(document.body, 'visibility') == 'hidden';\n\t\t\t}\n\n\t\t\treturn isBodyHidden || !(getCSS(elem.parentNode, 'visibility') == 'hidden' && getCSS(elem, 'visibility') == 'hidden');\n\t\t};\n\n\t\tvar isNestedVisible = function(elem, elemExpand){\n\t\t\tvar outerRect;\n\t\t\tvar parent = elem;\n\t\t\tvar visible = isVisible(elem);\n\n\t\t\teLtop -= elemExpand;\n\t\t\teLbottom += elemExpand;\n\t\t\teLleft -= elemExpand;\n\t\t\teLright += elemExpand;\n\n\t\t\twhile(visible && (parent = parent.offsetParent) && parent != document.body && parent != docElem){\n\t\t\t\tvisible = ((getCSS(parent, 'opacity') || 1) > 0);\n\n\t\t\t\tif(visible && getCSS(parent, 'overflow') != 'visible'){\n\t\t\t\t\touterRect = parent.getBoundingClientRect();\n\t\t\t\t\tvisible = eLright > outerRect.left &&\n\t\t\t\t\t\teLleft < outerRect.right &&\n\t\t\t\t\t\teLbottom > outerRect.top - 1 &&\n\t\t\t\t\t\teLtop < outerRect.bottom + 1\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn visible;\n\t\t};\n\n\t\tvar checkElements = function() {\n\t\t\tvar eLlen, i, rect, autoLoadElem, loadedSomething, elemExpand, elemNegativeExpand, elemExpandVal,\n\t\t\t\tbeforeExpandVal, defaultExpand, preloadExpand, hFac;\n\t\t\tvar lazyloadElems = lazysizes.elements;\n\n\t\t\tif((loadMode = lazySizesCfg.loadMode) && isLoading < 8 && (eLlen = lazyloadElems.length)){\n\n\t\t\t\ti = 0;\n\n\t\t\t\tlowRuns++;\n\n\t\t\t\tfor(; i < eLlen; i++){\n\n\t\t\t\t\tif(!lazyloadElems[i] || lazyloadElems[i]._lazyRace){continue;}\n\n\t\t\t\t\tif(!supportScroll || (lazysizes.prematureUnveil && lazysizes.prematureUnveil(lazyloadElems[i]))){unveilElement(lazyloadElems[i]);continue;}\n\n\t\t\t\t\tif(!(elemExpandVal = lazyloadElems[i][_getAttribute]('data-expand')) || !(elemExpand = elemExpandVal * 1)){\n\t\t\t\t\t\telemExpand = currentExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!defaultExpand) {\n\t\t\t\t\t\tdefaultExpand = (!lazySizesCfg.expand || lazySizesCfg.expand < 1) ?\n\t\t\t\t\t\t\tdocElem.clientHeight > 500 && docElem.clientWidth > 500 ? 500 : 370 :\n\t\t\t\t\t\t\tlazySizesCfg.expand;\n\n\t\t\t\t\t\tlazysizes._defEx = defaultExpand;\n\n\t\t\t\t\t\tpreloadExpand = defaultExpand * lazySizesCfg.expFactor;\n\t\t\t\t\t\thFac = lazySizesCfg.hFac;\n\t\t\t\t\t\tisBodyHidden = null;\n\n\t\t\t\t\t\tif(currentExpand < preloadExpand && isLoading < 1 && lowRuns > 2 && loadMode > 2 && !document.hidden){\n\t\t\t\t\t\t\tcurrentExpand = preloadExpand;\n\t\t\t\t\t\t\tlowRuns = 0;\n\t\t\t\t\t\t} else if(loadMode > 1 && lowRuns > 1 && isLoading < 6){\n\t\t\t\t\t\t\tcurrentExpand = defaultExpand;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentExpand = shrinkExpand;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(beforeExpandVal !== elemExpand){\n\t\t\t\t\t\teLvW = innerWidth + (elemExpand * hFac);\n\t\t\t\t\t\telvH = innerHeight + elemExpand;\n\t\t\t\t\t\telemNegativeExpand = elemExpand * -1;\n\t\t\t\t\t\tbeforeExpandVal = elemExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\trect = lazyloadElems[i].getBoundingClientRect();\n\n\t\t\t\t\tif ((eLbottom = rect.bottom) >= elemNegativeExpand &&\n\t\t\t\t\t\t(eLtop = rect.top) <= elvH &&\n\t\t\t\t\t\t(eLright = rect.right) >= elemNegativeExpand * hFac &&\n\t\t\t\t\t\t(eLleft = rect.left) <= eLvW &&\n\t\t\t\t\t\t(eLbottom || eLright || eLleft || eLtop) &&\n\t\t\t\t\t\t(lazySizesCfg.loadHidden || isVisible(lazyloadElems[i])) &&\n\t\t\t\t\t\t((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){\n\t\t\t\t\t\tunveilElement(lazyloadElems[i]);\n\t\t\t\t\t\tloadedSomething = true;\n\t\t\t\t\t\tif(isLoading > 9){break;}\n\t\t\t\t\t} else if(!loadedSomething && isCompleted && !autoLoadElem &&\n\t\t\t\t\t\tisLoading < 4 && lowRuns < 4 && loadMode > 2 &&\n\t\t\t\t\t\t(preloadElems[0] || lazySizesCfg.preloadAfterLoad) &&\n\t\t\t\t\t\t(preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr) != 'auto')))){\n\t\t\t\t\t\tautoLoadElem = preloadElems[0] || lazyloadElems[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(autoLoadElem && !loadedSomething){\n\t\t\t\t\tunveilElement(autoLoadElem);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar throttledCheckElements = throttle(checkElements);\n\n\t\tvar switchLoadingClass = function(e){\n\t\t\tvar elem = e.target;\n\n\t\t\tif (elem._lazyCache) {\n\t\t\t\tdelete elem._lazyCache;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresetPreloading(e);\n\t\t\taddClass(elem, lazySizesCfg.loadedClass);\n\t\t\tremoveClass(elem, lazySizesCfg.loadingClass);\n\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass);\n\t\t\ttriggerEvent(elem, 'lazyloaded');\n\t\t};\n\t\tvar rafedSwitchLoadingClass = rAFIt(switchLoadingClass);\n\t\tvar rafSwitchLoadingClass = function(e){\n\t\t\trafedSwitchLoadingClass({target: e.target});\n\t\t};\n\n\t\tvar changeIframeSrc = function(elem, src){\n\t\t\tvar loadMode = elem.getAttribute('data-load-mode') || lazySizesCfg.iframeLoadMode;\n\n\t\t\t// loadMode can be also a string!\n\t\t\tif (loadMode == 0) {\n\t\t\t\telem.contentWindow.location.replace(src);\n\t\t\t} else if (loadMode == 1) {\n\t\t\t\telem.src = src;\n\t\t\t}\n\t\t};\n\n\t\tvar handleSources = function(source){\n\t\t\tvar customMedia;\n\n\t\t\tvar sourceSrcset = source[_getAttribute](lazySizesCfg.srcsetAttr);\n\n\t\t\tif( (customMedia = lazySizesCfg.customMedia[source[_getAttribute]('data-media') || source[_getAttribute]('media')]) ){\n\t\t\t\tsource.setAttribute('media', customMedia);\n\t\t\t}\n\n\t\t\tif(sourceSrcset){\n\t\t\t\tsource.setAttribute('srcset', sourceSrcset);\n\t\t\t}\n\t\t};\n\n\t\tvar lazyUnveil = rAFIt(function (elem, detail, isAuto, sizes, isImg){\n\t\t\tvar src, srcset, parent, isPicture, event, firesLoad;\n\n\t\t\tif(!(event = triggerEvent(elem, 'lazybeforeunveil', detail)).defaultPrevented){\n\n\t\t\t\tif(sizes){\n\t\t\t\t\tif(isAuto){\n\t\t\t\t\t\taddClass(elem, lazySizesCfg.autosizesClass);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.setAttribute('sizes', sizes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsrcset = elem[_getAttribute](lazySizesCfg.srcsetAttr);\n\t\t\t\tsrc = elem[_getAttribute](lazySizesCfg.srcAttr);\n\n\t\t\t\tif(isImg) {\n\t\t\t\t\tparent = elem.parentNode;\n\t\t\t\t\tisPicture = parent && regPicture.test(parent.nodeName || '');\n\t\t\t\t}\n\n\t\t\t\tfiresLoad = detail.firesLoad || (('src' in elem) && (srcset || src || isPicture));\n\n\t\t\t\tevent = {target: elem};\n\n\t\t\t\taddClass(elem, lazySizesCfg.loadingClass);\n\n\t\t\t\tif(firesLoad){\n\t\t\t\t\tclearTimeout(resetPreloadingTimer);\n\t\t\t\t\tresetPreloadingTimer = setTimeout(resetPreloading, 2500);\n\t\t\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass, true);\n\t\t\t\t}\n\n\t\t\t\tif(isPicture){\n\t\t\t\t\tforEach.call(parent.getElementsByTagName('source'), handleSources);\n\t\t\t\t}\n\n\t\t\t\tif(srcset){\n\t\t\t\t\telem.setAttribute('srcset', srcset);\n\t\t\t\t} else if(src && !isPicture){\n\t\t\t\t\tif(regIframe.test(elem.nodeName)){\n\t\t\t\t\t\tchangeIframeSrc(elem, src);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.src = src;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isImg && (srcset || isPicture)){\n\t\t\t\t\tupdatePolyfill(elem, {src: src});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(elem._lazyRace){\n\t\t\t\tdelete elem._lazyRace;\n\t\t\t}\n\t\t\tremoveClass(elem, lazySizesCfg.lazyClass);\n\n\t\t\trAF(function(){\n\t\t\t\t// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)\n\t\t\t\tvar isLoaded = elem.complete && elem.naturalWidth > 1;\n\n\t\t\t\tif( !firesLoad || isLoaded){\n\t\t\t\t\tif (isLoaded) {\n\t\t\t\t\t\taddClass(elem, lazySizesCfg.fastLoadedClass);\n\t\t\t\t\t}\n\t\t\t\t\tswitchLoadingClass(event);\n\t\t\t\t\telem._lazyCache = true;\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif ('_lazyCache' in elem) {\n\t\t\t\t\t\t\tdelete elem._lazyCache;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 9);\n\t\t\t\t}\n\t\t\t\tif (elem.loading == 'lazy') {\n\t\t\t\t\tisLoading--;\n\t\t\t\t}\n\t\t\t}, true);\n\t\t});\n\n\t\t/**\n\t\t *\n\t\t * @param elem { Element }\n\t\t */\n\t\tvar unveilElement = function (elem){\n\t\t\tif (elem._lazyRace) {return;}\n\t\t\tvar detail;\n\n\t\t\tvar isImg = regImg.test(elem.nodeName);\n\n\t\t\t//allow using sizes=\"auto\", but don't use. it's invalid. Use data-sizes=\"auto\" or a valid value for sizes instead (i.e.: sizes=\"80vw\")\n\t\t\tvar sizes = isImg && (elem[_getAttribute](lazySizesCfg.sizesAttr) || elem[_getAttribute]('sizes'));\n\t\t\tvar isAuto = sizes == 'auto';\n\n\t\t\tif( (isAuto || !isCompleted) && isImg && (elem[_getAttribute]('src') || elem.srcset) && !elem.complete && !hasClass(elem, lazySizesCfg.errorClass) && hasClass(elem, lazySizesCfg.lazyClass)){return;}\n\n\t\t\tdetail = triggerEvent(elem, 'lazyunveilread').detail;\n\n\t\t\tif(isAuto){\n\t\t\t\t autoSizer.updateElem(elem, true, elem.offsetWidth);\n\t\t\t}\n\n\t\t\telem._lazyRace = true;\n\t\t\tisLoading++;\n\n\t\t\tlazyUnveil(elem, detail, isAuto, sizes, isImg);\n\t\t};\n\n\t\tvar afterScroll = debounce(function(){\n\t\t\tlazySizesCfg.loadMode = 3;\n\t\t\tthrottledCheckElements();\n\t\t});\n\n\t\tvar altLoadmodeScrollListner = function(){\n\t\t\tif(lazySizesCfg.loadMode == 3){\n\t\t\t\tlazySizesCfg.loadMode = 2;\n\t\t\t}\n\t\t\tafterScroll();\n\t\t};\n\n\t\tvar onload = function(){\n\t\t\tif(isCompleted){return;}\n\t\t\tif(Date.now() - started < 999){\n\t\t\t\tsetTimeout(onload, 999);\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\tisCompleted = true;\n\n\t\t\tlazySizesCfg.loadMode = 3;\n\n\t\t\tthrottledCheckElements();\n\n\t\t\taddEventListener('scroll', altLoadmodeScrollListner, true);\n\t\t};\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tstarted = Date.now();\n\n\t\t\t\tlazysizes.elements = document.getElementsByClassName(lazySizesCfg.lazyClass);\n\t\t\t\tpreloadElems = document.getElementsByClassName(lazySizesCfg.lazyClass + ' ' + lazySizesCfg.preloadClass);\n\n\t\t\t\taddEventListener('scroll', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('resize', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('pageshow', function (e) {\n\t\t\t\t\tif (e.persisted) {\n\t\t\t\t\t\tvar loadingElements = document.querySelectorAll('.' + lazySizesCfg.loadingClass);\n\n\t\t\t\t\t\tif (loadingElements.length && loadingElements.forEach) {\n\t\t\t\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\t\t\t\tloadingElements.forEach( function (img) {\n\t\t\t\t\t\t\t\t\tif (img.complete) {\n\t\t\t\t\t\t\t\t\t\tunveilElement(img);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif(window.MutationObserver){\n\t\t\t\t\tnew MutationObserver( throttledCheckElements ).observe( docElem, {childList: true, subtree: true, attributes: true} );\n\t\t\t\t} else {\n\t\t\t\t\tdocElem[_addEventListener]('DOMNodeInserted', throttledCheckElements, true);\n\t\t\t\t\tdocElem[_addEventListener]('DOMAttrModified', throttledCheckElements, true);\n\t\t\t\t\tsetInterval(throttledCheckElements, 999);\n\t\t\t\t}\n\n\t\t\t\taddEventListener('hashchange', throttledCheckElements, true);\n\n\t\t\t\t//, 'fullscreenchange'\n\t\t\t\t['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend'].forEach(function(name){\n\t\t\t\t\tdocument[_addEventListener](name, throttledCheckElements, true);\n\t\t\t\t});\n\n\t\t\t\tif((/d$|^c/.test(document.readyState))){\n\t\t\t\t\tonload();\n\t\t\t\t} else {\n\t\t\t\t\taddEventListener('load', onload);\n\t\t\t\t\tdocument[_addEventListener]('DOMContentLoaded', throttledCheckElements);\n\t\t\t\t\tsetTimeout(onload, 20000);\n\t\t\t\t}\n\n\t\t\t\tif(lazysizes.elements.length){\n\t\t\t\t\tcheckElements();\n\t\t\t\t\trAF._lsFlush();\n\t\t\t\t} else {\n\t\t\t\t\tthrottledCheckElements();\n\t\t\t\t}\n\t\t\t},\n\t\t\tcheckElems: throttledCheckElements,\n\t\t\tunveil: unveilElement,\n\t\t\t_aLSL: altLoadmodeScrollListner,\n\t\t};\n\t})();\n\n\n\tvar autoSizer = (function(){\n\t\tvar autosizesElems;\n\n\t\tvar sizeElement = rAFIt(function(elem, parent, event, width){\n\t\t\tvar sources, i, len;\n\t\t\telem._lazysizesWidth = width;\n\t\t\twidth += 'px';\n\n\t\t\telem.setAttribute('sizes', width);\n\n\t\t\tif(regPicture.test(parent.nodeName || '')){\n\t\t\t\tsources = parent.getElementsByTagName('source');\n\t\t\t\tfor(i = 0, len = sources.length; i < len; i++){\n\t\t\t\t\tsources[i].setAttribute('sizes', width);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!event.detail.dataAttr){\n\t\t\t\tupdatePolyfill(elem, event.detail);\n\t\t\t}\n\t\t});\n\t\t/**\n\t\t *\n\t\t * @param elem {Element}\n\t\t * @param dataAttr\n\t\t * @param [width] { number }\n\t\t */\n\t\tvar getSizeElement = function (elem, dataAttr, width){\n\t\t\tvar event;\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif(parent){\n\t\t\t\twidth = getWidth(elem, parent, width);\n\t\t\t\tevent = triggerEvent(elem, 'lazybeforesizes', {width: width, dataAttr: !!dataAttr});\n\n\t\t\t\tif(!event.defaultPrevented){\n\t\t\t\t\twidth = event.detail.width;\n\n\t\t\t\t\tif(width && width !== elem._lazysizesWidth){\n\t\t\t\t\t\tsizeElement(elem, parent, event, width);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar updateElementsSizes = function(){\n\t\t\tvar i;\n\t\t\tvar len = autosizesElems.length;\n\t\t\tif(len){\n\t\t\t\ti = 0;\n\n\t\t\t\tfor(; i < len; i++){\n\t\t\t\t\tgetSizeElement(autosizesElems[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar debouncedUpdateElementsSizes = debounce(updateElementsSizes);\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tautosizesElems = document.getElementsByClassName(lazySizesCfg.autosizesClass);\n\t\t\t\taddEventListener('resize', debouncedUpdateElementsSizes);\n\t\t\t},\n\t\t\tcheckElems: debouncedUpdateElementsSizes,\n\t\t\tupdateElem: getSizeElement\n\t\t};\n\t})();\n\n\tvar init = function(){\n\t\tif(!init.i && document.getElementsByClassName){\n\t\t\tinit.i = true;\n\t\t\tautoSizer._();\n\t\t\tloader._();\n\t\t}\n\t};\n\n\tsetTimeout(function(){\n\t\tif(lazySizesCfg.init){\n\t\t\tinit();\n\t\t}\n\t});\n\n\tlazysizes = {\n\t\t/**\n\t\t * @type { LazySizesConfigPartial }\n\t\t */\n\t\tcfg: lazySizesCfg,\n\t\tautoSizer: autoSizer,\n\t\tloader: loader,\n\t\tinit: init,\n\t\tuP: updatePolyfill,\n\t\taC: addClass,\n\t\trC: removeClass,\n\t\thC: hasClass,\n\t\tfire: triggerEvent,\n\t\tgW: getWidth,\n\t\trAF: rAF,\n\t};\n\n\treturn lazysizes;\n}\n));\n", "module.exports = {\r\n\tscreens: {\r\n\t\t'xs': '375px',\r\n\t\t'sm': '36rem',\r\n\t\t'md': '48rem',\r\n\t\t'lg': '62rem',\r\n\t\t'xl': '90rem',\r\n\t\t'xxl': '100rem'\r\n\t}\r\n}\r\n", "module.exports = {\r\n xCutOffsConfigurator: function (config) {\r\n return {\r\n // props\r\n\t\t\tculture: config?.culture ?? 'en-GB',\r\n\t\t\tcutInTwo: false,\r\n currency: config?.currency ?? 'EUR',\r\n\t\t\thandlingFee: config?.handlingFee ?? 0.00,\r\n\t\t\tminCutLength: config?.productType == 'Custom' ? 1000 : config?.minCutLength ?? 0,\r\n\t\t\tmaxCutLength: config?.maxCutLength ?? 0,\r\n\t\t\tcustomLengthMinOrder: config?.customLengthMinOrder ?? 0,\r\n\t\t\tmaxTotalLength: config?.maxTotalLength,\r\n maxTolerance: config?.maxTolerance ?? 0,\r\n pricePerCut: config?.pricePerCut ?? 0.00,\r\n\t\t\tpricePerMeter: config?.pricePerMeter ?? 0.00,\r\n productPrice: config?.productPrice ?? 0.00,\r\n\t\t\tproductQuantity: config?.productQuantity ?? 1,\r\n\t\t\tproductStock: config?.productStock ?? 0,\r\n\t\t\ttolerance: config?.tolerance ?? '',\r\n\t\t\ttoleranceOptions: config?.toleranceOptions ?? [],\r\n\t\t\tallToleranceOptions: config?.allToleranceOptions ?? [],\r\n\t\t\tdefaultTolerance: config?.defaultTolerance,\r\n\t\t\tvatRate: config?.vatRate ?? 0.00,\r\n\t\t\tsawWidth: config?.sawWidth ?? 0,\r\n\t\t\tsku: config?.sku ?? '',\r\n\t\t\tproductType: config?.productType,\r\n\t\t\tbuttonState: '',\r\n\t\t\tapplyForMembershipUrl: config?.applyForMembershipUrl ?? '',\r\n\t\t\tisLoggedIn: config?.isLoggedIn ?? false,\r\n\t\t\tstandardOutletProductTypeAlias: 'StandardOutlet',\r\n\r\n // data\r\n cuts: config?.cuts ?? [],\r\n\t\t\trecycleWaste: `${config?.wasteIsRecycleable}` ?? '',\r\n\t\t\tshowRecycleWasteWarning: false,\r\n show: false,\r\n\t\t\tshowDetails: false,\r\n\r\n\t\t\tinit() {\r\n\t\t\t\tthis.$watch('show', () => this.show ? this.cutInTwo = false : \"\")\r\n\t\t\t},\r\n\r\n // computed values\r\n\t\t\tget serialized() {\r\n\t\t\t\tvar model = {\r\n\t\t\t\t\tSku: this.sku,\r\n\t\t\t\t\tLines: this.cuts.map(cut => {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tLength: cut.length,\r\n\t\t\t\t\t\t\tToleranceId: cut.toleranceId,\r\n\t\t\t\t\t\t\tQuantity: cut.quantity,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}),\r\n\t\t\t\t\tWasteIsRecycleable: this.isStandardOrOutlet ? this.recycleWaste : null,\r\n\t\t\t\t\tProductType: this.productType\r\n\t\t\t\t};\r\n\t\t\t\treturn JSON.stringify(model);\r\n\t\t\t},\r\n\t\t\tget isStandardOrOutlet(){\r\n\t\t\t\treturn this.productType == this.standardOutletProductTypeAlias;\r\n\t\t\t},\r\n\t\t\tget totalProductPrice() {\r\n\t\t\t\tif (this.isStandardOrOutlet) {\r\n\t\t\t\t\t// The customer only pays the productprice - no meter calculation\r\n\t\t\t\t\tlet realProductPrice = this.productPrice;\r\n\t\t\t\t\treturn this.productQuantity * realProductPrice;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// multiply the price by cut metres for 'made to order' C-sortiment products\r\n\t\t\t\t\tthis.handlingFee = 0;\r\n\t\t\t\t\tthis.pricePerCut = 0;\r\n\t\t\t\t\tlet priceFactor = this.minCutLength > 0 ? (this.totalCutsLength == 0 ? 0 : this.totalCutsLength / 1000) : 1;\r\n\t\t\t\t\tlet realProductPrice = this.productPrice * priceFactor;\r\n\t\t\t\t\treturn this.productQuantity * realProductPrice;\r\n\t\t\t\t}\r\n\t\t\t},\r\n get totalCuts () {\r\n\t\t\t\t//The most simple solution. Small edgecase where we would add 1 cut too many if the lengths of the cut match perfectly with the profile length\r\n let cutCount = 0;\r\n\t\t\t\tthis.cuts.map(cut => { cutCount += parseInt(cut.quantity) });\r\n return cutCount * this.productQuantity;\r\n },\r\n get totalCutPrice() {\r\n return this.pricePerCut * this.totalCuts;\r\n },\r\n get totalPrice() {\r\n return this.totalProductPrice + this.handlingFee + this.totalCutPrice;\r\n },\r\n get totalVat() {\r\n return this.totalPrice * this.vatRate;\r\n },\r\n get totalCutsLength() {\r\n var l = 0;\r\n this.cuts.map(cut => l = l + this.cutLength(cut));\r\n return l;\r\n }, \r\n\t\t\tget allCutsValid(){\r\n\t\t\t\tvar isCutsValid = this.isStandardOrOutlet && this.recycleWaste == '' ? false : true;\r\n\t\t\t\tthis.cuts.forEach(cut => {\r\n\t\t\t\t\tif(!this.cutIsValid(cut)){\r\n\t\t\t\t\t\tisCutsValid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tvar notTooLong = !this.cutsIsTooLong;\r\n\t\t\t\tvar notTooShort = !this.cutsIsTooShort;\r\n\t\t\t\t\r\n\r\n\t\t\t\treturn isCutsValid && notTooLong && notTooShort;\r\n\t\t\t},\r\n get cutsIsTooLong() {\r\n\t\t\t\tif(this.isStandardOrOutlet){\r\n\t\t\t\t\treturn this.totalCutsLength > this.maxTotalLength;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//Made to order (c-sortiment) has no upper limit for total length\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n \r\n\t\t\t},\r\n\t\t\tget displayMetersLeft(){\r\n\t\t\t\tvar mm = ((this.maxTotalLength - this.totalCutsLength) / 1000);\r\n\t\t\t\treturn this.displayDigits(mm);\r\n\t\t\t},\r\n\t\t\tget lengthLeft() {\r\n\t\t\t\tif (this.isStandardOrOutlet && this.totalCutsLength < this.maxTotalLength) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n get cutsIsTooShort() {\r\n\t\t\t\tif(this.isStandardOrOutlet){\r\n\t\t\t\t\t//Not sure if the total cut can be too short - the rest would just be waste - many 1 cut minimum?\r\n\t\t\t\t\treturn this.cuts.length <= 0;\r\n\t\t\t\t\t//return this.minCutLength > 0 && this.minCutLength > this.totalCutsLength;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t///Made to order (c-sortiment) has to meet this requirement \r\n\t\t\t\t\treturn this.missingTotalLength > 0;\r\n\t\t\t\t}\r\n \r\n },\r\n\t\t\tget missingTotalLength(){\r\n\t\t\t\t///Missing length for 'Made to order (c-sortiment)' is valid\r\n\t\t\t\treturn this.customLengthMinOrder - this.totalCutsLength\r\n\t\t\t},\r\n \r\n\r\n // methods\r\n\t\t\trecycleWasteIsValid: function (status) {\r\n\t\t\t\tif (this.isStandardOrOutlet && this.recycleWaste == '' && status === false) {\r\n\t\t\t\t\tthis.showRecycleWasteWarning = true\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.showRecycleWasteWarning = false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdisplayDigitsInMM: function (number) {\r\n\t\t\t\treturn new Intl.NumberFormat(this.culture, { minimumFractionDigits: 0, maximumFractionDigits: 0 }).format(number)\r\n\t\t\t},\r\n\t\t\tdisplayDigits: function (number) {\r\n\t\t\t\treturn new Intl.NumberFormat(this.culture, { minimumFractionDigits: 3, maximumFractionDigits: 3 }).format(number / 1000)\r\n\t\t\t},\r\n\t\t\tstepUp: function (input, dispatch) {\r\n\t\t\t\tinput.stepUp();\r\n\t\t\t\tthis.dispatchInput(input, dispatch);\r\n\t\t\t},\r\n\t\t\tstepDown: function (input, dispatch) {\r\n\t\t\t\tinput.stepDown();\r\n\t\t\t\tthis.dispatchInput(input, dispatch);\r\n\t\t\t},\r\n\t\t\tdispatchInput: function (input, dispatch) {\r\n\t\t\t\tdispatch(\"input\", input.value);\r\n\t\t\t},\r\n\t\t\ttoggleCut() {\r\n\t\t\t\tthis.show = this.show ? false : true;\r\n\r\n\t\t\t\tif (this.cuts.length == 0) {\r\n\t\t\t\t\tthis.addCut()\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tsetState($event) {\r\n\t\t\t\tthis.buttonState = $event.detail\r\n\t\t\t},\r\n\t\t\taddCut() {\r\n\t\t\t\tthis.show = true;\r\n this.cuts = this.cuts.concat([{\r\n\t\t\t\t\tlength: this.minCutLength,\r\n\t\t\t\t\ttoleranceId: this.defaultTolerance.internalId,\r\n quantity: 1\r\n\t\t\t\t}]);\r\n },\r\n addToCart() {\r\n // todo - what to do?\r\n alert(\"Todo - what to do? Cuts have been console.logged\");\r\n console.log({cuts: JSON.parse(JSON.stringify(this.cuts))});\r\n },\r\n\t\t\tformattedPrice(price) {\r\n\t\t\t\tvar anPrice = isNaN(parseFloat(price)) ? 0 : price;\r\n\t\t\t\treturn this.currency + \" \" + new Intl.NumberFormat(this.culture, { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(anPrice);\r\n },\r\n\t\t\tavailableLength(cut) {\r\n\t\t\t\tif (this.isStandardOrOutlet) {\r\n\t\t\t\t\tlet quantity = cut?.quantity ?? 1;\r\n\t\t\t\t\tlet length = this.maxCutLength == 0 ? 2147483647 : (this.maxCutLength - this.totalCutsLength + this.cutLength(cut));\r\n\t\t\t\t\tif (length == 0 || quantity == 0) return 0;\r\n\t\t\t\t\treturn length / quantity;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t},\r\n\t\t\tcutLength(cut) {\r\n\t\t\t\tif (cut) {\r\n\t\t\t\t\tvar baseLength = parseInt(cut.quantity) * parseInt(cut.length);\r\n\t\t\t\t\tif (this.isStandardOrOutlet) {\r\n\t\t\t\t\t\tvar tolerance = this.cutTolerance(cut);\r\n\t\t\t\t\t\treturn parseInt(cut.quantity) * (parseInt(cut.length) + (tolerance == undefined ? 0 : tolerance.maxValue) + this.sawWidth );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\treturn baseLength;\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\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcutIsValid(cut){\r\n\t\t\t\treturn cut.length <= this.maxCutLength && cut.length >= this.minCutLength;\r\n\t\t\t},\r\n\t\t\tcutTolerance(cut){\r\n\t\t\t\treturn this.allToleranceOptions.find(x=> x.internalId == cut.toleranceId);\r\n\t\t\t},\r\n\t\t\tcutToleranceDisplay(cut){\r\n\t\t\t\tvar t = this.cutTolerance(cut);\r\n\t\t\t\treturn t == undefined ? '' : t.display;\r\n\t\t\t},\r\n\t\t\tsetQuantity(cut, add) {\r\n cut.quantity = Math.max(1, parseInt(cut.quantity) + parseInt(add));\r\n\t\t\t},\r\n\t\t\tshowOverlay() {\r\n\t\t\t\tif (this.isLoggedIn == \"False\" && this.productType == \"Custom\") {\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n }\r\n}\r\n", "module.exports = {\r\n\txQuantitySpinner: () => {\r\n\t\treturn {\r\n\t\t\tstepUp: function (input, dispatch) {\r\n\t\t\t\tinput.stepUp();\r\n\t\t\t\tthis.dispatchInput(input, dispatch);\r\n\t\t\t},\r\n\t\t\tstepDown: function (input, dispatch) {\r\n\t\t\t\tinput.stepDown();\r\n\t\t\t\tthis.dispatchInput(input, dispatch);\r\n\t\t\t},\r\n\t\t\tdispatchInput: function (input, dispatch) {\r\n\t\t\t\tdispatch(\"input\", input.value);\r\n\t\t\t},\r\n\t\t\tspread: {\r\n\t\t\t\t['@submit.prevent']: 'submit'\r\n\t\t\t},\r\n\t\t\tdisabled: false,\r\n\t\t\tsubmitting: false,\r\n\t\t\tstock: 1,\r\n\t\t\tisVisible: function(el) {\r\n\t\t\t\treturn (el.offsetParent !== null)\r\n\t\t\t},\r\n\t\t\tsubmit: function () {\r\n\t\t\t\tif (!this.submitting) {\r\n\t\t\t\t\tvar element = this.$el.closest(\"form\");\r\n\t\t\t\t\tthis.submitting = true;\r\n\t\t\t\t\tlet body = new FormData(element);\r\n\r\n\t\t\t\t\tfetch(element.action, {\r\n\t\t\t\t\t\tbody,\r\n\t\t\t\t\t\tmethod: element.method\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => {\r\n\t\t\t\t\t\t\tif (response.status == 200) {\r\n\t\t\t\t\t\t\t\tresponse.text().then((s) => {\r\n\t\t\t\t\t\t\t\t\tlet wrapper = document.querySelector('#savedBasketWrapper')\r\n\t\t\t\t\t\t\t\t\tif (document.querySelector('#modalBasketContent') != null && this.isVisible(document.querySelector('#modalBasketContent'))) {\r\n\t\t\t\t\t\t\t\t\t\twrapper = document.querySelector('#modalBasketWrapper')\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (wrapper == null) {\r\n\t\t\t\t\t\t\t\t\t\twrapper = document.querySelector('#basketWrapper')\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (s == \"true\") {\r\n\t\t\t\t\t\t\t\t\t\tvar row = this.$el.closest(\"tr\");\r\n\t\t\t\t\t\t\t\t\t\trow.classList.add(\"!hidden\")\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\twrapper.innerHTML = s;\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\telse {\r\n\t\t\t\t\t\t\t\talert(\"failed increasing quantity\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.submitting = false;\r\n\t\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", "module.exports = {\r\n\txAddToBasket: (sku) => {\r\n\t\treturn {\r\n\t\t\tshowPromt: false,\r\n\t\t\torderTypeChosen: null,\r\n\t\t\tformSpread: {\r\n\t\t\t\t['@submit.prevent']: 'submit($dispatch)'\r\n\t\t\t},\r\n\t\t\tsubmitting: false,\r\n\t\t\tsubmit($dispatch) {\r\n\t\t\t\tif (this.showPromt && !this.orderTypeChosen) {\r\n\t\t\t\t}\r\n\t\t\t\telse if (!this.submitting) {\r\n\t\t\t\t\tthis.submitting = true\r\n\t\t\t\t\tlet body = new FormData(this.$el)\r\n\t\t\t\t\tif (body.has(\"form.CutOffsResponse\")) {\r\n\t\t\t\t\t\tlet cutOffs = JSON.parse(body.get(\"form.CutOffsResponse\"))\r\n\t\t\t\t\t\tbody.delete(\"form.CutOffsResponse\")\r\n\t\t\t\t\t\tObject.keys(cutOffs).map(key => {\r\n\t\t\t\t\t\t\tif (key !== \"Lines\") {\r\n\t\t\t\t\t\t\t\tbody.set(`form.CutOffsResponse.${key}`, cutOffs[key])\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t})\r\n\r\n\t\t\t\t\t\tcutOffs.Lines.map((line, i) => {\r\n\t\t\t\t\t\t\tObject.keys(line).map(key => {\r\n\t\t\t\t\t\t\t\tbody.set(`form.CutOffsResponse.Lines[${i}].${key}`, line[key])\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\r\n\t\t\t\t\tthis.changeState($dispatch, { sku, state: 'fetching' })\r\n\t\t\t\t\tfetch(this.$el.action, {\r\n\t\t\t\t\t\tbody,\r\n\t\t\t\t\t\tmethod: this.$el.method\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => {\r\n\t\t\t\t\t\t\tif (!response.ok) {\r\n\t\t\t\t\t\t\t\tthrow new Error('Network response was not ok');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn response.text()\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(data => {\r\n\t\t\t\t\t\t\tlet wrapper = document.querySelector('#modalBasketWrapper')\r\n\t\t\t\t\t\t\tif (wrapper == null) {\r\n\t\t\t\t\t\t\t\twrapper = document.querySelector('#basketWrapper')\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (document.querySelector(\"#savedBasketWrapper\") != null) {\r\n\t\t\t\t\t\t\t\twrapper = document.querySelector(\"#savedBasketWrapper\")\r\n\t\t\t\t\t\t\t\tdocument.body.classList.remove('overflow-hidden')\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (data !== \"success\") {\r\n\t\t\t\t\t\t\t\twrapper.innerHTML = data\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.changeState($dispatch, { sku, state: 'success' })\r\n\t\t\t\t\t\t\tthis.resetState($dispatch, sku)\r\n\r\n\t\t\t\t\t\t\t$dispatch('product-added', true)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.catch(error => {\r\n\t\t\t\t\t\t\tconsole.log(error)\r\n\r\n\t\t\t\t\t\t\tthis.changeState($dispatch, { sku, state: 'error' })\r\n\t\t\t\t\t\t\tthis.resetState($dispatch, sku)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tchangeState($dispatch, payload) {\r\n\t\t\t\t$dispatch(`change-state-${payload.sku.toLowerCase()}`, payload.state)\r\n\t\t\t},\r\n\t\t\tresetState($dispatch, sku) {\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.submitting = false\r\n\r\n\t\t\t\t\t$dispatch(`change-state-${sku.toLowerCase()}`, \"\")\r\n\t\t\t\t}, 1500)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "module.exports = {\r\n xAsyncForm: () => {\r\n return {\r\n submitting: false,\r\n open: false,\r\n \r\n submit: function submit(dispatch) {\r\n this.submitting = true\r\n setTimeout(() => {\r\n this.submitting = false\r\n this.open = false\r\n dispatch('body-lock', false)\r\n }, 1500)\r\n }\r\n }\r\n }\r\n}", "module.exports = {\r\n\txDiscountCode: () => {\r\n\t\treturn {\r\n\t\t\tshow: false,\r\n\t\t\tdiscountCodeList: [],\r\n\t\t\tdiscountInput: \"\",\r\n\t\t\topen() { return this.show = true },\r\n\t\t\tclose() { return this.show = false },\r\n\t\t\tisOpen() { return this.show === true },\r\n\t\t\taddDiscountCode() {\r\n\t\t\t\tif (/\\S/.test(this.discountInput) && this.discountCodeList.length === 0) {\r\n\t\t\t\t\tthis.discountCodeList.push(this.discountInput)\r\n\t\t\t\t\tthis.discountInput = \"\"\r\n\t\t\t\t\tthis.close()\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tremoveDiscountCode(index) {\r\n\t\t\t\tthis.discountCodeList = this.discountCodeList.filter((discountCode, discountCodeIndex) => index !== discountCodeIndex)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "module.exports = {\r\n\txImageModal: () => {\r\n\t\treturn {\r\n\t\t\tshow: false,\r\n\t\t\timageUrl: '',\r\n\t\t\topen() { return this.show = true },\r\n\t\t\tclose() { return this.show = false },\r\n\t\t\tisOpen() { return this.show === true },\r\n\t\t\topenModal(event, dispatch) {\r\n\t\t\t\tthis.imageUrl = event.currentTarget.src\r\n\t\t\t\tthis.open()\r\n\t\t\t\tdispatch('body-lock', true)\r\n\t\t\t},\r\n\t\t\tcloseModal(dispatch) {\r\n\t\t\t\tthis.imageUrl = ''\r\n\t\t\t\tthis.close()\r\n\t\t\t\tdispatch('body-lock', false)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "module.exports = {\r\n\txFavorites: () => {\r\n\t\treturn {\r\n\t\t\tsubmitting: false,\r\n\t\t\tadd() {\r\n\t\t\t\tif (!this.submitting) {\r\n\t\t\t\t\tthis.submitting = true\r\n\t\t\t\t\tthis.sku = this.$refs?.hiddenSku.value\r\n\r\n\t\t\t\t\tconst data = { \"Sku\": this.sku }\r\n\t\t\t\t\tfetch('/umbraco/surface/FavoritesSurface/CreateFavorites', {\r\n\t\t\t\t\t\tmethod: 'POST',\r\n\t\t\t\t\t\theaders: {\r\n\t\t\t\t\t\t\t'Content-Type': 'application/json',\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tbody: JSON.stringify(data),\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => response.json())\r\n\t\t\t\t\t\t.then(data => {\r\n\t\t\t\t\t\t\tthis.submitting = false\r\n\r\n\t\t\t\t\t\t\t// jens approved\r\n\t\t\t\t\t\t\tlocation.reload()\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.catch((error) => {\r\n\t\t\t\t\t\t\tconsole.error('post error', error)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tremove() {\r\n\t\t\t\tif (!this.submitting) {\r\n\t\t\t\t\tthis.submitting = true\r\n\t\t\t\t\tthis.id = this.$refs?.hiddenId.value\r\n\r\n\t\t\t\t\tconst data = { \"Id\": this.id }\r\n\t\t\t\t\tfetch('/umbraco/surface/FavoritesSurface/DeleteFavorites', {\r\n\t\t\t\t\t\tmethod: 'POST',\r\n\t\t\t\t\t\theaders: {\r\n\t\t\t\t\t\t\t'Content-Type': 'application/json',\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tbody: JSON.stringify(data),\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => response.json())\r\n\t\t\t\t\t\t.then(data => {\r\n\t\t\t\t\t\t\tthis.submitting = false\r\n\r\n\t\t\t\t\t\t\t// jens approved\r\n\t\t\t\t\t\t\tlocation.reload()\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.catch((error) => {\r\n\t\t\t\t\t\t\tconsole.error('post error', error)\r\n\t\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", "module.exports = {\r\n\txButtonState: () => {\r\n\t\treturn {\r\n\t\t\tbuttonState: \"\",\r\n\t\t\tdisabled: false,\r\n\t\t\tsetState($event) {\r\n\t\t\t\tthis.buttonState = $event.detail\r\n\t\t\t\tthis.disabled = this.buttonState == 'disabled' ? true : false\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "module.exports = {\r\n\txChangePackagingProduct: () => {\r\n\t\treturn {\r\n\t\t\tspread: {\r\n\t\t\t\t['@submit.prevent']: 'submit'\r\n\t\t\t},\r\n\t\t\tsubmitting: false,\r\n\t\t\tsubmit: function (event) {\r\n\t\t\t\tif (!this.submitting) {\r\n\t\t\t\t\tthis.submitting = true;\r\n\t\t\t\t\tlet body = new FormData(this.$el);\r\n\r\n\t\t\t\t\tfetch(this.$el.action, {\r\n\t\t\t\t\t\tbody,\r\n\t\t\t\t\t\tmethod: this.$el.method\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => {\r\n\t\t\t\t\t\t\tif (response.status == 200) {\r\n\t\t\t\t\t\t\t\tresponse.text().then((s) => {\r\n\t\t\t\t\t\t\t\t\tlet wrapper = document.querySelector('#basketWrapper');\r\n\t\t\t\t\t\t\t\t\twrapper.innerHTML = s;\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\telse {\r\n\t\t\t\t\t\t\t\talert(\"failed changed package\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.submitting = false;\r\n\t\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", "module.exports = {\r\n\txPromoCode: () => {\r\n\t\treturn {\r\n\t\t\tspread: {\r\n\t\t\t\t['@submit.prevent']: 'submit'\r\n\t\t\t},\r\n\t\t\tsubmitting: false,\r\n\t\t\tsubmit: function (event) {\r\n\t\t\t\tif (!this.submitting) {\r\n\t\t\t\t\tthis.submitting = true;\r\n\t\t\t\t\tlet body = new FormData(this.$el);\r\n\r\n\t\t\t\t\tfetch(this.$el.action, {\r\n\t\t\t\t\t\tbody,\r\n\t\t\t\t\t\tmethod: this.$el.method\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => {\r\n\t\t\t\t\t\t\tif (response.status == 200) {\r\n\t\t\t\t\t\t\t\tresponse.text().then((s) => {\r\n\t\t\t\t\t\t\t\t\tlet wrapper = document.querySelector('#basketWrapper');\r\n\t\t\t\t\t\t\t\t\twrapper.innerHTML = s;\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\telse {\r\n\t\t\t\t\t\t\t\talert(\"promocode failed\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.submitting = false;\r\n\t\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", "module.exports = {\r\n\txMemberAddresses: () => {\r\n\t\treturn {\r\n\t\t\tformSpread: {\r\n\t\t\t\t['x-on:submit.prevent']: 'submit($dispatch)'\r\n\t\t\t},\r\n\t\t\tsubmitting: false,\r\n\t\t\tsubmit() {\r\n\t\t\t\tconst $form = $(this.$el)\r\n\t\t\t\tif ($form.valid()) {\r\n\t\t\t\t\tthis.fetchView()\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tfetchView() {\r\n\t\t\t\tif (!this.submitting) {\r\n\t\t\t\t\tthis.submitting = true\r\n\r\n\t\t\t\t\tlet body = new FormData(this.$el)\r\n\r\n\t\t\t\t\tfetch(this.$el.action, {\r\n\t\t\t\t\t\tbody,\r\n\t\t\t\t\t\tmethod: this.$el.method\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => {\r\n\t\t\t\t\t\t\tif (!response.ok) {\r\n\t\t\t\t\t\t\t\tthrow new Error('Network response was not ok');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn response.text()\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(data => {\r\n\t\t\t\t\t\t\tlet wrapper = document.querySelector('#checkoutWrapper')\r\n\t\t\t\t\t\t\twrapper.innerHTML = data\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.catch(error => {\r\n\t\t\t\t\t\t\tconsole.log(error)\r\n\t\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", "module.exports = {\r\n\txContactForm: (id) => {\r\n\t\treturn {\r\n\t\t\tformSpread: {\r\n\t\t\t\t['@submit.prevent']: 'submit($dispatch)'\r\n\t\t\t},\r\n\t\t\tsubmitting: false,\r\n\t\t\tsubmit($dispatch) {\r\n\t\t\t\tconst $form = $(this.$el)\r\n\t\t\t\tif (!this.submitting && $form.valid()) {\r\n\t\t\t\t\tthis.submitting = true\r\n\t\t\t\t\tlet body = new FormData(this.$el)\r\n\r\n\t\t\t\t\tthis.changeState($dispatch, { id, state: 'fetching' })\r\n\t\t\t\t\tfetch(this.$el.action, {\r\n\t\t\t\t\t\tbody,\r\n\t\t\t\t\t\tmethod: this.$el.method\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(response => {\r\n\t\t\t\t\t\t\tif (!response.ok) {\r\n\t\t\t\t\t\t\t\tthrow new Error('Network response was not ok');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn response.text()\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\tthis.changeState($dispatch, { id, state: 'success' })\r\n\t\t\t\t\t\t\tthis.resetState($dispatch, id)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.catch(error => {\r\n\t\t\t\t\t\t\tconsole.log(error)\r\n\r\n\t\t\t\t\t\t\tthis.changeState($dispatch, { id, state: 'error' })\r\n\t\t\t\t\t\t\tthis.resetState($dispatch, id)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tchangeState($dispatch, payload) {\r\n\t\t\t\t$dispatch(`change-state-${payload.id.toLowerCase()}`, payload.state)\r\n\t\t\t},\r\n\t\t\tresetState($dispatch, id) {\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.submitting = false\r\n\r\n\t\t\t\t\tthis.$el.reset()\r\n\r\n\t\t\t\t\t$dispatch(`change-state-${id.toLowerCase()}`, \"\")\r\n\t\t\t\t}, 1500)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "/// #if env != 'production'\r\n/*GITNOCOMMIT*/\r\n/// #endif\r\n\r\n// Polyfills\r\nimport objectFitImages from \"object-fit-images\"\r\nimport objectFitVideos from \"object-fit-videos\"\r\n\r\nobjectFitImages()\r\nobjectFitVideos()\r\n\r\n// Other\r\nimport \"lazysizes\"\r\n\r\nimport { tns } from \"./../node_modules/tiny-slider/src/tiny-slider\"\r\nwindow.tns = tns\r\n\r\nimport flatpickr from \"flatpickr\"\r\nwindow.flatpickr = flatpickr\r\n\r\n// Based on: https://codepen.io/skttl/pen/abmWQbp\r\nimport { screens } from './../styles/tailwind/tailwind.screens'\r\nwindow.screens = {}\r\n\r\nObject.keys(screens).map(screen => {\r\n\tlet mm = window.matchMedia(`(min-width:${screens[screen]})`)\r\n\r\n\tmm.addListener(event =>\r\n\t\twindow.dispatchEvent(new CustomEvent('matchmedia', {\r\n\t\t\t'detail': {\r\n\t\t\t\t'screen': screen,\r\n\t\t\t\t'media': event.media,\r\n\t\t\t\t'matches': event.matches\r\n\t\t\t}\r\n\t\t}))\r\n\t)\r\n\r\n\twindow.screens[screen] = mm\r\n})\r\n\r\nimport Alpine from 'alpinejs'\r\nwindow.Alpine = Alpine\r\n//erstat med spruce\r\n//import './store'\r\n\r\n\r\n\r\nimport { xCutOffsConfigurator } from './components/xCutOffsConfigurator'\r\nwindow.xCutOffsConfigurator = xCutOffsConfigurator\r\n\r\nimport { xQuantitySpinner } from './components/xQuantitySpinner'\r\nwindow.xQuantitySpinner = xQuantitySpinner\r\n\r\nimport { xAddToBasket } from './components/xAddToBasket'\r\nwindow.xAddToBasket = xAddToBasket\r\n\r\nimport { xAsyncForm } from './components/xAsyncForm'\r\nwindow.xAsyncForm = xAsyncForm\r\n\r\nimport { xOverflow } from './components/xOverflow'\r\nwindow.xOverflow = xOverflow\r\n\r\nimport { xDiscountCode } from './components/xDiscountCode'\r\nwindow.xDiscountCode = xDiscountCode\r\n\r\nimport { xImageModal } from './components/xImageModal'\r\nwindow.xImageModal = xImageModal\r\n\r\nimport { xFavorites } from './components/xFavorites'\r\nwindow.xFavorites = xFavorites\r\n\r\nimport { xButtonState } from './components/xButtonState'\r\nwindow.xButtonState = xButtonState\r\n\r\nimport { xChangePackagingProduct } from './components/xChangePackagingProduct'\r\nwindow.xChangePackagingProduct = xChangePackagingProduct\r\n\r\nimport { xPromoCode } from './components/xPromoCode'\r\nwindow.xPromoCode = xPromoCode\r\n\r\nimport { xCheckout } from './components/xCheckout'\r\nwindow.xCheckout = xCheckout\r\n\r\nimport { xMemberAddresses } from './components/xMemberAddresses'\r\nwindow.xMemberAddresses = xMemberAddresses\r\n\r\nimport { xContactForm } from './components/xContactForm'\r\nwindow.xContactForm = xContactForm\r\n\r\nAlpine.start()\r\n", "var win = window;\n\nexport var raf = win.requestAnimationFrame\n || win.webkitRequestAnimationFrame\n || win.mozRequestAnimationFrame\n || win.msRequestAnimationFrame\n || function(cb) { return setTimeout(cb, 16); };\n", "var win = window;\n\nexport var caf = win.cancelAnimationFrame\n || win.mozCancelAnimationFrame\n || function(id){ clearTimeout(id); };\n", "export function extend() {\n var obj, name, copy,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length;\n\n for (; i < length; i++) {\n if ((obj = arguments[i]) !== null) {\n for (name in obj) {\n copy = obj[name];\n\n if (target === copy) {\n continue;\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n }\n return target;\n}", "export function checkStorageValue (value) {\n return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value;\n}", "export function setLocalStorage(storage, key, value, access) {\n if (access) {\n try { storage.setItem(key, value); } catch (e) {}\n }\n return value;\n}", "export function getSlideId() {\n var id = window.tnsId;\n window.tnsId = !id ? 1 : id + 1;\n \n return 'tns' + window.tnsId;\n}", "export function getBody () {\n var doc = document,\n body = doc.body;\n\n if (!body) {\n body = doc.createElement('body');\n body.fake = true;\n }\n\n return body;\n}", "export var docElement = document.documentElement;", "import { docElement } from './docElement.js';\n\nexport function setFakeBody (body) {\n var docOverflow = '';\n if (body.fake) {\n docOverflow = docElement.style.overflow;\n //avoid crashing IE8, if background image is used\n body.style.background = '';\n //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n body.style.overflow = docElement.style.overflow = 'hidden';\n docElement.appendChild(body);\n }\n\n return docOverflow;\n}", "import { docElement } from './docElement.js';\n\nexport function resetFakeBody (body, docOverflow) {\n if (body.fake) {\n body.remove();\n docElement.style.overflow = docOverflow;\n // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n // eslint-disable-next-line\n docElement.offsetHeight;\n }\n}", "// get css-calc \n// @return - false | calc | -webkit-calc | -moz-calc\n// @usage - var calc = getCalc(); \nimport { getBody } from './getBody.js';\nimport { setFakeBody } from './setFakeBody.js';\nimport { resetFakeBody } from './resetFakeBody.js';\n\nexport function calc() {\n var doc = document, \n body = getBody(),\n docOverflow = setFakeBody(body),\n div = doc.createElement('div'), \n result = false;\n\n body.appendChild(div);\n try {\n var str = '(10px * 10)',\n vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],\n val;\n for (var i = 0; i < 3; i++) {\n val = vals[i];\n div.style.width = val;\n if (div.offsetWidth === 100) { \n result = val.replace(str, ''); \n break;\n }\n }\n } catch (e) {}\n \n body.fake ? resetFakeBody(body, docOverflow) : div.remove();\n\n return result;\n}", "// get subpixel support value\n// @return - boolean\nimport { getBody } from './getBody.js';\nimport { setFakeBody } from './setFakeBody.js';\nimport { resetFakeBody } from './resetFakeBody.js';\n\nexport function percentageLayout() {\n // check subpixel layout supporting\n var doc = document,\n body = getBody(),\n docOverflow = setFakeBody(body),\n wrapper = doc.createElement('div'),\n outer = doc.createElement('div'),\n str = '',\n count = 70,\n perPage = 3,\n supported = false;\n\n wrapper.className = \"tns-t-subp2\";\n outer.className = \"tns-t-ct\";\n\n for (var i = 0; i < count; i++) {\n str += '
';\n }\n\n outer.innerHTML = str;\n wrapper.appendChild(outer);\n body.appendChild(wrapper);\n\n supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;\n\n body.fake ? resetFakeBody(body, docOverflow) : wrapper.remove();\n\n return supported;\n}", "import { getBody } from './getBody.js';\nimport { setFakeBody } from './setFakeBody.js';\nimport { resetFakeBody } from './resetFakeBody.js';\n\nexport function mediaquerySupport () {\n if (window.matchMedia || window.msMatchMedia) {\n return true;\n }\n \n var doc = document,\n body = getBody(),\n docOverflow = setFakeBody(body),\n div = doc.createElement('div'),\n style = doc.createElement('style'),\n rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',\n position;\n\n style.type = 'text/css';\n div.className = 'tns-mq-test';\n\n body.appendChild(style);\n body.appendChild(div);\n\n if (style.styleSheet) {\n style.styleSheet.cssText = rule;\n } else {\n style.appendChild(doc.createTextNode(rule));\n }\n\n position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];\n\n body.fake ? resetFakeBody(body, docOverflow) : div.remove();\n\n return position === \"absolute\";\n}\n", "// create and append style sheet\nexport function createStyleSheet (media, nonce) {\n // Create the