{"version":3,"sources":["ls.unveilhooks.js"],"names":["window","factory","globalInstall","lazySizes","removeEventListener","bind","document","module","_typeof","exports","require","addEventListener","bgLoad","regBgUrlEscape","uniqueUrls","addStyleScript","src","style","elem","createElement","insertElem","getElementsByTagName","rel","href","parentNode","insertBefore","url","cb","img","onload","onerror","complete","e","tmp","bg","poster","detail","instance","defaultPrevented","target","preload","getAttribute","cfg","requireJs","firesLoad","backgroundImage","test","JSON","stringify","fire"],"mappings":"+PAwBC,SAAUA,EAAQC,GACE,SAAhBC,IACHD,EAAQD,EAAOG,WACfH,EAAOI,oBAAoB,iBAAkBF,GAAe,GAG7DD,EAAUA,EAAQI,KAAK,KAAML,EAAQA,EAAOM,UAEvB,WAAjB,oBAAOC,OAAP,YAAAC,QAAOD,UAAsBA,OAAOE,QACvCR,EAAQS,QAAQ,cACNV,EAAOG,UACjBD,IAEAF,EAAOW,iBAAiB,iBAAkBT,GAAe,GAb1D,CAeCF,OAAQ,SAAUA,EAAQM,EAAUH,GAGrC,IAAIS,EAAQC,EACRC,EAAa,GAoFjB,SAASC,EAAeC,EAAKC,GAC5B,IAAIH,EAAWE,GAAf,CAGA,IAAIE,EAAOZ,EAASa,cAAcF,EAAQ,OAAS,UAC/CG,EAAad,EAASe,qBAAqB,UAAU,GAErDJ,GACHC,EAAKI,IAAM,aACXJ,EAAKK,KAAOP,GAEZE,EAAKF,IAAMA,EAEZF,EAAWE,IAAO,EAClBF,EAAWI,EAAKF,KAAOE,EAAKK,OAAQ,EACpCH,EAAWI,WAAWC,aAAaP,EAAME,IAjGtCd,EAASK,mBAGZC,EAAS,SAAUc,EAAKC,GACvB,IAAIC,EAAMtB,EAASa,cAAc,OACjCS,EAAIC,OAAS,WACZD,EAAIC,OAAS,KACbD,EAAIE,QAAU,KACdF,EAAM,KACND,KAEDC,EAAIE,QAAUF,EAAIC,OAElBD,EAAIZ,IAAMU,EAENE,GAAOA,EAAIG,UAAYH,EAAIC,QAC9BD,EAAIC,UAINlB,iBAAiB,mBAAoB,SAAUqB,GAG9C,IAAIC,EAAWC,EAAIC,EAFfH,EAAEI,OAAOC,UAAYlC,IAGpB6B,EAAEM,mBAEkB,QAApBN,EAAEO,OAAOC,UACZR,EAAEO,OAAOC,QAAU,SAGpBP,EAAMD,EAAEO,OAAOE,aAAa,eAE3B1B,EAAekB,GAAK,IAIrBA,EAAMD,EAAEO,OAAOE,aAAa,iBAE3B1B,EAAekB,IAIhBA,EAAMD,EAAEO,OAAOE,aAAa,mBAEvBtC,EAAUuC,IAAIC,UACjBxC,EAAUuC,IAAIC,UAAU,CAACV,IAEzBlB,EAAekB,KAKjBC,EAAKF,EAAEO,OAAOE,aAAa,cAE1BT,EAAEI,OAAOQ,WAAY,EAOrBhC,EAAOsB,EANA,WACNF,EAAEO,OAAOtB,MAAM4B,gBAAkB,QAAUhC,EAAeiC,KAAKZ,GAAMa,KAAKC,UAAUd,GAAMA,GAAM,IAChGF,EAAEI,OAAOQ,WAAY,EACrBzC,EAAU8C,KAAKjB,EAAEO,OAAQ,cAAe,IAAI,GAAM,OAOpDJ,EAASH,EAAEO,OAAOE,aAAa,kBAE9BT,EAAEI,OAAOQ,WAAY,EAOrBhC,EAAOuB,EANA,WACNH,EAAEO,OAAOJ,OAASA,EAClBH,EAAEI,OAAOQ,WAAY,EACrBzC,EAAU8C,KAAKjB,EAAEO,OAAQ,cAAe,IAAI,GAAM,WAtEtD1B,EAAiB","file":"../vendor.min.js","sourcesContent":["/*\nThis plugin extends lazySizes to lazyLoad:\nbackground images, videos/posters and scripts\n\nBackground-Image:\nFor background images, use data-bg attribute:\n
\n\n Video:\n For video/audio use data-poster and preload=\"none\":\n \n\n Scripts:\n For scripts use data-script:\n
\n\n\n Script modules using require:\n For modules using require use data-require:\n
\n*/\n\n(function (window, factory) {\n\tvar globalInstall = function () {\n\t\tfactory(window.lazySizes);\n\t\twindow.removeEventListener('lazyunveilread', globalInstall, true);\n\t};\n\n\tfactory = factory.bind(null, window, window.document);\n\n\tif (typeof module == 'object' && module.exports) {\n\t\tfactory(require('lazysizes'));\n\t} else if (window.lazySizes) {\n\t\tglobalInstall();\n\t} else {\n\t\twindow.addEventListener('lazyunveilread', globalInstall, true);\n\t}\n}(window, function (window, document, lazySizes) {\n\t/*jshint eqnull:true */\n\t'use strict';\n\tvar bgLoad, regBgUrlEscape;\n\tvar uniqueUrls = {};\n\n\tif (document.addEventListener) {\n\t\tregBgUrlEscape = /\\(|\\)|\\s|'/;\n\n\t\tbgLoad = function (url, cb) {\n\t\t\tvar img = document.createElement('img');\n\t\t\timg.onload = function () {\n\t\t\t\timg.onload = null;\n\t\t\t\timg.onerror = null;\n\t\t\t\timg = null;\n\t\t\t\tcb();\n\t\t\t};\n\t\t\timg.onerror = img.onload;\n\n\t\t\timg.src = url;\n\n\t\t\tif (img && img.complete && img.onload) {\n\t\t\t\timg.onload();\n\t\t\t}\n\t\t};\n\n\t\taddEventListener('lazybeforeunveil', function (e) {\n\t\t\tif (e.detail.instance != lazySizes) { return; }\n\n\t\t\tvar tmp, load, bg, poster;\n\t\t\tif (!e.defaultPrevented) {\n\n\t\t\t\tif (e.target.preload == 'none') {\n\t\t\t\t\te.target.preload = 'auto';\n\t\t\t\t}\n\n\t\t\t\ttmp = e.target.getAttribute('data-link');\n\t\t\t\tif (tmp) {\n\t\t\t\t\taddStyleScript(tmp, true);\n\t\t\t\t}\n\n\t\t\t\t// handle data-script\n\t\t\t\ttmp = e.target.getAttribute('data-script');\n\t\t\t\tif (tmp) {\n\t\t\t\t\taddStyleScript(tmp);\n\t\t\t\t}\n\n\t\t\t\t// handle data-require\n\t\t\t\ttmp = e.target.getAttribute('data-require');\n\t\t\t\tif (tmp) {\n\t\t\t\t\tif (lazySizes.cfg.requireJs) {\n\t\t\t\t\t\tlazySizes.cfg.requireJs([tmp]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddStyleScript(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// handle data-bg\n\t\t\t\tbg = e.target.getAttribute('data-bg');\n\t\t\t\tif (bg) {\n\t\t\t\t\te.detail.firesLoad = true;\n\t\t\t\t\tload = function () {\n\t\t\t\t\t\te.target.style.backgroundImage = 'url(' + (regBgUrlEscape.test(bg) ? JSON.stringify(bg) : bg) + ')';\n\t\t\t\t\t\te.detail.firesLoad = false;\n\t\t\t\t\t\tlazySizes.fire(e.target, '_lazyloaded', {}, true, true);\n\t\t\t\t\t};\n\n\t\t\t\t\tbgLoad(bg, load);\n\t\t\t\t}\n\n\t\t\t\t// handle data-poster\n\t\t\t\tposter = e.target.getAttribute('data-poster');\n\t\t\t\tif (poster) {\n\t\t\t\t\te.detail.firesLoad = true;\n\t\t\t\t\tload = function () {\n\t\t\t\t\t\te.target.poster = poster;\n\t\t\t\t\t\te.detail.firesLoad = false;\n\t\t\t\t\t\tlazySizes.fire(e.target, '_lazyloaded', {}, true, true);\n\t\t\t\t\t};\n\n\t\t\t\t\tbgLoad(poster, load);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}, false);\n\n\t}\n\n\tfunction addStyleScript(src, style) {\n\t\tif (uniqueUrls[src]) {\n\t\t\treturn;\n\t\t}\n\t\tvar elem = document.createElement(style ? 'link' : 'script');\n\t\tvar insertElem = document.getElementsByTagName('script')[0];\n\n\t\tif (style) {\n\t\t\telem.rel = 'stylesheet';\n\t\t\telem.href = src;\n\t\t} else {\n\t\t\telem.src = src;\n\t\t}\n\t\tuniqueUrls[src] = true;\n\t\tuniqueUrls[elem.src || elem.href] = true;\n\t\tinsertElem.parentNode.insertBefore(elem, insertElem);\n\t}\n}));\n"]}