{"version":3,"sources":["before.js","sticky-layout.js"],"names":["OTF_Sticky_Layout_JS","$","window","jQuery","win","fn","stick_in_parent","opts","doc","initSticky","i","inner_scrolling","len","manual_spacer","offset_top","outer_width","parent_selector","recalc_every","sticky_class","parent","spacer","enable_bottoming","bottoming","$headerSticky","length","document","el","computed","w","window_width","getPropertyValue","parseFloat","trigger","_makeStickyKit","elm","padding_bottom","parent_top","parent_height","top","height","el_float","detached","bottomed","detach","last_scroll_height","offset","recalc","recalc_and_tick","recalc_counter","tick","data","outerHeight","closest","css","ready","padding_top","parseInt"],"mappings":"6GAAA,WAAA,GCAAA,GAAAA,CAGAC,GAAAC,OAAAC,OAAAC,EAAAH,EAAAC,QACAD,EAAAI,GAAAC,gBAAA,SAAAC,GACA,GAAAC,GAAAC,EAAAA,EAAAJ,EAAAK,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,MDLA,MAAAX,UAAAW,EAAAX,EAAAW,aAAAP,EAAAJ,EAAAI,gBAAAM,EAAAV,EAAAU,aAAAD,EAAAT,EAAAY,OAAAL,EAAAP,EAAAO,WAAAD,EAAAN,EAAAa,OAAAC,EAAAd,EAAAe,UAAA,MAAAR,ICGAA,EAAA,GAAA,MAAAE,IASAA,MAAA,IAPAO,MAAAZ,IACAA,GAAAa,GDNA,MAAAN,IAAAA,EAAAK,YCSAf,EAAAP,EAAAwB,UACA,MAAAJ,IDVAA,GAAA,GAAAN,EAAA,SAAAW,GCYA,GAAAC,GAAAC,kCAEAC,EAAAA,GACAF,EAAAE,OAAAA,iBAAAH,EAAA,IACAvB,EAAAA,WAAAwB,EAAAG,iBAAA,UAAAC,WAAAJ,EAAAG,iBAAAE,gBAAAD,WAAAJ,EAAAG,iBAAA,iBACA,eAFAH,EAEAG,iBAAA,gBACAF,GAAAK,WAAAA,EAAAH,iBAAA,sBAAAC,WAAAJ,EAAAG,iBAAA,uBAAAC,WAAAJ,EAAAG,iBAAA,iBAAAC,WAAAJ,EAAAG,iBAAA,sBDlBAD,EAAAA,YAAA3B,ICuBAG,EAAA,SDvBA6B,ECuBAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GAcA,GAAAC,GAAAC,EAAAV,EAAAA,EAAAW,EAAAC,EAAA1B,EAAA2B,EAAAC,EAAAC,EAAA5B,EAAA6B,CAZA,KAAAf,EAAAgB,KAAA,cAAA,CAQArB,GDjCAK,EAAAgB,KAAA,cAAA,GAAAN,EAAApC,EAAA+B,SAAApB,EAAAe,EAAAf,SC8BAgC,MAAAnC,IAcAG,EAAAA,EAAAiC,QAAApC,KAXAa,EAAAA,OACAV,KAAAA,iCADAU,GAAAA,EAIA5B,GAAA,EACAkB,EAAA,MAAAA,EAAAN,GAAAqB,EAAAkB,QAAAvC,GADAZ,EAAA,WAEAa,GAFAM,EAAAiC,IAAA,WAAAnB,EAAAmB,IAAA,aDrCAP,EAAA,oBAAA,KAAAL,QC2CAa,GAAA9C,EAAA+B,SACAvC,EAAAA,SAAAmB,EAAAkC,IAAA,oBAAA,IADAE,EAAAC,SAAArC,EAAAkC,IAAA,eAAA,ID3CAlB,EAAAqB,SAAArC,EAAAkC,IAAA,kBAAA","file":"sticky-layout.js","sourcesContent":["(function ($) {","class OTF_Sticky_Layout_JS {\n top = 20;\n\n constructor() {\n this.setupValue();\n this.initSticky();\n }\n\n setupValue() {\n if ($('#main').outerHeight() < $('#secondary').outerHeight) {\n return false;\n }\n this.top = 20;\n let $adminBar = $('#wpadminbar');\n let $headerSticky = $('.osf-sticky-active');\n if ($adminBar.length > 0) {\n this.top += $adminBar.height();\n }\n if ($headerSticky.length > 0) {\n this.top += $headerSticky.outerHeight();\n }\n }\n\n initSticky() {\n\n let window_width = $(window).width();\n if (window_width < 992) {\n jQuery(\"#secondary > .inner, .woocommerce-single-style-3 .entry-summary .inner\").trigger(\"sticky_kit:detach\");\n } else {\n this._makeStickyKit();\n }\n\n $(window).resize(() => {\n window_width = $(window).width();\n if (window_width < 992) {\n jQuery(\"#secondary > .inner, .woocommerce-single-style-3 .entry-summary .inner\").trigger(\"sticky_kit:detach\");\n } else {\n this._makeStickyKit();\n }\n });\n }\n\n _makeStickyKit() {\n if ($('#main').outerHeight() < $('#secondary .inner').outerHeight()) {\n return false;\n }\n $(\"#secondary > .inner\").stick_in_parent({\n parent: '#content > .wrap',\n offset_top: this.top\n });\n $(\".woocommerce-single-style-3 .entry-summary .inner\").stick_in_parent({\n parent: '.woocommerce-single-style-3 .site-main > .product',\n offset_top: this.top\n });\n }\n}\n\n$(document).ready(() => {\n new OTF_Sticky_Layout_JS();\n});\n"]}