PageSourceSearch

https://www.udinese.com.br/etc.clientlibs/americas-onecms/clientli…-fc9601ce9df7cc99b3791d7b6a6f5e9b-lc.min.js

js udinese.com.br collected 2026-10-06 04:42:10 UTC 146,608 bytes, 220 lines download raw bytes

1(function (document, window) {
2        "use strict";function dt(e,s=300){let n;return(...i)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,i)},s)}}const $e=(e,s)=>e&&s&&s.startsWith("/")?e+s:s,Xe=e=>{try{return JSON.parse(decodeURIComponent(escape(atob(e))).replace(/\n/g,""))}catch{return console.warn("Failed decoding Base64 -> UTF8. Base64 string: ",e),null}},je=e=>e&&typeof e=="string"?e.trim().toLowerCase()==="true"||e.trim()==="1":!!e,at=()=>{const e=document.querySelector('meta[name="siteConfigDetails"]'),s=e&&e.hasAttribute("content")?e.getAttribute("content"):"";return Xe(s||"")||{}},He=()=>{const e=at();return e.siteConfigDetails?e.siteConfigDetails:e};He();const Ye=at(),ve=()=>{const e=He();return je(e.pushClickEvents)},nt=()=>He().path||"",ut=e=>{const s=document.querySelector(`meta[name="${e}"]`);return(s&&s.hasAttribute("content")?s.getAttribute("content"):"")??""},ze=Xe(ut("login-details")),ht=()=>{var e;return ze!=null&&ze.storeName?ze.storeName:(e=He())!=null&&e.brandName?He().brandName:""};je(Ye.author);je(Ye.publish);const mt=je(Ye.domain);ht();const De=({path:e,size:s="15",fill:n="#1A1A1A",name:i="",hide:d=void 0,viewBox:t="",handleClick:a,withoutSpan:l=!1,appendAnchorLinkClass:o=!0})=>{const u=document.createElement("span");u.classList.add("arrow-icon-container"),o&&u.classList.add("anchor-link");const r=document.createElementNS("http://www.w3.org/2000/svg","svg"),c=typeof e=="string"?[e]:e,L=[];return typeof e=="string"?L.push(document.createElementNS("http://www.w3.org/2000/svg","path")):e.forEach(w=>L.push(document.createElementNS("http://www.w3.org/2000/svg","path"))),r.setAttribute("width",`${s}`),r.setAttribute("height",`${s}`),r.setAttribute("fill",`${n}`),c.forEach((w,g)=>L[g].setAttribute("d",`${w}`)),i&&r.setAttribute("svg-name",`${i}`),(d===!0||d===!1)&&r.setAttribute("class",`${d?"hide":"show"}`),t&&r.setAttribute("viewBox",`${t}
2`),a&&r.addEventListener("click",a),L.forEach(w=>r.appendChild(w)),l?r:(u.appendChild(r),u)},Oe=e=>e,ot=["®","™","©","℠","°"],Ue=new RegExp(`(${ot.join("|")})`,"g"),st=e=>e?e.replace(Ue,s=>ot.indexOf(s)!==-1?`<sup>${s}</sup>`:s):"",rt="/bin/elasticsearch/search",pt="/libs/granite/csrf/token.json";if(!mt)try{const e=new XMLHttpRequest;if(e.open("GET",pt,!1),e.setRequestHeader("credentials","include"),e.send(),e.status===200){const s=JSON.parse(e.responseText);sessionStorage.setItem("servletApiAdditionalHeaderParams",JSON.stringify({"CSRF-Token":(s==null?void 0:s.token)||""}))}}catch(e){console.log(e.message)}const gt=[".rte-wrapper",".onecms-plp-description",".breadcrumb-item",".onecms-sub-banner-text",".pre-title",".title",".card-title-text",".card-text",".card-title",".item-text",".item-description"],Je="superscriptProcessed",ft=e=>{const s=e.textContent??"";if(Ue.lastIndex=0,!Ue.test(s))return;Ue.lastIndex=0;const n=document.createDocumentFragment();let i=0,d;for(;(d=Ue.exec(s))!==null;){const[t]=d,a=d.index;a>i&&n.appendChild(document.createTextNode(s.slice(i,a)));const l=document.createElement("sup");l.className="symbol",l.textContent=t,n.appendChild(l),i=a+t.length,t.length===0&&Ue.lastIndex++}i<s.length&&n.appendChild(document.createTextNode(s.slice(i))),e.replaceWith(n)},wt=e=>{if(e.closest(`[data-${Je}="true"]`))return;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:d=>{const t=d.parentElement;return!t||t.closest("sup")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),n=[];let i;for(;i=s.nextNode();)n.push(i);n.forEach(ft),e.dataset[Je]="true"},_e=(e=gt)=>{e.forEach(s=>{document.querySelectorAll(s).forEach(n=>{n.dataset[Je]||wt(n)})})},it=()=>{_e(),new MutationObserver(s=>{s.some(i=>Array.from(i.addedNodes).some(d=>{var t;return d.nodeType===Node.ELEMENT_NODE&&!((t=d.closest)!=null&&t.call(d,`[data-${Je}="true"]`))}))&&_e()}).observe(document.body,{childList:!0,subtree:!0})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",it):it();(()=>{document.addEventListener("DOMContentLoaded",function(){var t=e(),d=document.querySelector(".onecms-breadcrumb-container"),t=d!=null&&d.hasAttribute("data-enableFloat")?t:0;if(d){d.style.top=t+"px";var a=document==null?void 0:document.querySelector("header"),l=a==null?void 0:a.hasAttribute("data-float");if(a!=null&&a.classList.contains("onecms-cmp-header-global")){var o=l;o&&(d.style.top=(a==null?void 0:a.offsetHeight)+"px",d.style.position="absolute"),d.style.paddingLeft="1.5rem"}}d!=null&&d.hasAttribute("data-enableFloat")&&d.classList.add("floatBreadcrumbs");var u=d==null?void 0:d.getElementsByClassName("breadcrumb-item");(u==null?void 0:u.length)>0&&s(u)});const e=()=>{const d=document.querySelector("header");return d==null?void 0:d.offsetHeight},s=d=>{var t=i();if(t=="SCREEN_SIZES_MOBILE"&&d)for(var a=n(d),l=0;l<d.length;l++)l>=a.length&&d[l].classList.add("hide");else for(var l=0;l<d.length;l++)d[l].classList.remove("hide")},n=d=>{var t=i();if(t==="SCREEN_SIZES_MOBILE"&&d.length>2)return Array.from(d).slice(Math.max(d.length-3),-1)};function i(){return window.matchMedia("(max-width: 767px)").matches?"SCREEN_SIZES_MOBILE":window.matchMedia("(min-width: 768px) and (max-width: 1200px)").matches?"SCREEN_SIZES_TAB":"SCREEN_SIZES.DESKTOP"}window.addEventListener("resize",function(d){var t=document.querySelector(".onecms-breadcrumb-container"),a=t==null?void 0:t.getElementsByClassName("breadcrumb-item");(a==null?void 0:a.length)>0&&s(a)},!0),_e([".breadcrumb-item"])})();document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".onecms-cards").forEach(s=>{const n=s.querySelectorAll(".card-row .card-column");n==null||n.forEach(i=>{var l,o;const d=i.querySelector(".support_card_plp");d&&(window.addEventListener("resize",()=>{window.matchMedia("(max-width: 767px)").matches&&d?(d.classList.add("mobile-view"),d.querySelector(".card-icon").classList.add("hideIcon")):d&&(d.classList.remove("mobile-view"),d.querySelector(".card-icon").classList.remove("hideIcon"))}),window.matchMedia("(max-width: 767px)").matches&&d&&(d.classList.add("mobile-view"),d.querySelector(".card-icon").classList.add("hideIcon")));const t=(l=i.querySelector(".card-component-container.image_as_background"))==null?void 0:l.getAttribute("data-imageUrl"),a=i.querySelector(".card-component-container.image_as_background .anchor-link .card");
2if(a&&(a.style.backgroundImage=`url('${t}')`),((o=i.getAttribute("data-isPlpSupport"))==null?void 0:o.toString())==="support_card_plp"){s.querySelector(".card-row").classList.add("flex-column");return}})})});document.addEventListener("DOMContentLoaded",()=>{var f,y;const e=document.querySelector(".onecms-tabs.container");let s=!0,n=null;const i=(e==null?void 0:e.getAttribute("cmp-data"))!==void 0&&JSON.parse(e==null?void 0:e.getAttribute("cmp-data")).tabsOptions,d=e==null?void 0:e.querySelectorAll("li");(i==null?void 0:i.length)>0&&(i==null||i.forEach((v,T)=>{d[T].addEventListener("click",()=>{var U;ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",d[T],d[T].innerText),s=!1,n&&clearTimeout(n),n=setTimeout(()=>{s=!0},1e3),L(v==null?void 0:v.target),c(v==null?void 0:v.id);const z=(U=document.getElementById(v==null?void 0:v.id))==null?void 0:U.querySelector("onecms-product-specifications");z&&z.setAttribute("selectedTab",v==null?void 0:v.target),document.getElementById(v==null?void 0:v.id).scrollIntoView({behavior:"smooth",block:"start"})}),T===0&&d[T].classList.add("active")}));let t,a,l=!1,o=!1,u=!1;window.addEventListener("load",()=>{o=!0}),setTimeout(()=>u=!0,1e3),i&&(t=(f=i[0])==null?void 0:f.id,a=(y=i[0])==null?void 0:y.target);let r;function c(v){var T;if(o&&u)t=v,r=document.getElementById(t),L((T=r.querySelector("onecms-product-specifications"))==null?void 0:T.getAttribute("selectedTab")),d==null||d.forEach(z=>{var U,C;((U=z.getAttribute("data-onecmstabsid"))==null?void 0:U.toString())===t?z.hasAttribute("data-onecmstabstarget")?((C=z.getAttribute("data-onecmstabstarget"))==null?void 0:C.toString())===a?z.classList.add("active"):z.classList.remove("active"):z.classList.add("active"):z.classList.remove("active")});else return}function L(v){a=v}function w(v){const T=v==null?void 0:v.getBoundingClientRect(),z=window.innerHeight||document.documentElement.clientHeight;return{y:Math.max(T==null?void 0:T.top,0),height:Math.min(T==null?void 0:T.bottom,z)-Math.max(T==null?void 0:T.top,0)}}function g(v){var T,z;if(s){let U=null;for(let C=0;C<v.length;C++)if(v[C].isIntersecting&&v[C].intersectionRatio>.24&&!(v[C].intersectionRect.top>v[C].boundingClientRect.top)){let P=w(r);if(!(P.height/window.innerHeight>.5)){if(v[C].intersectionRatio===1){U=v[C].target;break}else if(v[C].intersectionRect.top>0&&!(!((P==null?void 0:P.y)>(r==null?void 0:r.getBoundingClientRect().y))&&(P==null?void 0:P.height)>(r==null?void 0:r.getBoundingClientRect().height)*.24)){U=v[C].target;break}}}if(!U)for(let C=0;C<v.length;C++){let P=w(r);if(v[C].intersectionRect.height/window.innerHeight>.5){U=v[C].target;break}else{const R=(T=v[C].target.querySelector("onecms-product-specifications"))==null?void 0:T.getAttribute("selectedTab"),j=i==null?void 0:i.filter(M=>(M==null?void 0:M.target)===R);if(j!=null&&j.length){if(!(v[C].boundingClientRect.top<0)&&v[C].isIntersecting&&!(!((P==null?void 0:P.y)>(r==null?void 0:r.getBoundingClientRect().y))&&(P==null?void 0:P.height)>(r==null?void 0:r.getBoundingClientRect().height)*.24)){const M=(z=v[C].target.querySelector("onecms-product-specifications"))==null?void 0:z.getAttribute("selectedTab"),ne=i==null?void 0:i.filter($=>($==null?void 0:$.target)===M);if(!(ne!=null&&ne.length)){U=v[C].target;break}}}else{U=v[C].target;break}}}U!=null&&U.id&&c(U.id)}}const h=new IntersectionObserver(g,{root:null,threshold:[0,.2,.25,.3,.35,.5,.7,.8,.9,1]});Array.isArray(i)&&(i==null||i.forEach(v=>{h.observe(document.getElementById(v==null?void 0:v.id))}));const b=document.querySelector("onecms-product-specifications"),x=v=>{var T;if(!l){l=!0;return}for(let z of v)z.type==="attributes"&&z.attributeName==="selectedtab"&&(s=!1,n&&clearTimeout(n),n=setTimeout(()=>{s=!0},1e3),b==null||b.closest("[id]").scrollIntoView({behavior:"smooth",block:"start"}),L(z.target.getAttribute("selectedtab")),c((T=b.closest("[id]"))==null?void 0:T.id))},O=new MutationObserver(x);b&&O.observe(b,{attributes:!0,attributeFilter:["selectedtab"]})});document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector(".footerContainer"),s=e==null?void 0:e.querySelectorAll(".title-container");
2s==null||s.forEach(i=>{i.addEventListener("click",()=>{d(i)});function d(t){if(t.classList.contains("active"))t.classList.remove("active"),t.closest("div").nextElementSibling.classList.remove("show");else{t.classList.add("active");const a=t.closest("div").nextElementSibling;a.classList.contains("collapse")&&a.classList.add("show")}n(t)}});function n(i){s.forEach(d=>{d.classList.contains("active")&&d!=i&&(d.classList.remove("active"),d.closest("div").nextElementSibling.classList.remove("show"))})}});const yt=e=>e==="includeAll"?"all":e==="includeAny"?"any":"none";class ct{constructor(s,n,i,d,t,a=!1,l={}){this.getElasticDefaultFilters=o=>{let u=[];return o.forEach(r=>{r.filter&&r.filterValue&&r.filterValue.length&&u.push({[yt(r.includeType)]:[{[r.filter]:r.filter!=="pageTypeRank"?r.filterValue:r.filterValue.map(c=>Number(c))}]})}),u},this.getQueryParamsElasticSearchAsset=()=>{var u,r,c,L,w;let o={query:this.searchData.query,componentType:"asset",path:nt(),filters:{all:[{all:[{primaryType:[((r=(u=this.searchData)==null?void 0:u.filterMappings)==null?void 0:r.asset)??"dam:Asset"]}]}]},page:{size:this.searchData.initialAsset,current:((c=this.searchData)==null?void 0:c.page)||1}};return(L=this.searchData)!=null&&L.sort&&(o.sort={title:(w=this.searchData)==null?void 0:w.sort}),this.defaultElasticFilters.damFilters.length&&o.filters.all&&o.filters.all.push(...this.getElasticDefaultFilters(this.defaultElasticFilters.damFilters)),JSON.stringify(o)},this.getQueryParamsElasticSearchPage=()=>{var u,r,c,L,w,g;let o={query:this.searchData.query,componentType:"site",path:nt(),filters:{all:[{all:[{primaryType:[((r=(u=this.searchData)==null?void 0:u.filterMappings)==null?void 0:r.site)??"cq:Page"]}]}]},page:{size:this.searchData.initialSite,current:((c=this.searchData)==null?void 0:c.page)||1}};return je((L=this.searchData)==null?void 0:L.productFirst)&&(o.boosts={pageType:[{type:"value",value:"Product Family",factor:3},{type:"value",value:"Web Category",factor:2},{type:"value",value:"None",factor:1}]},o.sort=[...o.sort??[],{pageTypeRank:"asc"}],this.includeScoreSortInElasticQuery&&(o.sort=[...o.sort??[],{_score:"desc"}])),(w=this.searchData)!=null&&w.sort&&(o.sort=[...o.sort??[],{title:(g=this.searchData)==null?void 0:g.sort}]),this.defaultElasticFilters.sitePageFilters.length&&o.filters.all&&o.filters.all.push(...this.getElasticDefaultFilters(this.defaultElasticFilters.sitePageFilters)),JSON.stringify(o)},this.getQueryParams=o=>{const u=r=>{const c=typeof this.defaultRawQueryFields=="string"?JSON.parse(this.defaultRawQueryFields):this.defaultRawQueryFields,L=typeof r=="string"?JSON.parse(r||"{}"):r||{};return JSON.stringify({...L,...c})};if(this.enableElasticSearch){if(o==="dam")return this.damSearchBool=!0,this.getQueryParamsElasticSearchAsset();{this.damSearchBool=!1;let r=this.getQueryParamsElasticSearchPage();
2return this.defaultSearch?u(r):r}}},this.isAllElasticCallExecuted=0,this.searchData={},this.searchRequest={},this.loading=!1,this.response=void 0,this.fileResponse=void 0,this.error=void 0,this.displayHandler=t,this.damSearchBool=!1,this.enableElasticSearch=s,this.elasticType=n,this.includeScoreSortInElasticQuery=d??!1,this.defaultElasticFilters=i,this.defaultSearch=a,this.defaultRawQueryFields=l}async searchElasticApi(s){try{const n=await fetch(rt,{method:"POST",headers:{"Content-Type":"application/json",...JSON.parse(sessionStorage.getItem("servletApiAdditionalHeaderParams")||"{}")},body:this.getQueryParams(s),signal:this.controller.signal});if(n.status===200){this.isAllElasticCallExecuted=this.isAllElasticCallExecuted+1;const i=await n.json();i&&i.results?this.damSearchBool?this.elasticType==="both"?this.response=[...this.fileResponse||[],i]:this.response=[i]:this.elasticType==="site"?this.response=[i]:this.fileResponse=[i]:(console.error("Invalid response data:",i),this.response=void 0),this.error=void 0,this.elasticType!=="both"&&(this.loading=!1),this.searchRequest={...this.searchData,query:this.searchData.query},this.elasticType==="both"&&this.isAllElasticCallExecuted===2&&(this.loading=!1),this.displayHandler()}else{this.isAllElasticCallExecuted=this.isAllElasticCallExecuted+1;const i=[...this.fileResponse||[],...this.response||[]];let d=!i.length;this.elasticType!=="both"||d?(this.response=void 0,this.error=n.statusText):this.response=i,this.loading=!1,this.searchRequest={...this.searchData,query:this.searchData.query},this.displayHandler()}}catch(n){console.log(n.message),this.isAllElasticCallExecuted=this.isAllElasticCallExecuted+1;const i=[...this.fileResponse||[],...this.response||[]];let d=!i.length;this.elasticType!=="both"||d?(this.response=void 0,this.error=n):this.response=i,this.loading=!1,this.searchRequest={...this.searchData,query:this.searchData.query},this.displayHandler()}}async search(){this.loading=!0,this.response=void 0,this.displayHandler(),this.controller=new AbortController,this.enableElasticSearch&&((this.elasticType==="site"||this.elasticType==="both")&&await this.searchElasticApi("page"),(this.elasticType==="asset"||this.elasticType==="both")&&await this.searchElasticApi("dam"))}updateSearchRequest(s){var n;this.searchData=s,this.enableElasticSearch&&(n=this.searchData)!=null&&n.searchType&&(this.elasticType=this.searchData.searchType),this.controller&&this.controller.abort(),this.isAllElasticCallExecuted=0,this.search()}}const bt="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z",Lt=["M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z","M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"],vt=()=>{let e;return e=document==null?void 0:document.querySelector(".onecms-cmp-header"),e||(e=document==null?void 0:document.querySelector(".onecms-cmp-header-global")),e};class Et{constructor(s){var n,i,d;this.initialQueryObject={query:"",c:"",pageSize:5},this.elasticSearchBool=((n=document.getElementsByTagName("header")[0])==null?void 0:n.getAttribute("data-enableelasticsearch"))==="true",this.highlightedText=(t="",a="")=>{let l=[];a.includes(")")?l=t.split(new RegExp(`(${a.replaceAll(")","")})`,"gi")):a.includes("(")?l=t.split(new RegExp(`(${a.replaceAll("(","")})`,"gi")):l=t.split(new RegExp(`(${a})`,"gi"));const o=document.createElement("span");return l.forEach((u,r)=>{if(u.toLowerCase()===a.toLowerCase()){const c=document.createElement("span");c.id="highlight",c.classList.add("highlight"),c.innerText=u,o.appendChild(c)}else if(u){const c=document.createElement("span");c.id="part",c.innerText=u,o.appendChild(c)}}),o},this.renderResults=(t,a,l,o,u,r)=>{const{displayViewAllCTA:c=!1,searchRequest:L,ctaTarget:w="_blank",onClose:g,enableElasticSearch:h}=t,b=document.createElement("div");b.classList.add("result-category"),b.classList.add("category-title");const x=document.createElement("ul");x.classList.add("result-lists");const O=f=>{var y,v,T,z,U;return(y=f==null?void 0:f.titleResults)!=null&&y.raw?((v=f==null?void 0:f.titleResults)==null?void 0:v.raw)||"":(T=f==null?void 0:f.pageTitle)!=null&&T.raw?((z=f==null?void 0:f.pageTitle)==null?void 0:z.raw)||"":((U=f==null?void 0:f.title)==null?void 0:U.raw)||""};if(h){if((a==null?void 0:a.length)>0){if(u&&this.globalSearch.componentType==="both"){const f=document.createElement("div");f.innerText=u,b.appendChild(f),f.classList.add("global-search-title")}
2a.forEach((f,y)=>{var z;const v=document.createElement("li");v.id=y.toString();const T=document.createElement("a");T.href=$e(this.globalSearch.serverName,f.url.raw),T.setAttribute("data-config-metrics-item",O(f)),!((z=f.url.raw)!=null&&z.startsWith("/"))&&window.location.origin!==new window.URL(f.url.raw).origin?T.target=this.globalSearch.target?this.globalSearch.target:"_blank":T.target=this.globalSearch.target?this.globalSearch.target:"_self",T.addEventListener("click",()=>g&&g()),T.appendChild(this.highlightedText(O(f),L.query)),v.appendChild(T),x.appendChild(v)})}}else o.forEach((f,y)=>{const v=document.createElement("li");v.id=y.toString();const T=document.createElement("a");T.href=f.url,T["data-config-metrics-item"]=f.title||"",window.location.origin!==new window.URL(f.url).origin?T.target=this.globalSearch.target?this.globalSearch.target:"_blank":T.target=this.globalSearch.target?this.globalSearch.target:"_self",T.addEventListener("click",()=>g&&g()),T.appendChild(this.highlightedText(f.title,L.query)),v.appendChild(T),x.appendChild(v)});if(b.appendChild(x),l.appendChild(b),je(c)&&r){const f=document.createElement("button");f.classList.add("onecms-button","base-btn","secondary-btn","small-btn"),f.addEventListener("click",y=>{y.preventDefault(),this.redirectToViewAll()}),f.innerText=this.globalSearch.viewAllButtonText,l.appendChild(f)}},this.renderAutoSuggestDropdown=t=>{var b,x,O,f;const{isLoading:a,searchResult:l,searchRequest:o,noResultFoundText:u,loadingResultsText:r,enableElasticSearch:c}=t;let L,w;c&&((b=l[0])!=null&&b.length&&(L=l[0].map(y=>{let v=y.url.raw;if(y.pageType&&y.pageType.raw==="Product Family"&&y.skuList&&y.skuList.raw.includes(o.query)){const T=o.query;v+=`#${T}`}return{title:y.title,pageSeoTitle:y==null?void 0:y.pageSeoTitle,pageTitle:y.pageTitle,titleResults:y==null?void 0:y[this.globalSearch.titleOnResults],url:{raw:v},description:y.description,image:y.image,pageType:y.pageType,primaryType:y.primaryType,skus:y.skuList,id:y.id}})),(x=l[1])!=null&&x.length&&(w=l[1].map(y=>{let v=y.url.raw;if(y.pageType&&y.pageType.raw==="Product Family"&&y.skuList&&y.skuList.raw.includes(o.query)){const T=o.query;v+=`#${T}`}return{title:y.title,pageSeoTitle:y==null?void 0:y.pageSeoTitle,pageTitle:y.pageTitle,titleResults:y==null?void 0:y[this.globalSearch.titleOnResults],url:{raw:v},description:y.description,image:y.image,pageType:y.pageType,primaryType:y.primaryType,skus:y.skuList,id:y.id}}))),this.removeAutoSuggestionDropdown();const g=document.querySelector(".global-search-container"),h=document.createElement("div");if(h.id="auto-suggest-container",h.classList.add("search-results-container"),l&&Array.isArray(l)&&(((O=l[0])==null?void 0:O.length)>0||((f=l[1])==null?void 0:f.length)>0)||!c&&l&&l.length>0)L||w?(L&&this.renderResults(t,L,h,l[0],c&&L[0].primaryType.raw==="dam:Asset"?this.globalSearch.filterTitleForAsset:this.globalSearch.filterTitleForSite,!(L&&w)),w&&this.renderResults(t,w,h,l[1],this.globalSearch.filterTitleForAsset,!0)):this.renderResults(t,L,h,l,c&&L[0].primaryType.raw==="dam:Asset"?this.globalSearch.filterTitleForAsset:this.globalSearch.filterTitleForSite,!0);else{const y=document.createElement("div");a?y.innerText=r||"Loading results":y.innerText=decodeURIComponent(escape(u))||"No results found",h.appendChild(y)}g.appendChild(h),_e(["#part","#highlight"])},this.displayCancelIcon=()=>{document.getElementById(this.parentId).querySelector("svg[svg-name='search']").classList.remove("show"),document.getElementById(this.parentId).querySelector("svg[svg-name='search']").classList.add("hide"),document.getElementById(this.parentId).querySelector("svg[svg-name='cancel']").classList.remove("hide"),document.getElementById(this.parentId).querySelector("svg[svg-name='cancel']").classList.add("show")},this.displaySearchIcon=()=>{document.getElementById(this.parentId).querySelector("svg[svg-name='search']").classList.remove("hide"),document.getElementById(this.parentId).querySelector("svg[svg-name='search']").classList.add("show"),document.getElementById(this.parentId).querySelector("svg[svg-name='cancel']").classList.remove("show"),document.getElementById(this.parentId).querySelector("svg[svg-name='cancel']").classList.add("hide")},this.toggleLogo=t=>{var u;if(!window.matchMedia("(max-width: 767px)").matches)return;const a=document.querySelector(".brand-logo"),l=document.querySelector(".user-cart"),o=(u=document.getElementById(this.parentId))==null?void 0:u.closest(".
2navigation");!a&&!l&&!o||(t?setTimeout(()=>{a.style.opacity="1",a.style.padding="16px",a.style.pointerEvents="auto",o.style.gridTemplateColumns="auto 1fr auto"},300):(a.style.padding="0",a.style.opacity="0",a.style.pointerEvents="none",o.style.gridTemplateColumns="1fr 0 1fr"))},this.setExpandedClass=()=>{const t=document.getElementById(this.parentId).querySelector(".global-search-container"),a=document.getElementById(this.parentId).querySelector(".input-container-flex input");t.classList.contains("expanded")||t.classList.add("expanded"),a.classList.contains("input-expanded")||a.classList.add("input-expanded"),this.toggleLogo(!1)},this.redirectToViewAll=()=>{const t=vt(),a=(t==null?void 0:t.getAttribute("data-servername"))||"";window.open(a?a+this.getViewAllPagePath():this.getViewAllPagePath(),"_self")},this.handleEnterKey=t=>{const a=this.userSearchInput;t.key!=="Enter"||!a||a.length<this.globalSearch.inputLength||(t.preventDefault(),this.redirectToViewAll())},this.enterKeyEvent=()=>{var a;const t=(a=document.getElementById(this.parentId))==null?void 0:a.querySelector(".input-container-flex input");t&&(t.removeEventListener("keydown",this.handleEnterKey),t.addEventListener("keydown",this.handleEnterKey))},this.removeExpandClass=()=>{const t=document.getElementById(this.parentId).querySelector(".global-search-container"),a=document.getElementById(this.parentId).querySelector(".input-container-flex input");t.classList.contains("expanded")&&t.classList.remove("expanded"),a.classList.contains("input-expanded")&&a.classList.remove("input-expanded"),this.toggleLogo(!0)},this.removeAutoSuggestionDropdown=()=>{var t,a;(a=(t=document.getElementById(this.parentId))==null?void 0:t.querySelector("#auto-suggest-container"))==null||a.remove()},this.searchTermHandler=t=>{this.showAutoSuggestion=!1,this.searchResult=void 0;const a=t.target.value;this.userSearchInput=a,this.removeAutoSuggestionDropdown(),this.invokeDebounce(this.userSearchInput)},this.invokeDebounce=dt(t=>{this.submitSearch()},1e3),this.getViewAllPagePath=()=>{var o;if(!this.globalSearch.viewAllURL||this.globalSearch.viewAllURL.length<1)return"";const t=(o=this.globalSearch.viewAllURL)==null?void 0:o.split("?");let a={};t[1]&&(a=Object.fromEntries(new URLSearchParams(t[1]))),a.query=this.userSearchInput;const l=t[0]+"?"+new URLSearchParams(a).toString();return $e(this.globalSearch.serverName,l)},this.submitSearch=()=>{var t,a;this.userSearchInput.length>=this.globalSearch.inputLength?this.useSearchApi.updateSearchRequest({...this.initialQueryObject,query:this.userSearchInput,pageSize:this.globalSearch.maxSuggestions,initialAsset:((t=this.globalSearch)==null?void 0:t.componentType)==="both"?Math.floor(this.globalSearch.maxSuggestions/2):this.globalSearch.maxSuggestions,initialSite:((a=this.globalSearch)==null?void 0:a.componentType)==="both"?Math.ceil(this.globalSearch.maxSuggestions/2):this.globalSearch.maxSuggestions,productFirst:this.globalSearch.productFirst,filterMappings:this.globalSearch.filterMappings}):(this.showAutoSuggestion=!1,this.removeAutoSuggestionDropdown())},this.render=()=>{const t=document.createElement("div");t.setAttribute("id",this.parentId),document.addEventListener("click",r=>{document.getElementById(this.parentId).contains(r.target)||(this.removeExpandClass(),this.removeAutoSuggestionDropdown(),this.showAutoSuggestion=!1,this.displaySearchIcon(),this.userSearchInput="",document.getElementById(this.parentId).querySelector("input").value="")}),t.classList.add("search");const a=document.createElement("div");a.classList.add("global-search-container"),this.globalSearch.componentTitle&&a.setAttribute("data-metrics-config-group",this.globalSearch.componentTitle);const l=document.createElement("div");l.classList.add("input-container-flex");const o=document.createElement("input");o.classList.add("input"),o.setAttribute("aria-label","global search"),o.type="text",o.value=this.userSearchInput,o.addEventListener("keyup",r=>{this.searchTermHandler(r),this.displayCancelIcon()}),o.addEventListener("focus",()=>{this.expandSearch||(this.expandSearch=!0),this.setExpandedClass(),this.displayCancelIcon(),this.enterKeyEvent()}),o.placeholder=this.globalSearch.placeholder;const u=document.createElement("span");return u.classList.add("search-icon-container"),u.setAttribute("data-config-metrics-item","global search"),u.appendChild(De({path:bt,size:"15",fill:"rgb(2
26, 26, 26)",name:"search",hide:!1,viewBox:"0 0 16 16",handleClick:r=>{r.stopPropagation(),r.preventDefault(),ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("button_click","button click",u.closest("[data-config-metrics-item]"),"search"),this.expandSearch=!0,this.setExpandedClass(),document.getElementById(this.parentId).querySelector("input").focus(),this.displayCancelIcon(),this.removeAutoSuggestionDropdown()},withoutSpan:!0})),u.appendChild(De({path:Lt,size:"15",fill:"rgb(26, 26, 26)",name:"cancel",hide:!0,viewBox:"0 0 16 16",handleClick:r=>{r.stopPropagation(),r.preventDefault(),ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("button_click","button click",u.closest("[data-config-metrics-item]"),"cancel"),this.userSearchInput="",this.removeExpandClass(),document.getElementById(this.parentId).querySelector("input").value="",this.showAutoSuggestion=!1,this.expandSearch=!1,this.removeAutoSuggestionDropdown(),this.displaySearchIcon()},withoutSpan:!0})),l.appendChild(o),l.appendChild(u),a.appendChild(l),t.appendChild(a),t},this.globalSearch=s,this.globalSearch.placeholder=s.placeholder??"Search",this.globalSearch.inputLength=s.inputLength??5,this.globalSearch.maxSuggestions=s.maxSuggestions??1,this.globalSearch.bgColor=s.bgColor??"assawhite",this.globalSearch.productFirst=je(s.productFirst),this.globalSearch.viewAllButtonText=s.viewAllButtonText??"View All",this.globalSearch.componentType=s==null?void 0:s.componentType,this.globalSearch.filterTitleForAsset=s==null?void 0:s.filterTitleForAsset,this.globalSearch.filterTitleForSite=s==null?void 0:s.filterTitleForSite,this.globalSearch.filterMappings=s==null?void 0:s.filterMappings,this.globalSearch.target=s==null?void 0:s.target,this.globalSearch.titleOnResults=s==null?void 0:s.titleOnResults,this.globalSearch.defaultSearch=(s==null?void 0:s.defaultSearch)??!1,this.globalSearch.defaultRawQueryFields=(s==null?void 0:s.defaultRawQueryFields)??{},this.searchResult=void 0,this.showAutoSuggestion=!1,this.userSearchInput="",this.parentId=`header-search-id-${new Date().toString()}`,this.useSearchApi=new ct(this.elasticSearchBool,this.globalSearch.componentType,{sitePageFilters:((i=this.globalSearch)==null?void 0:i.siteDefaultFilters)||[],damFilters:((d=this.globalSearch)==null?void 0:d.damDefaultFilters)||[]},!0,()=>{var t,a,l,o,u,r,c,L;this.renderAutoSuggestDropdown({isLoading:this.useSearchApi.loading,searchRequest:this.useSearchApi.searchRequest,displayViewAllCTA:this.globalSearch.showViewAllCTA||!1,noResultFoundText:this.globalSearch.noResultText,loadingResultsText:this.globalSearch.loadingResultsText,ctaTarget:"_self",searchResult:this.useSearchApi.response&&Array.isArray(this.useSearchApi.response)?(t=this.useSearchApi.response[0])!=null&&t.results||(a=this.useSearchApi.response[1])!=null&&a.results?[((l=this.useSearchApi.response[0])==null?void 0:l.results)&&((o=this.useSearchApi.response[0])==null?void 0:o.results.slice(0,this.globalSearch.maxSuggestions)),((u=this.useSearchApi.response[1])==null?void 0:u.results)&&((r=this.useSearchApi.response[1])==null?void 0:r.results.slice(0,this.globalSearch.maxSuggestions))]:[]:this.useSearchApi.response&&((c=this.useSearchApi.response)!=null&&c.results)?(L=this.useSearchApi.response)==null?void 0:L.results.slice(0,this.globalSearch.maxSuggestions):[],onClose:()=>{this.showAutoSuggestion=!1,this.removeAutoSuggestionDropdown(),this.expandSearch=!1,this.userSearchInput="",this.displaySearchIcon(),document.getElementById(this.parentId).querySelector("input").value="",this.removeExpandClass()},viewAllPagePath:this.getViewAllPagePath(),enableElasticSearch:this.useSearchApi.enableElasticSearch})},this.globalSearch.defaultSearch,this.globalSearch.defaultRawQueryFields)}}class Ct{constructor(s){var t,a,l;this.renderUserName=()=>{const o=document.createElement("span");return o.classList.add("user-name"),o.innerText=`Hello ${this.userName}!`,o},this.domain=document.querySelector("#onecms-header").hasAttribute("data-servername")?document.querySelector("#onecms-header").getAttribute("data-servername"):"",this.renderAccountDropdownList=(o,u)=>{for(const r of this.accountDropdownList){const c=document.createElement("li");if(c.id=r.name.toLocaleLowerCase().split(" ").join("-"),c.classList.add("dropdown-content-list-item"),c.addEventListener("click",L=>{const w=c.querySelector("a");r.ctaUrl&&window.open(r.ctaUrl,"_self"),ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",w,r.name)}),r.name.toLocaleLowerCase().includes("order")&&(this.isDirectUser||!this.isDirectUser&&this.userWithSaleOrders)){const L=document.createElement("a");L.href=$e(this.domain,r.ctaUrl),L.innerText=r.name,L.setAttribute("data-config-metrics-item",r.name),c.appendChild(L),u?o.insertBefore(c,o.children[o.children.length-1]):o.appendChild(c)}else if(!r.name.toLocaleLowerCase().includes("order")){const L=document.createElement("a");L.href=$e(this.domain,r.ctaUrl),L.innerText=r.name,L.setAttribute("data-config-metrics-item",r.name),c.appendChild(L),u?o.insertBefore(c,o.children[o.children.length-1]):o.appendChild(c)}}},this.renderUserAccountDesktopView=()=>{const o=document.createElement("div");o.id=this.parentId,o.classList.add("header-account-dropdown");const u=document.createElement("div");u.classList.add("dropdown-content");const r=document.createElement("ul");r.classList.add("dropdown-content-list"),this.userName&&r.appendChild(this.renderUserName()),this.isUserDetailsLoading||this.renderAccountDropdownList(r);const c=document.createElement("li");c.addEventListener("click",()=>{const w=c.querySelector("a");ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",w,"signOut"),this.signOut()});const L=document.createElement("a");return L.setAttribute("data-config-metrics-item","signOut"),L.setAttribute("tabIndex","0"),L.addEventListener("click",w=>{ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",w.target,"signOut"),w.stopPropagation(),this.signOut()}),L.addEventListener("keyup",w=>{w.stopPropagation(),w.key==="Enter"&&this.signOut()}),L.innerText="Sign Out",c.appendChild(L),r.appendChild(c),u.appendChild(r),o.appendChild(u),document.addEventListener("click",w=>{var g;
2document.getElementById(this.parentId)&&!((g=document.getElementById(this.parentId))!=null&&g.contains(w.target))&&document.getElementById(this.parentId).remove()}),o},this.parseJwt=o=>{const r=o.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),c=decodeURIComponent(atob(r).split("").map(function(L){return"%"+("00"+L.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(c)},this.getCookie=o=>{const u=o+"=",c=decodeURIComponent(document.cookie).split(";");for(let L=0;L<c.length;L++){let w=c[L];for(;w.charAt(0)==" ";)w=w.substring(1);if(w.indexOf(u)==0)return w.substring(u.length,w.length)}return""},this.setCookie=(o,u,r,c)=>{document.cookie=o+"="+u+"; path=/; samesite=lax; secure=true; expires="+r+"; domain="+c+";"},this.signIn=()=>{var r,c;const o=window.btoa(window.location.href).replace(/\+/g,"%2B"),u=window.btoa((r=this.loginConfigurationDetails)==null?void 0:r.redirectionURL);(c=this.loginConfigurationDetails)!=null&&c.loginEndpoint&&o&&(window.location.href=`${this.loginConfigurationDetails.loginEndpoint}?redirectUrl=${u||o}`)},this.signOut=()=>{var r;sessionStorage.removeItem("productCompareShelfStatusOnQuickLinks"),this.deleteCookie(Oe("jwt"),window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),this.deleteCookie(Oe("refresh_token"),window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),this.deleteCookie(Oe("userId"),window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),this.deleteCookie(Oe("isDirectUser"),window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),localStorage.removeItem("isAccountCreatedGAGTMEventFired");const o=window.btoa(window.location.href).replace(/\+/g,"%2B"),u=window.btoa((r=this.loginConfigurationDetails)==null?void 0:r.redirectionURL);window.location.href=`${this.loginConfigurationDetails.loginEndpoint}?redirectUrl=${u||o}`},this.deleteCookie=(o,u)=>{document.cookie=o+"=; path=/; expires="+new Date("01-01-1970")+"; secure=true; domain="+u+"; samesite=lax;"},this.apiErrorHandling=o=>{o.message==="RefTokenExpiry - Please re-login"?this.signOut():o.message==="JWT_EXPIRED"?this.generateRefreshToken(this.initUserDetails):(this.isUserDetailsLoading=!1,console.log(o.message))},this.generateRefreshToken=async o=>{var u,r;try{const c=(u=this.loginConfigurationDetails)==null?void 0:u.storeName.toLocaleLowerCase(),w=await(await fetch((r=this.loginConfigurationDetails)==null?void 0:r.apiEndpoint,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",store:c},body:JSON.stringify({query:`
3                  mutation ($expired_jwt: String!, $refresh_token: String!) {
4                    refreshJwt(expired_jwt: $expired_jwt, refresh_token: $refresh_token) {
5                      jwt
6                    }
7                  }
8                `,variables:{expired_jwt:this.userCookies.jwt_token,refresh_token:this.userCookies.refresh_token}})})).json();if(w.errors&&(w.errors[0].message==="RefTokenExpiry - Please re-login"||w.errors[0].message==="JWT_EXPIRED")&&this.signOut(),w.data.refreshJwt.jwt){const g=this.parseJwt(w.data.refreshJwt.jwt);this.userCookies={jwt_token:w.data.refreshJwt.jwt,refresh_token:this.userCookies.refresh_token,customer_id:g.customer_id,email_id:g.email,is_direct_customer:g.is_direct===1,token_expire:new Date(g.exp*1e3),user_first_name:g.user_first_name,user_last_name:g.user_last_name},this.setCookie(Oe("jwt"),w.data.refreshJwt.jwt,new Date(new Date().setDate(new Date().getDate()+7)).toString(),window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),o()}}catch(c){this.apiErrorHandling(c)}},this.getUserSaleOrderDetails=()=>{var o,u;return fetch((o=this.loginConfigurationDetails)==null?void 0:o.apiEndpoint,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",store:(u=this.loginConfigurationDetail
8s)==null?void 0:u.brandName.toLocaleLowerCase(),authorization:`Bearer ${this.userCookies.jwt_token}`},body:JSON.stringify({query:`
9        query ($pageSize: Int!, $currentPage: Int!) {
10          customerSalesOrders(pageSize: $pageSize, currentPage: $currentPage) {
11            total_count
12            items { 
13              id
14            }
15          }
16        }
17              `,variables:{pageSize:1,currentPage:1}})}).then(r=>r.json())},this.initUserDetails=()=>{this.isUserDetailsLoading=!0,this.userCookies.is_direct_customer?this.isUserDetailsLoading=!1:this.getUserSaleOrderDetails().then(u=>{var r,c,L,w;if((L=(c=(r=u.data)==null?void 0:r.customerSalesOrders)==null?void 0:c.items)!=null&&L.length?this.userWithSaleOrders=!0:this.userWithSaleOrders=!1,this.isUserDetailsLoading=!1,document.getElementById(this.parentId)){const g=document.getElementById(this.parentId).querySelector("ul");g&&((w=g.children)==null?void 0:w.length)===1&&(g.querySelector(".user-name")||(g.insertBefore(this.renderUserName(),g.children[g.children.length-1]),this.renderAccountDropdownList(g,!0)))}}).catch(u=>this.apiErrorHandling(u)).finally(()=>this.isUserDetailsLoading=!1)},this.parentId=`header-account-dropdown-id-${new Date().toString()}`,this.accountDropdownList=(t=s.user_ctaItems)!=null&&t.length?s.user_ctaItems.map(o=>({name:o.cta_label,ctaUrl:$e(this.domain,o.cta_url)})):[],(a=document.querySelector('meta[name="siteConfigDetails"]'))==null||a.getAttribute("content");const n=(l=document.querySelector('meta[name="login-details"]'))==null?void 0:l.getAttribute("content");this.loginConfigurationDetails=Xe(n??"");const i=this.getCookie(Oe("jwt")),d=this.getCookie(Oe("refresh_token"));if(i&&d){this.isUserLoginned=!0;const o=this.parseJwt(i);this.userCookies={jwt_token:i,refresh_token:d,customer_id:o.customer_id,email_id:o.email,is_direct_customer:o.is_direct===1,token_expire:new Date(o.exp*1e3),user_first_name:o.user_first_name,user_last_name:o.user_last_name},this.userName=this.userCookies.user_first_name||"",this.isDirectUser=this.userCookies.is_direct_customer,this.isUserDetailsLoading=!0,new Date>=new Date(o.exp*1e3)?this.generateRefreshToken(this.initUserDetails):this.initUserDetails(),this.isDirectUser&&(this.userWithSaleOrders=!0)}else this.isUserLoginned=!1,this.userCookies=null,this.userName="",this.userWithSaleOrders=!1}}class St{constructor(s){var a;this.parseJwt=l=>{const u=l.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(u).split("").map(function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(r)},this.getCookie=l=>{const o=l+"=",r=decodeURIComponent(document.cookie).split(";");for(let c=0;c<r.length;c++){let L=r[c];for(;L.charAt(0)==" ";)L=L.substring(1);if(L.indexOf(o)==0)return L.substring(o.length,L.length)}return""},this.deleteCookie=(l,o)=>{document.cookie=l+"=; path=/; expires="+new Date("01-01-1970")+"; secure=true; domain="+o+"; samesite=lax;"},this.signOut=()=>{sessionStorage.removeItem("productCompareShelfStatusOnQuickLinks"),this.deleteCookie("jwt",window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),this.deleteCookie("refresh_token",window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),this.deleteCookie("userId",window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),this.deleteCookie("isDirectUser",window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),localStorage.removeItem("isAccountCreatedGAGTMEventFired");const l=window.btoa(window.location.href).replace(/\+/g,"%2B");window.location.href=`${this.loginDetailsConfig.loginEndpoint}?redirectUrl=${l}`},this.setCookie=(l,o,u,r)=>{document.cookie=l+"="+o+"; path=/; samesite=lax; secure=true; expires="+u+"; domain="+r+";"},this.generateRefreshToken=async l=>{try{const o=this.loginDetailsConfig.storeName.toLocaleLowerCase(),r=await(await fetch(this.loginDetail
17sConfig.apiEndpoint,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",store:o},body:JSON.stringify({query:`
18                  mutation ($expired_jwt: String!, $refresh_token: String!) {
19                    refreshJwt(expired_jwt: $expired_jwt, refresh_token: $refresh_token) {
20                      jwt
21                    }
22                  }
23                `,variables:{expired_jwt:this.userCookies.jwt_token,refresh_token:this.userCookies.refresh_token}})})).json();if(r.errors&&(r.errors[0].message==="RefTokenExpiry - Please re-login"||r.errors[0].message==="JWT_EXPIRED")&&this.signOut(),r.data.refreshJwt.jwt){const c=this.parseJwt(r.data.refreshJwt.jwt);this.userCookies={jwt_token:r.data.refreshJwt.jwt,refresh_token:this.userCookies.refresh_token,customer_id:c.customer_id,email_id:c.email,is_direct_customer:c.is_direct===1,token_expire:new Date(c.exp*1e3)},this.setCookie(Oe("jwt"),r.data.refreshJwt.jwt,new Date(new Date().setDate(new Date().getDate()+7)).toString(),window.location.origin.includes("localhost")?"":`.${window.location.host.split(".")[1]}.${window.location.host.split(".")[2]}`),l()}}catch(o){this.apiErrorHandling(o)}},this.apiErrorHandling=l=>{l.message==="RefTokenExpiry - Please re-login"?this.signOut():l.message==="JWT_EXPIRED"?this.generateRefreshToken(this.getCartDetails):console.log(l.message)},this.domain=document.querySelector("#onecms-header").hasAttribute("data-servername")?document.querySelector("#onecms-header").getAttribute("data-servername"):"",this.renderUserCart=()=>{var c;const l=document.createElement("div");l.id=this.parentId,l.classList.add("header-cart-container"),l.setAttribute("data-config-metrics-item",this.cartIcon_altText),l.setAttribute("tabIndex","0"),l.addEventListener("click",L=>{var w;L.stopPropagation(),ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",(w=L.target)==null?void 0:w.closest(".header-cart-container"),this.cart_Url),window.open($e(this.domain,this.cart_Url),"_self")}),l.addEventListener("keyup",L=>{var w;L.stopPropagation(),L.key==="Enter"&&(ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",(w=L.target)==null?void 0:w.closest(".header-cart-container"),this.cart_Url),window.open($e(this.domain,this.cart_Url),"_self"))});const o=document.createElement("div");o.classList.add("header-cart-icon","onecms-img"),o.setAttribute("data-src",$e(this.domain,this.cartIcon)),o.setAttribute("data-alt",this.cartIcon_altText||""),o.setAttribute("data-alt",this.cartIcon_altText||""),l.appendChild(o);const u=document.createElement("div");u.classList.add("header-cart-added-items","hide");const r=document.createElement("span");return r.classList.add("header-cart-added-items-count"),r.innerText=((c=this.cartItemsCount)==null?void 0:c.toString())??"",u.appendChild(r),l.appendChild(u),l},this.getCartDetails=()=>{fetch(this.loginDetailsConfig.apiEndpoint,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",store:this.loginDetailsConfig.storeName.toLocaleLowerCase(),authorization:`Bearer ${this.userCookies.jwt_token}`},body:JSON.stringify({query:`
24        query cartDetails  {
25            customerCart {
26                id
27                items { 
28                    id
29            }
30          }
31        }
32              `,variables:{}})}).then(l=>l.json()).then(l=>{var o,u,r,c;if(this.cartItemsCount=((c=(r=(u=(o=l==null?void 0:l.data)==null?void 0:o.customerCart)==null?void 0:u.items)==null?void 0:r.filter(L=>!!L))==null?void 0:c.length)??"",document.getElementById(this.parentId)){const L=document.getElementById(this.parentId).querySelector(".header-cart-added-items-count");if(L){L.textContent=this.cartItemsCount.toString();const w=L.closest(".header-cart-added-items");w&&(w.classList.contains("hide")&&w.classList.remove("hide"),this.cartItemsCount?(w.classList.remove("hide"),w.classList.add("show")):(w.classList.remove("show"),w.classList.add("hide")))}}}).catch(l=>this.apiErrorHandling(l))},this.serverName=s.serverName,this.cartIcon=s.cartIcon,this.cartIcon_altText=s.cartIcon_altText,this.cart_Url=s.cart_Url,this.parentId=`user-cart-id-${new Date().toString()}`,this.cartItemsCount=0;
32const n=(a=document.querySelector('meta[name="login-details"]'))==null?void 0:a.getAttribute("content"),i=Xe(n??"");this.loginDetailsConfig=i;const d=this.getCookie(Oe("jwt")),t=this.getCookie(Oe("refresh_token"));if(d&&t){const l=this.parseJwt(d);this.userCookies={jwt_token:d,refresh_token:t,customer_id:l.customer_id,email_id:l.email,is_direct_customer:l.is_direct===1,token_expire:new Date(l.exp*1e3)},this.isDirectUser=this.userCookies.is_direct_customer,this.isDirectUser&&(new Date>=new Date(l.exp*1e3)?this.generateRefreshToken(this.getCartDetails):this.getCartDetails())}}}(function(){const e={};let s=!0,n,i,d,t,a;const l="section.mega-menu section.one",o="section.mega-menu section.two",u="section.mega-menu section.three",r="section.mega-menu section.four";let c,L;const w="M6.36 13.289a1 1 0 001.419-.004l5.525-5.582a1 1 0 000-1.406L7.78.717A1 1 0 006.36.714l-.06.06a1 1 0 000 1.41l3.707 3.74H1a1 1 0 00-1 1v.15a1 1 0 001 1h9.007L6.3 11.821a1 1 0 00.003 1.41l.058.058z",g="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z",h=()=>{a&&a.length>0&&(a[0].style.opacity=0,a[0].querySelector(".one").classList.add("no-width"),a[0].style.pointerEvents="none");const p=window.matchMedia("(max-width: 1100px)").matches?"mobile":"desktop";f(p),O()},b=(p,I)=>{if(ve()){let k;if(I==="mobile"?p.target.classList.contains("mm-link")&&(k=p.target,_e([".mm-link"])):k=p.target.closest("[data-config-metrics-item]"),k){const q=k.querySelector("[href]");let D="";q&&(D=q.getAttribute("href")),D||(D=k.getAttribute("href")||""),window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",k,D)}p.stopPropagation()}},x=p=>{for(var I=p.lastElementChild;I;)p.removeChild(I),I=p.lastElementChild},O=()=>{x(n),x(i),x(d),x(t);const p=document.querySelector("#mobile-nav .mobile-nav-btn");p.classList.contains("open")&&p.classList.toggle("open")},f=(p="desktop")=>{p==="desktop"?(i.style.transform="translateX(-100%)",d.style.transform="translateX(-200%)",t.style.transform="translateX(-300%)"):(i.style.transform="translateX(100%)",d.style.transform="translateX(100%)",t.style.transform="translateX(100%)"),i.style.opacity=0,d.style.opacity=0,t.style.opacity=0,i.classList.add("no-width"),d.classList.add("no-width"),t.classList.add("no-width"),n.style.borderRadius="10px"},y=p=>{if(!p)return 0;let I=0;return p.childNodes.forEach(k=>{I+=k.getBoundingClientRect().height||0}),I},v=p=>{if(window.matchMedia("(max-width: 1100px)").matches){let I=0;return p.childNodes.forEach(k=>{I+=parseInt(window.getComputedStyle(k).getPropertyValue("margin-top"))+parseInt(window.getComputedStyle(k).getPropertyValue("margin-bottom"))}),I+y(p)+50}else{const I=y(n),k=y(i),q=y(d),D=y(t);return Math.max(I||0,k||0,q||0,D||0)+50}},T=(p,I)=>{const k=document.createDocumentFragment(),q=De({path:w,withoutSpan:!0}),D=document.createElement("span");D.innerText=e.backBtnText||"Back",k.appendChild(q),k.appendChild(D);const _=document.createElement("button");return _.appendChild(k),_.classList.add("mm-section-back-btn"),_.classList.add("anchor-link"),_.onclick=()=>{p.style.transform="translateX(100%)",a[0].style.height=v(I)+"px"},_},z=()=>{const p=document.querySelector("#mobile-nav .mobile-nav-btn");p&&p.addEventListener("click",I=>{var _;if(!I.currentTarget.classList.contains("open")){h();return}const k=document.createDocumentFragment();if(e!=null&&e.enableUserAccount&&(c!=null&&c.isUserLoginned)&&window.matchMedia("(max-width: 767px)").matches){const S=document.createElement("div");S.classList.add("login-user-name-text"),S.innerText=`Hello ${c.userName}!`,k.appendChild(S)}const q=document.createElement("ul");q.setAttribute("data-config-metrics-title","mega-menu");const D=document.getElementsByClassName("mega-menu");if(e.megamenu.forEach(S=>{if(!S.label)return;const Y=document.createElement("li"),A=document.createElement("a");A.classList.add("mm-link"),A.setAttribute("data-config-metrics-item",S.label),A.setAttribute("data-config-metrics-title",S.label),window.matchMedia("(min-width: 1100px)").matches?Y.innerText=S.label:(A.innerText=S.label,A.classList.add("anchor-link")),A.target=S.linkTarget||"_self",A.href=S.linkUrl.charAt(0)=="/"&&!S.linkUrl.includes("http")&&!S.linkUrl.includes("www")?L+S.linkUrl||"javascript:void(0)":S.linkUrl||"javascript:void(0)",window.matchMedia("(min-width: 1100px)").matches?A.appendChild(Y):Y.appendChild(A),Y.classList.add("nav-item-header"),Y.classList.add("anchor-link");const N=S.navItemsDetails;if(N){if(N.length){const E=De({path:w});window.matchMedia("(min-width: 1100px)").matches?(A.appendChild(E),E.classList.add("default-cursor")):Y.appendChild(E)}window.matchMedia("(max-width: 1100px)").matches?Y.addEventListener("click",E=>{f("mobile"),x(i),x(d),x(t),E.target.localName==="svg"||E.target.localName==="path"?(R(E.target.parentElement.parentElement),R(E.target.parentElement.parentElement)):(R(E.target),j(E.target)),N.length>0?P(i,N,"mobile",S):S.linkUrl&&ve()&&(window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",E.target,S.linkUrl),window.open(S.linkUrl,S.linkTarget||"_self"))}):A.addEventListener("mouseover",E=>{f("desktop"),x(i),x(d),x(t),E.target.classList.add("active-link"),E.target.localName==="svg"?(R(E.target.parentElement.parentElement),j(E.target.parentElement.parentElement)):E.target.localName==="path"?(R(E.target.parentElement.parentElement.parentElement),j(E.target.parentElement.parentElement.parentElement)):E.target.localName==="span"?(R(E.target.parentElement),j(E.target.parentElement)):(R(E.target),j(E.target)),N.length>0&&P(i,N,"desktop",S)})}window.matchMedia("(min-width: 1100px)").matches?q.appendChild(A):q.appendChild(Y)}),k.appendChild(q),window.matchMedia("(max-width: 767px)").matches){if(e&&(e!=null&&e.enableUserAccount)&&e.user&&e.user.altText){const S=document.createElement("hr"),Y=document.createElement("hr"),A=document.createElement("ul");c!=null&&c.isUserLoginned?(A.classList.add("mm-account-ul"),A.setAttribute("data-config-metrics-title","My Account"),A.setAttribute("data-config-metrics-item","My Account")):(A.classList.add("mm-account-signin-ul"),A.setAttribute("data-config-metrics-title","User Account"),A.setAttribute("data-config-metrics-item","User Account"));const N=document.createElement("li");if(c.isUserLoginned)N.innerText="My Account",N.addEventListener("click",()=>{P(i,e.user.ctaItems.map(E=>({label:E.cta_label,url:E.cta_url||""})).filter(E=>{var ae;if((ae=E.label)!=null&&ae.toLocaleLowerCase().includes("order")){if(c.userWithSaleOrders)return E}else return E}),"mobile",{url:"javascript:void(0)",label:"My Account"})}),e.user.ctaItems.length>0&&N.appendChild(De({path:w}));else{N.innerText="";const E=document.createElement("a");E.setAttribute("data-config-metrics-item","Sign In"),E.innerText="Sign In",E.classList.add("user-sign-in"),E.setAttribute("tabIndex","0"),E.addEventListener("click",()=>c.signIn()),E.addEventListener("keyup",ae=>
32{ae.key==="Enter"&&c.signIn()}),N.appendChild(E)}A.appendChild(N),k.appendChild(S),k.appendChild(A),k.appendChild(Y)}if(e!=null&&e.enableUserAccount&&(e!=null&&e.user)&&(c!=null&&c.isUserLoginned)){const S=document.createElement("ul");S.setAttribute("data-config-metrics-title","Sign Out"),S.setAttribute("data-config-metrics-item","Sign Out"),S.classList.add("mm-account-signout-ul");const Y=document.createElement("li"),A=document.createElement("a");A.setAttribute("data-config-metrics-item","Sign Out"),A.innerText="Sign Out",A.classList.add("user-sign-out"),A.setAttribute("tabIndex","0"),A.addEventListener("click",()=>c.signOut()),A.addEventListener("keyup",N=>{N.key==="Enter"&&c.signOut()}),Y.appendChild(A),S.appendChild(Y),k.appendChild(S)}}if(n.replaceChildren(k),(_=n==null?void 0:n.children)!=null&&_.length)for(let S=0;S<n.children.length;S++)n.children[S].addEventListener("click",function(Y){b(Y,window.matchMedia("(min-width: 1100px)").matches?"desktop":"mobile")});D[0].style.opacity=1,D[0].querySelector(".one").classList.remove("no-width"),D[0].style.pointerEvents="auto",D[0].style.left="16px",D[0].style.height=v(n)+"px"})},U=(p,I,k,q)=>{var Y;if(!I){p.style.transform="translateX(-300%)",p.style.opacity=0,p.classList.add("no-width");return}const D=document.createDocumentFragment();if(k==="mobile"){if(e!=null&&e.enableUserAccount&&(e!=null&&e.user)&&(c!=null&&c.isUserLoginned)&&window.matchMedia("(max-width: 767px)").matches){const A=document.createElement("div");A.classList.add("login-user-name-text"),A.innerText=`Hello ${c.userName}!`,D.appendChild(A)}D.appendChild(T(p,d))}const _=document.createElement("ul");I.forEach(A=>{const N=document.createElement("li");N.classList.add("mm-one-item"),N.classList.add("anchor-link");const E=document.createElement("a");E.setAttribute("data-config-metrics-item",A.label),E.setAttribute("data-config-metrics-title",A.label),E.classList.add("mm-link"),k=="desktop"?N.innerText=A.label:(E.innerText=A.label,E.classList.add("anchor-link")),E.target=A.target||"_self",E.href=A.url.charAt(0)=="/"&&!A.url.includes("http")&&!A.url.includes("www.")?L+A.url||"javascript:void(0)":A.url||"javascript:void(0)",k=="desktop"?(E.appendChild(N),_.appendChild(E)):(N.appendChild(E),_.appendChild(N))});const S=document.createElement("a");if(q.url?(S.href=q.url.charAt(0)=="/"&&!q.url.includes("http")&&!q.url.includes("www.")?L+q.url||"javascript:void(0)":q.url||"javascript:void(0)",S.target=q.target||"_self"):S.href="javascript:void(0)",S.innerText=q.label,S.classList.add("mm-nav-link-anchor"),S.classList.add("anchor-link"),S.setAttribute("data-config-metrics-item",q.label),S.setAttribute("data-config-metrics-title",q.label),D.appendChild(S),D.appendChild(_),p.replaceChildren(D),(Y=p==null?void 0:p.children)!=null&&Y.length)for(let A=0;A<p.children.length;A++)p.children[A].addEventListener("click",function(N){b(N,k)});p.style.transform="translateX(0%)",p.style.opacity=1,p.setAttribute("data-config-metrics-title",q.label),p.classList.remove("no-width"),a[0].style.height=v(p)+"px",_e([".mm-one-item",".mm-link"])},C=(p,I,k,q)=>{var Y;if(!I){x(p),k==="desktop"?(p.style.transform="translateX(-200%)",t.style.transform="translateX(-300%)",p.style.opacity=0,t.style.opacity=0,p.classList.add("no-width"),t.classList.add("no-width")):(p.style.transform="translateX(100%)",t.style.transform="translateX(100%)");return}const D=document.createDocumentFragment();if(k==="mobile"){if(e!=null&&e.enableUserAccount&&(e!=null&&e.user)&&(c!=null&&c.isUserLoginned)&&window.matchMedia("(max-width: 767px)").matches){const A=document.createElement("div");A.classList.add("login-user-name-text"),A.innerText=`Hello ${c.userName}!`,D.appendChild(A)}D.appendChild(T(p,i))}const _=document.createElement("ul");I.forEach(A=>{const N=document.createElement("li");N.classList.add("mm-one-item"),N.classList.add("anchor-link");const E=document.createElement("a");if(E.classList.add("mm-link"),E.setAttribute("data-config-metrics-item",A.label),E.setAttribute("data-config-metrics-title",A.label),k=="desktop"?N.innerText=A.label:(E.innerText=A.label,E.classList.add("anchor-link")),E.target=A.target||"_self",E.href=A.url.charAt(0)=="/"&&!A.url.includes("http")&&!A.url.includes("www")?L+A.url||"javascript:void(0)":A.url||"javascript:void(0)",k=="desktop"?(N.classList.add("default-cursor"),E.appendChild(N)):N.appendChild(E),k==="desktop"?E.addEventListener("mouseover",ae=>{t.style.transform="translateX(-300%)",ae.target.classList.add("active-link"),R(ae.target),j(ae.target),U(t,A.items,"desktop",A),_e([".mm-one-item"])}):N.addEventListener("click",ae=>{if(A.items&&A.items.length>0)U(t,A.items,"mobile",A),_e([".mm-link"]);else if(A.url)ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",ae.target,A.url),window.open(A.url,A.target||"_self");else return}),A.items&&A.items.length>0){const ae=De({path:w});k=="desktop"?(E.appendChild(ae),ae.classList.add("default-cursor")):N.appendChild(ae)}k=="desktop"?_.appendChild(E):_.appendChild(N)});const S=document.createElement("a");if(S.href=q.url.charAt(0)=="/"&&!q.url.includes("http")&&!q.url.includes("www")?L+q.url||"javascript:void(0)":q.url||"javascript:void(0)",S.target=q.target||"_self",S.innerText=q.label,S.setAttribute("data-config-metrics-item",q.label),S.setAttribute("data-config-metrics-title",q.label),S.classList.add("mm-nav-link-anchor"),S.classList.add("anchor-link"),D.appendChild(S),D.appendChild(_),p.replaceChildren(D),(Y=p==null?void 0:p.children)!=null&&Y.length)for(let A=0;A<p.children.length;A++)p.children[A].addEventListener("click",function(N){b(N,k)});p.style.transform="translateX(0%)",p.setAttribute("data-config-metrics-title",q.label),p.style.opacity=1,p.classList.remove("no-width"),a[0].style.height=v(p)+"px"},P=(p,I,k,q)=>{var N;if(!I){f(k),x(p);return}const D=document.createDocumentFragment(),_=document.createElement("ul");if(k==="mobile"){if(e!=null&&e.enableUserAccount&&(e!=null&&e.user)&&(c!=null&&c.isUserLoginned)&&window.matchMedia("(max-width: 767px)").matches){const E=document.createElement("div");E.classList.add("login-user-name-text"),E.innerText=`Hello ${c.userName}!`,D==null||D.appendChild(E)}D==null||D.appendChild(T(p,n))}
32I.forEach(E=>{const ae=document.createElement("li");ae.classList.add("mm-one-item"),ae.classList.add("anchor-link");const de=document.createElement("a");if(de.classList.add("mm-link"),de.setAttribute("data-config-metrics-title",E.label),de.setAttribute("data-config-metrics-item",E.label),k=="desktop"?ae.innerText=E.label:(de.innerText=E.label,de.classList.add("anchor-link")),de.target=E.target||"_self",de.href=E.url.charAt(0)==="/"&&!E.url.includes("http")&&!E.url.includes("www.")?L+E.url||"javascript:void(0)":E.url||"javascript:void(0)",k=="desktop"?(ae.classList.add("default-cursor"),de.appendChild(ae)):ae.appendChild(de),k==="desktop"?de.addEventListener("mouseover",ce=>{d.style.transform="translateX(-200%)",t.style.transform="translateX(-300%)",ce.target.classList.add("active-link"),R(ce.target),j(ce.target),C(d,E.items,"desktop",E),_e([".mm-one-item"])}):ae.addEventListener("click",ce=>{if(R(ce.target),j(ce.target),E.items&&E.items.length>0)C(d,E.items,"mobile",E),_e([".mm-link"]);else if(E.url)ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",ce.target,E.url),window.open(E.url,E.target||"_self");else return}),E.items&&E.items.length>0){const ce=De({path:w});k=="desktop"?(de.appendChild(ce),ce.classList.add("default-cursor")):ae.appendChild(ce)}k=="desktop"?_.appendChild(de):_.appendChild(ae)});const S=document.createElement("a"),Y=document.createElement("p");Y.classList.add("body-sm");const A=document.createElement("h6");if(A.innerHTML=`${q.label} ${e.suffix||""}`,Y.innerHTML=q.tagLine,S.appendChild(A),S.setAttribute("data-config-metrics-title",`${q.label} ${e.suffix||""}`.trim()),S.setAttribute("data-config-metrics-item",`${q.label} ${e.suffix||""}`.trim()),q.tagLine&&S.appendChild(Y),q.url||q.linkUrl){S.target=q.linkTarget||"_self";const E=q.url||q.linkUrl;S.href=E.charAt(0)==="/"&&!E.includes("http")&&!E.includes("www.")?L+E||"javascript:void(0)":E||"javascript:void(0)"}else S.href="javascript:void(0)";if(S.classList.add("mm-nav-link-anchor"),S.classList.add("anchor-link"),D.appendChild(S),D.appendChild(_),p.replaceChildren(D),p.style.transform="translateX(0%)",p.style.opacity=1,p.classList.remove("no-width"),p.setAttribute("data-config-metrics-title",`${q.label} ${e.suffix||""}`.trim()),(N=p==null?void 0:p.children)!=null&&N.length)for(let E=0;E<p.children.length;E++)p.children[E].addEventListener("click",function(ae){b(ae,k)});a[0].style.height=v(p)+"px"},R=p=>{if(!p)return;let I=p.previousElementSibling;for(;I;)I.classList.remove("active-link"),I=I.previousElementSibling},j=p=>{if(!p)return;let I=p.nextElementSibling;for(;I;)I.classList.remove("active-link"),I=I.nextElementSibling},M=p=>{var I;if(p!==void 0){const q=p.navItemsDetails,D=document.createDocumentFragment(),_=document.createElement("ul");_.setAttribute("data-config-metrics-title",p.label),q.forEach((N,E)=>{const ae=document.createElement("li"),de=document.createElement("a");de.classList.add("mm-link"),de.classList.add("anchor-link"),ae.innerText=N.label,de.setAttribute("data-config-metrics-item",N.label),de.setAttribute("data-config-metrics-title",N.label),de.target=N.target||"_self",de.href=N.url.charAt(0)==="/"&&!N.url.includes("http")&&!N.url.includes("www")?L+N.url||"javascript:void(0)":N.url||"javascript:void(0)",de.appendChild(ae),ae.classList.add("mm-one-item"),ae.classList.add("anchor-link"),de.addEventListener("click",ce=>{R(ce.target),j(ce.target)}),de.addEventListener("mouseover",ce=>{ce.target.classList.add("active-link"),R(ce.target),j(ce.target),f("desktop"),P(i,q[E].items,"desktop",N),_e([".mm-one-item"])}),q&&q[E].items&&q[E].items.length>0&&de.appendChild(De({path:w})),_.appendChild(de),_e([".mm-one-item",".mm-link"])});const S=document.createElement("a"),Y=document.createElement("p");Y.classList.add("body-sm");const A=document.createElement("h6");if(A.innerHTML=`${p.label} ${e.suffix||""}`,Y.innerHTML=p.tagLine,p.linkUrl?(S.href=p.linkUrl.charAt(0)==="/"&&!p.linkUrl.includes("http")&&!p.linkUrl.includes("www")?L+p.linkUrl||"javascript:void(0)":p.linkUrl||"javascript:void(0)",S.target=p.linkTarget||"_self"):S.href="javascript:void(0)",S.setAttribute("data-config-metrics-item",`${p.label} ${e.suffix||""}`),S.setAttribute("data-config-metrics-title",`${p.label} ${e.suffix||""}`),S.appendChild(A),p.tagLine&&S.appendChild(Y),S.classList.add("mm-nav-link-anchor"),S.classList.add("anchor-link"),D.appendChild(S),D.appendChild(_),n.replaceChildren(D),n.setAttribute("data-config-metrics-title",p.label),(I=n==null?void 0:n.children)!=null&&I.length)for(let N=0;N<n.children.length;N++)n.children[N].addEventListener("click",function(E){b(E,window.matchMedia("(min-width: 1100px)").matches?"desktop":"mobile")});a[0].style.height=v(n)+"px"}},ne=p=>{var D;const I=document.querySelector(`header.onecms-cmp-header nav#${p}-nav.nav-menu`),k=document.createElement("ul");k.setAttribute("data-config-metrics-title","Navigation Menu");const q=document.querySelector(`.mega-menu.${p}`);(D=e==null?void 0:e.megamenu)==null||D.forEach(_=>{var ae,de;if(!_.label)return;const S=document.createElement("li"),Y=De({path:g,size:"16",viewBox:"0 0 16 16",withoutSpan:!0}
32);window.matchMedia("(min-width: 1100px)").matches&&Y.classList.add("default-cursor");const A=document.createDocumentFragment(),N=document.createElement("a"),E=document.createElement("span");E.innerText=_.label,N.appendChild(E),(ae=_.navItemsDetails)!=null&&ae.length&&N.appendChild(Y),N.classList.add("mm-link"),N.classList.add("anchor-link"),N.setAttribute("data-config-metrics-item",_.label),N.target=_.linkTarget||"_self",N.href=_.linkUrl.charAt(0)==="/"&&!_.linkUrl.includes("http")&&!_.linkUrl.includes("www")?L+_.linkUrl||"javascript:void(0)":_.linkUrl||"javascript:void(0)",A.appendChild(N),S.classList.add("nav-item-header"),S.classList.add("anchor-link"),S.classList.add("underline"),(de=_.navItemsDetails)!=null&&de.length?S.addEventListener("mouseover",ce=>{if(!q||q.children.length===0||s)return;let Re=0;if(ce.target.localName==="svg")Re=ce.target.parentElement.parentElement.getBoundingClientRect().left;else if(ce.target.localName==="span")Re=ce.target.parentElement.getBoundingClientRect().left;else{if(ce.target.localName==="path")return;Re=ce.target.getBoundingClientRect().left}f("desktop"),O(),q.style.opacity=1,q.querySelector(".one").classList.remove("no-width"),q.style.pointerEvents="auto",q.style.left=Re-8+"px",M(_)}):(S.addEventListener("mouseover",ce=>{q.style.opacity=0,q.querySelector(".one").classList.add("no-width"),q.style.pointerEvents="none",f("desktop"),O()}),S.addEventListener("click",function(ce){ve()&&(window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",ce.target,_.linkUrl),ce.stopPropagation())})),S.appendChild(A),k.appendChild(S),k.addEventListener("mouseover",ce=>{ce.target.localName=="ul"&&(q.style.opacity=0,q.querySelector(".one").classList.add("no-width"),q.style.pointerEvents="none",_e([".mm-one-item"]),f("desktop"),O())})}),I==null||I.appendChild(k),z(),q&&q.length>0&&(q.style.height=v(I)+"px")},$=p=>{const I=document.createElement("div");I.classList.add("header-account-section"),I.setAttribute("tabIndex","0"),I.setAttribute("title",p!=null&&p.isUserLoginned?"User Info":"Login"),I.setAttribute("data-config-metrics-item","userAccount");const k=document.createElement("div");k.classList.add("header-account-container");const q=document.createElement("div");q.classList.add("header-account-icon","sly-img-cmp","onecms-img");let D="";e.user.fileReference&&e.user.fileReference.includes("https")?D=e.user.fileReference:D=L+e.user.fileReference,q.setAttribute("data-src",D),q.setAttribute("data-alt",e.user.altText),k.appendChild(q);const _=S=>{if(!p.isUserLoginned)ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",I.closest("[data-config-metrics-item]"),I.getAttribute("title")),p.signIn();else{const Y=document.querySelector(".header-account-dropdown");if(Y)Y.remove();else{ve()&&(window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",S.target,"User Account icon"),S.stopPropagation());const A=p.renderUserAccountDesktopView();I.appendChild(A)}}S.stopPropagation()};return I.addEventListener("click",_),I.addEventListener("keyup",S=>{S.key==="Enter"&&_(S)}),I.appendChild(k),I},J=()=>{var p,I;if(e!=null&&e.enableSearch||e!=null&&e.enableElasticSearch){const k=document.querySelector(".navigation .global-search");(p=document.querySelector("header#onecms-header"))==null||p.getAttribute("data-servername");const q=new Et({...e.search,productFirst:je((I=e.search)==null?void 0:I.productFirst)});k==null||k.appendChild(q.render())}},ye=()=>{const p=document.querySelector(".navigation .info"),I=document.createElement("div");I.classList.add("user-account"),I.appendChild($(c)),p==null||p.appendChild(I)},Ce=()=>{var p,I,k,q;if((p=e.cart)!=null&&p.fileReference){const D=document.querySelector(".navigation .cart"),_=document.createElement("div");_.classList.add("user-cart"),_.appendChild(new St({serverName:(e==null?void 0:e.serverName)||"",cartIcon:((I=e.cart)==null?void 0:I.fileReference)||"",cartIcon_altText:((k=e.cart)==null?void 0:k.altText)||"",cart_Url:((q=e.cart)==null?void 0:q.linkURL)||""}).renderUserCart()),D==null||D.appendChild(_)}},X=()=>{var N,E,ae,de,ce,Re,Fe,Pe;
32const p=document.getElementsByClassName("nav-menu"),I=document.getElementsByClassName("global-search"),k=document.getElementsByClassName("cart"),q=document.getElementsByClassName("info"),D=document.getElementsByTagName("header"),_=(N=D[0])==null?void 0:N.hasAttribute("data-enableuseraccount"),S=(E=D[0])==null?void 0:E.hasAttribute("data-float"),Y=((ae=D[0])==null?void 0:ae.getAttribute("data-enablesearch"))==="true",A=((de=D[0])==null?void 0:de.getAttribute("data-enableelasticsearch"))==="true";if(e.enableUserAccount=_,e.enableFloat=S,e.enableSearch=Y,e.enableElasticSearch=A,e.serverName=(ce=D[0])==null?void 0:ce.getAttribute("data-servername"),e.bgColor=(Re=D[0])==null?void 0:Re.getAttribute("data-bgcolor"),e.suffix=(Fe=D[0])==null?void 0:Fe.getAttribute("data-suffix"),e.backBtnText=(Pe=D[0])==null?void 0:Pe.getAttribute("data-backbuttontext"),p&&p.length>0)for(let xe=0;xe<p.length;xe++){const We=p[xe].getAttribute("data-menu");if(We){e.megamenu=JSON.parse(decodeURIComponent(escape(atob(We))));break}}if(I&&I.length>0){const xe=I[0].getAttribute("data-search");xe&&(e.search=JSON.parse(atob(xe)))}if(k&&k.length>0){const xe=k[0].getAttribute("data-cart");xe&&(e.cart=JSON.parse(atob(xe)))}if(q&&q.length>0){const xe=q[0].getAttribute("data-useraccount");xe&&(e.user=JSON.parse(atob(xe)))}},ie=p=>{p&&(window.matchMedia("(max-width: 1100px)").matches?"mobile":"desktop")==="desktop"&&p.addEventListener("mouseleave",k=>{const q=k.clientX,D=k.clientY,_=document.elementFromPoint(q,D);let S=null;_&&(_.closest(l)?S=_.closest(l):_.closest(o)?S=_.closest(o):_.closest(u)?S=_.closest(u):_.closest(r)&&(S=_.closest(r)),S||(a&&a.length>0&&(a[0].style.opacity=0,a[0].querySelector(".one").classList.add("no-width")),h(),O()))},!1)};function ge(){const p=document.querySelector("header.onecms-cmp-header nav#desktop-nav"),I=document.querySelector("header.onecms-cmp-header nav#mobile-nav"),k=p==null?void 0:p.querySelector("ul");(k==null?void 0:k.scrollHeight)>(k==null?void 0:k.clientHeight)&&!(p!=null&&p.classList.contains("overflow-flex"))?(p==null||p.classList.add("overflow-flex"),I==null||I.classList.add("overflow-flex")):(p==null||p.classList.remove("overflow-flex"),I==null||I.classList.remove("overflow-flex"),(k==null?void 0:k.scrollHeight)>(k==null?void 0:k.clientHeight)&&(p==null||p.classList.add("overflow-flex"),I==null||I.classList.add("overflow-flex")))}const be=document.querySelector("#onecms-header .header-container .navigation .brand-logo-container a div"),Se=function(p,I){for(const k of p)if(k.type==="childList"&&k.addedNodes.length>0){const q=k.addedNodes[0];q.complete?(ge(),I.disconnect(),s=!1):["load","error"].forEach(D=>{q.addEventListener(D,()=>{ge(),I.disconnect(),s=!1,D==="error"&&console.log("Error in loading image...")})})}},se=new MutationObserver(Se),ke={childList:!0};be&&(se==null||se.observe(be,ke)),be||(s=!1);const Ae=()=>{var D,_,S;s=!0;const p=document.querySelector("header.onecms-cmp-header");if(!p)return;L=p.hasAttribute("data-servername")?p.getAttribute("data-servername"):"",n=document.querySelector(l),i=document.querySelector(o),d=document.querySelector(u),t=document.querySelector(r);const I=document.querySelector("nav#desktop-nav");ie(n),ie(i),ie(d),a=document.getElementsByClassName("mega-menu");const k=document.querySelector(".global-links"),q=p.querySelector(".mega-menu");if(k==null||k.addEventListener("mouseover",()=>{Number(window.getComputedStyle(q).getPropertyValue("opacity"))===1&&h()}),window.matchMedia("(min-width: 1501px)").matches&&window.addEventListener("click",Y=>{const A=Y.target;!Array.from(q.children).filter(E=>{Number(window.getComputedStyle(E).getPropertyValue("opacity"))}).includes(A)&&Number(window.getComputedStyle(q).getPropertyValue("opacity"))===1&&document.querySelector("#mobile-nav .mobile-nav-btn")!==(A==null?void 0:A.closest("#mobile-nav .mobile-nav-btn"))&&h()}),X(),e!=null&&e.enableUserAccount&&(c=new Ct({user_ctaItems:e.user.ctaItems,serverName:e.serverName})),ne("desktop"),J(),e.bgColor){const Y=document.querySelector(".onecms-cmp-header .header-container");e.enableFloat?Y.style.backgroundColor="transparent":Y.classList.add(e.bgColor)}e!=null&&e.enableUserAccount&&(e!=null&&e.user)&&ye(),e!=null&&e.enableUserAccount&&(e!=null&&e.user)&&(c!=null&&c.isDirectUser)?Ce():(D=document.querySelector(".navigation .cart"))==null||D.remove(),window.matchMedia("(min-width: 1500px)").matches?(_=a[0])==null||_.addEventListener("mouseleave",h,!1):(I==null||I.classList.add("overflow-flex"),(S=document.querySelector("nav#mobile-nav"))==null||S.classList.add("overflow-flex")),window.addEventListener("onOrientationChange",()=>{h()}),window.addEventListener("resize",()=>{var Y,A;ge(),window.matchMedia("(width > 1100px)").matches&&(h(),window.matchMedia("(max-width: 1500px)").matches?(Y=a[0])==null||Y.removeEventListener("mouseleave",h,!1):(A=a[0])==null||A.addEventListener("mouseleave",h,!1))})};document.addEventListener("DOMContentLoaded",Ae)})();document.addEventListener("DOMContentLoaded",()=>{var e=document.querySelector(".languages-dropdown"),s=e==null?void 0:e.getElementsByClassName("language-selected")[0],n=e==null?void 0:e.getElementsByTagName("span")[0],i=e==null?void 0:e.getElementsByClassName("arrow")[0],d=e==null?void 0:e.getElementsByClassName("language-list")[0];const t=window.location.href;for(var a=d==null?void 0:d.children,l=0;l<(a==null?void 0:a.length);l++){var o=a[l].getElementsByTagName("a")[0];if(o!=null){var u=o.getAttribute("data-linkurl"),r=o.text;t.indexOf(u)!=-1&&(n.textContent=r,a[l].classList.add("seleted"))}}s==null||s.addEventListener("click",function(c){if(i!=null&&i.classList.contains("down")){i.classList.remove("down"),i.classList.add("up"),d.classList.remove("hide");var L=d.getElementsByClassName("seleted")[0];L!=null&&(L.style.display="none")}else i!=null&&i.classList.contains("up")&&(i.classList.remove("up"),i.classList.add("down"),d.classList.add("hide"))})});document.addEventListener("DOMContentLoaded",()=>{var e=document.querySelector(".left-floating"),s=e==null?void 0:e.getElementsByClassName("left-floating-links")[0],n=s==null?void 0:s.getElementsByClassName("global-link")[0],i=e==null?void 0:e.getElementsByClassName("mobile-dropdown")[0];if(window.matchMedia("(max-width: 767px)").matches&&s){s==null||s.classList.add("hide"),i==null||i.classList.remove("hide");var d=document.querySelector(".arrow");d.addEventListener("click",function(t){var a=t.currentTarget;a.classList.contains("down")?(n==null||n.classList.add("hide"),s.classList.remove("hide"),a.classList.remove("down"),a.classList.add("up")):(s.classList.add("hide"),a.classList.remove("up"),a.classList.add("down"))},!1)}else s==null||s.classList.remove("hide"),n==null||n.classList.remove("hide")});window.addEventListener("resize",()=>{var e=document.querySelector(".left-floating"),s=e==null?void 0:e.getElementsByClassName("left-floating-links")[0],n=s==null?void 0:s.getElementsByClassName("global-link")[0],i=e==null?void 0:e.getElementsByClassName("mobile-dropdown")[0];window.matchMedia("(max-width: 767px)").matches?(s==null||s.classList.add("hide"),i==null||i.classList.remove("hide")):(i==null||i.classList.add("hide"),s==null||s.classList.remove("hide"),n==null||n.classList.remove("hide"))});document.addEventListener("DOMContentLoaded",()=>{var e=document.querySelector(".onecms-icon-group-container");e&&kt(e);var s=document.querySelector(".right-floating"),n=s==null?void 0:s.getElementsByClassName("right-floating-links")[0],i=n==null?void 0:n.getElementsByClassName("global-link")[0],d=s==null?void 0:s.getElementsByClassName("mobile-dropdown")[0];if(window.matchMedia("(max-width: 576px)").matches&&n&&n.querySelectorAll("a").length>2){d==null||d.classList.remove("hide");var t=document.querySelector(".arrow");t.addEventListener("click",function(a){var l=a.currentTarget;l.classList.contains("down")?(i==null||i.classList.add("hide"),n==null||n.classList.remove("hide"),l.classList.remove("down"),l.classList.add("up")):(n==null||n.classList.add("hide"),l.classList.remove("up"),l.classList.add("down"))},!1)}else n==null||n.classList.remove("hide"),i==null||i.classList.remove("hide")});const kt=e=>{var s=e.getElementsByTagName("a");for(const i of s){var n=i.getAttribute("data-titlecolor");n&&(i.style.color=n)}};window.addEventListener("resize",()=>{var e=document.querySelector(".right-floating"),s=e==null?void 0:e.getElementsByClassName("right-floating-links")[0],n=s==null?void 0:s.getElementsByClassName("global-link")[0],i=e==null?void 0:e.getElementsByClassName("mobile-dropdown")[0];window.matchMedia("(max-width: 576px)").matches&&s.querySelectorAll("a").length>2?(s==null||s.classList.add("hide"),i==null||i.classList.remove("hide")):(i==null||i.classList.add("hide"),s==null||s.classList.remove("hide"),n==null||n.classList.remove("hide"))});document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".onecms-heroCard .onecms-heroCard-container").forEach(s=>{const n=s.getAttribute("data-bgimage");n&&(s.style.backgroundImage=`url('${n}')`)})});document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll(".onecms-title-count-des-search .onecms-title-count-des .onecms-plp-description .action-view .onecms-button.base-btn");function s(){e.forEach(n=>{window.matchMedia("(max-width: 768px)").matches?(n.classList.contains("big")||n.classList.add("big"),n.classList.contains("full-width")||n.classList.add("full-width"),n.classList.contains("small-btn")&&n.classList.remove("small-btn")):window.matchMedia("(max-width: 1200px)").matches?(n.classList.contains("big")||n.classList.add("big"),n.classList.contains("full-width")&&n.classList.remove("full-width"),n.classList.contains("small-btn")&&n.classList.remove("small-btn")):(n.classList.contains("small-btn")||n.classList.add("small-btn"),n.classList.contains("big")&&n.classList.remove("big"),n.classList.contains("full-width")&&n.classList.remove("full-width"))})}s(),window.addEventListener("resize",s)});document.addEventListener("DOMContentLoaded",function(){if(!document.querySelector(".heroCarouselBanner"))return;const s=document==null?void 0:document.querySelectorAll(".hero-carousel-wrapper"),n=document==null?void 0:document.querySelector(".heroCarouselBanner
32-inner"),i=document==null?void 0:document.querySelectorAll(".hero-carousel-item"),d=document==null?void 0:document.querySelector(".heroCarouselBanner-inner"),t=d==null?void 0:d.getAttribute("data-autoslide"),a=document==null?void 0:document.querySelector(".carousel-blue-bar"),l=document==null?void 0:document.querySelectorAll(".item-bgimage"),o=document==null?void 0:document.querySelectorAll(".heroCarouselBanner-mobile-image"),u=document==null?void 0:document.querySelector(".page-heading"),r=Number(t);setInterval(()=>{var R,j;if((u.innerText==""||u.innerText=="null")&&(u.innerText=document.title),window.innerWidth>1200&&l.forEach(M=>{const ne=M==null?void 0:M.getAttribute("data-laptop");M.style.backgroundImage=`url("${ne}")`}),window.innerWidth<=1200&&window.innerWidth>766&&l.forEach(M=>{const ne=M==null?void 0:M.getAttribute("data-laptop"),$=M==null?void 0:M.getAttribute("data-tablet");$===""||$===null?M.style.backgroundImage=`url("${ne}")`:M.style.backgroundImage=`url("${$}")`}),window.innerWidth<=766){const M=l.length;for(let ne=0;ne<M;ne++){const $=(R=o[ne])==null?void 0:R.getAttribute("data-mobile"),J=(j=l[ne])==null?void 0:j.getAttribute("data-laptop");$===""||$===null?o[ne].style.backgroundImage=`url("${J}")`:o[ne].style.backgroundImage=`url("${$}")`}}},100);const c=100/s.length;a.style.width=`${c}%`,s.forEach(R=>{const j=1520/s.length;R.style.width=`${j}px`}),i[0].classList.add("activeCard"),s.forEach((R,j)=>{R.addEventListener("click",function(){i.forEach(M=>{M.classList.remove("activeCard")}),n.style.transform=`translateX(-${j*100}vw)`,i[j].classList.add("activeCard"),ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",R,"heroCarouselBanner slider")})});function L(R){i.forEach(j=>{j.classList.remove("activeCard")}),n.style.transform=`translateX(-${R*100}vw)`,i[R].classList.add("activeCard"),setTimeout(()=>{const j=(R+1)%s.length;L(j)},r*1e3)}L(0);let w=0,g=0;const h=50,b=document.querySelectorAll(".heroCarouselBanner-mobile-image"),x=document.querySelector(".heroCarouselBanner-mobile-container");x.addEventListener("touchstart",R=>{w=R.touches[0].clientX}),x.addEventListener("touchend",R=>{g=R.changedTouches[0].clientX,O()});function O(){const R=g-w;R>h?f>0&&P():R<-50&&f!==v-1&&C()}let f=0;const y=document.querySelector(".carousel-next"),v=b.length;y.addEventListener("click",C);const T=document.querySelector(".carousel-prev");f===0&&z(0),T.addEventListener("click",P);function z(R){R===0?(T==null||T.classList.add("disabled"),y==null||y.classList.remove("disabled"),y.removeAttribute("disabled"),T.setAttribute("disabled","")):R+1===v?(T==null||T.classList.remove("disabled"),y==null||y.classList.add("disabled"),y.setAttribute("disabled",""),T.removeAttribute("disabled")):(T==null||T.classList.remove("disabled"),y==null||y.classList.remove("disabled"),y.removeAttribute("disabled"),T.removeAttribute("disabled"))}function U(R){R>=v||R<0?(f=0,z(f)):(f=R,z(f));const j=-100*f+"%";b.forEach(ne=>{ne.style.transform="translateX("+j+")"});const M=c*2*R;a.style.left=`${M}px`}function C(){U(f+1)}function P(){U(f-1)}setInterval(()=>{f!==v-1?C():f===v-1&&U(0)},r*1e3)});document.addEventListener("DOMContentLoaded",()=>{function e(n){const i=n.querySelector(".cmp-list-container"),d=n.querySelectorAll(".card-item"),t=n.querySelectorAll(".list-item"),a=parseInt((i==null?void 0:i.getAttribute("data-initialCards"))||"4");let l=a;const o=n.querySelector(".load-more-button"),u=n.querySelector(".list-load-wrapper"),r=n.querySelector(".no-list-container"),c=n.querySelector(".show-percent");c&&(c.textContent=`Showing ${a} of ${t.length}`);const L=n.querySelector(".progress-fill"),w=a/t.length*100;L&&(L.style.width=`${w}%`);for(let g=a;g<t.length;g++)t[g]&&(t[g].style.display="none");t.length>0&&r&&(r.style.display="none"),(t.length<=a||!t.length||!i)&&u&&(u.style.display="none"),o&&o.addEventListener("click",()=>{if(c){const g=l+a;for(let b=l;b<g&&b<t.length;b++)t[b]&&(t[b].style.display="block");l=g,l>=t.length&&u&&(u.style.display="none"),c.textContent=`Showing ${g} of ${t.length}`;const h=g/t.length*100;L&&(L.style.width=`${h}%`)}}),setInterval(()=>{d.forEach(g=>{const h=g.getAttribute("data-image");g&&h&&(g.style.backgroundImage=`url("${h}")`)})},100)}document.querySelectorAll(".onecms.cmp-list").forEach(n=>e(n))});document.addEventListener("DOMContentLoaded",()=>{const e=document==null?void 0:document.querySelectorAll(".cmp-textImage-container");(document==null?void 0:document.querySelectorAll(".textImage-img")).forEac
32h(n=>{const i=n==null?void 0:n.getAttribute("data-url"),d=n==null?void 0:n.getAttribute("data-target"),t=n==null?void 0:n.getAttribute("data-width"),a=n==null?void 0:n.getAttribute("data-height"),l=n.querySelector(".onecms-img");l&&(t&&a?(l.style.width=`${t}px`,l.style.height="auto",l.style.maxWidth="100%"):(l.style.width="100%",l.style.height="100%")),i&&(n.addEventListener("mouseover",()=>{n.style.cursor="pointer"}),n.addEventListener("click",()=>{d==="_blank"?window.open(i):window.location.href=i}))}),e.forEach(n=>{const i=n==null?void 0:n.getAttribute("data-padding");n.style.padding=`${i}px`})});document.addEventListener("DOMContentLoaded",function(){const e=document==null?void 0:document.querySelectorAll(".warrantyCards-list-container .warrantyCards-item"),s=document==null?void 0:document.querySelector(".onecms.cmp-warrantyCards .onecms-bg-wrapper"),n=i=>{i.forEach(d=>{d.innerHTML=d.innerHTML.replace(Ue,t=>`<sup class="symbol">${t}</sup>`)})};e.forEach(i=>{const d=i==null?void 0:i.querySelectorAll(".warrantyCard-container .warrantyCard-description"),t=i==null?void 0:i.querySelectorAll(".warrantyCard-container .warrantyCard-title");n(t),n(d);for(let a=0;a<d.length-1;a++){const o='<hr style="border-top: 2px solid '+(s.classList.contains("assagrey")?"#f4f4f4":"#fff")+'; margin: 30px 0px;"/>';d[a].insertAdjacentHTML("afterend",o)}})});document.addEventListener("DOMContentLoaded",()=>{const s=w=>{let g;switch(w){case"2column":g=2;break;case"3column":g=3;break;case"4column":g=4;break;case"default":default:g=1;break}return g},n=document.querySelectorAll(".onecms-list-container"),i=()=>{n&&n.forEach(w=>{if(w.getAttribute("listType")==="card"){const h=w.querySelectorAll(".onecms-list-item");let b=0;h.forEach(x=>{const O=x.getAttribute("columnLayout"),f=s(O),y=Number(b)%4+1,v=`grid-column: ${O=="3column"?1:y} / span ${f};`;x.setAttribute("style",v),b+=f||1})}})},d=()=>{n&&n.forEach(w=>{w.querySelectorAll(".onecms-list-item").forEach(h=>{h.removeAttribute("style")})})},t=()=>{window.matchMedia("(max-width: 767px)").matches||window.matchMedia("(min-width: 768px) and (max-width: 1200px)").matches?d():i()},a=w=>{const h=w.target.parentElement,x=h.parentElement.querySelectorAll(".onecms-list-item[hidden]");let O=Number(h.getAttribute("currentCount"));const f=Number(h.getAttribute("initialCount")),y=Number(h.getAttribute("total"));if(O+f>=y)x.forEach(v=>{v.removeAttribute("hidden")}),h.setAttribute("hidden","true");else{O+=f,x.forEach(U=>{const C=Number(U.getAttribute("index"));console.log(C),C<O&&U.removeAttribute("hidden")}),h.setAttribute("currentCount",`${O}`);const v=h.querySelector(".load-more-count");v.textContent=`Showing ${O} of ${y}`;const T=h.querySelector(".progress-fill"),z=Math.round(O/y*100);T.setAttribute("style",`width: ${z}%;`)}},l=document.querySelectorAll(".load-more-wrapper");l&&l.forEach(w=>{const g=Number(w.getAttribute("initialCount")),h=Number(w.getAttribute("total")),b=Math.round(g/h*100);w.querySelector(".progress-fill").setAttribute("style",`width: ${b}%;`),w.querySelector("button").addEventListener("click",f=>a(f))});const o=w=>{switch(w){case"new_tab":return"_blank";case"_self":default:return"_self"}},u=w=>{const g=w.currentTarget,h=g.getAttribute("ctaLink"),b=o(g.getAttribute("ctaTarget"));ve()&&(window.handleButtonOrLinkClick&&w.stopPropagation(),window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",w.target,h),w.stopPropagation()),h&&window.open(h,b)};(()=>{const w=document.querySelectorAll(".onecms-list a[type='button']");w&&w.length>0&&w.forEach(g=>{g.addEventListener("click",h=>u(h))})})();const c=(w,g)=>{const h=w.getAttribute("data-cta-link"),b=o(w.getAttribute("data-cta-target"));ve()&&(window.handleButtonOrLinkClick&&g.stopPropagation(),window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",w.closest("[data-config-metrics-item]"),h??"")),h&&(window.open(h,b),g.stopPropagation())},L=document.querySelectorAll(".onecms-list-container");L&&L.forEach(w=>{const g=w.querySelectorAll(".onecms-list-item");g&&g.forEach(h=>{const b=h.querySelector(".card-link");b==null||b.addEventListener("click",x=>{const O=x.target;if(O.classList.contains("card-link"))c(O,x);else{let f=O.querySelector(".card-link");f?c(f,x):(f=O.closest(".card-link"),f&&c(f,x))}})})}),window.addEventListener("resize",t,{passive:!1}),t()});document.addEventListener("DOMContentLoaded",function(){const e=document.querySelectorAll(".onecms-carousel");function s(u){let r;switch(u){case"2column":r=2;break;case"3column":r=3;break;case"4column":r=4;break;case"default":default:r=1;break}return r}const n={DESKTOP:1024,TABLET:768},i={DESKTOP:32,MOBILE:32},d=(u,r)=>{let c=0;return u>n.DESKTOP?c=Math.ceil(r/4):u>n.TABLET&&u<n.DESKTOP?c=Math.ceil(r/2):c=r,c},t=(u,r)=>{let c;return u>=n.DESKTOP?c=i.DESKTOP:(u>=n.TABLET,c=i.MOBILE),u>r&&(c=u-r+32-12),c/2};function a(u){return/^(?:\w+:)\/\//.test(u)}function l(u){let r;const c=u.indexOf("html");if(c!==-1){const L=u.lastIndexOf("/",c-1);L!==-1?r=u.substring(L-3,c)+"html":r=u}else r=u;return r}function o(u){const c=u==null?void 0:u.querySelector(".all-carou
32sel"),L=u==null?void 0:u.querySelector(".slider-item");if(c&&L){const w=c.children;c.childElementCount-1;const g=u==null?void 0:u.getAttribute("data-columnLayout");L.getAttribute("data-multiplier");const h=u.querySelector(".carousel-blue-bar"),b=u.getAttribute("data-autoSlide"),x=u.getAttribute("data-delay"),O=u.querySelectorAll(".anchor-link"),f=c.childElementCount,y=window.location.origin;for(let X=0;X<f;X++){const ie=O[X];ie==null||ie.addEventListener("click",function(ge){const be=ie.getAttribute("data-config-metrics-ctaPath"),Se=l(be);let se;y.split(".")[0].includes("localhost")?se=be:y.split(".")[1]==="adobeaemcloud"?se=y+be:se=y+Se;const Ae=a(be)?be:se,p=ie.getAttribute("data-config-metrics-ctaTarget");ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",ge.target.closest("[data-config-metrics-item]"),Ae),window.open(Ae,p),ge.stopPropagation()})}const v=window.innerWidth>=1520?"(1520px - 128px)":"(100vw - 128px)",T=g?s(g):"";for(let X=0;X<c.childElementCount;X++)w[X].style.width=`calc((${v} / 4) * ${T})`;let z=t(window.innerWidth,1520);const U=X=>{const ie=u.querySelector(".all-carousel");ie.style.paddingLeft=`${X}px`,ie.style.paddingRight=`${X}px`,ie.style.scrollPaddingLeft=`${X}px`},C=c.childElementCount;let P=d(window.innerWidth,C);const R=X=>{h.style.width=`${100/X}%`,h.style.left=`${0*(100/X)}%`},j=u.querySelector(".carousel-prev"),M=u.querySelector(".carousel-next"),ne=()=>{const X=u.querySelector(".all-carousel"),ie=c.childElementCount,ge=X.offsetWidth;if(X.scrollWidth-ge===0)P=1;else if(window.innerWidth>=n.DESKTOP){const Se=d(window.innerWidth,ie);R(Se)}else if(window.innerWidth>n.TABLET&&window.innerWidth<n.DESKTOP){const Se=d(window.innerWidth,ie);R(Se)}else{const Se=d(window.innerWidth,ie);R(Se);const se=aLink.querySelectorAll(".onecms-button")??[];for(let ke=0;ke<(se==null?void 0:se.length)-1;ke++)se[ke].addEventListener("click",function(Ae){var p;ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("link_click","link click",Ae.target,((p=se[ke])==null?void 0:p.getAttribute("ctalink"))||""),Ae.stopPropagation()})}U(t(window.innerWidth,1520))},$=()=>{var ge;const X=u.querySelector(".all-carousel"),ie=u.querySelector(".carousel-blue-bar");if(ie){let be,Se;if(X.scrollLeft===0)be=0,Se=0;else{const se=ie.offsetWidth,Ae=(((ge=ie.parentElement)==null?void 0:ge.offsetWidth)||200)-se,p=X.offsetWidth,k=X.scrollWidth-p;be=X.scrollLeft*(100/k),Se=Ae*(be/100)}ie.style.left=`${Se}px`}X.scrollLeft===0?j.classList.add("disabled"):j.classList.remove("disabled"),X.scrollWidth-(X.clientWidth+X.scrollLeft)<=2?M.classList.add("disabled"):M.classList.remove("disabled")},J=()=>{const X=u.querySelector(".all-carousel"),ie=setInterval(()=>{X.scrollWidth-(X.offsetWidth+X.scrollLeft)<=2?X.scrollTo({left:0,behavior:"smooth"}):ye(!1)},x);return()=>clearInterval(ie)},ye=X=>{const ie=u.querySelector(".all-carousel"),ge=ie.offsetWidth,be=parseInt(getComputedStyle(ie).paddingRight),Se=ge-be;X&&ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("button_click","button click",M,"carousel-slide"),ie.scrollBy({left:Se,behavior:"smooth"}),$()},Ce=()=>{const X=u.querySelector(".all-carousel"),ie=X.offsetWidth,ge=parseInt(getComputedStyle(X).paddingLeft),be=ie-ge;ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("button_click","button click",j,"carousel-slide"),X.scrollBy({left:-be,behavior:"smooth"}),$()};c==null||c.addEventListener("scroll",$),M==null||M.addEventListener("click",()=>ye(!0)),j==null||j.addEventListener("click",Ce),window.addEventListener("resize",ne),$(),R(P),U(z),b==="true"&&J()}}e==null||e.forEach(u=>o(u))});document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementsByTagName("header"),s=e&&e.length>0?e[0]:null,n=document.querySelector(".onecms-search-result-container"),i=(s==null?void 0:s.getAttribute("data-enableelasticsearch"))==="true",d=s==null?void 0:s.getElementsByClassName("global-search");let t,a;if(d&&d.length>0&&i){const m=d[0].getAttribute("data-search");m&&(t=JSON.parse(atob(m)))}let l=i?1:0,o=0,u="",r,c,L=!1,w="",g,h,b,x,O,f,y;const v=t==null?void 0:t.showFilters,T=(t==null?void 0:t.filterTitle)??"Select Options",z=t==null?void 0:t.filterTitleForAsset,
32U=t==null?void 0:t.filterTitleForSite,C=t==null?void 0:t.componentType,P=C==="both"?(t==null?void 0:t.initialSiteBothResults)??1:(t==null?void 0:t.initialSiteResults)??1,R=C==="both"?(t==null?void 0:t.initialAssetBothResults)??1:(t==null?void 0:t.initialAssetResults)??1,j=(t==null?void 0:t.defaultDAMImage)||"",M=(t==null?void 0:t.defaultSiteImage)||"",ne=t==null?void 0:t.target,$=t==null?void 0:t.actionLabel,J=t==null?void 0:t.productButtonText,ye=t==null?void 0:t.nonProductButtonText,Ce=t==null?void 0:t.damButtonText,X=t==null?void 0:t.filterMappings,ie=t==null?void 0:t.titleOnResults,ge=(t==null?void 0:t.defaultSearch)??!1,be=(t==null?void 0:t.defaultRawQueryFields)??{},Se={query:"",c:"",pageSize:c,page:l,sort:u,initialSite:P,initialAsset:R,componentType:C,filterMappings:X};let se,ke,Ae={nonProductButtonText:"",productButtonText:"",whereToBuyLink:"",bgColor:""},p,I=!0,k,q=0,D=[],_={file:void 0,dam:void 0},S={..._};const Y=()=>{const m=new URLSearchParams(window.location.search);if(w=m.get("query"),w)if(w.includes(":")){const V=w.match(':"(.*)"');V&&(w=V[1])}else w=decodeURIComponent(w);else w="";ke=m.get("filter")},A=m=>m?j:M,N=m=>{const V=m.getAttribute("defaultImage"),Q=m.getAttribute("nonProductButtonText"),H=m.getAttribute("productButtonText"),te=m.getAttribute("whereToBuyLink"),K=m.getAttribute("bgColor");Ae={defaultImage:V,nonProductButtonText:Q,productButtonText:H,whereToBuyLink:te,bgColor:K}},E=m=>typeof m=="string"&&(m==null?void 0:m.trim())!==""&&(m==null?void 0:m.trim().toLowerCase())!=="n/a",ae=m=>m!=null&&m.titleResults?(m==null?void 0:m.titleResults)||"":m!=null&&m.pageTitle?(m==null?void 0:m.pageTitle)||"":(m==null?void 0:m.title)||"",de=(m,V,Q)=>{ve()&&window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick(V==="link"?"link_click":"button_click",V==="link"?"link click":"button click",m.target,Q)},ce=(m,V)=>{var Te,Ee;const Q=document.createElement("div");let H=ae(m);v&&C==="both"?Q.classList.add("card-column","col-xl-4","col-lg-6","col-md-12","col-sm-12","col-12"):Q.classList.add("card-column","col-xl-3","col-lg-6","col-md-6","col-sm-6","col-12");const te=document.createElement("div");te.classList.add("simple-card-component-container","card","h-100","product-card","text-with-image","gradient"),te.setAttribute("role","img"),te.setAttribute("data-config-metrics-title",H),te.style.backgroundColor="transparent";const K=document.createElement("div");K.classList.add("card-link"),K.setAttribute("data-config-metrics-alink",m.url),K.setAttribute("rel","noopener"),K.setAttribute("aria-label",H),K.setAttribute("data-config-metrics-item",H),K.addEventListener("click",()=>{m.url&&o==0&&window.open(m.url,ne??"_self")});const ee=document.createElement("div");ee.classList.add("h-100","fixed-width-small","card"),ee.setAttribute("data-config-metrics-title",H),ee.addEventListener("click",qe=>de(qe,"link",m.url));const ue=document.createElement("div");ue.classList.add("card-component-image");const F=document.createElement("div");F.style.position="relative",F.style.width="100%",F.style.height="0px",F.style.paddingBottom="100%";const W=document.createElement("div");W.classList.add("lazy-img","onecms-img"),W.style.position="absolute",W.style.inset="0px";const re=E(m.image)?m==null?void 0:m.image:A(m==null?void 0:m.isDamAsset);W.setAttribute("data-alt",H),W.setAttribute("data-src",re),W.setAttribute("data-default-img",A(m.isDamAsset)),F.append(W),ue.append(F),ee.append(ue);const Z=document.createElement("div");Z.classList.add("d-flex","flex-column","card-body"),Z.style.backgroundColor=Ae.bgColor==="assagrey"?"#ffffff"
32:"#f4f4f4";const G=document.createElement("div");G.classList.add("card-title","card-title","h5");const le=document.createElement("span");le.classList.add("card-title-text"),le.innerHTML=st(H),G.append(le),Z.append(G);const me=document.createElement("div");me.classList.add("card-text","enable-ellipsis","line-clamp-3"),me.innerHTML=m.description?m.description==="N/A"?"":st(m.description):"",Z.append(me);const B=document.createElement("div");B.classList.add("button-container","d-flex","mt-auto");const he=document.createElement("button");he.classList.add("onecms-button","base-btn","primary-btn","small-btn"),he.setAttribute("type","button");let oe="";const fe=Ae.whereToBuyLink;fe?oe=i?((Te=m==null?void 0:m.category)==null?void 0:Te.toLocaleLowerCase())==="product family"||((Ee=m==null?void 0:m.category)==null?void 0:Ee.toLocaleLowerCase())==="web category"?fe:m.url:oe=m.category!=="products"?m.url:fe:oe=m.url;const Le=Ae.nonProductButtonText,pe=Ae.productButtonText,we=i?(()=>{var qe,Ne;return m.isDamAsset?Ce:((qe=m==null?void 0:m.category)==null?void 0:qe.toLocaleLowerCase())==="product family"||((Ne=m==null?void 0:m.category)==null?void 0:Ne.toLocaleLowerCase())==="web category"?J:ye})():m.category!=="products"?$??Le:pe,Be=ne??"_self";he.setAttribute("data-config-metrics-item",we),he.setAttribute("data-config-metrics-title",we),he.textContent=we,he.addEventListener("click",qe=>{oe&&Be&&(qe.stopPropagation(),ne==="_self"&&(o=1),de(qe,"button",oe),window.open(oe,Be))}),B.append(he),Z.append(B),ee.append(Z),K.append(ee),te.append(K),Q.append(te),V.append(Q)},Re=(m,V)=>{var Be,Te;let Q=document.createElement("div");Q.className="col-sm-12";let H=ae(m),te=document.createElement("div");te.className="list-view-card-container",te.setAttribute("data-config-metrics-title",H);const K=document.createElement("div");K.classList.add("card-link"),K.setAttribute("data-config-metrics-alink",m.url),K.addEventListener("click",Ee=>de(Ee,"link",m.url)),K.setAttribute("rel","noopener"),K.setAttribute("aria-label",H),K.setAttribute("data-config-metrics-item",H),K.addEventListener("click",()=>{m.url&&o==0&&window.open(m.url,ne??"_self")});let ee=document.createElement("div");ee.className="product-card";let ue=document.createElement("div");ue.className="pcard-image onecms-img";const F=E(m.image)?m==null?void 0:m.image:A(m==null?void 0:m.isDamAsset);ue.setAttribute("data-alt",H),ue.setAttribute("data-src",F),ue.setAttribute("data-default-img",A(m.isDamAsset)),ee.appendChild(ue);let W=document.createElement("div");W.className="pcard-body",W.style.backgroundColor=Ae.bgColor==="assagrey"?"#ffffff"
32:"#f4f4f4";let re=document.createElement("h4");re.textContent=H,W.appendChild(re);let Z=document.createElement("p");Z.className="pbody-text";let G=document.createElement("span");G.setAttribute("width","0");let le=document.createElement("span");le.textContent=m.description?m.description==="N/A"?"":m.description:"",le.appendChild(G),Z.appendChild(le),W.appendChild(Z);let me=document.createElement("div");me.className="cta-container d-flex mt-auto";let B=document.createElement("button");B.type="button",B.className="onecms-button base-btn primary-btn small-btn";let he="";const oe=Ae.whereToBuyLink;oe?he=i?((Be=m==null?void 0:m.category)==null?void 0:Be.toLocaleLowerCase())==="product family"||((Te=m==null?void 0:m.category)==null?void 0:Te.toLocaleLowerCase())==="web category"?oe:m.url:he=m.category!=="products"?m.url:oe:he=m.url;const fe=Ae.nonProductButtonText,Le=Ae.productButtonText,Ie=i?(()=>{var Ee,qe;return m.isDamAsset?Ce:((Ee=m==null?void 0:m.category)==null?void 0:Ee.toLocaleLowerCase())==="product family"||((qe=m==null?void 0:m.category)==null?void 0:qe.toLocaleLowerCase())==="web category"?J:ye})():m.category!=="products"?$??fe:Le,we=ne??"_self";B.setAttribute("data-config-metrics-item",Ie),B.setAttribute("data-config-metrics-title",Ie),B.textContent=Ie,B.addEventListener("click",Ee=>{he&&we&&(Ee.stopPropagation(),ne==="_self"&&(o=1),window.handleButtonOrLinkClick&&window.handleButtonOrLinkClick("button_click","button click",B.closest("[data-config-metrics-item]"),he),window.open(he,we))}),me.appendChild(B),W.appendChild(me),ee.appendChild(W),K.appendChild(ee),te.appendChild(K),Q.appendChild(te),V.append(Q)},Fe=(m,V)=>{m.forEach(Q=>{q===0?ce(Q,V):Re(Q,V)})},Pe=()=>{k.updateSearchRequest({...Se,query:w,pageSize:c,page:l,sort:u,productFirst:L,searchType:g})};Y();const xe=m=>m&&!m.includes("thumb.319.319")?m:"",We=(m,V)=>{var K,ee,ue,F,W,re,Z,G,le,me;const Q=B=>B.toLowerCase().includes("asset"),H=(K=m==null?void 0:m.results)==null?void 0:K.map(B=>{var he,oe,fe,Le,pe,Ie,we,Be,Te,Ee;return{url:(he=B==null?void 0:B.url)==null?void 0:he.raw,title:(oe=B==null?void 0:B.title)==null?void 0:oe.raw,pageTitle:(fe=B==null?void 0:B.pageTitle)==null?void 0:fe.raw,pageSeoTitle:(Le=B==null?void 0:B.pageSeoTitle)==null?void 0:Le.raw,titleResults:(pe=B==null?void 0:B[ie])==null?void 0:pe.raw,description:(Ie=B==null?void 0:B.description)==null?void 0:Ie.raw,image:xe(((we=B==null?void 0:B.pageImage)==null?void 0:we.raw)??((Be=B==null?void 0:B.thumbnail)==null?void 0:Be.raw)),category:(Te=B==null?void 0:B.pageType)==null?void 0:Te.raw,isDamAsset:Q(((Ee=B==null?void 0:B.primaryType)==null?void 0:Ee.raw)||"")}}),te=(ee=V==null?void 0:V.results)==null?void 0:ee.map(B=>{var he,oe,fe,Le,pe,Ie,we,Be,Te,Ee;return{url:(he=B==null?void 0:B.url)==null?void 0:he.raw,title:(oe=B==null?void 0:B.title)==null?void 0:oe.raw,pageTitle:(fe=B==null?void 0:B.pageTitle)==null?void 0:fe.raw,pageSeoTitle:(Le=B==null?void 0:B.pageSeoTitle)==null?void 0:Le.raw,titleResults:(pe=B==null?void 0:B[ie])==null?void 0:pe.raw,description:(Ie=B==null?void 0:B.description)==null?void 0:Ie.raw,image:((we=B==null?void 0:B.pageImage)==null?void 0:we.raw)??((Be=B==null?void 0:B.thumbnail)==null?void 0:Be.raw),category:(Te=B==null?void 0:B.pageType)==null?void 0:Te.raw,isDamAsset:Q(((Ee=B==null?void 0:B.primaryType)==null?void 0:Ee.raw)||"")}});return g=void 0,{numFound:((F=(ue=m==null?void 0:m.meta)==null?void 0:ue.page)!=null&&F.total_results?m.meta.page.total_results:0)+((re=(W=V==null?void 0:V.meta)==null?void 0:W.page)!=null&&re.total_results?V.meta.page.total_results:0),results:((Z=V==null?void 0:V.results)==null?void 0:Z.length)>0&&((G=m==null?void 0:m.results)==null?void 0:G.length)>0?[...H,...te]:((le=m==null?void 0:m.results)==null?void 0:le.length)>0?H:((me=V==null?void 0:V.results)==null?void 0:me.length)>0&&te}};function Ke(m,V,Q){const H=(m==null?void 0:m.querySelector(".left-section"))??(n==null?void 0:n.querySelector(".left-section"));H&&H.remove();const te=document.createElement("div");te.classList.add("left-section");const K=document.createElement("span");if(K.classList.add("activeConstraint"),Q){const F=new URLSearchParams(window.location.search);_.file!==_.dam?(_.file&&F.set("filter","site"),_.dam&&F.set("filter","asset")):F.delete("filter");const W=window.location.pathname+"?"+F.toString();history.pushState(null,"",W)}function ee(F){const W=document.createElement("span");W.classList.add("activeConstraintValue");let re=document.createElement("span");re.textContent=F==="file"?U:z,W.appendChild(re);const Z=document.createElementNS("http://www.w3.org/2000/svg","svg");Z.setAttribute("width","1em"),Z.setAttribute("height","1em"),Z.setAttribute("viewBox","0 0 20 20"),Z.setAttribute("fill","currentColor"),Z.
32classList.add("bi","bi-x");const G=document.createElementNS("http://www.w3.org/2000/svg","path");G.setAttribute("fill-rule","evenodd"),G.setAttribute("d","M5.646 5.646a.5.5 0 000 .708l8 8a.5.5 0 00.708-.708l-8-8a.5.5 0 00-.708 0z"),G.setAttribute("clip-rule","evenodd");const le=document.createElementNS("http://www.w3.org/2000/svg","path");return le.setAttribute("fill-rule","evenodd"),le.setAttribute("d","M14.354 5.646a.5.5 0 010 .708l-8 8a.5.5 0 01-.708-.708l8-8a.5.5 0 01.708 0z"),le.setAttribute("clip-rule","evenodd"),Z.appendChild(G),Z.appendChild(le),W.appendChild(Z),Z.addEventListener("click",function(){W.remove(),F==="file"?_.file=!1:_.dam=!1,F==="file"?b.checked=!1:h.checked=!1,K.children.length===0?te.remove&&Ge(!0):Ze();const me=new URLSearchParams(window.location.search);_.file!==_.dam?(_.file&&me.set("filter","site"),_.dam&&me.set("filter","asset")):me.delete("filter");const B=window.location.pathname+"?"+me.toString();history.pushState(null,"",B)}),W}_.file&&K.appendChild(ee("file")),_.dam&&K.appendChild(ee("dam")),te.appendChild(K);const ue=r.querySelector("result-title");window.matchMedia("(min-width: 577px)").matches&&m.insertBefore(te,V),window.matchMedia("(max-width: 576px)").matches&&te.classList.add("col-sm-12"),window.matchMedia("(max-width: 576px)").matches&&r.insertBefore(te,ue)}function lt(m){const V=document.createElement("div");V.classList.add("mobile-view-drawer");const Q=document.createElement("div");Q.classList.add("drawer"),V.appendChild(Q);const H=document.createElement("div");H.classList.add("drawer-header");const te=document.createElement("div");te.classList.add("drawer-puller");const K=document.createElementNS("http://www.w3.org/2000/svg","svg");K.setAttribute("xmlns","http://www.w3.org/2000/svg"),K.setAttribute("viewBox","0 0 16 16"),K.setAttribute("width","1em"),K.setAttribute("height","1em"),K.setAttribute("fill","currentColor");const ee=document.createElementNS("http://www.w3.org/2000/svg","path");ee.setAttribute("fill-rule","evenodd"),ee.setAttribute("d","M10.5 1a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V4H1.5a.5.5 0 0 1 0-1H10V1.5a.5.5 0 0 1 .5-.5ZM12 3.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5Zm-6.5 2A.5.5 0 0 1 6 6v1.5h8.5a.5.5 0 0 1 0 1H6V10a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5ZM1 8a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2A.5.5 0 0 1 1 8Zm9.5 2a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V13H1.5a.5.5 0 0 1 0-1H10v-1.5a.5.5 0 0 1 .5-.5Zm1.5 2.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5Z"),K.appendChild(ee),te.appendChild(K);const ue=document.createTextNode("FILTER");te.appendChild(ue);const F=document.createElement("div");F.classList.add("drawer-close-icon"),F.addEventListener("click",()=>{var le;(le=se.parent.querySelector(".overlay"))==null||le.remove(),se.drawerContainer.classList.remove("open")});const W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("width","1em"),W.setAttribute("height","1em"),W.setAttribute("viewBox","0 0 20 20"),W.setAttribute("fill","currentColor"),W.classList.add("bi","bi-x");const re=document.createElementNS("http://www.w3.org/2000/svg","path");re.setAttribute("fill-rule","evenodd"),re.setAttribute("d","M5.646 5.646a.5.5 0 000 .708l8 8a.5.5 0 00.708-.708l-8-8a.5.5 0 00-.708 0z"),re.setAttribute("clip-rule","evenodd");const Z=document.createElementNS("http://www.w3.org/2000/svg","path");Z.setAttribute("fill-rule","evenodd"),Z.setAttribute("d","M14.354 5.646a.5.5 0 010 .708l-8 8a.5.5 0 01-.708-.708l8-8a.5.5 0 01.708 0z"),Z.setAttribute("clip-rule","evenodd"),W.appendChild(re),W.appendChild(Z),F.appendChild(W),H.appendChild(te),H.appendChild(F),Q.appendChild(H);const G=document.createElement("div");G.classList.add("drawer-content"),Q.appendChild(G),et(G),m.appendChild(V),se={parent:V,drawerContainer:Q,drawerContent:G}}function Ze(){var m,V,Q;if(!(S.file===_.file&&S.dam===_.dam)){I=!0,l=1,S.file=_.file,S.dam=_.dam,_.file&&_.dam||!_.file&&!_.dam?g="both":_.file?g="site":g="asset",D=[];const H=f==null?void 0:f.querySelectorAll(".row");H&&(Me(H[0]),Me(H[1])),c=C==="both"&&g!=="asset"&&g!=="site"?R+P:g!=="asset"?P:R,Pe(),window.matchMedia("(max-width: 576px)").matches&&(se==null||se.drawerContainer.classList.remove("open"),(V=(m=se==null?void 0:se.parent)==null?void 0:m.querySelector(".overlay"))==null||V.remove()),!_.file&&!_.dam?(Q=n.querySelector(".left-section"))==null||Q.remove():Ke(y,y==null?void 0:y.querySelector(".result-display-container p"),!0)}}function Ge(m){var V,Q,H;
32if(!(!_.file&&!_.dam)||n.querySelector(".left-section")||m){l=1,g="both",D=[];const te=f.querySelectorAll(".row");te&&(Me(te[0]),Me(te[1])),c=R+P,Pe(),(V=n.querySelector(".left-section"))==null||V.remove(),_={file:void 0,dam:void 0},S={file:void 0,dam:void 0},b.checked=!1,h.checked=!1,window.matchMedia("(max-width: 576px)").matches&&(se==null||se.drawerContainer.classList.remove("open"),(H=(Q=se==null?void 0:se.parent)==null?void 0:Q.querySelector(".overlay"))==null||H.remove())}}function et(m){const V=document.createElement("div");V.classList.add("checkbox-container"),V.setAttribute("data-config-metrics-title",T);const Q=document.createElement("div");Q.innerText=T,Q.classList.add("filterHeading"),V.appendChild(Q),x=document.createElement("div"),x.classList.add("checkbox-selectionContainer");const H=document.createElement("label");b=document.createElement("input"),b.setAttribute("aria-label",U||"global search file filter"),b.classList.add("onecms-checkbox-label"),b.setAttribute("name","file"),H.setAttribute("for","file"),b.type="checkbox",b.id="fileOption";const te=document.createElement("div");te.classList.add("onecms-checkbox"),te.appendChild(b),H.appendChild(document.createTextNode(U)),te.appendChild(H),x.appendChild(te);const K=document.createElement("label");h=document.createElement("input"),h.setAttribute("aria-label",U||"global search dam filter"),h.classList.add("onecms-checkbox-label"),h.setAttribute("name","dam"),K.setAttribute("for","dam"),h.type="checkbox",h.id="damOption";const ee=document.createElement("div");ee.classList.add("onecms-checkbox"),ee.appendChild(h),K.appendChild(document.createTextNode(z)),ee.appendChild(K),x.appendChild(ee),V.appendChild(x),m.appendChild(V);function ue(){_={file:b.checked,dam:h.checked}}b.addEventListener("change",ue),h.addEventListener("change",ue),O=document.createElement("div"),O.classList.add("dam-filter-group-btn");const F=document.createElement("button");F.type="button",F.classList.add("onecms-button","base-btn","secondary-btn","small-btn","full-width"),F.setAttribute("data-config-metrics-title","Reset"),F.setAttribute("data-config-metrics-item","Reset"),F.innerText="Reset",F.addEventListener("click",()=>{if(!(!_.file&&!_.dam)||n.querySelector(".left-section")){I=!0,Ge(!1);const Z=new URLSearchParams(window.location.search);Z.delete("filter");const G=window.location.pathname+"?"+Z.toString();history.pushState(null,"",G)}});const W=document.createElement("button");W.type="button",W.classList.add("onecms-button","base-btn","primary-btn","small-btn","full-width"),W.setAttribute("data-config-metrics-title","View Results"),W.setAttribute("data-config-metrics-item","View Results"),W.innerText="View Results",W.addEventListener("click",()=>{Ze()}),O.appendChild(F),O.appendChild(W),V.appendChild(O),(ke==="site"||ke==="asset")&&C==="both"&&v&&(ke==="site"?b.checked=!0:h.checked=!0,_={file:b.checked,dam:h.checked},Ke(y,y==null?void 0:y.querySelector(".result-display-container p"),!1));const re=document.querySelector(".ems-quick-links-wrapper");window.addEventListener("scroll",function(){const Z=x==null?void 0:x.getBoundingClientRect();i&&window.matchMedia("(min-width: 577px)").matches&&C==="both"&&v&&(Z.bottom+O.clientHeight<=window.innerHeight-((re==null?void 0:re.clientHeight)??0)?(O.style.position="static",O.style.removeProperty("width")):(O.style.position="fixed",O.style.bottom=re?"56px":"0px",O.style.width=`${Z.width}px`,O.style.left=`${Z.left}px`))})}const Ve=document.querySelectorAll(".onecms-controls-container");if(Ve&&Ve.length>0){const m=Ve[0];i&&(a=rt),a&&(ke&&(g=ke),i&&(c=C==="both"?g!=="asset"&&g!=="site"?R+P:g==="asset"?R:P:C==="site"?P:R),L=i?(t==null?void 0:t.productFirst)==="true":!!m.getAttribute("productFirst"),k=new ct(i,C,{sitePageFilters:(t==null?void 0:t.siteDefaultFilters)||[],damFilters:(t==null?void 0:t.damDefaultFilters)||[]},!1,()=>{var te,K,ee,ue;const V=i&&Array.isArray(k==null?void 0:k.response)?We(k.response[0],k.response[1]):k.response,Q=k.error,H=m.querySelector(".result-title");if(Q){if(H){let F=H.querySelector("h6");F||(F=document.createElement("h6"),F.classList.add("no-result-found"),H.appendChild(F)),F.textContent=Q!=null&&Q.length?Q:"An error occured while searching.";const W=document.querySelector(".searchCountSpan");W&&i&&C==="both"&&g!=="both"&&!window.matchMedia("(max-width: 576px)").matches&&(W.textContent="Search result count:  0")}}else if((te=H.querySelector("h6"))==null||te.remove(),V){const F=V.numFound,W=m.querySelectorAll(".row");r=W[1];const re=(K=W[1])==null?void 0:K.querySelector("span"),Z=y==null?void 0:y.querySelector(".searchCountSpan");if(W.length>1&&!(i&&C==="both"&&v&&!window.matchMedia("(max-width: 576px)").matches)&&re){if(re&&((ee=re==null?void 0:re.textContent)!=null&&ee.includes("Search result count"))){const G=Array.from(re.children);re.innerHTML="",re.textContent="Search result count: "+F,G==null||G.forEach(le=>{re.appendChild(le)})}}else if(i&&C==="both"&&v&&!window.matchMedia("(max-width: 576px)").matches&&Z){const G=Array.from(Z.children);Z.innerHTML="",Z.textContent="Search result count: "+F,G==null||G.forEach(le=>{Z.appendChild(le)})}if(F==0){let G=H.querySelector("h6");G||(G=document.createElement("h6"),H.appendChild(G));const le=H.getAttribute("noResultMessage");
32G.textContent=le!=null&&le.length?le:"No records found.";const me=H.querySelector(".searchCountSpan"),B=H.getAttribute("searchResultCountText");me&&!(i&&C==="both"&&v&&!window.matchMedia("(max-width: 576px)").matches)&&(me.textContent=(B!=null&&B.length?B:"Search result count:  ")+F)}else{(ue=H.querySelector("p"))==null||ue.remove();let G;if(!G){G=document.createElement("p");const me=document.createElement("span");me.classList.add("searchCountSpan");const B=H.getAttribute("searchResultCountText");if(me.textContent=(B!=null&&B.length?B:"Search result count:  ")+F,C==="both"){const oe=document.createElement("span");oe.addEventListener("click",()=>{const pe=document.createElement("div");pe.classList.add("overlay"),se==null||se.parent.insertBefore(pe,se.drawerContainer),se==null||se.drawerContainer.classList.add("open")}),oe.id="filterIcon",oe.classList.add("result-filter-icon");const fe=document.createElementNS("http://www.w3.org/2000/svg","svg");fe.setAttribute("xmlns","http://www.w3.org/2000/svg"),fe.setAttribute("viewBox","0 0 16 16"),fe.setAttribute("width","1em"),fe.setAttribute("height","1em"),fe.setAttribute("fill","currentColor");const Le=document.createElementNS("http://www.w3.org/2000/svg","path");Le.setAttribute("d","M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"),fe.appendChild(Le),oe.appendChild(fe),window.matchMedia("(max-width: 576px)").matches&&me.appendChild(oe)}G.appendChild(me);const he=n==null?void 0:n.querySelector(".result-card-container .result-display-section");(!(V.results.length>0)&&!he||window.matchMedia("(max-width: 576px)").matches)&&H.appendChild(G)}const le=V.results;if(le&&le.length>0){D.push(...le);const me=m.parentElement;N(me),f=me.querySelector(".result-card-container .result-display-section");let B=f==null?void 0:f.querySelectorAll(".row")[0];if(!f){const Ne=document.createElement("div");Ne.classList.add("result-card-container"),y=document.createElement("div"),y.classList.add("result-display-container"),f=document.createElement("div"),f.classList.add("result-display-section"),i&&C==="both"&&v&&f.classList.add("elastic-results"),B=document.createElement("div"),B.classList.add("row"),i&&B.classList.add("elastic-row"),i&&C==="both"&&v&&!window.matchMedia("(max-width: 576px)").matches?y.appendChild(G):H.appendChild(G),y.append(f),i&&window.matchMedia("(min-width: 577px)").matches&&C==="both"&&v&&et(Ne),i&&window.matchMedia("(max-width: 576px)").matches&&C==="both"&&v&&lt(Ne),Ne.append(y),f.append(B),me.append(Ne)}Fe(le,B);let he=f==null?void 0:f.querySelectorAll(".row")[1],oe,fe,Le,pe;he?(oe=he.querySelector(".pagination-controls"),oe?(fe=oe.firstElementChild,Le=oe.querySelector(".progress"),pe=Le.firstElementChild):(oe=document.createElement("div"),oe.classList.add("pagination-controls"),fe=document.createElement("p"),Le=document.createElement("div"),Le.classList.add("progress"),pe=document.createElement("div"),pe.classList.add("progress-bar"),pe.setAttribute("role","progressbar"),pe.setAttribute("aria-valuemin","0"),pe.setAttribute("aria-valuemax","100"),Le.append(pe),oe.append(fe),oe.append(Le))):(he=document.createElement("div"),he.classList.add("row"),i&&B.classList.add("elastic-row"),oe=document.createElement("div"),oe.classList.add("pagination-controls"),fe=document.createElement("p"),Le=document.createElement("div"),Le.classList.add("progress"),pe=document.createElement("div"),pe.classList.add("progress-bar"),pe.setAttribute("role","progressbar"),pe.setAttribute("aria-valuemin","0"),pe.setAttribute("aria-valuemax","100"),Le.append(pe),oe.append(fe),oe.append(Le)),i?I?(p=(l-1)*c+le.length,I=!1):p=p+le.length:p=l*c+le.length,fe.textContent=`Showing ${p} of ${F}`;const Ie=p/F*100;pe.setAttribute("style",`width: ${Ie}%;`),pe.setAttribute("aria-valuenow",String(Ie));let we=oe==null?void 0:oe.querySelector("button");F>p?we||(we=document.createElement("button"),we.classList.add("onecms-button","base-btn","primary-btn","small-btn"),we.setAttribute("type","button"),we.setAttribute("data-config-metrics-item","Load More"),we.setAttribute("data-config-metrics-title","Load More"),we.textContent="Load More",we.addEventListener("click",()=>{l+=1,Pe()}),oe.append(we)):we&&(we.style.display="none"),he.append(oe),f.append(he);const Be=m.querySelector(".react-dropdown-select-dropdown");Be.style.display="none";const Te=m.querySelector(".react-dropdown-select-dropdown-handle");Te&&Te.classList.add("upside-down");const Ee=document.querySelector(".ems-quick-links-wrapper"),qe=x==null?void 0:x.getBoundingClientRect();i&&window.matchMedia("(min-width: 577px)").matches&&C==="both"&&v&&(qe.bottom+O.clientHeight<=window.innerHeight-((Ee==null?void 0:Ee.clientHeight)??0)?(O.style.position="static",O.style.removeProperty("width")):(O.style.position="fixed",O.style.bottom=Ee?"56px":"0px",O.style.width=`${qe.width}px`,O.style.left=`${qe.left}px`))}}}},ge,be),Pe())}const Me=m=>{for(;m.firstElementChild;)m.removeChild(m.firstChild)},Qe=()=>{const m=f==null?void 0:f.querySelectorAll(".row");m&&Me(m[0]),Fe(D,(m==null?void 0:m.length)>1&&m[0])};Ve.forEach(m=>{const Q=m.querySelectorAll(".row")[0];if(w){const ee=document.createElement("div");ee.classList.add("col-sm-12");const ue=Q.getAttribute("introTextForSearch"),F=document.createElement("h1");F.textContent=(ue!=null&&ue.length?ue:"You searched for ")+" "+w,ee.append(F),Q.hasChildNodes()?Q.insertBefore(ee,Q.firstChild):Q.append(ee)}const H=Q.querySelector(".react-dropdown-select-dropdown-handle");H&&H.parentElement.addEventListener("click",()=>{const ee=Q.querySelector(".react-dropdown-select-dropdown");H.classList.contains("upside-down")?(H.classList.remove("upside-down"),ee&&ee.removeAttribute("style")):(H.classList.add("upside-down"),ee&&ee.setAttribute("style","display: none;"))});const te=m.querySelector(".react-dropdown-select-dropdown");te&&te.querySelectorAll("span").forEach(ue=>{ue.addEventListener("click",F=>{D=[];const W=F.target,re=W.textContent;W.parentElement.parentElement.firstElementChild.firstElementChild.textContent=re;const Z=W.getAttribute("sortcode"),G=f.querySelectorAll(".row");G&&(Me(G[0]),Me(G[1])),u=i?Z==="title asc"?"asc":Z==="title desc"?"desc":"":Z||"",I=!0,l=i?1:0,k&&Pe()})});const K=m.querySelector(".view-type-options");
32if(K){const ee=K.querySelectorAll("span");if(ee){const ue=ee[0],F=ue.firstElementChild.firstElementChild,W=ee[1],re=W.firstElementChild.firstElementChild;ue.addEventListener("click",()=>{q===1&&(q=0,F.setAttribute("fill","#1a1a1a"),F.removeAttribute("stroke"),re.setAttribute("fill","#1a1a1a"),re.removeAttribute("stroke"),Qe())}),W.addEventListener("click",()=>{q===0&&(q=1,F.setAttribute("fill","#fff"),F.setAttribute("stroke","#1a1a1a"),re.setAttribute("stroke","#1a1a1a"),re.removeAttribute("fill"),Qe())})}}});const tt=()=>{(window.matchMedia("(max-width: 767px)").matches||window.matchMedia("(min-width: 768px) and (max-width: 1200px)").matches)&&(q=0,Qe())};window.addEventListener("resize",tt,{passive:!1}),tt()});document.addEventListener("DOMContentLoaded",function(){var w;const e=document.querySelector(".product-details-container"),s=e==null?void 0:e.querySelector(".details-section"),n=s==null?void 0:s.querySelector(".title"),i=s==null?void 0:s.querySelector(".description"),d=s==null?void 0:s.querySelector(".action-button-anchor"),t=d==null?void 0:d.querySelector("button"),a=e==null?void 0:e.querySelector(".variation-select"),l=e==null?void 0:e.querySelectorAll(".product-details-image-section"),o=a==null?void 0:a.querySelector(".select-selected"),u=a==null?void 0:a.querySelector(".select-items"),r=g=>JSON.parse(decodeURIComponent(escape(atob(g))).replace(/\n/g,"")),c=(e==null?void 0:e.getAttribute("cmp-data"))!==void 0&&r(e==null?void 0:e.getAttribute("cmp-data"));o==null||o.addEventListener("click",function(g){g.stopPropagation(),L(this),u.classList.toggle("select-hide"),o.classList.toggle("select-arrow-active")}),(w=u==null?void 0:u.querySelectorAll("div"))==null||w.forEach(function(g){g.addEventListener("click",function(){const h=this.getAttribute("data-value");o.querySelector(".selected-title").textContent=this.textContent,n.textContent=this.textContent,i.innerHTML=c.productsList[h].description,c.productsList[h].ctaLabel&&c.productsList[h].ctaLink?(d.classList.remove("hide"),d.href=c.productsList[h].ctaLink,d.target=c.productsList[h].ctaTarget,t.textContent=c.productsList[h].ctaLabel,t==null||t.setAttribute("data-config-metrics-item",c.productsList[h].ctaLabel)):d.classList.contains("hide")||d.classList.add("hide"),u.classList.add("select-hide"),o.classList.remove("select-arrow-active"),l.forEach(b=>{b.classList.contains(`container${h}`)?b.classList.remove("hide"):b.classList.add("hide")})})});function L(g){a==null||a.querySelectorAll(".select-items").forEach(function(h){h.previousElementSibling!==g&&h.classList.add("select-hide")}),a==null||a.querySelectorAll(".select-selected").forEach(function(h){h!==g&&h.classList.remove("select-arrow-active")})}document.addEventListener("click",L),l==null||l.forEach(g=>{let h=0;const b=(U,C,P,R)=>{h=O(h+1,U,C,P,R)},x=(U,C,P,R)=>{h=O(h-1,U,C,P,R)},O=(U,C,P,R,j)=>{let M=U;(U>=C||U<0)&&(M=0),f(M,R,j,C);const ne=-100*M+"%";return P.forEach($=>{$.style.transform="translateX("+ne+")"}),M},f=(U,C,P,R)=>{if(R===1){C==null||C.classList.add("disabled"),P==null||P.classList.add("disabled"),P.setAttribute("disabled",""),C.setAttribute("disabled","");return}U===0?(C==null||C.classList.add("disabled"),P==null||P.classList.remove("disabled"),P.removeAttribute("disabled"),C.setAttribute("disabled","")):U+1===R?(C==null||C.classList.remove("disabled"),P==null||P.classList.add("disabled"),P.setAttribute("disabled",""),C.removeAttribute("disabled")):(C==null||C.classList.remove("disabled"),P==null||P.classList.remove("disabled"),P.removeAttribute("disabled"),C.removeAttribute("disabled"))},y=(U,C,P,R,j,M,ne)=>{const $=U-C;$>P?x(R,j,M,ne):$<-50&&h!==R-1&&b(R,j,M,ne)},v=g.querySelectorAll(".imageswiper-item"),T=g.querySelector(".imageswiper-container-image"),z=g.querySelector(".imageswiper-container-mobile");if(v&&v.length>0){v[0].classList.add("active-product"),v.forEach($=>{$.classList.contains("active-product")&&(T==null||T.setAttribute("data-src",$.childNodes[1].getAttribute("data-src")),T==null||T.setAttribute("data-alt",$.childNodes[1].getAttribute("data-alt"))),$.addEventListener("click",function(){if(v.forEach(J=>{J.classList.remove("active-product")}),$.classList.add("active-product"),$.classList.contains("active-product")){T==null||T.setAttribute("data-src",$.childNodes[1].getAttribute("data-src"));const J=T==null?void 0:T.querySelector("img");J==null||J.setAttribute("src",$.childNodes[1].getAttribute("data-src")),J==null||J.setAttribute("alt",$.childNodes[1].getAttribute("data-alt"))}})});const U=g.querySelectorAll(".imageswiper-mobile-image"),C=g.querySelector(".carousel-next"),P=U.length;C.addEventListener("click",()=>b(P,U,R,C));const R=g.querySelector(".carousel-prev");(h===0||P===1)&&f(0,R,C,P),R.addEventListener("click",()=>x(P,U,R,C));let j=0,M=0;const ne=50;z.addEventListener("touchstart",$=>{j=$.touches[0].clientX}),z.addEventListener("touchend",$=>{M=$.changedTouches[0].clientX,y(M,j,ne,P,U,R,C)})}})});document.addEventListener("DOMContentLoaded",()=>{const e=g=>{g.style.cursor="not-allowed",g.style.backgroundColor="#f9f9f9";const h=g.firstElementChild.firstElementChild;h.style.opacity="0.3"},s=g=>{g.removeAttribute("style"),g.firstElementChild.firstElementChild.removeAttribute("style")},n=(g,h,b)=>{var z,U,C;const x=h.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement,f=x.querySelector(".product-search-dropdowns").firstElementChild,y=(z=f.firstElementChild)==null?void 0:z.querySelector(".react-dropdown-select"),v=(U=f.lastElementChild)==null?void 0:U.querySelector(".react-dropdown-select"),T=(C=x.lastElementChild)==null?void 0:C.querySelectorAll("button");b?(g.style.display="none",h.style.display="",e(y),e(v),T&&T.forEach(P=>{P.removeAttribute("disabled")})):(g.style.display="",h.style.display="none",s(y),T&&T.forEach(P=>{P.setAttribute("disabled","")}))},i=(g,h,b)=>{if(g&&g.style.display==="none"){const x=h.parentElement.parentElement.parentElement.firstElementChild;x.value="",b="",n(g,h,b);const f=g.parentElement.parentElement.parentElement.parentElement.lastElementChild,y=f.firstElementChild;y.innerHTML="",f.style.display="none"}},d=g=>{const h=g.target,b=h.textContent,O=h.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild;O.value=b;const f=h.parentElement.parentElement.parentElement;f.innerHTML="";const y=f.parentElement;y.style.display="none"},t=(g,h)=>{const b=h.parentElement.parentElement.parentElement.parentElement,x=h.parentElement.lastElementChild,O=x==null?void 0:x.firstElementChild;if(g.length>2){const v=b.querySelector(".product-search-dropdowns").firstElementChild.lastElementChild.firstElementChild.querySelectorAll(".react-dropdown-select-dropdown"),T=[];v&&v.forEach(z=>{const U=z.getAttribute("category"),C=z.querySelectorAll("span"),P=[];C&&C.length>
320&&Array.from(C).slice(1).forEach(j=>{j.textContent&&j.textContent.includes(g)&&P.push(j.textContent)}),P.length>0&&T.push({category:U,products:P}),x&&(O.innerHTML="",T.length>0&&(T.forEach(R=>{const j=document.createElement("div");j.classList.add("list-group-item");const M=document.createElement("h5");M.textContent=R.category,j.append(M);const ne=document.createElement("div");ne.classList.add("list-group"),R.products.forEach($=>{const J=document.createElement("div");J.classList.add("list-group-item"),J.setAttribute("data-suggestion-value",$),J.style.cursor="pointer",J.textContent=$,J.addEventListener("click",ye=>d(ye)),ne.append(J)}),j.append(ne),O.append(j)}),x.style.display=""))})}else x.style.display="none",O.innerHTML=""},a=(g,h)=>{g&&h&&(g.classList.contains("upside-down")?(g.classList.remove("upside-down"),h.style.display=""):(g.classList.add("upside-down"),h.style.display="none"))},l=(g,h)=>{if(h){const b=h[0];if(b&&b.hasAttribute("category")){const f=b.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.textContent;h.forEach(y=>{y.getAttribute("category")===f&&a(g,y)})}else a(g,b)}},o=g=>{const h=g.target,b=h.querySelector(".react-dropdown-select-dropdown-handle"),x=h.querySelectorAll(".react-dropdown-select-dropdown");l(b,x)},u=g=>{let h=g.target;h instanceof HTMLSpanElement&&(h=h.parentElement);const b=h.parentElement.querySelector(".react-dropdown-select-dropdown-handle"),x=h.parentElement.querySelectorAll(".react-dropdown-select-dropdown");l(b,x)},r=g=>{let h=g.target;h instanceof SVGTextPathElement&&(h=h.parentElement);const b=h.parentElement,x=b.parentElement.querySelectorAll(".react-dropdown-select-dropdown");l(b,x)},c=g=>{const h=g.querySelector(".react-dropdown-select-dropdown-handle");h.classList.contains("upside-down")||h.classList.add("upside-down");const b=g.querySelectorAll(".react-dropdown-select-dropdown");b&&b.forEach(x=>{x.style.display="none"})},L=g=>{g.querySelectorAll("span").forEach(b=>{b.addEventListener("click",x=>{const O=x.target,f=O.parentElement,y=f.parentElement.querySelector(".react-dropdown-select-dropdown-handle");a(y,f);const v=f.parentElement.firstElementChild.firstElementChild,T=v.textContent,z=O.textContent;v.textContent=z,O.parentElement.querySelectorAll("span").forEach(M=>{M.classList.remove("react-dropdown-select-item-selected")}),O.classList.add("react-dropdown-select-item-selected");const C=y.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement,R=C.closest(".onecms-product-search").querySelector(".search-input"),j=C.lastElementChild.querySelector(".react-dropdown-select");if(O.getAttribute("item-index")!=="0")f.hasAttribute("category")?C.parentElement.parentElement.lastElementChild.querySelectorAll("button").forEach($=>{$.removeAttribute("disabled")}):(s(j),T!==z&&(C.lastElementChild.querySelectorAll(".react-dropdown-select-dropdown span").forEach($=>{$.getAttribute("item-index")==="0"?(C.lastElementChild.querySelector(".react-dropdown-select-content span").textContent=$.textContent,$.classList.add("react-dropdown-select-item-selected")):$.classList.remove("react-dropdown-select-item-selected")}),C.parentElement.parentElement.lastElementChild.querySelectorAll("button").forEach($=>{$.setAttribute("disabled","")})),R.disabled=!0);else{if(!f.hasAttribute("category")){const $=C.lastElementChild.querySelector(".react-dropdown-select");e($),C.lastElementChild.querySelectorAll(".react-dropdown-select-dropdown span").forEach(J=>{J.getAttribute("item-index")==="0"?(C.lastElementChild.querySelector(".react-dropdown-select-content span").textContent=J.textContent,J.classList.add("react-dropdown-select-item-selected")):J.classList.remove("react-dropdown-select-item-selected")})}R.removeAttribute("disabled"),C.parentElement.parentElement.lastElementChild.querySelectorAll("button").forEach($=>{$.setAttribute("disabled","")})}c(j)})})},w=document.querySelectorAll(".onecms-product-search");w&&w.forEach(g=>{let h="";const b=g.querySelector(".search-icon-container");b.addEventListener("click",J=>{var ie,ge;const ye=J.target,Ce=(ie=ye.firstElementChild)==null?void 0:ie.firstElementChild,X=(ge=ye.firstElementChild)==null?void 0:ge.lastElementChild;i(Ce,X,h)});const x=b.firstElementChild;x.addEventListener("click",J=>{const ye=J.target,Ce=ye.firstElementChild,X=ye.lastElementChild;i(Ce,X,h)}),x.lastElementChild.addEventListener("click",J=>{const ye=J.target,Ce=ye.parentElement.firstElementChild;i(Ce,ye,h)}),g.querySelector(".search-input").addEventListener("input",J=>{const ye=J.target;h=ye.value;const Ce=ye.parentElement,X=Ce.querySelectorAll("svg"),ie=X[0],ge=X[1];n(ie,ge,h),t(h,Ce)});const y=g.querySelector(".product-search-dropdowns"),v=y.firstElementChild.firstElementChild;v.firstElementChild.addEventListener("click",J=>o(J)),v.querySelector(".react-dropdown-select-content").addEventListener("click",J=>u(J)),v.querySelector(".react-dropdown-select-dropdown-handle").firstElementChild.addEventListener("click",J=>r(J));const C=y.firstElementChild.lastElementChild;C.firstElementChild.addEventListener("click",J=>o(J)),C.querySelector(".react-dropdown-select-content").addEventListener("click",J=>u(J)),C.querySelector(".react-dropdown-select-dropdown-handle").firstElementChild.addEventListener("click",J=>r(J));const M=v.querySelector(".react-dropdown-select-dropdown");L(M),C.querySelectorAll(".react-dropdown-select-dropdown").forEach(J=>{L(J)});const $=g.lastElementChild.firstElementChild.firstElementChild.querySelectorAll("button");$&&$.forEach(J=>{J.addEventListener("click",ye=>{const Ce=ye.target;let X="";const ie=Ce.parentElement.parentElement.parentElement.parentElement,ge=ie.querySelector(".search-input");if(ge&&ge.value)X=ge.value;
32else{const ke=ie.querySelector(".product-search-dropdowns").firstElementChild.lastElementChild.querySelector(".react-dropdown-select-content span");X=ke==null?void 0:ke.textContent}const be=Ce.getAttribute("data-config-metrics-path"),Se=Ce.getAttribute("data-config-metrics-target");if(be){const se=`${be}?query=productfamily:"${X}"`;window.open(se,Se||"_self")}})})})});document.addEventListener("DOMContentLoaded",function(){function e(d){d.stopPropagation();const t=this.nextElementSibling;if(t&&t.classList.contains("child-container")){const a=t.style.display==="block";n(this,!a)}}function s(d,t){d.querySelectorAll(":scope > .nav-item").forEach(l=>{const o=l;o.setAttribute("data-depth",t.toString());const u=o.nextElementSibling;if(u&&u.classList.contains("child-container")){const r=document.createElement("span");r.classList.add("toggle-indicator"),r.textContent="+",o.prepend(r),s(u,t+1)}})}function n(d,t){const a=d.nextElementSibling;if(a&&a.classList.contains("child-container")){a.style.display=t?"block":"none";const l=d.querySelector(".toggle-indicator");l&&(l.textContent=t?"-":"+")}}document.querySelectorAll(".assa-vertical-nav").forEach(d=>{const t=d.querySelector("div");t?(s(t,1),d.querySelectorAll(".nav-item").forEach(h=>{const b=h,x=b.nextElementSibling;x&&x.classList.contains("child-container")&&(x.style.display="none",b.addEventListener("click",e))})):console.error("Root element not found in one of the navigation components!");const a=d.querySelector(".vertical-nav"),l=d.querySelector(".mobile-toggle"),o=d.querySelector(".show"),u=document.body,r=document.createElement("div");r.className="masked-item",u.appendChild(r),l&&l.addEventListener("click",()=>{a&&(a.style.display="block"),d.classList.add("fixed"),l.style.display="none",o&&(o.style.display="block"),r.classList.add("masked-item-open")}),o&&o.addEventListener("click",()=>{a&&(a.style.display="none"),l.style.display="flex",o&&(o.style.display="none"),d.classList.remove("fixed"),r.classList.remove("masked-item-open")});const c=d.querySelectorAll(".nav-item.active");let L=null;if(c.length>0&&(L=c[c.length-1]),L){n(L,!0);let w=L.closest(".child-container");for(;w;){const g=w.previousElementSibling;g!=null&&g.classList.contains("nav-item")&&n(g,!0),w=g==null?void 0:g.closest(".child-container")}}})});document.addEventListener("DOMContentLoaded",function(){var g;const e=document==null?void 0:document.querySelector(".onecms.cmp-inpage-navigation");if(!e)return;const s=e==null?void 0:e.parentElement;s.style.cssText="position: sticky; top: 0; z-index: 10; width: 100%";let n=!1,i;const d=1500,t=.2,a=80,l=new Map;(g=document==null?void 0:document.querySelectorAll(".inpage-navigation-link"))==null||g.forEach(h=>{var f,y;const b=(f=h==null?void 0:h.getAttribute("data-id"))==null?void 0:f.toString(),x=document==null?void 0:document.getElementById((y=b==null?void 0:b.toString())==null?void 0:y.toLowerCase());let O;x?O=x:O=document==null?void 0:document.getElementById(b),O&&l.set(h,O)});const o=new MutationObserver(h=>{h==null||h.forEach(b=>{if(b.type==="attributes"&&b.attributeName==="class"){const x=b.target;x.classList.contains("active")&&l.forEach((O,f)=>{f!==x&&f.classList.contains("active")&&f.classList.remove("active")})}})});l==null||l.forEach((h,b)=>{o==null||o.observe(b,{attributes:!0})});function u(h){const b=h.getBoundingClientRect(),x=window.innerHeight,O=b.height,y=(Math.min(x,b.bottom)-Math.max(0,b.top))/O*100;return b.top<=x*t&&b.bottom>=x*t&&y>=a}function r(){n||requestAnimationFrame(()=>{let h=!1,b=null,x=0;l.forEach((O,f)=>{const y=O.getBoundingClientRect(),v=window.innerHeight,T=y.height,U=(Math.min(v,y.bottom)-Math.max(0,y.top))/T*100;U>x&&(x=U,b=O)}),l.forEach((O,f)=>{if(!h&&(u(O)||O===b))f.classList.contains("active")||f.classList.add("active"),h=!0;else if(f.classList.contains("active")){const y=c(f);(h||y&&L(y))&&f.classList.remove("active")}}),!h&&b&&l.forEach((O,f)=>{O===b&&f.classList.add("active")})})}function c(h){let b=!1,x=null;return l.forEach((O,f)=>{b&&!x&&(x=O),f===h&&(b=!0)}),x}function L(h){const b=h==null?void 0:h.getBoundingClientRect();return b.top<window.innerHeight&&b.bottom>0}l==null||l.forEach((h,b)=>{b==null||b.addEventListener("click",x=>{x.preventDefault(),clearTimeout(i),n=!0,b.classList.add("active");const f=(h==null?void 0:h.getBoundingClientRect().top)+window.scrollY-86;window.scrollTo({top:f,behavior:"smooth"}),i=setTimeout(()=>{n=!1,r()},d)})});let w=!1;window.addEventListener("scroll",()=>{!w&&!n&&(requestAnimationFrame(()=>{r(),w=!1}),w=!0)},{passive:!0}),r()});document.addEventListener("DOMContentLoaded",function(){const e=document==null?void 0:document.querySelector(".backToTop-container");window.addEventListener("scroll",()=>{const s=document.documentElement.clientHeight;document.documentElement.scrollTop>s?e==null||e.classList.add("show"):e==null||e.classList.remove("show")}),e==null||e.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})});window.custom_babylon_renderer=(e,s,n)=>{const i=`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
33  <title></title>
34  <g id="icomoon-ignore">
35  </g>
36  <path fill="#000" d="M1024.001 31.998c0-17.856-14.143-31.999-31.999-31.999h-287.52c-18.175 0-31.712 14.337-31.744 32.513 0 18.144 13.568 31.488 31.744 31.488h255.519l-0.513 256.735c0 18.175 13.824 31.999 31.999 31.999 18.175-0.032 31.999-13.824 31.999-31.999l0.513-288.256c0-0.096-0.032-0.16-0.032-0.224 0.003-0.096 0.033-0.16 0.033-0.258z"></path>
37  <path fill="#000" d="M320.513-0.001h-287.52c-0.096 0-0.16 0.032-0.255 0.032-0.064 0-0.16-0.032-0.224-0.032-17.856 0-32.002 14.143-32.002 31.999l-0.511 288.256c0 18.175 14.337 31.744 32.513 31.744 18.144 0 31.488-13.568 31.488-31.744l0.511-256.257h255.999c18.175 0 31.999-13.824 31.999-31.999-0.031-18.175-13.855-31.999-31.997-31.999z"></path>
38  <path fill="#000" d="M319.521 959.999h-255.519v-255.999c0-18.175-13.824-31.999-31.999-31.999s-32.002 13.821-32.002 31.999v287.519c0 0.096 0.032 0.16 0.032 0.224 0 0.096-0.032 0.16-0.032 0.255 0 17.856 14.143 31.999 31.999 31.999h287.519c18.175 0 31.712-14.337 31.744-32.513 0.003-18.143-13.566-31.486-31.741-31.486z"></path>
39  <path fill="#000" d="M991.487 672.736c-18.175 0-31.52 13.568-31.488 31.744v255.519h-255.999c-18.175 0-31.999 13.824-31.999 31.999s13.824 31.999 31.999 31.999h287.519c0.096 0 0.16-0.032 0.224-0.032 0.096-0.032 0.16 0.032 0.255 0.032 17.856 0 31.999-14.143 31.999-31.999v-287.519c0.003-18.175-14.334-31.744-32.51-31.744z"></path>
40  </svg>`,d=new Blob([i],{type:"image/svg+xml"}),t=URL.createObjectURL(d);return`
41    <html>
42        <head>
43            <meta charset="UTF-8">
44                <script src=https://preview.babylonjs.com/viewer/babylon.viewer.js><\/script>
45                <script src="https://assets.babylonjs.com/generated/Assets.js"><\/script>
46                <script src="https://preview.babylonjs.com/babylon.js"><\/script>  
47                <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"><\/script>
48                <script src="https://preview.babylonjs.com/postProcessesLibrary/babylonjs.postProcess.min.js"><\/script>
49                <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.js"><\/script>
50                <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"><\/script>
51                <style>
52                  .ems-360d-container nav-bar .nav-container {
53                    justify-content: flex-end;
54                  }
55                  .ems-360d-container nav-bar .nav-container .logo-button {
56                    display: none;
57                  }
58                  .ems-360d-container nav-bar .nav-container .fullscreen {
59                    display: block !important;
60                  }
61                  canvas {
62                    height: 100%;
63                    width: 100%;
64                    outline: none;
65                    z-index: 999;
66                    cursor: move; /* fallback if grab cursor is unsupported */
67				            cursor: grab;
68				            cursor: -moz-grab;
69				            cursor: -webkit-grab;
70                  }
71                  canvas:active {
72					          cursor: grabbing;
73				            cursor: -moz-grabbing;
74				            cursor: -webkit-grabbing;
75				          }
76                  html,
77                  #ems-360d-container {
78                    margin: 0;
79                    height: 100%;
80                    width: 100%;
81                    overflow: hidden;
82                  }
83                  .fullscreen-btn {
84                    position: absolute;
85                    bottom: 10px;
86                    right: 10px;
87                  }
88                  .fullscreen-btn .icon {
89                    pointer-events: none;
90                    display: inline-block;
91                  }
92                  .fullscreen-btn .fullscreen-icon:after {
93                    font-size: 16px;
94                    content: 'E740';
95                  }
96                </style>
97                <title>3D Model rendering</title>
98        </head>
99        <body id="ems-360d-container">
100            <canvas id='3dCanvas' touch-action="none" style="touch-action: none;" tabindex=0></canvas>
101            <script>
102            var canvas = document.getElementById('3dCanvas');
103
104            var startRenderLoop = function (engine, canvas) {
105              engine.runRenderLoop(function () {
106                if (sceneToRender && sceneToRender.activeCamera) {
107                  sceneToRender.render();
108                }
109              });
110            };
111            
112            var engine = null;
113            var scene = null;
114            var sceneToRender = null;
115            var createDefaultEngine = function () {
116              return new BABYLON.Engine(canvas, true, {
117                isPointerLock: false,
118                preserveDrawingBuffer: true,
119                stencil: true,
120                disableWebGL2Support: false,
121              });
122            };
123            
124            var delayCreateScene = function () {
125              // Create a scene.
126              var scene = new BABYLON.Scene(engine);
127              scene.environmentTexture = new BABYLON.CubeTexture('${s}', scene);
128              scene.clearColor = new BABYLON.Color3(1, 1, 1);
129
130              // Append glTF model to scene.
131              BABYLON.SceneLoader.Append(
132                '${e}',
133                '',
134                scene,
135                function (scene) {
136                  scene.createDefaultCameraOrLight(true, true, true);
137                  scene.activeCamera.panningSensibility = 0;
138                  if ( '${n}' !== 'AADSS1183602.glb' ) {
139                    scene.activeCamera.lowerRadiusLimit = 0.1;
140                    scene.activeCamera.upperRadiusLimit = 0.4;
141                  }
142                  scene.activeCamera.wheelDeltaPercentage = 0.009;
143                  scene.activeCamera.alpha += Math.PI;
144                }
145              );
146            
147              // GUI
148              var advancedTexture =
149                BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI('UI');
150              
151              var fs = BABYLON.GUI.Button.CreateImageOnlyButton('b1', '${t}');
152              fs.image.stretch = BABYLON.GUI.Image.STRETCH_NONE;
153              fs.width = '30px';
154              fs.height = '30px';
155              fs.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_BOTTOM;
156              fs.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_RIGHT;
157              fs.isPointerBlocker = 'true';
158              fs.hoverCursor = 'pointer';
159              fs.onPointerUpObservable.add(function () {
160                //engine.enterFullscreen(true);
161                if (engine.isFullscreen) {
162		            engine.exitFullscreen();
163		        } else {
164		            engine.enterFullscreen(false);
165		        }
166                setTimeout(() => {
167                  window.dispatchEvent(
168                    new KeyboardEvent('keydown', {
169                      keyCode: '9',
170                    })
171                  );
172                }, 0);
173              });
174              advancedTexture.addControl(fs);
175              engine.hideLoadingUI();
176              return scene;
177            };
178            
179            window.initFunction = async function () {
180              var asyncEngineCreation = async function () {
181                try {
182                  return createDefaultEngine();
183                } catch (e) {
184                  console.log(
185                    'the available createEngine function failed. Creating the default engine instead'
186                  );
187                  return createDefaultEngine();
188                }
189              };
190            
191              window.engine = await asyncEngineCreation();
192              if (!engine) throw 'engine should not be null.';
193                         
194              engine.displayLoadingUI();
195            
196              startRenderLoop(engine, canvas);
197            
198              window.scene = delayCreateScene();
199            };
200            
201            initFunction().then(() => {
202              sceneToRender = scene;
203            });
204            
205            // Resize
206            window.addEventListener('resize', function () {
207              engine.resize();
208            });
209            
210            window.onload = () => {
211              let canv = document.getElementById('3dCanvas');
212              canv.addEventListener('wheel', function(e){e.preventDefault();}, {passive: false})
213            }
214
215            <\/script>
216        </body>
217    </html>
218    `};window.disposeBabylonModel=function(e){if(!e)return;const s=e.querySelector("iframe");
218if(!s)return;const n=s.contentWindow;if(n&&(n.scene&&typeof n.scene.dispose=="function"&&n.scene.dispose(),n.engine)){try{n.engine.stopRenderLoop()}catch{console.warn("Render loop was already stopped.")}n.engine.dispose()}s.remove()};document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector(".footerContainer-global .top-label");e&&(e.style.display="none",window.addEventListener("scroll",()=>{window.scrollY>window.innerHeight?e.style.display="block":e.style.display="none"}),e.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})}))});document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".cmp-trainingheading__title").forEach(e=>{e.innerHTML=e.innerHTML.replace(Ue,s=>`<sup class="symbol">${s}</sup>`)})});
219
220    })(document, window);

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.