https://rapidsos.com/wp-content/plugins/cooper-bold-logo-soup/build/view.js?ver=84aae5299260d46712bc
1(()=>{"use strict";const e=window.wp.element,t=window.ReactJSXRuntime,o=window.React,n="visual-center-y",r=48,i=.5,l=10,a=!0,s=.5,c=!1;const d=5,u=1<<8-d,g=u*u*u,h=new Uint16Array(g),f=new Uint32Array(g),p=new Uint32Array(g),m=new Uint32Array(g),y=2048;function b(e){return"string"==typeof e?{src:e,alt:""}:e}function w(e,t,o,n,r=0){const{width:i,height:l}=function(e,t,o,n=0){const r=e.contentBox?e.contentBox.width:e.width,i=e.contentBox?e.contentBox.height:e.height;if(0===r||0===i)return{width:t,height:t};const l=r/i;let a=l**o*t,s=a/l;if(void 0!==e.backgroundLuminance){const t=1-(1-e.backgroundLuminance)*(e.pixelDensity??.5)*.08;a*=t,s*=t}if(n>0&&void 0!==e.pixelDensity){const t=(1/(e.pixelDensity/.35))**(.5*n),o=Math.max(.5,Math.min(2,t));a*=o,s*=o}return{width:Math.round(a),height:Math.round(s)}}(t,o,n,r),a=t.contentBox?t.contentBox.width:t.width,s=t.contentBox?t.contentBox.height:t.height;return{src:e.src,alt:e.alt||"",originalWidth:t.width,originalHeight:t.height,contentBox:t.contentBox,normalizedWidth:i,normalizedHeight:l,aspectRatio:s>0?a/s:1,pixelDensity:t.pixelDensity,visualCenter:t.visualCenter}}function S(e){let t=null,o=null,n=0,r=0;return(i,l)=>(t||(t=document.createElement("canvas"),o=t.getContext("2d",e)),o?(n!==i||r!==l?(t.width=i,t.height=l,n=i,r=l):o.clearRect(0,0,i,l),o):null)}S();const v=S({willReadFrequently:!0});let k=null;const x={status:"idle",normalizedLogos:[],error:null};function C(){const e=new Set,t=new Map;let o,n=x,S=null,C=!1,L=NaN,A=!1;function z(t){n.status===t.status&&n.normalizedLogos===t.normalizedLogos&&n.error===t.error||(n=t,function(){for(const t of e)t()}())}function E(){for(const e of t.values())e.blobUrl&&URL.revokeObjectURL(e.blobUrl);t.clear()}function M(){S?.(),S=null}return{process:function(e){if(C)return;M();const{logos:n,baseSize:x=r,scaleFactor:R=i,contrastThreshold:B=l,densityAware:U=a,densityFactor:T=s,cropToContent:F=c,backgroundColor:I}=e;if(0===n.length)return void z({status:"ready",normalizedLogos:[],error:null});const q=I?function(e){if(Array.isArray(e))return e;if(!k){const e=document.createElement("canvas");e.width=1,e.height=1,k=e.getContext("2d")}if(!k)return[255,255,255];k.fillStyle=e,k.fillRect(0,0,1,1);const[t,o,n]=k.getImageData(0,0,1,1).data;return[t,o,n]}(I):void 0;var O,j;(L!==B||A!==U||!((O=o)===(j=q)||O&&j&&O[0]===j[0]&&O[1]===j[1]&&O[2]===j[2]))&&(E(),L=B,A=U,o=q);const D=n.map(b);!function(e){for(const[o,n]of t)e.has(o)||(n.blobUrl&&URL.revokeObjectURL(n.blobUrl),t.delete(o))}(new Set(D.map(e=>e.src)));const N=D.every(e=>t.has(e.src)),W=F&&D.some(e=>{const o=t.get(e.src);return o&&!o.blobUrl&&o.measurement.contentBox}),_=U?T:0;if(N&&!W)return void z({status:"ready",normalizedLogos:D.map(e=>{const o=t.get(e.src),n=w(e,o.measurement,x,R,_);return F&&o.blobUrl&&(n.croppedSrc=o.blobUrl),n}),error:null});let H=!1;S=()=>{H=!0},N||z({status:"loading",normalizedLogos:[],error:null}),Promise.allSettled(D.map(async e=>{let o=t.get(e.src);if(!o){const r=await(n=e.src,new Promise((e,t)=>{const o=new Image;o.crossOrigin="anonymous",o.onload=()=>e(o),o.onerror=()=>t(new Error(`Failed to load image: ${n}`)),o.src=n}));if(H)throw new Error("cancelled");const i=function(e,t=10,o=!1,n){const r=e.naturalWidth,i=e.naturalHeight;return function(e,t,o,n,r={}){const{contrastThreshold:i=10,includeDensity:l=!1,backgroundColor:a}=r,{sw:s,sh:c}=function(e,t){const o=e*t,n=o>y?Math.sqrt(y/o):1;return{sw:Math.max(1,Math.round(e*n)),sh:Math.max(1,Math.round(t*n))}}(o,n),b=e(s,c);if(!b)return null;b.drawImage(t,0,0,s,c);const w=b.getImageData(0,0,s,c);return function(e){const{width:t,height:o,data32:n,sw:r,sh:i,contrastThreshold:l,includeDensity:a,backgroundColor:s}=e,c=t/r,y=o/i,b=l*l*3;let w,S,v,k;if(s)w=s[0],S=s[1],v=s[2],k=!1;else{const e=function(e,t,o){h.fill(0),f.fill(0),p.fill(0),m.fill(0);let n=0,r=0;const i=(o-1)*t,l=t-1;for(let n=0;n<t;n++)a(e[n]),o>1&&a(e[i+n]);for(let n=1;n<o-1;n++){const o=n*t;a(e[o]),t>1&&a(e[o+l])}function a(e){if(e>>>24<128)return void r++;n++;const t=255&e,o=e>>>8&255,i=e>>>16&255,l=((t>>>d)*u+(o>>>d))*u+(i>>>d);h[l]++,f[l]+=t,p[l]+=o,m[l]+=i}const s=n+r,c=s>0&&r>.1*s;let y=0,b=0;for(let e=0;e<g;e++)h[e]>y&&(y=h[e],b=e);return{transparent:c,bgR:y?Math.round(f[b]/y):255,bgG:y?Math.round(p[b]/y):255,bgB:y?Math.round(m[b]/y):255}}(n,r,i);e.transparent?(k=!0,w=0,S=0,v=0):(k=!1,w=e.bgR,S=e.bgG,v=e.bgB)}let x=r,C=i,L=0,A=0,z=0,E=0,M=0,R=0,B=0;const U=r*i;for(let e=0;e<U;e++){const t=n[e],o=t>>>24;if(o<=l)continue;let i,a;if(k)i=o*o,a=o;else{const e=(255&t)-w,n=(t>>>8&255)-S,r=(t>>>16&255)-v,l=e*e+n*n+r*r;if(l<b)continue;i=l*o,a=Math.min(o,Math.sqrt(l))}const s=e%r,c=(e-s)/r;s<x&&(x=s),s>L&&(L=s),c<C&&(C=c),c>A&&(A=c),z+=i,E+=(s+.5)*i,M+=(c+.5)*i,R++,B+=a}if(x>L||C>
1A)return{width:t,height:o,contentBox:{x:0,y:0,width:t,height:o},visualCenter:{x:t/2,y:o/2,offsetX:0,offsetY:0},pixelDensity:a?.5:void 0};const T=Math.floor(x*c),F=Math.floor(C*y),I={x:T,y:F,width:Math.min(Math.ceil((L+1)*c),t)-T,height:Math.min(Math.ceil((A+1)*y),o)-F};let q;if(0===z)q={x:I.x+I.width/2,y:I.y+I.height/2,offsetX:0,offsetY:0};else{const e=E/z*c,t=M/z*y;q={x:e,y:t,offsetX:e-I.x-I.width/2,offsetY:t-I.y-I.height/2}}const O={width:t,height:o,contentBox:I,visualCenter:q};if(k||(O.backgroundLuminance=(299*w+587*S+114*v)/255e3),a){const e=(L-x+1)*(A-C+1);if(0===e)O.pixelDensity=.5;else{const t=R/e,o=R>0?B/255/R:0;O.pixelDensity=t*o}}return O}({width:o,height:n,data32:new Uint32Array(w.data.buffer),sw:s,sh:c,contrastThreshold:i,includeDensity:l,backgroundColor:a})}(v,e,r,i,{contrastThreshold:t,includeDensity:o,backgroundColor:n})??{width:r,height:i}}(r,B,U,q);o={img:r,measurement:i},t.set(e.src,o)}var n;const r=w(e,o.measurement,x,R,_);if(F&&o.measurement.contentBox&&!o.blobUrl){const e=await function(e,t){const o=document.createElement("canvas"),n=o.getContext("2d");return n?(o.width=t.width,o.height=t.height,function(e,t,o){e.drawImage(t,o.x,o.y,o.width,o.height,0,0,o.width,o.height)}(n,e,t),new Promise(t=>{o.toBlob(o=>{t(o?URL.createObjectURL(o):e.src)})})):Promise.resolve(e.src)}(o.img,o.measurement.contentBox);if(H)throw URL.revokeObjectURL(e),new Error("cancelled");o.blobUrl=e}return F&&o.blobUrl&&(r.croppedSrc=o.blobUrl),r})).then(e=>{if(H||C)return;const t=[];let o;for(const n of e)"fulfilled"===n.status?t.push(n.value):o||(o=n.reason instanceof Error?n.reason:new Error("Failed to load logo"));0===t.length&&o?z({status:"error",normalizedLogos:[],error:o}):z({status:"ready",normalizedLogos:t,error:null})})},cancel:M,subscribe:function(t){return e.add(t),()=>{e.delete(t)}},getSnapshot:function(){return n},destroy:function(){C||(C=!0,M(),E(),e.clear())}}}const L={status:"idle",normalizedLogos:[],error:null};function A(){return L}const z={display:"inline-block",verticalAlign:"middle",transition:"opacity 0.2s ease-in-out"},E={display:"block",objectFit:"contain"};function M(e){return(0,t.jsx)("img",{...e})}function R({logos:e,baseSize:r,scaleFactor:i,contrastThreshold:l,densityAware:a,densityFactor:s,cropToContent:c,backgroundColor:d,alignBy:u=n,gap:g=28,renderImage:h,className:f,style:p,onNormalized:m}){const{isLoading:y,isReady:b,normalizedLogos:w,error:S}=function(e){const t=(0,o.useRef)(null);t.current||(t.current=C());const n=t.current,r=(0,o.useCallback)(e=>n.subscribe(e),[n]),i=(0,o.useCallback)(()=>n.getSnapshot(),[n]),l=(0,o.useSyncExternalStore)(r,i,A),a=(0,o.useRef)(e.logos);(function(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++){const n=e[o],r=t[o];if(void 0===n||void 0===r)return!1;if(("string"==typeof n?n:n.src)!==("string"==typeof r?r:r.src))return!1}return!0})(a.current,e.logos)||(a.current=e.logos);const s=a.current,{baseSize:c,scaleFactor:d,contrastThreshold:u,densityAware:g,densityFactor:h,cropToContent:f,backgroundColor:p}=e,m=(0,o.useRef)();return(0,o.useEffect)(()=>(clearTimeout(m.current),n.process({logos:s,baseSize:c,scaleFactor:d,contrastThreshold:u,densityAware:g,densityFactor:h,cropToContent:f,backgroundColor:p}),()=>{n.cancel(),m.current=setTimeout(()=>n.destroy(),0)}),[n,s,c,d,u,g,h,f,p]),{isLoading:"loading"===l.status,isReady:"ready"===l.status,normalizedLogos:l.normalizedLogos,error:l.error}}({logos:e,baseSize:r,scaleFactor:i,contrastThreshold:l,densityAware:a,densityFactor:s,cropToContent:c,backgroundColor:d}),v=h||M;(0,o.useEffect)(()=>{b&&m&&m(w)},[b,w,m]);const k="number"==typeof g?g/2+"px":`calc(${g} / 2)`,x={textAlign:"center",textWrap:"balance",...p};return S?null:(0,t.jsx)("div",{className:f,style:x,"data-logo-soup-loading":y,children:w.map((e,o)=>{const r=function(e,t=n){if("bounds"===t||!e.visualCenter)return;const o=e.normalizedWidth/(e.contentBox?.width||e.originalWidth),r=e.normalizedHeight/(e.contentBox?.height||e.originalHeight),i="visual-center"===t||"visual-center-x"===t?-e.visualCenter.offsetX*o:0,l="visual-center"===t||"visual-center-y"===t?-e.visualCenter.offsetY*r:0;return Math.abs(i)>.5||Math.abs(l)>.5?`translate(${Math.round(10*i)/10}px, ${Math.round(10*l)/10}px)`:void 0}(e,u);return(0,t.jsx)("span",{style:{...z,padding:k,opacity:y?0:1},children:(0,t.jsx)(v,{src:e.croppedSrc||e.src,alt:e.alt,width:e.normalizedWidth,height:e.normalizedHeight,style:{...E,width:e.normalizedWidth,height:e.normalizedHeight,transform:r}}
1)},`${e.src}-${o}`)})})}function B(e,t){const o=String(e).replace(/<[^>]*>/g,"").trim();if(o)return o;try{const e=(new URL(t,window.location.origin).pathname.replace(/\.[^./]+$/,"").split("/").pop()||"").replace(/[-_]+/g," ").replace(/\b\w/g,e=>e.toUpperCase());if(e)return e}catch(e){}return"Logo"}function U(e){if(!e?.logos?.length)return null;const o=e.logos.map(e=>({src:e.url,alt:e.alt||B("",e.url)}));let n=0;const r={logos:o,baseSize:e.baseSize??48,scaleFactor:e.scaleFactor??.5,contrastThreshold:e.contrastThreshold??10,densityAware:Boolean(e.densityAware),densityFactor:e.densityAware?e.densityFactor??.5:0,cropToContent:Boolean(e.cropToContent),alignBy:e.alignBy??"visual-center-y",gap:e.gap??28,renderImage:o=>{const{src:r,alt:i,width:l,height:a,style:s}=o;n>=e.logos.length&&(n=0);const c=e.logos[n]||{};n+=1;const d=(0,t.jsx)("img",{src:r,alt:i,width:l,height:a,style:s,loading:e.eagerLoad?"eager":"lazy",decoding:"async",onError:e=>{console.warn("Logo Soup: failed to load image",r),e.currentTarget.remove()}}),u=c.link||"";return u?(0,t.jsx)("a",{href:u,rel:"noopener noreferrer",children:d}):d}};return e.backgroundColor&&(r.backgroundColor=e.backgroundColor),r}new Set("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkgrey,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkslategrey,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dimgrey,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,grey,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgray,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightslategrey,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,rebeccapurple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,slategrey,snow,springgreen,steelblue,tan,teal,thistle,tomato,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","));const T=new WeakMap,F=new WeakSet,I=new WeakSet,q="logoSliderAutoscroll",O="cb-logo-soup-hydrating",j=[0,100,500,1500,3e3],D="[Logo Soup]";function N(){if("undefined"==typeof window)return!1;if(!0===window.CB_LOGO_SOUP_DEBUG)return!0;try{if("1"===window.localStorage.getItem("cb-logo-soup-debug"))return!0}catch(e){}try{return"1"===new URLSearchParams(window.location.search).get("cb_logo_soup_debug")}catch(e){return!1}}function W(...e){N()&&console.log(D,...e)}function _(...e){N()&&console.error(D,...e)}function H(){const e=window.innerWidth;return e<480?.4:e<768?.5:e<992?.7:.9}function $(e){const t=e.firstElementChild;return t instanceof HTMLElement?t:null}function P(e){return function(e){return"1"===e.dataset[q]}(e)||e.classList.contains("is-initialized")}function J(o,n){if(F.has(o))return;F.add(o);const r=o.getAttribute("data-cb-logo-soup");if(!r)return;let i;try{i=JSON.parse(r)}catch(e){return void _("mountCarouselReference JSON parse failed",{groupId:n,error:e instanceof Error?e.message:String(e)})}const l=U({...i,eagerLoad:!0});if(!l)return;const a=Array.from(document.querySelectorAll(`[data-cb-logo-soup-slide][data-cb-logo-soup-carousel="${n}"]`));if(!a.length)return void W("mountCarouselReference: no slides",{groupId:n});const s=Array.isArray(i.logos)?i.logos.length:0;W("mountCarouselReference",{groupId:n,slideCount:a.length,configLogoCount:s}),o.replaceChildren(),(0,e.createRoot)(o).render((0,t.jsx)(R,{...l}));const c=o.closest("[data-cb-logo-soup-splide]")||document.querySelector(`[data-cb-logo-soup-carousel="${n}"][data-cb-logo-soup-splide]`);c&&c.classList.add(O);const d=()=>{const e=$(o),t=e?Array.from(e.children).filter(e=>e.querySelector("img")||e.matches("img, a")):[];a.forEach((e,o)=>{const n=t[o];n&&!e.children.length&&e.appendChild(n.cloneNode(!0))});const r=a.filter(e=>e.children.length>0).length,i=t.length>=a.length&&a.every(e=>e.children.length>0);return W("distribute",{groupId:n,logoNodes:t.length,slides:a.length,filled:r,complete:i}),{filled:r,complete:i,logoNodes:t.length}};let u=!1,g=!1,h=null,f=null,p=null;const m=()=>{c&&c.splide&&(p&&window.clearTimeout(p),p=window.setTimeout(()=>{p=null;try{c.splide.refresh(),W("splide refresh after progressive fill",{groupId:n})}catch(e){_("splide refresh failed",{groupId:n,error:e instanceof Error?e.message:String(e)})}},150))},y=e=>{const t=Math.min(3,a.length);u||e.filled<t||(W("completeHydration (early start)",{groupId:n,filled:e.filled,minSli
1des:t}),u=!0,(()=>{if(!c||I.has(c))return;const e=function(e){return"undefined"!=typeof window&&window.__rapidsosLogoSliderFix&&document.getElementById("rapidsos-logo-slider-fix-js")&&!e.closest(".brxe-slider-nested")}(c);W("rapidsosAutoscrollOwnsSplide",{groupId:n,owns:e,snippetScriptPresent:!!document.getElementById("rapidsos-logo-slider-fix-js"),fixFlagPresent:!!window.__rapidsosLogoSliderFix}),e?function(e){W("scheduleStandaloneSplideFallback",{retries:j}),j.forEach(t=>{window.setTimeout(()=>{e.isConnected&&!P(e)?(W("standalone Splide fallback retry",{delay:t}),X(e)):W("standalone Splide fallback retry skipped",{delay:t,connected:e.isConnected,initialized:P(e)})},t)})}(c):X(c),I.add(c),c.dispatchEvent(new CustomEvent("cb-logo-soup-hydrated",{bubbles:!0})),W("cb-logo-soup-hydrated fired",{groupId:n})})())},b=()=>{if(g)return;const e=d();0!==e.filled&&(y(e),e.complete&&(W("completeHydration (all slides)",{groupId:n}),g=!0,f&&(window.clearTimeout(f),f=null),h&&(h.disconnect(),h=null),u&&m()))},w=()=>{if(g)return!0;const e=d();return 0===e.filled&&0===e.logoNodes?((t=$(o))&&t.querySelectorAll("img").forEach(e=>{e.complete||(e.addEventListener("load",w,{once:!0}),e.addEventListener("error",w,{once:!0}))}),!1):(y(e),e.complete?(b(),!0):(u&&m(),!1));var t};h=new MutationObserver(()=>{w()}),h.observe(o,{childList:!0,subtree:!0}),f=window.setTimeout(()=>{W("fail-open timeout",{groupId:n,ms:800}),b()},800),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{w()})})}function X(e){const t=window.splide&&window.splide.Extensions?window.splide.Extensions:void 0,o="undefined"!=typeof Splide,n=!(!t||!t.AutoScroll);if(e.closest(".brxe-slider-nested"))return W("maybeInitStandaloneSplide skipped (nested slider)",{splideAvailable:o,hasAutoScroll:n}),!1;if(!o)return W("maybeInitStandaloneSplide: Splide unavailable",{hasAutoScroll:n}),!1;if(P(e))return W("maybeInitStandaloneSplide: already initialized",{hasAutoScroll:n}),!0;if(e.splide&&"function"==typeof e.splide.destroy){try{e.splide.destroy()}catch(e){_("splide destroy failed",{error:e instanceof Error?e.message:String(e)})}e.splide=null,e.classList.remove("is-initialized","is-active")}const r={type:"loop",direction:"ltr",height:"auto",gap:"0px",autoWidth:!0,drag:"free",arrows:!1,pagination:!1,keyboard:!1,autoplay:!1};t&&t.AutoScroll&&(r.autoScroll={speed:H(),pauseOnHover:!1,pauseOnFocus:!1,autoStart:!0}),e.dataset[q]="1",e.setAttribute("data-splide",JSON.stringify(r));const i=new Splide(e,r);i.mount(t||void 0),e.splide=i;const l=e.querySelector(".splide__list");return l&&(l.style.transition="none"),e.classList.remove(O),W("maybeInitStandaloneSplide: mounted",{splideAvailable:o,hasAutoScroll:n,mounted:!0}),!0}function G(){const o=document.querySelectorAll("[data-cb-logo-soup]"),n=document.querySelectorAll("[data-cb-logo-soup-ref]");W("init",{stripCount:o.length,carouselRefCount:n.length}),o.forEach(o=>{o.hasAttribute("data-cb-logo-soup-ref")||function(o){if(T.has(o))return;const n=o.getAttribute("data-cb-logo-soup");if(!n)return;let r;try{r=JSON.parse(n)}catch(e){return void _("mountLogoSoup JSON parse failed",{error:e instanceof Error?e.message:String(e)})}const i=U(r);if(!i)return;o.replaceChildren();const l=(0,e.createRoot)(o);l.render((0,t.jsx)(R,{...i})),T.set(o,l)}(o)}),function(){const e=document.querySelectorAll("[data-cb-logo-soup-ref]");W("carousel groups found",e.length),e.forEach(e=>{const t=e.getAttribute("data-cb-logo-soup-ref");t&&J(e,t)})}()}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",G):G()})();
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.