biofriction-wp-theme/node_modules/foundation-sites/dist/js/plugins/foundation.core.min.js

3 lines
12 KiB
JavaScript

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?exports["foundation.core"]=n(require("jquery")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.core"]=n(t.jQuery))}(window,function(e){return function(e){var o={};function r(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=o,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(n,t){if(1&t&&(n=r(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)r.d(e,o,function(t){return n[t]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=0)}({"./js/entries/plugins/foundation.core.js":function(t,n,e){"use strict";e.r(n);var o=e("jquery"),r=e.n(o),i=e("./js/foundation.core.js");e.d(n,"Foundation",function(){return i.Foundation});var a=e("./js/foundation.core.plugin.js"),u=e("./js/foundation.core.utils.js");e.d(n,"Plugin",function(){return a.Plugin}),e.d(n,"rtl",function(){return u.rtl}),e.d(n,"GetYoDigits",function(){return u.GetYoDigits}),e.d(n,"RegExpEscape",function(){return u.RegExpEscape}),e.d(n,"transitionend",function(){return u.transitionend}),e.d(n,"onLoad",function(){return u.onLoad}),e.d(n,"ignoreMousedisappear",function(){return u.ignoreMousedisappear}),i.Foundation.addToJquery(r.a),i.Foundation.Plugin=a.Plugin,i.Foundation.rtl=u.rtl,i.Foundation.GetYoDigits=u.GetYoDigits,i.Foundation.transitionend=u.transitionend,i.Foundation.RegExpEscape=u.RegExpEscape,i.Foundation.onLoad=u.onLoad,window.Foundation=i.Foundation},"./js/foundation.core.js":function(t,n,e){"use strict";e.r(n),e.d(n,"Foundation",function(){return s});var o=e("jquery"),i=e.n(o),r=e("./js/foundation.core.utils.js"),a=e("./js/foundation.util.mediaQuery.js");function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s={version:"6.5.1",_plugins:{},_uuids:[],plugin:function(t,n){var e=n||c(t),o=d(e);this._plugins[o]=this[e]=t},registerPlugin:function(t,n){var e=n?d(n):c(t.constructor).toLowerCase();t.uuid=Object(r.GetYoDigits)(6,e),t.$element.attr("data-".concat(e))||t.$element.attr("data-".concat(e),t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf.".concat(e)),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var n=d(c(t.$element.data("zfPlugin").constructor));for(var e in this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-".concat(n)).removeData("zfPlugin").trigger("destroyed.zf.".concat(n)),t)t[e]=null},reInit:function(t){var n=t instanceof i.a;try{if(n)t.each(function(){i()(this).data("zfPlugin")._init()});else{var e=u(t),o=this;({object:function(t){t.forEach(function(t){t=d(t),i()("[data-"+t+"]").foundation("_init")})},string:function(){t=d(t),i()("[data-"+t+"]").foundation("_init")},undefined:function(){this.object(Object.keys(o._plugins))}})[e](t)}}catch(t){console.error(t)}finally{return t}},reflow:function(o,t){void 0===t?t=Object.keys(this._plugins):"string"==typeof t&&(t=[t]);var r=this;i.a.each(t,function(t,n){var e=r._plugins[n];i()(o).find("[data-"+n+"]").addBack("[data-"+n+"]").each(function(){var t=i()(this),o={};if(t.data("zfPlugin"))console.warn("Tried to initialize "+n+" on an element that already has a Foundation plugin.");else{if(t.attr("data-options"))t.attr("data-options").split(";").forEach(function(t,n){var e=t.split(":").map(function(t){return t.trim()});e[0]&&(o[e[0]]=function(t){{if("true"===t)return!0;if("false"===t)return!1;if(!isNaN(1*t))return parseFloat(t)}return t}(e[1]))});try{t.data("zfPlugin",new e(i()(this),o))}catch(t){console.error(t)}finally{return}}})})},getFnName:c,addToJquery:function(i){return i.fn.foundation=function(e){var t=u(e),n=i(".no-js");if(n.length&&n.removeClass("no-js"),"undefined"===t)a.MediaQuery._init(),s.reflow(this);else{if("string"!==t)throw new TypeError("We're sorry, ".concat(t," is not a valid parameter. You must use a string representing the method you wish to invoke."));var o=Array.prototype.slice.call(arguments,1),r=this.data("zfPlugin");if(void 0===r||void 0===r[e])throw new ReferenceError("We're sorry, '"+e+"' is not an available method for "+(r?c(r):"this element")+".");1===this.length?r[e].apply(r,o):this.each(function(t,n){r[e].apply(i(n).data("zfPlugin"),o)})}return this},i}};function c(t){if(void 0!==Function.prototype.name)return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name;var n=/function\s([^(]{1,})\(/.exec(t.toString());return n&&1<n.length?n[1].trim():""}function d(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}s.util={throttle:function(e,o){var r=null;return function(){var t=this,n=arguments;null===r&&(r=setTimeout(function(){e.apply(t,n),r=null},o))}}},window.Foundation=s,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 e=t[n];window.requestAnimationFrame=window[e+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var o=0;window.requestAnimationFrame=function(t){var n=Date.now(),e=Math.max(o+16,n);return setTimeout(function(){t(o=e)},e-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),e=this,o=function(){},r=function(){return e.apply(this instanceof o?this:t,n.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(o.prototype=this.prototype),r.prototype=new o,r})},"./js/foundation.core.plugin.js":function(t,n,e){"use strict";e.r(n),e.d(n,"Plugin",function(){return o});e("jquery");var r=e("./js/foundation.core.utils.js");function i(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var o=function(){function o(t,n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),this._setup(t,n);var e=u(this);this.uuid=Object(r.GetYoDigits)(6,e),this.$element.attr("data-".concat(e))||this.$element.attr("data-".concat(e),this.uuid),this.$element.data("zfPlugin")||this.$element.data("zfPlugin",this),this.$element.trigger("init.zf.".concat(e))}var t,n,e;return t=o,(n=[{key:"destroy",value:function(){this._destroy();var t=u(this);for(var n in this.$element.removeAttr("data-".concat(t)).removeData("zfPlugin").trigger("destroyed.zf.".concat(t)),this)this[n]=null}}])&&i(t.prototype,n),e&&i(t,e),o}();function a(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function u(t){return void 0!==t.constructor.name?a(t.constructor.name):a(t.className)}},"./js/foundation.core.utils.js":function(t,n,e){"use strict";e.r(n),e.d(n,"rtl",function(){return r}),e.d(n,"GetYoDigits",function(){return i}),e.d(n,"RegExpEscape",function(){return a}),e.d(n,"transitionend",function(){return u}),e.d(n,"onLoad",function(){return c}),e.d(n,"ignoreMousedisappear",function(){return d});var o=e("jquery"),s=e.n(o);function r(){return"rtl"===s()("html").attr("dir")}function i(t,n){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(n?"-".concat(n):"")}function a(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function u(t){var n,e={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},o=document.createElement("div");for(var r in e)void 0!==o.style[r]&&(n=e[r]);return n||(n=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}function c(t,n){var e="complete"===document.readyState,o=(e?"_didLoad":"load")+".zf.util.onLoad",r=function(){return t.triggerHandler(o)};return t&&(n&&t.one(o,n),e?setTimeout(r):s()(window).one("load",r)),o}function d(i){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.ignoreLeaveWindow,a=void 0!==n&&n,e=t.ignoreReappear,u=void 0!==e&&e;return function(n){for(var t=arguments.length,e=new Array(1<t?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];var r=i.bind.apply(i,[this,n].concat(e));if(null!==n.relatedTarget)return r();setTimeout(function(){if(!a&&document.hasFocus&&!document.hasFocus())return r();u||s()(document).one("mouseenter",function(t){s()(n.currentTarget).has(t.target).length||(n.relatedTarget=t.target,r())})},0)}}},"./js/foundation.util.mediaQuery.js":function(t,n,e){"use strict";e.r(n),e.d(n,"MediaQuery",function(){return a});var o=e("jquery"),i=e.n(o);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}window.matchMedia||(window.matchMedia=function(){var n=window.styleMedia||window.media;if(!n){var e,o=document.createElement("style"),t=document.getElementsByTagName("script")[0];o.type="text/css",o.id="matchmediajs-test",t?t.parentNode.insertBefore(o,t):document.head.appendChild(o),e="getComputedStyle"in window&&window.getComputedStyle(o,null)||o.currentStyle,n={matchMedium:function(t){var n="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return o.styleSheet?o.styleSheet.cssText=n:o.textContent=n,"1px"===e.width}}}return function(t){return{matches:n.matchMedium(t||"all"),media:t||"all"}}}());var a={queries:[],current:"",_init:function(){i()("meta.foundation-mq").length||i()('<meta class="foundation-mq">').appendTo(document.head);var t,n,e,o=i()(".foundation-mq").css("font-family");for(var r in e={},t="string"==typeof(n=o)&&(n=n.trim().slice(1,-1))?e=n.split("&").reduce(function(t,n){var e=n.replace(/\+/g," ").split("="),o=e[0],r=e[1];return o=decodeURIComponent(o),r=void 0===r?null:decodeURIComponent(r),t.hasOwnProperty(o)?Array.isArray(t[o])?t[o].push(r):t[o]=[t[o],r]:t[o]=r,t},{}):e)t.hasOwnProperty(r)&&this.queries.push({name:r,value:"only screen and (min-width: ".concat(t[r],")")});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var n=this.get(t);return!!n&&window.matchMedia(n).matches},is:function(t){return 1<(t=t.trim().split(" ")).length&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var n in this.queries)if(this.queries.hasOwnProperty(n)){var e=this.queries[n];if(t===e.name)return e.value}return null},_getCurrentSize:function(){for(var t,n=0;n<this.queries.length;n++){var e=this.queries[n];window.matchMedia(e.value).matches&&(t=e)}return"object"===r(t)?t.name:t},_watcher:function(){var e=this;i()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var t=e._getCurrentSize(),n=e.current;t!==n&&(e.current=t,i()(window).trigger("changed.zf.mediaquery",[t,n]))})}}},0:function(t,n,e){t.exports=e("./js/entries/plugins/foundation.core.js")},jquery:function(t,n){t.exports=e}})});
//# sourceMappingURL=foundation.core.min.js.map