PageSourceSearch

https://asociacionvellmari.com/wp-content/themes/salient/js/build/elements/nectar-text-outline.js?ver=18.3.0

js asociacionvellmari.com collected 2026-10-04 14:53:36 UTC 8,216 bytes, 1 lines download raw bytes

1!function(){"use strict";var t="http://www.w3.org/2000/svg",e={"ultra-thin":.01,thin:.015,regular:.02,thick:.03,extra_thick:.04},n=0,r=[];function l(t,e){t.style.fontFamily=e.ff,t.style.fontSize=e.fontSize+"px",t.style.fontWeight=e.fw,t.style.fontStyle=e.fst,e.ls&&"normal"!==e.ls&&(t.style.letterSpacing=e.ls)}function o(t){var e=window.getComputedStyle(t);return{ff:e.fontFamily,fw:e.fontWeight,fst:e.fontStyle,ls:e.letterSpacing,fontSize:parseFloat(e.fontSize),color:e.color}}function i(e,r,o,i){var s=document.createElementNS(t,"svg");s.setAttribute("aria-hidden","true"),s.style.overflow="visible",s.setAttribute("width","2000"),s.setAttribute("height","1000");var c=document.createElementNS(t,"text");c.setAttribute("x","0"),c.setAttribute("y","0"),l(c,r),c.textContent=e;var u=null,d=null,h=null;if(i){var f="nht-"+n++,g=document.createElementNS(t,"defs");(u=document.createElementNS(t,"mask")).setAttribute("id",f),u.setAttribute("maskUnits","userSpaceOnUse"),(d=document.createElementNS(t,"rect")).setAttribute("fill","white"),u.appendChild(d),a(u,d,-500,-500,5e3,2500),(h=document.createElementNS(t,"text")).setAttribute("fill","black"),h.setAttribute("stroke","none"),h.setAttribute("x","0"),h.setAttribute("y","0"),l(h,r),h.textContent=e,u.appendChild(h),g.appendChild(u),s.appendChild(g),c.setAttribute("fill","none"),c.setAttribute("stroke",o),c.setAttribute("stroke-width",2*i.strokeWidth),c.setAttribute("stroke-linejoin","round"),c.setAttribute("stroke-linecap","round"),c.setAttribute("mask","url(#"+f+")")}else c.setAttribute("fill",o),c.setAttribute("stroke","none");return s.appendChild(c),{svg:s,textEl:c,mask:u,maskRect:d,maskText:h}}function a(t,e,n,r,l,o){t.setAttribute("x",n),t.setAttribute("y",r),t.setAttribute("width",l),t.setAttribute("height",o),e.setAttribute("x",n),e.setAttribute("y",r),e.setAttribute("width",l),e.setAttribute("height",o)}function s(t){var e=t.textEl.getComputedTextLength();if(t.svg.setAttribute("width",e),t.svg.setAttribute("height","0.1"),t.svg.style.verticalAlign="baseline",t.mask){var n=parseFloat(t.textEl.style.fontSize)||16;a(t.mask,t.maskRect,-n,1.5*-n,e+2*n,3*n)}}function c(t,e,n){var r=t.textEl.getComputedTextLength();if(t.svg.setAttribute("width",r),t.svg.setAttribute("height",e),t.textEl.setAttribute("y",n),t.maskText){t.maskText.setAttribute("y",n);var l=parseFloat(t.textEl.style.fontSize)||16;a(t.mask,t.maskRect,-l,-l,r+2*l,e+2*l)}}function u(t,n){var s="text_outline"===t.getAttribute("data-style"),u=t.getAttribute("data-outline-thickness")||"regular",h=e[u]||.02,f=t.querySelectorAll(".nectar-scrolling-text-inner__text-chunk > p, .nectar-scrolling-text-inner__text-chunk > h1, .nectar-scrolling-text-inner__text-chunk > h2, .nectar-scrolling-text-inner__text-chunk > h3, .nectar-scrolling-text-inner__text-chunk > h4, .nectar-scrolling-text-inner__text-chunk > h5, .nectar-scrolling-text-inner__text-chunk > h6");if(n){for(var g=0;g<f.length;g++){var x=o(L=f[g]),m=window.getComputedStyle(L),y=parseFloat(m.lineHeight)||1.2*x.fontSize,v=Math.max(1,x.fontSize*h);(N=document.createElement("canvas").getContext("2d")).font=x.fst+" "+x.fw+" "+x.fontSize+"px "+x.ff;for(var p=(y-((M=(F=N.measureText("X")).fontBoundingBoxAscent||F.actualBoundingBoxAscent)+(F.fontBoundingBoxDescent||F.actualBoundingBoxDescent)))/2+M,A=L.querySelectorAll("svg"),b=0;b<A.length;b++){var S=A[b],k=S.closest("em, i");if(!k||!L.contains(k)){var w=S.querySelector("text:not(mask text)")||S.querySelector("text");if(w){l(w,x);var C=S.querySelector("mask text");C&&(l(C,x),w.setAttribute("stroke-width",2*v));var _=w.getComputedTextLength();if(S.setAttribute("width",_),S.setAttribute("height",y),w.setAttribute("y",p),C){C.setAttribute("y",p);var E=S.querySelector("mask"),q=E.querySelector("rect"),z=x.fontSize;a(E,q,-z,-z,_+2*z,y+2*z)}}}}}for(var B=t.querySelectorAll("em[data-nht-text], i[data-nht-text]"),T=0;T<B.length;T++)d(B[T])}else{for(g=0;g<f.length;g++){var L,N;x=o(L=f[g]),m=window.getComputedStyle(L),y=parseFloat(m.lineHeight)||1.2*x.fontSize,v=Math.max(1,x.fontSize*h);(N=document.createElement("canvas").getContext("2d")).font=x.fst+" "+x.fw+" "+x.fontSize+"px "+x.ff;p=(y-((M=(F=N.measureText("X")).fontBoundingBoxAscent||F.actualBoundingBoxAscent)+(F.fontBoundingBoxDescent||F.actualBoundingBoxDescent)))/2+M;for(var F,M,W=[],O=0;O<L.childNodes.length;O++){var D=L.childNodes[O];if(3===D.nodeType)W.push({type:"text",content:D.textContent,styles:x,color:x.color});else if(1!==D.nodeType||"EM"!==D.tagName&&"I"!==D.tagName)1===D.nodeType&&W.push({type:"node",el:D});else{var H=window.getComputedStyle(D).color;W.push({type:"em",content:D.textContent,styles:x,color:H,outline:s})}}for(O=0;O<W.length;O++)"node"===W[O].type&&W[O].el.remove();L.innerHTML="";for(O=0;O<W.length;O++){var P=W[O];if("node"!==P.type){var R=P.content;if(R.trim()){var U="em"===P.type&&P.outline?{strokeWidth:v}:null,X=i(R,P.styles,P.color,U);"em"===P.type&&P.outline&&(X.svg.setAttribute("data-nht-text",R),X.svg.style.setProperty("--nht-color",P.color)),L.appendChild(X.svg),c(X,y,p)}else L.appendChild(document.createTextNode(R))}else if(L.appendChild(P.el),s)for(B=P.el.querySelectorAll?P.el.querySelectorAll("em, i"):[],T=0;T<B.length;T++)d(B[T])}}-1===r.indexOf(t)&&r.push(t)}}
1function d(t){var n=t.closest(".nectar-highlighted-text")||t.closest(".nectar-scrolling-text");if(n){var r=n.classList.contains("nectar-scrolling-text"),l=n.getAttribute("data-outline-thickness")||"regular",o=e[l]||.02,a=t.getAttribute("data-nht-text");if(a||(a=t.textContent,t.setAttribute("data-nht-text",a)),a.trim()){t.textContent=a;var c=window.getComputedStyle(t),u=parseFloat(c.fontSize),d=Math.max(1,u*o),h=c.color,f={ff:c.fontFamily,fw:c.fontWeight,fst:c.fontStyle,ls:c.letterSpacing,fontSize:u};if(t.style.setProperty("--nht-color",h),r){t.innerHTML="";var g=i(a,f,h,{strokeWidth:d});t.appendChild(g.svg),s(g)}else{var x=a.split(/(\s+)/);t.innerHTML="";for(var m=0;m<x.length;m++){var y=x[m];if(/^\s+$/.test(y))t.appendChild(document.createTextNode(y));else if(y){g=i(y,f,h,{strokeWidth:d});t.appendChild(g.svg),s(g)}}}}}}function h(){r=[];for(var t=document.querySelectorAll('.nectar-highlighted-text[data-style="text_outline"] em, .nectar-highlighted-text[data-style="text_outline"] i'),e=0;e<t.length;e++)d(t[e]);var n=document.querySelectorAll('.nectar-scrolling-text[data-style="text_outline"]'),l=[];for(e=0;e<n.length;e++){var o=n[e].closest(".wpb_row, .vc_row");if(o){for(var i=n[e],a=!1;i;){if("absolute"===window.getComputedStyle(i).position){a=!0;break}if(i===o)break;i=i.parentElement}if(a){var s=(o.parentElement?o.parentElement.closest(".wpb_row, .vc_row"):null)||o;-1===l.indexOf(s)&&l.push(s)}}}for(e=0;e<l.length;e++){for(var c=l[e].querySelectorAll(".nectar-scrolling-text"),h=[],f=0;f<c.length;f++)for(var g=c[f].querySelectorAll(".nectar-scrolling-text-inner > *"),x=0;x<g.length;x++)g[x].style.animationPlayState="paused",h.push(g[x]);for(f=0;f<c.length;f++)u(c[f]);for(f=0;f<h.length;f++)h[f].style.animation="none";l[e].offsetWidth;for(f=0;f<h.length;f++)h[f].style.animation="",h[f].style.animationPlayState=""}var m=document.querySelectorAll('.nectar-scrolling-text[data-style="text_outline"] em, .nectar-scrolling-text[data-style="text_outline"] i');for(e=0;e<m.length;e++){var y=m[e].closest(".nectar-scrolling-text");-1===r.indexOf(y)&&d(m[e])}}function f(){for(var t=0;t<r.length;t++)u(r[t],!0);var e=document.querySelectorAll('.nectar-highlighted-text[data-style="text_outline"] em[data-nht-text], .nectar-highlighted-text[data-style="text_outline"] i[data-nht-text]');for(t=0;t<e.length;t++)d(e[t]);var n=document.querySelectorAll('.nectar-scrolling-text[data-style="text_outline"] em[data-nht-text], .nectar-scrolling-text[data-style="text_outline"] i[data-nht-text]');for(t=0;t<n.length;t++){var l=n[t].closest(".nectar-scrolling-text");-1===r.indexOf(l)&&d(n[t])}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",h):h(),window.addEventListener("resize",f),document.addEventListener("visibilitychange",function(){document.hidden||f()}),document.fonts&&(document.fonts.ready&&document.fonts.ready.then(function(){f()}),document.fonts.addEventListener&&document.fonts.addEventListener("loadingdone",function(){f()}))}();

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.