[
  {
    "path": ".editorconfig",
    "content": "# This file is for unifying the coding style for different editors and IDEs\n# editorconfig.org\n\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.{html}]\nindent_style = space\nindent_size = 4\n\n[*.{js, json, yml, css, md}]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".github/issue_template.md",
    "content": "Your issue may already be reported!\nPlease search on the [issue track](../) before creating one.\n\n## Expected Behavior\n<!--- If you're describing a bug, tell us what should happen -->\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\n\n## Current Behavior\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\n\n## Possible Solution\n<!--- Not obligatory, but suggest a fix/reason for the bug, -->\n<!--- or ideas how to implement the addition or change if you have -->\n\n## Steps to Reproduce (for bugs)\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\n<!--- reproduce this bug. Include code to reproduce, if relevant on Codepen -->\n1.\n2.\n3.\n\n## Context\n<!--- How has this issue affected you? What are you trying to accomplish? -->\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\n\n## Tested on:\n<!--- Include as many relevant details about the environment you experienced the bug in -->\n* Browser Name and version:\n* Operating System and version (desktop or mobile):"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\n.nyc_output\n.idea\n.DS_Store\nthumbs.db\n*.log*\ncoverage\n"
  },
  {
    "path": ".travis.yml",
    "content": "sudo: false\nlanguage: node_js\nnode_js:\n  - '8'\nscript:\n  - rm -rf node_modules\n  - npm install\n  - npm run build\n  - npm run test\n\ndeploy:\n  provider: npm\n  email: $NPM_EMAIL\n  api_key: $NPM_API_KEY\n  on:\n    tags: true\n  # make sure we keep our dist directory\n  skip_cleanup: true\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to lozad.js\n:sparkles:First off, thanks for taking the time to contribute!:sparkles:\n\nNow, take a moment to be sure your contributions make sense to everyone else.\nThese are just guidelines, not rules.\nUse your best judgment, and feel free to propose changes to this document in a pull request.\n\n## How can I contribute?\n\n### Using Lozad.js?\nShare with us, and we'll mention it on the project homepage. When adding site to the *list of sites using Lozad.js*, please mention where to verify this in the PR description.\n\n### Improve documentation\n\nAs a user of Lozad.js, you're the perfect candidate to help us improve our documentation. Typo corrections, error fixes, better explanations, more examples, etc. Open issues for things that could be improved. Anything. Even improvements to this document.\n\n### Improve issues\n\nSome issues are created with missing information, not reproducible, or plain invalid. Help make them easier to resolve. Handling issues takes a lot of time that we could rather spend on fixing bugs and adding features.\n\n### Give feedback on issues\n\nWe're always looking for more opinions on discussions in the issue tracker. It's a good opportunity to influence the future direction of Lozad.js\n\n## Reporting Issues\n\n- Found a problem? Want a new feature? First of all see if your issue or idea has [already been reported](https://github.com/ApoorvSaxena/lozad.js/issues).\n- If not, just open a [new clear and descriptive issue](https://github.com/ApoorvSaxena/lozad.js/issues/new).\n- Use a clear and descriptive title.\n- Include as much information as possible: Steps to reproduce the issue, error message, Browser version, operating system, etc.\n- The more time you put into an issue, the more we will.\n\n## Submitting pull requests\n\n- Non-trivial changes are often best discussed in an issue first, to prevent you from doing unnecessary work.\n- For ambitious tasks, you should try to get your work in front of the community for feedback as soon as possible. Open a pull request as soon as you have done the minimum needed to demonstrate your idea. At this early stage, don't worry about making things perfect, or 100% complete. Add a [WIP] prefix to the title, and describe what you still need to do. This lets reviewers know not to nit-pick small details or point out improvements you already know you need to make.\n- New features should be accompanied with tests and documentation.\n- Don't include unrelated changes.\n- Lint and test before submitting the pull request.\n- Make the pull request from a [topic branch](https://github.com/dchelimsky/rspec/wiki/Topic-Branches), not master.\n- Use a clear and descriptive title for the pull request and commits.\n- Write a convincing description of why we should land your pull request. It's your job to convince us. Answer \"why\" it's needed and provide use-cases.\n- You might be asked to do changes to your pull request. There's never a need to open another pull request. [Just update the existing one.](https://github.com/RichardLitt/docs/blob/master/amending-a-commit-guide.md)\n\n## Code Style\nFollow the [xo](https://github.com/sindresorhus/xo) style.\nUsing two spaces for identation and no [semicolons](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding).\n\n## Commit Message Emoji\n\nEvery commit is important.\nSo let's celebrate each and every commit with a corresponding emoji! :smile:\n\n### Which Emoji to Use? :confused:\n\nCommit Type | Emoji\n----------  | -------------\nInitial Commit | :tada: `:tada:`\nImprove the format/structure of the code | :art: `:art:`\nImproving performance | :racehorse: `:racehorse:`\nWriting docs | :memo: `:memo:`\nFix a bug | :bug: `:bug:`\nRemove code or files | :fire: `:fire:`\nFix CI build | :green_heart: `:green_heart:`\nDeal with security | :lock: `:lock:`\nUpgrade dependencies | :arrow_up: `:arrow_up:`\nDowngrading dependencies | :arrow_down: `:arrow_down:`\nAdd tests | :umbrella: `:umbrella:`\nImproving accessibility | :wheelchair: `:wheelchair:`\nAdd new features | :sparkles: `:sparkles:`\nRefactoring | :package: `:package:`\nOther | [Be creative](http://www.emoji-cheat-sheet.com/)\n\n## Scripts\nThe follow scripts are available when you develop.\n\n- `npm run lint` - Lint the files.\n- `npm run build` - Build the package.\n- `npm run test` - Test."
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2017 Apoorv Saxena\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# Lozad.js [![npm version](https://badge.fury.io/js/lozad.svg)](https://badge.fury.io/js/lozad) [![Build Status](https://travis-ci.org/ApoorvSaxena/lozad.js.svg?branch=master)](https://travis-ci.org/ApoorvSaxena/lozad.js) [![npm](https://img.shields.io/npm/dm/lozad)](https://www.npmjs.com/package/lozad) [![](https://data.jsdelivr.com/v1/package/npm/lozad/badge)](https://www.jsdelivr.com/package/npm/lozad)\n\n> Highly performant, light and configurable lazy loader in pure JS with no dependencies for images, iframes and more, using IntersectionObserver API\n\n![lozad.js lazy loading javascript library](./banner/lozad-banner.jpg \"lozad.js lazy loading javascript library\")\n\n**Lozad.js**:\n- lazy loads elements performantly using pure JavaScript,\n- is a light-weight library, just [![](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/lozad?compression=gzip)](https://cdn.jsdelivr.net/npm/lozad) minified & gzipped,\n- has NO DEPENDENCIES :)\n- allows lazy loading of dynamically added elements as well,\n- supports &lt;img&gt;, &lt;picture&gt;, iframes, videos, audios, responsive images, background images and multiple background images etc.\n- even supports LQIP (Low Quality Image Placeholder)\n- is completely free and open source.\n- it will reload when the valid attributes change.\n\nIt is written with an aim to lazy load images, iframes, ads, videos or any other element using the recently added [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) and [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) with tremendous performance benefits.\n\n## Featured in:\n\n- [Web | Google Developers](https://developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images-and-video/)\n- [Product Hunt](https://www.producthunt.com/posts/lozad-js)\n- [Reddit](https://www.reddit.com/r/webdev/comments/6zg1x0/highly_performant_light_05kb_and_configurable/)\n- [CSS Tricks](https://css-tricks.com/lozad-js-performant-lazy-loading-images)\n- [David Walsh](https://twitter.com/davidwalshblog/status/915319510646829061)\n- [Codrops](https://twitter.com/Apoorv_Saxena/status/906586828265758720)\n- [SitePoint](https://www.sitepoint.com/five-techniques-lazy-load-images-website-performance/)\n\n## Brands using Lozad.js:\n\n![Tesla](./brands/tesla.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![Binance](./brands/binance.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![Domino's](./brands/dominos.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n![BNP Paribas](./brands/bnp-paribas.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![Mi](./brands/xiaomi.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n![Amway](./brands/amway.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![TATA](./brands/tata.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![Verizon](./brands/verizon.svg)\n![Atlassian](./brands/atlassian.svg) ![BNP Paribas](./brands/livemint.svg)\n![JLM Couture](./brands/jlm-couture.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![New Balance](./brands/new-balance.png)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ![BBC](./brands/bbc.png)\n\nand many more...\n\n## Table of Contents\n\n- [Demo](https://apoorv.pro/lozad.js/demo/)\n- [Background](#yet-another-lazy-loading-javascript-library-why)\n- [Install](#install)\n- [Usage](#usage)\n- [Example with picture tag](#example-with-picture-tag)\n- [Browser Support](#browser-support)\n- [FAQs](#faqs)\n- [Contribute](#contribute)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Yet another Lazy Loading JavaScript library, why?\n\nExisting lazy loading libraries hook up to the scroll event or use a periodic timer and call `getBoundingClientRect()` on elements that need to be lazy loaded. This approach, however, is painfully slow as each call to `getBoundingClientRect()` forces the browser to re-layout the entire page and will introduce considerable jank to your website.\n\nMaking this more efficient and performant is what [IntersectionObserver](https://developers.google.com/web/updates/2016/04/intersectionobserver) is designed for, and it’s landed in Chrome 51. IntersectionObservers let you know when an observed element enters or exits the browser’s viewport.\n\n## Install\n\n```sh\n# You can install lozad with npm\n$ npm install --save lozad\n\n# Alternatively you can use Yarn\n$ yarn add lozad\n\n# Another option is to use Bower\n$ bower install lozad\n```\n\nThen with a module bundler like rollup or webpack, use as you would anything else:\n\n```javascript\n// using ES6 modules\nimport lozad from 'lozad'\n\n// using CommonJS modules\nvar lozad = require('lozad')\n```\n\nOr load via **CDN** and include in the `head` tag of your page.\n\n```html\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js\"></script>\n```\n\nWhen loading from CDN, you can find the library on `window.lozad`.\n\n---\n\n<a href=\"https://www.patreon.com/apoorvsaxena\">\n    <img src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\">\n</a>\n\n## Usage\n\nIn HTML, add an identifier to the element (default selector identified is `lozad` class):\n```html\n<img class=\"lozad\" data-src=\"image.png\">\n```\n\nAll you need to do now is just instantiate Lozad as follows:\n```js\nconst observer = lozad(); // lazy loads elements with default selector as '.lozad'\nobserver.observe();\n```\nor with a DOM `Element` reference:\n```js\nconst el = document.querySelector('img');\nconst observer = lozad(el); // passing a `NodeList` (e.g. `document.querySelectorAll()`) is also valid\nobserver.observe();\n```\nor with custom options:\n```js\nconst observer = lozad('.lozad', {\n    rootMargin: '10px 0px', // syntax similar to that of CSS Margin\n    threshold: 0.1, // ratio of element convergence\n    enableAutoReload: true // it will reload the new image when validating attributes changes\n});\nobserver.observe();\n```\nReference:\n\n - [IntersectionObserver options: rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)\n - [IntersectionObserver options: thresholds](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/thresholds)\n\nor if you want to give custom function definition to load element:\n```js\nlozad('.lozad', {\n    load: function(el) {\n        console.log('loading element');\n\n        // Custom implementation to load an element\n        // e.g. el.src = el.getAttribute('data-src');\n    }\n});\n```\n\nIf you would like to extend the `loaded` state of elements, you can add the loaded option:\n\n> **Note**: The `\"data-loaded\"=\"true\"` attribute is used by lozad to determine if an element has been previously loaded.\n```js\nlozad('.lozad', {\n    loaded: function(el) {\n        // Custom implementation on a loaded element\n        el.classList.add('loaded');\n    }\n});\n```\n\nIf you want to lazy load dynamically added elements:\n\n```js\nconst observer = lozad();\nobserver.observe();\n\n// ... code to dynamically add elements\nobserver.observe(); // observes newly added elements as well\n```\n\nfor use with responsive images\n\n```html\n<!-- responsive image example -->\n<img class=\"lozad\" data-src=\"image.png\" data-srcset=\"image.png 1000w, image-2x.png 2000w\">\n```\n\nfor use with background images\n```html\n<!-- background image example -->\n<div class=\"lozad\" data-background-image=\"image.png\">\n</div>\n```\n\nfor use with multiple background images\n```html\n<!-- multiple background image example -->\n<div class=\"lozad\" data-background-image=\"path/to/first/image,path/to/second/image,path/to/third/image\">\n</div>\n```\n\nfor use with responsive background images (image-set)\n```html\n<!-- responsive background image-set example -->\n<div class=\"lozad\" data-background-image-set=\"url('photo.jpg') 1x, url('photo@2x.jpg') 2x\">\n</div>\n```\n\nTo change the delimiter that splits background images:\n```html\n<!-- custom delimiter for background images example -->\n<div\n  class=\"lozad\"\n  data-background-image=\"/first/custom,image,path/image.png-/second/custom,image,path/image.png\"\n  data-background-delimiter=\"-\"\n>\n</div>\n```\n\nIf you want to load the images before they appear:\n\n```js\nconst observer = lozad();\nobserver.observe();\n\nconst coolImage = document.querySelector('.image-to-load-first');\n// ... trigger the load of a image before it appears on the viewport\nobserver.triggerLoad(coolImage);\n```\n\n### Large image improvment\n\nSometimes image loading takes a long time. For this case, you can add a placeholder background:\n\n```html\n<img class=\"lozad\" data-placeholder-background=\"red\" data-src=\"image.png\">\n```\n\nLozad sets a placeholder background color of img element and users will see the fallback till the image loads.\n\n## Example with picture tag\n\nCreate _a broken_ picture element structure.\n\n> IE browser don't support picture tag!\n> You need to set `data-iesrc` attribute (only for your picture tags) with source for IE browser\n\n> `data-alt` attribute can be added to picture tag for use in `alt` attribute of lazy-loaded images\n\n```html\n<!-- For an element to be caught, add a block type that is different from the inline and some min-height for correct caught into view -->\n<picture class=\"lozad\" style=\"display: block; min-height: 1rem\" data-iesrc=\"images/thumbs/04.jpg\" data-alt=\"\">\n    <source srcset=\"images/thumbs/04.jpg\" media=\"(min-width: 1280px)\">\n    <source srcset=\"images/thumbs/05.jpg\" media=\"(min-width: 980px)\">\n    <source srcset=\"images/thumbs/06.jpg\" media=\"(min-width: 320px)\">\n    <!-- NO img element -->\n    <!-- instead of img element, there will be the last source with the minimum dimensions -->\n    <!-- for disabled JS you can set <noscript><img src=\"images/thumbs/04.jpg\" alt=\"\"></noscript> -->\n</picture>\n```\n\nWhen _lozad_ loads this picture element, it will fix it.\n\nIf you want to use image placeholder (like low quality image placeholder), you can set a temporary `img` tag inside your `picture` tag. It will be removed when _lozad_ loads the picture element.\n\n```html\n<picture class=\"lozad\" style=\"display: block; min-height: 1rem\" data-iesrc=\"images/thumbs/04.jpg\" data-alt=\"\">\n    <source srcset=\"images/thumbs/04.jpg\" media=\"(min-width: 1280px)\">\n    <source srcset=\"images/thumbs/05.jpg\" media=\"(min-width: 980px)\">\n    <source srcset=\"images/thumbs/06.jpg\" media=\"(min-width: 320px)\">\n    <!-- you can define a low quality image placeholder that will be removed when the picture is loaded -->\n    <img src=\"data:image/jpeg;base64,/some_lqip_in_base_64==\">\n</picture>\n```\n\n## Example with video\n\n```html\n<video class=\"lozad\" data-poster=\"images/backgrounds/video-poster.jpeg\">\n    <source data-src=\"video/mov_bbb.mp4\" type=\"video/mp4\">\n    <source data-src=\"video/mov_bbb.ogg\" type=\"video/ogg\">\n</video>\n```\n\n## Example with iframe\n\n```html\n<iframe data-src=\"embed.html\" class=\"lozad\"></iframe>\n```\nThat's all, just add the `lozad` class.\n\n## Example toggling class\n\n```html\n<div data-toggle-class=\"active\" class=\"lozad\">\n    <!-- content -->\n</div>\n```\nThe `active` class will be toggled on the element when it enters the browser’s viewport.\n\n## Browser Support\n\nAvailable in [latest browsers](http://caniuse.com/#feat=intersectionobserver). If browser support is not available, then make use of [polyfill](https://www.npmjs.com/package/intersection-observer).\n\nFor IE11 support, please make use of these [polyfills](https://polyfill.io/v3/polyfill.min.js?flags=gated&features=Object.assign%2CIntersectionObserver).\n\n## FAQs\n\nCheckout the [FAQ Wiki](https://github.com/ApoorvSaxena/lozad.js/wiki/Frequently-Asked-Questions) for some common gotchas to be aware of while using **lozad.js**\n\n## Contribute\n\nInterested in contributing features and fixes?\n\n[Read more on contributing](./CONTRIBUTING.md).\n\n## Changelog\n\nSee the [Changelog](https://github.com/ApoorvSaxena/lozad.js/wiki/Changelog)\n\n## License\n\n[MIT](LICENSE) © [Apoorv Saxena](https://apoorv.pro)\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"lozad\",\n  \"description\": \"A light-weight JS library to lazy load any HTML element such as images, ads, videos etc.\",\n  \"main\": \"dist/lozad.js\",\n  \"author\": \"Apoorv Saxena\",\n  \"moduleType\": [\n    \"amd\",\n    \"globals\"\n  ],\n  \"ignore\": [\n    \"CONTRIBUTING.md\",\n    \"Gruntfile.js\"\n  ],\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"lazy\",\n    \"loader\",\n    \"lazyloader\",\n    \"lazyload\",\n    \"performance\",\n    \"image\",\n    \"video\",\n    \"iframe\",\n    \"ads\"\n  ],\n  \"version\": \"1.2.0\"\n}\n"
  },
  {
    "path": "demo/assets/css/ie8.css",
    "content": "/*\n\tMultiverse by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\n/* Button */\n\n\tinput[type=\"submit\"],\n\tinput[type=\"reset\"],\n\tinput[type=\"button\"],\n\tbutton,\n\t.button {\n\t\tborder: solid 2px #36383c;\n\t}\n\n\t\tinput[type=\"submit\"].special,\n\t\tinput[type=\"reset\"].special,\n\t\tinput[type=\"button\"].special,\n\t\tbutton.special,\n\t\t.button.special {\n\t\t\tborder: 0;\n\t\t}\n\n/* Panel */\n\n\t.panel {\n\t\tbackground: #242629;\n\t\tdisplay: none;\n\t}\n\n\t\t.panel.active {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t.panel > .closer:before {\n\t\t\tcontent: '\\00d7';\n\t\t\tfont-size: 42px;\n\t\t}\n\n/* Main */\n\n\t#main .thumb > h2 {\n\t\ttext-align: center;\n\t\twidth: 100%;\n\t\tleft: 0;\n\t}\n"
  },
  {
    "path": "demo/assets/css/ie9.css",
    "content": "/*\n\tMultiverse by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\n/* Panel */\n\n\t.panel > .inner.split:after {\n\t\tclear: both;\n\t\tcontent: '';\n\t\tdisplay: block;\n\t}\n\n\t.panel > .inner.split > div {\n\t\tfloat: left;\n\t\tmargin-left: 0;\n\t\tpadding-left: 0;\n\t}\n\n\t.panel > .inner.split > :first-child {\n\t\tpadding-left: 0;\n\t}\n\n/* Wrapper */\n\n\t#wrapper:before {\n\t\tdisplay: none;\n\t}\n\n/* Main */\n\n\t#main:after {\n\t\tclear: both;\n\t\tcontent: '';\n\t\tdisplay: block;\n\t}\n\n\t#main .thumb {\n\t\tfloat: left;\n\t}\n"
  },
  {
    "path": "demo/assets/css/main.css",
    "content": "/*\n\tMultiverse by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\n/* Reset */\n\nhtml, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n}\n\narticle, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {\n\tdisplay: block;\n}\n\nbody {\n\tline-height: 1;\n}\n\nol, ul {\n\tlist-style: none;\n}\n\nblockquote, q {\n\tquotes: none;\n}\n\nblockquote:before, blockquote:after, q:before, q:after {\n\tcontent: '';\n\tcontent: none;\n}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\nbody {\n\t-webkit-text-size-adjust: none;\n}\n\nimg {\n\twidth: 100%;\n\theight: 100%;\n}\n\n/* Box Model */\n\n*, *:before, *:after {\n\t-moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n\tbox-sizing: border-box;\n}\n\n@-moz-keyframes spinner {\n\t0% {\n\t\t-moz-transform: rotate(0deg);\n\t\t-webkit-transform: rotate(0deg);\n\t\t-ms-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t}\n\n\t100% {\n\t\t-moz-transform: rotate(359deg);\n\t\t-webkit-transform: rotate(359deg);\n\t\t-ms-transform: rotate(359deg);\n\t\ttransform: rotate(359deg);\n\t}\n}\n\n@-webkit-keyframes spinner {\n\t0% {\n\t\t-moz-transform: rotate(0deg);\n\t\t-webkit-transform: rotate(0deg);\n\t\t-ms-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t}\n\n\t100% {\n\t\t-moz-transform: rotate(359deg);\n\t\t-webkit-transform: rotate(359deg);\n\t\t-ms-transform: rotate(359deg);\n\t\ttransform: rotate(359deg);\n\t}\n}\n\n@-ms-keyframes spinner {\n\t0% {\n\t\t-moz-transform: rotate(0deg);\n\t\t-webkit-transform: rotate(0deg);\n\t\t-ms-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t}\n\n\t100% {\n\t\t-moz-transform: rotate(359deg);\n\t\t-webkit-transform: rotate(359deg);\n\t\t-ms-transform: rotate(359deg);\n\t\ttransform: rotate(359deg);\n\t}\n}\n\n@keyframes spinner {\n\t0% {\n\t\t-moz-transform: rotate(0deg);\n\t\t-webkit-transform: rotate(0deg);\n\t\t-ms-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t}\n\n\t100% {\n\t\t-moz-transform: rotate(359deg);\n\t\t-webkit-transform: rotate(359deg);\n\t\t-ms-transform: rotate(359deg);\n\t\ttransform: rotate(359deg);\n\t}\n}\n\n/* Basic */\n\n@-ms-viewport {\n\twidth: device-width;\n}\n\nbody {\n\t-ms-overflow-style: scrollbar;\n}\n\n@media screen and (max-width: 480px) {\n\thtml, body {\n\t\tmin-width: 320px;\n\t}\n}\n\nbody {\n\tbackground: #242629;\n}\n\nbody.loading *, body.loading *:before, body.loading *:after {\n\t-moz-animation: none !important;\n\t-webkit-animation: none !important;\n\t-ms-animation: none !important;\n\tanimation: none !important;\n\t-moz-transition: none !important;\n\t-webkit-transition: none !important;\n\t-ms-transition: none !important;\n\ttransition: none !important;\n}\n\nbody.resizing *, body.resizing *:before, body.resizing *:after {\n\t-moz-animation: none !important;\n\t-webkit-animation: none !important;\n\t-ms-animation: none !important;\n\tanimation: none !important;\n\t-moz-transition: none !important;\n\t-webkit-transition: none !important;\n\t-ms-transition: none !important;\n\ttransition: none !important;\n}\n\n/* Type */\n\nbody, input, select, textarea {\n\tcolor: #a0a0a1;\n\tfont-family: \"Source Sans Pro\", Helvetica, sans-serif;\n\tfont-size: 15pt;\n\tfont-weight: 300;\n\tletter-spacing: 0.025em;\n\tline-height: 1.65;\n}\n\n@media screen and (max-width: 1680px) {\n\tbody, input, select, textarea {\n\t\tfont-size: 11pt;\n\t}\n}\n\na {\n\t-moz-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;\n\t-webkit-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;\n\t-ms-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;\n\ttransition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;\n\tborder-bottom: dotted 1px;\n\tcolor: #34a58e;\n\ttext-decoration: none;\n}\n\na:hover {\n\tborder-bottom-color: transparent;\n\tcolor: #34a58e !important;\n}\n\nstrong, b {\n\tcolor: #ffffff;\n\tfont-weight: 300;\n}\n\nem, i {\n\tfont-style: italic;\n}\n\np {\n\tmargin: 0 0 2em 0;\n}\n\nh1, h2, h3, h4, h5, h6 {\n\tcolor: #ffffff;\n\tfont-weight: 300;\n\tletter-spacing: 0.1em;\n\tline-height: 1.5;\n\tmargin: 0 0 1em 0;\n\ttext-transform: uppercase;\n}\n\nh1 a, h2 a, h3 a, h4 a, h5 a, h6 a {\n\tcolor: inherit;\n\ttext-decoration: none;\n}\n\nh1 {\n\tfont-size: 2em;\n}\n\nh2 {\n\tfont-size: 1.25em;\n}\n\nh3 {\n\tfont-size: 1.1em;\n}\n\nh4 {\n\tfont-size: 1em;\n}\n\nh5 {\n\tfont-size: 0.9em;\n}\n\nh6 {\n\tfont-size: 0.7em;\n}\n\n@media screen and (max-width: 736px) {\n\th2 {\n\t\tfont-size: 1em;\n\t}\n\n\th3 {\n\t\tfont-size: 0.9em;\n\t}\n\n\th4 {\n\t\tfont-size: 0.8em;\n\t}\n\n\th5 {\n\t\tfont-size: 0.7em;\n\t}\n\n\th6 {\n\t\tfont-size: 0.7em;\n\t}\n}\n\nsub {\n\tfont-size: 0.8em;\n\tposition: relative;\n\ttop: 0.5em;\n}\n\nsup {\n\tfont-size: 0.8em;\n\tposition: relative;\n\ttop: -0.5em;\n}\n\nblockquote {\n\tborder-left: 4px #36383c;\n\tfont-style: italic;\n\tmargin: 0 0 2em 0;\n\tpadding: 0.5em 0 0.5em 2em;\n}\n\ncode {\n\tbackground: #34363b;\n\tborder: solid 1px #36383c;\n\tfont-family: \"Courier New\", monospace;\n\tfont-size: 0.9em;\n\tmargin: 0 0.25em;\n\tpadding: 0.25em 0.65em;\n}\n\npre {\n\t-webkit-overflow-scrolling: touch;\n\tfont-family: \"Courier New\", monospace;\n\tfont-size: 0.9em;\n\tmargin: 0 0 2em 0;\n}\n\npre code {\n\tdisplay: block;\n\tline-height: 1.75;\n\tpadding: 1em 1.5em;\n\toverflow-x: auto;\n}\n\nhr {\n\tborder: 0;\n\tborder-bottom: solid 1px #36383c;\n\tmargin: 2em 0;\n}\n\nhr.major {\n\tmargin: 3em 0;\n}\n\n.align-left {\n\ttext-align: left;\n}\n\n.align-center {\n\ttext-align: center;\n}\n\n.align-right {\n\ttext-align: right;\n}\n\n/* Wrapper */\n\n#wrapper {\n\t-moz-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -moz-filter 0.5s ease;\n\t-webkit-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -webkit-filter 0.5s ease;\n\t-ms-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -ms-filter 0.5s ease;\n\ttransition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, filter 0.5s ease;\n\tposition: relative;\n}\n\n#wrapper:after {\n\t-moz-pointer-events: none;\n\t-webkit-pointer-events: none;\n\t-ms-pointer-events: none;\n\tpointer-events: none;\n\t-moz-transition: opacity 0.5s ease, visibility 0.5s;\n\t-webkit-transition: opacity 0.5s ease, visibility 0.5s;\n\t-ms-transition: opacity 0.5s ease, visibility 0.5s;\n\ttransition: opacity 0.5s ease, visibility 0.5s;\n\tbackground: rgba(36, 38, 41, 0.5);\n\tcontent: '';\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\topacity: 0;\n\tposition: absolute;\n\ttop: 0;\n\tvisibility: hidden;\n\twidth: 100%;\n\tz-index: 1;\n}\n\nbody.ie #wrapper:after {\n\tbackground: rgba(36, 38, 41, 0.8);\n}\n\nbody.modal-active #wrapper {\n\t-moz-filter: blur(8px);\n\t-webkit-filter: blur(8px);\n\t-ms-filter: blur(8px);\n\tfilter: blur(8px);\n}\n\nbody.modal-active #wrapper:after {\n\t-moz-pointer-events: auto;\n\t-webkit-pointer-events: auto;\n\t-ms-pointer-events: auto;\n\tpointer-events: auto;\n\topacity: 1;\n\tvisibility: visible;\n\tz-index: 10003;\n}\n\n#wrapper:before {\n\t-moz-animation: spinner 1s infinite linear !important;\n\t-webkit-animation: spinner 1s infinite linear !important;\n\t-ms-animation: spinner 1s infinite linear !important;\n\tanimation: spinner 1s infinite linear !important;\n\t-moz-pointer-events: none;\n\t-webkit-pointer-events: none;\n\t-ms-pointer-events: none;\n\tpointer-events: none;\n\t-moz-transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s;\n\t-webkit-transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s;\n\t-ms-transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s;\n\ttransition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s;\n\tbackground-image: url(\"images/spinner.svg\");\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tbackground-size: contain;\n\tcontent: '';\n\tdisplay: block;\n\tfont-size: 2em;\n\theight: 2em;\n\tleft: 50%;\n\tline-height: 2em;\n\tmargin: -1em 0 0 -1em;\n\topacity: 0;\n\tposition: fixed;\n\ttext-align: center;\n\ttop: 75%;\n\tvisibility: hidden;\n\twidth: 2em;\n}\n\nbody.loading #wrapper:before {\n\t-moz-transition: opacity 1s ease-out !important;\n\t-webkit-transition: opacity 1s ease-out !important;\n\t-ms-transition: opacity 1s ease-out !important;\n\ttransition: opacity 1s ease-out !important;\n\t-moz-transition-delay: 0.5s !important;\n\t-webkit-transition-delay: 0.5s !important;\n\t-ms-transition-delay: 0.5s !important;\n\ttransition-delay: 0.5s !important;\n\topacity: 0.25;\n\ttop: 50%;\n\tvisibility: visible;\n}\n\n/* Header */\n\nbody {\n\tpadding: 0 0 4em 0;\n}\n\n#header {\n\t-moz-transform: translateY(0);\n\t-webkit-transform: translateY(0);\n\t-ms-transform: translateY(0);\n\ttransform: translateY(0);\n\t-moz-transition: -moz-transform 1s ease;\n\t-webkit-transition: -webkit-transform 1s ease;\n\t-ms-transition: -ms-transform 1s ease;\n\ttransition: transform 1s ease;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\t-webkit-user-select: none;\n\tbackground: #1f2224;\n\tbottom: -1em;\n\theight: 5em;\n\tleft: 0;\n\tline-height: 4em;\n\tpadding: 0 1.5em;\n\tposition: fixed;\n\tuser-select: none;\n\twidth: 100%;\n\tz-index: 10002;\n}\n\nbody.loading #header {\n\t-moz-transform: translateY(4em);\n\t-webkit-transform: translateY(4em);\n\t-ms-transform: translateY(4em);\n\ttransform: translateY(4em);\n}\n\n#header h1 {\n\tcolor: #a0a0a1;\n\tdisplay: inline-block;\n\tfont-size: 1em;\n\tline-height: 1;\n\tmargin: 0;\n\tvertical-align: middle;\n}\n\n#header h1 a {\n\tborder: 0;\n\tcolor: inherit;\n}\n\n#header h1 a:hover {\n\tcolor: inherit !important;\n}\n\n#header nav {\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n}\n\n#header nav > ul {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n#header nav > ul > li {\n\tdisplay: inline-block;\n\tpadding: 0;\n}\n\n#header nav > ul > li a {\n\t-moz-transition: background-color 0.5s ease;\n\t-webkit-transition: background-color 0.5s ease;\n\t-ms-transition: background-color 0.5s ease;\n\ttransition: background-color 0.5s ease;\n\tborder: 0;\n\tcolor: #ffffff;\n\tdisplay: inline-block;\n\tletter-spacing: 0.1em;\n\tpadding: 0 1.65em;\n\ttext-transform: uppercase;\n}\n\n#header nav > ul > li a.icon:before {\n\tcolor: #505051;\n\tfloat: right;\n\tmargin-left: 0.75em;\n}\n\n#header nav > ul > li a:hover {\n\tcolor: #ffffff !important;\n}\n\n#header nav > ul > li a.active {\n\tbackground-color: #242629;\n}\n\n@media screen and (max-width: 736px) {\n\tbody {\n\t\tpadding: 4em 0 0 0;\n\t}\n\n\t#header {\n\t\t-moz-transform: translateY(0);\n\t\t-webkit-transform: translateY(0);\n\t\t-ms-transform: translateY(0);\n\t\ttransform: translateY(0);\n\t\tbottom: auto;\n\t\theight: 4em;\n\t\tpadding: 0 1em;\n\t\ttop: 0;\n\t}\n\n\tbody.loading #header {\n\t\t-moz-transform: translateY(-3.4em);\n\t\t-webkit-transform: translateY(-3.4em);\n\t\t-ms-transform: translateY(-3.4em);\n\t\ttransform: translateY(-3.4em);\n\t}\n\n\t#header h1 {\n\t\tfont-size: 0.9em;\n\t}\n\n\t#header nav > ul > li a {\n\t\tfont-size: 0.9em;\n\t\tpadding: 0 1.15em;\n\t}\n}\n\n/* Main */\n\n#main, .sub-main {\n\t-moz-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -moz-filter 0.5s ease;\n\t-webkit-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -webkit-filter 0.5s ease;\n\t-ms-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -ms-filter 0.5s ease;\n\ttransition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, filter 0.5s ease;\n\tdisplay: -moz-flex;\n\tdisplay: -webkit-flex;\n\tdisplay: -ms-flex;\n\tdisplay: flex;\n\t-moz-flex-wrap: wrap;\n\t-webkit-flex-wrap: wrap;\n\t-ms-flex-wrap: wrap;\n\tflex-wrap: wrap;\n\t-webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n}\n\n#main .thumb {\n\t-moz-transition: opacity 1.25s ease-in-out;\n\t-webkit-transition: opacity 1.25s ease-in-out;\n\t-ms-transition: opacity 1.25s ease-in-out;\n\ttransition: opacity 1.25s ease-in-out;\n\t-moz-pointer-events: auto;\n\t-webkit-pointer-events: auto;\n\t-ms-pointer-events: auto;\n\tpointer-events: auto;\n\t-webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n\topacity: 1;\n\toverflow: hidden;\n\tposition: relative;\n}\n\n#main .thumb:after {\n\tbackground-image: -moz-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);\n\tbackground-image: -webkit-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);\n\tbackground-image: -ms-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);\n\tbackground-image: linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);\n\t-moz-pointer-events: none;\n\t-webkit-pointer-events: none;\n\t-ms-pointer-events: none;\n\tpointer-events: none;\n\tbackground-size: cover;\n\tcontent: '';\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n}\n\n#main .thumb > .image {\n\t-webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tbackground-size: cover;\n\tborder: 0;\n\theight: 100%;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n}\n\n#main .thumb > h2 {\n\t-moz-pointer-events: none;\n\t-webkit-pointer-events: none;\n\t-ms-pointer-events: none;\n\tpointer-events: none;\n\tbottom: 1.875em;\n\tfont-size: 0.8em;\n\tleft: 2.1875em;\n\tmargin: 0;\n\tposition: absolute;\n\tz-index: 1;\n}\n\n#main .thumb > p {\n\tdisplay: none;\n}\n\n#main:after {\n\t-moz-pointer-events: none;\n\t-webkit-pointer-events: none;\n\t-ms-pointer-events: none;\n\tpointer-events: none;\n\t-moz-transition: opacity 0.5s ease, visibility 0.5s;\n\t-webkit-transition: opacity 0.5s ease, visibility 0.5s;\n\t-ms-transition: opacity 0.5s ease, visibility 0.5s;\n\ttransition: opacity 0.5s ease, visibility 0.5s;\n\tbackground: rgba(36, 38, 41, 0.25);\n\tcontent: '';\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\topacity: 0;\n\tposition: absolute;\n\ttop: 0;\n\tvisibility: hidden;\n\twidth: 100%;\n\tz-index: 1;\n}\n\nbody.ie #main:after {\n\tbackground: rgba(36, 38, 41, 0.55);\n}\n\nbody.content-active #main {\n\t-moz-filter: blur(6px);\n\t-webkit-filter: blur(6px);\n\t-ms-filter: blur(6px);\n\tfilter: blur(6px);\n}\n\nbody.content-active #main:after {\n\t-moz-pointer-events: auto;\n\t-webkit-pointer-events: auto;\n\t-ms-pointer-events: auto;\n\tpointer-events: auto;\n\topacity: 1;\n\tvisibility: visible;\n}\n\nbody.loading #main .thumb {\n\t-moz-pointer-events: none;\n\t-webkit-pointer-events: none;\n\t-ms-pointer-events: none;\n\tpointer-events: none;\n\topacity: 0;\n}\n\n#main .thumb {\n\t-moz-transition-delay: 2.525s;\n\t-webkit-transition-delay: 2.525s;\n\t-ms-transition-delay: 2.525s;\n\ttransition-delay: 2.525s;\n\theight: calc(40vh - 2em);\n\tmin-height: 20em;\n\twidth: 25%;\n}\n\n#main .thumb:nth-child(1) {\n\t-moz-transition-delay: 0.65s;\n\t-webkit-transition-delay: 0.65s;\n\t-ms-transition-delay: 0.65s;\n\ttransition-delay: 0.65s;\n}\n\n#main .thumb:nth-child(2) {\n\t-moz-transition-delay: 0.8s;\n\t-webkit-transition-delay: 0.8s;\n\t-ms-transition-delay: 0.8s;\n\ttransition-delay: 0.8s;\n}\n\n#main .thumb:nth-child(3) {\n\t-moz-transition-delay: 0.95s;\n\t-webkit-transition-delay: 0.95s;\n\t-ms-transition-delay: 0.95s;\n\ttransition-delay: 0.95s;\n}\n\n#main .thumb:nth-child(4) {\n\t-moz-transition-delay: 1.1s;\n\t-webkit-transition-delay: 1.1s;\n\t-ms-transition-delay: 1.1s;\n\ttransition-delay: 1.1s;\n}\n\n#main .thumb:nth-child(5) {\n\t-moz-transition-delay: 1.25s;\n\t-webkit-transition-delay: 1.25s;\n\t-ms-transition-delay: 1.25s;\n\ttransition-delay: 1.25s;\n}\n\n#main .thumb:nth-child(6) {\n\t-moz-transition-delay: 1.4s;\n\t-webkit-transition-delay: 1.4s;\n\t-ms-transition-delay: 1.4s;\n\ttransition-delay: 1.4s;\n}\n\n#main .thumb:nth-child(7) {\n\t-moz-transition-delay: 1.55s;\n\t-webkit-transition-delay: 1.55s;\n\t-ms-transition-delay: 1.55s;\n\ttransition-delay: 1.55s;\n}\n\n#main .thumb:nth-child(8) {\n\t-moz-transition-delay: 1.7s;\n\t-webkit-transition-delay: 1.7s;\n\t-ms-transition-delay: 1.7s;\n\ttransition-delay: 1.7s;\n}\n\n#main .thumb:nth-child(9) {\n\t-moz-transition-delay: 1.85s;\n\t-webkit-transition-delay: 1.85s;\n\t-ms-transition-delay: 1.85s;\n\ttransition-delay: 1.85s;\n}\n\n#main .thumb:nth-child(10) {\n\t-moz-transition-delay: 2s;\n\t-webkit-transition-delay: 2s;\n\t-ms-transition-delay: 2s;\n\ttransition-delay: 2s;\n}\n\n#main .thumb:nth-child(11) {\n\t-moz-transition-delay: 2.15s;\n\t-webkit-transition-delay: 2.15s;\n\t-ms-transition-delay: 2.15s;\n\ttransition-delay: 2.15s;\n}\n\n#main .thumb:nth-child(12) {\n\t-moz-transition-delay: 2.3s;\n\t-webkit-transition-delay: 2.3s;\n\t-ms-transition-delay: 2.3s;\n\ttransition-delay: 2.3s;\n}\n\n/* Pictures */\n\n#pictures .screen {\n\tmin-height: 100vh;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-ms-flex-wrap: wrap;\n\tflex-wrap: wrap;\n\t-webkit-box-align: center;\n\t-ms-flex-align: center;\n\talign-items: center;\n\t-webkit-box-pack: center;\n\t-ms-flex-pack: center;\n\tjustify-content: center;\n}\n\n#pictures .picture {\n\tmax-width: 400px;\n\tmargin: 3rem;\n}\n\n/* Backgrounds */\n\n#backgrounds .screen {\n\tmin-height: 100vh;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-ms-flex-wrap: wrap;\n\tflex-wrap: wrap;\n\t-webkit-box-align: center;\n\t-ms-flex-align: center;\n\talign-items: center;\n\t-webkit-box-pack: center;\n\t-ms-flex-pack: center;\n\tjustify-content: center;\n}\n\n#backgrounds .background {\n\tmax-width: 400px;\n\tmargin: 3rem;\n}\n#backgrounds .lozad-background {\n\tdisplay: block;\n\tmin-height: 12rem;\n\tmin-width: 240px;\n\t\n\tbackground-size: contain;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50% 50%;\n}\n\n/* iframes & video */\n\n#iframe .frame, #video .frame {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-ms-flex-wrap: wrap;\n\tflex-wrap: wrap;\n\t-webkit-box-align: center;\n\t-ms-flex-align: center;\n\talign-items: center;\n\t-webkit-box-pack: center;\n\t-ms-flex-pack: center;\n\tjustify-content: center;\n\tmargin-bottom: 10vh;\n}\n.video-example{\n\tmargin: 0 15px;\n}\n@media screen and (max-width: 1680px) {\n\t#main .thumb {\n\t\t-moz-transition-delay: 2.075s;\n\t\t-webkit-transition-delay: 2.075s;\n\t\t-ms-transition-delay: 2.075s;\n\t\ttransition-delay: 2.075s;\n\t\theight: calc(40vh - 2em);\n\t\tmin-height: 20em;\n\t\twidth: 33.33333%;\n\t}\n\n\t#main .thumb:nth-child(1) {\n\t\t-moz-transition-delay: 0.65s;\n\t\t-webkit-transition-delay: 0.65s;\n\t\t-ms-transition-delay: 0.65s;\n\t\ttransition-delay: 0.65s;\n\t}\n\n\t#main .thumb:nth-child(2) {\n\t\t-moz-transition-delay: 0.8s;\n\t\t-webkit-transition-delay: 0.8s;\n\t\t-ms-transition-delay: 0.8s;\n\t\ttransition-delay: 0.8s;\n\t}\n\n\t#main .thumb:nth-child(3) {\n\t\t-moz-transition-delay: 0.95s;\n\t\t-webkit-transition-delay: 0.95s;\n\t\t-ms-transition-delay: 0.95s;\n\t\ttransition-delay: 0.95s;\n\t}\n\n\t#main .thumb:nth-child(4) {\n\t\t-moz-transition-delay: 1.1s;\n\t\t-webkit-transition-delay: 1.1s;\n\t\t-ms-transition-delay: 1.1s;\n\t\ttransition-delay: 1.1s;\n\t}\n\n\t#main .thumb:nth-child(5) {\n\t\t-moz-transition-delay: 1.25s;\n\t\t-webkit-transition-delay: 1.25s;\n\t\t-ms-transition-delay: 1.25s;\n\t\ttransition-delay: 1.25s;\n\t}\n\n\t#main .thumb:nth-child(6) {\n\t\t-moz-transition-delay: 1.4s;\n\t\t-webkit-transition-delay: 1.4s;\n\t\t-ms-transition-delay: 1.4s;\n\t\ttransition-delay: 1.4s;\n\t}\n\n\t#main .thumb:nth-child(7) {\n\t\t-moz-transition-delay: 1.55s;\n\t\t-webkit-transition-delay: 1.55s;\n\t\t-ms-transition-delay: 1.55s;\n\t\ttransition-delay: 1.55s;\n\t}\n\n\t#main .thumb:nth-child(8) {\n\t\t-moz-transition-delay: 1.7s;\n\t\t-webkit-transition-delay: 1.7s;\n\t\t-ms-transition-delay: 1.7s;\n\t\ttransition-delay: 1.7s;\n\t}\n\n\t#main .thumb:nth-child(9) {\n\t\t-moz-transition-delay: 1.85s;\n\t\t-webkit-transition-delay: 1.85s;\n\t\t-ms-transition-delay: 1.85s;\n\t\ttransition-delay: 1.85s;\n\t}\n}\n\n@media screen and (max-width: 1280px) {\n\t#main .thumb {\n\t\t-moz-transition-delay: 1.625s;\n\t\t-webkit-transition-delay: 1.625s;\n\t\t-ms-transition-delay: 1.625s;\n\t\ttransition-delay: 1.625s;\n\t\theight: calc(40vh - 2em);\n\t\tmin-height: 20em;\n\t\twidth: 50%;\n\t}\n\n\t#main .thumb:nth-child(1) {\n\t\t-moz-transition-delay: 0.65s;\n\t\t-webkit-transition-delay: 0.65s;\n\t\t-ms-transition-delay: 0.65s;\n\t\ttransition-delay: 0.65s;\n\t}\n\n\t#main .thumb:nth-child(2) {\n\t\t-moz-transition-delay: 0.8s;\n\t\t-webkit-transition-delay: 0.8s;\n\t\t-ms-transition-delay: 0.8s;\n\t\ttransition-delay: 0.8s;\n\t}\n\n\t#main .thumb:nth-child(3) {\n\t\t-moz-transition-delay: 0.95s;\n\t\t-webkit-transition-delay: 0.95s;\n\t\t-ms-transition-delay: 0.95s;\n\t\ttransition-delay: 0.95s;\n\t}\n\n\t#main .thumb:nth-child(4) {\n\t\t-moz-transition-delay: 1.1s;\n\t\t-webkit-transition-delay: 1.1s;\n\t\t-ms-transition-delay: 1.1s;\n\t\ttransition-delay: 1.1s;\n\t}\n\n\t#main .thumb:nth-child(5) {\n\t\t-moz-transition-delay: 1.25s;\n\t\t-webkit-transition-delay: 1.25s;\n\t\t-ms-transition-delay: 1.25s;\n\t\ttransition-delay: 1.25s;\n\t}\n\n\t#main .thumb:nth-child(6) {\n\t\t-moz-transition-delay: 1.4s;\n\t\t-webkit-transition-delay: 1.4s;\n\t\t-ms-transition-delay: 1.4s;\n\t\ttransition-delay: 1.4s;\n\t}\n}\n\n@media screen and (max-width: 980px) {\n\t#main .thumb {\n\t\t-moz-transition-delay: 2.075s;\n\t\t-webkit-transition-delay: 2.075s;\n\t\t-ms-transition-delay: 2.075s;\n\t\ttransition-delay: 2.075s;\n\t\theight: calc(28.57143vh - 1.33333em);\n\t\tmin-height: 18em;\n\t\twidth: 50%;\n\t}\n\n\t#main .thumb:nth-child(1) {\n\t\t-moz-transition-delay: 0.65s;\n\t\t-webkit-transition-delay: 0.65s;\n\t\t-ms-transition-delay: 0.65s;\n\t\ttransition-delay: 0.65s;\n\t}\n\n\t#main .thumb:nth-child(2) {\n\t\t-moz-transition-delay: 0.8s;\n\t\t-webkit-transition-delay: 0.8s;\n\t\t-ms-transition-delay: 0.8s;\n\t\ttransition-delay: 0.8s;\n\t}\n\n\t#main .thumb:nth-child(3) {\n\t\t-moz-transition-delay: 0.95s;\n\t\t-webkit-transition-delay: 0.95s;\n\t\t-ms-transition-delay: 0.95s;\n\t\ttransition-delay: 0.95s;\n\t}\n\n\t#main .thumb:nth-child(4) {\n\t\t-moz-transition-delay: 1.1s;\n\t\t-webkit-transition-delay: 1.1s;\n\t\t-ms-transition-delay: 1.1s;\n\t\ttransition-delay: 1.1s;\n\t}\n\n\t#main .thumb:nth-child(5) {\n\t\t-moz-transition-delay: 1.25s;\n\t\t-webkit-transition-delay: 1.25s;\n\t\t-ms-transition-delay: 1.25s;\n\t\ttransition-delay: 1.25s;\n\t}\n\n\t#main .thumb:nth-child(6) {\n\t\t-moz-transition-delay: 1.4s;\n\t\t-webkit-transition-delay: 1.4s;\n\t\t-ms-transition-delay: 1.4s;\n\t\ttransition-delay: 1.4s;\n\t}\n\n\t#main .thumb:nth-child(7) {\n\t\t-moz-transition-delay: 1.55s;\n\t\t-webkit-transition-delay: 1.55s;\n\t\t-ms-transition-delay: 1.55s;\n\t\ttransition-delay: 1.55s;\n\t}\n\n\t#main .thumb:nth-child(8) {\n\t\t-moz-transition-delay: 1.7s;\n\t\t-webkit-transition-delay: 1.7s;\n\t\t-ms-transition-delay: 1.7s;\n\t\ttransition-delay: 1.7s;\n\t}\n\n\t#main .thumb:nth-child(9) {\n\t\t-moz-transition-delay: 1.85s;\n\t\t-webkit-transition-delay: 1.85s;\n\t\t-ms-transition-delay: 1.85s;\n\t\ttransition-delay: 1.85s;\n\t}\n}\n\n@media screen and (max-width: 480px) {\n\t#main .thumb {\n\t\t-moz-transition-delay: 1.175s;\n\t\t-webkit-transition-delay: 1.175s;\n\t\t-ms-transition-delay: 1.175s;\n\t\ttransition-delay: 1.175s;\n\t\theight: calc(40vh - 2em);\n\t\tmin-height: 18em;\n\t\twidth: 100%;\n\t}\n\n\t#main .thumb:nth-child(1) {\n\t\t-moz-transition-delay: 0.65s;\n\t\t-webkit-transition-delay: 0.65s;\n\t\t-ms-transition-delay: 0.65s;\n\t\ttransition-delay: 0.65s;\n\t}\n\n\t#main .thumb:nth-child(2) {\n\t\t-moz-transition-delay: 0.8s;\n\t\t-webkit-transition-delay: 0.8s;\n\t\t-ms-transition-delay: 0.8s;\n\t\ttransition-delay: 0.8s;\n\t}\n\n\t#main .thumb:nth-child(3) {\n\t\t-moz-transition-delay: 0.95s;\n\t\t-webkit-transition-delay: 0.95s;\n\t\t-ms-transition-delay: 0.95s;\n\t\ttransition-delay: 0.95s;\n\t}\n}\n\n.social-wrap {\n\tmargin-top: 5px;\n}\n\n#header nav > ul > li > .social-wrap a {\n\tpadding: 0 0.5em;\n}\n\nsvg {\n\tfill: rgba(255, 255, 255, 0.6);\n}\n\nsvg:hover {\n\tfill: #fff;\n}\n\n.main-heading {\n\ttext-align: center;\n\tmargin: 100px 10px;\n\theight: 100%;\n\twidth: 100%;\n}\n"
  },
  {
    "path": "demo/assets/js/ie/html5shiv.js",
    "content": "/*\n HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n(function(l,f){function m(){var a=e.elements;return\"string\"==typeof a?a.split(\" \"):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();\na.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function(\"h,f\",\"return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(\"+m().join().replace(/\\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c(\"'+a+'\")'})+\");return n}\")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement(\"p\");d=d.getElementsByTagName(\"head\")[0]||d.documentElement;c.innerHTML=\"x<style>article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}</style>\";\nc=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o=\"_html5shiv\",h=0,n={},g;(function(){try{var a=f.createElement(\"a\");a.innerHTML=\"<xyz></xyz>\";j=\"hidden\"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement(\"a\");var c=f.createDocumentFragment();b=\"undefined\"==typeof c.cloneNode||\n\"undefined\"==typeof c.createDocumentFragment||\"undefined\"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||\"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video\",version:\"3.6.2\",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:\"default\",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();\nfor(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);\n"
  },
  {
    "path": "demo/assets/js/main.js",
    "content": "/*\n\tMultiverse by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\n(function($) {\n\n\tskel.breakpoints({\n\t\txlarge: '(max-width: 1680px)',\n\t\tlarge: '(max-width: 1280px)',\n\t\tmedium: '(max-width: 980px)',\n\t\tsmall: '(max-width: 736px)',\n\t\txsmall: '(max-width: 480px)'\n\t});\n\n\t$(function() {\n\n\t\tvar\t$window = $(window),\n\t\t\t$body = $('body'),\n\t\t\t$wrapper = $('#wrapper');\n\n\t\t// Hack: Enable IE workarounds.\n\t\t\tif (skel.vars.IEVersion < 12)\n\t\t\t\t$body.addClass('ie');\n\n\t\t// Touch?\n\t\t\tif (skel.vars.mobile)\n\t\t\t\t$body.addClass('touch');\n\n\t\t// Transitions supported?\n\t\t\tif (skel.canUse('transition')) {\n\n\t\t\t\t// Add (and later, on load, remove) \"loading\" class.\n\t\t\t\t\t$body.addClass('loading');\n\n\t\t\t\t\t$window.on('load', function() {\n\t\t\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\t\t\t$body.removeClass('loading');\n\t\t\t\t\t\t}, 100);\n\t\t\t\t\t});\n\n\t\t\t\t// Prevent transitions/animations on resize.\n\t\t\t\t\tvar resizeTimeout;\n\n\t\t\t\t\t$window.on('resize', function() {\n\n\t\t\t\t\t\twindow.clearTimeout(resizeTimeout);\n\n\t\t\t\t\t\t$body.addClass('resizing');\n\n\t\t\t\t\t\tresizeTimeout = window.setTimeout(function() {\n\t\t\t\t\t\t\t$body.removeClass('resizing');\n\t\t\t\t\t\t}, 100);\n\n\t\t\t\t\t});\n\n\t\t\t}\n\n\t\t// Scroll back to top.\n\t\t\t$window.scrollTop(0);\n\n\t\t// Fix: Placeholder polyfill.\n\t\t\t$('form').placeholder();\n\n\t\t// Panels.\n\t\t\tvar $panels = $('.panel');\n\n\t\t\t$panels.each(function() {\n\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\t$toggles = $('[href=\"#' + $this.attr('id') + '\"]'),\n\t\t\t\t\t$closer = $('<div class=\"closer\" />').appendTo($this);\n\n\t\t\t\t// Closer.\n\t\t\t\t\t$closer\n\t\t\t\t\t\t.on('click', function(event) {\n\t\t\t\t\t\t\t$this.trigger('---hide');\n\t\t\t\t\t\t});\n\n\t\t\t\t// Events.\n\t\t\t\t\t$this\n\t\t\t\t\t\t.on('click', function(event) {\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('---toggle', function() {\n\n\t\t\t\t\t\t\tif ($this.hasClass('active'))\n\t\t\t\t\t\t\t\t$this.triggerHandler('---hide');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$this.triggerHandler('---show');\n\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('---show', function() {\n\n\t\t\t\t\t\t\t// Hide other content.\n\t\t\t\t\t\t\t\tif ($body.hasClass('content-active'))\n\t\t\t\t\t\t\t\t\t$panels.trigger('---hide');\n\n\t\t\t\t\t\t\t// Activate content, toggles.\n\t\t\t\t\t\t\t\t$this.addClass('active');\n\t\t\t\t\t\t\t\t$toggles.addClass('active');\n\n\t\t\t\t\t\t\t// Activate body.\n\t\t\t\t\t\t\t\t$body.addClass('content-active');\n\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('---hide', function() {\n\n\t\t\t\t\t\t\t// Deactivate content, toggles.\n\t\t\t\t\t\t\t\t$this.removeClass('active');\n\t\t\t\t\t\t\t\t$toggles.removeClass('active');\n\n\t\t\t\t\t\t\t// Deactivate body.\n\t\t\t\t\t\t\t\t$body.removeClass('content-active');\n\n\t\t\t\t\t\t});\n\n\t\t\t\t// Toggles.\n\t\t\t\t\t$toggles\n\t\t\t\t\t\t.removeAttr('href')\n\t\t\t\t\t\t.css('cursor', 'pointer')\n\t\t\t\t\t\t.on('click', function(event) {\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\t\t\t$this.trigger('---toggle');\n\n\t\t\t\t\t\t});\n\n\t\t\t});\n\n\t\t\t// Global events.\n\t\t\t\t$body\n\t\t\t\t\t.on('click', function(event) {\n\n\t\t\t\t\t\tif ($body.hasClass('content-active')) {\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\t\t\t$panels.trigger('---hide');\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t\t\t$window\n\t\t\t\t\t.on('keyup', function(event) {\n\n\t\t\t\t\t\tif (event.keyCode == 27\n\t\t\t\t\t\t&&\t$body.hasClass('content-active')) {\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\t\t\t$panels.trigger('---hide');\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t// Header.\n\t\t\tvar $header = $('#header');\n\n\t\t\t// Links.\n\t\t\t\t$header.find('a').each(function() {\n\n\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\thref = $this.attr('href');\n\n\t\t\t\t\t// Internal link? Skip.\n\t\t\t\t\t\tif (!href\n\t\t\t\t\t\t||\thref.charAt(0) == '#')\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Redirect on click.\n\t\t\t\t\t\t$this\n\t\t\t\t\t\t\t.removeAttr('href')\n\t\t\t\t\t\t\t.css('cursor', 'pointer')\n\t\t\t\t\t\t\t.on('click', function(event) {\n\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\t\t\t\twindow.location.href = href;\n\n\t\t\t\t\t\t\t});\n\n\t\t\t\t});\n\n\t\t// Footer.\n\t\t\tvar $footer = $('#footer');\n\n\t\t\t// Copyright.\n\t\t\t// This basically just moves the copyright line to the end of the *last* sibling of its current parent\n\t\t\t// when the \"medium\" breakpoint activates, and moves it back when it deactivates.\n\t\t\t\t$footer.find('.copyright').each(function() {\n\n\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\t$parent = $this.parent(),\n\t\t\t\t\t\t$lastParent = $parent.parent().children().last();\n\n\t\t\t\t\tskel\n\t\t\t\t\t\t.on('+medium', function() {\n\t\t\t\t\t\t\t$this.appendTo($lastParent);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('-medium', function() {\n\t\t\t\t\t\t\t$this.appendTo($parent);\n\t\t\t\t\t\t});\n\n\t\t\t\t});\n\n\t\t// Main.\n\t\t\tvar $main = $('#main');\n\n\t\t\t// Thumbs.\n\t\t\t\t$main.children('.thumb').each(function() {\n\n\t\t\t\t\tvar\t$this = $(this),\n\t\t\t\t\t\t$image = $this.find('.image'), $image_img = $image.children('img'),\n\t\t\t\t\t\tx;\n\n\t\t\t\t\t// No image? Bail.\n\t\t\t\t\t\tif ($image.length == 0)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Image.\n\t\t\t\t\t// This sets the background of the \"image\" <span> to the image pointed to by its child\n\t\t\t\t\t// <img> (which is then hidden). Gives us way more flexibility.\n\n\t\t\t\t\t\t// Set background.\n\t\t\t\t\t\t\t$image.css('background-image', 'url(' + $image_img.attr('src') + ')');\n\n\t\t\t\t\t\t// Set background position.\n\t\t\t\t\t\t\tif (x = $image_img.data('position'))\n\t\t\t\t\t\t\t\t$image.css('background-position', x);\n\n\t\t\t\t\t\t// Hide original img.\n\t\t\t\t\t\t\t$image_img.hide();\n\n\t\t\t\t\t// Hack: IE<11 doesn't support pointer-events, which means clicks to our image never\n\t\t\t\t\t// land as they're blocked by the thumbnail's caption overlay gradient. This just forces\n\t\t\t\t\t// the click through to the image.\n\t\t\t\t\t\tif (skel.vars.IEVersion < 11)\n\t\t\t\t\t\t\t$this\n\t\t\t\t\t\t\t\t.css('cursor', 'pointer')\n\t\t\t\t\t\t\t\t.on('click', function() {\n\t\t\t\t\t\t\t\t\t$image.trigger('click');\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t});\n\n\t});\n\n})(jQuery);\n"
  },
  {
    "path": "demo/index.html",
    "content": "<!DOCTYPE HTML>\n<!--\n  Multiverse by HTML5 UP\n  html5up.net | @ajlkn\n  Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n-->\n<html>\n\n<head>\n    <title>Lozad.js: Highly performant lazy loader</title>\n    <meta charset=\"utf-8\" />\n    <meta name=\"description\" content=\"Lozad.js is highly performant, light and configurable lazy loader in pure JS with no dependencies for images, iframes and more.\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\" />\n    <link rel=\"image_src\" href=\"images/lozad.jpg\" />\n    <!--[if lte IE 8]><script src=\"assets/js/ie/html5shiv.js\"></script><![endif]-->\n    <link rel=\"stylesheet\" href=\"assets/css/main.css\" />\n    <!--[if lte IE 9]><link rel=\"stylesheet\" href=\"assets/css/ie9.css\" /><![endif]-->\n    <!--[if lte IE 8]><link rel=\"stylesheet\" href=\"assets/css/ie8.css\" /><![endif]-->\n    <meta property=\"og:title\" content=\"Lozad.js: Highly performant lazy loader\" />\n    <meta property=\"og:type\" content=\"website\" />\n    <meta property=\"og:url\" content=\"https://apoorv.pro/lozad.js/demo/\" />\n    <meta property=\"og:image\" content=\"https://apoorv.pro/lozad.js/demo/images/lozad.jpg\" />\n    <meta property=\"og:description\" content=\"Lozad.js is highly performant, light ~0.5kb and configurable lazy loader in pure JS with no dependencies for images, iframes and more.\" />\n</head>\n\n<body>\n    <!-- Wrapper -->\n    <div id=\"wrapper\">\n        <!-- Header -->\n        <header id=\"header\">\n            <h1><a href=\"https://github.com/ApoorvSaxena/lozad.js\"><strong>Lozad.js</strong></a></h1>\n            <nav>\n                <ul>\n                    <li>\n                        <div class=\"social-wrap\">\n                            <a aria-label=\"Become a patron\" class=\"hint--bottom-left\" href=\"https://www.patreon.com/apoorvsaxena\">\n                                <img src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" height=\"50\">\n                            </a>\n                            <a aria-label=\"Fork on github\" class=\"hint--bottom-left\" href=\"https://github.com/ApoorvSaxena/lozad.js\">\n                                <svg viewBox=\"0 0 16 16\" width=\"48\" height=\"48\">\n                                    <path d=\"M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z\"></path>\n                                </svg>\n                            </a>\n                            <a aria-label=\"Tweet about Hint.css v2\" class=\"hint--bottom-left\" title=\"Tweet\" href=\"http://twitter.com/share?url=https://apoorv.pro/lozad.js/demo/&amp;text=Lozad.js - A performant lazy loading library for your lovely websites&amp;count=horiztonal&amp;related=lozad_js&amp;hashtags=js,performance\" target=\"_blank\">\n                                <svg viewBox=\"0 0 16 16\" width=\"48\" height=\"48\">\n                                    <path d=\"M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809\n                                c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z\"></path>\n                                </svg>\n                            </a>\n                        </div>\n                    </li>\n                </ul>\n            </nav>\n        </header>\n        <!-- Main -->\n        <div id=\"main\">\n            <article class=\"main-heading\">\n                <h1>Lozad.js - Performant Lazy Loading Library</h1>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" id=\"mutativeImg1\" data-placeholder-background=\"#583624\" data-src=\"images/thumbs/01.jpg\" data-index=\"1\" />\n                <noscript><img src=\"images/thumbs/01.jpg\" data-index=\"1\" /></noscript>\n                    <h2>Image 1</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#b97248\" data-src=\"images/thumbs/02.jpg\" data-index=\"2\" />\n                <noscript><img src=\"images/thumbs/02.jpg\" data-index=\"2\" /></noscript>\n                    <h2>Image 2</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" id=\"mutativeImg2\" data-placeholder-background=\"#352629\" data-src=\"images/thumbs/03.jpg\" data-index=\"3\" />\n                <noscript><img src=\"images/thumbs/03.jpg\" data-index=\"3\" /></noscript>\n                    <h2>Image 3</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#5e7b80\" data-src=\"images/thumbs/04.jpg\" data-index=\"4\" />\n                <noscript><img src=\"images/thumbs/04.jpg\" data-index=\"4\" /></noscript>\n                    <h2>Image 4</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#444443\" data-src=\"images/thumbs/05.jpg\" data-index=\"5\" />\n                <noscript><img src=\"images/thumbs/05.jpg\" data-index=\"5\" /></noscript>\n                    <h2>Image 5</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#a2a8ab\" data-src=\"images/thumbs/06.jpg\" data-index=\"6\" />\n                <noscript><img src=\"images/thumbs/06.jpg\" data-index=\"6\" /></noscript>\n                    <h2>Image 6</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#3e5e79\" data-src=\"images/thumbs/07.jpg\" data-index=\"7\" />\n                <noscript><img src=\"images/thumbs/07.jpg\" data-index=\"7\" /></noscript>\n                    <h2>Image 7</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#32141d\" data-src=\"images/thumbs/08.jpg\" data-index=\"8\" />\n                <noscript><img src=\"images/thumbs/08.jpg\" data-index=\"8\" /></noscript>\n                    <h2>Image 8</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#67848a\" data-src=\"images/thumbs/09.jpg\" data-index=\"9\" />\n                <noscript><img src=\"images/thumbs/09.jpg\" data-index=\"9\" /></noscript>\n                    <h2>Image 9</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#322721\" data-src=\"images/thumbs/10.jpg\" data-index=\"10\" />\n                <noscript><img src=\"images/thumbs/10.jpg\" data-index=\"10\" /></noscript>\n                    <h2>Image 10</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#c8c3c4\" data-src=\"images/thumbs/11.jpg\" data-index=\"11\" />\n                <noscript><img src=\"images/thumbs/11.jpg\" data-index=\"11\" /></noscript>\n                    <h2>Image 11</h2>\n            </article>\n            <article class=\"thumb\">\n                <img class=\"lozad\" data-placeholder-background=\"#5a6840\" data-src=\"images/thumbs/12.jpg\" data-index=\"12\" />\n                <noscript><img src=\"images/thumbs/12.jpg\" data-index=\"12\" /></noscript>\n                    <h2>Image 12</h2>\n            </article>\n        </div>\n        <!-- <picture> example -->\n        <!-- SubMain -->\n        <div class=\"sub-main\">\n            <article class=\"main-heading\">\n                <h1>&lt;picture> example</h1>\n                <p style=\"font-size: 75%\"><em>* You can open your network section in dev tools, for see how images are loading</em></p>\n            </article>\n        </div>\n        <!-- Pictures -->\n        <div id=\"pictures\">\n            <article class=\"screen\">\n                <div class=\"picture\">\n                    <picture class=\"lozad-picture\" style=\"display: block; min-height: 1rem;\" data-iesrc=\"images/thumbs/picture-01.jpg\">\n                        <source srcset=\"images/thumbs/picture-01.jpg\" media=\"(min-width: 1280px)\">\n                        <source srcset=\"images/thumbs/picture-02.jpg\" media=\"(min-width: 980px)\">\n                        <source srcset=\"images/thumbs/picture-03.jpg\" media=\"(min-width: 320px)\">\n                        <noscript><img src=\"images/thumbs/picture-01.jpg\"></noscript>\n                    </picture>\n                    <h2>Example 1</h2>\n                    <pre>\npicture-01.jpg media=\"(min-width: 1280px)\"\npicture-02.jpg media=\"(min-width: 980px)\"\npicture-03.jpg media=\"(min-width: 320px)\"\n                    </pre>\n                </div>\n            </article>\n            <article class=\"screen\">\n                <div class=\"picture\">\n                    <picture class=\"lozad-picture\" style=\"display: block; min-height: 1rem;\" data-iesrc=\"images/thumbs/picture-04.jpg\">\n                        <source srcset=\"images/thumbs/picture-04.jpg\" media=\"(min-width: 1280px)\">\n                        <source srcset=\"images/thumbs/picture-05.jpg\" media=\"(min-width: 980px)\">\n                        <source srcset=\"images/thumbs/picture-06.jpg\" media=\"(min-width: 320px)\">\n                        <noscript><img src=\"images/thumbs/picture-04.jpg\"></noscript>\n                    </picture>\n                    <h2>Example 2</h2>\n                    <pre>\npicture-04.jpg media=\"(min-width: 1280px)\"\npicture-05.jpg media=\"(min-width: 980px)\"\npicture-06.jpg media=\"(min-width: 320px)\"\n                    </pre>\n                </div>\n            </article>\n            <article class=\"screen\">\n                <div class=\"picture\">\n                    <picture class=\"lozad-picture\" style=\"display: block; min-height: 1rem;\" data-iesrc=\"images/thumbs/picture-07.jpg\">\n                        <source srcset=\"images/thumbs/picture-07.jpg\" media=\"(min-width: 1280px)\">\n                        <source srcset=\"images/thumbs/picture-08.jpg\" media=\"(min-width: 980px)\">\n                        <source srcset=\"images/thumbs/picture-09.jpg\" media=\"(min-width: 320px)\">\n                        <noscript><img src=\"images/thumbs/picture-07.jpg\"></noscript>\n                    </picture>\n                    <h2>Example 3</h2>\n                    <pre>\npicture-07.jpg media=\"(min-width: 1280px)\"\npicture-08.jpg media=\"(min-width: 980px)\"\npicture-09.jpg media=\"(min-width: 320px)\"\n                    </pre>\n                </div>\n            </article>\n        </div>\n    </div>\n\n    <!-- <background> example -->\n        <!-- SubMain -->\n        <div class=\"sub-main\">\n            <article class=\"main-heading\">\n                <h1>&lt;background> example</h1>\n                <p style=\"font-size: 75%\"><em>* You can open your network section in dev tools, for see how background-images are loading</em></p>\n            </article>\n        </div>\n        <!-- Backgrounds -->\n        <div id=\"backgrounds\">\n            <article class=\"screen\">\n                <div class=\"background\">\n                    <div class=\"lozad-background\" data-background-image=\"images/backgrounds/background-single.jpg\">\n                    </div>\n                    <h2>Example 1</h2>\n                    <pre>\nSingle Background Image\n                    </pre>\n                </div>\n            </article>\n            <article class=\"screen\">\n                <div class=\"background\">\n                    <div class=\"lozad-background\" data-background-image=\"images/backgrounds/background-multiple-1.png,images/backgrounds/background-multiple-2.png,images/backgrounds/background-multiple-3.png\">\n                    </div>\n                    <h2>Example 2</h2>\n                    <pre>\nMultiple Background Images\nCheck the console to see that these are indeed separate images.\n                    </pre>\n                </div>\n            </article>\n            <article class=\"screen\">\n                <div class=\"background\">\n                    <div class=\"lozad-background\" data-background-image=\"images/backgrounds/background-multiple-fail.png,images/backgrounds/background-multiple-fallback.png\">\n                    </div>\n                    <h2>Example 3</h2>\n                    <pre>\nMultiple Background Images\nFallback Method ( where the first / foremost image fails )\nCheck the console to see that the first image is failed to load.\n                    </pre>\n                </div>\n            </article>\n            <article class=\"screen\">\n                <div class=\"background\">\n                    <div class=\"lozad-background\" data-background-image-set=\"url('images/responsive/photo.jpg') 1x, url('images/responsive/photo@2x.jpg') 2x, url('images/responsive/photo@3x.jpg') 3x\">\n                    </div>\n                    <h2>Example 4</h2>\n                    <pre>\nResponsive Background Images set\nChange a device pixel ratio with devtools and check the console to see which image dimension was loaded\n                    </pre>\n                </div>\n            </article>\n\n        </div>\n    </div>\n\n    <!-- <iframe> example -->\n    <div class=\"sub-main\">\n        <article class=\"main-heading\">\n            <h1>&lt;iframe> example</h1>\n        </article>\n    </div>\n    <div id=\"iframe\">\n        <article class=\"frame\">\n            <iframe width=\"560\" height=\"315\" data-src=\"https://www.youtube.com/embed/Rt0oX-4Hbxc\" class=\"lozad\" frameborder=\"0\" allowfullscreen data-index=\"1\"></iframe>\n        </article>\n    </div>\n    <!-- <video> example -->\n    <div class=\"sub-main\">\n      <article class=\"main-heading\">\n        <h1>&lt;video> example</h1>\n        <p>video courtesy of Big Buck Bunny.</p>\n      </article>\n    </div>\n    <div id=\"video\">\n      <article class=\"frame\">\n          <div class=\"video-example video-example-2\">\n            <video width=\"560\" height=\"315\" controls loop muted class=\"lozad-picture\" data-poster=\"images/backgrounds/video-poster.jpeg\">\n              <source data-src=\"video/mov_bbb.mp4\" type=\"video/mp4\">\n              <source data-src=\"video/mov_bbb.ogg\" type=\"video/ogg\">\n            </video>\n            <pre>normal video example</pre>\n          </div>\n      </article>\n    </div>\n\n    <!-- polyfill for Object.assign & IntersectionObserver-->\n    <script crossorigin=\"anonymous\"\n        src=\"https://polyfill.io/v3/polyfill.min.js?flags=gated&features=Object.assign%2CIntersectionObserver\"></script>\n    <!-- Toastr resources for Notifications -->\n    <script src=\"assets/js/jquery.min.js\"></script>\n    <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js\"></script>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css\">\n    <!-- Toastr resources -->\n    <script src=\"../dist/lozad.min.js\"></script>\n    <script type=\"text/javascript\">\n    toastr.options = {\n        \"progressBar\": true,\n        \"timeOut\": \"1500\"\n    }\n    // Initialize library to lazy load images\n    var observer = lozad('.lozad', {\n        threshold: 0.1,\n        enableAutoReload: true,\n        load: function(el) {\n            el.src = el.getAttribute(\"data-src\");\n            el.onload = function() {\n                toastr[\"success\"](el.localName.toUpperCase() + \" \" + el.getAttribute(\"data-index\") + \" lazy loaded.\")\n            }\n        }\n    })\n\n    // Picture observer\n    // with default `load` method\n    var pictureObserver = lozad('.lozad-picture', {\n        threshold: 0.1\n    })\n\n    window.onload = function () {\n        setTimeout(function () {\n            document.querySelector('#mutativeImg1').dataset.src = 'images/thumbs/02.jpg'\n            document.querySelector('#mutativeImg2').dataset.src = 'images/thumbs/02.jpg'\n            toastr[\"success\"](\"Once data-src change, the element render again.\")\n        }, 3000)\n    }\n    // Background observer\n    // with default `load` method\n    var backgroundObserver = lozad('.lozad-background', {\n        threshold: 0.1\n    })\n\n    observer.observe()\n    pictureObserver.observe()\n    backgroundObserver.observe()\n\n    </script>\n    <!-- Global site tag (gtag.js) - Google Analytics -->\n    <script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-131689813-1\"></script>\n    <script>\n      window.dataLayer = window.dataLayer || [];\n      function gtag(){dataLayer.push(arguments);}\n      gtag('js', new Date());\n\n      gtag('config', 'UA-131689813-1');\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "dist/lozad.es.js",
    "content": "/*! lozad.js - v1.16.0 - 2020-09-10\n* https://github.com/ApoorvSaxena/lozad.js\n* Copyright (c) 2020 Apoorv Saxena; Licensed MIT */\n\n\n/**\n * Detect IE browser\n * @const {boolean}\n * @private\n */\nconst isIE = typeof document !== 'undefined' && document.documentMode;\n\n/**\n *\n * @param {string} type\n *\n */\nconst support = type => window && window[type];\n\nconst validAttribute = ['data-iesrc', 'data-alt', 'data-src', 'data-srcset', 'data-background-image', 'data-toggle-class'];\n\nconst defaultConfig = {\n  rootMargin: '0px',\n  threshold: 0,\n  enableAutoReload: false,\n  load(element) {\n    if (element.nodeName.toLowerCase() === 'picture') {\n      let img = element.querySelector('img');\n      let append = false;\n\n      if (img === null) {\n        img = document.createElement('img');\n        append = true;\n      }\n\n      if (isIE && element.getAttribute('data-iesrc')) {\n        img.src = element.getAttribute('data-iesrc');\n      }\n\n      if (element.getAttribute('data-alt')) {\n        img.alt = element.getAttribute('data-alt');\n      }\n\n      if (append) {\n        element.append(img);\n      }\n    }\n\n    if (element.nodeName.toLowerCase() === 'video' && !element.getAttribute('data-src')) {\n      if (element.children) {\n        const childs = element.children;\n        let childSrc;\n        for (let i = 0; i <= childs.length - 1; i++) {\n          childSrc = childs[i].getAttribute('data-src');\n          if (childSrc) {\n            childs[i].src = childSrc;\n          }\n        }\n\n        element.load();\n      }\n    }\n\n    if (element.getAttribute('data-poster')) {\n      element.poster = element.getAttribute('data-poster');\n    }\n\n    if (element.getAttribute('data-src')) {\n      element.src = element.getAttribute('data-src');\n    }\n\n    if (element.getAttribute('data-srcset')) {\n      element.setAttribute('srcset', element.getAttribute('data-srcset'));\n    }\n\n    let backgroundImageDelimiter = ',';\n    if (element.getAttribute('data-background-delimiter')) {\n      backgroundImageDelimiter = element.getAttribute('data-background-delimiter');\n    }\n\n    if (element.getAttribute('data-background-image')) {\n      element.style.backgroundImage = `url('${element.getAttribute('data-background-image').split(backgroundImageDelimiter).join('\\'),url(\\'')}')`;\n    } else if (element.getAttribute('data-background-image-set')) {\n      const imageSetLinks = element.getAttribute('data-background-image-set').split(backgroundImageDelimiter);\n      let firstUrlLink = (imageSetLinks[0].substr(0, imageSetLinks[0].indexOf(' ')) || imageSetLinks[0]); // Substring before ... 1x\n      firstUrlLink = firstUrlLink.indexOf('url(') === -1 ? `url(${firstUrlLink})` : firstUrlLink;\n      if (imageSetLinks.length === 1) {\n        element.style.backgroundImage = firstUrlLink;\n      } else {\n        element.setAttribute('style', (element.getAttribute('style') || '') + `background-image: ${firstUrlLink}; background-image: -webkit-image-set(${imageSetLinks}); background-image: image-set(${imageSetLinks})`);\n      }\n    }\n\n    if (element.getAttribute('data-toggle-class')) {\n      element.classList.toggle(element.getAttribute('data-toggle-class'));\n    }\n  },\n  loaded() {}\n};\n\nfunction markAsLoaded(element) {\n  element.setAttribute('data-loaded', true);\n}\n\nfunction preLoad(element) {\n  if (element.getAttribute('data-placeholder-background')) {\n    element.style.background = element.getAttribute('data-placeholder-background');\n  }\n}\n\nconst isLoaded = element => element.getAttribute('data-loaded') === 'true';\n\nconst onIntersection = (load, loaded) => (entries, observer) => {\n  entries.forEach(entry => {\n    if (entry.intersectionRatio > 0 || entry.isIntersecting) {\n      observer.unobserve(entry.target);\n\n      if (!isLoaded(entry.target)) {\n        load(entry.target);\n        markAsLoaded(entry.target);\n        loaded(entry.target);\n      }\n    }\n  });\n};\n\nconst onMutation = load => entries => {\n  entries.forEach(entry => {\n    if (isLoaded(entry.target) && entry.type === 'attributes' && validAttribute.indexOf(entry.attributeName) > -1) {\n      load(entry.target);\n    }\n  });\n};\n\nconst getElements = (selector, root = document) => {\n  if (selector instanceof Element) {\n    return [selector]\n  }\n\n  if (selector instanceof NodeList) {\n    return selector\n  }\n\n  return root.querySelectorAll(selector)\n};\n\nfunction lozad (selector = '.lozad', options = {}) {\n  const {root, rootMargin, threshold, enableAutoReload, load, loaded} = Object.assign({}, defaultConfig, options);\n  let observer;\n  let mutationObserver;\n  if (support('IntersectionObserver')) {\n    observer = new IntersectionObserver(onIntersection(load, loaded), {\n      root,\n      rootMargin,\n      threshold\n    });\n  }\n\n  if (support('MutationObserver') && enableAutoReload) {\n    mutationObserver = new MutationObserver(onMutation(load, loaded));\n  }\n\n  const elements = getElements(selector, root);\n  for (let i = 0; i < elements.length; i++) {\n    preLoad(elements[i]);\n  }\n\n  return {\n    observe() {\n      const elements = getElements(selector, root);\n\n      for (let i = 0; i < elements.length; i++) {\n        if (isLoaded(elements[i])) {\n          continue\n        }\n\n        if (observer) {\n          if (mutationObserver && enableAutoReload) {\n            mutationObserver.observe(elements[i], {subtree: true, attributes: true, attributeFilter: validAttribute});\n          }\n\n          observer.observe(elements[i]);\n          continue\n        }\n\n        load(elements[i]);\n        markAsLoaded(elements[i]);\n        loaded(elements[i]);\n      }\n    },\n    triggerLoad(element) {\n      if (isLoaded(element)) {\n        return\n      }\n\n      load(element);\n      markAsLoaded(element);\n      loaded(element);\n    },\n    observer,\n    mutationObserver\n  }\n}\n\nexport default lozad;\n"
  },
  {
    "path": "dist/lozad.js",
    "content": "/*! lozad.js - v1.16.0 - 2020-09-10\n* https://github.com/ApoorvSaxena/lozad.js\n* Copyright (c) 2020 Apoorv Saxena; Licensed MIT */\n\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global.lozad = factory());\n}(this, (function () { 'use strict';\n\n  /**\n   * Detect IE browser\n   * @const {boolean}\n   * @private\n   */\n  var isIE = typeof document !== 'undefined' && document.documentMode;\n\n  /**\n   *\n   * @param {string} type\n   *\n   */\n  var support = function support(type) {\n    return window && window[type];\n  };\n\n  var validAttribute = ['data-iesrc', 'data-alt', 'data-src', 'data-srcset', 'data-background-image', 'data-toggle-class'];\n\n  var defaultConfig = {\n    rootMargin: '0px',\n    threshold: 0,\n    enableAutoReload: false,\n    load: function load(element) {\n      if (element.nodeName.toLowerCase() === 'picture') {\n        var img = element.querySelector('img');\n        var append = false;\n\n        if (img === null) {\n          img = document.createElement('img');\n          append = true;\n        }\n\n        if (isIE && element.getAttribute('data-iesrc')) {\n          img.src = element.getAttribute('data-iesrc');\n        }\n\n        if (element.getAttribute('data-alt')) {\n          img.alt = element.getAttribute('data-alt');\n        }\n\n        if (append) {\n          element.append(img);\n        }\n      }\n\n      if (element.nodeName.toLowerCase() === 'video' && !element.getAttribute('data-src')) {\n        if (element.children) {\n          var childs = element.children;\n          var childSrc = void 0;\n          for (var i = 0; i <= childs.length - 1; i++) {\n            childSrc = childs[i].getAttribute('data-src');\n            if (childSrc) {\n              childs[i].src = childSrc;\n            }\n          }\n\n          element.load();\n        }\n      }\n\n      if (element.getAttribute('data-poster')) {\n        element.poster = element.getAttribute('data-poster');\n      }\n\n      if (element.getAttribute('data-src')) {\n        element.src = element.getAttribute('data-src');\n      }\n\n      if (element.getAttribute('data-srcset')) {\n        element.setAttribute('srcset', element.getAttribute('data-srcset'));\n      }\n\n      var backgroundImageDelimiter = ',';\n      if (element.getAttribute('data-background-delimiter')) {\n        backgroundImageDelimiter = element.getAttribute('data-background-delimiter');\n      }\n\n      if (element.getAttribute('data-background-image')) {\n        element.style.backgroundImage = 'url(\\'' + element.getAttribute('data-background-image').split(backgroundImageDelimiter).join('\\'),url(\\'') + '\\')';\n      } else if (element.getAttribute('data-background-image-set')) {\n        var imageSetLinks = element.getAttribute('data-background-image-set').split(backgroundImageDelimiter);\n        var firstUrlLink = imageSetLinks[0].substr(0, imageSetLinks[0].indexOf(' ')) || imageSetLinks[0]; // Substring before ... 1x\n        firstUrlLink = firstUrlLink.indexOf('url(') === -1 ? 'url(' + firstUrlLink + ')' : firstUrlLink;\n        if (imageSetLinks.length === 1) {\n          element.style.backgroundImage = firstUrlLink;\n        } else {\n          element.setAttribute('style', (element.getAttribute('style') || '') + ('background-image: ' + firstUrlLink + '; background-image: -webkit-image-set(' + imageSetLinks + '); background-image: image-set(' + imageSetLinks + ')'));\n        }\n      }\n\n      if (element.getAttribute('data-toggle-class')) {\n        element.classList.toggle(element.getAttribute('data-toggle-class'));\n      }\n    },\n    loaded: function loaded() {}\n  };\n\n  function markAsLoaded(element) {\n    element.setAttribute('data-loaded', true);\n  }\n\n  function preLoad(element) {\n    if (element.getAttribute('data-placeholder-background')) {\n      element.style.background = element.getAttribute('data-placeholder-background');\n    }\n  }\n\n  var isLoaded = function isLoaded(element) {\n    return element.getAttribute('data-loaded') === 'true';\n  };\n\n  var onIntersection = function onIntersection(load, loaded) {\n    return function (entries, observer) {\n      entries.forEach(function (entry) {\n        if (entry.intersectionRatio > 0 || entry.isIntersecting) {\n          observer.unobserve(entry.target);\n\n          if (!isLoaded(entry.target)) {\n            load(entry.target);\n            markAsLoaded(entry.target);\n            loaded(entry.target);\n          }\n        }\n      });\n    };\n  };\n\n  var onMutation = function onMutation(load) {\n    return function (entries) {\n      entries.forEach(function (entry) {\n        if (isLoaded(entry.target) && entry.type === 'attributes' && validAttribute.indexOf(entry.attributeName) > -1) {\n          load(entry.target);\n        }\n      });\n    };\n  };\n\n  var getElements = function getElements(selector) {\n    var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n\n    if (selector instanceof Element) {\n      return [selector];\n    }\n\n    if (selector instanceof NodeList) {\n      return selector;\n    }\n\n    return root.querySelectorAll(selector);\n  };\n\n  function lozad () {\n    var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.lozad';\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    var _Object$assign = Object.assign({}, defaultConfig, options),\n        root = _Object$assign.root,\n        rootMargin = _Object$assign.rootMargin,\n        threshold = _Object$assign.threshold,\n        enableAutoReload = _Object$assign.enableAutoReload,\n        load = _Object$assign.load,\n        loaded = _Object$assign.loaded;\n\n    var observer = void 0;\n    var mutationObserver = void 0;\n    if (support('IntersectionObserver')) {\n      observer = new IntersectionObserver(onIntersection(load, loaded), {\n        root: root,\n        rootMargin: rootMargin,\n        threshold: threshold\n      });\n    }\n\n    if (support('MutationObserver') && enableAutoReload) {\n      mutationObserver = new MutationObserver(onMutation(load, loaded));\n    }\n\n    var elements = getElements(selector, root);\n    for (var i = 0; i < elements.length; i++) {\n      preLoad(elements[i]);\n    }\n\n    return {\n      observe: function observe() {\n        var elements = getElements(selector, root);\n\n        for (var _i = 0; _i < elements.length; _i++) {\n          if (isLoaded(elements[_i])) {\n            continue;\n          }\n\n          if (observer) {\n            if (mutationObserver && enableAutoReload) {\n              mutationObserver.observe(elements[_i], { subtree: true, attributes: true, attributeFilter: validAttribute });\n            }\n\n            observer.observe(elements[_i]);\n            continue;\n          }\n\n          load(elements[_i]);\n          markAsLoaded(elements[_i]);\n          loaded(elements[_i]);\n        }\n      },\n      triggerLoad: function triggerLoad(element) {\n        if (isLoaded(element)) {\n          return;\n        }\n\n        load(element);\n        markAsLoaded(element);\n        loaded(element);\n      },\n\n      observer: observer,\n      mutationObserver: mutationObserver\n    };\n  }\n\n  return lozad;\n\n})));\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"lozad\",\n  \"title\": \"lozad.js\",\n  \"description\": \"A light-weight JS library to lazy load any HTML element such as images, ads, videos etc.\",\n  \"version\": \"1.16.0\",\n  \"homepage\": \"https://github.com/ApoorvSaxena/lozad.js\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"test\": \"nyc mocha\",\n    \"build\": \"rollup -c\",\n    \"build:watch\": \"rollup -c -w -m inline\",\n    \"prepublish\": \"npm run build\",\n    \"prelint\": \"prettier --single-quote --no-semi --no-bracket-spacing --trailing-comma none --write \\\"lib/**/*.js\\\" --write build.js --write \\\"test/*.js\\\"\",\n    \"precommit\": \"npm run lint && npm run build\",\n    \"lint\": \"xo --fix src/*.js build.js test/*.js\",\n    \"serve\": \"browser-sync start --server \\\"demo\\\" --server \\\".\\\" --files \\\"demo\\\" --files \\\"dist\\\" --port 3000\",\n    \"dev\": \"run-p -r serve build:watch\",\n    \"tag\": \"npm version minor --no-git-tag-version && npm run build && PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\\\",]//g' | tr -d '[[:space:]]') && git commit -am \\\"$PACKAGE_VERSION release\\\" && git tag v$PACKAGE_VERSION\"\n  },\n  \"author\": {\n    \"name\": \"Apoorv Saxena\",\n    \"email\": \"root@apoorv.pro\",\n    \"url\": \"https://apoorv.pro\"\n  },\n  \"browser\": \"dist/lozad.es.js\",\n  \"main\": \"dist/lozad.js\",\n  \"module\": \"dist/lozad.es.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/ApoorvSaxena/lozad.js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/ApoorvSaxena/lozad.js/issues\"\n  },\n  \"licenses\": [\n    {\n      \"type\": \"MIT\",\n      \"url\": \"https://github.com/ApoorvSaxena/lozad.js/blob/master/LICENSE\"\n    }\n  ],\n  \"files\": [\n    \"dist/\"\n  ],\n  \"keywords\": [\n    \"lazy\",\n    \"loader\",\n    \"lazyloader\",\n    \"lazyload\",\n    \"performance\",\n    \"image\",\n    \"video\",\n    \"iframe\",\n    \"ads\"\n  ],\n  \"devDependencies\": {\n    \"babel-core\": \"^6.26.0\",\n    \"babel-preset-env\": \"^1.6.0\",\n    \"babel-preset-stage-0\": \"^6.24.1\",\n    \"browser-sync\": \"^3.0.4\",\n    \"chokidar\": \"^3.1.1\",\n    \"cross-env\": \"^5.2.1\",\n    \"husky\": \"^0.14.3\",\n    \"jsdom\": \"^27.0.0\",\n    \"jsdom-global\": \"^3.0.2\",\n    \"mocha\": \"^10.2.0\",\n    \"npm-run-all\": \"^4.1.5\",\n    \"nyc\": \"^14.1.1\",\n    \"prettier\": \"^1.18.2\",\n    \"rollup\": \"^4.50.1\",\n    \"rollup-plugin-babel\": \"^3.0.2\",\n    \"rollup-plugin-filesize\": \"^4.0.1\",\n    \"rollup-plugin-license\": \"^3.0.1\",\n    \"rollup-plugin-uglify\": \"^4.0.0\",\n    \"xo\": \"^1.2.2\"\n  },\n  \"xo\": {\n    \"envs\": [\n      \"browser\",\n      \"mocha\"\n    ],\n    \"semicolon\": false,\n    \"space\": true,\n    \"rules\": {\n      \"unicorn/prefer-node-append\": \"off\"\n    }\n  }\n}\n"
  },
  {
    "path": "rollup.config.js",
    "content": "import babel from 'rollup-plugin-babel';\nimport filesize from 'rollup-plugin-filesize';\nimport { uglify } from 'rollup-plugin-uglify';\nimport license from 'rollup-plugin-license';\nimport pkg from './package.json';\n\nexport default [\n  // browser-friendly UMD build\n  {\n    input: 'src/lozad.js',\n    output: {\n      name: pkg.name,\n      file: pkg.main,\n      format: 'umd'\n    },\n    plugins: [\n      license({\n        banner:\n          '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +\n          '<%= moment().format(\"YYYY-MM-DD\") + \"\\\\n\" %>' +\n          '<%= pkg.homepage ? \"* \" + pkg.homepage + \"\\\\n\" : \"\" %>' +\n          '* Copyright (c) <%= moment().format(\"YYYY\") %> <%= pkg.author.name %>;' +\n          ' Licensed <%= _.map(pkg.licenses, \"type\").join(\", \") %> */\\n\\n'\n      }),\n      babel({\n        babelrc: false,\n        presets: [\n          [\n            'env',\n            {\n              modules: false\n            }\n          ],\n          'stage-0'\n        ]\n      }),\n      filesize()\n    ]\n  },\n  {\n    input: 'src/lozad.js',\n    output: {\n      name: pkg.name,\n      file: pkg.browser,\n      format: 'umd'\n    },\n    plugins: [\n      license({\n        banner:\n          '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +\n          '<%= moment().format(\"YYYY-MM-DD\") + \"\\\\n\" %>' +\n          '<%= pkg.homepage ? \"* \" + pkg.homepage + \"\\\\n\" : \"\" %>' +\n          '* Copyright (c) <%= moment().format(\"YYYY\") %> <%= pkg.author.name %>;' +\n          ' Licensed <%= _.map(pkg.licenses, \"type\").join(\", \") %> */\\n\\n'\n      }),\n      babel({\n        babelrc: false,\n        presets: [\n          [\n            'env',\n            {\n              modules: false\n            }\n          ],\n          'stage-0'\n        ]\n      }),\n      uglify({\n        output: {\n          comments: true\n        }\n      }),\n      filesize()\n    ]\n  },\n\n  // CommonJS (for Node) and ES module (for bundlers) build.\n  // (We could have three entries in the configuration array\n  // instead of two, but it's quicker to generate multiple\n  // builds from a single configuration where possible, using\n  // an array for the `output` option, where we can specify\n  // `file` and `format` for each target)\n  {\n    input: 'src/lozad.js',\n    output: [\n      // { file: pkg.main, format: 'cjs' },\n      { file: pkg.module, format: 'es' }\n    ],\n    plugins: [\n      license({\n        banner:\n          '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +\n          '<%= moment().format(\"YYYY-MM-DD\") + \"\\\\n\" %>' +\n          '<%= pkg.homepage ? \"* \" + pkg.homepage + \"\\\\n\" : \"\" %>' +\n          '* Copyright (c) <%= moment().format(\"YYYY\") %> <%= pkg.author.name %>;' +\n          ' Licensed <%= _.map(pkg.licenses, \"type\").join(\", \") %> */\\n\\n'\n      }),\n      filesize()\n    ]\n  }\n];\n"
  },
  {
    "path": "src/lozad.js",
    "content": "/**\n * Detect IE browser\n * @const {boolean}\n * @private\n */\nconst isIE = typeof document !== 'undefined' && document.documentMode\n\n/**\n *\n * @param {string} type\n *\n */\nconst support = type => window && window[type]\n\nconst validAttribute = ['data-iesrc', 'data-alt', 'data-src', 'data-srcset', 'data-background-image', 'data-toggle-class']\n\nconst defaultConfig = {\n  rootMargin: '0px',\n  threshold: 0,\n  enableAutoReload: false,\n  load(element) {\n    if (element.nodeName.toLowerCase() === 'picture') {\n      let img = element.querySelector('img')\n      let append = false\n\n      if (img === null) {\n        img = document.createElement('img')\n        append = true\n      }\n\n      if (isIE && element.getAttribute('data-iesrc')) {\n        img.src = element.getAttribute('data-iesrc')\n      }\n\n      if (element.getAttribute('data-alt')) {\n        img.alt = element.getAttribute('data-alt')\n      }\n\n      if (append) {\n        element.append(img)\n      }\n    }\n\n    if (element.nodeName.toLowerCase() === 'video' && !element.getAttribute('data-src')) {\n      if (element.children) {\n        const childs = element.children\n        let childSrc\n        for (let i = 0; i <= childs.length - 1; i++) {\n          childSrc = childs[i].getAttribute('data-src')\n          if (childSrc) {\n            childs[i].src = childSrc\n          }\n        }\n\n        element.load()\n      }\n    }\n\n    if (element.getAttribute('data-poster')) {\n      element.poster = element.getAttribute('data-poster')\n    }\n\n    if (element.getAttribute('data-src')) {\n      element.src = element.getAttribute('data-src')\n    }\n\n    if (element.getAttribute('data-srcset')) {\n      element.setAttribute('srcset', element.getAttribute('data-srcset'))\n    }\n\n    let backgroundImageDelimiter = ','\n    if (element.getAttribute('data-background-delimiter')) {\n      backgroundImageDelimiter = element.getAttribute('data-background-delimiter')\n    }\n\n    if (element.getAttribute('data-background-image')) {\n      element.style.backgroundImage = `url('${element.getAttribute('data-background-image').split(backgroundImageDelimiter).join('\\'),url(\\'')}')`\n    } else if (element.getAttribute('data-background-image-set')) {\n      const imageSetLinks = element.getAttribute('data-background-image-set').split(backgroundImageDelimiter)\n      let firstUrlLink = (imageSetLinks[0].substr(0, imageSetLinks[0].indexOf(' ')) || imageSetLinks[0]) // Substring before ... 1x\n      firstUrlLink = firstUrlLink.indexOf('url(') === -1 ? `url(${firstUrlLink})` : firstUrlLink\n      if (imageSetLinks.length === 1) {\n        element.style.backgroundImage = firstUrlLink\n      } else {\n        element.setAttribute('style', (element.getAttribute('style') || '') + `background-image: ${firstUrlLink}; background-image: -webkit-image-set(${imageSetLinks}); background-image: image-set(${imageSetLinks})`)\n      }\n    }\n\n    if (element.getAttribute('data-toggle-class')) {\n      element.classList.toggle(element.getAttribute('data-toggle-class'))\n    }\n  },\n  loaded() {}\n}\n\nfunction markAsLoaded(element) {\n  element.setAttribute('data-loaded', true)\n}\n\nfunction preLoad(element) {\n  if (element.getAttribute('data-placeholder-background')) {\n    element.style.background = element.getAttribute('data-placeholder-background')\n  }\n}\n\nconst isLoaded = element => element.getAttribute('data-loaded') === 'true'\n\nconst onIntersection = (load, loaded) => (entries, observer) => {\n  entries.forEach(entry => {\n    if (entry.intersectionRatio > 0 || entry.isIntersecting) {\n      observer.unobserve(entry.target)\n\n      if (!isLoaded(entry.target)) {\n        load(entry.target)\n        markAsLoaded(entry.target)\n        loaded(entry.target)\n      }\n    }\n  })\n}\n\nconst onMutation = load => entries => {\n  entries.forEach(entry => {\n    if (isLoaded(entry.target) && entry.type === 'attributes' && validAttribute.indexOf(entry.attributeName) > -1) {\n      load(entry.target)\n    }\n  })\n}\n\nconst getElements = (selector, root = document) => {\n  if (selector instanceof Element) {\n    return [selector]\n  }\n\n  if (selector instanceof NodeList) {\n    return selector\n  }\n\n  return root.querySelectorAll(selector)\n}\n\nexport default function (selector = '.lozad', options = {}) {\n  const {root, rootMargin, threshold, enableAutoReload, load, loaded} = Object.assign({}, defaultConfig, options)\n  let observer\n  let mutationObserver\n  if (support('IntersectionObserver')) {\n    observer = new IntersectionObserver(onIntersection(load, loaded), {\n      root,\n      rootMargin,\n      threshold\n    })\n  }\n\n  if (support('MutationObserver') && enableAutoReload) {\n    mutationObserver = new MutationObserver(onMutation(load, loaded))\n  }\n\n  const elements = getElements(selector, root)\n  for (let i = 0; i < elements.length; i++) {\n    preLoad(elements[i])\n  }\n\n  return {\n    observe() {\n      const elements = getElements(selector, root)\n\n      for (let i = 0; i < elements.length; i++) {\n        if (isLoaded(elements[i])) {\n          continue\n        }\n\n        if (observer) {\n          if (mutationObserver && enableAutoReload) {\n            mutationObserver.observe(elements[i], {subtree: true, attributes: true, attributeFilter: validAttribute})\n          }\n\n          observer.observe(elements[i])\n          continue\n        }\n\n        load(elements[i])\n        markAsLoaded(elements[i])\n        loaded(elements[i])\n      }\n    },\n    triggerLoad(element) {\n      if (isLoaded(element)) {\n        return\n      }\n\n      load(element)\n      markAsLoaded(element)\n      loaded(element)\n    },\n    observer,\n    mutationObserver\n  }\n}\n"
  },
  {
    "path": "test/index.js",
    "content": "require('jsdom-global')()\nconst assert = require('assert')\nconst lozad = require('../dist/lozad.js')\n\ndescribe('lozad', () => {\n  describe('#lozad', () => {\n    it('should be a function', () => {\n      assert.strictEqual('function', typeof lozad)\n    })\n  })\n\n  describe('#lozad return value', () => {\n    it('should be an object', () => {\n      const observer = lozad()\n      assert.strictEqual('object', typeof observer)\n    })\n\n    it('should expose observe API', () => {\n      const observer = lozad()\n      assert.strictEqual('function', typeof observer.observe)\n    })\n  })\n\n  describe('images inside viewport without class lozad', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      image.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      document.body.appendChild(image)\n    })\n\n    it('should not load image', () => {\n      const observer = lozad()\n      observer.observe()\n      const image = document.querySelectorAll('img')[0]\n      assert.strictEqual(undefined, image.dataset.loaded)\n    })\n  })\n\n  describe('images inside viewport with class lozad', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      image.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      image.setAttribute('class', 'lozad')\n      document.body.appendChild(image)\n    })\n\n    it('should not load an image till observe function is called', () => {\n      lozad()\n      const image = document.querySelectorAll('img')[0]\n      assert.strictEqual(undefined, image.dataset.loaded)\n    })\n\n    it('should load an image after observe function is called', () => {\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(image.getAttribute('src'), image.dataset.src)\n    })\n  })\n\n  describe('images inside viewport with different class', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      image.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      document.body.appendChild(image)\n    })\n\n    it('should load the image', () => {\n      const className = 'test-class'\n      const observer = lozad('.' + className)\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', className)\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(image.getAttribute('src'), image.dataset.src)\n    })\n  })\n\n  describe('images inside viewport using a DOM `Element` reference', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      image.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      document.body.appendChild(image)\n    })\n\n    it('should load the image', () => {\n      const node = document.querySelector('img')\n      const newSrc = Math.random()\n        .toString(36)\n        .substring(7)\n      const observer = lozad(node)\n      observer.observe()\n      assert.strictEqual('true', node.dataset.loaded)\n      assert.strictEqual(node.getAttribute('src'), node.dataset.src)\n      node.dataset.src = newSrc\n      setTimeout(() => {\n        assert.notStrictEqual(node.getAttribute('src'), newSrc)\n      }, 2000)\n    })\n\n    it('should load the new image when sets enableAutoReload true and validating attributes changes', () => {\n      const node = document.querySelector('img')\n      const newSrc = Math.random()\n        .toString(36)\n        .substring(7)\n      const observer = lozad(node, {\n        enableAutoReload: true\n      })\n      observer.observe()\n      node.dataset.src = newSrc\n      setTimeout(() => {\n        assert.strictEqual(node.getAttribute('src'), newSrc)\n      }, 2000)\n    })\n  })\n\n  describe('images inside viewport using a DOM `NodeList` reference', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      image.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      document.body.appendChild(image)\n      const imageTwo = document.createElement('img')\n      imageTwo.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      document.body.appendChild(imageTwo)\n    })\n\n    it('should load the images', () => {\n      const nodes = document.querySelectorAll('img')\n      const observer = lozad(nodes)\n      observer.observe()\n      assert.strictEqual(nodes.length, 2)\n      nodes.forEach(node => {\n        assert.strictEqual('true', node.dataset.loaded)\n        assert.strictEqual(node.getAttribute('src'), node.dataset.src)\n      })\n    })\n  })\n\n  describe('images inside viewport with different attributes', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      document.body.appendChild(image)\n    })\n\n    it('should load the image with data-srcset attribute', () => {\n      const dataSrcSetAttr = 'test-srcset'\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      image.setAttribute('data-srcset', dataSrcSetAttr)\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(image.getAttribute('srcset'), dataSrcSetAttr)\n    })\n\n    it('should load the image with data-background-image attribute', () => {\n      const bgImageAttr = 'test-bg-image'\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      image.setAttribute('data-background-image', bgImageAttr)\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(\n        image.style.backgroundImage,\n        'url(' + bgImageAttr + ')'\n      )\n    })\n    // Handle a single image src\n    it('should load the image with data-background-image-set attribute', () => {\n      const bgImageSetAttr = 'url(\"photo.jpg\")'\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      image.setAttribute('data-background-image-set', bgImageSetAttr)\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(\n        image.style.cssText,\n        'background-image: url(photo.jpg);'\n      )\n    })\n    // Handle a single image set\n    it('should load the image with data-background-image-set attribute', () => {\n      const bgImageSetAttr = 'url(\"photo.jpg\") 1x, url(\"photo@2x.jpg\") 2x'\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      image.style.background = 'white'\n      image.setAttribute('data-background-image-set', bgImageSetAttr)\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(\n        image.getAttribute('style'),\n        'background: white;background-image: url(\"photo.jpg\"); background-image: -webkit-image-set(url(\"photo.jpg\") 1x, url(\"photo@2x.jpg\") 2x); background-image: image-set(url(\"photo.jpg\") 1x, url(\"photo@2x.jpg\") 2x)'\n      )\n    })\n    // Handle a single image set\n    it('should load the image with data-background-image-set attribute', () => {\n      const bgImageSetAttr = 'url(\"photo.jpg\") 1x'\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      image.setAttribute('data-background-image-set', bgImageSetAttr)\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(\n        image.style.cssText,\n        'background-image: url(photo.jpg);'\n      )\n    })\n    // Handle image background placeholder\n    it('should load the image with data-placeholder-background attribute', () => {\n      const image = document.querySelectorAll('img')[0]\n      const bgImageSetAttr = 'red'\n      image.setAttribute('class', 'lozad')\n      image.setAttribute('data-placeholder-background', bgImageSetAttr)\n      const observer = lozad()\n      observer.observe()\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(image.style.cssText, 'background: red;')\n    })\n  })\n\n  describe('when passing options', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      image.dataset.src = Math.random()\n        .toString(36)\n        .substring(7)\n      document.body.appendChild(image)\n    })\n\n    it('should not load elements by default when custom load option is passed in', () => {\n      const observer = lozad('.lozad', {\n        load(element) {\n          element.classList.add('loaded')\n        }\n      })\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      observer.observe()\n      assert.strictEqual(true, image.classList.contains('loaded'))\n      assert.strictEqual(null, image.getAttribute('src'))\n    })\n\n    it('should run loaded option after loading an element', () => {\n      const observer = lozad('.lozad', {\n        loaded(element) {\n          element.classList.add('loaded')\n        }\n      })\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      observer.observe()\n      assert.strictEqual(true, image.classList.contains('loaded'))\n    })\n\n    it('should set data attribute when loaded option is passed in', () => {\n      const observer = lozad('.lozad', {\n        loaded(element) {\n          element.classList.add('loaded')\n        }\n      })\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      observer.observe()\n      assert.strictEqual(true, image.classList.contains('loaded'))\n      assert.strictEqual('true', image.dataset.loaded)\n    })\n  })\n\n  describe('public API functions', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const image = document.createElement('img')\n      const src = Math.random()\n        .toString(36)\n        .substring(7)\n      image.dataset.src = src\n      document.body.appendChild(image)\n    })\n\n    it('should load image via triggerLoad function', () => {\n      const dataSrcSetAttr = 'test-srcset'\n      const observer = lozad()\n      const image = document.querySelectorAll('img')[0]\n      image.setAttribute('class', 'lozad')\n      image.setAttribute('data-srcset', dataSrcSetAttr)\n      observer.triggerLoad(image)\n      assert.strictEqual('true', image.dataset.loaded)\n      assert.strictEqual(image.getAttribute('src'), image.dataset.src)\n    })\n  })\n\n  describe('picture inside viewport with different class', () => {\n    const src = Math.random()\n      .toString(36)\n      .substring(7)\n\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const picture = document.createElement('picture')\n      picture.setAttribute('data-alt', 'alt text')\n      const source = document.createElement('source')\n      source.setAttribute('srcset', src)\n      picture.appendChild(source)\n      document.body.appendChild(picture)\n    })\n\n    it('should load the picture', () => {\n      const className = 'test-class'\n      const observer = lozad('.' + className)\n      const picture = document.querySelectorAll('picture')[0]\n      picture.setAttribute('class', className)\n      observer.observe()\n      assert.strictEqual('true', picture.dataset.loaded)\n    })\n\n    it('should append image after last source', () => {\n      const className = 'test-class'\n      const observer = lozad('.' + className)\n      const picture = document.querySelectorAll('picture')[0]\n      picture.setAttribute('class', className)\n      observer.observe()\n\n      const img = picture.children[1]\n      assert.strictEqual('IMG', img.tagName)\n    })\n\n    it('should add alt attribute to image', () => {\n      const className = 'test-class'\n      const observer = lozad('.' + className)\n      const picture = document.querySelectorAll('picture')[0]\n      picture.setAttribute('class', className)\n      observer.observe()\n\n      const img = picture.children[1]\n      assert.strictEqual('alt text', img.getAttribute('alt'))\n    })\n\n    it('should use img tag if inside the picture', () => {\n      const className = 'test-class'\n      const observer = lozad('.' + className)\n      const picture = document.querySelectorAll('picture')[0]\n      picture.setAttribute('class', className)\n\n      const initialImage = document.createElement('img')\n      initialImage.setAttribute('customAttribute', 'custom value')\n      picture.appendChild(initialImage)\n      observer.observe()\n\n      const img = picture.children[1]\n      assert.strictEqual(\n        initialImage.getAttribute('customAttribute'),\n        img.getAttribute('customAttribute')\n      )\n    })\n  })\n\n  describe('toggle class', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const el = document.createElement('div')\n      el.dataset.toggleClass = 'test'\n      el.setAttribute('class', 'lozad')\n      document.body.appendChild(el)\n    })\n\n    it('should not toggle till observe function is called', () => {\n      lozad()\n      const el = document.querySelectorAll('div')[0]\n      assert.strictEqual(false, el.classList.contains('test'))\n    })\n\n    it('should toggle after observe function is called', () => {\n      const observer = lozad()\n      const el = document.querySelectorAll('div')[0]\n      observer.observe()\n      assert.strictEqual(true, el.classList.contains('test'))\n    })\n  })\n\n  describe('video', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const el = document.createElement('video')\n      el.dataset.toggleClass = 'test'\n      el.setAttribute('class', 'lozad')\n      el.setAttribute('data-poster', 'test')\n      document.body.appendChild(el)\n      window.HTMLMediaElement.prototype.load = () => {\n        /* Do nothing */\n      }\n    })\n\n    it('should not toggle till observe function is called', () => {\n      lozad()\n      const el = document.querySelectorAll('video')[0]\n      assert.strictEqual(false, el.classList.contains('test'))\n    })\n\n    it('should toggle class and poster value after observe function is called', () => {\n      const observer = lozad()\n      const el = document.querySelectorAll('video')[0]\n      observer.observe()\n      assert.strictEqual(true, el.classList.contains('test'))\n      assert.strictEqual(el.dataset.poster, el.poster)\n    })\n  })\n\n  describe('exported IntersectionObserver and MutationObserver', () => {\n    beforeEach(() => {\n      document.body.innerHTML = ''\n      const el = document.createElement('div')\n      el.dataset.toggleClass = 'test'\n      el.setAttribute('class', 'lozad')\n      document.body.appendChild(el)\n    })\n\n    it('should export the IntersectionObserver instance and MutationObserver instance', () => {\n      const observer = lozad()\n\n      assert.strictEqual(true, Object.keys(observer).includes('observer'))\n      assert.strictEqual(\n        true,\n        Object.keys(observer).includes('mutationObserver')\n      )\n    })\n  })\n})\n"
  }
]