1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.observeElementInViewport={})}(this,(function(e){function t(e,t,o,n){if(void 0===o&&(o=function(){}),void 0===n&&(n={}),!e)throw new Error("Target element to observe should be a valid DOM Node");var i=Object.assign({},{viewport:null,modTop:"0px",modRight:"0px",modBottom:"0px",modLeft:"0px",threshold:[0]},n),s=i.viewport,r=i.modTop,a=i.modLeft,l=i.modBottom,c=i.modRight,u=i.threshold;if(!Array.isArray(u)&&"number"!=typeof u)throw new Error("threshold should be a number or an array of numbers");var d=Array.isArray(u)?u.map((function(e){return Math.floor(e%101)/100})):[Math.floor(u?u%101:0)/100],p=Math.min.apply(Math,d),f={root:s instanceof Node?s:null,rootMargin:r+" "+c+" "+l+" "+a,threshold:d},h=new IntersectionObserver((function(n,i){var s=n.filter((function(t){return t.target===e}))[0],r=function(){return i.unobserve(e)};s&&(s.isInViewport=s.isIntersecting&&s.intersectionRatio>=p,s.isInViewport?t(s,r,e):o(s,r,e))}),f);return h.observe(e),function(){return h.unobserve(e)}}e.observeElementInViewport=t,e.isInViewport=function(e,o){return void 0===o&&(o={}),new Promise((function(n,i){try{t(e,(function(e,t){t(),n(!0)}),(function(e,t){t(),n(!1)}),o)}catch(e){i(e)}}))}})),function(e,t){e=e||{};var o="__inviewportstyle",n=function(e,t){return this.initialize(e,t)};n.defaults={viewport:window,scroll_bg_scale:!1,scale_extra_class:"",set_round:"",scale_bg:"#08c",threshold:[0],modTop:"-200px",modBottom:"-200px",style:{transition:"all 1s ease-in-out"},styleIn:{"background-color":"#08c"},styleOut:{"background-color":"#fff"}},n.prototype={initialize:function(e,t){return e.data(o)||(this.$el=e,this.setData().setOptions(t).build()),this},setData:function(){return this.$el.data(o,this),this},setOptions:function(e){return this.options=t.extend(!0,{},n.defaults,e,{}),this},build:function(){var e=this,o=e.$el.get(0);return e.options.scroll_bg_scale&&"undefined"!=typeof gsap?(e.$scaleObject=t('<div class="scale-expand position-absolute"></div>').addClass(e.options.scale_extra_class),e.$el.addClass("view-scale-wrapper").append(e.$scaleObject),e.$scaleObject.css("background-color",e.options.scale_bg),e.scale=!0,e.scaleEventFunc=e.scaleEvent.bind(this),e.scaleEventFunc(),t(window).on("scroll",e.scaleEventFunc)):(e.$el.css(e.options.style),"function"==typeof window.IntersectionObserver&&(e.viewPort=observeElementInViewport.observeElementInViewport(o,(function(){e.$el.css(e.options.styleIn)}),(function(){e.$el.css(e.options.styleOut)}),{viewport:e.options.viewport,threshold:e.options.threshold,modTop:e.options.modTop,modBottom:e.options.modBottom}))),this},scaleEvent:function(){var e=this,t=e.$el[0].getBoundingClientRect();if(e.scale&&t.top<window.innerHeight&&t.bottom>=0){gsap.set(e.$scaleObject[0],{width:"150vmax",height:"150vmax",xPercent:-50,yPercent:-50,top:"50%",left:"50%"});let t="-50%";e.$el.height()<600&&(t="-600px"),gsap.timeline({scrollTrigger:{trigger:e.$el[0],start:t,end:"0%",scrub:2,invalidateOnRefresh:!0},defaults:{ease:"none"}}).fromTo(e.$scaleObject[0],{scale:0},{x:0,y:0,ease:"power3.in",scale:1}),e.scale=!1}},disable:function(){var e=this;e.options.scroll_bg_scale?(e.$el.find(".scale-expand").remove(),e.$el.removeClass("view-scale-wrapper")):(e.$el.css({"background-color":"",transition:""}),e.viewPort())}},t.extend(e,{PluginInViewportStyle:n}),t.fn.themePluginInViewportStyle=function(e){return this.map((function(){var i=t(this);return i.data(o)?i.data(o):new n(i,e)}))}}.apply(this,[window.theme,jQuery]),function(e,t){window.theme.isReady&&e.fn.themePluginInViewportStyle&&e((function(){e("[data-inviewport-style]:not(.manual)").each((function(){var t=e(this),o=t.data("plugin-options");t.themePluginInViewportStyle(o)}))})),e(document.body).on("porto_init",(function(t,o){e.fn.themePluginInViewportStyle&&e((function(){o.find("[data-inviewport-style]:not(.manual)").each((function(){var t=e(this),o=t.data("plugin-options");t.themePluginInViewportStyle(o)}))}))}))}(window.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.