!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ifViewportMatches:function(){return s},withViewportMatch:function(){return d}});var n={};e.r(n),e.d(n,{setIsMatching:function(){return c}});var r={};e.r(r),e.d(r,{isViewportMatch:function(){return a}});var i=window.lodash,o=window.wp.data;function c(e){return{type:"SET_IS_MATCHING",values:e}}function a(e,t){return t.includes(" ")||(t=">= ".concat(t)),!!e[t]}(0,o.registerStore)("nisje/viewport",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_MATCHING":return t.values;default:return e}},actions:n,selectors:r});var u=window.wp.compose,d=function(e){return(0,u.createHigherOrderComponent)((0,o.withSelect)((function(t){return(0,i.mapValues)(e,(function(e){return t("nisje/viewport").isViewportMatch(e)}))})),"withViewportMatch")},s=function(e){return(0,u.createHigherOrderComponent)((0,i.flowRight)([d({isViewportMatch:e}),(0,u.ifCondition)((function(e){return e.isViewportMatch}))]),"ifViewportMatches")},w={"<":"max-width",">=":"min-width"},f=(0,i.debounce)((function(){var e=(0,i.mapValues)(h,"matches");(0,o.dispatch)("nisje/viewport").setIsMatching(e)}),0,{leading:!0}),h=(0,i.reduce)({huge:1440,wide:1200,large:960,medium:782,small:600,mobile:480},(function(e,t,n){return(0,i.forEach)(w,(function(r,i){var o=window.matchMedia("(".concat(r,": ").concat(t,"px)"));o.addListener(f);var c=[i,n].join(" ");e[c]=o})),e}),{});window.addEventListener("orientationchange",f),f(),f.flush(),(window.nisje=window.nisje||{}).viewport=t}();