<commit_before>###
@name jquery-badyl
@description Meet Badyl – bootstrap affix-like wheel reinvent.
@version 1.7.54
@author Se7enSky studio <<EMAIL>>
###

###! jquery-badyl 1.7.54 http://github.com/Se7enSky/jquery-badyl###

plugin = ($) ->

	"use strict"

	class Badyl
		defaults:
			offset: 0

		cssSnippets:
			top:
				position: 'absolute', top: 0, bottom: ''
			bottom:
				position: 'absolute', top: '', bottom: 0
			fixTop:
				position: 'fixed', top: 0, bottom: ''
			fixBottom:
				position: 'fixed', top: '', bottom: 0
			unstable:
				position: 'absolute', top: '', bottom: ''

		constructor: (@el, config) ->
			@$el = $ @el
			@$el.data "badyl", @
			@config = $.extend {}, @defaults, config
			@state = null
			@badylized = no
			@$refEl = $(@$el.attr "data-badyl-ref-el")
			@$originalParent = @$el.parent()
			@prevWindowScrollTop = 0
			@smartResizeTimeout = null
			@badylize()

			# (window.badyls or= []).push @

		destroy: ->
			@debadylize()

		badylize: ->
			return if @badylized
			@containerInnerWidth = @measureInnerWidth @$originalParent
			@originalHeight = @$el.height()

			@badylInnerHeight = @originalHeight + @config.offset * 2

			# return if @originalHeight is 0

			@$refEl.css height: ""
			@badylHeight = @$refEl.height() + @config.offset * 2
			if @badylInnerHeight > @badylHeight
				@$refEl.css height: "#{@badylInnerHeight}px"
				@badylHeight = @$refEl.height() + @config.offset * 2

			@$el.replaceWith @$badylContainer = $("""<div>""")
				.css
					position: 'relative'
					height: "#{@badylHeight}px"
					margin: "-#{@config.offset}px 0"
				.append @$badylInner = $("""<div>""")
					.css
						width: "#{@containerInnerWidth}px"
						height: "#{@badylInnerHeight}px"
						padding: "#{@config.offset}px 0"
					.append @$originalElement = @$el.clone()

			@$originalElement.data "badyl", @
			@$badylContainer.data "badyl", @

			@badylOffsetTop = @$badylContainer.offset().top

			@refreshInnerCss()
			@bindEvents()
			
			@badylized = yes

			@$originalElement.trigger "badylized"

		rebadylize: ->
			return unless @badylized
			clearTimeout @smartResizeTimeout if @smartResizeTimeout

			@containerInnerWidth = @measureInnerWidth @$originalParent
			# return if @originalHeight is 0
			@rebadylizeFromState = @state
			@badylized = no
			@state = null

			@badylHeight = @$refEl.height() + @config.offset * 2

			@$badylContainer.css
				position: 'relative'
				height: "#{@badylHeight}px"
				margin: "-#{@config.offset}px 0"
			@$badylInner.css
				width: "#{@containerInnerWidth}px"
				padding: "#{@config.offset}px 0"
			@originalHeight = @$originalElement.height()
			@badylInnerHeight = @originalHeight + @config.offset * 2
			@$badylInner.css
				height: "#{@badylInnerHeight}px"
			@badylOffsetTop = @$badylContainer.offset().top
			@refreshInnerCss()<commit_msg>fixed heights on rebadylize with small height refEl<commit_after>###
@name jquery-badyl
@description Meet Badyl – bootstrap affix-like wheel reinvent.
@version 1.7.56
@author Se7enSky studio <<EMAIL>>
###

###! jquery-badyl 1.7.56 http://github.com/Se7enSky/jquery-badyl###

plugin = ($) ->

	"use strict"

	class Badyl
		defaults:
			offset: 0

		cssSnippets:
			top:
				position: 'absolute', top: 0, bottom: ''
			bottom:
				position: 'absolute', top: '', bottom: 0
			fixTop:
				position: 'fixed', top: 0, bottom: ''
			fixBottom:
				position: 'fixed', top: '', bottom: 0
			unstable:
				position: 'absolute', top: '', bottom: ''

		constructor: (@el, config) ->
			@$el = $ @el
			@$el.data "badyl", @
			@config = $.extend {}, @defaults, config
			@state = null
			@badylized = no
			@$refEl = $(@$el.attr "data-badyl-ref-el")
			@$originalParent = @$el.parent()
			@prevWindowScrollTop = 0
			@smartResizeTimeout = null
			@badylize()

			# (window.badyls or= []).push @

		destroy: ->
			@debadylize()

		badylize: ->
			return if @badylized
			@containerInnerWidth = @measureInnerWidth @$originalParent
			@originalHeight = @$el.height()

			@badylInnerHeight = @originalHeight + @config.offset * 2

			# return if @originalHeight is 0

			@$refEl.css height: ""
			@badylHeight = @$refEl.height() + @config.offset * 2
			if @badylInnerHeight > @badylHeight
				@$refEl.css height: "#{@badylInnerHeight}px"
				@badylHeight = @$refEl.height() + @config.offset * 2

			@$el.replaceWith @$badylContainer = $("""<div>""")
				.css
					position: 'relative'
					height: "#{@badylHeight}px"
					margin: "-#{@config.offset}px 0"
				.append @$badylInner = $("""<div>""")
					.css
						width: "#{@containerInnerWidth}px"
						height: "#{@badylInnerHeight}px"
						padding: "#{@config.offset}px 0"
					.append @$originalElement = @$el.clone()

			@$originalElement.data "badyl", @
			@$badylContainer.data "badyl", @

			@badylOffsetTop = @$badylContainer.offset().top

			@refreshInnerCss()
			@bindEvents()
			
			@badylized = yes

			@$originalElement.trigger "badylized"

		rebadylize: ->
			return unless @badylized
			clearTimeout @smartResizeTimeout if @smartResizeTimeout

			@containerInnerWidth = @measureInnerWidth @$originalParent
			# return if @originalHeight is 0
			@rebadylizeFromState = @state
			@badylized = no
			@state = null

			@badylHeight = @$refEl.height() + @config.offset * 2

			@$badylInner.css
				width: "#{@containerInnerWidth}px"
				padding: "#{@config.offset}px 0"
			@originalHeight = @$originalElement.height()
			@badylInnerHeight = @originalHeight + @config.offset * 2

			if @badylInnerHeight > @badylHeight
				@$refEl.css height: "#{@badylInnerHeight}px"
				@badylHeight = @$refEl.height() + @config.offset * 2

			@$badylContainer.css
				position: 'relative'
				height: "#{@badylHeight}px"
				margin: "-#{@config.offset}px 0"
			@$badylInner.css
				height: "#{@badylInnerHeight}px"

			@badylOffsetTop = @$badylContainer.offset().top
			@refreshInnerCss()
{'fraction_non_alphanumeric': 0.16484268125854992, 'fraction_numerical': 0.009404924760601915, 'mean_word_length': 3.5517509727626457, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '765791', 'n_tokens_mistral': 2513, 'n_tokens_neox': 2041, 'n_words': 438}