1(()=>{"use strict";var E={6274:(i,p,l)=>{var m=l(4058),b=l(2442),d=l.n(b),w=l(1105),L=l(5787);const g=(0,m.z2)("hero-slider",{onLoad(){this.settings=this.container.dataset.sectionSettings||"{}",this.sliderId=`#hero-slider--${this.id}`;const u=document.querySelector(`#hero-slider--${this.id}`);this.userSettings=JSON.parse(this.settings),this.previousButton=document.querySelector(".btn--control-prev"),this.nextButton=document.querySelector(".btn--control-next"),d().prototype._createResizeClass=function(){this.element.classList.add("flickity-resize")},d().createMethods.push("_createResizeClass");const e=d().prototype.resize;d().prototype.resize=function(){this.element.classList.remove("flickity-resize"),e.call(this),this.element.classList.add("flickity-resize")};const t=(c=0)=>{var y,v;const o=[...u.querySelectorAll(".hero-slide")],n=u.parentElement.querySelector(".controls-container"),f=u.querySelector(".flickity-page-dots");let r=(y=o[c].dataset)==null?void 0:y.uiColour,a=(v=o[c].dataset)==null?void 0:v.uiColourDesktop;r==="rgba(0,0,0,0)"&&(r="#ffffff"),a==="rgba(0,0,0,0)"&&(a="#ffffff"),window.outerWidth<1120?(f&&(f.style.color=r),n&&(n.style.color=r)):(f&&(f.style.color=a),n&&(n.style.color=a))},s=new(d())(u,{draggable:">1",adaptiveHeight:!1,autoPlay:this.userSettings.autoplay,imagesLoaded:!0,pageDots:this.userSettings.include_pager_dots,prevNextButtons:!1,watchCSS:!0,groupCells:!0,wrapAround:this.userSettings.infinite,on:{ready(){u.classList.add("is-visible"),window.dispatchEvent(new Event("resize")),t(0)}}});s.on("change",()=>{const c=[...u.querySelectorAll(".hero-slide")],o=s.selectedElement,n=r=>r===o,f=c.findIndex(n);t(f)}),this.previousButton&&(this.previousButton.addEventListener("click",function(){s.previous()}),this.nextButton.addEventListener("click",function(){s.next()}))}}),S=(0,m.z2)("featured-articles",{onLoad(){this.sliderId=`#articles__slider--${this.id}`;const u=document.querySelector(`#articles__slider--${this.id}`),e=new(d())(u,{prevNextButtons:!1,pageDots:!1,cellAlign:"left",watchCSS:!0,contain:!0})}});class A{constructor(e){this.element=e,this.variantPicker=e.querySelector(".product-card__variant-picker"),this.variantButtons=e.querySelectorAll(".product-card__variant"),this.quickAddButton=e.querySelector(".product-card__single-add button"),this.variantsPanel=e.querySelector(".product-card__variants"),this.singleAddPanel=e.querySelector(".product-card__single-add"),this.addedMessage=e.querySelector(".product-card__added"),this.swatches=e.querySelectorAll("[data-product-swatch]"),this.mobileTrigger=e.querySelector(".product-card__mobile-trigger"),this.mobileOverlay=e.querySelector(".product-card__mobile-overlay"),this.mobileClose=e.querySelector(".product-card__mobile-close"),this.mobileVariantButtons=e.querySelectorAll(".product-card__mobile-variant"),this.mobileQuickAddButton=e.querySelector(".product-card__mobile-single button"),this.mobileAddedMessage=e.querySelector(".product-card__mobile-added"),this.timeout=null,this.isMobile=window.innerWidth<768,this.bindEvents()}bindEvents(){if(!this.isMobile){const e=this.element.querySelector(".product-card__image");e&&(e.addEventListener("mouseenter",()=>this.showQuickAdd()),e.addEventListener("mouseleave",()=>this.hideQuickAdd()))}this.mobileTrigger&&this.mobileTrigger.addEventListener("click",()=>this.openMobileOverlay()),this.mobileClose&&this.mobileClose.addEventListener("click",()=>this.closeMobileOverlay()),this.variantButtons.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.selectVariant(e)})}),this.mobileVariantButtons.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),this.selectMobileVariant(e)})}),this.quickAddButton&&this.quickAddButton.addEventListener("click",e=>{e.preventDefault(),this.handleQuickAdd()}),this.mobileQuickAddButton&&this.mobileQuickAddButton.addEventListener("click",e=>{e.preventDefault(),this.handleMobileQuickAdd()}),document.addEventListener("keydown",e=>{var t;e.key==="Escape"&&((t=this.mobileOverlay)==null?void 0:t.classList.contains("is-open"))&&this.closeMobileOverlay()}),this.mobileOverlay&&this.mobileOverlay.addEventListener("click",e=>{e.target===this.mobileOverlay&&this.closeMobileOverlay()}
1),this.swatches.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),this.swapCard(e.dataset.productHandle)})})}selectVariant(e){this.variantButtons.forEach(c=>c.classList.remove("is-selected")),e.classList.add("is-selected");const t=e.dataset.variantId,s=this.element.querySelector('select[name="id"]');s&&(s.value=t),this.handleQuickAdd()}selectMobileVariant(e){this.mobileVariantButtons.forEach(c=>c.classList.remove("is-selected")),e.classList.add("is-selected");const t=e.dataset.variantId,s=this.element.querySelector('select[name="id"]');s&&(s.value=t),this.handleMobileQuickAdd()}openMobileOverlay(){!this.mobileOverlay||(this.mobileOverlay.parentNode!==document.body&&(this.originalParent=this.mobileOverlay.parentNode,document.body.appendChild(this.mobileOverlay)),this.mobileBackdrop||(this.mobileBackdrop=document.createElement("div"),this.mobileBackdrop.className="product-card__mobile-backdrop",document.body.appendChild(this.mobileBackdrop),this.mobileBackdrop.addEventListener("click",()=>this.closeMobileOverlay())),this.mobileOverlay.classList.add("is-open"),this.mobileBackdrop.classList.add("is-active"),document.body.style.overflow="hidden")}closeMobileOverlay(){!this.mobileOverlay||(this.mobileOverlay.classList.remove("is-open"),this.mobileBackdrop&&this.mobileBackdrop.classList.remove("is-active"),document.body.style.overflow="",this.originalParent&&this.mobileOverlay.parentNode===document.body&&this.originalParent.appendChild(this.mobileOverlay))}handleMobileQuickAdd(){const e=this.element.querySelector("form");if(!e)return;const t=this.mobileOverlay.querySelector(".product-card__mobile-variants"),s=this.mobileOverlay.querySelector(".product-card__mobile-single");t&&t.classList.add("slide-up"),s&&s.classList.add("slide-up"),this.mobileAddedMessage.classList.add("is-shown"),this.submitForm(e),setTimeout(()=>{this.mobileAddedMessage.classList.remove("is-shown"),t&&t.classList.remove("slide-up"),s&&s.classList.remove("slide-up"),this.closeMobileOverlay()},1500)}showQuickAdd(){if(this.element.querySelector(".product-card__wishlist-overlay.is-visible, .product-card__wishlist-container.is-visible"))return;const t=this.element.querySelector(".product-card__quick-add-container");t&&t.classList.add("is-shown")}hideQuickAdd(){const e=this.element.querySelector(".product-card__quick-add-container");e&&e.classList.remove("is-shown")}handleQuickAdd(){const e=this.element.querySelector("form");!e||(this.variantsPanel&&this.variantsPanel.classList.add("slide-up"),this.singleAddPanel&&this.singleAddPanel.classList.add("slide-up"),this.addedMessage&&this.addedMessage.classList.add("is-shown"),this.submitForm(e),this.timeout=setTimeout(()=>{this.resetDesktopState()},1500))}resetDesktopState(){this.addedMessage&&this.addedMessage.classList.remove("is-shown"),this.variantsPanel&&this.variantsPanel.classList.remove("slide-up"),this.singleAddPanel&&this.singleAddPanel.classList.remove("slide-up")}async swapCard(e){var c,o,n,f,r;if(!e)return;(c=this.swapController)==null||c.abort(),this.swapController=new AbortController;const s=`${((n=(o=window.theme)==null?void 0:o.locale)==null?void 0:n.primary)?"":((r=(f=window.theme)==null?void 0:f.locale)==null?void 0:r.rootUrl)||""}/products/${e}?view=card`;try{const a=await fetch(s,{signal:this.swapController.signal});if(!a.ok)return;const y=await a.text(),k=new DOMParser().parseFromString(y,"text/html").querySelector(".product-card");if(!k)return;this.element.replaceWith(k),q(k)}catch(a){if(a.name==="AbortError")return;window.console.error(`Failed to swap card for ${e}: ${a}`)}}getFormProperties(e){const t=/^properties\[(.+?)\]$/,s=e.querySelectorAll('[name^="properties"]');if(s.length===0)return null;const c={};return s.forEach(o=>{const n=t.exec(o.name);n&&(c[n[1]]=o.value)}),Object.keys(c).length>0?c:null}submitForm(e){const t=new FormData(e),s=t.get("id"),c=t.get("quantity")||1,o={id:parseInt(s,10),quantity:parseInt(c,10)},n=this.getFormProperties(e);if(n&&(o.properties=n),window.sideCart&&window.sideCart.handleAddToCartEvent){const f=this.element.querySelector("[data-product-card-json]"),r=f?JSON.parse(f.innerHTML):{};window.sideCart.handleAddToCartEvent(o,!0,r),setTimeout(()=>{const a=document.querySelector(".side-cart__close");a&&a.click()},3e3)}}}function q(u){if(!u.dataset.productCardInitialized)return u.dataset.productCardInitialized="true",new A(u)}const P=q;document.addEventListener("DOMContentLoaded",()=>
1{document.querySelectorAll(".product-card").forEach(e=>q(e))});const Q=(0,m.z2)("featured-products",{onLoad(){this.sliderId=`#featured-products__slider--${this.id}`;const u=document.querySelector(`#featured-products__slider--${this.id}`),e=u.querySelectorAll(".product-card");e.length>0&&e.forEach(s=>P(s));const t=new(d())(u,{freeScroll:!1,prevNextButtons:!1,pageDots:!1,imagesLoaded:!0,setGallerySize:!0,cellAlign:"left",watchCSS:!0})}}),O=(u,e=250)=>{let t;return(...s)=>{clearTimeout(t),t=setTimeout(()=>{t=null,u(...s)},e)}},H=(0,m.z2)("featured-collections",{onLoad(){const e=[...this.container.querySelectorAll(".featured-collections__slider")].filter(o=>!o.classList.contains("carousel--stack-slides"));if(e.length===0)return;const t=this.container.querySelectorAll(".product-card");t.length>0&&t.forEach(o=>P(o));const s=o=>{var f,r,a;const n=[...o.querySelectorAll(".flickity-prev-next-button")];if(n&&n.length>0){const y=(f=o.querySelector(".component-image__wrapper"))==null?void 0:f.offsetHeight,v=(r=o.querySelector(".product-card__actions"))==null?void 0:r.offsetHeight,_=(a=o.querySelector(".flickity-prev-next-button"))==null?void 0:a.offsetHeight;y&&v&&_&&n.forEach(k=>{k.style.top=`${y/2-v+_/2}px`})}},c=O(function(o){s(o)},500);e.forEach(o=>{const n=new(d())(o,{contain:!0,freeScroll:!1,prevNextButtons:!0,pageDots:!1,imagesLoaded:!0,setGallerySize:!0,cellAlign:"left",watchCSS:!0,arrowShape:{x0:20,x1:65,y1:45,x2:70,y2:40,x3:30},on:{ready(){s(o),window.addEventListener("resize",()=>c(o))}}})}),document.querySelectorAll(".js-tablist__link").forEach(o=>{o.addEventListener("click",()=>{const n=o.getAttribute("aria-controls"),r=document.querySelector(`#${n}`).querySelector(".featured-collections__slider");if(r===null)return;d().data(r).resize(),s(r)})})}});function D(u){const e=window.atob(u.replace(/\s/g,"")),t=e.length,s=new Uint8Array(t);for(let c=0;c<t;c++)s[c]=e.charCodeAt(c);return s.buffer}const C={rewornContainer:"[data-reworn-container]",rewornForm:"[data-reworn-form]",rewornFormError:"[data-reworn-form-error]"};(0,m.z2)("reworn-form",{onLoad(){const u=this.container.querySelector(C.rewornContainer),e=this.container.querySelector(C.rewornForm),t=this.container.querySelector(C.rewornFormError);if(!e&&!window.top.ThemeEditor&&!window.top.ThemeEditorAPI&&!window.Shopify.designMode&&(window.location=`/customer_authentication/login?return_to=${encodeURIComponent(window.location.pathname)}`),!u||!e||!t)return;this.sectionSettings=JSON.parse(this.container.dataset.sectionSettings||"{}");const s={name:this.sectionSettings.return_address_name,building:this.sectionSettings.return_address_building,street:this.sectionSettings.return_address_street,suburb:this.sectionSettings.return_address_suburb,city:this.sectionSettings.return_address_city,state:this.sectionSettings.return_address_state,post_code:this.sectionSettings.return_address_post_code,country:this.sectionSettings.return_address_country},c=(r,a)=>{const y={order:{order_number:`reworn-${Date.now()}`,sender_details:s,destination:r,reference:`${a} garment${a===1?"":"s"}`,return_order:!0}},v="https://api.starshipit.com/api/orders",_={method:"POST",headers:{"Content-Type":"application/json","StarShipIT-Api-Key":this.sectionSettings.starshipit_api_key,"Ocp-Apim-Subscription-Key":this.sectionSettings.starshipit_subscription_key},body:JSON.stringify(y)};return fetch(v,_)},o=r=>{const a={order_id:r,carrier:"AusPost",carrier_service_code:"3J85",reprint:!1},y="https://api.starshipit.com/api/orders/shipment",v={method:"POST",headers:{"Content-Type":"application/json","StarShipIT-Api-Key":this.sectionSettings.starshipit_api_key,"Ocp-Apim-Subscription-Key":this.sectionSettings.starshipit_subscription_key},body:JSON.stringify(a)};return fetch(y,v)},n=r=>{t.innerHTML=this.sectionSettings.error_message,r.forEach(a=>a.disabled=!1)},f=async r=>{r.preventDefault();const a=r.target.querySelectorAll('[type="submit"]');a.forEach(_=>_.disabled=!0);const y={name:r.target.name.value,email:r.target.email.value,phone:r.target.phone.value,street:r.target.street.value,suburb:r.target.suburb.value,state:r.target.state.value,post_code:r.target.postcode.value,country:r.target.country.value},v=Number(r.target.number_of_garments.value);try{const _=await c(y,v);if(_.ok===!1)return n(a);const k=await _.json();if(k.success!==!0)return n(a);const I=k.order.order_id,T=await o(I);if(T.ok===!1)return n(a);const x=await T.json();if(x.success!==!0)return n(a);const z=x.labels[0],$=D(z),F=new Blob([$],{type:"application/pdf"}),j=URL.createObjectURL(F),N="assembly-label-return-label.pdf";u.innerHTML=` 2 ${this.sectionSettings.thank_you_message} 3 <br> 4 <p><a class="btn btn--block" href="${j}" download="${N}">Download label</a></p> 5 <br> 6 ${this.sectionSettings.next_steps_message} 7 `,window.klaviyo&&(window.klaviyo.push(["identify",{$email:y.email}]),window.klaviyo.push(["track","Re-Worn Return",{"Number of garments":v}]))}catch{n(a)}};e.addEventListener("submit",f.bind(this))}}),document.addEventListener("DOMContentLoaded",()=>{(0,m.zD)("*")})}},M={};function h(i){var p=M[i];if(p!==void 0)return p.exports;
7var l=M[i]={exports:{}};return E[i].call(l.exports,l,l.exports,h),l.exports}h.m=E,(()=>{var i=[];h.O=(p,l,m,b)=>{if(l){b=b||0;for(var d=i.length;d>0&&i[d-1][2]>b;d--)i[d]=i[d-1];i[d]=[l,m,b];return}for(var w=Infinity,d=0;d<i.length;d++){for(var[l,m,b]=i[d],L=!0,g=0;g<l.length;g++)(b&!1||w>=b)&&Object.keys(h.O).every(O=>h.O[O](l[g]))?l.splice(g--,1):(L=!1,b<w&&(w=b));if(L){i.splice(d--,1);var S=m();S!==void 0&&(p=S)}}return p}})(),(()=>{h.n=i=>{var p=i&&i.__esModule?()=>i.default:()=>i;return h.d(p,{a:p}),p}})(),(()=>{h.d=(i,p)=>{for(var l in p)h.o(p,l)&&!h.o(i,l)&&Object.defineProperty(i,l,{enumerable:!0,get:p[l]})}})(),(()=>{h.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),(()=>{h.o=(i,p)=>Object.prototype.hasOwnProperty.call(i,p)})(),(()=>{h.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})}})(),(()=>{h.j=391})(),(()=>{var i={391:0};h.O.j=m=>i[m]===0;var p=(m,b)=>{var[d,w,L]=b,g,S,A=0;for(g in w)h.o(w,g)&&(h.m[g]=w[g]);if(L)var q=L(h);for(m&&m(b);A<d.length;A++)S=d[A],h.o(i,S)&&i[S]&&i[S][0](),i[d[A]]=0;return h.O(q)},l=globalThis.webpackChunkassembly_label_2021=globalThis.webpackChunkassembly_label_2021||[];l.forEach(p.bind(null,0)),l.push=p.bind(null,l.push.bind(l))})();var B=h.O(void 0,[293],()=>h(6274));B=h.O(B)})();
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.