PageSourceSearch

https://swaltech.com/wp-content/themes/salient/js/build/elements/nectar-text-inline-images.js?ver=18.0

js swaltech.com collected 2026-10-06 19:15:08 UTC 19,173 bytes, 1 lines download raw bytes

vendor: 4,764 bytes, line 1
1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SplitType=e()}(this,function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function e(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?i(Object(o),!0).forEach(function(e){n(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{i||null==a.return||a.return()}finally{if(o)throw r}}return n}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t,e){return Object.getOwnPropertyNames(Object(t)).reduce(function(n,i){var o=Object.getOwnPropertyDescriptor(Object(t),i),r=Object.getOwnPropertyDescriptor(Object(e),i);return Object.defineProperty(n,i,r||o)},{})}function h(t){return"string"==typeof t}function d(t){return Array.isArray(t)}function u(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=c(e);return void 0!==n.types?t=n.types:void 0!==n.split&&(t=n.split),void 0!==t&&(n.types=(h(t)||d(t)?String(t):"").split(",").map(function(t){return String(t).trim()}).filter(function(t){return/((line)|(word)|(char))/i.test(t)})),(n.absolute||n.position)&&(n.absolute=n.absolute||/absolute/.test(e.position)),n}function p(t){var e=h(t)||d(t)?String(t):"";return{none:!e,lines:/line/i.test(e),words:/word/i.test(e),chars:/char/i.test(e)}}function f(t){return null!==t&&"object"==typeof t}function y(t){return f(t)&&/^(1|3|11)$/.test(t.nodeType)}function m(t){return d(t)?t:null==t?[]:function(t){return f(t)&&function(t){return"number"==typeof t&&t>-1&&t%1==0}(t.length)}(t)?Array.prototype.slice.call(t):[t]}function g(t){var e=t;return h(t)&&(e=/^(#[a-z]\w+)$/.test(t.trim())?document.getElementById(t.trim().slice(1)):document.querySelectorAll(t)),m(e).reduce(function(t,e){return[].concat(s(t),s(m(e).filter(y)))},[])}!function(){function t(){for(var t=arguments.length,e=0;e<t;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];1===n.nodeType||11===n.nodeType?this.appendChild(n):this.appendChild(document.createTextNode(String(n)))}}function e(){for(;this.lastChild;)this.removeChild(this.lastChild);arguments.length&&this.append.apply(this,arguments)}function n(){for(var t=this.parentNode,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var o=n.length;if(t)for(o||t.removeChild(this);o--;){var r=n[o];"object"!=typeof r?r=this.ownerDocument.createTextNode(r):r.parentNode&&r.parentNode.removeChild(r),o?t.insertBefore(this.previousSibling,r):t.replaceChild(r,this)}}"undefined"!=typeof Element&&(Element.prototype.append||(Element.prototype.append=t,DocumentFragment.prototype.append=t),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=e,DocumentFragment.prototype.replaceChildren=e),Element.prototype.replaceWith||(Element.prototype.replaceWith=n,DocumentFragment.prototype.replaceWith=n))}();
1var w=Object.entries,v="_splittype",b={},O=0;function E(t,e,n){if(!f(t))return console.warn("[data.set] owner is not an object"),null;var i=t[v]||(t[v]=++O),r=b[i]||(b[i]={});return void 0===n?e&&Object.getPrototypeOf(e)===Object.prototype&&(b[i]=o(o({},r),e)):void 0!==e&&(r[e]=n),n}function S(t,e){var n=f(t)?t[v]:null,i=n&&b[n]||{};return void 0===e?i:i[e]}function C(t){var e=t&&t[v];e&&(delete t[e],delete b[e])}var x="\\ud800-\\udfff",T="\\u0300-\\u036f\\ufe20-\\ufe23",A="\\u20d0-\\u20f0",j="\\ufe0e\\ufe0f",$="[".concat(x,"]"),k="[".concat(T).concat(A,"]"),I="\\ud83c[\\udffb-\\udfff]",H="(?:".concat(k,"|").concat(I,")"),_="[^".concat(x,"]"),M="(?:\\ud83c[\\udde6-\\uddff]){2}",P="[\\ud800-\\udbff][\\udc00-\\udfff]",L="".concat(H,"?"),D="[".concat(j,"]?"),N=D+L+"(?:\\u200d(?:"+[_,M,P].join("|")+")"+D+L+")*",W="(?:".concat(["".concat(_).concat(k,"?"),k,M,P,$].join("|"),"\n)"),B=RegExp("".concat(I,"(?=").concat(I,")|").concat(W).concat(N),"g"),R=RegExp("[".concat(["\\u200d",x,T,A,j].join(""),"]"));function z(t){return R.test(t)}function F(t,e){var n=document.createElement(t);return e?(Object.keys(e).forEach(function(t){var i=e[t],o=h(i)?i.trim():i;null!==o&&""!==o&&("children"===t?n.append.apply(n,s(m(o))):n.setAttribute(t,o))}),n):n}var q={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:["lines","words","chars"],absolute:!1,tagName:"div"};function Y(t,e){var n,i=p((e=c(q,e)).types),o=e.tagName,r=t.nodeValue,a=document.createDocumentFragment(),l=[];return/^\s/.test(r)&&a.append(" "),n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return(t?String(t):"").trim().replace(/\s+/g," ").split(e)}(r).reduce(function(t,n,r,c){var d,u;return i.chars&&(u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t=function(t){return null==t?"":String(t)}(t))&&h(t)&&!e&&z(t)?function(t){return z(t)?function(t){return t.match(B)||[]}(t):function(t){return t.split("")}(t)}(t):t.split(e)}(n).map(function(t){var n=F(o,{class:"".concat(e.splitClass," ").concat(e.charClass),style:"display: inline-block;",children:t});return E(n,"isChar",!0),l=[].concat(s(l),[n]),n})),i.words||i.lines?(E(d=F(o,{class:"".concat(e.wordClass," ").concat(e.splitClass),style:"display: inline-block; ".concat(i.words&&e.absolute?"position: relative;":""),children:i.chars?u:n}),{isWord:!0,isWordStart:!0,isWordEnd:!0}),a.appendChild(d)):u.forEach(function(t){a.appendChild(t)}),r<c.length-1&&a.append(" "),i.words?t.concat(d):t},[]),/\s$/.test(r)&&a.append(" "),t.replaceWith(a),{words:n,chars:l}}function J(t){S(t).isWord?(C(t),t.replaceWith.apply(t,s(t.childNodes))):m(t.children).forEach(function(t){return J(t)})}var V=c(q,{});return function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isSplit=!1,this.settings=c(V,u(n)),this.elements=g(e),this.split()}return e(t,null,[{key:"clearData",value:function(){Object.keys(b).forEach(function(t){delete b[t]})}},{key:"setDefaults",value:function(t){return V=c(V,u(t)),q}},{key:"revert",value:function(t){g(t).forEach(function(t){var e=S(t),n=e.isSplit,i=e.html,o=e.cssWidth,r=e.cssHeight;n&&(t.innerHTML=i,t.style.width=o||"",t.style.height=r||"",C(t))})}},{key:"create",value:function(e,n){return new t(e,n)}},{key:"data",get:function(){return b}},{key:"defaults",get:function(){return V},set:function(t){V=c(V,u(t))}}]),e(t,[{key:"split",value:function(t){var e=this;this.revert(),this.elements.forEach(function(t){E(t,"html",t.innerHTML)}),this.lines=[],this.words=[],this.chars=[];var n=[window.pageXOffset,window.pageYOffset];void 0!==t&&(this.settings=c(this.settings,u(t)));var i=p(this.settings.types);i.none||(this.elements.forEach(function(t){E(t,"isRoot",!0);var n=function t(e,n){var i=e.nodeType,o={words:[],chars:[]};if(!/(1|3|11)/.test(i))return o;if(3===i&&/\S/.test(e.nodeValue))return Y(e,n);var r=m(e.childNodes);if(r.length&&(E(e,"isSplit",!0),!S(e).isRoot)){e.style.display="inline-block",e.style.position="relative";var a=e.nextSibling,l=e.previousSibling,c=e.textContent||"",h=a?a.textContent:" ",d=l?l.textContent:" ";E(e,{isWordEnd:/\s$/.test(c)||/^\s/.test(h),isWordStart:/^\s/.test(c)||/\s$/.test(d)})}return r.reduce(function(e,i){var o=t(i,n),r=o.words,a=o.chars;return{words:[].concat(s(e.words),s(r)),chars:[].concat(s(e.chars),s(a)
1)}},o)}(t,e.settings),i=n.words,o=n.chars;e.words=[].concat(s(e.words),s(i)),e.chars=[].concat(s(e.chars),s(o))}),this.elements.forEach(function(t){if(i.lines||e.settings.absolute){var o=function(t,e,n){var i,o,s,a=p(e.types),l=e.tagName,c=t.getElementsByTagName("*"),h=[],d=[],u=null,f=[],y=t.parentElement,g=t.nextElementSibling,w=document.createDocumentFragment(),v=window.getComputedStyle(t),b=v.textAlign,O=.2*parseFloat(v.fontSize);return e.absolute&&(s={left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth},o=t.offsetWidth,i=t.offsetHeight,E(t,{cssWidth:t.style.width,cssHeight:t.style.height})),m(c).forEach(function(i){var o=i.parentElement===t,s=function(t,e,n,i){if(!n.absolute)return{top:e?t.offsetTop:null};var o=t.offsetParent,s=r(i,2),a=s[0],l=s[1],c=0,h=0;if(o&&o!==document.body){var d=o.getBoundingClientRect();c=d.x+a,h=d.y+l}var u=t.getBoundingClientRect(),p=u.width,f=u.height,y=u.x;return{width:p,height:f,top:u.y+l-h,left:y+a-c}}(i,o,e,n),l=s.width,c=s.height,p=s.top,f=s.left;/^br$/i.test(i.nodeName)||(a.lines&&o&&((null===u||p-u>=O)&&(u=p,h.push(d=[])),d.push(i)),e.absolute&&E(i,{top:p,left:f,width:l,height:c}))}),y&&y.removeChild(t),a.lines&&(f=h.map(function(t){var n=F(l,{class:"".concat(e.splitClass," ").concat(e.lineClass),style:"display: block; text-align: ".concat(b,"; width: 100%;")});E(n,"isLine",!0);var i={height:0,top:1e4};return w.appendChild(n),t.forEach(function(t,e,o){var r=S(t),s=r.isWordEnd,a=r.top,l=r.height,c=o[e+1];i.height=Math.max(i.height,l),i.top=Math.min(i.top,a),n.appendChild(t),s&&S(c).isWordStart&&n.append(" ")}),e.absolute&&E(n,{height:i.height,top:i.top}),n}),a.words||J(w),t.replaceChildren(w)),e.absolute&&(t.style.width="".concat(t.style.width||o,"px"),t.style.height="".concat(i,"px"),m(c).forEach(function(t){var e=S(t),n=e.isLine,i=e.top,o=e.left,r=e.width,a=e.height,l=S(t.parentElement),c=!n&&l.isLine;t.style.top="".concat(c?i-l.top:i,"px"),t.style.left="".concat(n?s.left:o-(c?s.left:0),"px"),t.style.height="".concat(a,"px"),t.style.width="".concat(n?s.width:r,"px"),t.style.position="absolute"})),y&&(g?y.insertBefore(t,g):y.appendChild(t)),f}(t,e.settings,n);e.lines=[].concat(s(e.lines),s(o))}}),this.isSplit=!0,window.scrollTo(n[0],n[1]),w(b).forEach(function(t){var e=r(t,2),n=e[0],i=e[1],o=i.isRoot,s=i.isSplit;o&&s||(b[n]=null,delete b[n])}))}},{key:"revert",value:function(){this.isSplit&&(this.lines=null,this.words=null,this.chars=null,this.isSplit=!1),t.revert(this.elements)}}]),t}()}),function(t){"use strict";function e(t){this.$el=t,this.$markers=this.$el.find(".nectar-text-inline-images__marker"),this.animationNodes=[],this.animationType="none",this.splitTypeInstance=null,this.isScrolling=!1,this.viewportHeight=window.innerHeight||document.documentElement.clientHeight,this.containerHeight=this.$el.height(),this.containerRect=this.$el[0].getBoundingClientRect(),this.disableOnMobile=!1,this.rafID=null,this.positionImages(),this.init(),this.events()}e.prototype.init=function(){this.$el.hasClass("nectar-text-inline-images--animation_scroll_fade")?this.animationType="scroll_fade":this.$el.hasClass("nectar-text-inline-images--animation_circle_reveal")?this.animationType="circle_reveal":this.$el.hasClass("nectar-text-inline-images--animation_circle_fade_in")?this.animationType="circle_fade_in":this.animationType="none",this.$el.hasClass("nectar-text-inline-images--rm-mobile-animation")&&navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)&&(this.disableOnMobile=!0),this.animationSetup(),"scroll_fade"===this.animationType&&this.scrollFadeAnimation()},e.prototype.destroy=function(){if(this.stopAnimationLoop(),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null),this.waypoints&&(Array.isArray(this.waypoints)?this.waypoints.forEach(function(t){t&&"function"==typeof t.destroy&&t.destroy()}):"function"==typeof this.waypoints.destroy&&this.waypoints.destroy(),this.waypoints=null),this.splitTypeInstance&&(this.splitTypeInstance.revert(),this.splitTypeInstance=null),this.resizeHandler)if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){window.matchMedia("(orientation: portrait)").removeEventListener("change",this.resizeHandler)}else t(window).off("resize",this.resizeHandler);this.waypointHandler&&t(window).off("nectar-waypoints-reinit",this.waypointHandler),this.delayedJsHandler&&t(window).off("salient-delayed-js-loaded",this.delayedJsHandler),this.animationNodes=[]},e.prototype.animationSetup=function(){const e=this.$el[0].querySelector(".nectar-text-inline-images__inner");let n=e;if("scroll_fade"===this.animationType){var i=this.$el.find("h1, h2, h3, h4, h5, h6");if(i.length>0){const t=i[0];let o=e.innerHTML;o=o.replace(/<\/?h[1-6][^>]*>/gi,""),e.innerHTML=`<${t.tagName}>${o}</${t.tagName}>`,n=e.querySelector(t.tagName)}this.disableOnMobile||(this.splitTypeInstance=new SplitType(n,{types:"lines, words"}),this.animationNodes=Array.from(n.querySelectorAll(".word, .nectar-text-inline-images__marker")),this.$markers=this.$el.find(".nectar-text-inline-images__marker"),e.querySelectorAll("[data-calculated-width]").forEach(function(t){t.classList.add("no-transition"),t.style.width=0}),setTimeout(function(){e.querySelectorAll(".no-transition").forEach(function(t){t.classList.remove("no-transition")})},50)),t(window).trigger("salient-lazyloading-image-reinit")}},e.prototype.scrollFadeAnimation=function(){this.intersectionObserver=new IntersectionObserver(([t])=>{t.isIntersecting&&!this.disableOnMobile?(this.updateMeasurements(),this.initialElementTop=this.containerRect.top,this.initialScrollY=window.scrollY||document.documentElement.scrollTop,this.startAnimationLoop()):this.stopAnimationLoop()},{threshold:0,rootMargin:"400px 0px 400px 0px"}),this.intersectionObserver.observe(this.$el[0])},e.prototype.startAnimationLoop=function(){this.rafID||(this.rafID=requestAnimationFrame(this.onScroll.bind(this)))},e.prototype.stopAnimationLoop=function(){this.rafID&&(cancelAnimationFrame(this.rafID),this.rafID=null)},e.prototype.onScroll=function(){if(window.nectarState&&window.nectarState.materialOffCanvasOpen)return void requestAnimationFrame(()=>this.onScroll());
1const t=this.containerRect.height,e=this.viewportHeight,n=window.scrollY||document.documentElement.scrollTop,i=n-(this.initialScrollY||0),o=this.initialElementTop-i,r=0===n;let s=r?0:(e-o-(r?0:.2*e))/((e+t-.9*e)*(r?1.5:1));s=Math.min(Math.max(s,0),1),this.animationNodes.forEach((t,e)=>{const n=(e+1)/this.animationNodes.length;s>=n?t.classList.contains("visible")||(t.classList.contains("nectar-text-inline-images__marker")&&(t.style.width=t.getAttribute("data-calculated-width")),t.classList.add("visible")):t.classList.contains("visible")&&(t.classList.remove("visible"),t.classList.contains("nectar-text-inline-images__marker")&&(t.classList.remove("no-transition"),t.style.width=0))}),this.rafID=requestAnimationFrame(this.onScroll.bind(this))},e.prototype.positionImages=function(){this.splitTypeInstance&&this.splitTypeInstance.revert(),this.$markers=this.$el.find(".nectar-text-inline-images__marker"),this.$markers.each(function(e){var n=t(this).find("img").length>0?"img":"video";if("video"==n){var i=t(this).height();t(this).find(n).css({width:1.7*i+"px"})}var o=t(this).find(n);if(o.length>0){var r=o[0].getBoundingClientRect();t(this)[0].setAttribute("data-calculated-width",r.width+"px"),t(this)[0].style.width=r.width+"px"}}),this.$el.addClass("nectar-text-inline-images--calculated")},e.prototype.events=function(){if(this.resizeHandler=this.resizeCallback.bind(this),this.waypointHandler=this.waypoint.bind(this),this.delayedJsHandler=this.waypoint.bind(this),navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){window.matchMedia("(orientation: portrait)").addEventListener("change",this.resizeHandler)}else t(window).on("resize",this.resizeHandler);"scroll_fade"===this.animationType&&this.$el.offset().top>window.scrollY+window.innerHeight&&setTimeout(()=>{this.resizeCallback.bind(this)},200),t(window).on("nectar-waypoints-reinit",this.waypointHandler),window.Waypoint?this.waypoint():t(window).on("salient-delayed-js-loaded",this.delayedJsHandler)},e.prototype.updateMeasurements=function(){this.viewportHeight=window.innerHeight||document.documentElement.clientHeight,this.containerHeight=this.$el.height(),this.containerRect=this.$el[0].getBoundingClientRect()},e.prototype.resizeCallback=function(){this.positionImages(),this.animationSetup(),this.rafID&&(this.updateMeasurements(),this.initialElementTop=this.containerRect.top,this.initialScrollY=window.scrollY||document.documentElement.scrollTop)},e.prototype.waypoint=function(){this.waypoints&&(Array.isArray(this.waypoints)?this.waypoints.forEach(function(t){t&&"function"==typeof t.destroy&&t.destroy()}):"function"==typeof this.waypoints.destroy&&this.waypoints.destroy());var e=[],n=this;this.$el.hasClass("nectar-text-inline-images--stagger-animation")?e=ne
1w Waypoint({element:n.$el[0],handler:function(){n.$markers.each(function(e){var n=t(this);setTimeout(function(){n.addClass("animated-in")},150*e)}),e.destroy()},offset:"bottom-in-view"}):this.$markers.each(function(n){var i=t(this);e[n]=new Waypoint({element:t(this)[0],handler:function(){i.addClass("animated-in"),e[n].destroy()},offset:"bottom-in-view"})}),this.waypoints=e};var n,i=[],o=[];function r(){i.length>0&&i.forEach(function(t){t&&"function"==typeof t.destroy&&t.destroy()}),o.length>0&&o.forEach(function(t){t&&"function"==typeof t.disconnect&&t.disconnect()}),i=[],o=[];var n=void 0!==window.vc_iframe;t(".nectar-text-inline-images").each(function(r){var s,a,l;0==n&&"IntersectionObserver"in window?(s=t(this),a=r,(l=new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting&&(i[a]=new e(s),l.unobserve(t.target))})},{rootMargin:"300px 0px 300px 0px",threshold:0})).observe(s[0]),o[a]=l):i[r]=new e(t(this))})}r(),t(window).on("vc_reload",function(){n&&clearTimeout(n),n=setTimeout(function(){r(),n=null},500)})}(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.