!function(t){var o=function(o,s){var i,e,n,r,a=!1,c=!1,f=!1,p={},l={to:"top",offset:0,effectsoffset:0,parent:!1,classes:{sticky:"sticky",stickyactive:"sticky-active",stickyeffects:"sticky-effects",spacer:"sticky-spacer"},isrtl:!1,handlescrollbarwidth:!1},d=function(t,o,s){var i={},e=t[0].style;s.foreach((function(t){i[t]=void 0!==e[t]?e[t]:""})),t.data("css-backup-"+o,i)},m=function(t,o){return t.data("css-backup-"+o)};const u=()=>{if(r=b(i,"width"),n=i.offset().left,e.isrtl){const t=e.handlescrollbarwidth?window.innerwidth:document.body.offsetwidth;n=math.max(t-r-n,0)}};var h=function(){p.$spacer=i.clone().addclass(e.classes.spacer).css({visibility:"hidden",transition:"none",animation:"none"}),i.after(p.$spacer)},y=function(){p.$spacer.remove()},k=function(){d(i,"unsticky",["position","width","margin-top","margin-bottom","top","bottom","inset-inline-start"]);const t={position:"fixed",width:r,margintop:0,marginbottom:0};t[e.to]=e.offset,t["top"===e.to?"bottom":"top"]="",n&&(t["inset-inline-start"]=n+"px"),i.css(t).addclass(e.classes.stickyactive)},v=function(){i.css(m(i,"unsticky")).removeclass(e.classes.stickyactive)},b=function(t,o,s){var i=getcomputedstyle(t[0]),e=parsefloat(i[o]),n="height"===o?["top","bottom"]:["left","right"],r=[];return"border-box"!==i.boxsizing&&r.push("border","padding"),s&&r.push("margin"),r.foreach((function(t){n.foreach((function(o){e+=parsefloat(i[t+"-"+o])}))})),e},w=function(t){var o=p.$window.scrolltop(),s=b(t,"height"),i=innerheight,e=t.offset().top-o,n=e-i;return{top:{fromtop:e,frombottom:n},bottom:{fromtop:e+s,frombottom:n+s}}},g=function(){v(),y(),a=!1,i.trigger("sticky:unstick")},$=function(){var t=w(i),o="top"===e.to;if(c){(o?t.top.fromtop>e.offset:t.bottom.frombottom<-e.offset)&&(p.$parent.css(m(p.$parent,"childnotfollowing")),i.css(m(i,"notfollowing")),c=!1)}else{var s=w(p.$parent),a=getcomputedstyle(p.$parent[0]),f=parsefloat(a[o?"borderbottomwidth":"bordertopwidth"]),l=o?s.bottom.fromtop-f:s.top.frombottom+f;(o?l<=t.bottom.fromtop:l>=t.top.frombottom)&&function(){d(p.$parent,"childnotfollowing",["position"]),p.$parent.css("position","relative"),d(i,"notfollowing",["position","inset-inline-start","top","bottom"]);const t={position:"absolute"};if(n=p.$spacer.position().left,e.isrtl){const t=i.parent().outerwidth(),o=p.$spacer.position().left;r=p.$spacer.outerwidth(),n=math.max(t-r-o,0)}t["inset-inline-start"]=n+"px",t[e.to]="",t["top"===e.to?"bottom":"top"]=0,i.css(t),c=!0}()}},t=function(){var t,o=e.offset;if(a){var s=w(p.$spacer);t="top"===e.to?s.top.fromtop-o:-s.bottom.frombottom-o,e.parent&&$(),t>0&&g()}else{var n=w(i);(t="top"===e.to?n.top.fromtop-o:-n.bottom.frombottom-o)<=0&&(u(),h(),k(),a=!0,i.trigger("sticky:stick"),e.parent&&$())}!function(t){f&&-t=e.effectsoffset&&(i.addclass(e.classes.stickyeffects),f=!0)}(t)},b=function(){t()},c=function(){a&&(v(),y(),u(),h(),k(),e.parent&&(c=!1,$()))};this.destroy=function(){a&&g(),p.$window.off("scroll",b).off("resize",c),i.removeclass(e.classes.sticky)},e=jquery.extend(!0,l,s),i=t(o).addclass(e.classes.sticky),p.$window=t(window),e.parent&&(p.$parent=i.parent(),"parent"!==e.parent&&(p.$parent=p.$parent.closest(e.parent))),p.$window.on({scroll:b,resize:c}),t()};t.fn.sticky=function(s){var i="string"==typeof s;return this.each((function(){var e=t(this);if(i){var n=e.data("sticky");if(!n)throw error("trying to perform the `"+s+"` method prior to initialization");if(!n[s])throw referenceerror("method `"+s+"` not found in sticky instance");n[s].apply(n,array.prototype.slice.call(arguments,1)),"destroy"===s&&e.removedata("sticky")}else e.data("sticky",new o(this,s))})),this},window.sticky=o}(jquery);