vendor/assets/js/plugins/foundation.interchange.min.js in foundation-rails-6.5.1.0 vs vendor/assets/js/plugins/foundation.interchange.min.js in foundation-rails-6.5.3.0
- old
+ new
@@ -1 +1 @@
-!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("./foundation.core"),require("./foundation.core.plugin"),require("./foundation.core.utils"),require("./foundation.util.mediaQuery"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","./foundation.core.plugin","./foundation.core.utils","./foundation.util.mediaQuery","jquery"],n):"object"==typeof exports?exports["foundation.interchange"]=n(require("./foundation.core"),require("./foundation.core.plugin"),require("./foundation.core.utils"),require("./foundation.util.mediaQuery"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.interchange"]=n(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.__FOUNDATION_EXTERNAL__["foundation.core"],e.__FOUNDATION_EXTERNAL__["foundation.core"],e.__FOUNDATION_EXTERNAL__["foundation.util.mediaQuery"],e.jQuery))}(window,function(t,r,o,i,u){return function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=r,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(n,e){if(1&e&&(n=o(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)o.d(t,r,function(e){return n[e]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=7)}({"./foundation.core":function(e,n){e.exports=t},"./foundation.core.plugin":function(e,n){e.exports=r},"./foundation.core.utils":function(e,n){e.exports=o},"./foundation.util.mediaQuery":function(e,n){e.exports=i},"./js/entries/plugins/foundation.interchange.js":function(e,n,t){"use strict";t.r(n);var r=t("./foundation.core");t.d(n,"Foundation",function(){return r.Foundation});var o=t("./js/foundation.interchange.js");t.d(n,"Interchange",function(){return o.Interchange}),r.Foundation.plugin(o.Interchange,"Interchange")},"./js/foundation.interchange.js":function(e,n,t){"use strict";t.r(n),t.d(n,"Interchange",function(){return p});var r=t("jquery"),o=t.n(r),i=t("./foundation.util.mediaQuery"),u=t("./foundation.core.plugin"),c=t("./foundation.core.utils");function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,n){return!n||"object"!==a(n)&&"function"!=typeof n?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,n){return(d=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}var p=function(e){function a(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),s(this,l(a).apply(this,arguments))}var n,t,r;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&d(e,n)}(a,u["Plugin"]),n=a,(t=[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},a.defaults,n),this.rules=[],this.currentPath="",this.className="Interchange",this._init(),this._events()}},{key:"_init",value:function(){i.MediaQuery._init();var e=this.$element[0].id||Object(c.GetYoDigits)(6,"interchange");this.$element.attr({"data-resize":e,id:e}),this._addBreakpoints(),this._generateRules(),this._reflow()}},{key:"_events",value:function(){var e=this;this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(){return e._reflow()})}},{key:"_reflow",value:function(){var e;for(var n in this.rules)if(this.rules.hasOwnProperty(n)){var t=this.rules[n];window.matchMedia(t.query).matches&&(e=t)}e&&this.replace(e.path)}},{key:"_addBreakpoints",value:function(){for(var e in i.MediaQuery.queries)if(i.MediaQuery.queries.hasOwnProperty(e)){var n=i.MediaQuery.queries[e];a.SPECIAL_QUERIES[n.name]=n.value}}},{key:"_generateRules",value:function(e){var n,t=[];for(var r in n="string"==typeof(n=this.options.rules?this.options.rules:this.$element.data("interchange"))?n.match(/\[.*?, .*?\]/g):n)if(n.hasOwnProperty(r)){var o=n[r].slice(1,-1).split(", "),i=o.slice(0,-1).join(""),u=o[o.length-1];a.SPECIAL_QUERIES[u]&&(u=a.SPECIAL_QUERIES[u]),t.push({path:i,query:u})}this.rules=t}},{key:"replace",value:function(n){if(this.currentPath!==n){var t=this,r="replaced.zf.interchange";"IMG"===this.$element[0].nodeName?this.$element.attr("src",n).on("load",function(){t.currentPath=n}).trigger(r):n.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)?(n=n.replace(/\(/g,"%28").replace(/\)/g,"%29"),this.$element.css({"background-image":"url("+n+")"}).trigger(r)):o.a.get(n,function(e){t.$element.html(e).trigger(r),o()(e).foundation(),t.currentPath=n})}}},{key:"_destroy",value:function(){this.$element.off("resizeme.zf.trigger")}}])&&f(n.prototype,t),r&&f(n,r),a}();p.defaults={rules:null},p.SPECIAL_QUERIES={landscape:"screen and (orientation: landscape)",portrait:"screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)"}},7:function(e,n,t){e.exports=t("./js/entries/plugins/foundation.interchange.js")},jquery:function(e,n){e.exports=u}})});
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./foundation.core"),require("./foundation.util.mediaQuery"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","./foundation.util.mediaQuery","jquery"],t):"object"==typeof exports?exports["foundation.interchange"]=t(require("./foundation.core"),require("./foundation.util.mediaQuery"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.interchange"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.__FOUNDATION_EXTERNAL__["foundation.util.mediaQuery"],e.jQuery))}(window,function(n,r,i){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=7)}({"./foundation.core":function(e,t){e.exports=n},"./foundation.util.mediaQuery":function(e,t){e.exports=r},"./js/entries/plugins/foundation.interchange.js":function(e,t,n){"use strict";n.r(t);var r=n("./foundation.core");n.d(t,"Foundation",function(){return r.Foundation});var i=n("./js/foundation.interchange.js");n.d(t,"Interchange",function(){return i.Interchange}),r.Foundation.plugin(i.Interchange,"Interchange")},"./js/foundation.interchange.js":function(e,t,n){"use strict";n.r(t),n.d(t,"Interchange",function(){return d});var r=n("jquery"),i=n.n(r),o=n("./foundation.util.mediaQuery"),u=n("./foundation.core");function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),s(this,f(a).apply(this,arguments))}var t,n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(a,u["Plugin"]),t=a,(n=[{key:"_setup",value:function(e,t){this.$element=e,this.options=i.a.extend({},a.defaults,t),this.rules=[],this.currentPath="",this.className="Interchange",this._init(),this._events()}},{key:"_init",value:function(){o.MediaQuery._init();var e=this.$element[0].id||Object(u.GetYoDigits)(6,"interchange");this.$element.attr({"data-resize":e,id:e}),this._addBreakpoints(),this._generateRules(),this._reflow()}},{key:"_events",value:function(){var e=this;this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(){return e._reflow()})}},{key:"_reflow",value:function(){var e;for(var t in this.rules)if(this.rules.hasOwnProperty(t)){var n=this.rules[t];window.matchMedia(n.query).matches&&(e=n)}e&&this.replace(e.path)}},{key:"_addBreakpoints",value:function(){for(var e in o.MediaQuery.queries)if(o.MediaQuery.queries.hasOwnProperty(e)){var t=o.MediaQuery.queries[e];a.SPECIAL_QUERIES[t.name]=t.value}}},{key:"_generateRules",value:function(e){var t,n=[];for(var r in t="string"==typeof(t=this.options.rules?this.options.rules:this.$element.data("interchange"))?t.match(/\[.*?, .*?\]/g):t)if(t.hasOwnProperty(r)){var i=t[r].slice(1,-1).split(", "),o=i.slice(0,-1).join(""),u=i[i.length-1];a.SPECIAL_QUERIES[u]&&(u=a.SPECIAL_QUERIES[u]),n.push({path:o,query:u})}this.rules=n}},{key:"replace",value:function(t){if(this.currentPath!==t){var n=this,r="replaced.zf.interchange";"IMG"===this.$element[0].nodeName?this.$element.attr("src",t).on("load",function(){n.currentPath=t}).trigger(r):t.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)?(t=t.replace(/\(/g,"%28").replace(/\)/g,"%29"),this.$element.css({"background-image":"url("+t+")"}).trigger(r)):i.a.get(t,function(e){n.$element.html(e).trigger(r),i()(e).foundation(),n.currentPath=t})}}},{key:"_destroy",value:function(){this.$element.off("resizeme.zf.trigger")}}])&&c(t.prototype,n),r&&c(t,r),a}();d.defaults={rules:null},d.SPECIAL_QUERIES={landscape:"screen and (orientation: landscape)",portrait:"screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)"}},7:function(e,t,n){e.exports=n("./js/entries/plugins/foundation.interchange.js")},jquery:function(e,t){e.exports=i}})});