PHP Classes

File: engine/modules/contrib/foundation/js/plugins/foundation.core.min.js

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/contrib/foundation/js/plugins/foundation.core.min.js   Download  
File: engine/modules/contrib/foundation/js/plugins/foundation.core.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 5 years ago
Size: 4,691 bytes
 

Contents

Class file image Download
!function(t){"use strict";function n(t){if(void 0===Function.prototype.name){var n=/function\s([^(]{1,})\(/,i=n.exec(t.toString());return i&&i.length>1?i[1].trim():""}return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name}function i(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}function e(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var o="6.3.0",r={version:o,_plugins:{},_uuids:[],rtl:function(){return"rtl"===t("html").attr("dir")},plugin:function(t,i){var o=i||n(t),r=e(o);this._plugins[r]=this[o]=t},registerPlugin:function(t,i){var o=i?e(i):n(t.constructor).toLowerCase();t.uuid=this.GetYoDigits(6,o),t.$element.attr("data-"+o)||t.$element.attr("data-"+o,t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf."+o),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var i=e(n(t.$element.data("zfPlugin").constructor));this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-"+i).removeData("zfPlugin").trigger("destroyed.zf."+i);for(var o in t)t[o]=null},reInit:function(n){var i=n instanceof t;try{if(i)n.each(function(){t(this).data("zfPlugin")._init()});else{var o=typeof n,r=this,a={object:function(n){n.forEach(function(n){n=e(n),t("[data-"+n+"]").foundation("_init")})},string:function(){n=e(n),t("[data-"+n+"]").foundation("_init")},undefined:function(){this.object(Object.keys(r._plugins))}};a[o](n)}}catch(t){console.error(t)}finally{return n}},GetYoDigits:function(t,n){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(n?"-"+n:"")},reflow:function(n,e){"undefined"==typeof e?e=Object.keys(this._plugins):"string"==typeof e&&(e=[e]);var o=this;t.each(e,function(e,r){var a=o._plugins[r],u=t(n).find("[data-"+r+"]").addBack("[data-"+r+"]");u.each(function(){var n=t(this),e={};if(n.data("zfPlugin"))return void console.warn("Tried to initialize "+r+" on an element that already has a Foundation plugin.");if(n.attr("data-options")){n.attr("data-options").split(";").forEach(function(t,n){var o=t.split(":").map(function(t){return t.trim()});o[0]&&(e[o[0]]=i(o[1]))})}try{n.data("zfPlugin",new a(t(this),e))}catch(t){console.error(t)}finally{return}})})},getFnName:n,transitionend:function(t){var n,i={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},e=document.createElement("div");for(var o in i)"undefined"!=typeof e.style[o]&&(n=i[o]);return n?n:(n=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}};r.util={throttle:function(t,n){var i=null;return function(){var e=this,o=arguments;null===i&&(i=setTimeout(function(){t.apply(e,o),i=null},n))}}};var a=function(i){var e=typeof i,o=t("meta.foundation-mq"),a=t(".no-js");if(o.length||t('<meta class="foundation-mq">').appendTo(document.head),a.length&&a.removeClass("no-js"),"undefined"===e)r.MediaQuery._init(),r.reflow(this);else{if("string"!==e)throw new TypeError("We're sorry, "+e+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var u=Array.prototype.slice.call(arguments,1),s=this.data("zfPlugin");if(void 0===s||void 0===s[i])throw new ReferenceError("We're sorry, '"+i+"' is not an available method for "+(s?n(s):"this element")+".");1===this.length?s[i].apply(s,u):this.each(function(n,e){s[i].apply(t(e).data("zfPlugin"),u)})}return this};window.Foundation=r,t.fn.foundation=a,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],n=0;n<t.length&&!window.requestAnimationFrame;++n){var i=t[n];window.requestAnimationFrame=window[i+"RequestAnimationFrame"],window.cancelAnimationFrame=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var e=0;window.requestAnimationFrame=function(t){var n=Date.now(),i=Math.max(e+16,n);return setTimeout(function(){t(e=i)},i-n)},window.cancelAnimationFrame=clearTimeout}window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var n=Array.prototype.slice.call(arguments,1),i=this,e=function(){},o=function(){return i.apply(this instanceof e?this:t,n.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(e.prototype=this.prototype),o.prototype=new e,o})}(jQuery);