Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2015-02-06 19:36:27 +0300
committerXhmikosR <xhmikosr@gmail.com>2015-02-06 19:36:27 +0300
commitd412b60058bcb6c7191e856d4a6832550dc73384 (patch)
tree9425c931457b228f438db9d3e3d4116f97ceb2d2
parentec4b3815616f5d17195f5e7e0b65da062b1f9db1 (diff)
Run `grunt`.
-rw-r--r--dist/js/ratchet.js68
-rw-r--r--dist/js/ratchet.min.js2
-rw-r--r--docs/dist/js/ratchet.js68
-rw-r--r--docs/dist/js/ratchet.min.js2
4 files changed, 76 insertions, 64 deletions
diff --git a/dist/js/ratchet.js b/dist/js/ratchet.js
index a49aebd..39f7fe3 100644
--- a/dist/js/ratchet.js
+++ b/dist/js/ratchet.js
@@ -8,6 +8,37 @@
* =====================================================
*/
/* ========================================================================
+ * Ratchet: common.js v2.0.2
+ * http://goratchet.com/
+ * ========================================================================
+ * Copyright 2015 Connor Sears
+ * Licensed under MIT (https://github.com/twbs/ratchet/blob/master/LICENSE)
+ * ======================================================================== */
+
+!(function () {
+ 'use strict';
+
+ // Create Ratchet namespace
+ if (typeof window.RATCHET === 'undefined') {
+ window.RATCHET = {};
+ }
+
+ // Original script from http://davidwalsh.name/vendor-prefix
+ window.RATCHET.getBrowserCapabilities = (function () {
+ var styles = window.getComputedStyle(document.documentElement, '');
+ var pre = (Array.prototype.slice
+ .call(styles)
+ .join('')
+ .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
+ )[1];
+ return {
+ prefix: '-' + pre + '-',
+ transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
+ };
+ })();
+}());
+
+/* ========================================================================
* Ratchet: modals.js v2.0.2
* http://goratchet.com/components#modals
* ========================================================================
@@ -640,7 +671,10 @@
}
});
window.addEventListener('popstate', popstate);
+
+ // TODO : Remove this line in the next major version
window.PUSH = PUSH;
+ window.RATCHET.push = PUSH;
}());
@@ -742,22 +776,8 @@
var scrollableArea;
var startedMoving;
- // Original script from http://davidwalsh.name/vendor-prefix
- var getBrowserCapabilities = (function () {
- var styles = window.getComputedStyle(document.documentElement, '');
- var pre = (Array.prototype.slice
- .call(styles)
- .join('')
- .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
- )[1];
- return {
- prefix: '-' + pre + '-',
- transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
- };
- })();
-
- var transformPrefix = getBrowserCapabilities.prefix;
- var transformProperty = getBrowserCapabilities.transform;
+ var transformPrefix = window.RATCHET.getBrowserCapabilities.prefix;
+ var transformProperty = window.RATCHET.getBrowserCapabilities.transform;
var getSlider = function (target) {
var i;
@@ -893,21 +913,7 @@
var touchMove = false;
var distanceX = false;
var toggle = false;
-
- // Original script from http://davidwalsh.name/vendor-prefix
- var getBrowserCapabilities = (function () {
- var styles = window.getComputedStyle(document.documentElement, '');
- var pre = (Array.prototype.slice
- .call(styles)
- .join('')
- .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
- )[1];
- return {
- transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
- };
- })();
-
- var transformProperty = getBrowserCapabilities.transform;
+ var transformProperty = window.RATCHET.getBrowserCapabilities.transform;
var findToggle = function (target) {
var i;
diff --git a/dist/js/ratchet.min.js b/dist/js/ratchet.min.js
index 057da28..dbda7e4 100644
--- a/dist/js/ratchet.min.js
+++ b/dist/js/ratchet.min.js
@@ -7,4 +7,4 @@
* v2.0.2 designed by @connors.
* =====================================================
*/
-!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},b=function(b){var c=a(b.target);return c&&c.hash?document.querySelector(c.hash):void 0};window.addEventListener("touchend",function(a){var c=b(a);c&&(c&&c.classList.contains("modal")&&c.classList.toggle("active"),a.preventDefault())})}(),!function(){"use strict";var a,b=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},c=function(){a.style.display="none",a.removeEventListener("webkitTransitionEnd",c)},d=function(){var b=document.createElement("div");return b.classList.add("backdrop"),b.addEventListener("touchend",function(){a.addEventListener("webkitTransitionEnd",c),a.classList.remove("visible"),a.parentNode.removeChild(d)}),b}(),e=function(c){var d=b(c.target);if(d&&d.hash&&!(d.hash.indexOf("/")>0)){try{a=document.querySelector(d.hash)}catch(e){a=null}if(null!==a&&a&&a.classList.contains("popover"))return a}},f=function(a){var b=e(a);b&&(b.style.display="block",b.offsetHeight,b.classList.add("visible"),b.parentNode.appendChild(d))};window.addEventListener("touchend",f)}(),!function(){"use strict";function a(){f[p.id]=document.body.cloneNode(!0)}var b,c=function(){},d=20,e=sessionStorage,f={},g={"slide-in":"slide-out","slide-out":"slide-in",fade:"fade"},h={bartab:".bar-tab",barnav:".bar-nav",barfooter:".bar-footer",barheadersecondary:".bar-header-secondary"},i=function(a,b){p.id=a.id,b&&(a=l(a.id)),e[a.id]=JSON.stringify(a),window.history.replaceState(a.id,a.title,a.url)},j=function(){var a=p.id,b=JSON.parse(e.cacheForwardStack||"[]"),c=JSON.parse(e.cacheBackStack||"[]");for(c.push(a);b.length;)delete e[b.shift()];for(;c.length>d;)delete e[c.shift()];l(p.id).url&&window.history.pushState(null,"",l(p.id).url),e.cacheForwardStack=JSON.stringify(b),e.cacheBackStack=JSON.stringify(c)},k=function(a,b){var c="forward"===b,d=JSON.parse(e.cacheForwardStack||"[]"),f=JSON.parse(e.cacheBackStack||"[]"),g=c?f:d,h=c?d:f;p.id&&g.push(p.id),h.pop(),e.cacheForwardStack=JSON.stringify(d),e.cacheBackStack=JSON.stringify(f)},l=function(a){return JSON.parse(e[a]||null)||{}},m=function(a){var c=u(a.target);if(!(!c||a.which>1||a.metaKey||a.ctrlKey||b||location.protocol!==c.protocol||location.host!==c.host||!c.hash&&/#/.test(c.href)||c.hash&&c.href.replace(c.hash,"")===location.href.replace(location.hash,"")||"push"===c.getAttribute("data-ignore")))return c},n=function(a){var b=m(a);b&&(a.preventDefault(),p({url:b.href,hash:b.hash,timeout:b.getAttribute("data-timeout"),transition:b.getAttribute("data-transition")}))},o=function(a){var b,c,d,i,j,m,n,o,q=a.state;if(q&&e[q]){if(j=p.id<q?"forward":"back",k(q,j),d=l(q),i=f[q],d.title&&(document.title=d.title),"back"===j?(n=JSON.parse("back"===j?e.cacheForwardStack:e.cacheBackStack),o=l(n[n.length-1])):o=d,"back"===j&&!o.id)return p.id=q;if(m="back"===j?g[o.transition]:o.transition,!i)return p({id:d.id,url:d.url,title:d.title,timeout:d.timeout,transition:m,ignorePush:!0});if(o.transition){d=w(d,".content",i.cloneNode(!0));for(b in h)h.hasOwnProperty(b)&&(c=document.querySelector(h[b]),d[b]?s(d[b],c):c&&c.parentNode.removeChild(c))}s((d.contents||i).cloneNode(!0),document.querySelector(".content"),m,function(){t()}),p.id=q,document.body.offsetHeight}},p=function(b){var d,e=p.xhr;b.container=b.container||b.transition?document.querySelector(".content"):document.body;for(d in h)h.hasOwnProperty(d)&&(b[d]=b[d]||document.querySelector(h[d]));e&&e.readyState<4&&(e.onreadystatechange=c,e.abort()),e=new XMLHttpRequest,e.open("GET",b.url,!0),e.setRequestHeader("X-PUSH","true"),e.onreadystatechange=function(){b._timeout&&clearTimeout(b._timeout),4===e.readyState&&(200===e.status?q(e,b):r(b.url))},p.id||i({id:+new Date,url:window.location.href,title:document.title,timeout:b.timeout,transition:b.transition}),a(),b.timeout&&(b._timeout=setTimeout(function(){e.abort("timeout")},b.timeout)),e.send(),e.readyState&&!b.ignorePush&&j()},q=function(a,b){var c,d,e=x(a,b);if(!e.contents)return v(b.url);if(e.title&&(document.title=e.title),b.transition)for(c in h)h.hasOwnProperty(c)&&(d=document.querySelector(h[c]),e[c]?s(e[c],d):d&&d.parentNode.removeChild(d));s(e.contents,b.container,b.transition,function(){i({id:b.id||+new Date,url:e.url,title:e.title,timeout:b.timeout,transition:b.transition},b.id),t()}),!b.ignorePush&&window._gaq&&_gaq.push(["_trackPageview"]),!b.hash},r=function(a){throw new Error("Could not get: "+a)},s=function(a,b,c,d){var e,f,g;if(c?(e=/in$/.test(c),"fade"===c&&(b.classList.add("in"),b.classList.add("fade"),a.classList.add("fade")),/slide/.test(c)&&(a.classList.add("sliding-in",e?"right":"left"),a.classList.add("sliding"),b.classList.add("sliding")),b.parentNode.insertBefore(a,b)):b?b.innerHTML=a.innerHTML:a.classList.contains("content")?document.body.appendChild(a):document.body.insertBefore(a,document.querySelector(".content")),c||d&&d(),"fade"===c){b.offsetWidth,b.classList.remove("in");var h=function(){b.removeEventListener("webkitTransitionEnd",h),a.classList.add("in"),a.addEventListener("webkitTransitionEnd",i)},i=function(){a.removeEventListener("webkitTransitionEnd",i),b.parentNode.removeChild(b),a.classList.remove("fade"),a.classList.remove("in"),d&&d()};b.addEventListener("webkitTransitionEnd",h)}if(/slide/.test(c)){var j=function(){a.removeEventListener("webkitTransitionEnd",j),a.classList.remove("sliding","sliding-in"),a.classList.remove(g),b.parentNode.removeChild(b),d&&d()};b.offsetWidth,g=e?"right":"left",f=e?"left":"right",b.classList.add(f),a.classList.remove(g),a.addEventListener("webkitTransitionEnd",j)}},t=function(){var a=new CustomEvent("push",{detail:{state:l(p.id)},bubbles:!0,cancelable:!0});window.dispatchEvent(a)},u=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},v=function(a){window.history.replaceState(null,"","#"),window.location.replace(a)},w=function(a,b,c){var d,e={};for(d in a)a.hasOwnProperty(d)&&(e[d]=a[d]);return Object.keys(h).forEach(function(a){var b=c.querySelector(h[a]);b&&b.parentNode.removeChild(b),e[a]=b}),e.contents=c.querySelector(b),e},x=function(a,b){var c,d,e={},f=a.responseText;if(e.url=b.url,!f)return e;/<html/i.test(f)?(c=document.createElement("div"),d=document.createElement("div"),c.innerHTML=f.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0],d.innerHTML=f.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]):(c=d=document.createElement("div"),c.innerHTML=f),e.title=c.querySelector("title");var g="innerText"in e.title?"innerText":"textContent";return e.title=e.title&&e.title[g].trim(),b.transition?e=w(e,".content",d):e.contents=d,e};window.addEventListener("touchstart",function(){b=!1}),window.addEventListener("touchmove",function(){b=!0}),window.addEventListener("touchend",n),window.addEventListener("click",function(a){m(a)&&a.preventDefault()}),window.addEventListener("popstate",o),window.PUSH=p}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll(".segmented-control .control-item");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchend",function(b){var c,d,e,f=a(b.target),g="active",h="."+g;if(f&&(c=f.parentNode.querySelector(h),c&&c.classList.remove(g),f.classList.add(g),f.hash&&(e=document.querySelector(f.hash)))){d=e.parentNode.querySelectorAll(h);for(var i=0;i<d.length;i++)d[i].classList.remove(g);e.classList.add(g)}}),window.addEventListener("click",function(b){a(b.target)&&b.preventDefault()})}(),!function(){"use strict";var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{prefix:"-"+b+"-",transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}(),p=o.prefix,q=o.transform,r=function(a){for(var b,c=document.querySelectorAll(".slider > .slide-group");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},s=function(){var a=c.style[q].match(/translate3d\(([^,]*)/),b=a?a[1]:0;return parseInt(b,10)},t=function(a){var b=a?0>d?"ceil":"floor":"round";k=Math[b](s()/(m/c.children.length)),k+=a,k=Math.min(k,0),k=Math.max(-(c.children.length-1),k)},u=function(f){if(c=r(f.target)){var k=c.querySelector(".slide");m=k.offsetWidth*c.children.length,l=void 0,j=c.offsetWidth,i=1,g=-(c.children.length-1),h=+new Date,a=f.touches[0].pageX,b=f.touches[0].pageY,d=0,e=0,t(0),c.style[p+"transition-duration"]=0}},v=function(h){h.touches.length>1||!c||(n||(a+=h.touches[0].pageX-a-1),d=h.touches[0].pageX-a,e=h.touches[0].pageY-b,a=h.touches[0].pageX,b=h.touches[0].pageY,"undefined"==typeof l&&n&&(l=Math.abs(e)>Math.abs(d)),l||(f=d/i+s(),h.preventDefault(),i=0===k&&d>0?a/j+1.25:k===g&&0>d?Math.abs(a)/j+1.25:1,c.style[q]="translate3d("+f+"px,0,0)",n=!0))},w=function(a){c&&!l&&(n=!1,t(+new Date-h<1e3&&Math.abs(d)>15?0>d?-1:1:0),f=k*j,c.style[p+"transition-duration"]=".2s",c.style[q]="translate3d("+f+"px,0,0)",a=new CustomEvent("slide",{detail:{slideNumber:Math.abs(k)},bubbles:!0,cancelable:!0}),c.parentNode.dispatchEvent(a))};window.addEventListener("touchstart",u),window.addEventListener("touchmove",v),window.addEventListener("touchend",w)}(),!function(){"use strict";var a={},b=!1,c=!1,d=!1,e=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}(),f=e.transform,g=function(a){for(var b,c=document.querySelectorAll(".toggle");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchstart",function(c){if(c=c.originalEvent||c,d=g(c.target)){var e=d.querySelector(".toggle-handle"),f=d.clientWidth,h=e.clientWidth,i=d.classList.contains("active")?f-h:0;a={pageX:c.touches[0].pageX-i,pageY:c.touches[0].pageY},b=!1}}),window.addEventListener("touchmove",function(e){if(e=e.originalEvent||e,!(e.touches.length>1)&&d){var g=d.querySelector(".toggle-handle"),h=e.touches[0],i=d.clientWidth,j=g.clientWidth,k=i-j;if(b=!0,c=h.pageX-a.pageX,!(Math.abs(c)<Math.abs(h.pageY-a.pageY))){if(e.preventDefault(),0>c)return g.style[f]="translate3d(0,0,0)";if(c>k)return g.style[f]="translate3d("+k+"px,0,0)";g.style[f]="translate3d("+c+"px,0,0)",d.classList[c>i/2-j/2?"add":"remove"]("active")}}}),window.addEventListener("touchend",function(a){if(d){var e=d.querySelector(".toggle-handle"),g=d.clientWidth,h=e.clientWidth,i=g-h,j=!b&&!d.classList.contains("active")||b&&c>g/2-h/2;e.style[f]=j?"translate3d("+i+"px,0,0)":"translate3d(0,0,0)",d.classList[j?"add":"remove"]("active"),a=new CustomEvent("toggle",{detail:{isActive:j},bubbles:!0,cancelable:!0}),d.dispatchEvent(a),b=!1,d=!1}})}(); \ No newline at end of file
+!function(){"use strict";"undefined"==typeof window.RATCHET&&(window.RATCHET={}),window.RATCHET.getBrowserCapabilities=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{prefix:"-"+b+"-",transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}()}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},b=function(b){var c=a(b.target);return c&&c.hash?document.querySelector(c.hash):void 0};window.addEventListener("touchend",function(a){var c=b(a);c&&(c&&c.classList.contains("modal")&&c.classList.toggle("active"),a.preventDefault())})}(),!function(){"use strict";var a,b=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},c=function(){a.style.display="none",a.removeEventListener("webkitTransitionEnd",c)},d=function(){var b=document.createElement("div");return b.classList.add("backdrop"),b.addEventListener("touchend",function(){a.addEventListener("webkitTransitionEnd",c),a.classList.remove("visible"),a.parentNode.removeChild(d)}),b}(),e=function(c){var d=b(c.target);if(d&&d.hash&&!(d.hash.indexOf("/")>0)){try{a=document.querySelector(d.hash)}catch(e){a=null}if(null!==a&&a&&a.classList.contains("popover"))return a}},f=function(a){var b=e(a);b&&(b.style.display="block",b.offsetHeight,b.classList.add("visible"),b.parentNode.appendChild(d))};window.addEventListener("touchend",f)}(),!function(){"use strict";function a(){f[p.id]=document.body.cloneNode(!0)}var b,c=function(){},d=20,e=sessionStorage,f={},g={"slide-in":"slide-out","slide-out":"slide-in",fade:"fade"},h={bartab:".bar-tab",barnav:".bar-nav",barfooter:".bar-footer",barheadersecondary:".bar-header-secondary"},i=function(a,b){p.id=a.id,b&&(a=l(a.id)),e[a.id]=JSON.stringify(a),window.history.replaceState(a.id,a.title,a.url)},j=function(){var a=p.id,b=JSON.parse(e.cacheForwardStack||"[]"),c=JSON.parse(e.cacheBackStack||"[]");for(c.push(a);b.length;)delete e[b.shift()];for(;c.length>d;)delete e[c.shift()];l(p.id).url&&window.history.pushState(null,"",l(p.id).url),e.cacheForwardStack=JSON.stringify(b),e.cacheBackStack=JSON.stringify(c)},k=function(a,b){var c="forward"===b,d=JSON.parse(e.cacheForwardStack||"[]"),f=JSON.parse(e.cacheBackStack||"[]"),g=c?f:d,h=c?d:f;p.id&&g.push(p.id),h.pop(),e.cacheForwardStack=JSON.stringify(d),e.cacheBackStack=JSON.stringify(f)},l=function(a){return JSON.parse(e[a]||null)||{}},m=function(a){var c=u(a.target);if(!(!c||a.which>1||a.metaKey||a.ctrlKey||b||location.protocol!==c.protocol||location.host!==c.host||!c.hash&&/#/.test(c.href)||c.hash&&c.href.replace(c.hash,"")===location.href.replace(location.hash,"")||"push"===c.getAttribute("data-ignore")))return c},n=function(a){var b=m(a);b&&(a.preventDefault(),p({url:b.href,hash:b.hash,timeout:b.getAttribute("data-timeout"),transition:b.getAttribute("data-transition")}))},o=function(a){var b,c,d,i,j,m,n,o,q=a.state;if(q&&e[q]){if(j=p.id<q?"forward":"back",k(q,j),d=l(q),i=f[q],d.title&&(document.title=d.title),"back"===j?(n=JSON.parse("back"===j?e.cacheForwardStack:e.cacheBackStack),o=l(n[n.length-1])):o=d,"back"===j&&!o.id)return p.id=q;if(m="back"===j?g[o.transition]:o.transition,!i)return p({id:d.id,url:d.url,title:d.title,timeout:d.timeout,transition:m,ignorePush:!0});if(o.transition){d=w(d,".content",i.cloneNode(!0));for(b in h)h.hasOwnProperty(b)&&(c=document.querySelector(h[b]),d[b]?s(d[b],c):c&&c.parentNode.removeChild(c))}s((d.contents||i).cloneNode(!0),document.querySelector(".content"),m,function(){t()}),p.id=q,document.body.offsetHeight}},p=function(b){var d,e=p.xhr;b.container=b.container||b.transition?document.querySelector(".content"):document.body;for(d in h)h.hasOwnProperty(d)&&(b[d]=b[d]||document.querySelector(h[d]));e&&e.readyState<4&&(e.onreadystatechange=c,e.abort()),e=new XMLHttpRequest,e.open("GET",b.url,!0),e.setRequestHeader("X-PUSH","true"),e.onreadystatechange=function(){b._timeout&&clearTimeout(b._timeout),4===e.readyState&&(200===e.status?q(e,b):r(b.url))},p.id||i({id:+new Date,url:window.location.href,title:document.title,timeout:b.timeout,transition:b.transition}),a(),b.timeout&&(b._timeout=setTimeout(function(){e.abort("timeout")},b.timeout)),e.send(),e.readyState&&!b.ignorePush&&j()},q=function(a,b){var c,d,e=x(a,b);if(!e.contents)return v(b.url);if(e.title&&(document.title=e.title),b.transition)for(c in h)h.hasOwnProperty(c)&&(d=document.querySelector(h[c]),e[c]?s(e[c],d):d&&d.parentNode.removeChild(d));s(e.contents,b.container,b.transition,function(){i({id:b.id||+new Date,url:e.url,title:e.title,timeout:b.timeout,transition:b.transition},b.id),t()}),!b.ignorePush&&window._gaq&&_gaq.push(["_trackPageview"]),!b.hash},r=function(a){throw new Error("Could not get: "+a)},s=function(a,b,c,d){var e,f,g;if(c?(e=/in$/.test(c),"fade"===c&&(b.classList.add("in"),b.classList.add("fade"),a.classList.add("fade")),/slide/.test(c)&&(a.classList.add("sliding-in",e?"right":"left"),a.classList.add("sliding"),b.classList.add("sliding")),b.parentNode.insertBefore(a,b)):b?b.innerHTML=a.innerHTML:a.classList.contains("content")?document.body.appendChild(a):document.body.insertBefore(a,document.querySelector(".content")),c||d&&d(),"fade"===c){b.offsetWidth,b.classList.remove("in");var h=function(){b.removeEventListener("webkitTransitionEnd",h),a.classList.add("in"),a.addEventListener("webkitTransitionEnd",i)},i=function(){a.removeEventListener("webkitTransitionEnd",i),b.parentNode.removeChild(b),a.classList.remove("fade"),a.classList.remove("in"),d&&d()};b.addEventListener("webkitTransitionEnd",h)}if(/slide/.test(c)){var j=function(){a.removeEventListener("webkitTransitionEnd",j),a.classList.remove("sliding","sliding-in"),a.classList.remove(g),b.parentNode.removeChild(b),d&&d()};b.offsetWidth,g=e?"right":"left",f=e?"left":"right",b.classList.add(f),a.classList.remove(g),a.addEventListener("webkitTransitionEnd",j)}},t=function(){var a=new CustomEvent("push",{detail:{state:l(p.id)},bubbles:!0,cancelable:!0});window.dispatchEvent(a)},u=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},v=function(a){window.history.replaceState(null,"","#"),window.location.replace(a)},w=function(a,b,c){var d,e={};for(d in a)a.hasOwnProperty(d)&&(e[d]=a[d]);return Object.keys(h).forEach(function(a){var b=c.querySelector(h[a]);b&&b.parentNode.removeChild(b),e[a]=b}),e.contents=c.querySelector(b),e},x=function(a,b){var c,d,e={},f=a.responseText;if(e.url=b.url,!f)return e;/<html/i.test(f)?(c=document.createElement("div"),d=document.createElement("div"),c.innerHTML=f.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0],d.innerHTML=f.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]):(c=d=document.createElement("div"),c.innerHTML=f),e.title=c.querySelector("title");var g="innerText"in e.title?"innerText":"textContent";return e.title=e.title&&e.title[g].trim(),b.transition?e=w(e,".content",d):e.contents=d,e};window.addEventListener("touchstart",function(){b=!1}),window.addEventListener("touchmove",function(){b=!0}),window.addEventListener("touchend",n),window.addEventListener("click",function(a){m(a)&&a.preventDefault()}),window.addEventListener("popstate",o),window.PUSH=p,window.RATCHET.push=p}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll(".segmented-control .control-item");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchend",function(b){var c,d,e,f=a(b.target),g="active",h="."+g;if(f&&(c=f.parentNode.querySelector(h),c&&c.classList.remove(g),f.classList.add(g),f.hash&&(e=document.querySelector(f.hash)))){d=e.parentNode.querySelectorAll(h);for(var i=0;i<d.length;i++)d[i].classList.remove(g);e.classList.add(g)}}),window.addEventListener("click",function(b){a(b.target)&&b.preventDefault()})}(),!function(){"use strict";var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=window.RATCHET.getBrowserCapabilities.prefix,p=window.RATCHET.getBrowserCapabilities.transform,q=function(a){for(var b,c=document.querySelectorAll(".slider > .slide-group");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},r=function(){var a=c.style[p].match(/translate3d\(([^,]*)/),b=a?a[1]:0;return parseInt(b,10)},s=function(a){var b=a?0>d?"ceil":"floor":"round";k=Math[b](r()/(m/c.children.length)),k+=a,k=Math.min(k,0),k=Math.max(-(c.children.length-1),k)},t=function(f){if(c=q(f.target)){var k=c.querySelector(".slide");m=k.offsetWidth*c.children.length,l=void 0,j=c.offsetWidth,i=1,g=-(c.children.length-1),h=+new Date,a=f.touches[0].pageX,b=f.touches[0].pageY,d=0,e=0,s(0),c.style[o+"transition-duration"]=0}},u=function(h){h.touches.length>1||!c||(n||(a+=h.touches[0].pageX-a-1),d=h.touches[0].pageX-a,e=h.touches[0].pageY-b,a=h.touches[0].pageX,b=h.touches[0].pageY,"undefined"==typeof l&&n&&(l=Math.abs(e)>Math.abs(d)),l||(f=d/i+r(),h.preventDefault(),i=0===k&&d>0?a/j+1.25:k===g&&0>d?Math.abs(a)/j+1.25:1,c.style[p]="translate3d("+f+"px,0,0)",n=!0))},v=function(a){c&&!l&&(n=!1,s(+new Date-h<1e3&&Math.abs(d)>15?0>d?-1:1:0),f=k*j,c.style[o+"transition-duration"]=".2s",c.style[p]="translate3d("+f+"px,0,0)",a=new CustomEvent("slide",{detail:{slideNumber:Math.abs(k)},bubbles:!0,cancelable:!0}),c.parentNode.dispatchEvent(a))};window.addEventListener("touchstart",t),window.addEventListener("touchmove",u),window.addEventListener("touchend",v)}(),!function(){"use strict";var a={},b=!1,c=!1,d=!1,e=window.RATCHET.getBrowserCapabilities.transform,f=function(a){for(var b,c=document.querySelectorAll(".toggle");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchstart",function(c){if(c=c.originalEvent||c,d=f(c.target)){var e=d.querySelector(".toggle-handle"),g=d.clientWidth,h=e.clientWidth,i=d.classList.contains("active")?g-h:0;a={pageX:c.touches[0].pageX-i,pageY:c.touches[0].pageY},b=!1}}),window.addEventListener("touchmove",function(f){if(f=f.originalEvent||f,!(f.touches.length>1)&&d){var g=d.querySelector(".toggle-handle"),h=f.touches[0],i=d.clientWidth,j=g.clientWidth,k=i-j;if(b=!0,c=h.pageX-a.pageX,!(Math.abs(c)<Math.abs(h.pageY-a.pageY))){if(f.preventDefault(),0>c)return g.style[e]="translate3d(0,0,0)";if(c>k)return g.style[e]="translate3d("+k+"px,0,0)";g.style[e]="translate3d("+c+"px,0,0)",d.classList[c>i/2-j/2?"add":"remove"]("active")}}}),window.addEventListener("touchend",function(a){if(d){var f=d.querySelector(".toggle-handle"),g=d.clientWidth,h=f.clientWidth,i=g-h,j=!b&&!d.classList.contains("active")||b&&c>g/2-h/2;f.style[e]=j?"translate3d("+i+"px,0,0)":"translate3d(0,0,0)",d.classList[j?"add":"remove"]("active"),a=new CustomEvent("toggle",{detail:{isActive:j},bubbles:!0,cancelable:!0}),d.dispatchEvent(a),b=!1,d=!1}})}(); \ No newline at end of file
diff --git a/docs/dist/js/ratchet.js b/docs/dist/js/ratchet.js
index a49aebd..39f7fe3 100644
--- a/docs/dist/js/ratchet.js
+++ b/docs/dist/js/ratchet.js
@@ -8,6 +8,37 @@
* =====================================================
*/
/* ========================================================================
+ * Ratchet: common.js v2.0.2
+ * http://goratchet.com/
+ * ========================================================================
+ * Copyright 2015 Connor Sears
+ * Licensed under MIT (https://github.com/twbs/ratchet/blob/master/LICENSE)
+ * ======================================================================== */
+
+!(function () {
+ 'use strict';
+
+ // Create Ratchet namespace
+ if (typeof window.RATCHET === 'undefined') {
+ window.RATCHET = {};
+ }
+
+ // Original script from http://davidwalsh.name/vendor-prefix
+ window.RATCHET.getBrowserCapabilities = (function () {
+ var styles = window.getComputedStyle(document.documentElement, '');
+ var pre = (Array.prototype.slice
+ .call(styles)
+ .join('')
+ .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
+ )[1];
+ return {
+ prefix: '-' + pre + '-',
+ transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
+ };
+ })();
+}());
+
+/* ========================================================================
* Ratchet: modals.js v2.0.2
* http://goratchet.com/components#modals
* ========================================================================
@@ -640,7 +671,10 @@
}
});
window.addEventListener('popstate', popstate);
+
+ // TODO : Remove this line in the next major version
window.PUSH = PUSH;
+ window.RATCHET.push = PUSH;
}());
@@ -742,22 +776,8 @@
var scrollableArea;
var startedMoving;
- // Original script from http://davidwalsh.name/vendor-prefix
- var getBrowserCapabilities = (function () {
- var styles = window.getComputedStyle(document.documentElement, '');
- var pre = (Array.prototype.slice
- .call(styles)
- .join('')
- .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
- )[1];
- return {
- prefix: '-' + pre + '-',
- transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
- };
- })();
-
- var transformPrefix = getBrowserCapabilities.prefix;
- var transformProperty = getBrowserCapabilities.transform;
+ var transformPrefix = window.RATCHET.getBrowserCapabilities.prefix;
+ var transformProperty = window.RATCHET.getBrowserCapabilities.transform;
var getSlider = function (target) {
var i;
@@ -893,21 +913,7 @@
var touchMove = false;
var distanceX = false;
var toggle = false;
-
- // Original script from http://davidwalsh.name/vendor-prefix
- var getBrowserCapabilities = (function () {
- var styles = window.getComputedStyle(document.documentElement, '');
- var pre = (Array.prototype.slice
- .call(styles)
- .join('')
- .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
- )[1];
- return {
- transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform'
- };
- })();
-
- var transformProperty = getBrowserCapabilities.transform;
+ var transformProperty = window.RATCHET.getBrowserCapabilities.transform;
var findToggle = function (target) {
var i;
diff --git a/docs/dist/js/ratchet.min.js b/docs/dist/js/ratchet.min.js
index 057da28..dbda7e4 100644
--- a/docs/dist/js/ratchet.min.js
+++ b/docs/dist/js/ratchet.min.js
@@ -7,4 +7,4 @@
* v2.0.2 designed by @connors.
* =====================================================
*/
-!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},b=function(b){var c=a(b.target);return c&&c.hash?document.querySelector(c.hash):void 0};window.addEventListener("touchend",function(a){var c=b(a);c&&(c&&c.classList.contains("modal")&&c.classList.toggle("active"),a.preventDefault())})}(),!function(){"use strict";var a,b=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},c=function(){a.style.display="none",a.removeEventListener("webkitTransitionEnd",c)},d=function(){var b=document.createElement("div");return b.classList.add("backdrop"),b.addEventListener("touchend",function(){a.addEventListener("webkitTransitionEnd",c),a.classList.remove("visible"),a.parentNode.removeChild(d)}),b}(),e=function(c){var d=b(c.target);if(d&&d.hash&&!(d.hash.indexOf("/")>0)){try{a=document.querySelector(d.hash)}catch(e){a=null}if(null!==a&&a&&a.classList.contains("popover"))return a}},f=function(a){var b=e(a);b&&(b.style.display="block",b.offsetHeight,b.classList.add("visible"),b.parentNode.appendChild(d))};window.addEventListener("touchend",f)}(),!function(){"use strict";function a(){f[p.id]=document.body.cloneNode(!0)}var b,c=function(){},d=20,e=sessionStorage,f={},g={"slide-in":"slide-out","slide-out":"slide-in",fade:"fade"},h={bartab:".bar-tab",barnav:".bar-nav",barfooter:".bar-footer",barheadersecondary:".bar-header-secondary"},i=function(a,b){p.id=a.id,b&&(a=l(a.id)),e[a.id]=JSON.stringify(a),window.history.replaceState(a.id,a.title,a.url)},j=function(){var a=p.id,b=JSON.parse(e.cacheForwardStack||"[]"),c=JSON.parse(e.cacheBackStack||"[]");for(c.push(a);b.length;)delete e[b.shift()];for(;c.length>d;)delete e[c.shift()];l(p.id).url&&window.history.pushState(null,"",l(p.id).url),e.cacheForwardStack=JSON.stringify(b),e.cacheBackStack=JSON.stringify(c)},k=function(a,b){var c="forward"===b,d=JSON.parse(e.cacheForwardStack||"[]"),f=JSON.parse(e.cacheBackStack||"[]"),g=c?f:d,h=c?d:f;p.id&&g.push(p.id),h.pop(),e.cacheForwardStack=JSON.stringify(d),e.cacheBackStack=JSON.stringify(f)},l=function(a){return JSON.parse(e[a]||null)||{}},m=function(a){var c=u(a.target);if(!(!c||a.which>1||a.metaKey||a.ctrlKey||b||location.protocol!==c.protocol||location.host!==c.host||!c.hash&&/#/.test(c.href)||c.hash&&c.href.replace(c.hash,"")===location.href.replace(location.hash,"")||"push"===c.getAttribute("data-ignore")))return c},n=function(a){var b=m(a);b&&(a.preventDefault(),p({url:b.href,hash:b.hash,timeout:b.getAttribute("data-timeout"),transition:b.getAttribute("data-transition")}))},o=function(a){var b,c,d,i,j,m,n,o,q=a.state;if(q&&e[q]){if(j=p.id<q?"forward":"back",k(q,j),d=l(q),i=f[q],d.title&&(document.title=d.title),"back"===j?(n=JSON.parse("back"===j?e.cacheForwardStack:e.cacheBackStack),o=l(n[n.length-1])):o=d,"back"===j&&!o.id)return p.id=q;if(m="back"===j?g[o.transition]:o.transition,!i)return p({id:d.id,url:d.url,title:d.title,timeout:d.timeout,transition:m,ignorePush:!0});if(o.transition){d=w(d,".content",i.cloneNode(!0));for(b in h)h.hasOwnProperty(b)&&(c=document.querySelector(h[b]),d[b]?s(d[b],c):c&&c.parentNode.removeChild(c))}s((d.contents||i).cloneNode(!0),document.querySelector(".content"),m,function(){t()}),p.id=q,document.body.offsetHeight}},p=function(b){var d,e=p.xhr;b.container=b.container||b.transition?document.querySelector(".content"):document.body;for(d in h)h.hasOwnProperty(d)&&(b[d]=b[d]||document.querySelector(h[d]));e&&e.readyState<4&&(e.onreadystatechange=c,e.abort()),e=new XMLHttpRequest,e.open("GET",b.url,!0),e.setRequestHeader("X-PUSH","true"),e.onreadystatechange=function(){b._timeout&&clearTimeout(b._timeout),4===e.readyState&&(200===e.status?q(e,b):r(b.url))},p.id||i({id:+new Date,url:window.location.href,title:document.title,timeout:b.timeout,transition:b.transition}),a(),b.timeout&&(b._timeout=setTimeout(function(){e.abort("timeout")},b.timeout)),e.send(),e.readyState&&!b.ignorePush&&j()},q=function(a,b){var c,d,e=x(a,b);if(!e.contents)return v(b.url);if(e.title&&(document.title=e.title),b.transition)for(c in h)h.hasOwnProperty(c)&&(d=document.querySelector(h[c]),e[c]?s(e[c],d):d&&d.parentNode.removeChild(d));s(e.contents,b.container,b.transition,function(){i({id:b.id||+new Date,url:e.url,title:e.title,timeout:b.timeout,transition:b.transition},b.id),t()}),!b.ignorePush&&window._gaq&&_gaq.push(["_trackPageview"]),!b.hash},r=function(a){throw new Error("Could not get: "+a)},s=function(a,b,c,d){var e,f,g;if(c?(e=/in$/.test(c),"fade"===c&&(b.classList.add("in"),b.classList.add("fade"),a.classList.add("fade")),/slide/.test(c)&&(a.classList.add("sliding-in",e?"right":"left"),a.classList.add("sliding"),b.classList.add("sliding")),b.parentNode.insertBefore(a,b)):b?b.innerHTML=a.innerHTML:a.classList.contains("content")?document.body.appendChild(a):document.body.insertBefore(a,document.querySelector(".content")),c||d&&d(),"fade"===c){b.offsetWidth,b.classList.remove("in");var h=function(){b.removeEventListener("webkitTransitionEnd",h),a.classList.add("in"),a.addEventListener("webkitTransitionEnd",i)},i=function(){a.removeEventListener("webkitTransitionEnd",i),b.parentNode.removeChild(b),a.classList.remove("fade"),a.classList.remove("in"),d&&d()};b.addEventListener("webkitTransitionEnd",h)}if(/slide/.test(c)){var j=function(){a.removeEventListener("webkitTransitionEnd",j),a.classList.remove("sliding","sliding-in"),a.classList.remove(g),b.parentNode.removeChild(b),d&&d()};b.offsetWidth,g=e?"right":"left",f=e?"left":"right",b.classList.add(f),a.classList.remove(g),a.addEventListener("webkitTransitionEnd",j)}},t=function(){var a=new CustomEvent("push",{detail:{state:l(p.id)},bubbles:!0,cancelable:!0});window.dispatchEvent(a)},u=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},v=function(a){window.history.replaceState(null,"","#"),window.location.replace(a)},w=function(a,b,c){var d,e={};for(d in a)a.hasOwnProperty(d)&&(e[d]=a[d]);return Object.keys(h).forEach(function(a){var b=c.querySelector(h[a]);b&&b.parentNode.removeChild(b),e[a]=b}),e.contents=c.querySelector(b),e},x=function(a,b){var c,d,e={},f=a.responseText;if(e.url=b.url,!f)return e;/<html/i.test(f)?(c=document.createElement("div"),d=document.createElement("div"),c.innerHTML=f.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0],d.innerHTML=f.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]):(c=d=document.createElement("div"),c.innerHTML=f),e.title=c.querySelector("title");var g="innerText"in e.title?"innerText":"textContent";return e.title=e.title&&e.title[g].trim(),b.transition?e=w(e,".content",d):e.contents=d,e};window.addEventListener("touchstart",function(){b=!1}),window.addEventListener("touchmove",function(){b=!0}),window.addEventListener("touchend",n),window.addEventListener("click",function(a){m(a)&&a.preventDefault()}),window.addEventListener("popstate",o),window.PUSH=p}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll(".segmented-control .control-item");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchend",function(b){var c,d,e,f=a(b.target),g="active",h="."+g;if(f&&(c=f.parentNode.querySelector(h),c&&c.classList.remove(g),f.classList.add(g),f.hash&&(e=document.querySelector(f.hash)))){d=e.parentNode.querySelectorAll(h);for(var i=0;i<d.length;i++)d[i].classList.remove(g);e.classList.add(g)}}),window.addEventListener("click",function(b){a(b.target)&&b.preventDefault()})}(),!function(){"use strict";var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{prefix:"-"+b+"-",transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}(),p=o.prefix,q=o.transform,r=function(a){for(var b,c=document.querySelectorAll(".slider > .slide-group");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},s=function(){var a=c.style[q].match(/translate3d\(([^,]*)/),b=a?a[1]:0;return parseInt(b,10)},t=function(a){var b=a?0>d?"ceil":"floor":"round";k=Math[b](s()/(m/c.children.length)),k+=a,k=Math.min(k,0),k=Math.max(-(c.children.length-1),k)},u=function(f){if(c=r(f.target)){var k=c.querySelector(".slide");m=k.offsetWidth*c.children.length,l=void 0,j=c.offsetWidth,i=1,g=-(c.children.length-1),h=+new Date,a=f.touches[0].pageX,b=f.touches[0].pageY,d=0,e=0,t(0),c.style[p+"transition-duration"]=0}},v=function(h){h.touches.length>1||!c||(n||(a+=h.touches[0].pageX-a-1),d=h.touches[0].pageX-a,e=h.touches[0].pageY-b,a=h.touches[0].pageX,b=h.touches[0].pageY,"undefined"==typeof l&&n&&(l=Math.abs(e)>Math.abs(d)),l||(f=d/i+s(),h.preventDefault(),i=0===k&&d>0?a/j+1.25:k===g&&0>d?Math.abs(a)/j+1.25:1,c.style[q]="translate3d("+f+"px,0,0)",n=!0))},w=function(a){c&&!l&&(n=!1,t(+new Date-h<1e3&&Math.abs(d)>15?0>d?-1:1:0),f=k*j,c.style[p+"transition-duration"]=".2s",c.style[q]="translate3d("+f+"px,0,0)",a=new CustomEvent("slide",{detail:{slideNumber:Math.abs(k)},bubbles:!0,cancelable:!0}),c.parentNode.dispatchEvent(a))};window.addEventListener("touchstart",u),window.addEventListener("touchmove",v),window.addEventListener("touchend",w)}(),!function(){"use strict";var a={},b=!1,c=!1,d=!1,e=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}(),f=e.transform,g=function(a){for(var b,c=document.querySelectorAll(".toggle");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchstart",function(c){if(c=c.originalEvent||c,d=g(c.target)){var e=d.querySelector(".toggle-handle"),f=d.clientWidth,h=e.clientWidth,i=d.classList.contains("active")?f-h:0;a={pageX:c.touches[0].pageX-i,pageY:c.touches[0].pageY},b=!1}}),window.addEventListener("touchmove",function(e){if(e=e.originalEvent||e,!(e.touches.length>1)&&d){var g=d.querySelector(".toggle-handle"),h=e.touches[0],i=d.clientWidth,j=g.clientWidth,k=i-j;if(b=!0,c=h.pageX-a.pageX,!(Math.abs(c)<Math.abs(h.pageY-a.pageY))){if(e.preventDefault(),0>c)return g.style[f]="translate3d(0,0,0)";if(c>k)return g.style[f]="translate3d("+k+"px,0,0)";g.style[f]="translate3d("+c+"px,0,0)",d.classList[c>i/2-j/2?"add":"remove"]("active")}}}),window.addEventListener("touchend",function(a){if(d){var e=d.querySelector(".toggle-handle"),g=d.clientWidth,h=e.clientWidth,i=g-h,j=!b&&!d.classList.contains("active")||b&&c>g/2-h/2;e.style[f]=j?"translate3d("+i+"px,0,0)":"translate3d(0,0,0)",d.classList[j?"add":"remove"]("active"),a=new CustomEvent("toggle",{detail:{isActive:j},bubbles:!0,cancelable:!0}),d.dispatchEvent(a),b=!1,d=!1}})}(); \ No newline at end of file
+!function(){"use strict";"undefined"==typeof window.RATCHET&&(window.RATCHET={}),window.RATCHET.getBrowserCapabilities=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{prefix:"-"+b+"-",transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}()}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},b=function(b){var c=a(b.target);return c&&c.hash?document.querySelector(c.hash):void 0};window.addEventListener("touchend",function(a){var c=b(a);c&&(c&&c.classList.contains("modal")&&c.classList.toggle("active"),a.preventDefault())})}(),!function(){"use strict";var a,b=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},c=function(){a.style.display="none",a.removeEventListener("webkitTransitionEnd",c)},d=function(){var b=document.createElement("div");return b.classList.add("backdrop"),b.addEventListener("touchend",function(){a.addEventListener("webkitTransitionEnd",c),a.classList.remove("visible"),a.parentNode.removeChild(d)}),b}(),e=function(c){var d=b(c.target);if(d&&d.hash&&!(d.hash.indexOf("/")>0)){try{a=document.querySelector(d.hash)}catch(e){a=null}if(null!==a&&a&&a.classList.contains("popover"))return a}},f=function(a){var b=e(a);b&&(b.style.display="block",b.offsetHeight,b.classList.add("visible"),b.parentNode.appendChild(d))};window.addEventListener("touchend",f)}(),!function(){"use strict";function a(){f[p.id]=document.body.cloneNode(!0)}var b,c=function(){},d=20,e=sessionStorage,f={},g={"slide-in":"slide-out","slide-out":"slide-in",fade:"fade"},h={bartab:".bar-tab",barnav:".bar-nav",barfooter:".bar-footer",barheadersecondary:".bar-header-secondary"},i=function(a,b){p.id=a.id,b&&(a=l(a.id)),e[a.id]=JSON.stringify(a),window.history.replaceState(a.id,a.title,a.url)},j=function(){var a=p.id,b=JSON.parse(e.cacheForwardStack||"[]"),c=JSON.parse(e.cacheBackStack||"[]");for(c.push(a);b.length;)delete e[b.shift()];for(;c.length>d;)delete e[c.shift()];l(p.id).url&&window.history.pushState(null,"",l(p.id).url),e.cacheForwardStack=JSON.stringify(b),e.cacheBackStack=JSON.stringify(c)},k=function(a,b){var c="forward"===b,d=JSON.parse(e.cacheForwardStack||"[]"),f=JSON.parse(e.cacheBackStack||"[]"),g=c?f:d,h=c?d:f;p.id&&g.push(p.id),h.pop(),e.cacheForwardStack=JSON.stringify(d),e.cacheBackStack=JSON.stringify(f)},l=function(a){return JSON.parse(e[a]||null)||{}},m=function(a){var c=u(a.target);if(!(!c||a.which>1||a.metaKey||a.ctrlKey||b||location.protocol!==c.protocol||location.host!==c.host||!c.hash&&/#/.test(c.href)||c.hash&&c.href.replace(c.hash,"")===location.href.replace(location.hash,"")||"push"===c.getAttribute("data-ignore")))return c},n=function(a){var b=m(a);b&&(a.preventDefault(),p({url:b.href,hash:b.hash,timeout:b.getAttribute("data-timeout"),transition:b.getAttribute("data-transition")}))},o=function(a){var b,c,d,i,j,m,n,o,q=a.state;if(q&&e[q]){if(j=p.id<q?"forward":"back",k(q,j),d=l(q),i=f[q],d.title&&(document.title=d.title),"back"===j?(n=JSON.parse("back"===j?e.cacheForwardStack:e.cacheBackStack),o=l(n[n.length-1])):o=d,"back"===j&&!o.id)return p.id=q;if(m="back"===j?g[o.transition]:o.transition,!i)return p({id:d.id,url:d.url,title:d.title,timeout:d.timeout,transition:m,ignorePush:!0});if(o.transition){d=w(d,".content",i.cloneNode(!0));for(b in h)h.hasOwnProperty(b)&&(c=document.querySelector(h[b]),d[b]?s(d[b],c):c&&c.parentNode.removeChild(c))}s((d.contents||i).cloneNode(!0),document.querySelector(".content"),m,function(){t()}),p.id=q,document.body.offsetHeight}},p=function(b){var d,e=p.xhr;b.container=b.container||b.transition?document.querySelector(".content"):document.body;for(d in h)h.hasOwnProperty(d)&&(b[d]=b[d]||document.querySelector(h[d]));e&&e.readyState<4&&(e.onreadystatechange=c,e.abort()),e=new XMLHttpRequest,e.open("GET",b.url,!0),e.setRequestHeader("X-PUSH","true"),e.onreadystatechange=function(){b._timeout&&clearTimeout(b._timeout),4===e.readyState&&(200===e.status?q(e,b):r(b.url))},p.id||i({id:+new Date,url:window.location.href,title:document.title,timeout:b.timeout,transition:b.transition}),a(),b.timeout&&(b._timeout=setTimeout(function(){e.abort("timeout")},b.timeout)),e.send(),e.readyState&&!b.ignorePush&&j()},q=function(a,b){var c,d,e=x(a,b);if(!e.contents)return v(b.url);if(e.title&&(document.title=e.title),b.transition)for(c in h)h.hasOwnProperty(c)&&(d=document.querySelector(h[c]),e[c]?s(e[c],d):d&&d.parentNode.removeChild(d));s(e.contents,b.container,b.transition,function(){i({id:b.id||+new Date,url:e.url,title:e.title,timeout:b.timeout,transition:b.transition},b.id),t()}),!b.ignorePush&&window._gaq&&_gaq.push(["_trackPageview"]),!b.hash},r=function(a){throw new Error("Could not get: "+a)},s=function(a,b,c,d){var e,f,g;if(c?(e=/in$/.test(c),"fade"===c&&(b.classList.add("in"),b.classList.add("fade"),a.classList.add("fade")),/slide/.test(c)&&(a.classList.add("sliding-in",e?"right":"left"),a.classList.add("sliding"),b.classList.add("sliding")),b.parentNode.insertBefore(a,b)):b?b.innerHTML=a.innerHTML:a.classList.contains("content")?document.body.appendChild(a):document.body.insertBefore(a,document.querySelector(".content")),c||d&&d(),"fade"===c){b.offsetWidth,b.classList.remove("in");var h=function(){b.removeEventListener("webkitTransitionEnd",h),a.classList.add("in"),a.addEventListener("webkitTransitionEnd",i)},i=function(){a.removeEventListener("webkitTransitionEnd",i),b.parentNode.removeChild(b),a.classList.remove("fade"),a.classList.remove("in"),d&&d()};b.addEventListener("webkitTransitionEnd",h)}if(/slide/.test(c)){var j=function(){a.removeEventListener("webkitTransitionEnd",j),a.classList.remove("sliding","sliding-in"),a.classList.remove(g),b.parentNode.removeChild(b),d&&d()};b.offsetWidth,g=e?"right":"left",f=e?"left":"right",b.classList.add(f),a.classList.remove(g),a.addEventListener("webkitTransitionEnd",j)}},t=function(){var a=new CustomEvent("push",{detail:{state:l(p.id)},bubbles:!0,cancelable:!0});window.dispatchEvent(a)},u=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},v=function(a){window.history.replaceState(null,"","#"),window.location.replace(a)},w=function(a,b,c){var d,e={};for(d in a)a.hasOwnProperty(d)&&(e[d]=a[d]);return Object.keys(h).forEach(function(a){var b=c.querySelector(h[a]);b&&b.parentNode.removeChild(b),e[a]=b}),e.contents=c.querySelector(b),e},x=function(a,b){var c,d,e={},f=a.responseText;if(e.url=b.url,!f)return e;/<html/i.test(f)?(c=document.createElement("div"),d=document.createElement("div"),c.innerHTML=f.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0],d.innerHTML=f.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]):(c=d=document.createElement("div"),c.innerHTML=f),e.title=c.querySelector("title");var g="innerText"in e.title?"innerText":"textContent";return e.title=e.title&&e.title[g].trim(),b.transition?e=w(e,".content",d):e.contents=d,e};window.addEventListener("touchstart",function(){b=!1}),window.addEventListener("touchmove",function(){b=!0}),window.addEventListener("touchend",n),window.addEventListener("click",function(a){m(a)&&a.preventDefault()}),window.addEventListener("popstate",o),window.PUSH=p,window.RATCHET.push=p}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll(".segmented-control .control-item");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchend",function(b){var c,d,e,f=a(b.target),g="active",h="."+g;if(f&&(c=f.parentNode.querySelector(h),c&&c.classList.remove(g),f.classList.add(g),f.hash&&(e=document.querySelector(f.hash)))){d=e.parentNode.querySelectorAll(h);for(var i=0;i<d.length;i++)d[i].classList.remove(g);e.classList.add(g)}}),window.addEventListener("click",function(b){a(b.target)&&b.preventDefault()})}(),!function(){"use strict";var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=window.RATCHET.getBrowserCapabilities.prefix,p=window.RATCHET.getBrowserCapabilities.transform,q=function(a){for(var b,c=document.querySelectorAll(".slider > .slide-group");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},r=function(){var a=c.style[p].match(/translate3d\(([^,]*)/),b=a?a[1]:0;return parseInt(b,10)},s=function(a){var b=a?0>d?"ceil":"floor":"round";k=Math[b](r()/(m/c.children.length)),k+=a,k=Math.min(k,0),k=Math.max(-(c.children.length-1),k)},t=function(f){if(c=q(f.target)){var k=c.querySelector(".slide");m=k.offsetWidth*c.children.length,l=void 0,j=c.offsetWidth,i=1,g=-(c.children.length-1),h=+new Date,a=f.touches[0].pageX,b=f.touches[0].pageY,d=0,e=0,s(0),c.style[o+"transition-duration"]=0}},u=function(h){h.touches.length>1||!c||(n||(a+=h.touches[0].pageX-a-1),d=h.touches[0].pageX-a,e=h.touches[0].pageY-b,a=h.touches[0].pageX,b=h.touches[0].pageY,"undefined"==typeof l&&n&&(l=Math.abs(e)>Math.abs(d)),l||(f=d/i+r(),h.preventDefault(),i=0===k&&d>0?a/j+1.25:k===g&&0>d?Math.abs(a)/j+1.25:1,c.style[p]="translate3d("+f+"px,0,0)",n=!0))},v=function(a){c&&!l&&(n=!1,s(+new Date-h<1e3&&Math.abs(d)>15?0>d?-1:1:0),f=k*j,c.style[o+"transition-duration"]=".2s",c.style[p]="translate3d("+f+"px,0,0)",a=new CustomEvent("slide",{detail:{slideNumber:Math.abs(k)},bubbles:!0,cancelable:!0}),c.parentNode.dispatchEvent(a))};window.addEventListener("touchstart",t),window.addEventListener("touchmove",u),window.addEventListener("touchend",v)}(),!function(){"use strict";var a={},b=!1,c=!1,d=!1,e=window.RATCHET.getBrowserCapabilities.transform,f=function(a){for(var b,c=document.querySelectorAll(".toggle");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchstart",function(c){if(c=c.originalEvent||c,d=f(c.target)){var e=d.querySelector(".toggle-handle"),g=d.clientWidth,h=e.clientWidth,i=d.classList.contains("active")?g-h:0;a={pageX:c.touches[0].pageX-i,pageY:c.touches[0].pageY},b=!1}}),window.addEventListener("touchmove",function(f){if(f=f.originalEvent||f,!(f.touches.length>1)&&d){var g=d.querySelector(".toggle-handle"),h=f.touches[0],i=d.clientWidth,j=g.clientWidth,k=i-j;if(b=!0,c=h.pageX-a.pageX,!(Math.abs(c)<Math.abs(h.pageY-a.pageY))){if(f.preventDefault(),0>c)return g.style[e]="translate3d(0,0,0)";if(c>k)return g.style[e]="translate3d("+k+"px,0,0)";g.style[e]="translate3d("+c+"px,0,0)",d.classList[c>i/2-j/2?"add":"remove"]("active")}}}),window.addEventListener("touchend",function(a){if(d){var f=d.querySelector(".toggle-handle"),g=d.clientWidth,h=f.clientWidth,i=g-h,j=!b&&!d.classList.contains("active")||b&&c>g/2-h/2;f.style[e]=j?"translate3d("+i+"px,0,0)":"translate3d(0,0,0)",d.classList[j?"add":"remove"]("active"),a=new CustomEvent("toggle",{detail:{isActive:j},bubbles:!0,cancelable:!0}),d.dispatchEvent(a),b=!1,d=!1}})}(); \ No newline at end of file