PageSourceSearch

https://www.quadlockcase.eu/cdn/shop/t/46/assets/product2025-T2AZpTBT.js

js quadlockcase.eu collected 2026-10-03 20:12:41 UTC 185,361 bytes, 5 lines download raw bytes

1import{j as e,q as f,g as b,R as ee,s as F,D as se,f as D,E as te,P as Xe,e as gs,a as fe,r as ke,c as xs,d as _s,m as Ze,n as Ve,V as Ne,b as _e,o as ws,p as bs,t as ys,l as js}from"./VariantLiSmall-BNhlwD48.js";import{m as Be,P as gt,B as ks,i as vs,t as Ss,b as ie,o as ae,T as As,p as We,S as je,V as Pe,e as pe,g as Dt,a as Cs,c as Ps,d as Ft,f as ye,h as Qt,H as we,q as Ns,k as Ms,M as $s,O as Ts,r as Es,u as Ls,I as Wt,s as Q,j as Ue,A as Is,G as Hs,n as Gs}from"./OrderDispatch-DDAVioPW.js";import{a as z,g as ne,r as Oe,S as Ut,b as zt,L as Kt,c as Os}from"./urlFunctions-B8YNI-2h.js";import{c as xt,g as q,b as ge,s as re,a as J,f as qs,r as Ee,d as qe,e as Yt,h as st,i as De}from"./DropdownSmall-DCq5vc6B.js";import{M as Rs}from"./MountLookup-BUXzzzpb.js";import{C as Jt}from"./react-content-loader.es-D2pIP9BY.js";const Bs=({data:t,showKitStyling:s})=>e.jsx("div",{className:`callout callout--product p-2 font-family-gotham-book text-center text-wrap-balance ${s?"mb-2":"mt-n2 mb-3"}`,dangerouslySetInnerHTML:{__html:t}}),Vs=()=>e.jsx("div",{className:"py-5 my-md-4 mx-auto",children:e.jsxs("div",{className:"text-center py-5 my-3 mb-md-5 px-3 min-vh-50",children:[e.jsx("h1",{className:"font-family-gotham h3 m-0 text-uppercase",children:f("warning_unavailable_header")}),e.jsx("p",{className:"my-3 mx-auto",style:{maxWidth:"600px"},children:f("warning_unavailable_text")})]})}),Xt=(t,s)=>{console.log("SEND MESSAGE");let n={message:t,id:"Xe7HzI2ZjUKYFflIetRZxQ-2",channel:s};window.location.hostname!="localhost"&&Shopify.shop!=="quad-lock-dev.myshopify.com"&&fetch("https://webhooks.quadlockcase.com/slack-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),credentials:"omit"}).then(o=>{console.log("error message sent")}).catch(o=>{console.log(o)})},Ds=()=>(b.useEffect(()=>{Xt(`Product issue on the website: ${window.location.href}`,"website-product-issues")},[]),e.jsx("div",{className:"py-5 my-md-4 mx-auto",children:e.jsxs("div",{className:"text-center py-5 my-3 mb-md-5 px-3 min-vh-50",children:[e.jsx("h1",{className:"font-family-gotham h3 m-0 text-uppercase",children:f("warning_unavailable_header")}),e.jsx("p",{className:"my-3 mx-auto",style:{maxWidth:"600px"},children:f("warning_unavailable_text")})]})}));class Fs extends ee.PureComponent{constructor(s){super(s),this.handleClick=()=>{xt(document.querySelector("#jump-to-reviews"))},this.numberWithCommas=n=>n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}render(){const{data:s}=this.props;if(s==null)return e.jsx("button",{className:"review__stars cursor-pointer bg-transparent d-md-flex mb-2 p-0 border-0"});const{average_score:n,total_review:o}=s,l=n/5*100+"%";return s.total_review==0?null:e.jsxs("button",{className:"review__stars cursor-pointer bg-transparent d-flex mb-2 p-0 border-0",onClick:this.handleClick,children:[e.jsx("div",{className:"review__stars--score",style:{"--percent":l}}),e.jsxs("div",{className:"review__stars--number font-family-gotham text-uppercase ml-1",children:[this.numberWithCommas(o)," ",o==1?f("reviews_single"):f("reviews_plural")]})]})}}const Qs=({product:t,show360Logo:s,yotpoData:n})=>{const o=t.tags.includes("launch-exclusive"),l=t.tags.includes("pre-order-exclusive"),a=t.tags.includes("end-of-season"),i=t.tags.includes("limited-edition");return e.jsxs("div",{className:`d-flex justify-content-between align-items-start ${o||l||i?"tag--product-header":""}`,children:[e.jsxs("div",{children:[e.jsx("h5",{className:"product__title mt-0 mb-1",children:t.title}),t.type!="Gift Voucher"&&e.jsx(Fs,{data:n})]}),s&&e.jsx("div",{className:"product__360 mb-2",children:e.jsx("a",{href:"/collections/build-your-own",title:f("callout360_text"),className:"ml-2",onClick:()=>{F("Product","360","360 Compatible logo click")},children:e.jsx(Be,{name:"Logo360"})})}),o&&e.jsx("span",{className:"tag tag--pre-order-exclusive tag--large text-uppercase text-center mb-1 mt-n1 mt-0",children:f("tag_launch_exclusive")}),l&&e.jsx("span",{className:"tag tag--pre-order-exclusive tag--large text-uppercase text-center mb-1 mt-n1 mt-0",children:f("tag_po_exclusive")}),a&&e.jsx("span",{className:"tag tag--end-of-season tag--large text-uppercase text-center",children:f("tag_end_of_season")}),i&&!a&&e.jsx("span",{className:"tag tag--limited tag--large text-uppercase text-center",children:f("tag_limited_edition")})]})},Zt=({selectedAll:t,selectedProducts:s,onAddToCart:n,isError:o,isSubmitting:l,codeLocation:a})=>{let i;o?i=f("atc_complete_selection"):t.some(p=>p.inventory_quantity<4&&!!p.stock_preorder)?i=f("atc_preorder"):t.length>0&&t.some(p=>p.inventory_quantity<4&&!!p.stock_backorder||!!p.stock_backorder_force)?i=f("atc_backorder"):t.length>0&&t.some(p=>p.inventory_quantity<4&&p.stock_block_auto!=="true")?window.settings.automatic_backorder?i=f("atc_backorder"):i=f("atc_add"):i=f("atc_add");let r=!Object.values(s).includes(null),d=!1;t.some(p=>!p.availableForSale)&&(r=!1,d=!0,i=f("warning_unavailable_header"));let c="",w="";if(t.length>0&&Object.values(t).some(p=>p&&p.stock_back_in_stock_form&&p.stock_back_in_stock_form!==""&&p.inventory_quantity<3?(c=p.stock_back_in_stock_form,w=p.title,!0):!1)){if
1(window.location.pathname.includes("everyday-the-honey-mount"))return e.jsx(gt,{reference:"the-honey-mount",type:"wide",action:"April Fools 2026",text:f("popup_the_honey_mount"),extraClasses:"mt-2"});if(a=="form")return e.jsx(ks,{list_id:c,product_name:w});i=f("bis_unavailable"),r=!1,d=!0}return e.jsxs("button",{className:`buy__add position-relative d-flex align-items-center justify-content-center w-100 border-0 overflow-hidden js-atc-${a} ${l?"js-animate":""} ${r?"active":""} ${o?"error-state":""}`,onClick:()=>n(),disabled:d,children:[!o&&e.jsx("div",{className:"mr-2 mb-1",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"18",viewBox:"0 0 24 24",children:[e.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{fill:"white",d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})]})}),e.jsxs("span",{className:"animate animation__dots position-absolute",children:[f("atc_submitting"),e.jsxs("ul",{className:"d-inline-block p-0 m-0",children:[e.jsx("li",{className:"d-inline-block",children:"."}),e.jsx("li",{className:"d-inline-block",children:"."}),e.jsx("li",{className:"d-inline-block",children:"."})]})]}),e.jsx("span",{className:"position-relative",children:i})]})},Ws=68,Us=({kitThumbnails:t,optionalExtraThumbnails:s,onOptionalExtraRemove:n})=>{const[o,l]=b.useState(!1),[a,i]=b.useState(0),[r,d]=b.useState(!1),c=b.useRef(null),w=()=>{window.innerWidth<640&&l(!0)},h=b.useCallback(()=>{if(c.current){const y=c.current.offsetWidth,u=Math.floor(y/Ws);i(u)}},[]);b.useEffect(()=>{w(),h()},[]),b.useEffect(()=>(window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}),[h]);const p=[...t,...s];let m=0,g=s;return a>0&&p.length>a&&(g=s.slice(0,Math.max(0,a-t.length-1)),m=s.length-g.length),e.jsxs("div",{className:"buy__thumbs d-flex flex-column mx-auto m-md-0",ref:c,children:[e.jsxs("div",{className:"buy__thumbs--title text-uppercase d-flex justify-content-between align-items-center",children:[e.jsxs("div",{className:"d-flex",children:[e.jsx("div",{children:f("msg_in_your_kit")}),e.jsxs("div",{className:"d-md-none",children:["\xA0\u2022\xA0",p.length]})]}),e.jsx("div",{className:"py-1 mr-n2 d-md-none d-flex justify-content-end align-items-center flex-grow-1",onClick:()=>{l(!o),d(!1),h()},children:e.jsx(se,{isActive:o})})]}),p.length==0&&e.jsx("div",{className:"buy__thumbs--message text-uppercase d-none d-md-block",children:f("msg_start_build_kit")}),e.jsxs("div",{className:`buy__thumbs--list ${o?"":"active"} ${r?"flex-wrap":""}`,children:[t.map(({id:y,alt:u,src:j})=>e.jsx("div",{className:"buy__thumbs--block position-relative",children:e.jsx("img",{className:"w-100 h-100",alt:u,src:j})},y)),t.length>0&&s.length>0&&e.jsx("div",{className:"extra-icon d-flex align-items-center",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 512 512",width:"18",height:"18",children:e.jsx("path",{fill:"#7f7f7f",d:`M492,236H276V20c0-11.046-8.954-20-20-20c-11.046,0-20,8.954-20,20v216H20c-11.046,0-20,8.954-20,20s8.954,20,20,20h216
2                      v216c0,11.046,8.954,20,20,20s20-8.954,20-20V276h216c11.046,0,20-8.954,20-20C512,244.954,503.046,236,492,236z`})})}),g.map(({id:y,alt:u,src:j})=>e.jsxs("div",{className:"buy__thumbs--block hover-thumbnail position-relative",children:[e.jsx("div",{className:"hover-icon position-absolute w-100 h-100 cursor-pointer",onClick:()=>n({id:y},"remove"),children:e.jsx("span",{className:"position-absolute",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#7f7f7f",d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),e.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})})}),e.jsx("img",{className:"hover-image w-100 h-100",alt:u,src:j})]},y)),m>0&&e.jsxs("div",{className:"buy__thumbs--extra position-relative d-flex align-items-center justify-content-center text-center text-uppercase cursor-pointer",onClick:()=>{d(!0),i(1/0)},children:["+",m,e.jsx("br",{})," ",f("more")]})]})]})},es=({variantId:t})=>(b.useEffect(()=>{var s,n;return t&&((n=(s=window.Stylux)==null?void 0:s.offers)==null||n.show({type:"BUTTON",productId:t,elementClasses:["stylux-offer-btn"]})),()=>{var o,l;(l=(o=window.Stylux)==null?void 0:o.offers)==null||l.hide({type:"BUTTON"})}},[t]),e.jsx("div",{className:"stylux-offer-container"})),X=(t,s)=>Object.values(t).find(n=>s==="case"?n&&["case","case-text","case-editions"].includes(n.option_type)?!0:n&&n.option_type==="bundle-case"&&n.type==="Cases":s==="mount"?n&&["mount","mount-car","mount-desk","motorcycle-all","motorcycle-mount"].includes(n.option_type):s==="OTHER"?n&&["OTHER"].includes(n.option_type):n&&n.option_type===s),zs=["suction-windscreen-dash-car-mount","4x4-car-suction-windscreen-dash-mount","truck-suction-windshield-dash-mount"],At=t=>t.map(({id:s,image:n})=>({id:s,alt:n.altText,src:n.src})),Ks=({selectedAll:t,selectedProducts:s,selectedProductsWithNulls:n,selectedOptionalExtras:o,onAddToCart:l,onOptionalExtraRemove:a,isError:i,isSubmitting:r,price:d,compareAtPrice:c,product:w})=>{var m;b.useEffect(()=>{const g=Ss(()=>{const y=document.querySelector(".js-atc-form"),u=document.querySelector("body"),j=document.querySelector(".buy__footer");if(y&&j){const _=y.getBoundingClientRect();_.y<0?u.classList.remove("js-mobile-hide-atc"):_.y>0&&u.classList.add("js-mobile-hide-atc")}},200);return window.addEventListener("scroll",g),()=>{window.removeEventListener("scroll",g)}},[]);const h=()=>zs.includes(w.handle)&&Object.values(s).every(g=>g===null)?d:c,p=[];return s!==null&&(s.option1&&p.push(s.option1),s.option2&&p.push(s.option2),s.option3&&p.push(s.option3),s.option4&&p.push(s.option4),s.freeGWP&&p.push(s.freeGWP)),e.jsx("div",{className:"buy__footer w-100 position-fixed",children:e.jsxs("div",{style:{maxWidth:1440},className:"d-flex flex-column flex-md-row justify-content-center align-items-md-center mx-auto",children:[e.jsxs("div",{className:"buy__thumbs--wrapper position-relative d-flex flex-column flex-md-row justify-content-between w-100",children:[e.jsx(Us,{kitThumbnails:p.length>0?At(p):[],optionalExtraThumbnails:o.length>0?At(o):[],onOptionalExtraRemove:a,selectedProducts:s}
2),e.jsx("div",{className:"buy__thumbs--border border-top-0 d-md-none"}),e.jsx(vs,{price:d,showFrom:Object.values(s).includes(null),isAnySelected:!Object.values(s).every(g=>g==null||g=="none"),compareAtPrice:h()})]}),e.jsx("div",{className:"buy__add--wrapper",children:w.handle==="mag-cases-personalization"?e.jsx(e.Fragment,{children:!Object.values(n).includes(null)&&window.Stylux?e.jsx(es,{variantId:(m=X(n,"case"))==null?void 0:m.id}):e.jsx("button",{className:"buy__add position-relative d-flex align-items-center justify-content-center w-100 border-0 overflow-hidden",onClick:()=>l(),children:f("atc_complete_selection")})}):e.jsx(Zt,{selectedAll:t,selectedProducts:s,onAddToCart:l,isError:i,isSubmitting:r,gaLocation:"Footer",codeLocation:"footer"})})]})})},Ys=({extraClasses:t})=>{const s=`buy__message buy__message--mag p-2 text-center text-uppercase w-100 mt-n2 ${t??""}`;return e.jsxs("div",{className:s,children:[e.jsx("svg",{clipRule:"evenodd",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"d-inline-block mr-2",children:e.jsx("path",{d:"M12 21.5a10 10 0 1 0 0-20 10 10 0 0 0 0 20zm0-1.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zm0-6.5a.8.8 0 0 1-.7-.7V7.3a.8.8 0 0 1 1.5 0v5.5c0 .4-.4.7-.8.7zm0 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",fillRule:"nonzero"})}),f("msg_requires_apple_find_my")]})},Js=({title:t,options:s,selectedArray:n,onChange:o,extraClasses:l,mountsWithNewTag:a=[]})=>{const[i,r]=b.useState(0),d=()=>r(c=>c+1);return b.useEffect(()=>{window.location.search.indexOf("mount-tool")>-1&&MicroModal.show("modal-popup-motorcycle-lookup",{disableScroll:!0,disableFocus:!0,awaitCloseAnimation:!0,onClose:d})},[]),e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:`info-block info-block--selector w-100 d-flex align-items-center justify-content-center justify-content-md-start text-uppercase position-relative ${l!==void 0?l:""}`,onClick:()=>{if(MicroModal.show("modal-popup-motorcycle-lookup",{disableScroll:!0,disableFocus:!0,awaitCloseAnimation:!0,onClose:d}),F("Motorcycle Compatibility Lookup","Open popup"),D("MotoMountLookupOpened"),history.pushState){let c=window.location.search;if(!c.includes("motorcycle-lookup=true")){c.startsWith("?")?c=`${c}&motorcycle-lookup=true`:c="?motorcycle-lookup=true";let w=window.location.protocol+"//"+window.location.host+window.location.pathname+c;window.history.pushState({path:w},"",w)}}},children:[e.jsx(Be,{name:"question-mark"}),e.jsx("span",{className:"font-family-gotham ml-2 w-md-100",children:t})]}),e.jsx("div",{className:"modal micromodal",id:"modal-popup-motorcycle-lookup","aria-hidden":"true",children:e.jsx("div",{className:"modal__overlay position-fixed d-flex justify-content-center align-items-center",tabIndex:"-1","data-micromodal-close":!0,children:e.jsxs("div",{className:"modal__container m-3 position-relative",role:"dialog","aria-modal":"true","aria-labelledby":"modal-popup-motorcycle-lookup-title",style:{maxWidth:"650px",maxHeight:"95vh"},children:[e.jsx("header",{className:"modal__header mb-1",children:e.jsxs("button",{className:"modal__close p-0 d-block ml-auto","aria-label":f("text_close_popup"),"data-micromodal-close":!0,children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 38 38",children:e.jsx("path",{d:"M22.4 19l15-15A2.4 2.4 0 1033.8.8L19 15.7 4 .6A2.4 2.4 0 10.8 4.1l15 14.9-15 15a2.4 2.4 0 103.4 3.3l14.9-15 15 15a2.4 2.4 0 001.6.7 2.4 2.4 0 001.7-4l-15-15z"})}),e.jsx("span",{className:"sr-only",children:f("text_close_popup")})]})}),e.jsx("div",{className:"modal__content",id:"modal-popup-motorcycle-lookup-content",children:e.jsxs("div",{className:"text-center mx-auto p-4 p-md-5",children:[e.jsx("h6",{className:"modal__title mb-4",id:"modal-popup-motorcycle-lookup-title",children:t}),e.jsx(te,{location:"mountLookup: popup",showError:"true",children:e.jsx(Rs,{mode:"popup",options:s,selectedArray:n,onChange:o,mountsWithNewTag:a})},i)]})})]})})})]})},_t=({handleChange:t,selectedVariant:s,variants:n,mountsWithNewTag:o=[]})=>e.jsx(Js,{title:f("ml_title"),options:n.map(l=>l.title),selectedArray:s?[s.title]:[],onChange:l=>{const a=n.find(i=>i.title===l);t(a)}
2,extraClasses:"mt-2",mountsWithNewTag:o}),pt=({reference:t})=>["baf","vent"].includes(t)?e.jsx(gt,{reference:t,type:"wide",action:f(`button_${t}`),text:f(`button_${t}`),extraClasses:"mt-2"}):null,U=t=>{var n;const s=window.location.pathname.split("/products/")[0];if(t)try{dataLayer.push({event:"dl_view_item",ecommerce:{currencyCode:Shopify.currency.active,detail:{actionField:{list:s},products:[{id:t.sku,name:t.title,brand:t.vendor,category:t.type,variant:t.title,price:t.price,compare_at_price:t.price,list:s,product_id:t.productId,variant_id:t.id,image:(n=t.image)==null?void 0:n.src,url:`${window.location.origin}${window.location.pathname}`}]}}})}catch(o){console.log(o)}},Xs=(t,s)=>JSON.stringify(t)===JSON.stringify(s),Zs=({options:t})=>{const s=Object.values(t);return s.length>0?e.jsx("div",{className:"mb-3",children:s.map(n=>{const o=n.products[0],l=o.variants[0],a=o.title.includes(" - ")&&!o.title.includes("Quad Lock 360")?o.title.split(" - ")[1]:o.title;return U(l),e.jsxs(ee.Fragment,{children:[e.jsx("div",{className:"mb-1 buy__dropdown position-relative",children:e.jsx("div",{className:"d-flex bg-transparent w-100 text-left justify-content-between align-items-center pointer-none-all is--valid",children:e.jsx(ie,{image:l.image.src,title:a.replace("&#39;","'"),alreadyInKit:!0,freeGWP:n.free_gwp,price:null,compareAtPrice:o.price})})},o.id),e.jsx(ae,{variant:l,classes:"mt-2 mb-3",product:o}),["QLA-BAF"].includes(l.sku)&&e.jsxs(e.Fragment,{children:[e.jsx(pt,{reference:"baf"}),e.jsx(Ys,{})]}),["QLM-VNT","QLK-4X4-VNT","QLK-PN-VNT"].includes(l.sku)&&e.jsx(pt,{reference:"vent"}),["QLM-BRS-2","QLM-CLH","QLM-MST","QLM-MIR-2"].includes(l.sku)&&e.jsx(_t,{handleChange:i=>console.log(i),selectedVariant:l,variants:o.variants})]},o.id)})}):null},en=ee.memo(Zs,Xs),Ct=[{reference:"dangerous",text:"button_dangerous_good"},{reference:"moto-wch-options",text:"button_more_info"},{reference:"mst-adaptor-kit",text:"button_more_info"},{reference:"popup-4x4",text:"button_mount_suitable"},{reference:"popup-airpods",text:"button_what_phone"},{reference:"popup-bike",text:"button_mount"},{reference:"popup-byk-case",text:"button_mount"},{reference:"popup-car",text:"button_mount_suitable"},{reference:"popup-desk",text:"button_mount_suitable"},{reference:"popup-extra",text:"button_more_info"},{reference:"popup-galaxy",text:"button_what_phone"},{reference:"popup-ipad",text:"button_what_phone"},{reference:"popup-iphone",text:"button_what_phone"},{reference:"popup-motor",text:"button_mount"},{reference:"popup-pixel",text:"button_what_phone"},{reference:"popup-poncho",text:"button_more_info"},{reference:"popup-poncho-cases",text:"button_more_info"},{reference:"popup-poncho-moto",text:"button_more_info"},{reference:"popup-truck",text:"button_mount_suitable"},{reference:"popup-upgrade-car",text:"button_more_info"},{reference:"popup-upgrade-desk",text:"button_more_info"},{reference:"stem-cap-mount-compatibility",text:"stem_suit_button"},{reference:"vent",text:"Are my vents suitable?"},{reference:"vibration",text:"button_more_info"}],de=({handleClick:t,isError:s,label:n,number:o,popup:l,selectedVariant:a,tooltip:i,tooltipLabel:r,values:d,extraClasses:c})=>{var h,p;const w=`dropdown-ignore-brand buy__selector--name border-0 p-0 bg-transparent text-left text-uppercase ${c}`;return e.jsxs("div",{className:"d-flex justify-content-between align-items-center",style:{minHeight:"24px"},children:[typeof t=="function"?e.jsxs("button",{className:`${w} ${s&&!a?"is--error":""}`,onClick:t,children:[o&&`${o}. `,n]}):e.jsx("div",{className:w,children:n}),l&&e.jsx(gt,{reference:l,action:f(((h=Ct.find(m=>m.reference===l))==null?void 0:h.text)??"button_more_info"),text:f(((p=Ct.find(m=>m.reference===l))==null?void 0:p.text)??"button_more_info"),type:"small",values:d}),!l&&i&&e.jsx(As,{label:r,text:i})]})},mt=(t,s)=>Object.values(t).map((o,l)=>ts(o,s[`option${l+1}`],s)).every(Boolean),ts=(t,s,n)=>{let o=t.value.trim().toLowerCase();const l=Object.values(n).filter(r=>r?.sku).map(r=>r.sku);if(o==null||o==="")return!0;const a=o.startsWith("[")?JSON.parse(o.replace(/&quot;/g,'"')):[];if(l.includes("QLK-EV-CAR-MAG-WCH")&&a.includes("qlh-mag-wch-2"))return!0;
2if(!s||!s.sku)return!1;if(o==="(any)")return!0;const i=s.sku.toLowerCase();return a.length?a.includes(i):!!new RegExp(o).test(i)},tn=({alwaysShow:t,conditions:s,label:n,product:o,selectedProducts:l,onFreeGWPChange:a,selectedFreeGWP:i})=>{const[r,d]=b.useState(!1),[c,w]=b.useState(!1),h=o.variants[0],p=o.title.includes(" - ")&&!o.title.includes("Quad Lock 360")?o.title.split(" - ")[1]:o.title;b.useEffect(()=>{const g=mt(s,l);g&&!r&&(a(h,"add"),d(!0)),w(g)},[l]);const m=g=>{if(!mt(s,l))return null;i?a(h,"remove"):a(h,"add")};return!t&&h.inventory_quantity<=3?null:e.jsxs("div",{className:"mt-3 mb-3",children:[n&&e.jsx(de,{label:n,extraClasses:c?"color-free-gwp":""}),e.jsxs("div",{className:`mb-1 buy__dropdown position-relative border ${c?"border-free-gwp":"border-transparent"}`,children:[e.jsxs("div",{className:"byk__dropdown--small d-flex flex-grow-1 align-items-center pointer-none w-100",children:[e.jsx("div",{className:"buy__image mr-2 buy__image--row position-relative cursor-pointer border-0 ml-2",children:e.jsx("img",{alt:p,src:h.image.src})}),e.jsxs("div",{className:"buy__variant--title p-0 pr-1 d-flex flex-column justify-content-between w-100 align-items-start",children:[e.jsxs("div",{className:"d-flex flex-column align-items-start",children:[e.jsx("span",{className:"buy__selector--name text-uppercase mb-1 tag tag--free d-inline-block",children:f("tag_free_product")}),e.jsx("span",{className:"d-inline-block pr-1 mr-auto",children:p})]}),e.jsx(Xe,{price:"Free",plus:!0,compareAtPrice:h.compareAtPrice})]}),e.jsx("div",{className:"free-gwp__atc--top w-50 text-right",children:e.jsx("button",{className:`btn ${i?"btn--freegwp btn--remove":"btn--freegwp"} px-2 ${c?"cursor-pointer":"cursor-not-allowed"}`,disabled:!c,onClick:m,children:i?f("remove"):f("atc_add_to_kit")})})]}),e.jsx("span",{className:"free-gwp__heading d-block pl-3 mb-0 mt-2",children:f("free_gwp_unlock")}),e.jsx("ul",{className:"free-gwp__conditions d-flex p-2 mb-1",children:Object.values(s).map((g,y)=>{if(!g.value)return null;const u=ts(g,l[`option${y+1}`],l);return e.jsxs("li",{className:"free-gwp__condition py-1 d-flex align-items-center",children:[u?e.jsx(Be,{name:"tick"}):e.jsx(Be,{name:"tick-empty"}),e.jsx("span",{className:"px-2 text-wrap-balance",children:g.text})]},We())})}),e.jsx("div",{className:"free-gwp__atc--bottom text-center pt-0",children:e.jsx("button",{className:`btn btn--freegwp px-2 ${c?"cursor-pointer":"cursor-not-allowed"}`,disabled:!c,onClick:m,children:i?f("remove"):f("atc_add_to_kit")})})]},o.id),e.jsx(ae,{variant:h,classes:"mt-2 mb-3",product:o})]})},Se="modal-ebike-charging__question text-uppercase font-family-gotham mb-2",Ae="d-flex flex-column flex-md-row justify-content-start pl-0 font-family-gotham",et="modal-ebike-charging__result p-2 d-flex align-items-start justify-content-start font-family-gotham mb-2",Pt=({onClickHandler:t,selectedVariant:s,variant:n})=>{const o=s?.sku===n.sku;return e.jsxs("button",{className:"ml__mount--popup text-left d-flex border-0 p-0 bg-transparent mb-2 w-100",onClick:()=>{t(n),F("Ebike Cable","Add to Kit"),D("EBikeAddToKit")},children:[e.jsxs("div",{className:`d-flex align-items-center buy__image mr-2 position-relative cursor-pointer ${o?"active":""}`,children:[e.jsx("div",{className:"buy__mask cursor-pointer position-absolute"}),e.jsx("img",{alt:`${f("text_image_of")} ${n.title}`,src:n.image.src})]}),e.jsxs("div",{className:"p-0 d-flex flex-column justify-content-start cursor-pointer w-100",children:[e.jsx("div",{className:"color-black text-capitalize font-family-gotham",style:{whiteSpace:"pre-wrap"},children:n.title}),e.jsx("div",{className:"font-family-gotham-book mb-0 pt-1",children:e.jsx("p",{children:ge(null,null,n.sku)})})]})]})},oe=({text:t,stepAnswer:s,onClickHandler:n})=>e.jsx("li",{className:"",children:e.jsx("button",{className:`text-center text-uppercase ${s===t?"is-active":""}`,onClick:n,children:t})}),wt=()=>e.jsx("svg",{className:"mr-2",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.8 7.7L11 15.4a.7.7 0 0 1-1 0l-2.9-2.9a.8.8 0 0 1 0-1c.3-.3.8-.3 1 0l2.4 2.3 5.1-5.2c.3-.3.8-.3 1 0 .4.3.4.8 0 1.1Z",fill:"#292D32"})}),sn=()=>e.jsx("svg",{className:"mr-2",viewBox:"0 0 800 800",children:e.jsx("path",{d:"M164.5 164.1a333.9 333.9 0 0 0-.4 471.4 333.9 333.9 0 0 0 471.4.4 333.9 333.9 0 0 0 .4-471.4 333.9 333.9 0 0 0-471.4-.4ZM512 323.5 435.4 400l76.5 76.7a25.2 25.2 0 0 1 0 35.3 25.2 25.2 0 0 1-35.4 0L400 435.4l-76.7 76.5a25.2 25.2 0 0 1-35.3 0 25.2 25.2 0 0 1 0-35.4l76.6-76.5-76.5-76.7a25.2 25.2 0 0 1 0-35.3 25.2 25.2 0 0 1 35.4 0l76.5 76.6 76.7-76.5a25.2 25.2 0 0 1 35.3 0 25.2 25.2 0 0 1 0 35.4Z",fill:"#292d32",fillRule:"nonzero"})}),bt=()=>e.jsx("span",{className:"font-family-gotham-book",children:q("ebike_result_warning")}),nn=()=>e.jsxs("div",{className:et,children:[e.jsx(wt,{}),e.jsxs("span",{children:[q("ebike_result_bosch"),e.jsx("br",{}),e.jsx(bt,{})]})]}),on=()=>e.jsxs("div",{className:et,children:[e.jsx(wt,{}),e.jsxs("span",{children:[q("ebike_result_shimano"),e.jsx("br",{}),e.jsx(bt,{})]})]}),ln=()=>e.jsxs("div",{className:et,children:[e.jsx(wt,{}),e.jsxs("span",{children:[q("ebike_result_other"),e.jsx("br",{}),e.jsx(bt,{})]})]}),rn=()=>e.jsxs("div",{className:`${et}
2 modal-ebike-charging__result--no`,children:[e.jsx(sn,{}),e.jsx("span",{children:q("ebike_result_incompatible")})]}),an=({result:t,handleChange:s,selectedVariant:n,variants:o})=>{const l=o&&o.find(i=>i.sku==="QLA-BO-1100"),a=o&&o.find(i=>i.sku==="QLA-SH-1100");if(!t)return null;if(t==="bosch")return e.jsxs(e.Fragment,{children:[e.jsx(nn,{}),l&&e.jsx(Pt,{onClickHandler:s,selectedVariant:n,variant:l})]});if(t==="shimano")return e.jsxs(e.Fragment,{children:[e.jsx(on,{}),a&&e.jsx(Pt,{onClickHandler:s,selectedVariant:n,variant:a})]});if(t==="other")return e.jsx(ln,{});if(t==="incompatible")return e.jsx(rn,{})},cn=()=>e.jsx("div",{className:"mt-4",dangerouslySetInnerHTML:{__html:q("ebike_step1_info")}}),dn=()=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-4",dangerouslySetInnerHTML:{__html:q("ebike_step7_info")}}),e.jsx("img",{src:"https://cdn.shopify.com/s/files/1/0941/8836/files/CUSTOM_CONNECTOR_1_resized.svg?v=1743041265",className:"w-100"})]}),un=({handleChange:t,selectedVariant:s,variants:n})=>{const[o,l]=b.useState(1),[a,i]=b.useState(null),[r,d]=b.useState(""),[c,w]=b.useState(""),[h,p]=b.useState(""),[m,g]=b.useState(""),[y,u]=b.useState(""),[j,_]=b.useState(""),[k,$]=b.useState("");return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"modal-ebike-charging font-family-gotham-book",children:[e.jsxs("div",{children:[e.jsx("div",{className:Se,children:q("ebike_step1_q")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step1_yes"),stepAnswer:r,onClickHandler:()=>{l(2),d(q("ebike_step1_yes")),i(null),F("Ebike Cable","Step 1: Yes"),D("EBikeStep1Yes")}}),e.jsx(oe,{text:q("ebike_step1_no"),step1Answer:r,onClickHandler:()=>{l(1),d(q("ebike_step1_no")),i("incompatible"),F("Ebike Cable","Step 1: No"),D("EBikeStep1No")}})]})})]}),o>1&&e.jsxs("div",{children:[e.jsx("div",{className:Se,children:q("ebike_step2_q")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step2_bosch"),stepAnswer:c,onClickHandler:()=>{l(3),w(q("ebike_step2_bosch")),i(null),F("Ebike Cable","Step 2: Bosch"),D("EBikeStep2Bosch")}}),e.jsx(oe,{text:q("ebike_step2_shimano"),stepAnswer:c,onClickHandler:()=>{l(4),w(q("ebike_step2_shimano")),i(null),F("Ebike Cable","Step 2: Shimano"),D("EBikeStep2Shimano")}}),e.jsx(oe,{text:q("ebike_step2_other"),stepAnswer:c,onClickHandler:()=>{l(6),w(q("ebike_step2_other")),i(null),F("Ebike Cable","Step 2: Other"),D("EBikeStep2Other")}})]})})]}),o===3&&e.jsxs("div",{children:[e.jsx("div",{className:Se,dangerouslySetInnerHTML:{__html:q("ebike_step3_q")}}),e.jsx("p",{children:q("ebike_step3_warning")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step3_yes"),stepAnswer:h,onClickHandler:()=>{p(q("ebike_step3_yes")),i("bosch"),F("Ebike Cable","Step 3: Yes"),D("EBikeStep3Yes")}}),e.jsx(oe,{text:q("ebike_step3_no"),stepAnswer:h,onClickHandler:()=>{l(3),p(q("ebike_step3_no")),i("incompatible"),F("Ebike Cable","Step 3: No"),D("EBikeStep3No")}})]})})]}),(o===4||o===5)&&e.jsxs("div",{children:[e.jsx("div",{className:Se,children:q("ebike_step4_q")}),e.jsx("p",{children:q("ebike_step4_additional_1")}),e.jsx("p",{children:q("ebike_step4_additional_2")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step4_yes"),stepAnswer:m,onClickHandler:()=>{l(5),g(q("ebike_step4_yes")),i(null),F("Ebike Cable","Step 4: Yes"),D("EBikeStep4Yes")}}),e.jsx(oe,{text:q("ebike_step4_no"),stepAnswer:m,onClickHandler:()=>{l(4),g(q("ebike_step4_no")),i("incompatible"),F("Ebike Cable","Step 4: No"),D("EBikeStep4No")}})]})})]}),o===5&&e.jsxs("div",{children:[e.jsx("div",{className:Se,children:q("ebike_step5_q")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step5_yes"),stepAnswer:y,onClickHandler:()=>{u(q("ebike_step5_yes")),i("shimano"),F("Ebike Cable","Step 5: Yes"),D("EBikeStep5Yes")}}),e.jsx(oe,{text:q("ebike_step5_no"),stepAnswer:y,onClickHandler:()=>{l(5),u(q("ebike_step5_no")),i("incompatible"),F("Ebike Cable","Step 5: No"),D("EBikeStep5No")}})]})})]}),(o===6||o===7)&&e.jsxs("div",{children:[e.jsx("div",{className:Se,children:q("ebike_step6_q")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step6_yes"),stepAnswer:j,onClickHandler:()=>{l(7),_(q("ebike_step6_yes")),i(null),F("Ebike Cable","Step 6: Yes"),D("EBikeStep6Yes")}}),e.jsx(oe,{text:q("ebike_step6_no"),stepAnswer:j,onClickHandler:()=>{l(6),_(q("ebike_step6_no")),i("incompatible"),F("Ebike Cable","Step 6: No"),D("EBikeStep6No")}})]})})]}),o===7&&e.jsxs("div",{children:[e.jsx("div",{className:Se,children:q("ebike_step7_q")}),e.jsx("div",{className:"product__info--tabs",children:e.jsxs("ul",{className:Ae,children:[e.jsx(oe,{text:q("ebike_step7_yes"),stepAnswer:k,onClickHandler:()=>{$(q("ebike_step7_yes")),i("other"),F("Ebike Cable","Step 7: Yes"),D("EBikeStep7Yes")}}),e.jsx(oe,{text:q("ebike_step7_no"),stepAnswer:k,onClickHandler:()=>{$(q("ebike_step7_no")),i("incompatible"),F("Ebike Cable","Step 7: N
2o"),D("EBikeStep7No")}})]})})]}),e.jsx(an,{result:a,handleChange:t,selectedVariant:s,variants:n}),o===1&&e.jsx(cn,{}),o===7&&e.jsx(dn,{})]})})},pn=({title:t,extraClasses:s,handleChange:n,selectedVariant:o,variants:l})=>{const a="ebike-charging",i=r=>{var d;n(r),(d=document.querySelector(`#modal-${a} .modal__overlay`))==null||d.click()};return D("EBikeSeen"),e.jsxs(e.Fragment,{children:[e.jsxs("button",{id:`js-button-${a}`,className:`info-block info-block--selector w-100 d-flex align-items-center justify-content-center justify-content-md-start text-uppercase position-relative ${s!==void 0?s:""}`,onClick:()=>{MicroModal.show(`modal-${a}`,{disableScroll:!0,disableFocus:!0,awaitCloseAnimation:!0}),F("Ebike Cable","Open popup"),D("EBikeOpen")},children:[e.jsx(Be,{name:"question-mark"}),e.jsx("span",{className:"font-family-gotham ml-2 w-md-100",children:t})]}),e.jsx("div",{className:"modal micromodal",id:`modal-${a}`,"aria-hidden":"true",children:e.jsx("div",{className:"modal__overlay modal__ebike position-fixed d-flex justify-content-center align-items-center",tabIndex:"-1","data-micromodal-close":!0,children:e.jsxs("div",{className:"modal__container m-3 position-relative",role:"dialog","aria-modal":"true","aria-labelledby":`modal-${a}-title`,children:[e.jsx("header",{className:"modal__header mb-1",children:e.jsxs("button",{className:"modal__close p-0 d-block ml-auto","aria-label":f("text_close_popup"),"data-micromodal-close":!0,children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 38 38",children:e.jsx("path",{d:"M22.4 19l15-15A2.4 2.4 0 1033.8.8L19 15.7 4 .6A2.4 2.4 0 10.8 4.1l15 14.9-15 15a2.4 2.4 0 103.4 3.3l14.9-15 15 15a2.4 2.4 0 001.6.7 2.4 2.4 0 001.7-4l-15-15z"})}),e.jsx("span",{className:"sr-only",children:f("text_close_popup")})]})}),e.jsx("div",{className:"modal__content",id:`modal-${a}-content`,children:e.jsxs("div",{className:"popup_table w-100 p-4 p-md-5 text-left",children:[e.jsxs("div",{className:"d-flex flex-column flex-md-row justify-content-between align-items-start",children:[t&&e.jsx("h6",{className:"text-uppercase pr-4 mb-2",id:`modal-${a}-title`,children:t}),e.jsx("div",{className:"d-flex flex-row",children:e.jsx("button",{className:"btn--text btn--blue mb-3 mb-md-0",onClick:()=>{var r,d;(r=document.querySelector(".js-chat-button"))==null||r.click(),(d=document.querySelector(`#modal-${a} .modal__overlay`))==null||d.click()},children:f("popup_chat")})})]}),e.jsx(un,{handleChange:i,selectedVariant:o,variants:l})]})})]})})})]})},ss=({handleChange:t,selectedVariant:s,variants:n})=>e.jsx(pn,{title:f("popup_ebike_suitability"),extraClasses:"mt-2",handleChange:t,selectedVariant:s,variants:n}),mn=t=>{if(Shopify.locale=="fr")return["a","e","i","o","u"].includes(t.charAt(0).toLowerCase())?`${f("sel_no_word_apostrophe")}${t.charAt(0).toLowerCase()}${t.slice(1)}`:`${f("sel_no_word")} ${t}`;if(Shopify.locale=="de"){const s=t.toLowerCase();let n="";return["displayschutzfolie","2 x distanzh\xFClsen (10mm)","ladem\xF6glichkeit","wetterfeste h\xFClle","farbige schelle"].includes(s)&&(n="e"),`${f("sel_no_word")}${n} ${t}`}if(Shopify.locale=="es"){const s=t.toLowerCase();let n="\xFAn",o=`${f("sel_no_word").replace(n,"")}`;return["carcasa","funda protectora resistente a la intemperie","opci\xF3n de energ\xEDa","base","c\xE1mara/adaptador de luz","opci\xF3n de carga","palanca de color","bater\xEDa externa mag"].includes(s)&&(n="una"),`${o}${n} ${t}`}return`${f("sel_no_word")} ${t}`},Me=({atTop:t,handleNoClick:s,isYesSelected:n,selectInit:o,thing:l,description:a,noTitle:i,noImage:r})=>{const d=i||mn(l);return e.jsx("li",{className:`buy__variant position-relative p-1 ${!t&&"mt-n1"}`,children:e.jsxs("button",{className:"byk__dropdown d-flex bg-transparent text-left p-0 border-0 w-100",onClick:()=>{s()},children:[e.jsxs("div",{className:`buy__image mr-2 buy__image--row position-relative cursor-pointer ${o&&!n?"active":""}`,children:[e.jsx("div",{className:`buy__mask cursor-pointer position-absolute ${o&&!n?"":"buy__mask--bg"}`}),e.jsx("img",{alt:f("sel_no_selection"),className:"lazyload",src:r||"https://cdn.shopify.com/s/files/1/2576/2754/files/thumbnail_none_selected.png?v=1234"})]}),e.jsxs("div",{className:"buy__variant--title p-0 d-block cursor-pointer w-100",children:[e.jsx("span",{className:"d-inline-block pr-1",children:d}),e.jsx("br",{}),e.jsx("p",{className:"font-family-gotham-book mb-0 pt-1",children:a})]})]})})},He=["poncho-all-iphone-devices","poncho-all-galaxy-devices","poncho-all-pixel-devices"],ze=["tempered-glass-screen-protector-iphone","screen-protector-galaxy","screen-protector-pixel","tempered-glass-screen-protectors-ipad"],Ce=t=>{const s=atob(t),n=new Uint8Array(s.length);for(let l=0;l<s.length;l++)n[l]=s.charCodeAt(l);return new TextDecoder("utf-8").decode(n)},ns=["desk-mount-kit-all-galaxy-devices","desk-mount-kit-all-iphone-devices","desk-mount-kit-all-pixel-devices","desk-mount-kit-universal","home-office-desk-mount","home-office-dual-desktop-wireless-charger","home-office-wireless-charging-pad"],Qe=["mag-wireless-charging-head","charging-wireless-charging-head","mag-head"],hn=t=>Object.fromEntries(Object.entries(t).filter(([s,n])=>n!==null)),ht=(t,s,n,o)=>{var i;let l=[];const a=Object.values(n).flatMap(r=>r.products.map(d=>d.handle));for(const r of Object.values(hn(t))){const d=s.skus[r.sku];d&&d.forEach(c=>{!l.includes(c)&&!a.includes(c)&&l.push(c)})}if(t&&Object.values(t).some(r=>["QLA-MOT-WCH-3","QLH-HW-WCH-2","QLA-MOT-USB"].includes(r?.sku))&&l.splice(0,l.length,...l.filter(r=>r!=="colored-lever-out-front-mount")),o){const r=(i=s.chargingOption)==null?void 0:i.product_to_show.split("|"),d=o?.find(c=>r?.includes(c.handle));if(d){const c=s.chargingOption.optionalExtras;
2c&&c.forEach(w=>{w.variantskus.split(",").includes(d.sku)&&l.push(w.products)})}}return l},fn=(t,s,n)=>{const o={skus:{},magCaseHandles:[],otherHandles:[],airPodsHandles:[],otherTitle:null,multipleConfig:[],chargingOption:null,mirrorStemAdaptor:[]};for(const l of Object.values(t))for(const a of l.products)a.variants.forEach(i=>{o.skus[i.sku]=[]});for(const l of Object.values(t))for(const a of l.products){if(a.optionalExtras.length>0&&JSON.parse(Ce(a.optionalExtras).replace(/=>/g,":")).forEach(r=>{r.products!=null&&r.variantskus!=null&&r.variantskus.split(",").forEach(c=>{if(o.skus[c.trim()]&&!o.skus[c.trim()].includes(r.products)){if(r.products==="charging-mag-battery-pack"||["accessory-mag-bottle-mount-travel-bundle","accessory-mag-bottle-mount-free-gift-with-purchase"].includes(n)&&["mag-bottle-mount","tripod-selfie-stick"].includes(r.products)||r.products==="power-adaptor-charging"&&(["car","4x4","truck"].some(w=>s.handle.includes(w))||s.handle==="ball-top-cap-adaptors"))return;o.skus[c.trim()].push(r.products)}})}),(["motorcycle-mount","motorcycle-handlebar-clamp-mount","motorcycle-fork-stem-mount","motorcycle-clutch-mount","motorcycle-brake-reservoir-mount","mirror-mount-motorcycle-scooter","mirror-stem-mount","1-ball-adaptor-motorcycle"].includes(s.handle)||s.handle.includes("universal"))&&["QLM-HBR","QLM-HBR-PRO","QLM-HBR-CHR","QLM-LHB-PRO","QLM-LHB-CHR","QLM-HBC","QLM-HBC-PRO","QLM-FSM","QLM-FSM-2","QLM-FSM-PRO","QLM-CLH","QLM-BRS-2","QLM-MIR-2","QLM-MST","QLM-BAL-2"].forEach(i=>{o.skus[i]||(o.skus[i]=[]),o.skus[i].push("colored-lever-out-front-mount"),s.handle.includes("universal")&&o.skus[i].push("usb-charger-motorcycle")}),a.optionalExtrasMAG.length>0&&Ce(a.optionalExtrasMAG).split(",").forEach(r=>{o.magCaseHandles.push(r)}),a.optionalExtrasOther.length>0&&Ce(a.optionalExtrasOther).split(",").forEach(r=>{r==="replacement-360-gimbal-adaptor"?Qe.includes(s.handle)&&o.otherHandles.push(r):o.otherHandles.push(r)}),a.optionalExtrasAirPods.length>0&&Ce(a.optionalExtrasAirPods).split(",").forEach(r=>{o.airPodsHandles.push(r)}),a.optionalExtrasOtherTitle.length>0&&(Qe.includes(s.handle)?o.otherTitle=a.optionalExtrasOtherTitle:a.handle==="suction-windscreen-dash-car-mount-clearance"?s.type!=="Kits"&&(o.otherTitle=a.optionalExtrasOtherTitle):Qe.includes(a.handle)||(o.otherTitle=a.optionalExtrasOtherTitle)),a.optionalExtrasAirPodsTitle.length>0&&(o.airPodsTitle=a.optionalExtrasAirPodsTitle),a.optionalExtraChargingOption.length>0&&!["motorcycle-mount","motorcycle-handlebar-clamp-mount","motorcycle-fork-stem-mount","motorcycle-clutch-mount","motorcycle-brake-reservoir-mount","mirror-mount-motorcycle-scooter","mirror-stem-mount","1-ball-adaptor-motorcycle"].includes(s.handle)&&!s.handle.includes("universal")){const i=JSON.parse(Ce(a.optionalExtraChargingOption).replace(/=>/g,":"));o.chargingOption=i}a.optionalExtraMultipleConfig.length>0&&JSON.parse(Ce(a.optionalExtraMultipleConfig).replace(/=>/g,":")).forEach(r=>{o.multipleConfig.push(r)})}return o.magCaseHandles=[...new Set(o.magCaseHandles)],o.otherHandles=[...new Set(o.otherHandles)],o.airPodsHandles=[...new Set(o.airPodsHandles)],o},gn=(t,s)=>{const n=Object.values(s).filter(o=>o!==null).map(o=>o!=null&&o.sku?o?.sku:null);if(t.chargingOption){const o=t.chargingOption.dont_show_on_these_devices.split(",");return n.some(l=>o.includes(l))?null:t.chargingOption}return null},ft=(t,s,n,o,l)=>{const a={case:[],chargingOption:null,kit:[],other:[],airPods:[],mstAdaptor:[]},i=[];if(!s||Object.values(n).every(c=>c===null))return a;a.chargingOption=gn(t,n);const r=X(n,"case"),d=Object.values(n).map(c=>c?.handle);return o.handle==="airpods-bundles"&&(a.chargingOption=null),o.handle==="cycling-bike-alarm-and-finder"&&(a.chargingOption=null),s.forEach(c=>{var h;if(c==="cycle-power-cables"&&!a.chargingOption||c==="anti-theft-screw-kit"&&["launch-exclusive-bike-security-bundle","cycling-bike-alarm-and-finder"].includes(o.handle)||c==="sanity-all-cases"&&o.type==="Kits"||c==="sanity-all-cases"&&o.handle==="iphone18-bundle"||c==="mag-bottle-mount-mclaren-edition"&&o.handle.includes("mag-bottle")||c==="replacement-360-gimbal-adaptor"&&!Qe.includes(o.handle)||c==="mag-bottle-mount"&&o.handle.includes("mag-bottle")||c==="charging-dual-usb-12v-car-charger"&&ns.includes(o.handle)||i.includes(c))return;const w=(h=t.multipleConfig.find(p=>p.handle===c))==null?void 0:h.products;d.includes(c)||w!=null&&w.some(p=>d.includes(p.handle))||(c==="mirror-stem-mount-adaptor-kit"?a.mstAdaptor.push(c):r&&t.magCaseHandles.includes(c)?a.case.push(c):t.airPodsHandles.includes(c)?a.airPods.push(c):t.otherHandles.includes(c)?a.other.push(c):a.kit.push(c),i.push(c))}),l.includes("case-airpods")&&(a.airPods=[]),a},xn=(t,s)=>{const n=["FSP","HBP","HBCP","FSM-PRO","HBC-PRO","HBR-PRO","HBR-CHR","LHBP","LHBP-CHR","LHB-PRO","LHB-CHR","SCM","SCA","OFM-PRO-2"],o=new RegExp(n.join("|")),l=s?o.test(s):!1,a=["SCM","SCA"],r=new RegExp(a.join("|")).test(s);return t.sku=="QLP-MLL-BL"&&!l&&!r?!1:t.sku=="QLP-MLL-BK"&&l&&!r?"spacer":!0},os=(t,s,n)=>{if(n&&["QLM-2DWC","QLM-2DWC-2","QLM-WCP-2"].includes(s)&&(t.includes("18W")||t.includes("18 W"))||n&&s==="QLM-WCP"&&(t.includes("30W")||t.includes("30 W")||t.includes("36W")||t.includes("36 W")))return!1;let o=null;try{o=localStorage&&localStorage.getItem("geolocationData")?JSON.parse(localStorage.getItem("geolocationData")):null}catch(l){console.error("localStorage error:",l)}return!(window.Shopify.shop=="quadlockcase.myshopify.com"&&o&&o.country==="US"&&(Shopify.locale==="en"&&!t.includes("US Standard")||Shopify.locale==="es"&&!t.includes("Est\xE1ndar EE. UU.")))},nt=(t,s,n,o)=>{const l=X(n,"case"),a=X(n,"mount"),i=X(n,"OTHER");if(l){let r=null;switch(!0){case t.handle.includes("folio"):r="folio";break;case t.handle.includes("poncho"):r="poncho";break;case t.handle.includes("screen"):r="screen";break}if(r){const d=z(l?.title,"case",r);if(t.title!==d)return!1}if(t.sku=="QLH-HW-WCH-2"&&z(l.title,"case","noHwWCH")==!0||t.sku=="QLH-MAG-WCH-2"&&z(l.title,"case","noMagWCH")==!0)return!1}if(t.handle==="colored-lever-out-front-mount"&&(a||i))return xn(t,a?.sku);if(t.handle==="power-adaptor-charging"){const r=["home-office-dual-desktop-wireless-charger","home-office-wireless-charging-pad"],d=o?.find(c=>r.includes(c.handle))??(i?.handle==="home-office-wireless-charging-pad"?i:null);return os(s,d?.sku,!0)}return!(t.handle==="colored-mag-ring"&&gs(t.title,"Black")||["QLA-BTA"].includes(t.sku)&&window.geoblock&&window.geoblock.block_asia_qla_bta&&window.Shopify.shop=="quadlockcase-jp.myshopify.com"||t.sku.includes("QLBUNDLE"))},ls=({group:t,onChange:s,data:n,containerClasses:o,extraMetafields:l,optional:a,optionalTop:i,selectedProducts:r,selectedOptionalExtras:d,handle:c})=>{const[w,h]=b.useState(!1),[p,m]=b.useState(!1),[g,y]=b.useState(null),[u,j]=b.useState(null),_=n.variants.filter(x=>nt(x,x.title,r,d)===!0),k=_.length?_:n.variants;let $=u||k.reduce((x,M)=>M.price<x.price?M:x),S=u?!1:k.length>1&&!k.every(x=>x.price===$.price);b.useEffect(()=>{if(He.includes(n.handle)){const x=X(r,"case");if(x){const M=z(x.title,"case","poncho"),P=n.variants.find(O=>O.title==M);j(P||null),$=P,S=!1}}},[]),b.useEffect(()=>{if(g){if(d&&!d.some(x=>
2x.id==g.id)){y(null),m(!1);return}if(!nt(g,T(g),r,d)){s(g,"remove"),y(null),m(!1);return}}if(He.includes(n.handle)){const x=X(r,"case");if(x){const M=z(x.title,"case","poncho"),P=n.variants.find(O=>O.title==M);j(P||null),$=P,S=!1}}if(d){const x=n.variants.find(M=>d.some(P=>P.id===M.id));x&&(y(x),m(!0))}},[d]);const A=x=>{w||(x.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${t} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${t}`)[0])),h(!w)},I=()=>{h(!1),p||m(!0),g&&(s(g,"remove"),y(null)),J(document.querySelectorAll(`.dropdown-ignore-${t}`)[0])},G=x=>{h(!1),p||m(!0),y(x),U(x),s(x,"add"),J(document.querySelectorAll(`.dropdown-ignore-${t}`)[0])},C=()=>g.title==="Default Title"?g.productTitle:g.productTitle?`${g.productTitle} - ${g.title}`:g.title,E=()=>n.handle=="universal-adapter"?f("sel_no_uni_selected"):l.titleforno?l.titleforno:fe(l.producttitle),N=()=>{const x=Object.values(r).find(M=>M&&M.option_type==="case");return!!(x&&["screen-protector-galaxy","screen-protector-pixel"].includes(n.handle)&&z(x.title,"case","screenMaterial")==="tpu")},H=(x,M)=>{if(M.description_yes)return M.description_yes;if(n.handle=="power-adaptor-charging")return ge(x,n.handle,M.sku);const P=X(r,"case");if(N()&&P)return qs(P.title);if(l.extraVariants){const O=l.extraVariants.find(V=>V.sku==M.sku);if(O&&O.description_yes)return O.description_yes}return l.descriptionforyes},R=()=>N()?f("product_screen_protector_tpu"):l.producttitle,T=x=>{let M=x.title==="Default Title"?l.producttitle:x.title;if(n.trackingTitle.includes("Poncho")&&(M=`${f("product_poncho")}
3${f("sel_for")} ${M}`),n.trackingTitle.includes("Screen Protector")&&(M=`${R(f("product_screen_protector"))}
4${f("sel_for")} ${M}`),l.extraVariants){const P=l.extraVariants.find(O=>O.sku==x.sku);if(P&&P.product_title)return P.product_title}return M},v=()=>{var P,O,V,ce;const x=n.variants[0].image.originalSrc,M=X(r,"case");if(He.includes(n.handle)&&M){const Z=z(M.title,"case","poncho");return((O=(P=n.variants.find(W=>W.title==Z))==null?void 0:P.image)==null?void 0:O.originalSrc)||x}if(ze.includes(n.handle)&&M){const Z=z(M.title,"case","screen");return((ce=(V=n.variants.find(W=>W.title==Z))==null?void 0:V.image)==null?void 0:ce.originalSrc)||x}return l.unselectedthumbnail?l.unselectedthumbnail:x};return He.includes(n.handle)&&!u?null:e.jsxs("div",{className:`${o}`,children:[e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${t} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all`,onClick:A,children:[g===null&&p?e.jsx(je,{title:E(),image:l.imageforno}):g?e.jsx(ie,{image:g.image.src,title:C(),price:g.price,compareAtPrice:g.compareAtPrice,tick:!0}):e.jsxs("div",{className:"byk__dropdown byk__dropdown--small d-flex flex-grow-1 align-items-center pointer-none",children:[e.jsx("div",{className:"buy__image mr-2 buy__image--row position-relative cursor-pointer border-0 ml-2",children:e.jsx("img",{alt:`Image of the ${l.producttitle}`,className:"lazyload","data-src":v(),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRF8vLyZAOKawAAAApJREFUeJxjYAAAAAIAAUivpHEAAAAASUVORK5CYII="})}),e.jsx("div",{className:"p-0 d-flex justify-content-between align-items-center cursor-pointer w-100",children:e.jsxs("span",{className:"d-inline-block pr-1",children:["+ ",R(l.producttitle)]})}),$&&e.jsx(Xe,{price:$?.price,from:S,plus:!0,compareAtPrice:$?.compareAtPrice})]}),e.jsx(se,{isActive:w,isInOptionalExtra:!0})]}),e.jsxs("ul",{className:`dropdown-${t} dropdown--styling w-100 p-0 ${w?"active":""}`,children:[a&&i&&e.jsx(Me,{handleNoClick:I,isYesSelected:g!==null,selectInit:p,thing:R(),atTop:i,description:l.descriptionforno,noTitle:l.titleno,noImage:l.imageforno}),n.variants.map((x,M)=>{if(x.hideFromOptionalExtras)return null;let P=T(x),O=nt(x,P,r,d);if(!O)return null;if(O==="spacer")return e.jsx("div",{className:"pt-1"},"spacer");if(!x.availableForSale&&x.handle!=="power-adaptor-charging")return e.jsx("div",{className:"buy__message is--error text-center w-100 p-2 mb-1",children:`${f("sel_no_word")} ${l.producttitle} ${f("sel_not_available_device")}`},"spacer");let V=null;return x.handle.includes("cycle-power-cables")&&(x.sku==="QLA-BO-1100"?V=f("heading_ebike"):x.sku==="QLA-USB-1100C"&&(V=f("heading_portable_battery"))),e.jsxs(ee.Fragment,{children:[V&&e.jsx(Pe,{text:V,index:M}),e.jsx(pe,{description:H(P,x),hasNegativeMargin:i||M!=0&&!i,image:x.image.originalSrc,isNew:!He.includes(n.handle)&&!ze.includes(n.handle)&&x.new_show_tag===!0,inventory:x,onClickHandler:G,onClickValue:x,price:x.price,compareAtPrice:x.compareAtPrice,title:P,variantInCart:g?.id===x.id},x.id)]},x.id)}),a&&!i&&e.jsx(Me,{handleNoClick:I,isYesSelected:g!==null,selectInit:p,thing:R(),atTop:i,description:l.descriptionforno,noTitle:l.titleforno,noImage:l.imageforno})]})]}),g&&e.jsx(ae,{variant:g,classes:"mt-2"}),c==="cycle-power-cables"&&e.jsx(ss,{handleChange:G,selectedVariant:g,variants:n.variants})]})},_n=t=>{const s={producttitle:"",descriptionforyes:"",descriptionforno:"",unselectedthumbn
4ail:"",extraVariants:""};if(t&&t.sanity&&t.sanity.optionalExtraConfiguration){const n=t.sanity.optionalExtraConfiguration;s.producttitle=n.product_title?n.product_title:t.title,s.descriptionforyes=n.description_yes?n.description_yes:"",s.descriptionforno=n.description_no?n.description_no:"",s.unselectedthumbnail=n.unselected_thumbnail?n.unselected_thumbnail:"",s.extraVariants=n.optional_extra_variants?n.optional_extra_variants:"",s.titleforno=n.title_no?n.title_no:"",s.imageforno=n.image_no?n.image_no:""}else s.producttitle=t.title;return s},xe=({handle:t,selectedProducts:s,selectedOptionalExtras:n,onChange:o,index:l})=>{const[a,i]=b.useState(null),[r,d]=b.useState(!0),[c,w]=b.useState(null);return b.useEffect(()=>{async function h(){const p=Shopify.locale!=="en"?`/${Shopify.locale}`:"",m=`${window.location.origin}${p}/products/${t}?view=data.json`;Promise.all([fetch(m).then(g=>g.json())]).then(async g=>{g.map(y=>{if(t!==y.handle)throw new Error(`Incorrect optional extra loaded: Wanted: ${t} Got: ${y.handle}`);if(y.sanity=JSON.parse(decodeURIComponent(escape(atob(y.sanity)))),y.variants.forEac
4h(u=>{var j,_;u.trackingTitle=y.trackingTitle,u.productTitle=(_=(j=y?.sanity)==null?void 0:j.optionalExtraConfiguration)==null?void 0:_.product_title,u.compareAtPrice=u.compareAtPrice&&u.compareAtPrice!=0?u.compareAtPrice:u.price,u.price=ne(u.price),y.sanity.optionalExtras&&(u.optionalExtras=y.sanity.optionalExtras)}),y.variants=y.variants.filter(u=>!u.hideFromOptionalExtras),y.sanity.optionalExtraConfiguration){const u=y.sanity.optionalExtraConfiguration;window.dropdownTexts=window.dropdownTexts||[];const j=[{sku:y.variants[0].sku,description:u.description_yes}];u.optional_extra_variants&&u.optional_extra_variants.forEach(_=>{j.push({sku:_.sku,description:_.description_yes})}),j.forEach(_=>{var $;($=window.dropdownTexts)!=null&&$.find(S=>S.sku===_.sku)||window.dropdownTexts.push(_)})}i(y),d(!1)})}).catch(g=>{console.log(g),w(g)})}a||h()},[]),c?null:r?e.jsx(Jt,{className:`buy__loading d-block ${l==0?"mt-n2 mb-1":"mb-1"}`,height:78,preserveAspectRatio:"none",speed:2,primarycolor:"#f3f3f3",secondarycolor:"#ecebeb",children:e.jsx("rect",{x:"0",y:"0",rx:"0",ry:"0",width:"100%",height:"100%"})},"upsell-loader"):a?a.variants.length==0?null:e.jsx(ls,{group:a.handle,onChange:o,data:a,containerClasses:l==0?"mt-n2 mb-1":"mb-1",extraMetafields:_n(a),optional:!0,optionalTop:!1,selectedProducts:s,selectedOptionalExtras:n,handle:t},`optional-${a.handle}`):null},wn=({number:t,colorPattern:s,variants:n,deviceVariant:o,selectedVariant:l,onSelect:a,product:i,isError:r,isOptionalExtra:d,disabled:c})=>{const w=o?Dt(o.title):null,h=r&&!l,p=window.Shopify.shop==="quadlockcase.myshopify.com",m=window.Shopify.shop==="quadlockcase-jp.myshopify.com",g=ke(p?"color":"colour");return e.jsxs("div",{className:`font-family-gotham text-left mt-3${c?" opacity-50 cursor-not-allowed":""}`,children:[!d&&e.jsx(de,{handleClick:()=>{},isError:r,label:g,number:t,selectedVariant:l,tooltip:f("warning_colour_transfer",p||m?"en-us":void 0),tooltipLabel:f("button_care_info")}),e.jsxs("div",{className:d?"d-flex align-items-center flex-wrap":void 0,children:[d&&e.jsxs("span",{className:"buy__selector--name text-uppercase mr-2 mb-0",children:[g,":"]}),e.jsx("div",{className:`collection__swatches${d?"":" mb-2"} d-flex align-items-center${h?" is--error":""}`,children:s.map(y=>{const u=w?n.find(k=>k.title===`${y.label} / ${w}`):null;if(!c&&!u)return null;const j=!!u&&l?.title===u.title,_=Cs(y.hex)>125;return e.jsx("button",{type:"button",className:`collection__swatch${j?" is-active":""}`,style:{backgroundColor:y.hex},"aria-label":`${f("verb_select")} ${y.label}`,"aria-pressed":j,disabled:c||!(u!=null&&u.availableForSale),onClick:()=>{c||!u||j||(a(u),F("Color Swatch","Color Swatch Interaction",`PDP - ${i.title} - ${y.label} Swatch`))},children:e.jsx("span",{className:`collection__swatch-label font-family-gotham-book${_?" collection__swatch-label--dark":""}`,children:y.label.toUpperCase()})},y.label)})})]})]})},is=({selectedOption:t,number:s,onChange:n,optionName:o,values:l,containerClasses:a,variants:i,product:r,isOptionalExtra:d,isError:c})=>{const[w,h]=b.useState(!1),[p,m]=b.useState(null),g="casetype",y=Ps.filter(C=>C in l).map(C=>({key:C,value:l[C]})),u=C=>Object.keys(C).some(E=>!["original","mag"].includes(E));b.useEffect(()=>{const E=new URLSearchParams(document.location.search.substring(1)).has("device");if(t&&!p){if(E&&u(l)){_(null);return}m(t),U(t)}},[t]);const j=C=>{w||(C.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${g} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${g}`)[0])),h(!w)},_=C=>{h(!1),m(C),U(C),n(C,o),J(document.querySelectorAll(`.dropdown-ignore-${g}`)[0])},k=C=>p?p.title===C:!1,$=C=>{const E=l[C];try{return window.settings.clearance_case_names.includes(E)}catch{return!1}},S=/corse|years|mclaren|oscar|lando|acosta|chucky|deegan|mcm|svg|zarco|rbar/i,A=y.some(({value:C})=>S.test(C));let I=!1,G=!1;return e.jsx("div",{className:`${a}`,children:e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${g} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${c&&!p?"is--error":""}`,onClick:j,children:[p?e.jsx(ie,{image:p.image.src,title:Ee(p.title),price:d&&ne(p.price),compareAtPrice:d&&p.compareAtPrice,tick:d&&!0,canPersonalize:window.Stylux&&z(p.title,"case","personalization")&&!d&&!r.tags.includes("personalization-hide")}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:j,children:`${f("verb_pick")} ${xs("Case Type")} ${_s("thing_case_type")}${f("sel_ending")}`}),e.jsx(se,{isActive:w})]}),e.jsx("ul",{className:`dropdown-${g} dropdown--styling w-100 p-0 ${w?"active":""}`,children:y.map((C,E)=>{const N=C.value,H=i.find(M=>M.title==N);if(!H||!H.availableForSale)return null;let R=H.compareAtPrice,T=ne(H.price),v=Ft(N);/airpods/i.test(H.title)&&(v=H.image.src),/corse|years|mclaren|oscar|lando|acosta|chucky|deegan|mcm|svg|zarco|rbar/i.test(H.title)&&(v=H.image.src);let x=null;if(A){const M=H.title.toLowerCase(),P=S.test(H.title);!P&&!G&&(M.includes("mag")||M.includes("airpods"))&&(x=f("sel_case_standard"),G=!0),P&&!I&&(x=f("sel_case_licensed"),I=!0)}return e.jsxs(ee.Fragment,{children:[x&&e.jsx(Pe,{text:x,index:E}),e.jsx(pe,{hasNegativeMargin:E!=0,image:v,imageSize:"large",onClickHandler:_,onClickValue:H,onClickIndex:s,title:Ee(N),option:"Case Type",price:T,compareAtPrice:R,variantInCart:k(N),hideMaskBG:!0,forMAGDropdown:!0,showClearance:$(C.key),inventory:H,sku:H.sku,canPersonalize:window.Stylux&&z(H.title,"case","personalization")&&!d&&!r.tags.includes("personalization-hide")},E)]},H.id)})})]})})}
4,yt=({text:t,extraClasses:s})=>e.jsxs("div",{className:`buy__message buy__message--mag p-2 text-center w-100 ${s!==void 0?s:""}`,children:[e.jsx("svg",{clipRule:"evenodd",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"d-inline-block mr-2",children:e.jsx("path",{d:"M12 21.5a10 10 0 1 0 0-20 10 10 0 0 0 0 20zm0-1.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zm0-6.5a.8.8 0 0 1-.7-.7V7.3a.8.8 0 0 1 1.5 0v5.5c0 .4-.4.7-.8.7zm0 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",fillRule:"nonzero"})}),t]}),Le=({title:t})=>e.jsx("div",{className:"byk__dropdown byk__dropdown--small d-flex align-items-center pointer-none",children:e.jsx("div",{className:"buy__variant--title p-0 d-block cursor-pointer w-100",children:e.jsx("span",{className:"d-inline-block pr-1 pl-3",children:t})})}),Nt=(t,s)=>{var a,i;const n=(a=t?.products)==null?void 0:a.find(r=>r.variants.some(d=>d.title===s));if(!((i=n?.colorPattern)!=null&&i.length))return null;const o=Dt(s);return n.colorPattern.some(r=>n.variants.some(d=>d.title===`${r.label} / ${o}`))?n:null},jt=({optionObject:t,selectedOption:s,number:n,onChange:o,optionName:l,containerClasses:a,variants:i,product:r,isError:d,isOptionalExtra:c,ponchoVariants:w,onCaseColorChange:h})=>{var Y,W,ue,ve;const[p,m]=b.useState(!1),[g,y]=b.useState(null),[u,j]=b.useState(null),[_,k]=b.useState(!1),[$,S]=b.useState([]),[A,I]=b.useState(null),{popup:G,dropdown_text:C}=t,E=L=>{var B;return!!((B=L.colorPattern)!=null&&B.length)&&L.variants.some(K=>L.colorPattern.some(me=>K.title.startsWith(`${me.label} / `)))},N=((Y=t?.products)==null?void 0:Y.length)>0&&t.products.every(E),H=(ue=(W=t?.products)==null?void 0:W.find(E))==null?void 0:ue.colorPattern,R=r.handle.includes("ipad"),T=c?null:Ze(C,R),v=Ve(C,R),x=l,M=L=>L.includes(" / ")?L.split(" / ")[1]:L,P=L=>{const B=M(L);return B.includes("MAG")?e.jsxs(e.Fragment,{children:[B.replace(" MAG",""),e.jsx("br",{}),"(",f("sel_case_mag"),")"]}):e.jsxs(e.Fragment,{children:[B,e.jsx("br",{}),"(",f("sel_case_og"),")"]})};b.useEffect(()=>{if(s){const L=Nt(t,s.title);if(L){I({product:L,device:s});const K=new URLSearchParams(document.location.search.substring(1)),me=K.has("device"),Ie=K.has("color");if(me&&!Ie){j(null),o(null,l);return}j(s),U(s),o(s,l);return}I(null);const B=ye(s.title,i,!0,t);B&&Object.keys(B).length>1&&!g&&(y(B.original||B.mag),k(!0)),j(s),U(s),S(B)}},[s]),b.useEffect(()=>{h?.(!!A||N)},[A,N]);const O=L=>{p||(L.detail===0&&setTimeout(function(){const B=document.querySelectorAll(`.dropdown-${x} button`)[0];B&&B.focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${x}`)[0])),m(!p)},V=L=>{k(!1),y(null),j(null),S([]),I(null),m(!1);const B=Nt(t,L.title);if(B){I({product:B,device:L}),o(null,l),J(document.querySelectorAll(`.dropdown-ignore-${x}`)[0]);return}let K=ye(L.title,i,!0,t);K&&Object.keys(K).length>1?(k(!0),y(K.original||K.mag),S(K),o(null,l)):(j(L),U(L),o(L,l)),J(document.querySelectorAll(`.dropdown-ignore-${x}`)[0])},ce=L=>{j(L),U(L),o(L,l)},Z=L=>!!(g&&g==L||u&&u.title==L||A&&M(A.device.title)===M(L));return e.jsxs("div",{className:`font-family-gotham text-left ${a}`,children:[T&&e.jsx(de,{handleClick:O,isError:d,label:T,number:n,popup:G,selectedVariant:u||A}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${x} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${d&&!g&&!A?"is--error":""}`,onClick:O,children:[g?e.jsx(Le,{title:M(g.replace(" MAG",""))}):u?e.jsx(ie,{image:(ve=u.image)==null?void 0:ve.src,title:P(u.title),price:c&&ne(u.price),compareAtPrice:c&&u.compareAtPrice,tick:c&&!0,canPersonalize:window.Stylux&&z(u.title,"case","personalization")&&!c&&!r.tags.includes("personalization-hide")}):A?e.jsx(ie,{image:A.product.defaultImage,title:P(A.device.title)}):e.jsx("div",{className:"dropdown-ignore pl-3",children:v}),e.jsx(se,{isActive:p})]}),e.jsx("ul",{className:`dropdown-${x} dropdown--styling w-100 p-0 ${d&&!u&&!A?"is--error":""} ${p?"active":""}`,children:i.filter(L=>Qt(L,i,t,r.handle,w)).map((L,B)=>{var St;let K=L.compareAtPrice,me=ne(L.price),Ie=M(L.title.replace(" MAG",""));const tt=ye(L.title,i,!0);return L.handle.includes("universal")?e.jsx(pe,{description:ge(Ie,r.handle,L.sku),hasNegativeMargin:B!=0,image:(St=L.image)==null?void 0:St.src,imageSize:"small",onClickHandler:V,onClickValue:L,onClickIndex:n,title:Ie,price:me,compareAtPrice:K,variantInCart:u&&u.id===L.id,inventory:L},L.id):e.jsx(Ne,{isActive:Z(L.title),onClickHandler:V,onClickValue:L,title:Ie,price:c&&Object.keys(tt).length>1?null:me,compareAtPrice:c&&Object.keys(tt).length>1?null:K,priceText:c&&Object.keys(tt).length>1?_e("case_type"):null},L.id)})})]}),_&&g&&Object.keys($).length>1&&e.jsx(is,{selectedOption:s,number:n,onChange:o,optionName:l,values:$,variants:i,product:r,containerClasses:"pt-1",isOptionalExtra:c,isError:d},`${x}-${g}`),(A||N&&H)&&e.jsx(wn,{number:n+1,colorPattern:A?A.product.colorPattern:H,variants:i,deviceVariant:A?.device??null,selectedVariant:u,onSelect:A?ce:()=>{},product:r,isError:!!A&&d,isOptionalExtra:c,disabled:!A}),u&&window.Stylux&&z(u.title,"case","personalization")&&!c&&!r.tags.includes("personalization-hide")&&e.jsx(yt,{text:f("msg_finish_kit_personalization"),extraClasse
4s:"mb-4 text-uppercase"}),u&&u.sku&&e.jsx(ae,{variant:u,classes:"mt-2 mb-3",product:r})]})},rs=({optionObject:t,selectedOption:s,number:n,onChange:o,optionName:l,containerClasses:a,variants:i,product:r,isError:d,isOptionalExtra:c})=>{var v;const[w,h]=b.useState(!1),[p,m]=b.useState(null),[g,y]=b.useState(null),[u,j]=b.useState(!1),[_,k]=b.useState([]),{popup:$,dropdown_text:S,yes_no_option:A}=t,I=r.handle.includes("ipad"),G=r.handle.includes("airpods"),C=c?null:Ze(S,I,G),E=Ve(S,I,G),N=l;b.useEffect(()=>{if(s){const x=ye(s.title,i,!0,t);x&&Object.keys(x).length>1&&!p&&(m(x.original||x.mag),j(!0)),y(s),U(s),k(x)}if(!s&&c&&r.handle==="cases-airpods"){let x=ye(i[0].title,i,!0,t);m(i[0].title),j(!0),k(x);return}},[s]);const H=x=>{w||(x.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${N} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${N}`)[0])),h(!w)},R=x=>{j(!1),m(null),y(null),k([]),h(!1);let M=ye(x.title,i,!0,t);M&&Object.keys(M).length>1?(j(!0),m(M.original||M.mag),k(M),o(null,l)):(y(x),x!=="none"&&U(x),o(x,l)),J(document.querySelectorAll(`.dropdown-ignore-${N}`)[0])},T=x=>!!(p&&p==x||g&&g.title==x);return e.jsxs("div",{className:`font-family-gotham text-left ${a}`,children:[C&&e.jsx(de,{handleClick:H,isError:d,label:C,number:n,popup:$,selectedVariant:g}),!c&&e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${N} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${d&&!g?"is--error":""}`,onClick:H,children:[s==="none"?e.jsx(Le,{title:f("byk_no_case_selected")}):p?e.jsx(Le,{title:p.replace(" MAG","")}):g?e.jsx(ie,{image:(v=g.image)==null?void 0:v.src,title:g.title,price:c&&g.price,compareAtPrice:c&&g.compareAtPrice,tick:c&&!0}):e.jsx("div",{className:"dropdown-ignore pl-3",children:E}),e.jsx(se,{isActive:w})]}),e.jsxs("ul",{className:`dropdown-${N} dropdown--styling w-100 p-0 ${d&&!g?"is--error":""} ${w?"active":""}`,children:[i.filter(x=>Qt(x,i,t)).map(x=>{let M=x.compareAtPrice,P=ne(x.price),O=x.title.replace(" MAG","");const V=ye(x.title,i,!0,t);return e.jsx(Ne,{isActive:T(x.title),onClickHandler:R,onClickValue:x,title:O,price:c&&Object.keys(V).length>1?null:P,compareAtPrice:c&&Object.keys(V).length>1?null:M,priceText:c&&Object.keys(V).length>1?_e("case_type"):null},x.id)}),A&&e.jsx(Ne,{isActive:s==="none",onClickHandler:R,onClickValue:"none",title:f("byk_no_case")},f("byk_no_case"))]})]}),u&&p&&Object.keys(_).length>1&&e.jsx(is,{selectedOption:s,number:n,onChange:o,optionName:l,values:_,variants:i,product:r,containerClasses:`${r.handle==="cases-airpods"&&c?"":"pt-1"}`,isOptionalExtra:c},`${N}-${p}`),g&&g.sku&&e.jsx(ae,{variant:g,classes:"mt-2 mb-3",product:r})]})},Ke={"QLM-2DWC":"no2DWC","QLM-2DWC-2":"no2DWC","QLM-WCP":"noWCH","QLM-WCP-2":"noWCH","QLM-DSK-2":"noMagWCH"},bn=t=>{const s=Object.values(t).find(n=>n&&Ke[n.sku]);return s?Ke[s.sku]:null},yn=[{value:"iphone",title:"iPhone",handle:"iphone-case-all-devices"},{value:"ipad",title:"iPad",handle:"cases-ipad"},{value:"galaxy",title:"Galaxy",handle:"galaxy-case-all-devices"},{value:"pixel",title:"Pixel",handle:"case-all-pixel-devices"},{value:"universal_adaptors",title:f("byk_uni_adaptor"),handle:"universal-adapter"},{value:"airpods",title:"AirPods",handle:"cases-airpods"}],jn=(t,s,n)=>{let o=[];if(s==="sanity-product-airpods")t.forEach(a=>{a.title.includes("McLaren")||n&&z(a.title,"case",n)||o.push({value:a.title,title:a.title})});else{const a=[...new Set(t.map(i=>i.handle))];o=yn.filter(i=>a.includes(i.handle)).map(i=>{const r=i.handle;return{...i,handle:r}})}return[{value:"no_case",title:f("byk_no_case")},...o]},kn=(t,s)=>!t||t.value==="no_case"?null:t.handle==="universal-adapter"?s.variants.filter(n=>n.handle===t.handle):s.handle==="sanity-product-airpods"?s.variants.filter(n=>n.title===t.value||n.title===`${t.value} - McLaren`):s.variants.filter(n=>n.title.toLowerCase().includes(t.value)),vn=({group:t,onChange:s,data:n,containerClasses:o,extraMetafields:l,selectedOptionalExtras:a,chargerKey:i})=>{const[r,d]=b.useState(!1),[c,w]=b.useState(null),[h,p]=b.useState(0);n.handle==="sanity-product-airpods"&&Shopify.shop==="quadlockcase-au.myshopify.com"&&b.useEffect(()=>{let A=setInterval(()=>{typeof window.ABTasty<"u"&&typeof window.ABTasty.eventState<"u"&&window.ABTasty.eventState.executedCampaign&&window.ABTasty.eventState.executedCampaign.status==="complete"&&window.ABTasty.eventState.executedCampaign.detail.forEach(I=>{I.campaignId===1668626&&(I.variationId!=0&&p(1),clearInterval(A))})},100);setTimeout(()=>{clearInterval(A)},1e3)},[]);const m=h===1?n.variants.reduce((S,A)=>A.price<S.price?A:S):null,g=h===1&&n.variants.length>1&&!n.variants.every(S=>S.price===m.price),y=jn(n.variants,n.handle,i),u=kn(c,n),j=n.variants.find(S=>a?.some(A=>A.id===S.id))??null;b.useEffect(()=>{j&&!y.some(S=>S.value===c?.value)&&(s(j,"remove"),w(null))},[i]);const _=S=>{r||(n.handle==="sanity-product-airpods"&&D("AirPodsOptionalExtraInteraction"),S.detail===0&&setTimeout(function(){const A=document.querySelectorAll(`.dropdown-${t} button`)[0];A&&A.focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${t}`)[0])),d(!r)},k=S=>
4{w(S),d(!1),j&&s(j,"remove")},$=S=>{d(!1),S?(U(S),s(S,"add")):j&&s(j,"remove"),J(document.querySelectorAll(`.dropdown-ignore-${t}`)[0])};return y.length===1&&y[0].value==="no_case"?null:e.jsxs("div",{className:`${o}`,children:[e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${t} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all`,onClick:_,children:[c?e.jsx(Le,{title:c.title}):h===1?e.jsxs("div",{className:"byk__dropdown byk__dropdown--small d-flex flex-grow-1 align-items-center pointer-none",children:[e.jsx("div",{className:"buy__image mr-2 buy__image--row position-relative cursor-pointer border-0 ml-2",children:e.jsx("img",{alt:`Image of the ${f("sel_airpods_case_og")}`,className:"lazyload","data-src":l.unselectedthumbnail,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRF8vLyZAOKawAAAApJREFUeJxjYAAAAAIAAUivpHEAAAAASUVORK5CYII="})}),e.jsx("div",{className:"p-0 d-flex justify-content-between align-items-center cursor-pointer w-100",children:e.jsxs("span",{className:"d-inline-block pr-1",children:["+ ",f("sel_airpods_case_og")]})}),m&&e.jsx(Xe,{price:m.price,from:g,plus:!0,compareAtPrice:m.compareAtPrice})]}):e.jsx("div",{className:"dropdown-ignore pl-3",children:f("byk_title_case")}),e.jsx(se,{isActive:r})]}),e.jsx("ul",{className:`dropdown-${t} dropdown--styling w-100 p-0 ${r?"active":""}`,children:y.map(S=>e.jsx(Ne,{isActive:c&&S.value===c.value,onClickHandler:k,onClickValue:S,onClickIndex:1,title:S.title},S.value))})]}),u&&c&&c.value!=="no_case"&&(n.handle==="sanity-product-airpods"?e.jsx(rs,{optionObject:{dropdown_text:"Case"},selectedOption:j,onChange:$,variants:u,containerClasses:"mt-1",isOptionalExtra:!0,product:{handle:u[0].handle}},`case-${c.value}`):e.jsx(jt,{optionObject:{dropdown_text:"Case",products:n.products},selectedOption:j,onChange:$,variants:u,containerClasses:"mt-1",isOptionalExtra:!0,product:{handle:u[0].handle}},`case-${c.value}`))]})},Sn=(t,s)=>JSON.stringify(t)===JSON.stringify(s),ot=t=>({producttitle:t.title,descriptionforyes:"",descriptionforno:t.description_no,unselectedthumbnail:t.unselected_thumbnail,extraVariants:t.extraVariants}),An=({handles:t,multipleConfig:s,selectedProducts:n,selectedOptionalExtras:o,onChange:l,index:a})=>{const[i,r]=b.useState(null),[d,c]=b.useState(!0),[w,h]=b.useState(null);return b.useEffect(()=>{async function p(){const m=Shopify.locale!=="en"?`/${Shopify.locale}`:"",g=t.map(y=>`${window.location.origin}${m}/products/${y}?view=data.json`);Promise.all(g.map(y=>fetch(y).then(u=>u.ok?u.json():void 0).catch(u=>{console.log(u),y.includes("-edition")||h(!0)}))).then(async y=>{const u=[],j=[];y.map(k=>{if(!k||window.geoblock&&window.geoblock.block_asia_qla_bta&&window.Shopify.shop=="quadlockcase-jp.myshopify.com"&&k.tags.includes("geo-block-asia-qla-bta"))return null;const $=k.title.split(" - ")[1];k.sanity=JSON.parse(decodeURIComponent(escape(atob(k.sanity)))),k.variants.forEac
4h(S=>{var I;S.trackingTitle=k.trackingTitle,S.description_yes=(I=k.sanity.optionalExtraConfiguration)==null?void 0:I.description_yes;const A=ot(s);if(A.extraVariants){const G=A.extraVariants.find(C=>C.variant_sku==S.sku);G&&G.description_yes&&(S.description_yes=G.description_yes),G&&G.product_title&&(S.title=G.product_title)}S.title==="Default Title"&&(S.title=$),S.compareAtPrice=S.compareAtPrice&&S.compareAtPrice!=0?S.compareAtPrice:S.price,S.price=s.handle==="sanity-all-cases"?S.price:ne(S.price),S.parentHandle=s.handle,u.push(S)}),j.push({handle:k.handle,colorPattern:k.colorPattern,defaultImage:k.defaultImage,variants:k.variants})});const _={handle:s.handle,trackingTitle:s.handle,variants:u,products:j};r(_),c(!1)}).catch(y=>{console.log(y),h(!0)})}i||p()},[]),w?null:d?e.jsx(Jt,{className:`buy__loading d-block ${a==0?"mt-n2 mb-1":"mb-1"}`,height:s.handle==="sanity-all-cases"||s.handle==="sanity-product-airpods"?50:78,preserveAspectRatio:"none",speed:2,primarycolor:"#f3f3f3",secondarycolor:"#ecebeb",children:e.jsx("rect",{x:"0",y:"0",rx:"0",ry:"0",width:"100%",height:"100%"})},"upsell-loader"):i?["sanity-product-airpods","sanity-all-cases"].includes(i.handle)?e.jsx(vn,{group:i.handle,onChange:l,data:i,containerClasses:"mt-n2 mb-1",extraMetafields:ot(s),selectedOptionalExtras:o,chargerKey:bn(n)},`optional-${i.handle}`):e.jsx(ls,{group:i.handle,onChange:l,data:i,containerClasses:a==0?"mt-n2 mb-1":"mb-1",extraMetafields:ot(s),optional:!0,optionalTop:!1,selectedProducts:n,selectedOptionalExtras:o,handle:t},`optional-${i.handle}`):null},be=ee.memo(An,Sn),Mt=["mag-cases-all-iphone-devices","mag-cases-all-galaxy-devices","mag-cases-all-pixel-devices","iphone-case-all-devices","cases-ipad","galaxy-case-all-devices","case-all-pixel-devices","universal-adapter","mag-cases-mclaren-edition","mag-cases-oscar-piastri-edition","mag-cases-lando-norris-edition","mag-cases-ducati-corse-edition","mag-cases-ducati-100-years-edition","mag-cases-svg-edition","mag-cases-deegan-edition","mag-cases-acosta-edition","mag-cases-zarco-edition","mag-cases-dcs-edition","mag-cases-mcm-edition","mag-cases-red-bull-ampol-racing-edition"],Cn=t=>t.type==="Mounts"?f("buy_optional_extras_mount"):t.type==="Kits"||t.tags.includes("bundle")?f("buy_optional_extras_kit"):f("buy_optional_extras_product"),Pn=({config:t,optionalExtras:s,product:n,selectedProducts:o,selectedOptionalExtras:l,onChange:a,optionTypes:i})=>{var g,y;const[r,d]=b.useState({case:[],chargingOption:null,kit:[],other:[],airPods:[],mstAdaptor:[]});b.useEffect(()=>{const u=ft(t,s,o,n,i);if(u.chargingOption&&l){const j=new Set(u.chargingOption.product_to_show.split("|"));if(!l.some(_=>j.has(_.handle))&&u.chargingOption.unselected_optional_extras&&u.kit.push(u.chargingOption.unselected_optional_extras),l&&l.some(_=>_.handle==="cycle-waterproof-wireless-charging-head")){const _="cycle-power-cables";u.kit.includes(_)&&(u.kit=u.kit.filter(k=>k!==_),u.eBikeCables=[_])}if(l&&l.some(_=>_.handle==="home-office-dual-desktop-wireless-charger"||_.handle==="home-office-wireless-charging-pad")){const _="power-adaptor-charging";u.kit.includes(_)&&(u.kit=u.kit.filter(k=>k!==_),u.powerAdaptors=[_])}}d(u)},[o,l]);const c=()=>t.otherHandles.includes("cycling-bike-alarm-and-finder")?n.handle==="iphone-bike-kit-all-devices":n.handle==="cycling-bike-alarm-and-finder"&&t.otherHandles.includes("sanity-product-bike-alarm-and-finder-adaptors")?Object.values(o).some(u=>{var j;return(j=u?.sku)==null?void 0:j.includes("OFM")}):t.otherHandles.includes("replacement-car-mount-adhesive-dash-pad")?!0:!(t.otherHandles.includes("sanity-product-mag-heads")&&!Mt.includes(n.handle)||t.otherHandles.includes("mag-head")&&t.otherHandles.includes("mag-wireless-charging-head")&&!Mt.includes(n.handle)),w=()=>{const u=["replacement-car-mount-adhesive-dash-pad","sanity-all-cases","sanity-product-bike-alarm-and-finder-adaptors"];return r.other.length&&u.includes(r.other[0])},h=()=>n.handle.includes("case"),p=()=>{const u=X(o,"case");return u&&u.title.includes("MAG")?f("sel_for_your_mag_case"):f("sel_for_your_case")},m=r.chargingOption;return e.jsxs(e.Fragment,{children:[r.other.length>0&&w()&&c()&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:t.otherTitle,showPlus:!0}),r.other.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>
4k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-other-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-other-${u}`)})]}),r.airPods.length>0&&h()&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:t.airPodsTitle,showPlus:!0}),r.airPods.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-airPods-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-airPods-${u}`)})]}),r.mstAdaptor.length>0&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:f("buy_need_additional_clearance"),showPlus:!0}),r.mstAdaptor.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-kit-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-kit-${u}`)})]}),m&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:m.product_title,showPopup:!0,popupId:m.more_info_popup_name==="extra"?"popup-extra":m.more_info_popup_name,popupText:m.more_info_popup_text,showPlus:!0}),e.jsx(be,{handles:m.product_to_show.split("|"),multipleConfig:{description_no:m.description_no,title_no:m.title_no,title:m.product_title,unselected_thumbnail:m.unselected_thumbnail,handle:"charging-option",extraVariants:m.optional_extra_variants},onChange:a,index:0,selectedProducts:o,selectedOptionalExtras:l},"optional-extra-charging-option"),((g=r.eBikeCables)==null?void 0:g.length)>0&&e.jsx("div",{className:"pt-2",children:r.eBikeCables.map((u,j)=>e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-kit-${u}`))}),((y=r.powerAdaptors)==null?void 0:y.length)>0&&e.jsx("div",{className:"pt-2",children:r.powerAdaptors.map((u,j)=>e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-kit-${u}`))})]}),r.kit.length>0&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:Cn(n),showPlus:!0}),r.kit.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-kit-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-kit-${u}`)})]}),r.case.length>0&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:p(),showPlus:!0}),r.case.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-case-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-case-${u}`)})]}),r.airPods.length>0&&!h()&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:t.airPodsTitle,showPlus:!0}),r.airPods.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-airPods-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-airPods-${u}`)})]}),r.other.length>0&&!w()&&c()&&e.jsxs("div",{className:"buy__optional",children:[e.jsx(we,{title:t.otherTitle,showPlus:!0}),r.other.map((u,j)=>{const _=t.multipleConfig.find(k=>k.handle===u);return _?e.jsx(be,{handles:_.products.map(k=>k.handle),multipleConfig:_,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-other-${u}`):e.jsx(xe,{handle:u,onChange:a,index:j,selectedProducts:o,selectedOptionalExtras:l},`optional-extra-loader-other-${u}`)})]})]})},Nn=(t,s,n)=>{const o=[];let l=null;t.forEach(d=>{!l&&d.productType==="Cases"?l=d:o.push(...d.variants)});const a=Object.keys(Ke).filter(d=>Object.values(n).some(c=>c&&z(c.title,"case",Ke[d]))),i=o.filter(d=>!a.includes(d.sku));let r=l?l.variants:[];return s&&(r=r.filter(d=>d.title.toLowerCase().includes(s))),{nonCaseVariants:i,caseProduct:l,caseVariants:r}},Mn=({optionObject:t,selectedOption:s,selectedProducts:n,number:o,onChange:l,optionName:a,products:i,containerClasses:r,product:d,isError:c})=>{var T,v;const[w,h]=b.useState(!1),[p,m]=b.useState(null),[g,y]=b.useState(!1),{popup:u,dropdown_text:j,filter_value:_}=t,k=_e(j),$=ke(j),S=a,{nonCaseVariants:A,caseProduct:I,caseVariants:G}=Nn(i,_?.toLowerCase(),n),C=I&&(_?.toUpperCase()==="MAG"?`MAG ${I.title}`:I.title);let E=null;for(const x of G){const M=ge(x.title,d.handle,x.sku);if(M){E=M;break}}b.useEffect(()=>{s&&s.id!==p?.id&&(m(s),y(G.some(x=>x.id===s.id)),U(s))},[s]),b.useEffect(()=>{p&&!g&&!A.some(x=>x.id===p.id)&&(m(null),l(null,a))},[n]);const N=x=>{w||(x.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${S} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${S}`)[0])),h(!w)},H=x=>{h(!1),y(!1),m(x),U(x),l(x,a),J(document.querySelectorAll(`.dropdown-ignore-${S}`)[0])},R=()=>{h(!1),y(!0),m(null),l(null,a),J(document.querySelectorAll(`.dropdown-ignore-${S}`)[0])};return e.jsxs("div",{className:`font-family-gotham text-left ${r}`,children:[k&&e.jsx(de,{handleClick:N,isError:c,label:k,number:o,popup:u,selectedVariant:p}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${S} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${c&&!p&&!g?"is--error":""}`,onClick:N,children:[g?e.jsx(Le,{title:C}):p?e.jsx(ie,{image:(T=p.image)==null?void 0:T.src,title:p.title}):e.jsx("div",{className:"dropdown-ignore pl-3",children:$}),e.jsx(se,{isActive:w})]}),e.jsxs("ul",{className:`dropdown-${S} dropdown--styling w-100 p-0 ${w?"active":""}`,children:[A.map((x,M)=>{var V;let P=x.compareAtPrice,O=ne(x.price);return e.jsx(pe,{description:ge(x.title,d.handle,x.sku),hasNegativeMargin:M!=0,image:(V=x.image)==null?void 0:V.src,isNew:x.new_show_tag===!0,onClickHandler:H,onClickValue:x,onClickIndex:o,title:x.title,price:O,compareAtPrice:P,variantInCart:p&&p.id===x.id,inventory:x,sku:x.sku},x.id)}),I&&G.length>0&&e.jsx(pe,{description:E,hasNegativeMargin:A.length>0,image:(v=G[0].image)==null?void 0:v.src,onClickHandler:R,onClickValue:null,onClickIndex:o,title:C,price:Math.min(...G.map(x=>ne(x.price))),variantInCart:g,sku:G[0].sku},I.id)]})]}),g&&e.jsx(jt,{optionObject:{dropdown_text:"Phone"},selectedOption:p,number:o,onChange:l,optionName:a,variants:G,containerClasses:"mt-1",product:d,isError:c,isOptionalExtra:!0}),p&&p.sku&&!g&&e.jsx(ae,{variant:p,classes:"mt-2 mb-3",product:d})]})},$n=(t,s,n)=>n&&["QLM-2DWC","QLM-2DWC-2","QLM-WCP","QLM-WCP-2","QLK-EV-CAR","QLK-EV-CAR-MAG-WCH"].includes(n.sku)?[]:s?t.filter(o=>{if(o.sku==="QLH-MAG-WCH-2"||o.sku==="QLH-MAG-WCH-3")if(s.title.includes("MAG")){if(z(s.title,"case","noMagWCH"))return!1}else return!1;return!(o.sku==="QLH-MAG"&&!s.title.includes("MAG")||o.sku==="QLH-WCH-2"&&z(s.title,"case","noWCH"))}):t,Tn=({optionObject:t,selectedOption:s,selectedCase:n,selectedMount:o,needCaseSelection:l,number:a,onChange:i,optionName:r,variants:d,containerClasses:c,product:w,isError:h})=>{var R;const[p,m]=b.useState(!1),[g,y]=b.useState(d),[u,j]=b.useState(!1),[_,k]=b.useState(null),{popup:$,dropdown_text:S}=t,A=_e(S),I=ke(S),G=r;b.useEffect(()=>{s&&!_&&(k(s),U(s),j(!0))},[s]),b.useEffect(()=>{const T=$n(d,n,o);y(T),_?(i(T.length===0?"none":null,r),k(T.length===0?"none":null),j(!1)):T.length===0&&(i("none",r),k("none"))},[n,o]);const C=T=>{if(l&&!n)return null;p||(T.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${G} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${G}`)[0])),m(!p)},E=()=>{m(!1),u||j(!0),i("none",r),k("none"),J(document.querySelectorAll(`.dropdown-ignore-${G}`)[0])},N=T=>{m(!1),u||j(!0),k(T),U(T),i(T,r),J(document.querySelectorAll(`.dropdown-ignore-${G}`)[0])},H=()=>!n&&!o?qe("Case and Mount"):o?qe("Case"):qe("Mount");if(g.length===0){const T=o&&["QLM-2DWC","QLM-2DWC-2","QLM-WCP","QLM-WCP-2","QLK-EV-CAR","QLK-EV-CAR-MAG-WCH"].includes(o.sku);return e.jsx(yt,{text:T?f("msg_no_additional_head_mount"):f("msg_no_additional_head"),extraClasse
4s:"mb-4"})}return e.jsxs("div",{className:`${c} ${l&&(!n||!o)?"opacity-50 cursor-not-allowed":""}`,children:[A&&e.jsx(de,{handleClick:C,isError:h,label:A,number:a,popup:$,selectedVariant:_,values:g.map(T=>T.title)}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${G} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${h&&!_?"is--error":""}`,onClick:C,children:[_==="none"&&u?e.jsx(je,{title:fe(f("thing_additional_head"))}):_&&_!="none"?e.jsx(ie,{image:(R=_.image)==null?void 0:R.src,title:_.title}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:C,children:l&&(!n||!o)?`${H()}`:`${I}`}),e.jsx(se,{isActive:p})]}),e.jsx("ul",{className:`dropdown-${G} dropdown--styling w-100 p-0 ${p?"active":""}`,children:e.jsxs(e.Fragment,{children:[g.map((T,v)=>{var P;let x=T.compareAtPrice,M=ne(T.price);return e.jsx(pe,{description:ge(T.title,w.handle,T.sku),hasNegativeMargin:v!=0,image:(P=T.image)==null?void 0:P.src,isNew:T.new_show_tag===!0,onClickHandler:N,onClickValue:T,onClickIndex:a,title:T.title,price:M,compareAtPrice:x,variantInCart:_&&_.id===T.id,inventory:T},T.id)}),e.jsx(Me,{handleNoClick:E,isYesSelected:_!==null,selectInit:u,thing:f("thing_additional_head"),atTop:!1})]})})]}),_&&_!="none"&&e.jsx(ae,{variant:_,classes:"mt-2 mb-3",product:w})]})},En=({handleChange:t,selectedVariant:s,variants:n})=>e.jsx(Ns,{title:f("stem_suit_button"),selectedMount:s?.title,onClickHandler:o=>{const l=n.find(a=>a.title===o);t(l)},extraClasses:"mt-2"}),Ln=(t,s)=>s?t.filter(n=>!(["QLK-EV-CAR","QLK-EV-CAR-MAG-WCH"].includes(n.sku)&&!s.title.includes("MAG")||n.sku==="QLK-EV-CAR-MAG-WCH"&&z(s.title,"case","noMagWCH"))):t,In=(t,s)=>s?t.filter(n=>{if(["QLM-2DWC","QLM-2DWC-2"].includes(n.sku))if(s.title.includes("MAG")){if(z(s.title,"case","no2DWC"))return!1}else return!1;if(["QLM-WCP","QLM-WCP-2"].includes(n.sku))if(s.title.includes("MAG")){if(z(s.title,"case","noMagWCH"))return!1}else return!1;return!0}):t,lt=t=>t.title.includes("18W")||t.title.includes("18 W"),as=(t,s,n,o)=>["QLM-2DWC-2","QLM-WCP-2"].includes(s?.sku)||["QLH-MAG-WCH-3","QLH-WCH-3"].includes(n?.sku)?t.filter(l=>!lt(l)):s?.sku==="QLM-WCP"||["QLH-MAG-WCH-2","QLH-WCH-2"].includes(n?.sku)?t.filter(lt):s?.sku==="QLM-2DWC"?t:ns.includes(o)?t.filter(lt):t,Hn=({optionObject:t,selectedOption:s,selectedCase:n,selectedMount:o,selectedHead:l,number:a,onChange:i,optionName:r,variants:d,containerClasses:c,product:w,isError:h})=>{var M;const[p,m]=b.useState(!1),[g,y]=b.useState(d),[u,j]=b.useState(!1),[_,k]=b.useState(null),{popup:$,dropdown_text:S,yes_no_option:A,option_type:I}=t,G=_e(S),C=ke(S),E=r;b.useEffect(()=>{if(["mount-car","mount-desk"].includes(I))if(n){const P=I==="mount-car"?Ln(d,n):In(d,n);y(P),_&&!P.some(O=>O.sku===_.sku)&&(i("none",r),k("none"))}else y(d);else if(I==="power-adaptors"){const P=as(d,o,l,w.handle);y(P),_&&!P.some(O=>O.sku===_.sku)&&(i("none",r),k("none"))}},[n,o,l]),b.useEffect(()=>{s&&!_&&(k(s),U(s),j(!0))},[s]);const N=()=>{m(!1),u||j(!0),i("none",r),k("none"),J(document.querySelectorAll(`.dropdown-ignore-${E}`)[0])},H=P=>{p||(P.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${E} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${E}`)[0])),m(!p)},R=P=>{m(!1),k(P),U(P),i(P,r),J(document.querySelectorAll(`.dropdown-ignore-${E}`)[0])},T=()=>S==="vibration_dampener"?ge("no_vibration_dampener"):S==="cycle_power_cables"?q("no_power_cable_option"):S==="option_for_fixing"?q("no_option_for_fixing"):null,v=()=>S==="cycle_power_cables"?"https://cdn.shopify.com/s/files/1/0941/8836/files/QLH-WP-WCH_USB-A-Cable_600x600_217c3b56-a5a8-4f55-9866-7fde43d495f7.png?v=1742776874":null,x=()=>S==="option_for_fixing"?f("no_adaptor"):S==="cycle_power_cables"?f("thing_usb_a"):null;return e.jsxs("div",{className:`${c}`,children:[G&&e.jsx(de,{handleClick:H,isError:h,label:G,number:a,popup:$,selectedVariant:_,values:g.map(P=>P.title)}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${E} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${h&&!_?"is--error":""}`,onClick:H,children:[_==="none"&&u?e.jsx(je,{title:x()?x():fe(f(`thing_${S}`)),image:v()}):_&&_!="none"?e.jsx(ie,{image:(M=_.image)==null?void 0:M.src,title:_.title}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:H,children:C}),e.jsx(se,{isActive:p})]}),e.jsxs("ul",{className:`dropdown-${E} dropdown--styling w-100 p-0 ${p?"active":""}`,children:[g.map((P,O)=>{var ue;let V=P.compareAtPrice,ce=ne(P.price),Z=P.title,Y=null;if(w.handle.includes("bike-kit")?P.sku==="QLM-BMP-BL"?Y=f("cycle_place_stm"):P.sku==="QLM-SCM"?Y=f("cycle_place_scp"):P.sku==="QLM-OFM-3"&&(Y=f("cycle_place_ofm")):P.handle.includes("cycle-power-cables")&&(P.sku==="QLA-BO-1100"?Y=f("heading_ebike"):P.sku==="QLA-USB-1100C"&&(Y=f("heading_portable_battery"))),P.handle==="power-adaptor-charging"&&!os(Z,o?.sku,!1))return!1;const W=["(Previous Model)","(Ancien Mod\xE8le)","(fr\xFChere Version)","(Mo
4delo Anterior)","(Precedente Modell)"].some(ve=>Z.includes(ve));return e.jsxs(ee.Fragment,{children:[Y&&e.jsx(Pe,{text:Y,index:O}),e.jsx(pe,{description:ge(Z,w.handle,P.sku,o,P),descriptionExtra:Yt(Z,P.sku),hasNegativeMargin:O!=0,image:(ue=P.image)==null?void 0:ue.src,imageSize:I==="mount"?"small":"",isNew:P.new_show_tag===!0,onClickHandler:R,onClickValue:P,onClickIndex:a,title:Z,price:ce,compareAtPrice:V,variantInCart:_&&_.id===P.id,inventory:P,showClearance:W,sku:P.sku})]},P.id)}),A&&e.jsx(Me,{handleNoClick:N,isYesSelected:_!==null,selectInit:u,thing:f(`thing_${S}`),description:T(),atTop:!1,noTitle:x(),noImage:v()})]})]}),(w.handle==="stem-cap-mount"||_&&["QLM-SCM","QLM-SCM-ADJ"].includes(_.sku))&&e.jsx(En,{handleChange:R,selectedVariant:_,variants:d}),$==="ebike_charging"&&e.jsx(ss,{handleChange:R,selectedVariant:_,variants:d}),_&&["QLM-VNT","QLK-4X4-VNT","QLK-PN-VNT"].includes(_.sku)&&e.jsx(pt,{reference:"vent"}),I==="motorcycle-mount"&&e.jsx(_t,{handleChange:R,selectedVariant:_,variants:d,mountsWithNewTag:d.filter(P=>P.new_show_tag===!0).map(P=>P.title)}),_&&_!="none"&&e.jsx(ae,{variant:_,classes:"mt-2 mb-3",product:w})]})},Gn=[{value:"handlebar",title:f("moto_place_hbr"),first:"QLM-HBR"},{value:"handlebarclamp",title:f("moto_place_hbc"),first:"QLM-HBC"},{value:"forkstem",title:f("moto_place_fsm"),first:"QLM-FSM-2"},{value:"brakeclutch",title:f("moto_place_clh"),first:"QLM-CLH"},{value:"brakereservoir",title:f("moto_place_brs"),first:"QLM-BRS-2"},{value:"mirror",title:f("moto_place_mir"),first:"QLM-MIR-2"},{value:"mirrorstem",title:f("moto_place_mst"),first:"QLM-MST"},{value:"all",title:f("button_view_all").toUpperCase()}],On=({optionObject:t,selectedOption:s,number:n,onChange:o,optionName:l,variants:a,containerClasses:i,product:r,isError:d})=>{var T;const[c,w]=b.useState(!1),[h,p]=b.useState(!1),[m,g]=b.useState([]),[y,u]=b.useState(null),[j,_]=b.useState(null),{popup:k,dropdown_text:$}=t,S=_e($),A=ke($),I=l;let G=Gn;b.useEffect(()=>{s&&!j&&(u(G.find(v=>v.value==="all")),g(a),_(s),U(s)),s&&_(s)},[s]);const C=v=>{c||(v.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(".dropdown-motorcycle-mounts button")[0].focus()},100),re(document.querySelectorAll(".dropdown-ignore-motorcycle-mounts")[0])),w(!c)},E=v=>{h||(v.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${I} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${I}`)[0])),p(!h)},N=v=>{w(!1),_(v),U(v),o(v,l),D("MotoMountsSelected"),J(document.querySelectorAll(`.dropdown-ignore-${I}`)[0])},H=v=>{u(G.find(x=>x.value==="all")),g(a),N(v),D("MotoMountLookupMountSelected")},R=v=>{if(p(!1),u(v),v.value=="all")g(a);else{const x=ws(v.value),M=a.filter(P=>x.includes(P.title));g(M)}_(null),o(null,l),J(document.querySelectorAll(".dropdown-ignore-motorcycle-mounts")[0])};return e.jsxs("div",{className:`${i}`,children:[S&&e.jsx(de,{handleClick:E,isError:d,label:S,number:n,popup:k,selectedVariant:j,values:a.map(v=>v.title)}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${I} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${d&&!y?"is--error":""}`,onClick:E,children:[y?e.jsx("div",{className:"byk__dropdown byk__dropdown--small d-flex align-items-center pointer-none",children:e.jsx("div",{className:"buy__variant--title p-0 d-block cursor-pointer w-100",children:e.jsx("span",{className:"d-inline-block pr-1 pl-3",children:y.title})})}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:E,children:f("moto_place_where_mount")}),e.jsx(se,{isPlacementActive:h})]}),e.jsx("ul",{className:`dropdown-${I} dropdown--styling w-100 p-0 ${h?"active":""}`,children:G.map(v=>e.jsx(Ne,{isActive:y&&y.value===v.value,onClickHandler:R,onClickValue:v,title:v.title},btoa(v.first)))})]}),m.length>0&&e.jsxs("div",{className:"buy__dropdown position-relative mt-1",children:[e.jsxs("button",{className:`dropdown-ignore-motorcycle-mounts d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${d&&!j?"is--error":""}`,onClick:C,children:[j?e.jsx(ie,{image:(T=j.image)==null?void 0:T.src,title:j.title}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:C,children:A}),e.jsx(se,{isActive:c})]}),e.jsx("ul",{className:`dropdown-motorcycle-mounts dropdown--styling w-100 p-0 ${c?"active":""}`,children:m.map((v,x)=>{var ce;let M=v.compareAtPrice,P=ne(v.price),O=v.title,V=null;if(y&&y.value==="all"){const Z=G.find(Y=>Y.first===v.sku);V=Z?Z.title:null}return e.jsxs(ee.Fragment,{children:[V&&e.jsx(Pe,{text:V}),e.jsx(pe,{description:ge(O,r.handle,v.sku),descriptionExtra:Yt(O,v.sku),hasNegativeMargin:x!=0,image:(ce=v.image)==null?void 0:ce.src,imageSize:"small",isNew:v.new_show_tag===!0,onClickHandler:N,onClickValue:v,onClickIndex:n,title:O,price:P,compareAtPrice:M,variantInCart:j&&j.id===v.id,inventory:v,sku:v.sku})]},v.id)})})]}),e.jsx(_t,{handleChange:H,selectedVariant:j,variants:a,mountsWithNewTag:a.filter(v=>v.new_show_tag===!0).map(v=>v.title)}),j&&j!="none"&&e.jsx(ae,{variant:j,classes:"mt-2 mb-3",product:r})]})},qn=({selectedVariant:t,setSelectedVariant:s,number:n,onChange:o,optionName:l,values:a,containerClasses:i,variants:r,isOptionalExtra:d,isError:c})=>{const[w,h]=b.useState(!1),p="ponchotype",g=["mag","original"].filter(k=>k in a).map(k=>
4({key:k,value:a[k]})),y=k=>{w||(k.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${p} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${p}`)[0])),h(!w)},u=k=>{h(!1),s(k),U(k),o(k,l),J(document.querySelectorAll(`.dropdown-ignore-${p}`)[0])},j=k=>t?t.title===k:!1,_=k=>{const $=a[k];try{return window.settings.clearance_case_names.includes($)}catch{return!1}};return e.jsx("div",{className:`${i}`,children:e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${p} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${c&&!t?"is--error":""}`,onClick:y,children:[t?e.jsx(ie,{image:t.image.src,title:`${f("sel_poncho_for")} ${Ee(t.title)}`,tick:d&&!0}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:y,children:Ve("case_type")}),e.jsx(se,{isActive:w})]}),e.jsx("ul",{className:`dropdown-${p} dropdown--styling w-100 p-0 ${w?"active":""}`,children:g.map((k,$)=>{const S=k.value,A=r.find(G=>G.title==S);if(!A||!A.availableForSale)return null;let I=Ft(S);return e.jsx(ee.Fragment,{children:e.jsx(pe,{hasNegativeMargin:$!=0,image:I,imageSize:"large",onClickHandler:u,onClickValue:A,onClickIndex:n,title:Ee(S),option:"Poncho Type",variantInCart:j(S),hideMaskBG:!0,forMAGDropdown:!0,showClearance:_(S),inventory:A},$)},A.id)})})]})})},cs=[{original:null,mag:"iPhone 18 Pro MAG",sharedPoncho:null},{original:null,mag:"iPhone 18 Pro Max MAG",sharedPoncho:null},{original:null,mag:"iPhone 17 Pro MAG",sharedPoncho:null},{original:null,mag:"iPhone 17 Pro Max MAG",sharedPoncho:null},{original:null,mag:"iPhone 17 MAG",sharedPoncho:null},{original:null,mag:"iPhone Air MAG",sharedPoncho:null},{original:"iPhone 16 Pro",mag:"iPhone 16 Pro MAG",sharedPoncho:!0},{original:"iPhone 16 Pro Max",mag:"iPhone 16 Pro Max MAG",sharedPoncho:!0},{original:"iPhone 16",mag:"iPhone 16 MAG",sharedPoncho:!0},{original:"iPhone 16 Plus",mag:"iPhone 16 Plus MAG",sharedPoncho:!0},{original:null,mag:"iPhone 16e MAG",sharedPoncho:null},{original:"iPhone 15 Pro",mag:"iPhone 15 Pro MAG",sharedPoncho:!0},{original:"iPhone 15 Pro Max",mag:"iPhone 15 Pro Max MAG",sharedPoncho:!0},{original:"iPhone 15",mag:"iPhone 15 MAG",sharedPoncho:!0},{original:"iPhone 15 Plus",mag:"iPhone 15 Plus MAG",sharedPoncho:!0},{original:"iPhone 14 Pro",mag:"iPhone 14 Pro MAG",sharedPoncho:null},{original:null,mag:"iPhone 14 Pro Max MAG",sharedPoncho:null},{original:"iPhone 14",mag:"iPhone 14 MAG",sharedPoncho:null},{original:null,mag:"iPhone 14 Plus MAG",sharedPoncho:null},{original:"iPhone 13 Pro",mag:"iPhone 13 Pro MAG",sharedPoncho:null},{original:null,mag:"iPhone 13 Pro Max MAG",sharedPoncho:null},{original:"iPhone 13",mag:"iPhone 13 MAG",sharedPoncho:null},{original:null,mag:"iPhone 13 mini MAG",sharedPoncho:null},{original:"iPhone SE (3rd Gen)",mag:"iPhone SE (3rd Gen) MAG",sharedPoncho:null},{original:"iPhone SE (3\u1D49 g\xE9n\xE9ration)",mag:"iPhone SE (3\u1D49 g\xE9n\xE9ration) MAG",sharedPoncho:null},{original:"iPhone SE (3. Generation)",mag:"iPhone SE (3. Generation) MAG",sharedPoncho:null},{original:"iPhone SE (3.\xAA generaci\xF3n)",mag:"iPhone SE (3.\xAA generaci\xF3n) MAG",sharedPoncho:null},{original:"iPhone SE (3\xAA Gen)",mag:"iPhone SE (3\xAA Gen) MAG",sharedPoncho:null},{original:"iPhone 12 Pro",mag:"iPhone 12 Pro MAG",sharedPoncho:null},{original:null,mag:"iPhone 12 Pro Max MAG",sharedPoncho:null},{original:"iPhone 12",mag:"iPhone 12 MAG",sharedPoncho:null},{original:null,mag:"iPhone 12 mini MAG",sharedPoncho:null},{original:"iPhone 11 Pro",mag:null,sharedPoncho:null},{original:"iPhone 11 Pro Max",mag:null,sharedPoncho:null},{original:"iPhone 11",mag:"iPhone 11 MAG",sharedPoncho:null},{original:"iPhone SE (2nd Gen)",mag:"iPhone SE (2nd Gen) MAG",sharedPoncho:null},{original:"iPhone SE (2\u1D49 g\xE9n\xE9ration)",mag:"iPhone SE (2\u1D49 g\xE9n\xE9ration) MAG",sharedPoncho:null},{original:"iPhone SE (2. Generation)",mag:"iPhone SE (2. Generation) MAG",sharedPoncho:null},{original:"iPhone SE (2.\xAA generaci\xF3n)",mag:"iPhone SE (2.\xAA generaci\xF3n) MAG",sharedPoncho:null},{original:"iPhone SE (2\xAA Gen)",mag:"iPhone SE (2\xAA Gen) MAG",sharedPoncho:null},{original:"iPhone X/XS",mag:null,sharedPoncho:null},{original:"iPhone XS Max",mag:null,sharedPoncho:null},{original:"iPhone XR",mag:null,sharedPoncho:null},{original:"iPhone 8 Plus",mag:null,sharedPoncho:null},{original:"iPhone 8",mag:"iPhone 8 MAG",sharedPoncho:null},{original:"iPhone 7 Plus",mag:null,sharedPoncho:null},{original:"iPhone 7",mag:"iPhone 7 MAG",sharedPoncho:null},{original:"iPhone 6 Plus/6s Plus",mag:null,sharedPoncho:null},{original:"iPhone 6/6s",mag:null,sharedPoncho:null},{original:null,mag:"Galaxy S26 Ultra MAG",sharedPoncho:null},{original:null,mag:"Galaxy S26 MAG",sharedPoncho:null},{original:null,mag:"Galaxy S25 Ultra MAG",sharedPoncho:null},{original:null,mag:"Galaxy S25+ MAG",sharedPoncho:null},{original:null,mag:"Galaxy S25 MAG",sharedPoncho:null},{original:null,mag:"Galaxy S25 Edge MAG",sharedPoncho:null},{original:null,mag:"Galaxy S24 FE MAG",sharedPoncho:null},{original:"Galaxy S24 Ultra",mag:"Galaxy S24 Ultra MAG",sharedPoncho:!0},{original:"Galaxy S24+",mag:"Galaxy S24+ MAG",sharedPoncho:!0},{original:"Galaxy S24",mag:"Galaxy S24 MAG",sharedPoncho:!0},{original:null,mag:"Galaxy A55 MAG",sharedPoncho:null},{original:null,mag:"Galaxy A35 MAG",sharedPoncho:null},{original:null,mag:"Galaxy S23 FE MAG",sharedPoncho:null},{original:null,mag:"Galaxy S23 Ultra MAG",sharedPoncho:null},{original:"Galaxy S23",mag:"Galaxy S23 MAG",sharedPoncho:null},{original:"Galaxy A54",mag:"Galaxy A54 MAG",sharedPoncho:null},{original:"Galaxy S22 Ultra",mag:"Galaxy S22 Ultra MAG",sharedPoncho:null},{original:null,mag:"Galaxy S22+ MAG",sharedPoncho:null},{original:null,mag:"Galaxy S22 MAG",sharedPoncho:null},{original:"Galaxy S21 FE",mag:null,sharedPoncho:null},{original:"Galaxy S21 Ultra",mag:null,sharedPoncho:null},{original:"Galaxy S21",mag:null,sharedPoncho:null},{original:"Galaxy S20 FE",mag:null,sharedPoncho:null},{original:"Galaxy S20 Ultra",mag:null,sharedPoncho:null},{original:"Galaxy S20+",mag:null,sharedPoncho:null},{original:"Galaxy S20",mag:null,sharedPoncho:null},{original:"Galaxy Note20 Ultra",mag:null,sharedPoncho:null},{original:"Galaxy Note10+",mag:null,sharedPoncho:null},{original:"Galaxy S10+",mag:null,sharedPoncho:null},{original:"Galaxy S10",mag:null,sharedPoncho:null},{original:"Galaxy S10e",mag:null,sharedPoncho:null},{original:"Galaxy Note9",mag:null,sharedPoncho:null},{original:"Galaxy S9",mag:null,sharedPoncho:null},{original:"Galaxy S8",mag:null,sharedPoncho:null},{original:null,mag:"Pixel 11 Pro XL MAG",sharedPoncho:null},{original:null,mag:"Pixel 11 Pro MAG",sharedPoncho:null},{original:null,mag:"Pixel 11 MAG",sharedPoncho:null},{original:null,mag:"Pixel 10 Pro XL MAG",sharedPoncho:null},{original:null,mag:"Pixel 10 Pro MAG",sharedPoncho:null},{original:null,mag:"Pixel 10 MAG",sharedPoncho:null},{original:null,mag:"Pixel 9 Pro XL MAG",sharedPoncho:null},{original:null,mag:"Pixel 9 Pro MAG",sharedPoncho:null},{original:null,mag:"Pixel 9 MAG",sharedPoncho:null},{original:null,mag:"Pixel 9a MAG",sharedPoncho:null},{original:null,mag:"Pixel 8 Pro MAG",sharedPoncho:null},{original:null,mag:"Pixel 8 MAG",sharedPoncho:null},{original:null,mag:"Pixel 8a MAG",sharedPoncho:null},{original:null,mag:"Pixel 7 Pro MAG",sharedPoncho:null},{original:null,mag:"Pixel 7 MAG",sharedPoncho:null},{original:null,mag:"Pixel 7a MAG",sharedPoncho:null},{original:null,mag:"Pixel 6a MAG",sharedPoncho:null},{original:"Pixel 6 Pro",mag:null,sharedPoncho:null},{original:"Pixel 6",mag:null,sharedPoncho:null},{original:"Pixel 5",mag:null,sharedPoncho:null},{original:"Pixel 3 XL",mag:null,sharedPoncho:null}],Re=(t,s,n,o)=>
4{if(!t)return null;const l=s.map(r=>r.title),i={...cs.map(r=>r.sharedPoncho?{...r,mag:null}:r).find(r=>Object.values(r).some(d=>d===t.trim()||d===`${t.trim()} MAG`))};return Object.keys(i).forEach(r=>{l.includes(i[r])||(i[r]=null)}),o&&delete i.sharedPoncho,n?Object.fromEntries(Object.entries(i).filter(([r,d])=>d!==null)):i},Rn=(t,s,n)=>{const o=Re(t.title,s,!1);return!!(o&&(n&&n.filter_value==="mag"&&(o.original=null),o.length===1||o.original==t.title||o.mag==t.title&&o.original===null))},ds=[{handle:"cases-airpods",reference:"popup-airpods"},{handle:"folio-ipad",reference:"popup-ipad"},{handle:"poncho-all-galaxy-devices",reference:"popup-galaxy"},{handle:"poncho-all-iphone-devices",reference:"popup-iphone"},{handle:"poncho-all-pixel-devices",reference:"popup-pixel"},{handle:"tempered-glass-screen-protectors-ipad",reference:"popup-ipad"},{handle:"tempered-glass-screen-protector-iphone",reference:"popup-iphone"},{handle:"screen-protector-galaxy",reference:"popup-galaxy"},{handle:"screen-protector-pixel",reference:"popup-pixel"}],Bn=({optionObject:t,selectedOption:s,number:n,onChange:o,optionName:l,containerClasses:a,variants:i,product:r,isError:d})=>{var R,T;const[c,w]=b.useState(!1),[h,p]=b.useState(null),[m,g]=b.useState(null),[y,u]=b.useState(!1),[j,_]=b.useState([]),k=r.handle.includes("ipad"),$=Ze("phone",k),S=Ve("phone",k),A=l,I=v=>cs.find(x=>x.original===v&&x.sharedPoncho===!0),G=v=>I(v)?e.jsxs(e.Fragment,{children:[v,e.jsx("br",{}),"(",f("sel_poncho_for")," ",f("sel_case_mag"),"/",f("sel_case_og"),")"]}):v.includes("MAG")?e.jsxs(e.Fragment,{children:[v.replace(" MAG",""),e.jsx("br",{}),"(",f("sel_poncho_for")," ",Ee(v),")"]}):e.jsxs(e.Fragment,{children:[v,e.jsx("br",{}),"(",f("sel_poncho_for")," ",Ee(v),")"]});let C=t.popup&&t.popup!==""?t.popup:(R=ds.find(v=>v.handle==r.handle))==null?void 0:R.reference;b.useEffect(()=>{let x=new URLSearchParams(document.location.search.substring(1)).get("device");if(s){let M=Re(s.title,i,!0,t);M&&Object.keys(M).length>1&&!h&&(p(M.original||M.mag),u(!0)),g(s),U(s),_(M)}else if(!s&&x){let M=Re(x,i,!0,t);M&&Object.keys(M).length>1&&!h&&(p(M.original),u(!0)),g(null),_(M)}},[s]);const E=v=>{c||(v.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${A} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])),w(!c)},N=v=>{u(!1),p(null),g(null),_([]),w(!1);let x=Re(v.title,i,!0,t);x&&Object.keys(x).length>1?(u(!0),p(x.original||x.mag),_(x),o(null,l)):(g(v),U(v),o(v,l)),J(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])},H=v=>!!(h&&h==v||m&&m.title==v);return e.jsxs("div",{className:`font-family-gotham text-left ${a}`,children:[$&&e.jsx(de,{handleClick:E,isError:d,label:$,number:n,popup:C,selectedVariant:m}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${A} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${d&&!h?"is--error":""}`,onClick:E,children:[h?e.jsx(Le,{title:h}):m?e.jsx(ie,{image:(T=m.image)==null?void 0:T.src,title:G(m.title)}):e.jsx("div",{className:"dropdown-ignore pl-3",children:S}),e.jsx(se,{isActive:c})]}),e.jsx("ul",{className:`dropdown-${A} dropdown--styling w-100 p-0 ${d&&!m?"is--error":""} ${c?"active":""}`,children:i.filter(v=>Rn(v,i,t)).map(v=>{let x=v.title.replace(" MAG","");return e.jsx(Ne,{isActive:H(v.title),onClickHandler:N,onClickValue:v,title:x},v.id)})})]}),y&&h&&Object.keys(j).length>1&&e.jsx(qn,{selectedVariant:m,setSelectedVariant:g,number:n,onChange:o,optionName:l,values:j,variants:i,product:r,isError:d,containerClasses:"pt-1"},`${A}-${h}`),m&&m.sku&&e.jsx(ae,{variant:m,classes:"mt-2 mb-3",product:r})]})},Vn=({optionObject:t,selectedOption:s,selectedCase:n,hasCaseColorStep:o,number:l,onChange:a,optionName:i,variants:r,containerClasses:d,product:c,isError:w})=>{var R;const[h,p]=b.useState(!1),[m,g]=b.useState(r),[y,u]=b.useState(!1),[j,_]=b.useState(null),{popup:k,dropdown_text:$}=t,S=_e($),A=ke($),I=i,G=window.Shopify.shop==="quadlockcase.myshopify.com",C=o?G?"Case and Case Color":"Case and Case Colour":"Case";b.useEffect(()=>{s&&!j&&(_(s),U(s),u(!0))},[s]),b.useEffect(()=>{y&&j&&(a(null,i),_(null),u(!1));const T=z(n?.title,"case","poncho"),v=r.filter(x=>x.title===T);g(v),n&&v.length===0&&(a("none",i),_("none"),u(!0))},[n]);const E=T=>{if(!n)return null;h||(T.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${I} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${I}`)[0])),p(!h)},N=()=>{p(!1),y||u(!0),a("none",i),_("none"),J(document.querySelectorAll(`.dropdown-ignore-${I}`)[0])},H=T=>{p(!1),y||u(!0),_(T),U(T),a(T,i),J(document.querySelectorAll(`.dropdown-ignore-${I}`)[0])};return e.jsxs("div",{className:`${d} ${n?"":"opacity-50 cursor-not-allowed"}`,children:[S&&e.jsx(de,{handleClick:E,isError:w,label:S,number:l,popup:k,selectedVariant:j,values:m.map(T=>T.title)}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${I} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${w&&!j?"is--error":""}`,onClick:E,children:[j==="none"&&y?e.jsx(e.Fragment,{children:m.length==0?e.jsx(je,{title:fe(f("thing_weather_resistant_poncho"),"not available")}):e.jsx(je,{title:fe(f("thing_weather_resistant_poncho"))})}):j&&j!="none"?e.jsx(ie,{image:(R=j.image)==null?void 0:R.src,title:j.title}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:E,children:n?`${A}`:`${qe(C)}`}),e.jsx(se,{isActive:h})]}),e.jsx("ul",{className:`dropdown-${I} dropdown--styling w-100 p-0 ${h?"active":""}`,children:m.length===0?e.jsx("li",{children:e.jsx("button",{className:"buy__dropdown--single bg-transparent text-left p-0 border-0 px-3 py-2 cursor-pointer w-100",onClick:()=>N(),children:fe(f("thing_weather_resistant_poncho"),"not available")})}):e.jsxs(e.Fragment,{children:[m.map((T,v)=>{var O;let x=T.compareAtPrice,M=ne(T.price),P=`${f("thing_weather_resistant_poncho")} ${f("sel_for")} ${T.title}`;return e.jsx(pe,{description:q("description_equals_weather_resistant_poncho"),hasNegativeMargin:v!=0,image:(O=T.image)==null?void 0:O.src,onClickHandler:H,onClickValue:T,onClickIndex:l,title:P,price:M,compareAtPrice:x,variantInCart:j&&j.id===T.id,inventory:T},T.id)}),e.jsx(Me,{handleNoClick:N,isYesSelected:j!==null,selectInit:y,thing:f("product_poncho"),atTop:!1,description:q("description_equals_no_weather_resistant_poncho")})]})})]}),j&&j!="none"&&e.jsx(ae,{variant:j,classes:"mt-2 mb-3",product:c})]})},Dn=({optionObject:t,selectedOption:s,selectedCase:n,number:o,onChange:l,optionName:a,variants:i,containerClasses:r,product:d,isError:c})=>{var E;const[w,h]=b.useState(!1),[p,m]=b.useState(i),[g,y]=b.useState(!1),[u,j]=b.useState(null),{popup:_,dropdown_text:k}=t,$=_e(k),S=ke(k),A=a;b.useEffect(()=>{s&&!u&&(j(s),U(s),y(!0))},[s]),b.useEffect(()=>{g&&u&&(l(null,a),j(null),y(!1));const N=z(n?.title,"case","screen"),H=i.filter(R=>R.title===N);m(H),n&&H.length===0&&(l("none",a),j("none"),y(!0))},[n]);const I=N=>{if(!n)return null;w||(N.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${A} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])),h(!w)},G=()=>{h(!1),g||y(!0),l("none",a),j("none"),J(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])},C=N=>{h(!1),g||y(!0),j(N),U(N),l(N,a),J(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])};return e.jsxs("div",{className:`${r} ${n?"":"opacity-50 cursor-not-allowed"}`,children:[$&&e.jsx(de,{handleClick:I,isError:c,label:$,number:o,popup:_,selectedVariant:u,values:p.map(N=>N.title)}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${A} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${c&&!u?"is--error":""}`,onClick:I,children:[u==="none"&&g?e.jsx(e.Fragment,{children:p.length==0?e.jsx(je,{title:fe(f("thing_screen_protector"),"not available")}):e.jsx(je,{title:fe(f("thing_screen_protector"))})}):u&&u!="none"?e.jsx(ie,{image:(E=u.image)==null?void 0:E.src,title:u.title}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:I,children:n?`${S}`:`${qe("Case")}`}),e.jsx(se,{isActive:w})]}),e.jsx("ul",{className:`dropdown-${A} dropdown--styling w-100 p-0 ${w?"active":""}`,children:p.length===0?e.jsx("li",{children:e.jsx("button",{className:"buy__dropdown--single bg-transparent text-left p-0 border-0 px-3 py-2 cursor-pointer w-100",onClick:()=>G(),children:fe(f("thing_screen_protector"),"not available")})}):e.jsxs(e.Fragment,{children:[p.map((N,H)=>{var M;let R=N.compareAtPrice,T=ne(N.price),v=`${f("thing_screen_protector")} ${f("sel_for")} ${N.title}`;const x=z(N.title,"screen","screenMaterial");return e.jsx(pe,{description:f("upsell_poncho_text"),descriptionExtra:x==="tpu"?` (${f("sel_tpu")})`:` (${f("sel_glass")})`,hasNegativeMargin:H!=0,image:(M=N.image)==null?void 0:M.src,onClickHandler:C,onClickValue:N,onClickIndex:o,title:v,price:T,compareAtPrice:R,variantInCart:u&&u.id===N.id,inventory:N},N.id)}),e.jsx(Me,{handleNoClick:G,isYesSelected:u!==null,selectInit:g,thing:f("thing_screen_protector"),atTop:!1})]})})]}),u&&u!="none"&&e.jsx(ae,{variant:u,classes:"mt-2 mb-3",product:d})]})},Fn=({optionObject:t,selectedOption:s,number:n,onChange:o,optionName:l,variants:a,containerClasses:i,product:r,isError:d})=>{var R,T;const[c,w]=b.useState(!1),[h,p]=b.useState(!1),[m,g]=b.useState(null),{dropdown_text:y,yes_no_option:u}=t;let j=t.popup&&t.popup!==""?t.popup:(R=ds.find(v=>v.handle==r.handle))==null?void 0:R.reference;const _=r.handle.includes("ipad"),k=r.handle.includes("airpods"),$=y==="Phone"||y==="Device"||y==="AirPods"?Ze("phone",_,k):_e(y),S=y==="Phone"||y==="Device"||y==="AirPods"?Ve("phone",_,k):ke(y),A=l;b.useEffect(()=>{s&&!m&&(g(s),U(s))},[s]);const I=()=>{w(!1),h||p(!0),o("none",l),g("none"),J(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])},G=v=>{c||(v.nativeEvent.screenX===0&&setTimeout(function(){document.querySelectorAll(`.dropdown-${A} button`)[0].focus()},100),re(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])),w(!c)},C=v=>{w(!1),g(v),U(v),o(v,l),J(document.querySelectorAll(`.dropdown-ignore-${A}`)[0])},E=()=>y==="vibration_dampener"?ge("no_vibration_dampener"):null,N=(v,x,M)=>M.includes("screen-protector")?null:v.includes("iPhone")&&!x.has("iPhone")?(x.add("iPhone"),e.jsx(Pe,{text:"Apple iPhone",extraClasse
4s:"px-3 py-2 bg-light-grey mt-1"})):v.includes("Galaxy")&&!x.has("Galaxy")?(x.add("Galaxy"),e.jsx(Pe,{text:"Samsung Galaxy",extraClasses:"px-3 py-2 bg-light-grey mt-1"})):v.includes("Pixel")&&!x.has("Pixel")?(x.add("Pixel"),e.jsx(Pe,{text:"Google Pixel",extraClasses:"px-3 py-2 bg-light-grey mt-1"})):null,H=new Set;return e.jsxs("div",{className:`${i}`,children:[$&&e.jsx(de,{handleClick:G,isError:d,label:$,number:n,popup:j,selectedVariant:m,values:a.map(v=>v.title)}),e.jsxs("div",{className:"buy__dropdown position-relative",children:[e.jsxs("button",{className:`dropdown-ignore-${A} d-flex justify-content-between bg-transparent w-100 text-left align-items-center cursor-pointer pointer-none-all ${d&&!m?"is--error":""}`,onClick:G,children:[m==="none"&&h?e.jsx(je,{title:fe(f(`thing_${y}`))}):m&&m!="none"?e.jsx(ie,{image:(T=m.image)==null?void 0:T.src,title:m.title}):e.jsx("div",{className:"dropdown-ignore pl-3",onClick:G,children:S}),e.jsx(se,{isActive:c})]}),e.jsxs("ul",{className:`dropdown-${A} dropdown--styling w-100 p-0 ${c?"active":""}`,children:[a.map((v,x)=>{let M=v.title;if(["screen-protector-galaxy","screen-protector-pixel"].includes(r.handle)){const P=z(v.title,"screen","screenMaterial");M=`${M} ${P==="tpu"?` (${f("sel_tpu")})`:` (${f("sel_glass")})`}`}return e.jsxs(ee.Fragment,{children:[N(v.title,H,r.handle),e.jsx(Ne,{isActive:m&&m.id===v.id,isNew:t.option_type!=="case-editions"&&r.type!=="Screen Protectors"&&!r.handle.includes("folio-ipad")&&v.new_show_tag===!0,onClickHandler:C,onClickValue:v,onClickIndex:n,title:M},x)]},v.id)}),u&&e.jsx(Me,{handleNoClick:I,isYesSelected:m!==null,selectInit:h,thing:f(`thing_${y}`),description:E(),atTop:!1})]})]}),m&&window.Stylux&&z(m.title,"case","personalization")&&!r.tags.includes("personalization-hide")&&e.jsx(yt,{text:f("msg_finish_kit_personalization"),extraClasses:"mb-4 text-uppercase"}),m&&m!="none"&&e.jsx(ae,{variant:m,classes:"mt-2 mb-3",product:r}),y.toLowerCase().includes("amount")&&e.jsx("p",{className:"buy__giftcard font-family-gotham-book mt-2",children:f("buy_multiple_vouchers")})]})},Qn=(t,s)=>{let n=t.flatMap(o=>o.variants);return s&&(n=n.filter(o=>s==="personalization"?z(o.title,"case","personalization")===!0:s==="no_hdsm"?o.sku!=="QLM-HDSM":/^\d+w$/.test(s)?new RegExp(s.replace("w","\\s?w"),"i").test(o.title):o.title.toLowerCase().includes(s))),n.forEach(o=>o.title=o.title.replace("&#39;","'")),n},Wn=({onChange:t,options:s,product:n,selectedProducts:o,isError:l})=>{const[a,i]=b.useState(!1);let r=0;const d=Object.values(s),c=Object.entries(s);return d.length>0?e.jsx(e.Fragment,{children:c.map((w,h)=>{var y,u,j;const p=w[0],m=w[1],g=Qn(m.products,(y=m.filter_value)==null?void 0:y.toLowerCase());if(m.products.forEach(_=>{_.dropdownTexts&&_.dropdownTexts.length>0&&(window.dropdownTexts=window.dropdownTexts||[],JSON.parse(Ce(_.dropdownTexts).replace(/=>/g,":")).forEach($=>{var A;(A=window.dropdownTexts)!=null&&A.find(I=>I.sku===$.sku)||window.dropdownTexts.push($)}))}),m.option_type==="case-airpods")return e.jsx(rs,{optionObject:m,selectedOption:o[p],number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="bundle-case")return e.jsx(Mn,{optionObject:m,selectedOption:o[p],selectedProducts:o,number:h+1,onChange:t,optionName:p,products:m.products,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(["case","case-text"].includes(m.option_type)){const _=d.find($=>$.option_type==="poncho-optional"),k=_?.products[0].variants;return a&&(r+=1),e.jsx(jt,{optionObject:m,selectedOption:o[p],number:h+1,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l,ponchoVariants:k,onCaseColorChange:i},m.products[0].id)}if(["case-editions","text"].includes(m.option_type))return e.jsx(Fn,{optionObject:m,selectedOption:o[p],number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="motorcycle-all")return e.jsx(On,{optionObject:m,selectedOption:o[p],number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="poncho")return e.jsx(Bn,{optionObject:m,selectedOption:o[p],number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="poncho-optional")return e.jsx(Vn,{optionObject:m,selectedOption:o[p],selectedCase:X(o,"case"),hasCaseColorStep:a,number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="screen-protector-optional")return e.jsx(Dn,{optionObject:m,selectedOption:o[p],selectedCase:X(o,"case"),number:h+1,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="head")return e.jsx(Tn,{optionObject:m,selectedOption:o[p],selectedCase:X(o,"case"),selectedMount:X(o,"mount"),needCaseSelection:!!c.find(([_,k])=>k.option_type==="case"),number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id);if(m.option_type==="power-adaptors"){const _=(u=c.find(([,k])=>k.option_type==="bundle-case"))==null?void 0:u[0];if(_&&!["QLM-2DWC","QLM-2DWC-2"].includes((j=o[_])==null?void 0:j.sku))return null}return e.jsx(Hn,{optionObject:m,selectedOption:o[p],selectedCase:X(o,"case"),selectedMount:X(o,"mount"),selectedHead:X(o,"head"),number:h+1+r,onChange:t,optionName:p,variants:g,containerClasses:"mt-3 mb-3",product:n,isError:l},m.products[0].id)})}):null},Un=({selected:t,onAddToCart:s,isSubmitting:n})=>{let o;t!=null&&t.inventory_quantity<4&&t.stock_block_auto!="true"&&t.url!="gift-voucher"?t.stock_preorder!=""&&t.stock_preorder!="none"?o=f("atc_preorder"):window.settings.automatic_backorder?o=f("atc_backorder"):o=f("atc_add"):o=f("atc_add");let l=t;return e.jsxs("button",{className:`buy__add position-relative d-flex align-items-center justify-content-center w-100 border-0 overflow-hidden ${n?"js-animate":""} ${l?"active":""}`,onClick:()=>
4s("Screen Protector Popup"),children:[e.jsx("div",{className:"mr-2 mb-1",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"18",viewBox:"0 0 24 24",children:[e.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{fill:"white",d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})]})}),e.jsxs("span",{className:"animate animation__dots position-absolute",children:[f("atc_submitting"),e.jsxs("ul",{className:"d-inline-block p-0 m-0",children:[e.jsx("li",{className:"d-inline-block",children:"."}),e.jsx("li",{className:"d-inline-block",children:"."}),e.jsx("li",{className:"d-inline-block",children:"."})]})]}),e.jsx("span",{className:"position-relative",children:o})]})},zn=({product:t,variant:s,device:n})=>{const[o,l]=b.useState(!1),a=()=>{l(!0);let r={items:[]};const d=document.querySelector("#product2025-mount"),{tracking_title:c,collection:w}=d.dataset;let h={};h._attribution=c,h._collection=w||"No collection",h._product=s.trackingTitle,h._source="Screen Protector Upsell",s.stock_backorder_force=="true"&&s.stock_backorder.length>5?h._backorder=`Yes - ${s.stock_backorder}`:s.inventory_quantity<=3&&(s.stock_block_auto=="true"?h._backorder="Message was blocked":s.stock_preorder.length>5?h._preorder=`Yes - ${s.stock_preorder}`:s.stock_backorder.length>5?h._backorder=`Yes - ${s.stock_backorder}`:h._backorder="Yes, but no eta shown");let p={quantity:1,id:s.onlineStoreId,properties:h};r.items.push(p),F("Add to Cart Location",location,"(not set)"),F("Product Form","Add to Cart: Screen Protector Upsell",s.sku),F("Product Form","Screen Protector Upsell","Yes"),D("AddToCartScreenProtector");try{fireAddToCart([s])}catch{}fetch(`${window.location.origin}${window.Shopify.routes.root}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"same-origin"}).then(m=>m.json()).then(m=>{setTimeout(()=>{Oe(),l(!1)},500)}).catch(m=>{console.log(m)})},i=()=>{let r=n;return Shopify.locale=="en"&&(r=`${n.includes("iPhone")?"an":"a"} ${n}`),f("upsell_poncho_title").replace("XYZ",r)};return e.jsx("div",{className:"modal micromodal",id:"modal-popup-screen-protector","aria-hidden":"true","data-inventory":s.inventory_quantity,children:e.jsx("div",{className:"modal__overlay position-fixed d-flex justify-content-center align-items-center",tabIndex:"-1","data-micromodal-close":!0,children:e.jsxs("div",{className:"modal__container m-3 position-relative",role:"dialog","aria-modal":"true","aria-labelledby":"modal-popup-screen-protector-title",style:{maxWidth:"420px"},children:[e.jsx("header",{className:"modal__header mb-1",children:e.jsxs("button",{className:"modal__close p-0 d-block ml-auto","aria-label":f("text_close_popup"),"data-micromodal-close":!0,children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 38 38",children:e.jsx("path",{d:"M22.4 19l15-15A2.4 2.4 0 1033.8.8L19 15.7 4 .6A2.4 2.4 0 10.8 4.1l15 14.9-15 15a2.4 2.4 0 103.4 3.3l14.9-15 15 15a2.4 2.4 0 001.6.7 2.4 2.4 0 001.7-4l-15-15z"})}),e.jsx("span",{className:"sr-only",children:f("text_close_popup")})]})}),e.jsx("div",{className:"modal__content",id:"modal-popup-screen-protector-content",children:e.jsxs("div",{className:"w-100 p-4 p-md-5 text-left",children:[e.jsxs("div",{className:"d-flex align-items-center mb-4",children:[e.jsxs("div",{children:[e.jsx("h6",{className:"text-uppercase",id:"modal-popup-screen-protector-title",children:i()}),e.jsx(Xe,{price:s.price,plus:!0,compareAtPrice:s.compareAtPrice})]}),e.jsx("div",{className:"ml-2 mr-4",children:e.jsx("img",{src:s.image.src,alt:t.title,style:{minWidth:"100px"}})})]}),e.jsx("div",{className:"font-family-gotham-book mb-4",children:e.jsx("p",{style:{color:"#212529"},children:f("upsell_poncho_text")})}),e.jsx(Un,{selected:s,isSubmitting:o,onAddToCart:a}),e.jsx("button",{className:"bg-transparent border-0 btn--text font-family-gotham-book mt-3 p-0 text-center w-100",onClick:()=>{F("Product Form","Screen Protector Upsell","No"),Oe()},children:f("upsell_poncho_nothanks")}),e.jsx(ae,{variant:s,classes:"mt-4 mx-auto mb-0 w-md-55",product:t})]})})]})})})},Kn=({handle:t,device:s})=>{const[n,o]=b.useState(null),[l,a]=b.useState(!0),[i,r]=b.useState(null);if(b.useEffect(()=>{async function c(){const w=Shopify.locale!=="en"?`/${Shopify.locale}`:"",h=`${window.location.origin}${w}/products/${t}?view=data.json`;Promise.all([fetch(h).then(p=>p.json())]).then(async p=>{p.map(m=>{m.sanity=JSON.parse(decodeURIComponent(escape(atob(m.sanity)))),m.variants.forEac
4h(g=>{var y,u;g.trackingTitle=m.trackingTitle,g.productTitle=(u=(y=m?.sanity)==null?void 0:y.optionalExtraConfiguration)==null?void 0:u.product_title,g.compareAtPrice=g.compareAtPrice&&g.compareAtPrice!=0?g.compareAtPrice:g.price,g.price=ne(g.price)}),o(m),a(!1)})}).catch(p=>{console.log(p),r(p)})}n||c()},[]),i||l)return null;const d=n.variants.find(c=>c.title==s);return d?e.jsx(zn,{product:n,variant:d,device:s}):null},Yn=t=>{if(t.includes("iPhone"))return"tempered-glass-screen-protector-iphone";if(t.includes("Galaxy"))return"screen-protector-galaxy";if(t.includes("Pixel"))return"screen-protector-pixel";if(t.includes("iPad"))return"tempered-glass-screen-protectors-ipad"},Jn=({selectedProducts:t,selectedOptionalExtras:s})=>{const n=X(t,"case");if(!n||s.length>0&&s.map(l=>l.handle).some(l=>ze.includes(l))||Object.values(t).some(l=>ze.includes(l?.handle)))return null;const o=z(n.title,"case","screen");return e.jsx(Kn,{handle:Yn(n.title),device:o})},Xn=t=>t?["APOD","APMCL"].some(n=>t.includes(`-${n}`)):!1,Ye=(t,s,n,o,l)=>{const a=document.querySelector("#product2025-mount"),{collection:i}=a.dataset;let r={};return r._attribution=s,r._collection=i||"No collection",r._product=t.trackingTitle,(l=="bundle"||n=="Optional Extra")&&(r._source=n),t.price==0&&(r._source="Free Gift With Purchase"),t.stock_backorder_force=="true"&&t.stock_backorder.length>5?r._backorder=`Yes - ${t.stock_backorder}`:t.inventory_quantity<=3&&t.handle!="gift-voucher"&&(t.stock_block_auto=="true"?r._backorder="Message was blocked":t.stock_preorder.length>5?r._preorder=`Yes - ${t.stock_preorder}`:t.stock_backorder.length>5?r._backorder=`Yes - ${t.stock_backorder}`:r._backorder="Yes, but no eta shown"),l=="bundle"&&n==="Bundle option"&&(r._kit_name=o.title,r._kit_url=`${window.location.pathname}${window.location.search}`),{quantity:1,id:t.id,properties:r}},$t=t=>{Ms(t.sku)&&D("AddToCartLimitedEdition"),Xn(t.sku)&&(D("AddToCartAirPods"),D("AirPodsCaseAddToCart"),D(t.sku.includes("-APMCL")?"AirPodsMcLarenCaseAddToCart":"AirPodsOGCaseAddToCart")),t.sku.includes("PON")&&D("AddToCartPoncho"),t.sku.includes("ANX-GSP")&&D("AddToCartScreenProtector")},Zn=async(t,s,n,o)=>{const l=document.querySelector("#product2025-mount"),{tracking_title:a}=l.dataset,i={items:[]};Object.values(t).map(d=>{$t(d),i.items.unshift(Ye(d,a,"Bundle option",n,o))}),s.map(d=>{$t(d),i.items.unshift(Ye(d,a,"Optional Extra"))}),s.length>0&&D("OptionalExtraAddToCart");try{bs([...Object.values(t),...s])}catch{}return await fetch(`${window.location.origin}${window.Shopify.routes.root}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i),credentials:"same-origin"}).then(d=>d.json()).then(d=>d.message?{status:"error",message:d.message}:{status:"success"}).catch(d=>(console.log(d),{status:"error"}))},eo=t=>t.default_product?t.products[0].variants[0]:null,kt=t=>{const s={};for(const n of Object.keys(t))s[n]=eo(t[n]);return s},Ge=(t,s,n,o,l)=>{const a=kt(t);for(const[i,r]of Object.entries(t)){let d=s;if(n==="title"){const c=r.products.flatMap(p=>p.variants),w=ye(s,c,!0),h=Re(s,c,!0);if(o.handle.includes("poncho")&&h!=null&&h.original&&h!=null&&h.mag)d="multiple-ponchos";else if(["folio","poncho","screen-protector"].some(p=>o.handle.includes(p)))d=s;else if(w){const p=l&&l.toLowerCase()!=="black"?l.toLowerCase():"mag";w[p]?d=w[p]:w.mag?d=w.mag:w.original&&(d=w.original)}}if(n==="sku"&&(d=s[i]),n==="mount"){const c=r.products.flatMap(w=>w.variants).find(w=>{var h;return((h=w.title)==null?void 0:h.toLowerCase())===d?.toLowerCase()});c&&(a[i]=c)}if(d==="none")a[i]="none";else{const c=r.products.flatMap(w=>w.variants).find(w=>n==="title"&&r.option_type==="poncho-optional"||n==="title"&&r.option_type==="poncho"&&d==="multiple-ponchos"?null:w[n]===d);c&&(a[i]=c)}}return a},he=t=>Object.fromEntries(Object.entries(t).filter(([s,n])=>n!=="none")),to=["QLM-CAR-5","QLK-4X4-CAR5","QLK-PN-CAR5"],$e=(t,s)=>!t||!s?!1:t.includes("-")?t===s:s.includes(t),so=(t,s,n)=>{let o=t.flatMap(i=>i.variants);s&&(o=o.filter(i=>s==="personalization"?z(i.title,"case","personalization")===!0:s==="no_hdsm"?i.sku!=="QLM-HDSM":i.title.toLowerCase().includes(s.toLowerCase())));let l=[];return o.every(i=>i.price!==i.compareAtPrice)||(t.flatMap(i=>i.handle)[0]==="case-all-pixel-devices"&&!s&&(l=o.filter(i=>i.price!==i.compareAtPrice).map(i=>i.compareAtPrice)),o=o.filter(i=>to.includes(i.sku)?!0:i.price===i.compareAtPrice)),Math.min(...o.map(i=>i[n]),...l)||null},Tt=(t,s,n,o,l)=>{var i,r,d;let a=0;if(l.length){const c=o==="compareAtPrice"?"from_price":"price";if(Object.values(s).includes(null)){const w=(i=Object.values(s).find(m=>m!==null))==null?void 0:i.sku,p=(w?l.filter(m=>{var g,y,u;return $e((g=m.sku_1)==null?void 0:g.trim(),w)||$e((y=m.sku_2)==null?void 0:y.trim(),w)||$e((u=m.sku_3)==null?void 0:u.trim(),w)}):l).reduce((m,g)=>parseFloat(g[c].amount)<parseFloat(m[c].amount)?g:m);a=parseFloat((r=p[c])==null?void 0:r.amount)}else{const w=l.find(h=>{var p,m,g,y,u,j,_;return $e((p=h.sku_1)==null?void 0:p.trim(),(m=s.option1)==null?void 0:m.sku)&&$e((g=h.sku_2)==null?void 0:g.trim(),(y=s.option2)==null?void 0:y.sku)&&(!((u=h.sku_3)!=null&&u.trim())||$e((j=h.sku_3)==null?void 0:j.trim(),(_=s.option3)==null?void 0:_.sku))});w&&(a=parseFloat((d=w[c])==null?void 0:d.amount))}}else for(const[c,w]of Object.entries(he(t))){let h=0;s[c]&&s[c]!="none"?h=s[c][o]:w.yes_no_option||(h=so(w.products,w.filter_value,o)),o=="price"&&(h=ne(h)),a+=h}
4return n.forEach(c=>{a+=c[o]}),s.freeGWP&&(a+=s.freeGWP[o]),a},us=t=>t.toLowerCase().replace(/[^a-z0-9]/g,""),Te=t=>{const s=us(t);document.querySelectorAll(`.js-accordion-${s}`).forEach(o=>{o.open=!0})},Et=t=>{document.querySelectorAll(".product__info details").forEach(n=>{n.open=!1}),Object.values(t).forEach(n=>{if(!n||n==="none"||typeof n=="string")return null;["case","case-editions"].includes(n.option_type)&&!n.handle.includes("universal")?n.sku.includes("QMC")?Te(f("sel_case_mag")):n.sku.includes("QLC")&&Te(f("sel_case_og")):["poncho","poncho-optional"].includes(n.option_type)?Te(f("byk_poncho")):n.option_type==="power-adaptors"?n.sku.includes("30")?Te(f("thing_30w")):Te(f("thing_18w")):Te(n.title)})},it=t=>{const s={};for(const[o,l]of Object.entries(t))l&&l.sku?s[o]=l&&l.sku:l==="none"&&(s[o]="none");const n=btoa(JSON.stringify(s));if(history.pushState){let o=window.location.origin+window.location.pathname+"?selected="+n;window.history.pushState({path:o},"",o)}},no=(t,s)=>{var l;const n=kt(t),o=((l=Object.entries(t).find(([a,i])=>i.products.some(r=>r.variants.some(d=>d.sku===s))))==null?void 0:l[0])||null;return o&&(n[o]=s),n},oo=(t,s,n,o,l,a,i)=>{let r=[...t];if(s&&n==="add"){if(r=r.filter(c=>c.handle!==s.handle),s.parentHandle&&(r=r.filter(c=>c.parentHandle?c.parentHandle!==s.parentHandle:!0)),r.push(s),i.chargingOption&&r){const c=i.chargingOption.product_to_show.split("|");if(c.includes(s.handle)){const w=c.filter(h=>h!==s.handle);r=r.filter(h=>h.handle!==w.join("")),r.some(h=>c.includes(h.handle))&&(r=r.filter(h=>h.handle!==i.chargingOption.unselected_optional_extras))}}F("Product Form","Extra Added",s.sku)}else n==="remove"&&(r=r.filter(c=>c.id!==s.id),s.handle==="cycle-waterproof-wireless-charging-head"&&(r=r.filter(c=>c.handle!=="cycle-power-cables")));const d=ht(l,o,a,r);return r=r.filter(c=>{var w,h,p;if(i.chargingOption){const m=(w=i.chargingOption)==null?void 0:w.product_to_show.split("|");if(m&&m.includes(c.handle))return!0;if(c.handle=="colored-lever-out-front-mount"&&(h=i.chargingOption)!=null&&h.unselected_optional_extras)return((p=i.chargingOption)==null?void 0:p.unselected_optional_extras)==c.handle}return c.parentHandle==="sanity-all-cases"?!0:d.includes(c.handle)||d.includes(c.parentHandle)}),{newSelectedOptionalExtras:r,newOptionalExtrasSetup:d}},lo=(t,s)=>JSON.stringify(t)===JSON.stringify(s),io=({config:t,onChange:s,optionalExtras:n,product:o,selectedProducts:l,selectedOptionalExtras:a,optionTypes:i})=>e.jsx(Pn,{config:t,onChange:s,optionalExtras:n,product:o,selectedProducts:he(l),selectedOptionalExtras:a,optionTypes:i}),ro=ee.memo(io,lo),Lt=(t,s)=>{var a;const n=Object.keys(s).find(i=>s[i].option_type==="bundle-case"),o=Object.keys(s).find(i=>s[i].option_type==="power-adaptors");if(!n||!o)return t;const l=["QLM-2DWC","QLM-2DWC-2"].includes((a=t[n])==null?void 0:a.sku);return l&&t[o]==="none"?t[o]=null:!l&&t[o]!=="none"&&(t[o]="none"),t},It=(t,s,n)=>{const o=Object.keys(s).find(c=>s[c].option_type==="power-adaptors");if(!o)return t;const l=t[o];if(!l||l==="none")return t;const a=X(t,"mount"),i=X(t,"head"),r=s[o].products.flatMap(c=>c.variants);return as(r,a,i,n).some(c=>c.sku===l.sku)||(t[o]="none"),t},ao=({options:t,optionalExtrasData:s,product:n,selectedAdVariant:o,productType:l,freeGWP:a,bundlePrices:i}
4)=>{var G;const[r,d]=b.useState({}),[c,w]=b.useState([]),[h,p]=b.useState(null),[m,g]=b.useState(!1),[y,u]=b.useState(!1),[j,_]=b.useState(!1);b.useEffect(()=>{let C={},E=new URLSearchParams(document.location.search.substring(1)),N=E.get("selected"),H=E.get("device"),R=E.get("mount"),T=E.get("color");if(o&&E.get("variant")){if(o.selected_code)try{C=Ge(t,JSON.parse(atob(o.selected_code)),"sku",n),it(C)}catch(v){console.log("Error parsing selected_code",v)}else if(o.sku)try{C=Ge(t,no(t,o.sku),"sku",n),it(C)}catch(v){console.log("Error parsing selected_code",v)}}else if(N)try{C=Ge(t,JSON.parse(atob(N)),"sku",n)}catch(v){console.log("Error parsing selected_code",v)}else H?C=Ge(t,H,"title",n,T):R?C=Ge(t,R,"mount",n):C=kt(t);E.has("jump-to-reviews")&&setTimeout(()=>{xt(document.querySelector("#jump-to-reviews"))},250),C=Lt(C,t),C=It(C,t,n.handle),d(C),Et(C),p(ht(C,s,t))},[]),b.useEffect(()=>{const C=document.querySelector("#product2025-mount"),{tracking_title:E}=C.dataset,N=[];return Object.values(he(r)).filter(H=>!(!H||H.type==="Cases")).map(H=>{N.unshift(Ye(H,E,"Bundle option",n,l))}),c.map(H=>{N.unshift(Ye(H,E,"Optional Extra"))}),window.styluxProducts=N,()=>{delete window.styluxProducts}},[r,c]);const k=(C,E)=>{const N={...r};N[E]=C,Lt(N,t),It(N,t,n.handle),a&&a.conditions&&N.freeGWP&&(mt(a.conditions,N)||delete N.freeGWP),d(N),Et(N);const H=ht(N,s,t,c),R=ft(s,h,N,n,Object.values(t).map(x=>x?.option_type));let T=[...c];w(T.filter(x=>{if(R.other.length>=1&&x.parentHandle==="sanity-all-cases")return!0;if(R.chargingOption){if(R.chargingOption.product_to_show.split("|").includes(x.handle))return!0}else{if(R.airPods.length>=1&&(x.handle==="cases-airpods-mclaren-edition"||x.handle==="cases-airpods"))return!0;if(x.handle==="cycle-power-cables")return!1}return H.includes(x.handle)&&!x.handle.includes("poncho")&&!x.handle.includes("screen-protector")&&!x.handle.includes("folio")})),p(H);let v=Object.values(N).includes(null);m&&!v&&g(!1),C&&(F("Product Form","Variant Selected",C.title),D("ProductFormDropdown")),it(N)},$=(C,E)=>{E==="add"&&D("OptionalExtraAddToKit");const N=oo(c,C,E,s,he(r),t,ft(s,h,r,n,Object.values(t).map(H=>H?.option_type)));w(N.newSelectedOptionalExtras),p(N.newOptionalExtrasSetup)},S=(C,E)=>{const N={...r};E==="add"?N.freeGWP=C:delete N.freeGWP,d(N)},A=()=>{let C=[...Object.values(he(r)),...c];return[...Object.values(C).filter(Boolean)]},I=async()=>{if(Object.values(r).includes(null)){g(!0),setTimeout(()=>{J(document.querySelectorAll(".is--error")[0])},50);return}g(!1),u(!1),_(!0);const E=await Zn(he(r),c,n,l);if(E?.status=="error"){u(E),_(!1);return}if(E?.status=="success"){setTimeout(()=>{_(!1)},500);const N=X(r,"case");if(F("Product Form","Add to Cart","(not set)"),N&&!n.handle.includes("universal"))try{MicroModal.show("modal-popup-screen-protector",{onClose:(H,R,T)=>{T.preventDefault(),T.stopPropagation(),Oe()},waitCloseAnimation:!0})}catch(H){console.log(H),Oe()}else Oe()}};return e.jsxs("div",{className:"font-family-gotham mt-1",style:{color:"#000"},children:[e.jsx(en,{options:Object.fromEntries(Object.entries(t).filter(([C,E])=>E.default_product))}),e.jsx(Wn,{onChange:k,options:Object.fromEntries(Object.entries(t).filter(([C,E])=>!E.default_product)),product:n,selectedProducts:r,isError:m}),e.jsx($s,{tags:n.tags}),a&&e.jsx(tn,{alwaysShow:a.always_show,conditions:a.conditions,label:f("free_gwp"),product:a.product,selectedProducts:r,onFreeGWPChange:S,selectedFreeGWP:r.freeGWP}),e.jsxs("div",{className:"d-flex flex-row",children:[!Object.values(r).includes(null)&&window.Stylux&&!n.tags.includes("personalization-hide")&&e.jsx(es,{variantId:(G=X(r,"case"))==null?void 0:G.id}),n.handle==="mag-cases-personalization"&&window.Stylux&&Object.values(r).includes(null)&&e.jsx("button",{className:"buy__add position-relative d-flex align-items-center justify-content-center w-100 border-0 overflow-hidden",onClick:()=>I(),children:f("atc_complete_selection")}),n.handle!=="mag-cases-personalization"&&e.jsx(Zt,{selectedAll:A(),selectedProducts:he(r),onAddToCart:I,isError:m,isSubmitting:j,gaLocation:"Above extras",codeLocation:"form"})]}),y&&e.jsx("div",{className:"mt-2 p-2",style:{border:"1px solid red",color:"red"},children:y.message?y.message:f("atc_error")}),n.type==="Gift Voucher"?e.jsx("p",{className:"buy__orderby p-2 text-center text-uppercase mt-md-n3",children:f("buy_delivered_immediately")}
4):e.jsx(e.Fragment,{children:e.jsx(Ts,{extraClasses:"mt-md-n3",hide:A().some(C=>C.inventory_quantity<4&&!C.stock_block_auto||!!C.stock_backorder_force)?[!0]:[]})}),Object.values(s.skus).flat().length==0&&e.jsx("div",{className:"my-4",children:e.jsx(Es,{})}),e.jsx(te,{location:"bundle: RenderOptionalExtras",showError:"true",children:e.jsx(ro,{config:s,onChange:$,optionalExtras:h,product:n,selectedProducts:he(r),selectedOptionalExtras:c,optionTypes:Object.values(t).map(C=>C?.option_type)})}),e.jsx(Ks,{selectedAll:A(),selectedProducts:he(r),selectedProductsWithNulls:r,selectedOptionalExtras:c,onOptionalExtraRemove:$,onAddToCart:I,isError:m,isSubmitting:j,price:Tt(t,r,c,"price",i),compareAtPrice:Tt(t,r,c,"compareAtPrice",i),product:n,options:t}),!n.handle.includes("universal")&&e.jsx(Jn,{selectedProducts:he(r),selectedOptionalExtras:c})]})},co=({product:t})=>{let s=f("callout360_title"),n=f("callout360_text"),o=f("callout360_button"),l="https://cdn.shopify.com/s/files/1/1074/2612/files/360-Range-Waterproof-WCH.png?v=1751850945",a=f("callout360_image_alt"),i="/collections/build-your-own";return["quad-lock-360-head-action-camera","accessory-quad-lock-to-action-camera-adaptor"].includes(t.handle)&&(s=f("calloutactioncam_title"),n=f("calloutactioncam_text"),o=f("calloutactioncam_button"),l="https://cdn.shopify.com/s/files/1/0941/8836/files/ActionCam-Range_410x308-2.png?v=1706505643",a=f("calloutactioncam_image_alt"),i="/collections/shop-action-camera"),Shopify.locale!="en"&&(i=`/${Shopify.locale}${i}`),e.jsxs("div",{className:"byk__callout d-flex flex-column flex-md-row p-3 p-md-4 mb-4 my-md-5 position-relative align-items-center",children:[e.jsxs("svg",{className:"ml-md-3 mr-3 mr-md-5 position-relative d-none d-md-block",viewBox:"0 0 300 300",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M150 258.5a108.6 108.6 0 0 1 0-217 108.6 108.6 0 0 1 0 217m137-102.2 7.8-.7c7-.6 7-10.7 0-11.3l-7.8-.7c-6.4-.5-7.2-9.5-1-11.2l7.6-2c6.7-1.8 5-11.8-2-11.2l-7.8.7c-6.4.6-8.7-8.1-3-10.8l7.2-3.3c6.3-3 2.8-12.5-3.9-10.7l-7.6 2c-6.1 1.7-10-6.5-4.7-10.1l6.4-4.5c5.7-4 .7-12.8-5.7-9.8l-7 3.3c-5.8 2.7-11-4.7-6.5-9.2l5.5-5.6c5-4.9-1.5-12.6-7.2-8.6l-6.5 4.5c-5.2 3.6-11.6-2.8-7.9-8l4.5-6.4c4-5.7-3.8-12.2-8.7-7.3l-5.5 5.6c-4.5 4.5-12-.7-9.2-6.5l3.3-7c3-6.4-5.9-11.5-9.8-5.8l-4.5 6.5c-3.7 5.2-11.9 1.4-10.2-4.8l2-7.5c1.8-6.8-7.7-10.2-10.6-4l-3.3 7.2c-2.7 5.8-11.4 3.4-10.9-3l.7-7.7c.6-7-9.4-8.7-11.2-2l-2 7.6c-1.6 6.1-10.6 5.4-11.2-1l-.7-7.8c-.6-7-10.7-7-11.3 0l-.7 7.8c-.5 6.4-9.5 7.2-11.2 1l-2-7.6c-1.8-6.7-11.8-5-11.2 2l.7 7.8c.6 6.4-8.1 8.7-10.8 3l-3.3-7.2c-3-6.3-12.5-2.8-10.7 3.9l2 7.6c1.7 6.1-6.5 10-10.1 4.7l-4.5-6.4c-4-5.7-12.8-.7-9.8 5.7l3.3 7c2.7 5.8-4.7 11-9.2 6.5l-5.6-5.5c-4.9-5-12.6 1.5-8.6 7.2l4.5 6.5c3.6 5.2-2.8 11.6-8 7.9l-6.4-4.5c-5.7-4-12.2 3.8-7.3 8.7l5.6 5.5c4.5 4.5-.7 12-6.5 9.2l-7-3.3c-6.4-3-11.5 5.9-5.7 9.8l6.4 4.5c5.2 3.7 1.4 11.9-4.8 10.2l-7.5-2c-6.8-1.8-10.2 7.7-4 10.6l7.2 3.3c5.8 2.7 3.4 11.4-3 10.9l-7.7-.7c-7-.6-8.7 9.4-2 11.2l7.6 2c6.1 1.6 5.4 10.6-1 11.2l-7.8.7c-7 .6-7 10.7 0 11.3l7.8.7c6.4.5 7.2 9.5 1 11.2l-7.6 2c-6.7 1.8-5 11.8 2 11.2l7.8-.7c6.4-.6 8.7 8.1 3 10.8l-7.2 3.3c-6.3 3-2.8 12.5 3.9 10.7l7.6-2c6.1-1.7 10 6.5 4.7 10.1l-6.4 4.5c-5.7 4-.7 12.8 5.7 9.8l7-3.3c5.8-2.7 11 4.7 6.5 9.2l-5.5 5.6c-5 4.9 1.5 12.6 7.2 8.6l6.5-4.5c5.2-3.6 11.6 2.8 7.9 8l-4.5 6.4c-4 5.7 3.8 12.2 8.7 7.3l5.5-5.6c4.5-4.5 12 .7 9.2 6.5l-3.3 7c-3 6.4 5.9 11.5 9.8 5.7l4.5-6.4c3.7-5.2 11.9-1.4 10.2 4.8l-2 7.5c-1.8 6.8 7.7 10.2 10.6 4l3.3-7.2c2.7-5.8 11.4-3.4 10.9 3l-.7 7.7c-.6 7 9.4 8.7 11.2 2l2-7.6c1.6-6.1 10.6-5.4 11.2 1l.7 7.8c.6 7 10.7 7 11.3 0l.7-7.8c.5-6.4 9.5-7.2 11.2-1l2 7.6c1.8 6.7 11.8 5 11.2-2l-.7-7.8c-.6-6.4 8.1-8.7 10.8-3l3.3 7.2c3 6.3 12.5 2.8 10.7-3.9l-2-7.6c-1.7-6.1 6.5-10 10.1-4.7l4.5 6.4c4 5.7 12.8.7 9.8-5.7l-3.3-7c-2.7-5.8 4.7-11 9.2-6.5l5.6 5.5c4.9 5 12.6-1.5 8.6-7.3l-4.5-6.4c-3.6-5.2 2.8-11.6 8-7.9l6.4 4.5c5.7 4 12.2-3.8 7.3-8.7l-5.6-5.5c-4.5-4.5.7-12 6.5-9.2l7 3.3c6.4 3 11.5-5.9 5.8-9.8l-6.5-4.5c-5.2-3.7-1.4-11.9 4.8-10.2l7.5 2c6.8 1.8 10.2-7.7 4-10.6l-7.2-3.3c-5.8-2.7-3.4-11.4 3-10.9l7.7.7c7 .6 8.7-9.4 2-11.2l-7.6-2c-6.1-1.6-5.4-10.6 1-11.2",fill:"#030404"}),e.jsx("path",{d:"m57.1 173.9 12.3-12.2c5 5.1 10.2 8 16.6 8 5.5 0 8.9-2.8 8.9-7v-.3c0-4.4-4-7.1-11.4-7.1h-8.1l-2.7-10 16-14.5H62v-15.6h50.3v13.7l-16.6 14.3c10 2.2 18 7.7 18 19.6v.2c0 14.2-11.4 23.2-26.9 23.2A38.1 38.1 0 0 1 57.1 174m100.5-11.8v-.2c0-5-3.9-9-10-9-6 0-9.6 3.9-9.6 9v.1c0 5.1 3.8 9.1 9.8 9.1 6.1 0 9.8-3.9 9.8-9m-30.3 16c-5.1-5.1-8.5-13-8.5-26v-.2c0-21.7 10.5-38.2 32.3-38.2a36 36 0 0 1 23.2 7.6l-9 13.6a22 22 0 0 0-13.9-5.3c-10 0-12.6 9.3-13.1 15 4.5-3.6 9-5.5 15-5.5 12.3 0 23 7.8 23 21.8v.2c0 15.5-12.4 25-27.7 25-9.8 0-16.2-3-21.3-8m99-28v-.2c0-11.2-5.2-19.2-13-19.2-7.6 0-12.7 7.9-12.7 19v.2c0 11.2 5.2 19.1 13 19.1 7.7 0 12.7-7.8 12.7-18.9m-45.
41 0v-.2c0-19.7 12.5-36.2 32.4-36.2 19.8 0 32.1 16.3 32.1 36v.2c0 19.7-12.4 36.2-32.3 36.2s-32.2-16.3-32.2-36M274 15.4h6.9l5.6 9.2 5.6-9.2h7v23.7h-6.5V25l-6 9.5h-.3l-6-9.4V39H274V15.4zm-17.5 5.8h-7v-5.8h20.7v5.8h-7V39h-6.7V21z",fill:"#030404"})]}),e.jsxs("div",{className:"position-relative",children:[e.jsxs("h5",{className:"d-flex align-items-center text-uppercase",children:[e.jsxs("svg",{className:"mr-2 d-md-none",viewBox:"0 0 300 300",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M150 258.5a108.6 108.6 0 0 1 0-217 108.6 108.6 0 0 1 0 217m137-102.2 7.8-.7c7-.6 7-10.7 0-11.3l-7.8-.7c-6.4-.5-7.2-9.5-1-11.2l7.6-2c6.7-1.8 5-11.8-2-11.2l-7.8.7c-6.4.6-8.7-8.1-3-10.8l7.2-3.3c6.3-3 2.8-12.5-3.9-10.7l-7.6 2c-6.1 1.7-10-6.5-4.7-10.1l6.4-4.5c5.7-4 .7-12.8-5.7-9.8l-7 3.3c-5.8 2.7-11-4.7-6.5-9.2l5.5-5.6c5-4.9-1.5-12.6-7.2-8.6l-6.5 4.5c-5.2 3.6-11.6-2.8-7.9-8l4.5-6.4c4-5.7-3.8-12.2-8.7-7.3l-5.5 5.6c-4.5 4.5-12-.7-9.2-6.5l3.3-7c3-6.4-5.9-11.5-9.8-5.8l-4.5 6.5c-3.7 5.2-11.9 1.4-10.2-4.8l2-7.5c1.8-6.8-7.7-10.2-10.6-4l-3.3 7.2c-2.7 5.8-11.4 3.4-10.9-3l.7-7.7c.6-7-9.4-8.7-11.2-2l-2 7.6c-1.6 6.1-10.6 5.4-11.2-1l-.7-7.8c-.6-7-10.7-7-11.3 0l-.7 7.8c-.5 6.4-9.5 7.2-11.2 1l-2-7.6c-1.8-6.7-11.8-5-11.2 2l.7 7.8c.6 6.4-8.1 8.7-10.8 3l-3.3-7.2c-3-6.3-12.5-2.8-10.7 3.9l2 7.6c1.7 6.1-6.5 10-10.1 4.7l-4.5-6.4c-4-5.7-12.8-.7-9.8 5.7l3.3 7c2.7 5.8-4.7 11-9.2 6.5l-5.6-5.5c-4.9-5-12.6 1.5-8.6 7.2l4.5 6.5c3.6 5.2-2.8 11.6-8 7.9l-6.4-4.5c-5.7-4-12.2 3.8-7.3 8.7l5.6 5.5c4.5 4.5-.7 12-6.5 9.2l-7-3.3c-6.4-3-11.5 5.9-5.7 9.8l6.4 4.5c5.2 3.7 1.4 11.9-4.8 10.2l-7.5-2c-6.8-1.8-10.2 7.7-4 10.6l7.2 3.3c5.8 2.7 3.4 11.4-3 10.9l-7.7-.7c-7-.6-8.7 9.4-2 11.2l7.6 2c6.1 1.6 5.4 10.6-1 11.2l-7.8.7c-7 .6-7 10.7 0 11.3l7.8.7c6.4.5 7.2 9.5 1 11.2l-7.6 2c-6.7 1.8-5 11.8 2 11.2l7.8-.7c6.4-.6 8.7 8.1 3 10.8l-7.2 3.3c-6.3 3-2.8 12.5 3.9 10.7l7.6-2c6.1-1.7 10 6.5 4.7 10.1l-6.4 4.5c-5.7 4-.7 12.8 5.7 9.8l7-3.3c5.8-2.7 11 4.7 6.5 9.2l-5.5 5.6c-5 4.9 1.5 12.6 7.2 8.6l6.5-4.5c5.2-3.6 11.6 2.8 7.9 8l-4.5 6.4c-4 5.7 3.8 12.2 8.7 7.3l5.5-5.6c4.5-4.5 12 .7 9.2 6.5l-3.3 7c-3 6.4 5.9 11.5 9.8 5.7l4.5-6.4c3.7-5.2 11.9-1.4 10.2 4.8l-2 7.5c-1.8 6.8 7.7 10.2 10.6 4l3.3-7.2c2.7-5.8 11.4-3.4 10.9 3l-.7 7.7c-.6 7 9.4 8.7 11.2 2l2-7.6c1.6-6.1 10.6-5.4 11.2 1l.7 7.8c.6 7 10.7 7 11.3 0l.7-7.8c.5-6.4 9.5-7.2 11.2-1l2 7.6c1.8 6.7 11.8 5 11.2-2l-.7-7.8c-.6-6.4 8.1-8.7 10.8-3l3.3 7.2c3 6.3 12.5 2.8 10.7-3.9l-2-7.6c-1.7-6.1 6.5-10 10.1-4.7l4.5 6.4c4 5.7 12.8.7 9.8-5.7l-3.3-7c-2.7-5.8 4.7-11 9.2-6.5l5.6 5.5c4.9 5 12.6-1.5 8.6-7.3l-4.5-6.4c-3.6-5.2 2.8-11.6 8-7.9l6.4 4.5c5.7 4 12.2-3.8 7.3-8.7l-5.6-5.5c-4.5-4.5.7-12 6.5-9.2l7 3.3c6.4 3 11.5-5.9 5.8-9.8l-6.5-4.5c-5.2-3.7-1.4-11.9 4.8-10.2l7.5 2c6.8 1.8 10.2-7.7 4-10.6l-7.2-3.3c-5.8-2.7-3.4-11.4 3-10.9l7.7.7c7 .6 8.7-9.4 2-11.2l-7.6-2c-6.1-1.6-5.4-10.6 1-11.2",fill:"#030404"}),e.jsx("path",{d:"m57.1 173.9 12.3-12.2c5 5.1 10.2 8 16.6 8 5.5 0 8.9-2.8 8.9-7v-.3c0-4.4-4-7.1-11.4-7.1h-8.1l-2.7-10 16-14.5H62v-15.6h50.3v13.7l-16.6 14.3c10 2.2 18 7.7 18 19.6v.2c0 14.2-11.4 23.2-26.9 23.2A38.1 38.1 0 0 1 57.1 174m100.5-11.8v-.2c0-5-3.9-9-10-9-6 0-9.6 3.9-9.6 9v.1c0 5.1 3.8 9.1 9.8 9.1 6.1 0 9.8-3.9 9.8-9m-30.3 16c-5.1-5.1-8.5-13-8.5-26v-.2c0-21.7 10.5-38.2 32.3-38.2a36 36 0 0 1 23.2 7.6l-9 13.6a22 22 0 0 0-13.9-5.3c-10 0-12.6 9.3-13.1 15 4.5-3.6 9-5.5 15-5.5 12.3 0 23 7.8 23 21.8v.2c0 15.5-12.4 25-27.7 25-9.8 0-16.2-3-21.3-8m99-28v-.2c0-11.2-5.2-19.2-13-19.2-7.6 0-12.7 7.9-12.7 19v.2c0 11.2 5.2 19.1 13 19.1 7.7 0 12.7-7.8 12.7-18.9m-45.1 0v-.2c0-19.7 12.5-36.2 32.4-36.2 19.8 0 32.1 16.3 32.1 36v.2c0 19.7-12.4 36.2-32.3 36.2s-32.2-16.3-32.2-36M274 15.4h6.9l5.6 9.2 5.6-9.2h7v23.7h-6.5V25l-6 9.5h-.3l-6-9.4V39H274V15.4zm-17.5 5.8h-7v-5.8h20.7v5.8h-7V39h-6.7V21z",fill:"#030404"})]}),s]}),e.jsx("p",{className:"pr-md-5 text",children:n}),e.jsx("p",{className:"mb-0",children:e.jsx("a",{className:"btn text-uppercase font-family-gotham d-inline-block w-auto px-5 text-center",href:i,onClick:()=>{D("Callout360"),F("Product","360 Callout","(not set)")},children:o})})]}),e.jsx("div",{className:"byk__callout--image ml-md-auto position-relative mt-3 mt-md-0",children:e.jsx("a",{href:i,onClick:()=>{D("Callout360"),F("Product","360 Callout","(not set)")},children:e.jsx("img",{className:"position-absolute",src:l,alt:a})})})]})}
4,Ht=({header:t,image:s,text:n,type:o,extraClasses:l})=>e.jsxs("div",{className:`highlights__slide highlights__slide--fade position-relative overflow-hidden ${l}`,children:[e.jsx("img",{"data-src":`${s}${o=="review"?"":"?auto=format&w=400&h=500&crop=center&fit=crop&q=90"}`,className:"lazyload w-100",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAFCAQAAADIpIVQAAAAEElEQVR42mNkMGYAA0YiGAAZmwEFRxXKyAAAAABJRU5ErkJggg=="}),e.jsx("div",{className:"highlights__slide--text position-absolute w-100 d-flex flex-column justify-content-end",children:e.jsxs("div",{className:"position-relative p-3 py-2",children:[e.jsx("h6",{className:`text-uppercase ${o=="review"?"text-wrap-balance":""}`,children:t}),e.jsx("div",{className:`${o=="review"?"text-wrap-balance":""}`,children:n})]})}),o=="review"&&e.jsxs("div",{className:"highlights__reviews position-absolute text-uppercase text-center font-family-gotham",children:[e.jsx("span",{children:f("highlights_reviews_number")}),e.jsx("div",{className:"review__stars--score",style:{"--percent":"100%"}}),e.jsx("span",{children:f("reviews_plural")})]})]});function uo({data:t,subtitle:s}){const n=Ls(576),o=b.useRef();return n?e.jsxs("div",{className:"aa-test-highlights mt-5 pt-0 pt-md-2",children:[e.jsxs("div",{className:"double-heading text-center",children:[e.jsx("p",{className:"text-uppercase font-family-gotham mx-0 pt-0",children:s}),e.jsx("h4",{className:"text-uppercase mx-0 mb-2 mb-md-4",children:f("buy_highlights_title")})]}),t.map(l=>e.jsx(Ht,{header:l.header,image:l.image,text:l.text,type:l.type,extraClasses:"mx-4 mx-sm-0"},`highlights-${l.image}`))]}):e.jsxs("div",{className:"aa-test-highlights mt-5 pt-0 pt-md-2",children:[e.jsxs("div",{className:"double-heading text-center",children:[e.jsx("p",{className:"text-uppercase font-family-gotham mx-0 pt-0",children:s}),e.jsx("h4",{className:"text-uppercase mx-0 mb-2 mb-md-4",children:f("buy_highlights_title")})]}),e.jsx(Ut,{className:"splide__react mb-4 mb-md-6",ref:o,options:{focus:0,fixedWidth:"400px",gap:"10px",padding:{left:"10px"},trimspace:!0,type:"loop",arrows:!0,pagination:!1,speed:200,drag:"free",snap:!0,flickMaxPages:0,flickPower:200,breakpoints:{640:{focus:"center",padding:45,fixedWidth:"60vw"}}},children:t.map(l=>e.jsx(zt,{children:e.jsx(Ht,{header:l.header,image:l.image,text:l.text,type:l.type})},`highlights-${l.image}`))})]})}class po extends ee.PureComponent{constructor(s){super(s),this.handleClick=n=>{const{index:o,isActive:l,text:a}=this.props;l||(F("Product","How To Videos",a),this.props.onTabClick(o))}}render(){const{index:s,isActive:n,text:o}=this.props;return e.jsx("li",{className:"w-100 w-md-auto mx-md-1",children:e.jsx("button",{id:`tab-${s+1}`,className:`font-family-gotham d-flex justify-content-center align-items-center text-center w-100 w-md-auto text-uppercase ${n?"is-active":""}`,onClick:()=>{this.handleClick()},children:o})})}}function mo({data:t}){const[s,n]=b.useState(0);b.useEffect(()=>{if(window.location.search.indexOf("watch")>-1&&new URLSearchParams(document.location.search.substring(1)).get("watch")=="how-to"&&setTimeout(()=>{st(document.querySelector(".product__howtos--video"))},200),window.location.search.indexOf("how-to")>-1){let l=new URLSearchParams(document.location.search.substring(1)),a=t.findIndex(i=>i.id===l.get("how-to"));l.get("how-to")=="true"?setTimeout(()=>{st(document.querySelector(".product__howtos--video"))},200):a>-1&&setTimeout(()=>{n(a),st(document.querySelector(".product__howtos--video"))},200)}},[]);const o=l=>{n(l)};return e.jsx("div",{className:"product__howtos pt-4 py-md-5",children:e.jsx("div",{className:"container pt-0 pt-md-4",children:e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col-lg-1"}),e.jsxs("div",{className:"col-md-12 col-lg-10 px-0",children:[e.jsxs("div",{className:"double-heading text-center",children:[e.jsx("p",{className:"text-uppercase font-family-gotham mx-0 pt-0 pt-md-2",children:f("howto_subtitle")}),e.jsx("h4",{className:"text-uppercase mx-0 mb-2",children:t.length>1?f("howto_title_plural"):f("howto_title_single")})]}),e.jsxs("div",{className:"px-md-5 mx-md-3",children:[e.jsx("div",{className:"product__info--tabs product__howto--tabs p-0 pb-2",children:e.jsx("ul",{className:`js-tabs text-uppercase m-0 p-0 d-flex justify-content-center flex-wrap tabs-${t.length}`,children:t.length>1&&t.map((l,a)=>e.jsx(po,{isActive:s==a,text:l.v2?l.name:l.video_name,index:a,onTabClick:o},`HowToTab-${l.id}}`))})}),e.jsx("div",{className:"w-100 product__howtos--video",children:t.map((l,a)=>e.jsx("div",{className:`${s==a?"d-block":"d-none"}`,children:e.jsx("div",{className:"product__video d-flex",children:e.jsx(Wt,{src:null,alt:null,video:l.url,name:l.name,showBFCM:!1,page:"Product",location:"HowTo",length:l.length,isActive:s==a,isHowTo:!0,is360:l.is360})})},`HowToVideo-${l.id}`))})]})]}),e.jsx("div",{className:"col-lg-1"})]})})})}const ho=({feed:t})=>{let s,n;const o=document.querySelector("[data-sanity-imagefeed-json]");if(o&&o.innerText.length>0)s=JSON.parse(o.innerText)[0];else return null;return t&&s[t]?n=s[t]:n=s.default,n.length<6&&(n=s.default),n=n.splice(0,6),e.jsxs("div",{className:"product__feed pt-3 pt-md-5 overflow-hidden",children:[e.jsxs("p",{className:"text-center text-uppercase product_tab_style font-family-gotham mb-1",children:["#quadlock ",window.settings.feed_hashtagquadlock," ",f("text_posts")]}),e.jsxs("div",{className:"d-flex justify-content-between justify-content-sm-center",children:[e.jsxs("h5",{className:"text-center text-uppercase mx-2 mx-md-5",children:[e.jsx("a",{href:"https://www.instagram.com/quadlock/",target:"_blank",rel:"noreferrer",className:"color-black",children:"@quadlock"}),e.jsxs("span",{className:"d-block",children:[window.settings.feed_quadlockcase," ",f("text_followers")]})]}),e.jsxs("h5",{className:"text-center text-uppercase mx-2 mx-md-5",children:[e.jsx("a",{href:"https://www.instagram.com/quadlockmoto/",target:"_blank",rel:"noreferrer",className:"color-black",children:"@quadlockmoto"}),e.jsxs("span",{className:"d-block",children:[window.settings.feed_quadlockmoto," ",f("text_followers")]})]}),e.jsxs("h5",{className:"text-center text-uppercase mx-2 mx-md-5",children:[e.jsx("a",{href:"https://www.instagram.com/quadlockcycle/",target:"_blank",rel:"noreferrer",className:"color-black",children:"@quadlockcycle"}),e.jsxs("span",{className:"d-block",children:[window.settings.feed_quadlockcycle," ",f("text_followers")]})]})]}),e.jsx("div",{className:"product__feed--content d-flex flex-wrap flex-md-nowrap px-1",children:n.map((l,a)=>e.jsx("div",{className:"overflow-hidden",children:e.jsx("img",{className:"w-100 lazyload","data-src":`${l.image.asset.url}?auto=format&w=640&h=640&crop=center&fit=crop`,src:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",alt:f("text_decorative_photo")})},`imageFeed-${a}`))})]})};var Fe={},Gt;function fo(){if(Gt)return Fe;Gt=1,Fe.match=a,Fe.parse=i;var t=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,s=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,n=/^(?:(min|max)-)?(.+)/,o=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(w,h){return i(w).some(function(p){var m=p.inverse,g=p.type==="all"||h.type===p.type;if(g&&m||!(g||m))return!1;var y=p.expressions.every(function(u){var j=u.feature,_=u.modifier,k=u.value,$=h[j];if(!$)return!1;switch(j){case"orientation":case"scan":return $.toLowerCase()===k.toLowerCase();case"width":case"height":case"device-width":case"device-height":k=c(k),$=c($);break;case"resolution":k=d(k),$=d($);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":k=r(k),$=r($);break;case"grid":case"color":case"color-index":case"monochrome":k=parseInt(k,10)||1,$=parseInt($,10)||0;break}switch(_){case"min":return $>=k;case"max":return $<=k;default:return $===k}});return y&&!m||!y&&m})}function i(w){return w.split(",").map(function(h){h=h.trim();var p=h.match(t),m=p[1],g=p[2],y=p[3]||"",u={};return u.inverse=!!m&&m.toLowerCase()==="not",u.type=g?g.toLowerCase():"all",y=y.match(/\([^\)]+\)/g)||[],u.expressions=y.map(function(j){var _=j.match(s),k=_[1].toLowerCase().match(n);return{modifier:k[1],feature:k[2],value:_[2]}}),u})}function r(w){var h=Number(w),p;return h||(p=w.match(/^(\d+)\s*\/\s*(\d+)$/),h=p[1]/p[2]),h}function d(w){var h=parseFloat(w),p=String(w).match(l)[1];switch(p){case"dpcm":return h/2.54;case"dppx":return h*96;default:return h}}
vendor: 1,724 bytes, line 4
4function c(w){var h=parseFloat(w),p=String(w).match(o)[1];switch(p){case"em":return h*16;case"rem":return h*16;case"cm":return h*96/2.54;case"mm":return h*96/2.54/10;case"in":return h*96;case"pt":return h*72;case"pc":return h*72/12;default:return h}}return Fe}var rt,Ot;function go(){if(Ot)return rt;Ot=1;var t=fo().match,s=typeof window<"u"?window.matchMedia:null;function n(l,a,i){var r=this,d;s&&!i&&(d=s.call(window,l)),d?(this.matches=d.matches,this.media=d.media,d.addListener(h)):(this.matches=t(l,a),this.media=l),this.addListener=c,this.removeListener=w,this.dispose=p;function c(m){d&&d.addListener(m)}function w(m){d&&d.removeListener(m)}function h(m){r.matches=m.matches,r.media=m.media}function p(){d&&d.removeListener(h)}}function o(l,a,i){return new n(l,a,i)}return rt=o,rt}var xo=go();const _o=ys(xo);var wo=/[A-Z]/g,bo=/^ms-/,at={};function yo(t){return"-"+t.toLowerCase()}function ps(t){if(at.hasOwnProperty(t))return at[t];var s=t.replace(wo,yo);return at[t]=bo.test(s)?"-"+s:s}function jo(t,s){if(t===s)return!0;if(!t||!s)return!1;const n=Object.keys(t),o=Object.keys(s),l=n.length;if(o.length!==l)return!1;for(let a=0;a<l;a++){const i=n[a];if(t[i]!==s[i]||!Object.prototype.hasOwnProperty.call(s,i))return!1}return!0}const le=Q.oneOfType([Q.string,Q.number]),vt={all:Q.bool,grid:Q.bool,aural:Q.bool,braille:Q.bool,handheld:Q.bool,print:Q.bool,projection:Q.bool,screen:Q.bool,tty:Q.bool,tv:Q.bool,embossed:Q.bool},ms={orientation:Q.oneOf(["portrait","landscape"]),scan:Q.oneOf(["progressive","interlace"]),aspectRatio:Q.string,deviceAspectRatio:Q.string,height:le,deviceHeight:le,width:le,deviceWidth:le,color:Q.bool,colorIndex:Q.bool,monochrome:Q.bool,resolution:le,type:Object.keys(vt)},{type:ll,...ko}
4=ms,hs={minAspectRatio:Q.string,maxAspectRatio:Q.string,minDeviceAspectRatio:Q.string,maxDeviceAspectRatio:Q.string,minHeight:le,maxHeight:le,minDeviceHeight:le,maxDeviceHeight:le,minWidth:le,maxWidth:le,minDeviceWidth:le,maxDeviceWidth:le,minColor:Q.number,maxColor:Q.number,minColorIndex:Q.number,maxColorIndex:Q.number,minMonochrome:Q.number,maxMonochrome:Q.number,minResolution:le,maxResolution:le,...ko},vo={...vt,...hs};var So={all:vo,types:vt,matchers:ms,features:hs};const Ao=t=>`not ${t}`,Co=(t,s)=>{const n=ps(t);return typeof s=="number"&&(s=`${s}px`),s===!0?n:s===!1?Ao(n):`(${n}: ${s})`},Po=t=>t.join(" and "),No=t=>{const s=[];return Object.keys(So.all).forEach(n=>{const o=t[n];o!=null&&s.push(Co(n,o))}),Po(s)},Mo=b.createContext(void 0),$o=t=>t.query||No(t),qt=t=>t?Object.keys(t).reduce((n,o)=>(n[ps(o)]=t[o],n),{}):void 0,fs=()=>{const t=b.useRef(!1);return b.useEffect(()=>{t.current=!0},[]),t.current},To=t=>{const s=b.useContext(Mo),n=()=>qt(t)||qt(s),[o,l]=b.useState(n);return b.useEffect(()=>{const a=n();jo(o,a)||l(a)},[t,s]),o},Eo=t=>{const s=()=>$o(t),[n,o]=b.useState(s);return b.useEffect(()=>{const l=s();n!==l&&o(l)},[t]),n},Lo=(t,s)=>{const n=()=>_o(t,s||{},!!s),[o,l]=b.useState(n),a=fs();return b.useEffect(()=>{if(a){const i=n();return l(i),()=>{i&&i.dispose()}}},[t,s]),o},Io=t=>{const[s,n]=b.useState(t.matches);return b.useEffect(()=>{const o=l=>{n(l.matches)};return t.addListener(o),n(t.matches),()=>{t.removeListener(o)}},[t]),s},Ho=(t,s,n)=>{const o=To(s),l=Eo(t);if(!l)throw new Error("Invalid or missing MediaQuery!");const a=Lo(l,o),i=Io(a),r=fs();return b.useEffect(()=>{r&&n&&n(i)},[i]),b.useEffect(()=>()=>{a&&a.dispose()},[]),i},Rt=({children:t,device:s,onChange:n,...o})=>{const l=Ho(o,s,n);return typeof t=="function"?t(l):l?t:null},Go=({alt:t,image:s,text:n})=>e.jsx("span",{className:"d-block mt-n2 pb-1",children:e.jsxs("button",{className:"product__info--button border-0 p-0 bg-transparent cursor-pointer text-left",onClick:()=>MicroModal.show("modal-image",{onShow:function(o){F("Product Popup","More information image",n);const l=o.querySelector(".modal__image");l.src=s,l.alt=t},onClose:function(o,l,a){const i=o.querySelector(".modal__image");i.src=s,i.alt=t,a.preventDefault(),a.stopPropagation()},awaitCloseAnimation:!0}),children:[n,e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-2.033 16.01c.564-1.789 1.632-3.932 1.821-4.474.273-.787-.211-1.136-1.74.209l-.34-.64c1.744-1.897 5.335-2.326 4.113.613-.763 1.835-1.309 3.074-1.621 4.03-.455 1.393.694.828 1.819-.211.153.25.203.331.356.619-2.498 2.378-5.271 2.588-4.408-.146zm4.742-8.169c-.532.453-1.32.443-1.761-.022-.441-.465-.367-1.208.164-1.661.532-.453 1.32-.442 1.761.022.439.466.367 1.209-.164 1.661z"})})]})}),Oo=()=>{if(!window.prop65)return null;const{icon:t,text:s,cta:n,link:o}=window.prop65;return e.jsxs("div",{className:"prop65 mt-5",children:[t&&e.jsx("img",{className:"border-0 d-inline-block align-top mr-1",src:t,alt:f("text_decorative_photo")}),s&&e.jsx("span",{dangerouslySetInnerHTML:{__html:s}}),n&&o&&e.jsxs(e.Fragment,{children:[" -"," ",e.jsx("a",{href:o,children:n})]})]})},qo=()=>{const[t,s]=b.useState(!0),[n,o]=b.useState(null),[l,a]=b.useState(!0);return b.useEffect(()=>{(async()=>{const r=document.querySelector(".js-yotpo-product"),{yotpoid:d}=r.dataset;let c="https://staticw2.yotpo.com/batch?";const w={methods:[{method:"badge",params:{}}],app_key:d};fetch(c,{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Origin:window.location.host},referrer:window.location.host,body:JSON.stringify(w)}).then(h=>{h.status===200&&h.json().then(p=>{const m=p[0].result,g=document.createRange().createContextualFragment(m),y=g.querySelector(".y-badge-reviews").innerText,u=g.querySelector(".y-badge-stars .sr-only").innerText.replace(" star rating","");s(!1),o(y),a(u)})}).catch(function(h){console.log("YotPo fetch error:",h)})})()},[]),t?null:e.jsxs("div",{style:{maxWidth:"200px"},children:[e.jsx("h6",{className:"text-uppercase text-center",style:{marginBottom:"18px"},children:f("yotpo_total_site_reviews")}),e.jsx("div",{id:"y-badges",className:"ml-auto yotpo yotpo-badge yotpo-small w-100","data-key":"5RBqz0tAlFdtcPso78diYDegHml92lo9Jr4jAiIm",children:e.jsxs("div",{className:"y-badge yotpo-display-wrapper",children:[e.jsx("div",{className:"y-badge-reviews",children:n}),e.jsxs("span",{className:"y-badge-stars",children:[e.jsx("div",{className:"review__stars--score",style:{"--percent":`${l*20}%`}}),e.jsxs("span",{className:"sr-only",children:[l," ",f("yotpo_star_rating")]})]}),e.jsx("div",{className:"y-badges-certified d-none",children:f("yotpo_certified_reviews")}),e.jsx("div",{className:"y-powered-by mt-2",children:"Powered by YOTPO"})]})})]})},Je={marks:{imageFiles:({value:t})=>e.jsx("img",{src:t.url,alt:t.alt}),link:({value:t,children:s})=>{const{url:n}=t;return e.jsx("a",{href:n,children:s})},moreInfoPopup:({value:t})=>{let s=t._ref;Shopify.locale!="en"&&(s=`i18n.${t._ref}.${Shopify.locale}`),t._ref=="ac884ca2-044d-4ab6-9042-5bf5ef10179c"&&Shopify.shop=="quadlockcase-jp.myshopify.com"&&(s=`i18n.${t._ref}.en-PH`),["c1f09d1d-c231-4221-ab6a-44cb387857ef","11d51efa-0704-4cfa-86bc-d172d1ec901c"].includes(t._ref)&&Shopify.shop=="quadlockcase.myshopify.com"&&(s=`i18n.${t._ref}.en-US`),t._ref=="ac884ca2-044d-4ab6-9042-5bf5ef10179c"&&Shopify.shop=="quadlockcase-ca.myshopify.com"&&Shopify.locale=="fr"&&(s=`i18n.${t._ref}.fr-CA`);const n=window.sanityReplacements.filter(o=>o._id==s)[0];return n?e.jsx(Go,{alt:n.imageAltText,image:n.imageFilesUrl,text:n.buttonText}):null},sup:({children:t})=>e.jsx("sup",{children:t})},types:{html:({value:t})=>e.jsx("div",{dangerouslySetInnerHTML:{__html:t.body}}),span:({value:t})=>e.jsx("p",{children:t.text}),accordion:({value:t})=>e.jsxs("details",{className:`mb-1 js-accordion-${us(t.accordion_heading)}`,children:[e.jsx("summary",{className:"position-relative",children:e.jsx("h6",{className:"d-inline text-uppercase",children:t.accordion_heading})}),e.jsx("div",{className:"product__info--accordion",children:e.jsx(Ue,{value:t.blocks,components:Je})})]})}},ct=({text:t,showFootnote:s,dataFootnote:n,showProp65:o})=>e.jsxs(e.Fragment,{children:[t&&e.jsx(Ue,{value:t,components:Je}),s&&n&&e.jsx("div",{className:"product__info--footnote p-3",children:e.jsx(Ue,{value:n.text,components:Je})}),o&&e.jsx(Oo,{})]}),dt=({image:t,subtitle:s,title:n,alt:o})=>e.jsxs("div",{className:"col-md-5 m-0 double-heading text-right",children:[t&&e.jsx("img",{"data-src":`${t}?auto=format`,className:"product__info--image w-100 border-0 lazyload",alt:o,src:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}),s&&e.jsx("p",{className:"text-uppercase font-family-gotham mx-0 pt-2",children:s}),n&&e.jsx("h4",{className:"text-uppercase mx-0",children:n})]});class Ro extends ee.PureComponent{constructor(s){super(s),this.handleClick=n=>{const{showMore:o}=this.state;D("MoreInfo_ReadMore"),this.setState({showMore:!o})},this.state={showMore:!1}}
4render(){const{index:s,isActive:n,text:o,image:l,subtitle:a,tabTitle:i,title:r,alt:d,tabsLength:c,dataFootnote:w}=this.props,{showMore:h}=this.state;let p=null;try{p=localStorage&&localStorage.getItem("geolocationData")?JSON.parse(localStorage.getItem("geolocationData")):null}catch(y){console.error("localStorage error:",y)}let m=s===0&&p&&p.country==="US"&&p.region_code==="CA";const g=["compatibility","description","tech_specs","whats_included","wireless_charging"].includes(i);if(s===0){let y=o[0];const u=o.slice(1);return e.jsxs(e.Fragment,{children:[e.jsx(Rt,{minWidth:768,children:e.jsxs("div",{className:`row ${n?"":"d-none"}`,children:[e.jsx("div",{className:`col-md-6 mb-4 mb-md-0 pt-4 ${c>1?"mt-md-2":""}`,children:e.jsx(ct,{text:o,showFootnote:g,dataFootnote:w,showProp65:m})}),e.jsx("div",{className:"col-md-1"}),e.jsx(dt,{image:l,subtitle:a,title:r,alt:d})]})}),e.jsx(Rt,{maxWidth:767,children:e.jsxs("div",{className:`row ${n?"":"d-none"}`,children:[e.jsxs("div",{className:`col-md-6 mb-4 mb-md-0 pt-4 ${c>1?"mt-md-2":""}`,children:[e.jsxs("div",{className:`text__readmore--${h} ${h?"":"mb-4"}`,children:[o&&e.jsx(Ue,{value:y,components:Je}),e.jsxs("button",{className:`font-family-gotham cursor-pointer btn btn--content ${h?"d-none":"d-inline"} btn p-0 w-auto`,onClick:()=>{this.handleClick()},children:[" ",f("reviews_more"),e.jsxs("svg",{className:"d-inline-block",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#005FBE",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),e.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"})]})]})]}),e.jsx("div",{className:`${h?"d-block":"d-none"}`,children:e.jsx(ct,{text:u,showFootnote:g,dataFootnote:w,showProp65:m})})]}),e.jsx("div",{className:"col-md-1"}),h?e.jsx(dt,{image:l,subtitle:a,title:r,alt:d}):e.jsx("div",{className:"col-md-5 m-0 double-heading product__info--yotpo d-flex align-items-center justify-content-center",children:e.jsx(qo,{})})]})})]})}return e.jsxs("div",{className:`row ${n?"":"d-none"}`,children:[e.jsxs("div",{className:`col-md-6 mb-4 mb-md-0 pt-4 ${c>1?"mt-md-2":""}`,children:[i==="compatibility"&&["cycle-power-cables","cycle-waterproof-wireless-charging-head"].includes(window.location.pathname.split("/products/")[1])&&e.jsxs("button",{className:"info-block info-block--selector d-flex align-items-center justify-content-center justify-content-md-start text-uppercase position-relative",onClick:()=>{var y;(y=document.querySelector("#js-button-ebike-charging"))==null||y.click()},children:[e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:e.jsx("path",{d:"M12 0c6.623 0 12 5.377 12 12s-5.377 12-12 12S0 18.623 0 12 5.377 0 12 0zm0 1c6.071 0 11 4.929 11 11s-4.929 11-11 11S1 18.071 1 12 5.929 1 12 1zm.053 17a.844.844 0 100-1.689.844.844 0 000 1.689zm.468-2.822h-.998c-.035-1.162.182-2.054.939-2.943.491-.57 1.607-1.479 1.945-2.058C15.129 8.948 14.484 7 12.136 7c-1.439 0-2.615.877-2.928 2.507L8.19 9.405C8.47 7.169 10.148 6 12.112 6c1.964 0 3.615 1.25 3.615 3.22 0 1.806-1.826 2.782-2.638 3.868-.422.563-.555 1.377-.568 2.09z"})}),e.jsx("span",{className:"font-family-gotham ml-2 w-md-100",children:f("popup_ebike_suitability")})]}),e.jsx(ct,{text:o,showFootnote:g,dataFootnote:w,showProp65:m}),i==="compatibility"&&window.location.pathname.includes("stem-cap-mount")&&e.jsxs("button",{className:"info-block info-block--selector d-flex align-items-center justify-content-center justify-content-md-start text-uppercase position-relative",onClick:()=>{var y;(y=document.querySelector("#js-button-stem-cap-mount-compatibility"))==null||y.click()},children:[e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:e.jsx("path",{d:"M12 0c6.623 0 12 5.377 12 12s-5.377 12-12 12S0 18.623 0 12 5.377 0 12 0zm0 1c6.071 0 11 4.929 11 11s-4.929 11-11 11S1 18.071 1 12 5.929 1 12 1zm.053 17a.844.844 0 100-1.689.844.844 0 000 1.689zm.468-2.822h-.998c-.035-1.162.182-2.054.939-2.943.491-.57 1.607-1.479 1.945-2.058C15.129 8.948 14.484 7 12.136 7c-1.439 0-2.615.877-2.928 2.507L8.19 9.405C8.47 7.169 10.148 6 12.112 6c1.964 0 3.615 1.25 3.615 3.22 0 1.806-1.826 2.782-2.638 3.868-.422.563-.555 1.377-.568 2.09z"})}),e.jsx("span",{className:"font-family-gotham ml-2 w-md-100",children:f("stem_suit_button")})]})]}),e.jsx("div",{className:"col-md-1"}
4),e.jsx(dt,{image:l,subtitle:a,title:r,alt:d})]})}}class Bo extends ee.PureComponent{constructor(s){super(s),this.handleClick=n=>{const{index:o,isActive:l,text:a}=this.props;l||(F("Product","More information",this.getTranslatedVersion(a)),D("MoreInfoTab"),this.props.onTabClick(o))},this.getTranslatedVersion=n=>f(`tab_${n}`)?f(`tab_${n}`):n}render(){const{index:s,isActive:n,text:o}=this.props;return e.jsx("li",{children:e.jsx("button",{id:`tab-${s+1}`,className:`font-family-gotham d-flex justify-content-center align-items-center text-center w-100 text-uppercase ${n?"is-active":""}`,onClick:()=>{this.handleClick()},children:this.getTranslatedVersion(o)})})}}const ut=(t,s)=>{let n=window.sanityReplacements.filter(i=>i._id.includes(t)&&!i._id.includes("drafts")),o="en-AU";window.Shopify.shop=="quadlockcase-jp.myshopify.com"?o="en-PH":window.Shopify.shop=="quadlockcase-ca.myshopify.com"?o="en-CA":window.Shopify.shop=="quadlockcase-eu.myshopify.com"?o="en-IE":window.Shopify.shop=="quadlockcase-uk.myshopify.com"?o="en-GB":window.Shopify.shop=="quadlockcase.myshopify.com"&&(o="en-US"),Shopify.locale!="en"&&(o=Shopify.locale);let l=n.filter(i=>i._id.includes(`.${o}`));if(window.Shopify.shop=="quadlockcase-ca.myshopify.com"&&Shopify.locale=="fr"){let i=n.filter(r=>r._id.includes(".fr-CA"));i.length>0&&(l[0]=i[0])}if(window.Shopify.shop=="quadlockcase.myshopify.com"&&Shopify.locale=="es"){let i=n.filter(r=>r._id.includes(".es-MX"));i.length>0&&(l[0]=i[0])}let a=l.length>0?l[0]:n[0];return a?s?a.text_blocks:{blocks:a.text_blocks||[a],accordion_heading:a.accordion_heading}:null},Bt=t=>{const s=[];t.forEach(a=>{if(a.markDefs&&a.markDefs[0]&&["reusableText","moreinfo"].includes(a.markDefs[0]._type)){const i=ut(a.markDefs[0]._ref,!1);i&&!i.accordion_heading&&i.blocks.length>0?i.blocks.forEach(r=>{if(r.markDefs&&r.markDefs[0]&&["reusableText","moreinfo"].includes(r.markDefs[0]._type)){const d=ut(r.markDefs[0]._ref,!1);d&&!d.accordion_heading&&d.blocks.length>0?d.blocks.forEach(c=>{s.push(c)}):s.push(d)}else s.push(r)}):i&&(i.blocks.map(r=>{r.markDefs&&r.markDefs[0]&&["reusableText","moreinfo"].includes(r.markDefs[0]._type)&&(r.children=ut(r.markDefs[0]._ref,!0))}),s.push(i))}else s.push(a)});const o=s.filter(a=>a.accordion_heading!==void 0).length>2,l=[];return s.forEach(a=>{a.accordion_heading?o?l.push({_type:"accordion",...a}):(l.push({_type:"block",style:"h6",_key:We(),children:[{_type:"span",marks:[],text:a.accordion_heading,_key:We()}]}),a.blocks.forEach(i=>{l.push(i)})):l.push(a)}),l.forEach(a=>{a.body&&(a._type="html")}),l};class Vo extends ee.PureComponent{constructor(s){super(s),this.onTabClick=l=>{this.setState({activeTab:l})};let n=this.props.data.find(l=>l.title=="footnote");n&&(n.text=Bt(n.text));let o=this.props.data.filter(l=>l.title!="footnote");o.forEach(l=>{l.text=Bt(l.text)}),this.state={activeTab:0,dataFootnote:n,dataTabs:o}}componentDidMount(){const{data:s}=this.props;if(window.location.search.indexOf("information")>-1){let o=new URLSearchParams(document.location.search.substring(1)).get("information").replace("-","_"),l=s.findIndex(a=>a.title==o);l>-1&&(this.setState({activeTab:l}),setTimeout(()=>{xt(document.querySelector(".product__info"))},250))}}render(){const{data:s}=this.props,{activeTab:n,dataFootnote:o,dataTabs:l}=this.state;return e.jsx("div",{className:"product__info mt-1 mb-3 mb-md-5 pt-3 pt-sm-4 pt-md-5 pb-3 pb-md-5",children:e.jsx("div",{className:"container pt-0 pt-md-4",children:e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col-lg-1"}),e.jsxs("div",{className:"col-md-12 col-lg-10",children:[e.jsxs("div",{className:"double-heading text-center text-md-left",children:[e.jsx("p",{className:"text-uppercase font-family-gotham mx-0 pt-0",children:f("buy_more_info_subtitle")}),e.jsx("h4",{className:"text-uppercase mx-0",children:f("buy_more_info_title")})]}),e.jsxs("div",{children:[e.jsx("div",{className:"product__info--tabs col-md-6 p-0",children:e.jsx("ul",{className:`js-tabs text-uppercase m-0 p-0 d-flex flex-wrap tabs-${l.length}`,children:l.length>1&&l.map((a,i)=>e.jsx(Bo,{isActive:n==i,text:a.title,index:i,onTabClick:this.onTabClick},`moreInfoTab-${i}`))})}),e.jsx("div",{className:"w-100",children:l.map((a,i)=>e.jsx(Ro,{isActive:n==i,index:i,text:a.text,tabTitle:a.title,image:a.imageFilesUrl,subtitle:a.imageSubtitle,title:a.imageTitle,alt:a.imageAltText,tabsLength:s.length,dataFootnote:o},`moreInfoContent-${i}`))})]})]}),e.jsx("div",{className:"col-lg-1"})]})})})}}class Do extends ee.PureComponent{constructor(s){super(s),this.handleClick=n=>{const{showMore:o}=this.state;this.setState({showMore:!o})},this.cleanText=n=>n&&n.replace(new RegExp("&#x27;","g"),"'").replace(new RegExp("&quot;","g"),"'").replace(new RegExp("&amp;","g"),"&"),this.state={showMore:!1}}render(){const{review:s}=this.props,{showMore:n}=this.state;if(!s)return null;const o=100/5*s.score+"%",l=this.cleanText(s.content);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"row",children:[s.user&&s.user.display_name&&e.jsx("div",{className:"col-6",children:e.jsx("div",{className:"text-uppercase truncate-single",children:s.user.display_name})}),s.verified_buyer&&e.jsx("div",{className:"col-6 text-right text-uppercase",children:e.jsx("p",{className:"review__verify m-0",children:f("reviews_verified")})})]}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col-6 review__carousel--rating",children:e.jsx("div",{className:"review__stars--score",style:{"--percent":o}})}),e.jsx("div",{className:"col-6 text-right",children:e.jsx("div",{className:"review__date",children:new Date(s.created_at).toLocaleDateString()})})]}),e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-12",children:e.jsx("div",{className:"text-initial mt-2 mb-2",children:this.cleanText(s.title)})})}),e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-12",children:e.jsx("div",{className:"review__text font-family-gotham-book",children:l.length>160?e.jsx(e.Fragment,{children:n?e.jsxs(e.Fragment,{children:[e.jsx("p",{children:l}),e.jsx("button",{className:"font-family-gotham cursor-pointer btn--text",onClick:()=>{this.handleClick()},children:f("reviews_less")})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{children:l.substring(0,160).trim()+"..."}),e.jsx("button",{className:"font-family-gotham cursor-pointer btn--text",onClick:()=>{this.handleClick()},children:f("reviews_more")})]})}):e.jsx("p",{children:l})})})})]})}}class Fo extends ee.PureComponent{constructor(s){super(s),this.reviewsRef=ee.createRef()}render(){const{data:s}=this.props;return e.jsx(Ut,{className:"splide__product splide__react",ref:this.reviewsRef,onMounted:()=>{setTimeout(()=>{s.length<6&&window.innerWidth>1860?s.length<4?this.reviewsRef.current.splide.go(1):this.reviewsRef.current.splide.go(2):s.length<4&&window.innerWidth>1300&&this.reviewsRef.current.splide.go(1)},100)},options:{focus:s.length>5?0:"center",perPage:6,perMove:1,padding:10,gap:"10px",trimspace:"move",type:s.length>5?"loop":"slide",arrows:!0,pagination:!1,speed:200,drag:"free",snap:!0,flickMaxPages:0,flickPower:200,breakpoints:{1860:{focus:s.length>3?0:"center",perPage:4,padding:45},1300:{focus:s.length>1?0:"center",perPage:3,padding:45},640:{focus:"center",perPage:1,padding:45}}},children:s.map((n,o)=>e.jsx(zt,{className:"review__slide font-family-gotham",children:e.jsx(Do,{review:n})},`review-${o}`))},We())}}class Qo extends ee.PureComponent{constructor(s){super(s),this.numberWithCommas=n=>n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),this.handleClick=()=>{const{thisStar:n}=this.props;F("Product","Reviews",`Stars - ${n}`),D("ReviewsStar"),this.props.onClick(n)}}render(){const{currentStar:s,data:n,thisStar:o,total:l}=this.props,a=100/5*o+"%",i=n[o],r=i/l*100+"%";return e.jsxs("button",{className:`js-star-button d-block w-100 cursor-pointer btn--text text-left ${s===o?"star--selected":""}`,onClick:this.handleClick,children:[e.jsx("span",{className:"review__stars--score",style:{"--percent":a}}),e.jsxs("span",{className:"review__bars--numbers",children:["(",this.numberWithCommas(i),")"]}),e.jsx("span",{className:"review__bars--progress",children:e.jsx("span",{style:{width:r}})})]})}}const Wo=t=>t.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),Uo=async(t,s,n)=>{const l=s.split(",").map(i=>i.trim()).map(async i=>{try{const r=await fetch(`https://api.yotpo.com/v1/widget/${t}/products/${i}/reviews.json?per_page=51${n?`&star=${n}`:""}`,{credentials:"omit"});if(!r.ok)throw new Error(`Failed to fetch ID ${i}: ${r.status}`);return await r.json()}catch(r){return console.error(`Error fetching ID ${i}:`,r),null}});return await Promise.all(l)},zo=({setYotPo:t})=>{const[s,n]=b.useState(null),[o,l]=b.useState(null),[a,i]=b.useState(!0),[r,d
4]=b.useState(null);async function c(){i(!0);const m=document.querySelector(".js-yotpo-product"),{reviewsid:g,yotpoid:y}=m.dataset;await Uo(y,g,o).then(u=>{const j=[],_={1:0,2:0,3:0,4:0,5:0};u.forEach(A=>{var G,C,E;const I=(C=(G=A.response)==null?void 0:G.bottomline)==null?void 0:C.star_distribution;if(I)for(let N=1;N<=5;N++)_[N]=_[N]+I[N];(E=A.response)!=null&&E.reviews&&A.response.reviews.forEach(N=>{j.push(N)})});let k=0,$=0;for(let A=1;A<=5;A++)k+=_[A],$+=A*_[A];const S=j.sort((A,I)=>new Date(I.created_at)-new Date(A.created_at));i(!1),o||(n(_),t({average_score:$/k,total_review:k})),d(S.slice(0,25))})}if(b.useEffect(()=>{c()},[]),b.useEffect(()=>{c()},[o]),a)return e.jsx(Kt,{height:"274px",location:"reviews"});if(!s)return null;const w=[5,4,3,2,1],h=Object.values(s).reduce((m,g)=>m+g,0),p=o?s[o]:h;return h===0?null:e.jsxs("div",{className:"review__carousel my-4 my-md-6 mx-auto",children:[e.jsx("div",{className:"review__carousel--product",children:e.jsx("div",{className:"container mb-4 mb-md-5",children:e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col review__carousel--left",children:e.jsx("div",{className:"review__bars",children:w.map((m,g)=>e.jsx(Qo,{currentStar:o,data:s,thisStar:m,total:h,onClick:()=>l(m)},`star-score-${g}`))})}),e.jsx("div",{className:"col review__carousel--right",children:e.jsxs("div",{className:"double-heading text-center",children:[e.jsx("p",{className:"text-uppercase font-family-gotham pt-0",children:f("reviews_subtitle")}),e.jsx("h4",{className:"review_count text-uppercase",children:e.jsxs(e.Fragment,{children:[Wo(p),o!=null&&e.jsx("span",{className:"ml-1 review__stars--score review__stars--single","data-stars":"\u2605".repeat(o)})," ",p==1?f("reviews_p_single"):f("reviews_p_plural")]})})]})})]})})}),r&&e.jsx(Fo,{data:r,activeRating:o})]})},Ko=({product:t,setYotPo:s})=>e.jsx("div",{id:"jump-to-reviews",className:"aa-test-reviews",children:e.jsx(zo,{setYotPo:s,product:t})}),Yo=({ambassadorCategory:t,feedCategory:s,moreInfo:n,show360callout:o,setYotPo:l,slides:a,howToVideos:i,product:r,highlights:d})=>{const[c,w]=b.useState(null);b.useEffect(()=>{h(a)},[a]);const h=y=>{let u={...y.find(j=>j.video!==null)};w(u)},p=document.querySelector("[data-sanity-ambassadors-json]");let m=p?JSON.parse(p.innerText):[];t&&m!=[]&&(m=m[t]);const g=["cycle","motorcycle","car","offroad","truck","everyday","run","golf","photography"];return e.jsxs(e.Fragment,{children:[d&&e.jsx(te,{location:"productInfo: highlights",showError:"false",children:e.jsx(uo,{data:d,subtitle:r.title})}),e.jsx(te,{location:"productInfo: moreInfo",showError:"false",children:n&&n.length>0&&e.jsx(Vo,{data:n})}),e.jsx(te,{location:"productInfo: yotPo",showError:"false",children:e.jsx(Ko,{product:r,setYotPo:l})}),m&&g.includes(t)&&e.jsx(te,{location:"productInfo: ambassadorQuote",showError:"false",children:e.jsx(Is,{data:m.slice(0,6),category:t})}),e.jsx(te,{location:"productInfo",showError:"false",children:o&&e.jsx("div",{className:"container mt-4 mb-5",children:e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-12",children:e.jsx(co,{product:r})})})})}),e.jsx("div",{className:"pt-2 pt-md-5",children:"\xA0"}),e.jsx(te,{location:"productInfo: salesVideo",showError:"false",children:c&&c.video&&e.jsx("div",{className:"aa-test-video-bottom product__video col-xl-6 mx-auto d-flex mt-n3 mt-md-n4 mb-3 mb-md-5",children:e.jsx(Wt,{src:c.image,alt:c.alt,video:c.video,showBFCM:!1,page:"Product",location:"Sales",length:c.length,isSalesBottom:!0})})}),e.jsx(te,{location:"productInfo: imageFeed",showError:"false",children:e.jsx(ho,{feed:s})}),e.jsx(te,{location:"productInfo: howTo",showError:"true",children:i&&i.length>0&&e.jsx(mo,{data:i})})]})},Vt=t=>{const s=["Case","Poncho","Universal Adaptor"];return t.tags.includes("360")&&!s.some(n=>t.title.includes(n))},Jo=({option1:t,option2:s,option3:n,option4:o,freeGWP:l,bundlePrice
4s:a,product:i,selectedAdVariant:r,productType:d})=>{var M;const[c,w]=b.useState(!0),[h,p]=b.useState(null),[m,g]=b.useState([]),[y,u]=b.useState([]),[j,_]=b.useState([]),[k,$]=b.useState(null),[S,A]=b.useState(null),[I,G]=b.useState(null),[C,E]=b.useState({}),[N,H]=b.useState({}),R=i.handle,T=P=>{let O=Shopify.shop==="quad-lock-dev.myshopify.com"?{average_score:4.8,total_review:15878}:P;A(O)},v=(P,O)=>{window.sanityReplacements=O;let V={};const ce=["optionalExtras","optionalExtrasMag","optionalExtrasOtherHandles","optionalExtrasOtherTitle","optionalExtrasAirPodsHandles","optionalExtrasAirPodsTitle","optionalExtraMultipleConfig","gallery","feedCategory","ambassadorCategory","howToVideos","sales_video_url","sales_video_length","callout","highlights"];for(const W of ce)P[W]&&(V[W]=P[W]);P.dropdownTexts&&(window.dropdownTexts=window.dropdownTexts||[],P.dropdownTexts.forEach(W=>{window.dropdownTexts.push(W)})),P.extraOptionalConfiguration&&(V.extraOptional=P.extraOptionalConfiguration),P.moreInfoContent&&(V.moreInfo=P.moreInfoContent);let Z=[],Y={};if(V.gallery&&Object.keys(V.gallery).length>0&&V.gallery.forEach((W,ue)=>{W.url&&(Z.push({image:W.url,video:ue==0?V.sales_video_url:null,length:ue==0?V.sales_video_length:null,alt:W.alt,overlay:W.overlay,mount:W.mount,filter:W.filter}),W.filter&&!Y[W.filter]&&(Y[W.filter]=W.filterImage))}),V.highlights){const W={header:f("highlights_reviews_header"),text:f("highlights_reviews_text"),image:"https://cdn.shopify.com/s/files/1/0108/1062/files/highlights_review_slide.jpg?v=1780292234",type:"review"};V.highlights.splice(1,0,W)}w(!1),p(Z),g(Y),$(V)};return b.useEffect(()=>{var W,ue,ve;async function P(){let L=null;const B=document.querySelector("[data-sanity-content-json]");B&&B.innerText.length>0?L=JSON.parse(B.innerText):Xt(`Product issue on the D2C site: ${window.location.href}. No Sanity Content`,"website-product-issues");let K=null;const me=document.querySelector("[data-sanity-reusable-json]");me&&me.innerText.length>0&&(K=JSON.parse(me.innerText)),L!==null&&v(L,K)}const O={};t&&Object.keys(t).length>0&&(O.option1=t),s&&Object.keys(s).length>0&&(O.option2=s),n&&Object.keys(n).length>0&&(O.option3=n),o&&Object.keys(o).length>0&&(O.option4=o),Object.values(O).forEach(L=>{L.products=L.products.filter(B=>!(window.geoblock&&window.geoblock.block_asia_qla_bta&&window.Shopify.shop=="quadlockcase-jp.myshopify.com"&&B.tags.includes("geo-block-asia-qla-bta"))).map(B=>(B.title=De(B.title),B.trackingTitle=B.trackingTitle.replace(/&quot;/g,'"'),R==="launch-exclusive-bike-security-bundle"&&B.handle==="iphone-case-all-devices"&&(B.optionalExtrasOther="",B.optionalExtrasOtherTitle=""),B.variants=B.variants.filter(K=>!K.sku.includes("QLBUNDLE")).filter(K=>
4K.availableForSale),B.variants.forEach(K=>{L.free_gwp&&(K.price=0),K.title=De(K.title),K.trackingTitle=K.trackingTitle.replace(/&quot;/g,'"')}),B))}),E(O),l&&l.product&&(l.product.title=De(l.product.title),l.product.variants.forEach(L=>{L.price=0,L.title=De(L.title),L.trackingTitle=L.trackingTitle.replace(/&quot;/g,'"')}),G(l));const V=((W=Object.values(O).find(L=>["mount","mount-car","mount-desk","motorcycle-all","motorcycle-mount"].includes(L.option_type)))==null?void 0:W.products.flatMap(L=>L.variants.map(B=>B.title)))||[],ce=((ue=Object.values(O).find(L=>["mount","mount-car","mount-desk","motorcycle-all","motorcycle-mount"].includes(L.option_type)))==null?void 0:ue.products.flatMap(L=>L.variants.filter(B=>B.new_show_tag===!0).map(B=>B.title)))||[],Z=["(Previous Model)","(Ancien Mod\xE8le)","(fr\xFChere Version)","(Modelo Anterior)","(Precedente Modell)"],Y=V.filter(L=>!Z.some(B=>L.includes(B)));u(Y),_(ce),H(fn(O,i,(ve=l?.product)==null?void 0:ve.handle)),document.querySelector("body").classList.add("product_kit_styling"),k||P()},[]),window.geoblock&&window.geoblock.block_asia_qla_bta&&window.Shopify.shop=="quadlockcase-jp.myshopify.com"&&i.tags.includes("geo-block-asia-qla-bta")?e.jsx(Vs,{}):c?e.jsx(Kt,{height:"100vh",location:"product"}):Object.values(C).some(P=>{var O;return(O=P.products)==null?void 0:O.some(V=>Array.isArray(V.variants)&&V.variants.length===0)})&&Object.values(C).length==1?e.jsx(Ds,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container mt-md-4 pt-md-2",children:e.jsxs("div",{className:"buy__row row mb-md-5",children:[e.jsx("div",{className:"product__gallery col-md-8",children:e.jsx(te,{location:"product2025: GallerySplit",showError:"true",children:e.jsx(Hs,{slides:h,location:"Product",product:i,hasHowTo:((M=k.howToVideos)==null?void 0:M.length)>0,galleryMounts:y,galleryFilterImages:m,mountsWithNewTag:j})})}),e.jsxs("div",{className:"buy__form col-md-4",children:[window.settings.cm_show_countdown&&e.jsx(te,{location:"product2025: SaleCountdown",showError:"false",children:e.jsx(Os,{title:f("cyber_monday_countdown"),extraClasses:"flex-column mb-3"})}),e.jsx(te,{location:"product2025: ProductHeader",showError:"false",children:e.jsx(Qs,{product:i,yotpoData:S,show360Logo:Vt(i)})}),k.callout&&e.jsx(te,{location:"product2025: Callout",showError:"false",children:e.jsx(Bs,{data:k.callout,showKitStyling:!0})}),e.jsx(te,{location:"product2025: IpProduct",showError:"false",children:e.jsx(Gs,{})}),e.jsx(te,{location:"product2025: ProductForm",showError:"true",children:e.jsx(ao,{options:C,optionalExtrasData:N,product:i,selectedAdVariant:r,productType:d,freeGWP:I,bundlePrices:a})})]})]})}),i.type!="Gift Voucher"&&e.jsx(te,{location:"product2025: ProductInfo",showError:"true",children:e.jsx(Yo,{ambassadorCategory:k.ambassadorCategory,feedCategory:k.feedCategory,moreInfo:k.moreInfo,show360callout:Vt(i),setYotPo:T,slides:h,howToVideos:k.howToVideos,product:i,highlights:k.highlights})})]})},Xo=t=>{const s=document.getElementById(t);if(s){const n=()=>{const[o,l]=b.useState(!1),[a,i]=b.useState(JSON.parse(s.dataset.option2));return b.useEffect(()=>{if(!["quadlockcase-eu.myshopify.com"].includes(Shopify.shop))return;const r=[1676229],d=setInterval(()=>{typeof window.ABTasty<"u"&&typeof window.ABTasty.eventState<"u"&&window.ABTasty.eventState.executedCampaign&&window.ABTasty.eventState.executedCampaign.status==="complete"&&window.ABTasty.eventState.executedCampaign.detail.forEach(w=>{if(r.includes(w.campaignId)){if(w.variationId!=0){const h=JSON.parse(s.dataset.option2abtest);h&&(i(h),l(!0))}clearInterval(d)}})},100),c=setTimeout(()=>{clearInterval(d)},1e3);return()=>{clearInterval(d),clearTimeout(c)}},[]),e.jsx(te,{location:"product2025: global",showError:"true",children:e.jsx(Jo,{option1:JSON.parse(s.dataset.option1),option2:a,option3:JSON.parse(s.dataset.option3),option4:JSON.parse(s.dataset.option4),freeGWP:JSON.parse(s.dataset.freegwp),bundlePrices:JSON.parse(s.dataset.bundleprices),product:JSON.parse(s.dataset.product),selectedAdVariant:JSON.parse(s.dataset.selectedadvariant),productType:s.dataset.type},o?1:0)})};js.render(e.jsx(n,{}),s)}else console.warn(`Element with id '${t}' not found. Skipping render`)};Xo("product2025-mount");
5//# sourceMappingURL=/cdn/shop/t/46/assets/product2025-T2AZpTBT.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.