PageSourceSearch

https://www.hungerford.com/wp-content/cache/min/1/wp-content/themes/porto/js/appearanimate.js?ver=1790784239

js hungerford.com collected 2026-10-04 01:10:40 UTC 4,852 bytes, 22 lines download raw bytes

1(function($){window.theme=window.theme||{};if(typeof window.theme.animation_support=='undefined'){theme.animation_support=!window.jQuery('html').hasClass('no-csstransitions');theme.getOptions=function(opts){if(typeof(opts)=='object'){return opts}else if(typeof(opts)=='string'){try{return JSON.parse(opts.replace(/'/g,'"').replace(';',''))}catch(e){return{}}}else{return{}}}
2theme.execPluginFunction=function(functionName,context){var args=Array.prototype.slice.call(arguments,2);var namespaces=functionName.split(".");var func=namespaces.pop();for(var i=0;i<namespaces.length;i++){context=context[namespaces[i]]}
3return context[func].apply(context,args)}
4theme.mergeOptions=function(obj1,obj2){var obj3={};for(var attrname in obj1){obj3[attrname]=obj1[attrname]}
5for(var attrname in obj2){obj3[attrname]=obj2[attrname]}
6return obj3}
7theme.dynIntObsInit=function(selector,functionName,pluginDefaults){var $el;if(typeof selector=='string'){$el=document.querySelectorAll(selector)}else{$el=selector}
8Array.prototype.forEach.call($el,function(obj){var $this=$(obj),opts;if($this.data('observer-init')){return}
9var pluginOptions=theme.getOptions($this.data('plugin-options'));if(pluginOptions)
10opts=pluginOptions;var mergedPluginDefaults=theme.mergeOptions(pluginDefaults,opts)
11var intersectionObserverOptions={rootMargin:'0px 0px 200px 0px',thresholds:0}
12if(mergedPluginDefaults.accY){intersectionObserverOptions.rootMargin='0px 0px '+Number(mergedPluginDefaults.accY)+'px 0px'}
13var observer=new IntersectionObserver(function(entries){for(var i=0;i<entries.length;i++){var entry=entries[i];if(entry.intersectionRatio>0){theme.execPluginFunction(functionName,$this,mergedPluginDefaults);observer.unobserve(entry.target)}}},intersectionObserverOptions);observer.observe(obj);$this.data('observer-init',!0)})}}})(window.jQuery);(function(theme,$){'use strict';theme=theme||{};var instanceName='__animate';var Animate=function($el,opts){return this.initialize($el,opts)};Animate.defaults={accX:0,accY:-120,delay:1,duration:1000};Animate.prototype={initialize:function($el,opts){if($el.data(instanceName)){return this}
14this.$el=$el;this.setData().setOptions(opts).build();return this},setData:function(){this.$el.data(instanceName,!0);return this},setOptions:function(opts){this.options=$.extend(!0,{},Animate.defaults,opts,{wrapper:this.$el});return this},build:function(){var self=this,$el=this.options.wrapper,delay=0,duration=0;if($el.data('appear-animation-svg')){$el.find('[data-appear-animation]').each(function(){var $this=$(this),opts;var pluginOptions=theme.getOptions($this.data('plugin-options'));if(pluginOptions)
15opts=pluginOptions;$this.themeAnimate(opts)});return this}
16$el.addClass('appear-animation');var el_obj=$el.get(0);delay=Math.abs($el.data('appear-animation-delay')?$el.data('appear-animation-delay'):self.options.delay);duration=Math.abs($el.data('appear-animation-duration')?$el.data('appear-animation-duration'):self.options.duration);if('undefined'!==typeof $el.data('appear-animation')&&$el.data('appear-animation').includes('revealDir')){if(delay>1){el_obj.style.setProperty('--porto-reveal-animation-delay',delay+'ms')}
17if(duration!=1000){el_obj.style.setProperty('--porto-reveal-animation-duration',duration+'ms')}
18if($el.data('animation-reveal-clr')){el_obj.style.setProperty('--porto-reveal-clr',$el.data('animation-reveal-clr'))}}else{if(delay>1){el_obj.style.animationDelay=delay+'ms'}
19if(duration!=1000){el_obj.style.animationDuration=duration+'ms'}}
20$el.addClass($el.data('appear-animation')+' appear-animation-visible');return this}};$.extend(theme,{Animate:Animate});$.fn.themeAnimate=function(opts){return this.map(function(){var $this=$(this);if($this.data(instanceName)){return $this}else{return new theme.Animate($this,opts)}})}}).apply(this,[window.theme,jQuery]);(function(theme,$){theme=theme||{};var funcAnimate=function($wrap,wrapObj){if($.fn.themeAnimate&&typeof wrapObj!='undefined'){$(function(){var svgAnimates=wrapObj.querySelectorAll('svg [data-appear-animation]');if(svgAnimates.length){$(svgAnimates).closest('svg').attr('data-appear-animation-svg','1')}
21var $animates=wrapObj.querySelectorAll('[data-plugin-animate], [data-appear-animation], [data-appear-animation-svg]');if($animates.length){var animateResize=function(){if(window.innerWidth<768){window.removeEventListener('resize',animateResize);
21$animates.forEach(function(o){o.classList.add('appear-animation-visible')})}};if(theme.animation_support){window.addEventListener('resize',animateResize);theme.dynIntObsInit($animates,'themeAnimate',theme.Animate.defaults)}else{$animates.forEach(function(o){o.classList.add('appear-animation-visible')})}}})}}
22funcAnimate('',document.body);$(document.body).on('porto_after_async_init',function(e,$wrap,wrapObj){if(theme.isAsyncInit!=-1){funcAnimate($wrap,wrapObj)}})}).apply(this,[window.theme,jQuery])

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.