!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core")):"function"==typeof define&&define.amd?define(["./foundation.core"],e):"object"==typeof exports?exports["foundation.util.box"]=e(require("./foundation.core")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.util.box"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"]))}(window,function(o){return f={},i.m=n={"./foundation.core":function(t,e){t.exports=o},"./js/entries/plugins/foundation.util.box.js":function(t,e,o){"use strict";o.r(e);var n=o("./foundation.core");o.d(e,"Foundation",function(){return n.Foundation});var i=o("./js/foundation.util.box.js");o.d(e,"Box",function(){return i.Box}),n.Foundation.Box=i.Box},"./js/foundation.util.box.js":function(t,e,o){"use strict";o.r(e),o.d(e,"Box",function(){return n});var n={ImNotTouchingYou:function(t,e,o,n,i){return 0===f(t,e,o,n,i)},OverlapArea:f,GetDimensions:c,GetExplicitOffsets:function(t,e,o,n,i,f,r){var s,u,a=c(t),d=e?c(e):null;if(null!==d){switch(o){case"top":s=d.offset.top-(a.height+i);break;case"bottom":s=d.offset.top+d.height+i;break;case"left":u=d.offset.left-(a.width+f);break;case"right":u=d.offset.left+d.width+f}switch(o){case"top":case"bottom":switch(n){case"left":u=d.offset.left+f;break;case"right":u=d.offset.left-a.width+d.width-f;break;case"center":u=r?f:d.offset.left+d.width/2-a.width/2+f}break;case"right":case"left":switch(n){case"bottom":s=d.offset.top-i+d.height-a.height;break;case"top":s=d.offset.top+i;break;case"center":s=d.offset.top+i+d.height/2-a.height/2}}}return{top:s,left:u}}};function f(t,e,o,n,i){var f,r,s,u,a=c(t);if(e){var d=c(e);r=d.height+d.offset.top-(a.offset.top+a.height),f=a.offset.top-d.offset.top,s=a.offset.left-d.offset.left,u=d.width+d.offset.left-(a.offset.left+a.width)}else r=a.windowDims.height+a.windowDims.offset.top-(a.offset.top+a.height),f=a.offset.top-a.windowDims.offset.top,s=a.offset.left-a.windowDims.offset.left,u=a.windowDims.width-(a.offset.left+a.width);return r=i?0:Math.min(r,0),f=Math.min(f,0),s=Math.min(s,0),u=Math.min(u,0),o?s+u:n?f+r:Math.sqrt(f*f+r*r+s*s+u*u)}function c(t){if((t=t.length?t[0]:t)===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var e=t.getBoundingClientRect(),o=t.parentNode.getBoundingClientRect(),n=document.body.getBoundingClientRect(),i=window.pageYOffset,f=window.pageXOffset;return{width:e.width,height:e.height,offset:{top:e.top+i,left:e.left+f},parentDims:{width:o.width,height:o.height,offset:{top:o.top+i,left:o.left+f}},windowDims:{width:n.width,height:n.height,offset:{top:i,left:f}}}}},21:function(t,e,o){t.exports=o("./js/entries/plugins/foundation.util.box.js")}},i.c=f,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=21);function i(t){if(f[t])return f[t].exports;var e=f[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var n,f}); //# sourceMappingURL=foundation.util.box.min.js.map