1
0
mirror of https://github.com/arsenetar/arsenetar.github.io.git synced 2024-11-15 10:29:02 +00:00
arsenetar.github.io/theme/js/vendor/zepto.min.js

2 lines
33 KiB
JavaScript
Raw Normal View History

2013-07-29 15:29:57 +00:00
/* Zepto v1.0-1-ga3cab6c - polyfill zepto detect event ajax form fx - zeptojs.com/license */
(function(e){if(String.prototype.trim===e)String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};if(Array.prototype.reduce===e)Array.prototype.reduce=function(t){if(this===void 0||this===null)throw new TypeError;var n=Object(this),r=n.length>>>0,i=0,s;if(typeof t!="function")throw new TypeError;if(r==0&&arguments.length==1)throw new TypeError;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(true);while(i<r){if(i in n)s=t.call(e,s,n[i],i,n);i++}return s}})();var Zepto=function(){function O(e){return e==null?String(e):T[N.call(e)]||"object"}function M(e){return O(e)=="function"}function _(e){return e!=null&&e==e.window}function D(e){return e!=null&&e.nodeType==e.DOCUMENT_NODE}function P(e){return O(e)=="object"}function H(e){return P(e)&&!_(e)&&e.__proto__==Object.prototype}function B(e){return e instanceof Array}function j(e){return typeof e.length=="number"}function F(e){return o.call(e,function(e){return e!=null})}function I(e){return e.length>0?n.fn.concat.apply([],e):e}function q(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function R(e){return e in f?f[e]:f[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function U(e,t){return typeof t=="number"&&!c[q(e)]?t+"px":t}function z(e){var t,n;if(!a[e]){t=u.createElement(e);u.body.appendChild(t);n=l(t,"").getPropertyValue("display");t.parentNode.removeChild(t);n=="none"&&(n="block");a[e]=n}return a[e]}function W(e){return"children"in e?s.call(e.children):n.map(e.childNodes,function(e){if(e.nodeType==1)return e})}function X(n,r,i){for(t in r)if(i&&(H(r[t])||B(r[t]))){if(H(r[t])&&!H(n[t]))n[t]={};if(B(r[t])&&!B(n[t]))n[t]=[];X(n[t],r[t],i)}else if(r[t]!==e)n[t]=r[t]}function V(t,r){return r===e?n(t):n(t).filter(r)}function $(e,t,n,r){return M(t)?t.call(e,n,r):t}function J(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function K(t,n){var r=t.className,i=r&&r.baseVal!==e;if(n===e)return i?r.baseVal:r;i?r.baseVal=n:t.className=n}function Q(e){var t;try{return e?e=="true"||(e=="false"?false:e=="null"?null:!isNaN(t=Number(e))?t:/^[\[\{]/.test(e)?n.parseJSON(e):e):e}catch(r){return e}}function G(e,t){t(e);for(var n in e.childNodes)G(e.childNodes[n],t)}var e,t,n,r,i=[],s=i.slice,o=i.filter,u=window.document,a={},f={},l=u.defaultView.getComputedStyle,c={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/^(?:body|html)$/i,v=["val","css","html","text","data","width","height","offset"],m=["after","prepend","before","append"],g=u.createElement("table"),y=u.createElement("tr"),b={tr:u.createElement("tbody"),tbody:g,thead:g,tfoot:g,td:y,th:y,"*":u.createElement("div")},w=/complete|loaded|interactive/,E=/^\.([\w-]+)$/,S=/^#([\w-]*)$/,x=/^[\w-]+$/,T={},N=T.toString,C={},k,L,A=u.createElement("div");C.matches=function(e,t){if(!e||e.nodeType!==1)return false;var n=e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var r,i=e.parentNode,s=!i;if(s)(i=A).appendChild(e);r=~C.qsa(i,t).indexOf(e);s&&A.removeChild(e);return r};k=function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})};L=function(e){return o.call(e,function(t,n){return e.indexOf(t)==n})};C.fragment=function(t,r,i){if(t.replace)t=t.replace(p,"<$1></$2>");if(r===e)r=h.test(t)&&RegExp.$1;if(!(r in b))r="*";var o,u,a=b[r];a.innerHTML=""+t;u=n.each(s.call(a.childNodes),function(){a.removeChild(this)});if(H(i)){o=n(u);n.each(i,function(e,t){if(v.indexOf(e)>-1)o[e](t);else o.attr(e,t)})}return u};C.Z=function(e,t){e=e||[];e.__proto__=n.fn;e.selector=t||"";return e};C.isZ=function(e){return e instanceof C.Z};C.init=function(t,r){if(!t)return C.Z();else if(M(t))return n(u).ready(t);else if(C.isZ(t))return t;else{var i;if(B(t))i=F(t);else if(P(t))i=[H(t)?n.extend({},t):t],t=null;else if(h.test(t))i=C.fragment(t.trim(),RegExp.$1,r),t=null;else if(r!==e)return