1!function(e){function t(t){for(var o,s,i=t[0],c=t[1],l=t[2],d=0,m=[];d<i.length;d++)s=i[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&m.push(r[s][0]),r[s]=0;for(o in c)Object.prototype.hasOwnProperty.call(c,o)&&(e[o]=c[o]);for(u&&u(t);m.length;)m.shift()();return a.push.apply(a,l||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],o=!0,i=1;i<n.length;i++){var c=n[i];0!==r[c]&&(o=!1)}o&&(a.splice(t--,1),e=s(s.s=n[0]))}return e}var o={},r={2:0},a=[];function s(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=e,s.c=o,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)s.d(n,o,function(t){return e[t]}.bind(null,o));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="";var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=c;a.push([37,0,3]),n()}({37:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(3);function a(e,t=!1){if(!e)return;const n=document.body.querySelector(e),r=document.querySelector("#header").offsetHeight+16;n&&o.a.to(window,{duration:.4,scrollTo:{y:n,offsetY:r}}).then(()=>{if(t){const t=location.origin+location.pathname+e;history.pushState(t,null,t)}})}o.a.registerPlugin(r.a);var s={init(){document.addEventListener("click",(function(e){const t=e.target.closest(".js-section-link");t&&(e.preventDefault(),function(e){a(e.getAttribute("href"),!0)}(t))}))},scrollSection:a},i=n(2);const{scrollSection:c}=s;function l(){document.body.classList.remove("page-is-loading","ajax-is-loading");const e=Array.from(document.querySelectorAll(".js-animate-in, .js-animate-in-children > *, .js-animate-stat"));if(!e.length)return;return i.a.batch(e,{onEnter:e=>{const t=e.filter(e=>e.classList.contains("js-animate-stat")),n=e.filter(e=>!e.classList.contains("js-animate-stat"));if(t){const e=o.a.timeline();t.forEach(t=>{const n=o.a.timeline(),r=t.querySelector(".js-stat-number"),a={val:0},s=parseInt(r.innerHTML.replaceAll(",",""));n.add("start").to(a,{duration:2,val:s,roundProps:"val",onUpdate:function(){r.innerHTML=a.val.toLocaleString()}},"start").to(t,{y:0,opacity:1,duration:.5},"start"),e.add(n,"<10%")})}n&&o.a.to(n,{y:0,opacity:1,duration:.5,stagger:.1})},once:!0})}o.a.registerPlugin(i.a);var u={init:()=>{c(location.hash),l()},initScrollTriggers:l},d=n(4),m=n.n(d);document.body;const f=document.querySelector("#nav"),p=Array.from(document.querySelectorAll(".js-nav-submenu-button"));function h(e){const t=e.currentTarget.parentElement,n=f.querySelector(".nav-submenu-is-active");n&&n!==t&&g(n),t.classList.contains("nav-submenu-is-active")?g(t):function(e){const t=e.querySelector(".js-nav-submenu");o.a.timeline().set(t,{height:"auto",opacity:1}).from(t,{height:0,opacity:0,duration:.1,immediateRender:!1}),e.classList.add("nav-submenu-is-active")}(t)}function g(e){const t=e||document.querySelector(".nav-submenu-is-active");if(!t)return;const n=t.querySelector(".js-nav-submenu");o.a.to(n,{height:0,opacity:0,duration:.05}),t.classList.remove("nav-submenu-is-active")}var v={init(){p.forEach(e=>{e.addEventListener("click",h)}),document.addEventListener("click",e=>{e.target.closest("#header")||g()})},hideSubMenu:g};const y=document.body,b=document.querySelector("#mobile-nav-toggle"),S=document.querySelector("#mobile-nav"),L=Array.from(document.querySelectorAll(".js-mobile-nav-show-submenu")),w=Array.from(document.querySelectorAll(".js-mobile-nav-hide-submenu")),j=document.querySelector("#mobile-nav-main"),q=document.querySelector("#mobile-nav-submenus"),E=Array.from(document.querySelectorAll(".js-mobile-nav-accord-button"));function A(e){const t=e.currentTarget.dataset.accord,n=document.getElementById(t),r=n.closest(".
1js-mobile-nav-submenu-group");r.classList.contains("mobile-nav-submenu-group-active")?k(r,n):function(e,t){e.classList.add("mobile-nav-submenu-group-active"),o.a.to(t,{height:"auto",duration:.2})}(r,n)}function k(e,t){e.classList.remove("mobile-nav-submenu-group-active"),o.a.to(t,{height:0,duration:.2})}function T(){y.classList.contains("mobile-nav-is-active")?x():(o.a.to(S,{xPercent:100,duration:.1,opacity:1}),y.classList.add("mobile-nav-is-active"))}function x(){o.a.timeline().to(S,{xPercent:-100,duration:.1,opacity:0,ease:"none"}).set([j,q,".js-mobile-nav-submenu"],{clearProps:"all"}),y.classList.remove("mobile-nav-is-active")}function P(e){const t=e.currentTarget.dataset.submenu,n=document.getElementById(t),r=n.querySelector(".js-mobile-nav-submenu-group"),a=o.a.timeline();if(a.add("start").set(n,{width:"100%",height:"auto"}).to(j,{xPercent:-100,duration:.1},"start").to(q,{xPercent:-100,duration:.1},"start"),r){const e=r.querySelector(".js-mobile-nav-accord");a.set(e,{height:"auto"},"start").call(()=>{r.classList.add("mobile-nav-submenu-group-active")},null,"start")}}function M(e){const t=e.currentTarget.closest(".js-mobile-nav-submenu");o.a.timeline().add("start").to(j,{xPercent:0,duration:.1,ease:"none"},"start").to(q,{xPercent:100,duration:.1},"start").call(()=>{const e=Array.from(t.querySelectorAll(".mobile-nav-submenu-group-active:not(:first-of-type)"));e.length&&e.forEach(e=>{const t=e.querySelector(".js-mobile-nav-accord");k(e,t)})},null,"start").set(t,{height:0})}var O={hideNav:x,init:function(){b.addEventListener("click",T),L.forEach(e=>{e.addEventListener("click",P)}),w.forEach(e=>{e.addEventListener("click",M)}),E.forEach(e=>{e.addEventListener("click",A)}),document.addEventListener("click",e=>{e.target.closest("#header")||x()})}};const{scrollSection:H}=s;o.a.registerPlugin(r.a,i.a);const D=document.body;let B=[];function I(e){const{url:t,pushState:n=!0,popState:o=!1}=e;D.classList.add("page-is-loading"),m.a.get(t).then(e=>{const o=(new DOMParser).parseFromString(e.data,"text/html");!function(e){const t=e.querySelector("head"),n=document.querySelector("title"),o=t.querySelector("title");n.innerHTML=o.innerHTML}(o);const r=o.querySelector("#ajax-container").innerHTML,a=document.querySelector("#ajax-container");a.innerHTML=r;const s=document.querySelector(".js-ajax-content-script");
1if(s){const e=s.firstElementChild,t=document.createElement("script");t.type="text/javascript",t.src=e.src,e.remove(),a.append(t)}n&&function(e){history.pushState(e,null,e)}(t);const i=Array.from(a.querySelectorAll("img"));if(i.length){let e=0;i.forEach(t=>{t.onload=()=>{e<i.length-1?e++:R()},t.src=t.src})}else R()}).catch(e=>{console.log(e),window.location.replace(t)})}function _(e){e.preventDefault(),(e.state||"string"==typeof event.state)&&(e.preventDefault(),I({url:e.state,pushState:!1,popState:!0}))}function F(){B=u.initScrollTriggers()}function R(){B.length&&(B=B.flat(),B.forEach(e=>{e.kill()})),location.hash?(H(location.hash),F()):(i.a.refresh(),window.scrollTo(0,0),F())}var C={init(){history.replaceState(window.location.href,null,window.location.href),history.scrollRestoration="manual",window.addEventListener("popstate",_),document.addEventListener("click",(function(e){if(event.metaKey||event.ctrlKey)return;const t=e.target.closest("a");if(t&&"_blank"!==t.target){const n=t.classList.contains("js-filter-paginate-link"),o=t.getAttribute("href"),r=t.href.includes("faqs#")&&o.startsWith("#"),a="https://openapparel.org/"===t.href,s=t.href.includes("assets");if(n||r||a||s)return;O.hideNav(),v.hideSubMenu(),e.stopPropagation(),e.preventDefault(),I({url:t.href})}}))},updateStInstances(e){B.push(e)}};const U=Array.from(document.querySelectorAll("a"));let N=window.scrollY;function Y(e){const t=document.body;e>0?t.classList.add("page-is-scrolled"):t.classList.remove("page-is-scrolled")}const z=Array.from(document.querySelectorAll(".js-snippet-button"));function J(){let e=!1;window.addEventListener("resize",t=>{e||(window.requestAnimationFrame(()=>{Array.from(document.querySelectorAll(".snippet-is-active")).forEac
1h(e=>{const t=e.querySelector(".js-snippet-code");o.a.set(t,{height:"auto"})}),e=!1}),e=!0)})}function K(e){const t=e.currentTarget.parentElement,n=t.querySelector(".js-snippet-code");t.classList.contains("snippet-is-active")?(t.classList.remove("snippet-is-active"),o.a.to(n,{height:0,duration:.1,ease:"none"})):(t.classList.add("snippet-is-active"),o.a.set(n,{height:"auto"}),o.a.from(n,{height:0,duration:.1,ease:"none"}))}var W=n(14);o.a.registerPlugin(i.a,r.a);function $(){let e=!1;window.addEventListener("resize",t=>{e||(window.requestAnimationFrame(()=>{!function(){const e=document.querySelector("#ajax-cards");if(!e)return;o.a.set(e,{height:"auto"}),o.a.set(e,{height:e.offsetHeight}),i.a.refresh(!0)}(),e=!1}),e=!0)})}function G(e){const{url:t,pushState:n=!0,popState:r=!1,paginate:a=!1}=e,s=document.querySelector("#cards-container");s.classList.add("ajax-cards-is-loading"),m.a.get(t).then(e=>{const r=(new DOMParser).parseFromString(e.data,"text/html").querySelector("#ajax-cards").innerHTML;document.querySelector("#ajax-cards").innerHTML=r,n&&function(e){history.pushState(e,null,e)}(t),s.classList.remove("ajax-cards-is-loading");const c=Array.from(document.querySelectorAll(".js-ajax-card"));if(!c.length)return;a&&o.a.to(window,{scrollTo:{y:s,offsetY:()=>document.querySelector("#header").offsetHeight},duration:.2});const l=i.a.batch(c,{onEnter:e=>{o.a.to(e,{y:0,opacity:1,duration:.5,stagger:.1})},once:!0});C.updateStInstances(l)})}function Q(){const e=Array.from(document.querySelectorAll(".js-filter input:checked")),t=Object(W.groupBy)(e,e=>e.dataset.group);Object.keys(t).forEach(e=>{t[e]=t[e].map(e=>e.value).join()});const n=new URLSearchParams(t),o=window.location.href,r=o.includes("page")?o.split("page")[0]:o.split("?")[0],a=new URL(r);a.search=n,G({url:a.href})}function V(e,t=!1){const n=document.getElementById("filters"),r=e.querySelector(".js-filter-group-menu");e.classList.remove("filter-group-is-active");const a=o.a.timeline();a.add("start").to(r,{height:0,duration:.1},"start"),t&&a.to(n,{marginBottom:0,duration:.1},"start")}let X;function Z(e){e.preventDefault(),X=e.target,X.classList.add("form-is-submitting");let t=X.getAttribute("action");t=t.replace("/post?u=","/post-json?u="),t+=function(e){let t="";for(let n=0;n<e.elements.length;n++){const o=e.elements[n];o.name&&!o.disabled&&"file"!==o.type&&"reset"!==o.type&&"submit"!==o.type&&"button"!==o.type&&(("checkbox"!==o.type&&"radio"!==o.type||o.checked)&&(t+="&"+encodeURIComponent(o.name)+"="+encodeURIComponent(o.value)))}return t}(X)+"&c=displayMailChimpStatus";const n=window.document.getElementsByTagName("script")[0];let o=window.document.createElement("script");o.src=t,window.mcStatus=X.querySelector(".mc-status"),n.parentNode.insertBefore(o,n),o.onload=function(){this.remove()}}window.displayMailChimpStatus=function(e){if(X.classList.remove("form-is-submitting"),e.result&&e.msg&&mcStatus){if(mcStatus.innerHTML=e.msg,"error"===e.result)return mcStatus.classList.remove("success-message"),void mcStatus.classList.add("error-message");mcStatus.classList.remove("error-message"),mcStatus.classList.add("success-message")}};function ee(){let e=!1;window.addEventListener("resize",t=>{e||(window.requestAnimationFrame(()=>{!function(){const e=Array.from(document.querySelectorAll(".faq-is-active"));if(!e.length)return;e.forEach(e=>{const t=e.querySelector(".js-faq-answer");o.a.set(t,{height:"auto"})})}(),e=!1}),e=!0)})}C.init(),function(){const e=document.body;let t;window.addEventListener("scroll",(function(){clearTimeout(t),e.classList.contains("disable-hover")||e.classList.add("disable-hover"),t=setTimeout((function(){e.classList.remove("disable-hover")}),250)}),!1)}(),O.init(),v.init(),U.forEach(e=>{}),Y(N),function(){let e=!1;window.addEventListener("scroll",t=>{N=window.scrollY,e||(window.requestAnimationFrame(()=>{Y(N),e=!1}),e=!0)})}(),z.length&&(z.forEach(e=>{e.addEventListener("click",K)}),J()),document.addEventListener("click",(function(e){const t=e.target.closest(".js-filter-paginate-link"),n=e.target.closest(".js-filter-group-button"),r=e.target.closest("#filters-reset");t&&(e.preventDefault(),G({url:t.href,paginate:!0})),n&&(e.preventDefault(),function(e){const t=document.getElementById("filters"),n=e.parentElement,r=e.dataset.groupMenu,a=document.getElementById(r),s=document.querySelector(".filter-group-is-active");if(s&&s===n)return void V(s,!0);s&&s!==n&&V(s),n.classList.add("filter-group-is-active");const i=o.a.to(a,{height:"auto",duration:.2,paused:!0}).progress(1);window.innerWidth>=768&&o.a.to(t,{marginBottom:a.offsetHeight,duration:.2}),i.progress(0).play()}(n)),r&&(e.preventDefault(),Array.from(document.querySelectorAll(".js-filter input")).forEac
1h(e=>e.checked=!1),Q())})),document.addEventListener("change",(function(e){e.target.closest(".js-filter")&&(e.stopPropagation(),Q())})),$(),s.init(),document.addEventListener("submit",(function(e){const t=e.target;"mc-embedded-subscribe-form"===t.id?Z(e):"contact-form"===t.id&&function(e){e.preventDefault(),X=e.target;const t=Array.from(X.querySelectorAll(".js-form-error"));t&&t.forEach(e=>e.remove()),X.classList.add("form-is-submitting");const n=new FormData(X),r=X.getAttribute("action"),a=X.getAttribute("method");m()({method:a,url:r,data:n}).then(e=>{const{success:t}=e.data,{errors:n}=e.data;if(n)Object.keys(n).forEach(e=>{const t=X.querySelector(`[name="${e}"]`);if(t){const o=document.createElement("div");o.classList.add("form__error","js-form-error"),o.innerHTML=n[e],t.parentElement.append(o)}});else if(t){X.classList.add("form-is-success");const e=document.querySelector(".js-thanks"),t=Array.from(e.querySelectorAll(".js-thanks-message > *"));o.a.timeline().add("start").to(X,{opacity:0,duration:.1},"start").set(e,{opacity:1}).fromTo(t,{y:20,opacity:0},{y:0,opacity:1,duration:.5,stagger:.1})}}).catch(e=>{console.log(e)}).then(()=>{X.classList.remove("form-is-submitting")})}(e)})),document.addEventListener("click",(function(e){const t=e.target.closest(".js-faq-button");t&&function(e){const t=e.parentElement,n=t.querySelector(".js-faq-answer");t.classList.contains("faq-is-active")?(t.classList.remove("faq-is-active"),o.a.to(n,{height:0,duration:.1,ease:"none"})):(t.classList.add("faq-is-active"),o.a.set(n,{height:"auto"}),o.a.from(n,{height:0,duration:.1,ease:"none"}))}(t)})),ee(),window.addEventListener("load",u.init)}}); 2//# sourceMappingURL=main.bundle.js.map
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.