!function r(i,o,s){function u(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(f)return f(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return u(i[e][1][t]||t)},n,n.exports,r,i,o,s)}return o[e].exports}for(var f="function"==typeof require&&require,t=0;t<s.length;t++)u(s[t]);return u}({1:[function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,r(t,e,"get"))}function s(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,r(t,e,"set"),n),n}function r(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=new WeakMap,f=function(){function r(){var t,e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),u.set(this,{writable:!0,value:void 0}),n=void 0,(e="elements")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,this.onInit(),this.bindEvents()}var t,e,n;return t=r,(e=[{key:"getDefaultSettings",value:function(){return{}}},{key:"getDefaultElements",value:function(){return{}}},{key:"onInit",value:function(){s(this,u,this.getDefaultSettings()),this.elements=this.getDefaultElements()}},{key:"bindEvents",value:function(){}},{key:"getSettings",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return t?o(this,u)[t]:o(this,u)}},{key:"setSettings",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};t&&s(this,u,Object.assign(o(this,u),t))}}])&&i(t.prototype,e),n&&i(t,n),r}();n.default=f},{}],2:[function(t,e,n){"use strict";function i(t){return(i="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 r,o=(r=t("./base/base"))&&r.__esModule?r:{default:r};function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}new(function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(i,o["default"]);var t,e,n,r=a(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"getDefaultSettings",value:function(){return{selectors:{wpAdminbar:"#wpadminbar",topbar:"#top-bar-wrap",header:"#site-header"},options:oceanwpLocalize,topOffset:0}}},{key:"getDefaultElements",value:function(){var t=this.getSettings("selectors");this.getSettings("options");return{wpAdminbar:document.querySelector(t.wpAdminbar),topbar:document.querySelector(t.topbar),header:document.querySelector(t.header),body:document.body}}},{key:"onInit",value:function(){u(c(i.prototype),"onInit",this).call(this),this.getSettings("options").stickElements&&(this.setElementTopOffset(),this.initSticky())}},{key:"bindEvents",value:function(){var t=this;window.addEventListener("resize",function(){t.getSettings("options").stickElements&&t.initSticky()})}},{key:"initSticky",value:function(){var t=this.getSettings(),e=t.options,n=t.topOffset,t=jQuery(e.stickElements);t.stick_in_parent({offset_top:n}),e.unStick&&window.innerWidth<=e.unStick&&t.trigger("sticky_kit:detach")}},{key:"setElementTopOffset",value:function(){this.addUserTopOffset(),this.addWPAdminbarTopOffset(),this.addTopbarTopOffset(),this.addHeaderTopOffset()}},{key:"addUserTopOffset",value:function(){var t=this.getSettings("options"),t=Number.parseInt(t.isOffset);t&&(this.elements.body.setAttribute("data-offset",t),this.setSettings({topOffset:t}))}},{key:"addWPAdminbarTopOffset",value:function(){var t,e=this.getSettings("topOffset");this.elements.wpAdminbar&&600<window.innerWidth&&(t=Number.parseInt(this.elements.wpAdminbar.offsetHeight),this.setSettings({topOffset:e+t}))}},{key:"addTopbarTopOffset",value:function(){var t=this.getSettings(),e=t.options,t=t.topOffset;e.hasStickyTopBar&&(e=Number.parseInt(this.elements.topbar.offsetHeight),this.setSettings({topOffset:t+e}))}},{key:"addHeaderTopOffset",value:function(){var t,e,n=this.getSettings("topOffset");null!==(t=this.elements.header)&&void 0!==t&&t.classList.contains("vertical-header")||null===(e=this.elements.header)||void 0===e||!e.classList.contains("fixed-scroll")||(e=Number.parseInt(this.elements.header.offsetHeight),this.setSettings({topOffset:n+e}))}}])&&s(t.prototype,e),n&&s(t,n),i}())},{"./base/base":1}]},{},[2]);