diff --git a/dist/barba.js b/dist/barba.js index a09719e5..ff2b7686 100644 --- a/dist/barba.js +++ b/dist/barba.js @@ -1342,7 +1342,7 @@ return /******/ (function(modules) { // webpackBootstrap return false; //Ignore case where there is download attribute - if (element.getAttribute && typeof element.download === 'string') + if (element.getAttribute && typeof element.getAttribute('download') === 'string') return false; //In case you're trying to load the same page diff --git a/dist/barba.js.map b/dist/barba.js.map index 0d89e915..9efc30cc 100644 --- a/dist/barba.js.map +++ b/dist/barba.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 1ec513ea378a5d91479a","webpack:///./index.js","webpack:///../~/promise-polyfill/promise.js","webpack:///../~/timers-browserify/main.js","webpack:///../~/process/browser.js","webpack:///./Transition/BaseTransition.js","webpack:///./Utils/Utils.js","webpack:///./View/BaseView.js","webpack:///./Dispatcher/Dispatcher.js","webpack:///./Cache/BaseCache.js","webpack:///./Pjax/HistoryManager.js","webpack:///./Pjax/Pjax.js","webpack:///./Transition/HideShowTransition.js","webpack:///./Pjax/Dom.js","webpack:///./Pjax/Prefetch.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClBA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kEAAiE;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA,kDAAiD,SAAS;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA,sBAAqB,iBAAiB;AACtC;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,2CAA0C,SAAS;AACnD;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,iBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA,EAAC;;;;;;;;ACpOD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA,G;;;;;;;AC3EA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;AACA;AACA,6BAA4B,UAAU;;;;;;;ACtHtC;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc,QAAQ;AACtB,eAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;;AAEA;;;;;;;ACxFA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,IAAI;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;ACxIA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzGA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA,aAAY;;AAEZ;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,KAAK;AACnB;AACA,yBAAwB;AACxB;AACA;;AAEA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;;AAEA;;;;;;;AC3DA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA,WAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,EAAE;AACf;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7DA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;AC5DA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,WAAW;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,WAAW;AACzB,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,EAAC;;AAED;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC1JA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","file":"barba.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Barba\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Barba\"] = factory();\n\telse\n\t\troot[\"Barba\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"http://localhost:8080/dist\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 1ec513ea378a5d91479a\n **/","//Promise polyfill https://github.com/taylorhakes/promise-polyfill\n\nif (typeof Promise !== 'function') {\n window.Promise = require('promise-polyfill');\n}\n\nvar Barba = {\n version: '1.0.0',\n BaseTransition: require('./Transition/BaseTransition'),\n BaseView: require('./View/BaseView'),\n BaseCache: require('./Cache/BaseCache'),\n Dispatcher: require('./Dispatcher/Dispatcher'),\n HistoryManager: require('./Pjax/HistoryManager'),\n Pjax: require('./Pjax/Pjax'),\n Prefetch: require('./Pjax/Prefetch'),\n Utils: require('./Utils/Utils')\n};\n\nmodule.exports = Barba;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","(function (root) {\n\n // Store setTimeout reference so promise-polyfill will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var setTimeoutFunc = setTimeout;\n\n function noop() {\n }\n\n // Use polyfill for setImmediate for performance gains\n var asap = (typeof setImmediate === 'function' && setImmediate) ||\n function (fn) {\n setTimeoutFunc(fn, 0);\n };\n\n var onUnhandledRejection = function onUnhandledRejection(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n };\n\n // Polyfill for Function.prototype.bind\n function bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n }\n\n function Promise(fn) {\n if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n\n doResolve(fn, this);\n }\n\n function handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n asap(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n }\n\n function resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n }\n\n function reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n }\n\n function finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n asap(function() {\n if (!self._handled) {\n onUnhandledRejection(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n }\n\n function Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n }\n\n /**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\n function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }\n\n Promise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n };\n\n Promise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new (this.constructor)(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n };\n\n Promise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n };\n\n Promise.resolve = function (value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function (resolve) {\n resolve(value);\n });\n };\n\n Promise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n };\n\n Promise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n };\n\n /**\n * Set the immediate function to execute callbacks\n * @param fn {function} Function to execute\n * @private\n */\n Promise._setImmediateFn = function _setImmediateFn(fn) {\n asap = fn;\n };\n\n Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n onUnhandledRejection = fn;\n };\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Promise;\n } else if (!root.Promise) {\n root.Promise = Promise;\n }\n\n})(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/promise-polyfill/promise.js\n ** module id = 1\n ** module chunks = 0\n **/","var nextTick = require('process/browser.js').nextTick;\nvar apply = Function.prototype.apply;\nvar slice = Array.prototype.slice;\nvar immediateIds = {};\nvar nextImmediateId = 0;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) { timeout.close(); };\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// That's not how node.js implements it but the exposed api is the same.\nexports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n var id = nextImmediateId++;\n var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\n immediateIds[id] = true;\n\n nextTick(function onNextTick() {\n if (immediateIds[id]) {\n // fn.call() is faster so we optimize for the common use-case\n // @see http://jsperf.com/call-apply-segu\n if (args) {\n fn.apply(null, args);\n } else {\n fn.call(null);\n }\n // Prevent ids from leaking\n exports.clearImmediate(id);\n }\n });\n\n return id;\n};\n\nexports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n delete immediateIds[id];\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/timers-browserify/main.js\n ** module id = 2\n ** module chunks = 0\n **/","// shim for using process in browser\n\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\n(function () {\n try {\n cachedSetTimeout = setTimeout;\n } catch (e) {\n cachedSetTimeout = function () {\n throw new Error('setTimeout is not defined');\n }\n }\n try {\n cachedClearTimeout = clearTimeout;\n } catch (e) {\n cachedClearTimeout = function () {\n throw new Error('clearTimeout is not defined');\n }\n }\n} ())\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = cachedSetTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n cachedClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n cachedSetTimeout(drainQueue, 0);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 3\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils.js');\n\n/**\n * BaseTransition to extend\n *\n * @namespace Barba.BaseTransition\n * @type {Object}\n */\nvar BaseTransition = {\n /**\n * @memberOf Barba.BaseTransition\n * @type {HTMLElement}\n */\n oldContainer: undefined,\n\n /**\n * @memberOf Barba.BaseTransition\n * @type {HTMLElement}\n */\n newContainer: undefined,\n\n /**\n * @memberOf Barba.BaseTransition\n * @type {Promise}\n */\n newContainerLoading: undefined,\n\n /**\n * Helper to extend the object\n *\n * @memberOf Barba.BaseTransition\n * @param {Object} newObject\n * @return {Object} newInheritObject\n */\n extend: function(obj){\n return Utils.extend(this, obj);\n },\n\n /**\n * This function is called from Pjax module to initialize\n * the transition.\n *\n * @memberOf Barba.BaseTransition\n * @private\n * @param {HTMLElement} oldContainer\n * @param {Promise} newContainer\n * @return {Promise}\n */\n init: function(oldContainer, newContainer) {\n var _this = this;\n\n this.oldContainer = oldContainer;\n this._newContainerPromise = newContainer;\n\n this.deferred = Utils.deferred();\n this.newContainerReady = Utils.deferred();\n this.newContainerLoading = this.newContainerReady.promise;\n\n this.start();\n\n this._newContainerPromise.then(function(newContainer) {\n _this.newContainer = newContainer;\n _this.newContainerReady.resolve();\n });\n\n return this.deferred.promise;\n },\n\n /**\n * This function needs to be called as soon the Transition is finished\n *\n * @memberOf Barba.BaseTransition\n */\n done: function() {\n this.oldContainer.parentNode.removeChild(this.oldContainer);\n this.newContainer.style.visibility = 'visible';\n this.deferred.resolve();\n },\n\n /**\n * Constructor for your Transition\n *\n * @memberOf Barba.BaseTransition\n * @abstract\n */\n start: function() {},\n};\n\nmodule.exports = BaseTransition;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Transition/BaseTransition.js\n ** module id = 4\n ** module chunks = 0\n **/","/**\n * Just an object with some helpful functions\n *\n * @type {Object}\n * @namespace Barba.Utils\n */\nvar Utils = {\n /**\n * Return the current url\n *\n * @memberOf Barba.Utils\n * @return {String} currentUrl\n */\n getCurrentUrl: function() {\n return window.location.protocol + '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n },\n\n /**\n * Given an url, return it without the hash\n *\n * @memberOf Barba.Utils\n * @private\n * @param {String} url\n * @return {String} newCleanUrl\n */\n cleanLink: function(url) {\n return url.replace(/#.*/, '');\n },\n\n /**\n * Time in millisecond after the xhr request goes in timeout\n *\n * @memberOf Barba.Utils\n * @type {Number}\n * @default\n */\n xhrTimeout: 5000,\n\n /**\n * Start an XMLHttpRequest() and return a Promise\n *\n * @memberOf Barba.Utils\n * @param {String} url\n * @return {Promise}\n */\n xhr: function(url) {\n var deferred = this.deferred();\n var req = new XMLHttpRequest();\n\n req.onreadystatechange = function() {\n if (req.readyState === 4) {\n if (req.status === 200) {\n return deferred.resolve(req.responseText);\n } else {\n return deferred.reject(new Error('xhr: HTTP code is not 200'));\n }\n }\n };\n\n req.ontimeout = function() {\n return deferred.reject(new Error('xhr: Timeout exceeded'));\n };\n\n req.open('GET', url);\n req.timeout = this.xhrTimeout;\n req.setRequestHeader('x-barba', 'yes');\n req.send();\n\n return deferred.promise;\n },\n\n /**\n * Get obj and props and return a new object with the property merged\n *\n * @memberOf Barba.Utils\n * @param {object} obj\n * @param {object} props\n * @return {object}\n */\n extend: function(obj, props) {\n var newObj = Object.create(obj);\n\n for(var prop in props) {\n if(props.hasOwnProperty(prop)) {\n newObj[prop] = props[prop];\n }\n }\n\n return newObj;\n },\n\n /**\n * Return a new \"Deferred\" object\n * https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred\n *\n * @memberOf Barba.Utils\n * @return {Deferred}\n */\n deferred: function() {\n return new function() {\n this.resolve = null;\n this.reject = null;\n\n this.promise = new Promise(function(resolve, reject) {\n this.resolve = resolve;\n this.reject = reject;\n }.bind(this));\n };\n },\n\n /**\n * Return the port number normalized, eventually you can pass a string to be normalized.\n *\n * @memberOf Barba.Utils\n * @private\n * @param {String} p\n * @return {Int} port\n */\n getPort: function(p) {\n var port = typeof p !== 'undefined' ? p : window.location.port;\n var protocol = window.location.protocol;\n\n if (port != '')\n return parseInt(port);\n\n if (protocol === 'http:')\n return 80;\n\n if (protocol === 'https:')\n return 443;\n }\n};\n\nmodule.exports = Utils;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Utils/Utils.js\n ** module id = 5\n ** module chunks = 0\n **/","var Dispatcher = require('../Dispatcher/Dispatcher');\nvar Utils = require('../Utils/Utils.js');\n\n/**\n * BaseView to be extended\n *\n * @namespace Barba.BaseView\n * @type {Object}\n */\nvar BaseView = {\n /**\n * Namespace of the view.\n * (need to be associated with the data-namespace of the container)\n *\n * @memberOf Barba.BaseView\n * @type {String}\n */\n namespace: null,\n\n /**\n * Helper to extend the object\n *\n * @memberOf Barba.BaseView\n * @param {Object} newObject\n * @return {Object} newInheritObject\n */\n extend: function(obj){\n return Utils.extend(this, obj);\n },\n\n /**\n * Init the view.\n * P.S. Is suggested to init the view before starting Barba.Pjax.start(),\n * in this way .onEnter() and .onEnterCompleted() will be fired for the current\n * container when the page is loaded.\n *\n * @memberOf Barba.BaseView\n */\n init: function() {\n var _this = this;\n\n Dispatcher.on('initStateChange',\n function(newStatus, oldStatus) {\n if (oldStatus && oldStatus.namespace === _this.namespace)\n _this.onLeave();\n }\n );\n\n Dispatcher.on('newPageReady',\n function(newStatus, oldStatus, container) {\n _this.container = container;\n\n if (newStatus.namespace === _this.namespace)\n _this.onEnter();\n }\n );\n\n Dispatcher.on('transitionCompleted',\n function(newStatus, oldStatus) {\n if (newStatus.namespace === _this.namespace)\n _this.onEnterCompleted();\n\n if (oldStatus && oldStatus.namespace === _this.namespace)\n _this.onLeaveCompleted();\n }\n );\n },\n\n /**\n * This function will be fired when the container\n * is ready and attached to the DOM.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onEnter: function() {},\n\n /**\n * This function will be fired when the transition\n * to this container has just finished.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onEnterCompleted: function() {},\n\n /**\n * This function will be fired when the transition\n * to a new container has just started.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onLeave: function() {},\n\n /**\n * This function will be fired when the container\n * has just been removed from the DOM.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onLeaveCompleted: function() {}\n}\n\nmodule.exports = BaseView;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./View/BaseView.js\n ** module id = 6\n ** module chunks = 0\n **/","/**\n * Little Dispatcher inspired by MicroEvent.js\n *\n * @namespace Barba.Dispatcher\n * @type {Object}\n */\nvar Dispatcher = {\n /**\n * Object that keeps all the events\n *\n * @memberOf Barba.Dispatcher\n * @readOnly\n * @type {Object}\n */\n events: {},\n\n /**\n * Bind a callback to an event\n *\n * @memberOf Barba.Dispatcher\n * @param {String} eventName\n * @param {Function} function\n */\n on: function(e, f) {\n this.events[e] = this.events[e] || [];\n this.events[e].push(f);\n },\n\n /**\n * Unbind event\n *\n * @memberOf Barba.Dispatcher\n * @param {String} eventName\n * @param {Function} function\n */\n off: function(e, f) {\n if(e in this.events === false)\n return;\n\n this.events[e].splice(this.events[e].indexOf(f), 1);\n },\n\n /**\n * Fire the event running all the event associated to it\n *\n * @memberOf Barba.Dispatcher\n * @param {String} eventName\n * @param {...*} args\n */\n trigger: function(e) {//e, ...args\n if (e in this.events === false)\n return;\n\n for(var i = 0; i < this.events[e].length; i++){\n this.events[e][i].apply(this, Array.prototype.slice.call(arguments, 1));\n }\n }\n};\n\nmodule.exports = Dispatcher;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Dispatcher/Dispatcher.js\n ** module id = 7\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils.js');\n\n/**\n * BaseCache it's a simple static cache\n *\n * @namespace Barba.BaseCache\n * @type {Object}\n */\nvar BaseCache = {\n /**\n * The Object that keeps all the key value information\n *\n * @memberOf Barba.BaseCache\n * @type {Object}\n */\n data: {},\n\n /**\n * Helper to extend this object\n *\n * @memberOf Barba.BaseCache\n * @private\n * @param {Object} newObject\n * @return {Object} newInheritObject\n */\n extend: function(obj) {\n return Utils.extend(this, obj);\n },\n\n /**\n * Set a key and value data, mainly Barba is going to save promises\n *\n * @memberOf Barba.BaseCache\n * @param {String} key\n * @param {*} value\n */\n set: function(key, val) {\n this.data[key] = val;\n },\n\n /**\n * Retrieve the data using the key\n *\n * @memberOf Barba.BaseCache\n * @param {String} key\n * @return {*}\n */\n get: function(key) {\n return this.data[key];\n },\n\n /**\n * Flush the cache\n *\n * @memberOf Barba.BaseCache\n */\n reset: function() {\n this.data = {};\n }\n};\n\nmodule.exports = BaseCache;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Cache/BaseCache.js\n ** module id = 8\n ** module chunks = 0\n **/","/**\n * HistoryManager helps to keep track of the navigation\n *\n * @namespace Barba.HistoryManager\n * @type {Object}\n */\nvar HistoryManager = {\n /**\n * Keep track of the status in historic order\n *\n * @memberOf Barba.HistoryManager\n * @readOnly\n * @type {Array}\n */\n history: [],\n\n /**\n * Add a new set of url and namespace\n *\n * @memberOf Barba.HistoryManager\n * @param {String} url\n * @param {String} namespace\n * @private\n */\n add: function(url, namespace) {\n if (!namespace)\n namespace = undefined;\n\n this.history.push({\n url: url,\n namespace: namespace\n });\n },\n\n /**\n * Return information about the current status\n *\n * @memberOf Barba.HistoryManager\n * @return {Object}\n */\n currentStatus: function() {\n return this.history[this.history.length - 1];\n },\n\n /**\n * Return information about the previous status\n *\n * @memberOf Barba.HistoryManager\n * @return {Object}\n */\n prevStatus: function() {\n var history = this.history;\n\n if (history.length < 2)\n return null;\n\n return history[history.length - 2];\n }\n};\n\nmodule.exports = HistoryManager;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/HistoryManager.js\n ** module id = 9\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils');\nvar Dispatcher = require('../Dispatcher/Dispatcher');\nvar HideShowTransition = require('../Transition/HideShowTransition');\nvar BaseCache = require('../Cache/BaseCache');\n\nvar HistoryManager = require('./HistoryManager');\nvar Dom = require('./Dom');\n\n/**\n * Pjax is a static object with main function\n *\n * @namespace Barba.Pjax\n * @borrows Dom as Dom\n * @type {Object}\n */\nvar Pjax = {\n Dom: Dom,\n History: HistoryManager,\n Cache: BaseCache,\n\n /**\n * Indicate wether or not use the cache\n *\n * @memberOf Barba.Pjax\n * @type {Boolean}\n * @default\n */\n cacheEnabled: true,\n\n /**\n * Indicate if there is an animation in progress\n *\n * @memberOf Barba.Pjax\n * @readOnly\n * @type {Boolean}\n */\n transitionProgress: false,\n\n /**\n * Class name used to ignore links\n *\n * @memberOf Barba.Pjax\n * @type {String}\n * @default\n */\n ignoreClassLink: 'no-barba',\n\n /**\n * Function to be called to start Pjax\n *\n * @memberOf Barba.Pjax\n */\n start: function() {\n this.init();\n },\n\n /**\n * Init the events\n *\n * @memberOf Barba.Pjax\n * @private\n */\n init: function() {\n var container = this.Dom.getContainer();\n var wrapper = this.Dom.getWrapper();\n\n wrapper.setAttribute('aria-live', 'polite');\n\n this.History.add(\n this.getCurrentUrl(),\n this.Dom.getNamespace(container)\n );\n\n //Fire for the current view.\n Dispatcher.trigger('initStateChange', this.History.currentStatus());\n Dispatcher.trigger('newPageReady',\n this.History.currentStatus(),\n {},\n container,\n this.Dom.currentHTML\n );\n Dispatcher.trigger('transitionCompleted', this.History.currentStatus());\n\n this.bindEvents();\n },\n\n /**\n * Attach the eventlisteners\n *\n * @memberOf Barba.Pjax\n * @private\n */\n bindEvents: function() {\n document.addEventListener('click',\n this.onLinkClick.bind(this)\n );\n\n window.addEventListener('popstate',\n this.onStateChange.bind(this)\n );\n },\n\n /**\n * Return the currentURL cleaned\n *\n * @memberOf Barba.Pjax\n * @return {String} currentUrl\n */\n getCurrentUrl: function() {\n return Utils.cleanLink(\n Utils.getCurrentUrl()\n );\n },\n\n /**\n * Change the URL with pushstate and trigger the state change\n *\n * @memberOf Barba.Pjax\n * @param {String} newUrl\n */\n goTo: function(url) {\n window.history.pushState(null, null, url);\n this.onStateChange();\n },\n\n /**\n * Force the browser to go to a certain url\n *\n * @memberOf Barba.Pjax\n * @param {String} url\n * @private\n */\n forceGoTo: function(url) {\n window.location = url;\n },\n\n /**\n * Load an url, will start an xhr request or load from the cache\n *\n * @memberOf Barba.Pjax\n * @private\n * @param {String} url\n * @return {Promise}\n */\n load: function(url) {\n var deferred = Utils.deferred();\n var _this = this;\n var xhr;\n\n xhr = this.Cache.get(url);\n\n if (!xhr) {\n xhr = Utils.xhr(url);\n this.Cache.set(url, xhr);\n }\n\n xhr.then(\n function(data) {\n var container = _this.Dom.parseResponse(data);\n\n _this.Dom.putContainer(container);\n\n if (!_this.cacheEnabled)\n _this.Cache.reset();\n\n deferred.resolve(container);\n },\n function() {\n //Something went wrong (timeout, 404, 505...)\n _this.forceGoTo(url);\n\n deferred.reject();\n }\n );\n\n return deferred.promise;\n },\n\n /**\n * Get the .href parameter out of an element\n * and handle special cases (like xlink:href)\n *\n * @private\n * @memberOf Barba.Pjax\n * @param {HTMLElement} el\n * @return {String} href\n */\n getHref: function(el) {\n if (!el) {\n return undefined;\n }\n\n if (el.getAttribute && typeof el.getAttribute('xlink:href') === 'string') {\n return el.getAttribute('xlink:href');\n }\n\n if (typeof el.href === 'string') {\n return el.href;\n }\n\n return undefined;\n },\n\n /**\n * Callback called from click event\n *\n * @memberOf Barba.Pjax\n * @private\n * @param {MouseEvent} evt\n */\n onLinkClick: function(evt) {\n var el = evt.target;\n\n //Go up in the nodelist until we\n //find something with an href\n while (el && !this.getHref(el)) {\n el = el.parentNode;\n }\n\n if (this.preventCheck(evt, el)) {\n evt.stopPropagation();\n evt.preventDefault();\n\n Dispatcher.trigger('linkClicked', el, evt);\n\n var href = this.getHref(el);\n this.goTo(href);\n }\n },\n\n /**\n * Determine if the link should be followed\n *\n * @memberOf Barba.Pjax\n * @param {MouseEvent} evt\n * @param {HTMLElement} element\n * @return {Boolean}\n */\n preventCheck: function(evt, element) {\n if (!window.history.pushState)\n return false;\n\n var href = this.getHref(element);\n\n //User\n if (!element || !href)\n return false;\n\n //Middle click, cmd click, and ctrl click\n if (evt.which > 1 || evt.metaKey || evt.ctrlKey || evt.shiftKey || evt.altKey)\n return false;\n\n //Ignore target with _blank target\n if (element.target && element.target === '_blank')\n return false;\n\n //Check if it's the same domain\n if (window.location.protocol !== element.protocol || window.location.hostname !== element.hostname)\n return false;\n\n //Check if the port is the same\n if (Utils.getPort() !== Utils.getPort(element.port))\n return false;\n\n //Ignore case when a hash is being tacked on the current URL\n if (href.indexOf('#') > -1)\n return false;\n\n //Ignore case where there is download attribute\n if (element.getAttribute && typeof element.download === 'string')\n return false;\n\n //In case you're trying to load the same page\n if (Utils.cleanLink(href) == Utils.cleanLink(location.href))\n return false;\n\n if (element.classList.contains(this.ignoreClassLink))\n return false;\n\n return true;\n },\n\n /**\n * Return a transition object\n *\n * @memberOf Barba.Pjax\n * @return {Barba.Transition} Transition object\n */\n getTransition: function() {\n //User customizable\n return HideShowTransition;\n },\n\n /**\n * Method called after a 'popstate' or from .goTo()\n *\n * @memberOf Barba.Pjax\n * @private\n */\n onStateChange: function() {\n var newUrl = this.getCurrentUrl();\n\n if (this.transitionProgress)\n this.forceGoTo(newUrl);\n\n if (this.History.currentStatus().url === newUrl)\n return false;\n\n this.History.add(newUrl);\n\n var newContainer = this.load(newUrl);\n var transition = Object.create(this.getTransition());\n\n this.transitionProgress = true;\n\n Dispatcher.trigger('initStateChange',\n this.History.currentStatus(),\n this.History.prevStatus()\n );\n\n var transitionInstance = transition.init(\n this.Dom.getContainer(),\n newContainer\n );\n\n newContainer.then(\n this.onNewContainerLoaded.bind(this)\n );\n\n transitionInstance.then(\n this.onTransitionEnd.bind(this)\n );\n },\n\n /**\n * Function called as soon the new container is ready\n *\n * @memberOf Barba.Pjax\n * @private\n * @param {HTMLElement} container\n */\n onNewContainerLoaded: function(container) {\n var currentStatus = this.History.currentStatus();\n currentStatus.namespace = this.Dom.getNamespace(container);\n\n Dispatcher.trigger('newPageReady',\n this.History.currentStatus(),\n this.History.prevStatus(),\n container,\n this.Dom.currentHTML\n );\n },\n\n /**\n * Function called as soon the transition is finished\n *\n * @memberOf Barba.Pjax\n * @private\n */\n onTransitionEnd: function() {\n this.transitionProgress = false;\n\n Dispatcher.trigger('transitionCompleted',\n this.History.currentStatus(),\n this.History.prevStatus()\n );\n }\n};\n\nmodule.exports = Pjax;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/Pjax.js\n ** module id = 10\n ** module chunks = 0\n **/","var BaseTransition = require('./BaseTransition');\n\n/**\n * Basic Transition object, wait for the new Container to be ready,\n * scroll top, and finish the transition (removing the old container and displaying the new one)\n *\n * @private\n * @namespace Barba.HideShowTransition\n * @augments Barba.BaseTransition\n */\nvar HideShowTransition = BaseTransition.extend({\n start: function() {\n this.newContainerLoading.then(this.finish.bind(this));\n },\n\n finish: function() {\n document.body.scrollTop = 0;\n this.done();\n }\n});\n\nmodule.exports = HideShowTransition;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Transition/HideShowTransition.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * Object that is going to deal with DOM parsing/manipulation\n *\n * @namespace Barba.Pjax.Dom\n * @type {Object}\n */\nvar Dom = {\n /**\n * The name of the data attribute on the container\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n * @default\n */\n dataNamespace: 'namespace',\n\n /**\n * Id of the main wrapper\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n * @default\n */\n wrapperId: 'barba-wrapper',\n\n /**\n * Class name used to identify the containers\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n * @default\n */\n containerClass: 'barba-container',\n\n /**\n * Full HTML String of the current page.\n * By default is the innerHTML of the initial loaded page.\n *\n * Each time a new page is loaded, the value is the response of the xhr call.\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n */\n currentHTML: document.documentElement.innerHTML,\n\n /**\n * Parse the responseText obtained from the xhr call\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {String} responseText\n * @return {HTMLElement}\n */\n parseResponse: function(responseText) {\n this.currentHTML = responseText;\n\n var wrapper = document.createElement('div');\n wrapper.innerHTML = responseText;\n\n var titleEl = wrapper.querySelector('title');\n\n if (titleEl)\n document.title = titleEl.textContent;\n\n return this.getContainer(wrapper);\n },\n\n /**\n * Get the main barba wrapper by the ID `wrapperId`\n *\n * @memberOf Barba.Pjax.Dom\n * @return {HTMLElement} element\n */\n getWrapper: function() {\n var wrapper = document.getElementById(this.wrapperId);\n\n if (!wrapper)\n throw new Error('Barba.js: wrapper not found!');\n\n return wrapper;\n },\n\n /**\n * Get the container on the current DOM,\n * or from an HTMLElement passed via argument\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n * @return {HTMLElement}\n */\n getContainer: function(element) {\n if (!element)\n element = document.body;\n\n if (!element)\n throw new Error('Barba.js: DOM not ready!');\n\n var container = this.parseContainer(element);\n\n if (container && container.jquery)\n container = container[0];\n\n if (!container)\n throw new Error('Barba.js: no container found');\n\n return container;\n },\n\n /**\n * Get the namespace of the container\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n * @return {String}\n */\n getNamespace: function(element) {\n if (element && element.dataset) {\n return element.dataset[this.dataNamespace];\n } else if (element) {\n return element.getAttribute('data-' + this.dataNamespace);\n }\n\n return null;\n },\n\n /**\n * Put the container on the page\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n */\n putContainer: function(element) {\n element.style.visibility = 'hidden';\n\n var wrapper = this.getWrapper();\n wrapper.appendChild(element);\n },\n\n /**\n * Get container selector\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n * @return {HTMLElement} element\n */\n parseContainer: function(element) {\n return element.querySelector('.' + this.containerClass);\n }\n};\n\nmodule.exports = Dom;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/Dom.js\n ** module id = 12\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils');\nvar Pjax = require('./Pjax');\n\n/**\n * Prefetch\n *\n * @namespace Barba.Prefetch\n * @type {Object}\n */\nvar Prefetch = {\n /**\n * Class name used to ignore prefetch on links\n *\n * @memberOf Barba.Prefetch\n * @type {String}\n * @default\n */\n ignoreClassLink: 'no-barba-prefetch',\n\n /**\n * Init the event listener on mouseover and touchstart\n * for the prefetch\n *\n * @memberOf Barba.Prefetch\n */\n init: function() {\n if (!window.history.pushState) {\n return false;\n }\n\n document.body.addEventListener('mouseover', this.onLinkEnter.bind(this));\n document.body.addEventListener('touchstart', this.onLinkEnter.bind(this));\n },\n\n /**\n * Callback for the mousehover/touchstart\n *\n * @memberOf Barba.Prefetch\n * @private\n * @param {Object} evt\n */\n onLinkEnter: function(evt) {\n var el = evt.target;\n\n while (el && !Pjax.getHref(el)) {\n el = el.parentNode;\n }\n\n if (!el || el.classList.contains(this.ignoreClassLink)) {\n return;\n }\n\n var url = Pjax.getHref(el);\n\n //Check if the link is elegible for Pjax\n if (Pjax.preventCheck(evt, el) && !Pjax.Cache.get(url)) {\n var xhr = Utils.xhr(url);\n Pjax.Cache.set(url, xhr);\n }\n }\n};\n\nmodule.exports = Prefetch;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/Prefetch.js\n ** module id = 13\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap e7fc33bf106238f6ba36","webpack:///./index.js","webpack:///../~/promise-polyfill/promise.js","webpack:///../~/timers-browserify/main.js","webpack:///../~/process/browser.js","webpack:///./Transition/BaseTransition.js","webpack:///./Utils/Utils.js","webpack:///./View/BaseView.js","webpack:///./Dispatcher/Dispatcher.js","webpack:///./Cache/BaseCache.js","webpack:///./Pjax/HistoryManager.js","webpack:///./Pjax/Pjax.js","webpack:///./Transition/HideShowTransition.js","webpack:///./Pjax/Dom.js","webpack:///./Pjax/Prefetch.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClBA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kEAAiE;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA,kDAAiD,SAAS;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA,sBAAqB,iBAAiB;AACtC;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,2CAA0C,SAAS;AACnD;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,iBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA,EAAC;;;;;;;;ACpOD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA,G;;;;;;;AC3EA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;AACA;AACA,6BAA4B,UAAU;;;;;;;ACtHtC;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc,QAAQ;AACtB,eAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;;AAEA;;;;;;;ACxFA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,IAAI;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;ACxIA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzGA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA,aAAY;;AAEZ;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,KAAK;AACnB;AACA,yBAAwB;AACxB;AACA;;AAEA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;;AAEA;;;;;;;AC3DA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA,WAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,EAAE;AACf;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7DA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;AC5DA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,WAAW;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,WAAW;AACzB,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,EAAC;;AAED;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC1JA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","file":"barba.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Barba\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Barba\"] = factory();\n\telse\n\t\troot[\"Barba\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"http://localhost:8080/dist\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap e7fc33bf106238f6ba36\n **/","//Promise polyfill https://github.com/taylorhakes/promise-polyfill\n\nif (typeof Promise !== 'function') {\n window.Promise = require('promise-polyfill');\n}\n\nvar Barba = {\n version: '1.0.0',\n BaseTransition: require('./Transition/BaseTransition'),\n BaseView: require('./View/BaseView'),\n BaseCache: require('./Cache/BaseCache'),\n Dispatcher: require('./Dispatcher/Dispatcher'),\n HistoryManager: require('./Pjax/HistoryManager'),\n Pjax: require('./Pjax/Pjax'),\n Prefetch: require('./Pjax/Prefetch'),\n Utils: require('./Utils/Utils')\n};\n\nmodule.exports = Barba;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","(function (root) {\n\n // Store setTimeout reference so promise-polyfill will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var setTimeoutFunc = setTimeout;\n\n function noop() {\n }\n\n // Use polyfill for setImmediate for performance gains\n var asap = (typeof setImmediate === 'function' && setImmediate) ||\n function (fn) {\n setTimeoutFunc(fn, 0);\n };\n\n var onUnhandledRejection = function onUnhandledRejection(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n };\n\n // Polyfill for Function.prototype.bind\n function bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n }\n\n function Promise(fn) {\n if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n\n doResolve(fn, this);\n }\n\n function handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n asap(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n }\n\n function resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n }\n\n function reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n }\n\n function finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n asap(function() {\n if (!self._handled) {\n onUnhandledRejection(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n }\n\n function Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n }\n\n /**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\n function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }\n\n Promise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n };\n\n Promise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new (this.constructor)(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n };\n\n Promise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n };\n\n Promise.resolve = function (value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function (resolve) {\n resolve(value);\n });\n };\n\n Promise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n };\n\n Promise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n };\n\n /**\n * Set the immediate function to execute callbacks\n * @param fn {function} Function to execute\n * @private\n */\n Promise._setImmediateFn = function _setImmediateFn(fn) {\n asap = fn;\n };\n\n Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n onUnhandledRejection = fn;\n };\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Promise;\n } else if (!root.Promise) {\n root.Promise = Promise;\n }\n\n})(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/promise-polyfill/promise.js\n ** module id = 1\n ** module chunks = 0\n **/","var nextTick = require('process/browser.js').nextTick;\nvar apply = Function.prototype.apply;\nvar slice = Array.prototype.slice;\nvar immediateIds = {};\nvar nextImmediateId = 0;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) { timeout.close(); };\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// That's not how node.js implements it but the exposed api is the same.\nexports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n var id = nextImmediateId++;\n var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\n immediateIds[id] = true;\n\n nextTick(function onNextTick() {\n if (immediateIds[id]) {\n // fn.call() is faster so we optimize for the common use-case\n // @see http://jsperf.com/call-apply-segu\n if (args) {\n fn.apply(null, args);\n } else {\n fn.call(null);\n }\n // Prevent ids from leaking\n exports.clearImmediate(id);\n }\n });\n\n return id;\n};\n\nexports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n delete immediateIds[id];\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/timers-browserify/main.js\n ** module id = 2\n ** module chunks = 0\n **/","// shim for using process in browser\n\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\n(function () {\n try {\n cachedSetTimeout = setTimeout;\n } catch (e) {\n cachedSetTimeout = function () {\n throw new Error('setTimeout is not defined');\n }\n }\n try {\n cachedClearTimeout = clearTimeout;\n } catch (e) {\n cachedClearTimeout = function () {\n throw new Error('clearTimeout is not defined');\n }\n }\n} ())\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = cachedSetTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n cachedClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n cachedSetTimeout(drainQueue, 0);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 3\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils.js');\n\n/**\n * BaseTransition to extend\n *\n * @namespace Barba.BaseTransition\n * @type {Object}\n */\nvar BaseTransition = {\n /**\n * @memberOf Barba.BaseTransition\n * @type {HTMLElement}\n */\n oldContainer: undefined,\n\n /**\n * @memberOf Barba.BaseTransition\n * @type {HTMLElement}\n */\n newContainer: undefined,\n\n /**\n * @memberOf Barba.BaseTransition\n * @type {Promise}\n */\n newContainerLoading: undefined,\n\n /**\n * Helper to extend the object\n *\n * @memberOf Barba.BaseTransition\n * @param {Object} newObject\n * @return {Object} newInheritObject\n */\n extend: function(obj){\n return Utils.extend(this, obj);\n },\n\n /**\n * This function is called from Pjax module to initialize\n * the transition.\n *\n * @memberOf Barba.BaseTransition\n * @private\n * @param {HTMLElement} oldContainer\n * @param {Promise} newContainer\n * @return {Promise}\n */\n init: function(oldContainer, newContainer) {\n var _this = this;\n\n this.oldContainer = oldContainer;\n this._newContainerPromise = newContainer;\n\n this.deferred = Utils.deferred();\n this.newContainerReady = Utils.deferred();\n this.newContainerLoading = this.newContainerReady.promise;\n\n this.start();\n\n this._newContainerPromise.then(function(newContainer) {\n _this.newContainer = newContainer;\n _this.newContainerReady.resolve();\n });\n\n return this.deferred.promise;\n },\n\n /**\n * This function needs to be called as soon the Transition is finished\n *\n * @memberOf Barba.BaseTransition\n */\n done: function() {\n this.oldContainer.parentNode.removeChild(this.oldContainer);\n this.newContainer.style.visibility = 'visible';\n this.deferred.resolve();\n },\n\n /**\n * Constructor for your Transition\n *\n * @memberOf Barba.BaseTransition\n * @abstract\n */\n start: function() {},\n};\n\nmodule.exports = BaseTransition;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Transition/BaseTransition.js\n ** module id = 4\n ** module chunks = 0\n **/","/**\n * Just an object with some helpful functions\n *\n * @type {Object}\n * @namespace Barba.Utils\n */\nvar Utils = {\n /**\n * Return the current url\n *\n * @memberOf Barba.Utils\n * @return {String} currentUrl\n */\n getCurrentUrl: function() {\n return window.location.protocol + '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n },\n\n /**\n * Given an url, return it without the hash\n *\n * @memberOf Barba.Utils\n * @private\n * @param {String} url\n * @return {String} newCleanUrl\n */\n cleanLink: function(url) {\n return url.replace(/#.*/, '');\n },\n\n /**\n * Time in millisecond after the xhr request goes in timeout\n *\n * @memberOf Barba.Utils\n * @type {Number}\n * @default\n */\n xhrTimeout: 5000,\n\n /**\n * Start an XMLHttpRequest() and return a Promise\n *\n * @memberOf Barba.Utils\n * @param {String} url\n * @return {Promise}\n */\n xhr: function(url) {\n var deferred = this.deferred();\n var req = new XMLHttpRequest();\n\n req.onreadystatechange = function() {\n if (req.readyState === 4) {\n if (req.status === 200) {\n return deferred.resolve(req.responseText);\n } else {\n return deferred.reject(new Error('xhr: HTTP code is not 200'));\n }\n }\n };\n\n req.ontimeout = function() {\n return deferred.reject(new Error('xhr: Timeout exceeded'));\n };\n\n req.open('GET', url);\n req.timeout = this.xhrTimeout;\n req.setRequestHeader('x-barba', 'yes');\n req.send();\n\n return deferred.promise;\n },\n\n /**\n * Get obj and props and return a new object with the property merged\n *\n * @memberOf Barba.Utils\n * @param {object} obj\n * @param {object} props\n * @return {object}\n */\n extend: function(obj, props) {\n var newObj = Object.create(obj);\n\n for(var prop in props) {\n if(props.hasOwnProperty(prop)) {\n newObj[prop] = props[prop];\n }\n }\n\n return newObj;\n },\n\n /**\n * Return a new \"Deferred\" object\n * https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred\n *\n * @memberOf Barba.Utils\n * @return {Deferred}\n */\n deferred: function() {\n return new function() {\n this.resolve = null;\n this.reject = null;\n\n this.promise = new Promise(function(resolve, reject) {\n this.resolve = resolve;\n this.reject = reject;\n }.bind(this));\n };\n },\n\n /**\n * Return the port number normalized, eventually you can pass a string to be normalized.\n *\n * @memberOf Barba.Utils\n * @private\n * @param {String} p\n * @return {Int} port\n */\n getPort: function(p) {\n var port = typeof p !== 'undefined' ? p : window.location.port;\n var protocol = window.location.protocol;\n\n if (port != '')\n return parseInt(port);\n\n if (protocol === 'http:')\n return 80;\n\n if (protocol === 'https:')\n return 443;\n }\n};\n\nmodule.exports = Utils;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Utils/Utils.js\n ** module id = 5\n ** module chunks = 0\n **/","var Dispatcher = require('../Dispatcher/Dispatcher');\nvar Utils = require('../Utils/Utils.js');\n\n/**\n * BaseView to be extended\n *\n * @namespace Barba.BaseView\n * @type {Object}\n */\nvar BaseView = {\n /**\n * Namespace of the view.\n * (need to be associated with the data-namespace of the container)\n *\n * @memberOf Barba.BaseView\n * @type {String}\n */\n namespace: null,\n\n /**\n * Helper to extend the object\n *\n * @memberOf Barba.BaseView\n * @param {Object} newObject\n * @return {Object} newInheritObject\n */\n extend: function(obj){\n return Utils.extend(this, obj);\n },\n\n /**\n * Init the view.\n * P.S. Is suggested to init the view before starting Barba.Pjax.start(),\n * in this way .onEnter() and .onEnterCompleted() will be fired for the current\n * container when the page is loaded.\n *\n * @memberOf Barba.BaseView\n */\n init: function() {\n var _this = this;\n\n Dispatcher.on('initStateChange',\n function(newStatus, oldStatus) {\n if (oldStatus && oldStatus.namespace === _this.namespace)\n _this.onLeave();\n }\n );\n\n Dispatcher.on('newPageReady',\n function(newStatus, oldStatus, container) {\n _this.container = container;\n\n if (newStatus.namespace === _this.namespace)\n _this.onEnter();\n }\n );\n\n Dispatcher.on('transitionCompleted',\n function(newStatus, oldStatus) {\n if (newStatus.namespace === _this.namespace)\n _this.onEnterCompleted();\n\n if (oldStatus && oldStatus.namespace === _this.namespace)\n _this.onLeaveCompleted();\n }\n );\n },\n\n /**\n * This function will be fired when the container\n * is ready and attached to the DOM.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onEnter: function() {},\n\n /**\n * This function will be fired when the transition\n * to this container has just finished.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onEnterCompleted: function() {},\n\n /**\n * This function will be fired when the transition\n * to a new container has just started.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onLeave: function() {},\n\n /**\n * This function will be fired when the container\n * has just been removed from the DOM.\n *\n * @memberOf Barba.BaseView\n * @abstract\n */\n onLeaveCompleted: function() {}\n}\n\nmodule.exports = BaseView;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./View/BaseView.js\n ** module id = 6\n ** module chunks = 0\n **/","/**\n * Little Dispatcher inspired by MicroEvent.js\n *\n * @namespace Barba.Dispatcher\n * @type {Object}\n */\nvar Dispatcher = {\n /**\n * Object that keeps all the events\n *\n * @memberOf Barba.Dispatcher\n * @readOnly\n * @type {Object}\n */\n events: {},\n\n /**\n * Bind a callback to an event\n *\n * @memberOf Barba.Dispatcher\n * @param {String} eventName\n * @param {Function} function\n */\n on: function(e, f) {\n this.events[e] = this.events[e] || [];\n this.events[e].push(f);\n },\n\n /**\n * Unbind event\n *\n * @memberOf Barba.Dispatcher\n * @param {String} eventName\n * @param {Function} function\n */\n off: function(e, f) {\n if(e in this.events === false)\n return;\n\n this.events[e].splice(this.events[e].indexOf(f), 1);\n },\n\n /**\n * Fire the event running all the event associated to it\n *\n * @memberOf Barba.Dispatcher\n * @param {String} eventName\n * @param {...*} args\n */\n trigger: function(e) {//e, ...args\n if (e in this.events === false)\n return;\n\n for(var i = 0; i < this.events[e].length; i++){\n this.events[e][i].apply(this, Array.prototype.slice.call(arguments, 1));\n }\n }\n};\n\nmodule.exports = Dispatcher;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Dispatcher/Dispatcher.js\n ** module id = 7\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils.js');\n\n/**\n * BaseCache it's a simple static cache\n *\n * @namespace Barba.BaseCache\n * @type {Object}\n */\nvar BaseCache = {\n /**\n * The Object that keeps all the key value information\n *\n * @memberOf Barba.BaseCache\n * @type {Object}\n */\n data: {},\n\n /**\n * Helper to extend this object\n *\n * @memberOf Barba.BaseCache\n * @private\n * @param {Object} newObject\n * @return {Object} newInheritObject\n */\n extend: function(obj) {\n return Utils.extend(this, obj);\n },\n\n /**\n * Set a key and value data, mainly Barba is going to save promises\n *\n * @memberOf Barba.BaseCache\n * @param {String} key\n * @param {*} value\n */\n set: function(key, val) {\n this.data[key] = val;\n },\n\n /**\n * Retrieve the data using the key\n *\n * @memberOf Barba.BaseCache\n * @param {String} key\n * @return {*}\n */\n get: function(key) {\n return this.data[key];\n },\n\n /**\n * Flush the cache\n *\n * @memberOf Barba.BaseCache\n */\n reset: function() {\n this.data = {};\n }\n};\n\nmodule.exports = BaseCache;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Cache/BaseCache.js\n ** module id = 8\n ** module chunks = 0\n **/","/**\n * HistoryManager helps to keep track of the navigation\n *\n * @namespace Barba.HistoryManager\n * @type {Object}\n */\nvar HistoryManager = {\n /**\n * Keep track of the status in historic order\n *\n * @memberOf Barba.HistoryManager\n * @readOnly\n * @type {Array}\n */\n history: [],\n\n /**\n * Add a new set of url and namespace\n *\n * @memberOf Barba.HistoryManager\n * @param {String} url\n * @param {String} namespace\n * @private\n */\n add: function(url, namespace) {\n if (!namespace)\n namespace = undefined;\n\n this.history.push({\n url: url,\n namespace: namespace\n });\n },\n\n /**\n * Return information about the current status\n *\n * @memberOf Barba.HistoryManager\n * @return {Object}\n */\n currentStatus: function() {\n return this.history[this.history.length - 1];\n },\n\n /**\n * Return information about the previous status\n *\n * @memberOf Barba.HistoryManager\n * @return {Object}\n */\n prevStatus: function() {\n var history = this.history;\n\n if (history.length < 2)\n return null;\n\n return history[history.length - 2];\n }\n};\n\nmodule.exports = HistoryManager;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/HistoryManager.js\n ** module id = 9\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils');\nvar Dispatcher = require('../Dispatcher/Dispatcher');\nvar HideShowTransition = require('../Transition/HideShowTransition');\nvar BaseCache = require('../Cache/BaseCache');\n\nvar HistoryManager = require('./HistoryManager');\nvar Dom = require('./Dom');\n\n/**\n * Pjax is a static object with main function\n *\n * @namespace Barba.Pjax\n * @borrows Dom as Dom\n * @type {Object}\n */\nvar Pjax = {\n Dom: Dom,\n History: HistoryManager,\n Cache: BaseCache,\n\n /**\n * Indicate wether or not use the cache\n *\n * @memberOf Barba.Pjax\n * @type {Boolean}\n * @default\n */\n cacheEnabled: true,\n\n /**\n * Indicate if there is an animation in progress\n *\n * @memberOf Barba.Pjax\n * @readOnly\n * @type {Boolean}\n */\n transitionProgress: false,\n\n /**\n * Class name used to ignore links\n *\n * @memberOf Barba.Pjax\n * @type {String}\n * @default\n */\n ignoreClassLink: 'no-barba',\n\n /**\n * Function to be called to start Pjax\n *\n * @memberOf Barba.Pjax\n */\n start: function() {\n this.init();\n },\n\n /**\n * Init the events\n *\n * @memberOf Barba.Pjax\n * @private\n */\n init: function() {\n var container = this.Dom.getContainer();\n var wrapper = this.Dom.getWrapper();\n\n wrapper.setAttribute('aria-live', 'polite');\n\n this.History.add(\n this.getCurrentUrl(),\n this.Dom.getNamespace(container)\n );\n\n //Fire for the current view.\n Dispatcher.trigger('initStateChange', this.History.currentStatus());\n Dispatcher.trigger('newPageReady',\n this.History.currentStatus(),\n {},\n container,\n this.Dom.currentHTML\n );\n Dispatcher.trigger('transitionCompleted', this.History.currentStatus());\n\n this.bindEvents();\n },\n\n /**\n * Attach the eventlisteners\n *\n * @memberOf Barba.Pjax\n * @private\n */\n bindEvents: function() {\n document.addEventListener('click',\n this.onLinkClick.bind(this)\n );\n\n window.addEventListener('popstate',\n this.onStateChange.bind(this)\n );\n },\n\n /**\n * Return the currentURL cleaned\n *\n * @memberOf Barba.Pjax\n * @return {String} currentUrl\n */\n getCurrentUrl: function() {\n return Utils.cleanLink(\n Utils.getCurrentUrl()\n );\n },\n\n /**\n * Change the URL with pushstate and trigger the state change\n *\n * @memberOf Barba.Pjax\n * @param {String} newUrl\n */\n goTo: function(url) {\n window.history.pushState(null, null, url);\n this.onStateChange();\n },\n\n /**\n * Force the browser to go to a certain url\n *\n * @memberOf Barba.Pjax\n * @param {String} url\n * @private\n */\n forceGoTo: function(url) {\n window.location = url;\n },\n\n /**\n * Load an url, will start an xhr request or load from the cache\n *\n * @memberOf Barba.Pjax\n * @private\n * @param {String} url\n * @return {Promise}\n */\n load: function(url) {\n var deferred = Utils.deferred();\n var _this = this;\n var xhr;\n\n xhr = this.Cache.get(url);\n\n if (!xhr) {\n xhr = Utils.xhr(url);\n this.Cache.set(url, xhr);\n }\n\n xhr.then(\n function(data) {\n var container = _this.Dom.parseResponse(data);\n\n _this.Dom.putContainer(container);\n\n if (!_this.cacheEnabled)\n _this.Cache.reset();\n\n deferred.resolve(container);\n },\n function() {\n //Something went wrong (timeout, 404, 505...)\n _this.forceGoTo(url);\n\n deferred.reject();\n }\n );\n\n return deferred.promise;\n },\n\n /**\n * Get the .href parameter out of an element\n * and handle special cases (like xlink:href)\n *\n * @private\n * @memberOf Barba.Pjax\n * @param {HTMLElement} el\n * @return {String} href\n */\n getHref: function(el) {\n if (!el) {\n return undefined;\n }\n\n if (el.getAttribute && typeof el.getAttribute('xlink:href') === 'string') {\n return el.getAttribute('xlink:href');\n }\n\n if (typeof el.href === 'string') {\n return el.href;\n }\n\n return undefined;\n },\n\n /**\n * Callback called from click event\n *\n * @memberOf Barba.Pjax\n * @private\n * @param {MouseEvent} evt\n */\n onLinkClick: function(evt) {\n var el = evt.target;\n\n //Go up in the nodelist until we\n //find something with an href\n while (el && !this.getHref(el)) {\n el = el.parentNode;\n }\n\n if (this.preventCheck(evt, el)) {\n evt.stopPropagation();\n evt.preventDefault();\n\n Dispatcher.trigger('linkClicked', el, evt);\n\n var href = this.getHref(el);\n this.goTo(href);\n }\n },\n\n /**\n * Determine if the link should be followed\n *\n * @memberOf Barba.Pjax\n * @param {MouseEvent} evt\n * @param {HTMLElement} element\n * @return {Boolean}\n */\n preventCheck: function(evt, element) {\n if (!window.history.pushState)\n return false;\n\n var href = this.getHref(element);\n\n //User\n if (!element || !href)\n return false;\n\n //Middle click, cmd click, and ctrl click\n if (evt.which > 1 || evt.metaKey || evt.ctrlKey || evt.shiftKey || evt.altKey)\n return false;\n\n //Ignore target with _blank target\n if (element.target && element.target === '_blank')\n return false;\n\n //Check if it's the same domain\n if (window.location.protocol !== element.protocol || window.location.hostname !== element.hostname)\n return false;\n\n //Check if the port is the same\n if (Utils.getPort() !== Utils.getPort(element.port))\n return false;\n\n //Ignore case when a hash is being tacked on the current URL\n if (href.indexOf('#') > -1)\n return false;\n\n //Ignore case where there is download attribute\n if (element.getAttribute && typeof element.getAttribute('download') === 'string')\n return false;\n\n //In case you're trying to load the same page\n if (Utils.cleanLink(href) == Utils.cleanLink(location.href))\n return false;\n\n if (element.classList.contains(this.ignoreClassLink))\n return false;\n\n return true;\n },\n\n /**\n * Return a transition object\n *\n * @memberOf Barba.Pjax\n * @return {Barba.Transition} Transition object\n */\n getTransition: function() {\n //User customizable\n return HideShowTransition;\n },\n\n /**\n * Method called after a 'popstate' or from .goTo()\n *\n * @memberOf Barba.Pjax\n * @private\n */\n onStateChange: function() {\n var newUrl = this.getCurrentUrl();\n\n if (this.transitionProgress)\n this.forceGoTo(newUrl);\n\n if (this.History.currentStatus().url === newUrl)\n return false;\n\n this.History.add(newUrl);\n\n var newContainer = this.load(newUrl);\n var transition = Object.create(this.getTransition());\n\n this.transitionProgress = true;\n\n Dispatcher.trigger('initStateChange',\n this.History.currentStatus(),\n this.History.prevStatus()\n );\n\n var transitionInstance = transition.init(\n this.Dom.getContainer(),\n newContainer\n );\n\n newContainer.then(\n this.onNewContainerLoaded.bind(this)\n );\n\n transitionInstance.then(\n this.onTransitionEnd.bind(this)\n );\n },\n\n /**\n * Function called as soon the new container is ready\n *\n * @memberOf Barba.Pjax\n * @private\n * @param {HTMLElement} container\n */\n onNewContainerLoaded: function(container) {\n var currentStatus = this.History.currentStatus();\n currentStatus.namespace = this.Dom.getNamespace(container);\n\n Dispatcher.trigger('newPageReady',\n this.History.currentStatus(),\n this.History.prevStatus(),\n container,\n this.Dom.currentHTML\n );\n },\n\n /**\n * Function called as soon the transition is finished\n *\n * @memberOf Barba.Pjax\n * @private\n */\n onTransitionEnd: function() {\n this.transitionProgress = false;\n\n Dispatcher.trigger('transitionCompleted',\n this.History.currentStatus(),\n this.History.prevStatus()\n );\n }\n};\n\nmodule.exports = Pjax;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/Pjax.js\n ** module id = 10\n ** module chunks = 0\n **/","var BaseTransition = require('./BaseTransition');\n\n/**\n * Basic Transition object, wait for the new Container to be ready,\n * scroll top, and finish the transition (removing the old container and displaying the new one)\n *\n * @private\n * @namespace Barba.HideShowTransition\n * @augments Barba.BaseTransition\n */\nvar HideShowTransition = BaseTransition.extend({\n start: function() {\n this.newContainerLoading.then(this.finish.bind(this));\n },\n\n finish: function() {\n document.body.scrollTop = 0;\n this.done();\n }\n});\n\nmodule.exports = HideShowTransition;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Transition/HideShowTransition.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * Object that is going to deal with DOM parsing/manipulation\n *\n * @namespace Barba.Pjax.Dom\n * @type {Object}\n */\nvar Dom = {\n /**\n * The name of the data attribute on the container\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n * @default\n */\n dataNamespace: 'namespace',\n\n /**\n * Id of the main wrapper\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n * @default\n */\n wrapperId: 'barba-wrapper',\n\n /**\n * Class name used to identify the containers\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n * @default\n */\n containerClass: 'barba-container',\n\n /**\n * Full HTML String of the current page.\n * By default is the innerHTML of the initial loaded page.\n *\n * Each time a new page is loaded, the value is the response of the xhr call.\n *\n * @memberOf Barba.Pjax.Dom\n * @type {String}\n */\n currentHTML: document.documentElement.innerHTML,\n\n /**\n * Parse the responseText obtained from the xhr call\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {String} responseText\n * @return {HTMLElement}\n */\n parseResponse: function(responseText) {\n this.currentHTML = responseText;\n\n var wrapper = document.createElement('div');\n wrapper.innerHTML = responseText;\n\n var titleEl = wrapper.querySelector('title');\n\n if (titleEl)\n document.title = titleEl.textContent;\n\n return this.getContainer(wrapper);\n },\n\n /**\n * Get the main barba wrapper by the ID `wrapperId`\n *\n * @memberOf Barba.Pjax.Dom\n * @return {HTMLElement} element\n */\n getWrapper: function() {\n var wrapper = document.getElementById(this.wrapperId);\n\n if (!wrapper)\n throw new Error('Barba.js: wrapper not found!');\n\n return wrapper;\n },\n\n /**\n * Get the container on the current DOM,\n * or from an HTMLElement passed via argument\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n * @return {HTMLElement}\n */\n getContainer: function(element) {\n if (!element)\n element = document.body;\n\n if (!element)\n throw new Error('Barba.js: DOM not ready!');\n\n var container = this.parseContainer(element);\n\n if (container && container.jquery)\n container = container[0];\n\n if (!container)\n throw new Error('Barba.js: no container found');\n\n return container;\n },\n\n /**\n * Get the namespace of the container\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n * @return {String}\n */\n getNamespace: function(element) {\n if (element && element.dataset) {\n return element.dataset[this.dataNamespace];\n } else if (element) {\n return element.getAttribute('data-' + this.dataNamespace);\n }\n\n return null;\n },\n\n /**\n * Put the container on the page\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n */\n putContainer: function(element) {\n element.style.visibility = 'hidden';\n\n var wrapper = this.getWrapper();\n wrapper.appendChild(element);\n },\n\n /**\n * Get container selector\n *\n * @memberOf Barba.Pjax.Dom\n * @private\n * @param {HTMLElement} element\n * @return {HTMLElement} element\n */\n parseContainer: function(element) {\n return element.querySelector('.' + this.containerClass);\n }\n};\n\nmodule.exports = Dom;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/Dom.js\n ** module id = 12\n ** module chunks = 0\n **/","var Utils = require('../Utils/Utils');\nvar Pjax = require('./Pjax');\n\n/**\n * Prefetch\n *\n * @namespace Barba.Prefetch\n * @type {Object}\n */\nvar Prefetch = {\n /**\n * Class name used to ignore prefetch on links\n *\n * @memberOf Barba.Prefetch\n * @type {String}\n * @default\n */\n ignoreClassLink: 'no-barba-prefetch',\n\n /**\n * Init the event listener on mouseover and touchstart\n * for the prefetch\n *\n * @memberOf Barba.Prefetch\n */\n init: function() {\n if (!window.history.pushState) {\n return false;\n }\n\n document.body.addEventListener('mouseover', this.onLinkEnter.bind(this));\n document.body.addEventListener('touchstart', this.onLinkEnter.bind(this));\n },\n\n /**\n * Callback for the mousehover/touchstart\n *\n * @memberOf Barba.Prefetch\n * @private\n * @param {Object} evt\n */\n onLinkEnter: function(evt) {\n var el = evt.target;\n\n while (el && !Pjax.getHref(el)) {\n el = el.parentNode;\n }\n\n if (!el || el.classList.contains(this.ignoreClassLink)) {\n return;\n }\n\n var url = Pjax.getHref(el);\n\n //Check if the link is elegible for Pjax\n if (Pjax.preventCheck(evt, el) && !Pjax.Cache.get(url)) {\n var xhr = Utils.xhr(url);\n Pjax.Cache.set(url, xhr);\n }\n }\n};\n\nmodule.exports = Prefetch;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Pjax/Prefetch.js\n ** module id = 13\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/barba.min.js b/dist/barba.min.js index a16692f4..725b307c 100644 --- a/dist/barba.min.js +++ b/dist/barba.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Barba",[],e):"object"==typeof exports?exports.Barba=e():t.Barba=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="http://localhost:8080/dist",e(0)}([function(t,e,n){"function"!=typeof Promise&&(window.Promise=n(1));var r={version:"1.0.0",BaseTransition:n(4),BaseView:n(6),BaseCache:n(8),Dispatcher:n(7),HistoryManager:n(9),Pjax:n(10),Prefetch:n(13),Utils:n(5)};t.exports=r},function(t,e,n){(function(e){!function(n){function r(){}function i(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void l(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:c)(e.promise,t._value);var r;try{r=n(t._value)}catch(t){return void c(e.promise,t)}a(e.promise,r)}))}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void h(i(n,e),t)}t._state=1,t._value=e,u(t)}catch(e){c(t,e)}}function c(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&l(function(){t._handled||p(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=u++,r=!(arguments.length<2)&&a.call(arguments,1);return c[n]=!0,o(function(){c[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete c[t]}}).call(e,n(2).setImmediate,n(2).clearImmediate)},function(t,e){function n(){h&&u&&(h=!1,u.length?f=u.concat(f):d=-1,f.length&&r())}function r(){if(!h){var t=s(n);h=!0;for(var e=f.length;e;){for(u=f,f=[];++d1)for(var n=1;n1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&((!e.target||"_blank"!==e.target)&&(window.location.protocol===e.protocol&&window.location.hostname===e.hostname&&(r.getPort()===r.getPort(e.port)&&(!(n.indexOf("#")>-1)&&((!e.getAttribute||"string"!=typeof e.download)&&(r.cleanLink(n)!=r.cleanLink(location.href)&&!e.classList.contains(this.ignoreClassLink))))))))},getTransition:function(){return o},onStateChange:function(){var t=this.getCurrentUrl();if(this.transitionProgress&&this.forceGoTo(t),this.History.currentStatus().url===t)return!1;this.History.add(t);var e=this.load(t),n=Object.create(this.getTransition());this.transitionProgress=!0,i.trigger("initStateChange",this.History.currentStatus(),this.History.prevStatus());var r=n.init(this.Dom.getContainer(),e);e.then(this.onNewContainerLoaded.bind(this)),r.then(this.onTransitionEnd.bind(this))},onNewContainerLoaded:function(t){var e=this.History.currentStatus();e.namespace=this.Dom.getNamespace(t),i.trigger("newPageReady",this.History.currentStatus(),this.History.prevStatus(),t,this.Dom.currentHTML)},onTransitionEnd:function(){this.transitionProgress=!1,i.trigger("transitionCompleted",this.History.currentStatus(),this.History.prevStatus())}};t.exports=u},function(t,e,n){var r=n(4),i=r.extend({start:function(){this.newContainerLoading.then(this.finish.bind(this))},finish:function(){document.body.scrollTop=0,this.done()}});t.exports=i},function(t,e){var n={dataNamespace:"namespace",wrapperId:"barba-wrapper",containerClass:"barba-container",currentHTML:document.documentElement.innerHTML,parseResponse:function(t){this.currentHTML=t;var e=document.createElement("div");e.innerHTML=t;var n=e.querySelector("title");return n&&(document.title=n.textContent),this.getContainer(e)},getWrapper:function(){var t=document.getElementById(this.wrapperId);if(!t)throw new Error("Barba.js: wrapper not found!");return t},getContainer:function(t){if(t||(t=document.body),!t)throw new Error("Barba.js: DOM not ready!");var e=this.parseContainer(t);if(e&&e.jquery&&(e=e[0]),!e)throw new Error("Barba.js: no container found");return e},getNamespace:function(t){return t&&t.dataset?t.dataset[this.dataNamespace]:t?t.getAttribute("data-"+this.dataNamespace):null},putContainer:function(t){t.style.visibility="hidden";var e=this.getWrapper();e.appendChild(t)},parseContainer:function(t){return t.querySelector("."+this.containerClass)}};t.exports=n},function(t,e,n){var r=n(5),i=n(10),o={ignoreClassLink:"no-barba-prefetch",init:function(){return!!window.history.pushState&&(document.body.addEventListener("mouseover",this.onLinkEnter.bind(this)),void document.body.addEventListener("touchstart",this.onLinkEnter.bind(this)))},onLinkEnter:function(t){for(var e=t.target;e&&!i.getHref(e);)e=e.parentNode;if(e&&!e.classList.contains(this.ignoreClassLink)){var n=i.getHref(e);if(i.preventCheck(t,e)&&!i.Cache.get(n)){var o=r.xhr(n);i.Cache.set(n,o)}}}};t.exports=o}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Barba",[],e):"object"==typeof exports?exports.Barba=e():t.Barba=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="http://localhost:8080/dist",e(0)}([function(t,e,n){"function"!=typeof Promise&&(window.Promise=n(1));var r={version:"1.0.0",BaseTransition:n(4),BaseView:n(6),BaseCache:n(8),Dispatcher:n(7),HistoryManager:n(9),Pjax:n(10),Prefetch:n(13),Utils:n(5)};t.exports=r},function(t,e,n){(function(e){!function(n){function r(){}function i(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void l(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:c)(e.promise,t._value);var r;try{r=n(t._value)}catch(t){return void c(e.promise,t)}a(e.promise,r)}))}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void h(i(n,e),t)}t._state=1,t._value=e,u(t)}catch(e){c(t,e)}}function c(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&l(function(){t._handled||p(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=u++,r=!(arguments.length<2)&&a.call(arguments,1);return c[n]=!0,o(function(){c[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete c[t]}}).call(e,n(2).setImmediate,n(2).clearImmediate)},function(t,e){function n(){h&&u&&(h=!1,u.length?f=u.concat(f):d=-1,f.length&&r())}function r(){if(!h){var t=s(n);h=!0;for(var e=f.length;e;){for(u=f,f=[];++d1)for(var n=1;n1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&((!e.target||"_blank"!==e.target)&&(window.location.protocol===e.protocol&&window.location.hostname===e.hostname&&(r.getPort()===r.getPort(e.port)&&(!(n.indexOf("#")>-1)&&((!e.getAttribute||"string"!=typeof e.getAttribute("download"))&&(r.cleanLink(n)!=r.cleanLink(location.href)&&!e.classList.contains(this.ignoreClassLink))))))))},getTransition:function(){return o},onStateChange:function(){var t=this.getCurrentUrl();if(this.transitionProgress&&this.forceGoTo(t),this.History.currentStatus().url===t)return!1;this.History.add(t);var e=this.load(t),n=Object.create(this.getTransition());this.transitionProgress=!0,i.trigger("initStateChange",this.History.currentStatus(),this.History.prevStatus());var r=n.init(this.Dom.getContainer(),e);e.then(this.onNewContainerLoaded.bind(this)),r.then(this.onTransitionEnd.bind(this))},onNewContainerLoaded:function(t){var e=this.History.currentStatus();e.namespace=this.Dom.getNamespace(t),i.trigger("newPageReady",this.History.currentStatus(),this.History.prevStatus(),t,this.Dom.currentHTML)},onTransitionEnd:function(){this.transitionProgress=!1,i.trigger("transitionCompleted",this.History.currentStatus(),this.History.prevStatus())}};t.exports=u},function(t,e,n){var r=n(4),i=r.extend({start:function(){this.newContainerLoading.then(this.finish.bind(this))},finish:function(){document.body.scrollTop=0,this.done()}});t.exports=i},function(t,e){var n={dataNamespace:"namespace",wrapperId:"barba-wrapper",containerClass:"barba-container",currentHTML:document.documentElement.innerHTML,parseResponse:function(t){this.currentHTML=t;var e=document.createElement("div");e.innerHTML=t;var n=e.querySelector("title");return n&&(document.title=n.textContent),this.getContainer(e)},getWrapper:function(){var t=document.getElementById(this.wrapperId);if(!t)throw new Error("Barba.js: wrapper not found!");return t},getContainer:function(t){if(t||(t=document.body),!t)throw new Error("Barba.js: DOM not ready!");var e=this.parseContainer(t);if(e&&e.jquery&&(e=e[0]),!e)throw new Error("Barba.js: no container found");return e},getNamespace:function(t){return t&&t.dataset?t.dataset[this.dataNamespace]:t?t.getAttribute("data-"+this.dataNamespace):null},putContainer:function(t){t.style.visibility="hidden";var e=this.getWrapper();e.appendChild(t)},parseContainer:function(t){return t.querySelector("."+this.containerClass)}};t.exports=n},function(t,e,n){var r=n(5),i=n(10),o={ignoreClassLink:"no-barba-prefetch",init:function(){return!!window.history.pushState&&(document.body.addEventListener("mouseover",this.onLinkEnter.bind(this)),void document.body.addEventListener("touchstart",this.onLinkEnter.bind(this)))},onLinkEnter:function(t){for(var e=t.target;e&&!i.getHref(e);)e=e.parentNode;if(e&&!e.classList.contains(this.ignoreClassLink)){var n=i.getHref(e);if(i.preventCheck(t,e)&&!i.Cache.get(n)){var o=r.xhr(n);i.Cache.set(n,o)}}}};t.exports=o}])}); \ No newline at end of file