PageSourceSearch

https://www.coversandall.co.uk/_next/static/chunks/6622-06243ddc212b91f0.js

js coversandall.co.uk collected 2026-09-30 06:06:30 UTC 28,147 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6622],{14503:(e,l,a)=>{a.d(l,{A:()=>_});var t=a(95155),r=a(36219),n=a(34339),s=a(74774),i=a(17447),d=a(70104),o=a(16596),c=a(74644),u=a(31182),m=a(56754),x=a(2582),v=a(32321),p=a(77821),g=a(86517),f=a(12115),y=a(47677);let _=e=>{let{cartWarrantyData:l,mutations:a,loading:_,currency:h=u.IK.USD,variant:b="mini",cartData:N}=e,{isDesktop:E}=(0,x.Q)(),j=(0,y.bT)(),{handleAssurance:w}=a,C="cart"===b,T="checkout"===b,A="mini"===b,R=(0,f.useMemo)(()=>N&&Array.isArray(N||[])?null==N?void 0:N.map(e=>{var l,a;let t=null==e||null==(l=e.cp_extra_attributes)?void 0:l.categories;return{productCategory:Array.isArray(t)?null==t?void 0:t.join(": "):"",productName:null==e||null==(a=e.product)?void 0:a.name}}):null,[N]),D=(e,l)=>{w({action:e,warrantyYearId:l});let a=A?c.Q.ADB_ASSURANCE_WARRANTY_SELECT:c.Q.ADB_PRODUCT_WARRANTY_SELECTED;e===m.UH.REMOVE&&(a=A?c.Q.ADB_ASSURANCE_WARRANTY_REMOVE:c.Q.ADB_PRODUCT_WARRANTY_REMOVED),(0,p.S)(a,{value:{yearWarranty:"".concat(l,"_Year")},...R?{products:R}:{},assurance_type:m.Am.CART},!0)};return(0,t.jsxs)(t.Fragment,{children:[_&&!A&&(0,t.jsx)(s.A,{}),(0,t.jsx)("div",{className:"rounded-lg border border-[#F3C97A] bg-yellow-50 ".concat(C?"mt-4 p-4 lg:p-6":"mb-4 gap-2 p-4 md:p-4 lg:p-4"," ").concat(T&&"!mx-0 mt-3 !mb-0 lg:!mt-0"," "),children:(null==l?void 0:l.is_warranty_applied)&&(null==l?void 0:l.warranty_applied_year_id)?(0,t.jsxs)("div",{className:(0,v.cn)("flex flex-col"),children:[(0,t.jsxs)("div",{className:(0,v.cn)("flex w-full justify-between",C?"mb-2":"mb-1 flex"),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 lg:flex-row lg:items-center",children:[(0,t.jsx)(n.CDNImage,{src:"/images/icons/cart-assurance-new.png",alt:"assurance",width:E?150:120,height:E?15:12,className:"object-contain"}),C&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"bg-secondary-100 hidden h-4 w-0.25 lg:flex"}),(0,t.jsx)(d.default,{variant:"body-2xs",className:"lg:text-primary-900 text-secondary mt-1 lg:mt-0 lg:text-sm",children:"End-to-end order protection, including shipping."})]})]}),(0,t.jsxs)(d.default,{variant:"body-3xl",className:"text-primary-900 text-base font-semibold",style:{fontSize:j?"14px":void 0},children:[h,Number((null==l?void 0:l.warranty_applied_year_price)||0).toFixed(2)]})]}),!C&&(0,t.jsx)(d.default,{variant:"body-2xs",className:(0,v.cn)("flex lg:text-sm",T?"lg:text-primary-900 text-secondary lg:text-sm":"md:text-primary-900 text-secondary md:mt-1 md:text-sm"),children:"End-to-end order protection, including shipping."}),(0,t.jsxs)("div",{className:"flex justify-between lg:mb-0 ".concat(C?"mb-2":"mt-2 mb-2 lg:mb-2"),children:[(0,t.jsxs)(d.default,{variant:"body-2xs",className:"text-secondary lg:text-sm",children:[(0,t.jsxs)(d.default,{variant:"body-2xs",element:"span",weight:"medium",className:"text-secondary lg:text-sm ".concat(A?"md:text-sm":"lg:text-sm"),children:["You're covered for the next"," ",1===l.warranty_applied_year_id?"".concat(null==l?void 0:l.warranty_applied_year_id," Year"):"".concat(null==l?void 0:l.warranty_applied_year_id," Years"),"."," "]})," ","Enjoy a worry-free experience."," ",C&&(0,t.jsx)(i.A,{showHeader:!1,isMiniCart:!0,mainwrapperClassname:"!z-[2000]",trigger:(0,t.jsx)("div",{className:(0,v.cn)("items-center gap-1",C?"hidden lg:flex":"hidden"),children:(0,t.jsx)(d.default,{variant:"body-2xs",className:"text-primary cursor-pointer underline lg:text-sm",children:"Learn more"})}),children:(0,t.jsx)(o.GQ,{isMiniCart:!0,data:((null==l?void 0:l.warranty_data)||[]).map(e=>({...e,assurance_price:null==e?void 0:e.warranty_price,warranty_year_id:"".concat(null==e?void 0:e.warranty_year_id)})),currency:h})})]}),C&&(0,t.jsxs)("button",{className:"text-primary hidden items-center text-xs lg:flex",onClick:()=>D(m.UH.REMOVE,null==l?void 0:l.warranty_applied_year_id),children:[(0,t.jsx)(g.u,{size:16,className:"mr-1"}),"Remove"]})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(i.A,{showHeader:!1,isMiniCart:!0,mainwrapperClassname:"!z-[2000]",trigger:(0,t.jsx)("div",{className:(0,v.cn)("flex items-center gap-1",C?"lg:hidden":"flex"),children:(0,t.jsx)(d.default,{variant:"body-2xs",className:"text-primary curs
1or-pointer underline lg:text-sm",children:"Learn more"})}),children:(0,t.jsx)(o.GQ,{isMiniCart:!0,data:((null==l?void 0:l.warranty_data)||[]).map(e=>({...e,assurance_price:null==e?void 0:e.warranty_price,warranty_year_id:"".concat(null==e?void 0:e.warranty_year_id)})),currency:h})}),(0,t.jsxs)("button",{className:(0,v.cn)("flex items-center text-xs text-gray-700",C?"lg:hidden":"flex"),onClick:()=>D(m.UH.REMOVE,null==l?void 0:l.warranty_applied_year_id),children:[(0,t.jsx)(g.u,{size:16,className:"mr-1"}),"Remove"]})]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3 ".concat(C?"flex-wrap lg:flex-row lg:items-center lg:justify-between":""),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 ".concat(A?"md:flex-row md:items-center":T?"lg:flex-col":"lg:flex-row lg:items-center"),children:[(0,t.jsx)(n.CDNImage,{src:"/images/icons/cart-assurance-new.png",alt:"assurance",width:E?120:C&&T?150:140,height:E?12:C&&T?15:14}),!A&&!T&&(0,t.jsx)("div",{className:"bg-secondary-100 hidden h-4 w-0.25 lg:flex"}),A&&(0,t.jsx)("div",{className:"bg-secondary-100 hidden h-4 w-0.25 md:flex"}),(0,t.jsx)(d.default,{variant:"body-2xs",weight:"medium",className:(0,v.cn)("flex flex-col lg:text-sm",A?"mt-1 md:mt-0 md:text-sm":T?"mt-1":"mt-1 lg:mt-0"),children:"Full coverage, including shipping"})]}),(0,t.jsxs)(d.default,{variant:"body-2xs",className:"text-secondary lg:text-sm ".concat(A?"md:text-sm":"lg:text-sm"),children:["80% customers prefer Assurance Plus for peace of mind"," ",(0,t.jsx)(i.A,{showHeader:!1,isMiniCart:!0,mainwrapperClassname:"!z-[2000]",trigger:(0,t.jsx)(d.default,{element:"span",className:"text-primary cursor-pointer underline lg:text-sm",children:"Learn more"}),children:(0,t.jsx)(o.GQ,{isMiniCart:!0,data:((null==l?void 0:l.warranty_data)||[]).map(e=>({...e,assurance_price:null==e?void 0:e.warranty_price,warranty_year_id:"".concat(null==e?void 0:e.warranty_year_id)})),currency:h})})]})]}),(0,t.jsx)("div",{className:(0,v.cn)("flex w-full items-center gap-2",C?"lg:w-auto lg:gap-3":"",T?"w-full":""),children:((null==l?void 0:l.warranty_data)||[]).map(e=>(0,t.jsxs)(r.A,{onClick:()=>D(m.UH.APPLY,null==e?void 0:e.warranty_year_id),variant:"secondary",className:(0,v.cn)("flex-1 bg-white px-0 py-2 text-xs font-medium md:text-sm",C&&"lg:flex-none lg:px-10",T&&"flex-1"),children:[e.warranty_year_label," - ",h,Number(e.warranty_price).toFixed(2)]},e.warranty_year_id))})]})})]})}},20328:(e,l,a)=>{a.d(l,{CC:()=>s,CH:()=>r,JJ:()=>n,UE:()=>t.UE}
1);var t=a(76344);function r(e){return"string"==typeof e&&t.un.includes(e)}function n(e){return"".concat(e," ").concat(1===e?"Item":"Items")}function s(e,l){let a=l>0;return e>0&&a?t.eb.Hybrid:a?t.eb.OnlyMas:t.eb.OnlyEcom}},21318:(e,l,a)=>{a.d(l,{vQ:()=>t});let t=[{title:"Benefits",points:[{text:"What’s covered:",subpoints:["Measurement or customization errors across your order.","Wrong item or configuration.","Damage during shipping and delivery.","Everyday wear and tear."]}]},{title:"Why add it",points:[{text:"Enhanced protection for your selected product/s.",subpoints:[]},{text:"Easy to add - Now or shortly after purchase.",subpoints:[]},{text:"Quick replacements - Fast, no-hassle support.",subpoints:[]}]}]},27516:(e,l,a)=>{a.d(l,{B:()=>d});var t=a(95155),r=a(12115),n=a(66261),s=a(68959),i=a(70104);function d(e){let{label:l,value:a,rows:d,triggerClassName:o="mt-1.5 ml-2 cursor-pointer",triggerAriaLabel:c="View details"}=e,[u,m]=(0,r.useState)(!1),x=(0,r.useRef)(null);return(0,s.L)(x,()=>m(!1),{enabled:u}),(0,t.jsxs)("div",{className:"relative inline-block",children:[(0,t.jsx)(n.m,{className:o,onClick:()=>m(e=>!e),"aria-label":c}),u&&(0,t.jsxs)("div",{ref:x,className:"absolute bottom-full -left-1/2 mb-2 w-[250px] translate-x-[5] rounded border border-gray-200 bg-white px-4 py-4 text-sm text-black shadow-lg",children:[(0,t.jsxs)("div",{className:"absolute -bottom-2 left-5 transform",children:[(0,t.jsx)("div",{className:"h-0 w-0 border-t-[8px] border-r-[8px] border-l-[8px] border-t-gray-200 border-r-transparent border-l-transparent"}),(0,t.jsx)("div",{className:"absolute top-0 left-1/2 h-0 w-0 -translate-x-1/2 -translate-y-[1px] transform border-t-[7px] border-r-[7px] border-l-[7px] border-t-white border-r-transparent border-l-transparent"})]}),(null!=d?d:[{label:l,value:a}]).map(e=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(i.default,{element:"span",variant:"body-sm",className:"w-60",children:e.label}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{element:"span",variant:"body-sm",weight:"medium",className:"w-40 pl-4 text-right",children:e.value}),(null==e?void 0:e.strike)&&(0,t.jsx)(i.default,{element:"span",variant:"body-xs",weight:"medium",className:"text-secondary ml-2 line-through",children:e.strike})]})]},e.label))]})]})}},28492:(e,l,a)=>{a.d(l,{A:()=>i});var t=a(12115),r=a(20063),n=a(16760),s=a(6829);function i(){let e=(0,r.usePathname)(),[l,a]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{a((()=>{let e=!!(0,s.Ri)(n.wQ.AGENT_MEASUREMENT_SESSION),l=!!(0,s.Ri)(n.wQ.AGENT_MEASUREMENT_AUTH_TOKEN);return e||l})())},[e]),l}},47849:(e,l,a)=>{a.d(l,{E:()=>i});var t=a(12115),r=a(66656),n=a(23071),s=a(50498);function i(e){let[l,a]=(0,t.useState)(null),[i,{isLoading:d}]=(0,r.Z2)(),o=async()=>{if(l&&e)try{await i({booking_id:e,guest_item_id:l.id}).unwrap(),a(null),(0,s.TL)()}catch(l){var t;let e=null==l||null==(t=l.data)?void 0:t.message;(0,n.UG)(null!=e?e:"Unable to remove item from service cart."),a(null)}};return{itemToRemove:l,handleRemoveClick:e=>{a(e)},handleConfirmRemove:o,handleCancelRemove:()=>{a(null)},isDeleting:d}}},53984:(e,l,a)=>{a.d(l,{T:()=>s});var t=a(12115),r=a(70935),n=a(50498);function s(e){var l;let[a,s]=(0,t.useState)(!1),[i,d]=(0,t.useState)(null),o=null!=(l=(0,n.ZG)())?l:null;(0,t.useEffect)(()=>s(!0),[]),(0,t.useEffect)(()=>{a&&d(o)},[a,o]),(0,t.useEffect)(()=>{let e=()=>{var e;return d(null!=(e=(0,n.ZG)())?e:null)};return window.addEventListener(r.LE,e),()=>window.removeEventListener(r.LE,e)},[]);let c=a&&(0,n.Vx)(null!=e?e:"");return{mounted:a,bookingId:i,enableMeasurementCart:c}}},66656:(e,l,a)=>{a.d(l,{Z2:()=>c,h:()=>o,rM:()=>d,uF:()=>i,uo:()=>s,wA:()=>u});var t=a(90735),r=a(49322),n=a(50498);let s=t.tb.injectEndpoints({endpoints:e=>({addMeasurementBookingCartItem:e.mutation({query:e=>{let l=(0,r.v)();return{url:"/rest/".concat(l.storeCode,"/V1/measurement/booking/cart/items"),method:"POST",body:e}},invalidatesTags:[],transformErrorResponse:(e,l)=>({data:null,message:(0,n.pQ)(null==e?void 0:e.data,"Failed to add service to cart.")})}),getMeasurementBookingCart:e.query({query:e=>{var l;let a=(0,r.v)(),t=null!=(l=e.booking_id)?l:(0,n.ZG)(),s="/rest/".concat(a.storeCode,"/V1/measurement/booking/cart");return{url:null!=t&&""!==t?"".concat(s,"?booking_id=").concat(t):s}},transformResponse(e){var l;if(null==e||"object"!=typeof e)return null;let a=Array.isArray(e.items)?e.items.map(e=>{var l;return{...e,price:Number(null!=(l=null==e?void 0:e.price)?l:0)}}):[],t=Number(null!=(l=e.grandtotal)?l:0),r=null!=e.subtotal?Number(e.subtotal):void 0,n=null!=e.tax?Number(e.tax):void 0;return{...e,items:a,grandtotal:t,subtotal:r,tax:n}},providesTags:(e,l,a)=>{var t;return[{type:"MeasurementBookingCart",id:null!=(t=a.booking_id)?t:"customer"}]},transformErrorResponse:(e,l)=>({data:null,message:(0,n.pQ)(null==e?void 0:e.data,"Failed to load service cart.")})}),mergeMeasurementBookingCart:e.mutation({query:e=>{let l=(0,r.v)();return{url:"/rest/".concat(l.storeCode,"/V1/measurement/booking/cart/merge"),method:"POST",body:e}},invalidatesTags:[],transformErrorResponse:(e,l)=>({data:null,message:(0,n.pQ)(null==e?void 0:e.data,"Failed to merge service cart.")})}),removeMeasurementBookingCartItem:e.mutation({query:e=>{let{booking_id:l,guest_item_id:a}=e,t=(0,r.v)(),n="/rest/".concat(t.storeCode,"/V1/measurement/booking/cart/items/").concat(a);return{url:"".concat(n,"?booking_id=").concat(l),method:"DELETE"}},invalidatesTags:["MeasurementBookingCart"],transformErrorResponse:(e,l)=>({data:null,message:(0,n.pQ)(null==e?void 0:e.data,"Failed to remove item from service cart.")})})})}),{useAddMeasurementBookingCartItemMutation:i,useGetMeasurementBookingCartQuery:d,useLazyGetMeasurementBookingCartQuery:o,useRemoveMeasurementBookingCartItemMutation:c,useMergeMeasurementBookingCartMutation:u}=s},68959:(e,l,a)=>{a.d(l,{L:()=>r});var t=a(12115);function r(e,l,a){var r;let n=null==(r=null==a?void 0:a.enabled)||r,s=(0,t.useRef)(l),i=(0,t.useRef)(n);s.current=l,i.current=n,(0,t.useEffect)(()=>{let l=l=>{var a,t,r;i.current&&(a=l.target,(Array.isArray(e)?e.some(e=>{var l,t;return null!=(t=null==(l=e.current)?void 0:l.contains(a))&&t}):null!=(r=null==(t=e.current)?void 0:t.contains(a))&&r)||s.current())};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[e])}},69668:(e,l,a)=>{a.d(l,{p:()=>t});let t={PDP_ADD_TO_CART:"FUNNEL_PDP_ADD_TO_CART",PDP_UPDATE_CART:"FUNNEL_PDP_UPDATE_CART",PDP_ADD_TO_QUOTE:"FUNNEL_PDP_ADD_TO_QUOTE",PDP_UPDATE_QUOTE_ITEM:"FUNNEL_PDP_UPDATE_QUOTE_ITEM",PDP_ADD_TO_ADMIN_ORDER:"FUNNEL_PDP_ADD_TO_ADMIN_ORDER",PDP_UPDATE_ADMIN_ORDER_ITEM:"FUNNEL_PDP_UPDATE_ADMIN_ORDER_ITEM",RELATED_ADD_TO_CART:"FUNNEL_RELATED_ADD_TO_CART",CART_SECURE_CHECKOUT:"FUNNEL_CART_SECURE_CHECKOUT",MINI_CART_GO_TO_CART:"FUNNEL_MINI_CART_GO_TO_CART",MINI_CART_CHECKOUT_NOW:"FUNNEL_MINI_CART_CHECKOUT_NOW",CART_LINE_DELETE:"FUNNEL_CART_LINE_DELETE",CART_LINE_EDIT:"FUNNEL_CART_LINE_EDIT",CART_QTY_DECREMENT:"FUNNEL_CART_QTY_DECREMENT",CART_QTY_INCREMENT:"FUNNEL_CART_QTY_INCREMENT",CHECKOUT_SUBMIT_PRIMARY:"FUNNEL_CHECKOUT_SUBMIT_PRIMARY",CHECKOUT_SUBMIT_MOBILE:"FUNNEL_CHECKOUT_SUBMIT_MOBILE",CHECKOUT_SUBMIT_RETRY:"FUNNEL_CHECKOUT_SUBMIT_RETRY",PDP_CTA_FALLBACK:"FUNNEL_PDP_CTA_FALLBACK"}},74656:(e,l,a)=>{a.d(l,{U6:()=>h,c3:()=>_,oW:()=>E});var t=a(95155),r=a(12115),n=a(56754),s=a(70104);a(78420),a(20180),a(1019),a(59101),a(77821),a(74644);var i=a(34339),d=a(10127),o=a(41499),c=a(72601),u=a(30999),m=a(67909),x=a(32321),v=a(50619),p=a(74774),g=a(96414);let f=(0,m.default)(()=>Promise.all([a.e(7284),a.e(9172),a.e(2194),a.e(5544)]).then(a.bind(a,95544)),{loadableGenerated:{webpack:()=>[95544]},ssr:!1}),y=(e,l)=>{if(!(null==e?void 0:e.main_image))return!1;let a=e.main_image.toLowerCase();return l.some(e=>a.endsWith(e))},_=e=>{let l=e.find(e=>e.label===n.E.FABRIC),a=e.find(e=>e.label===n.E.COLOR_IMAGE),r=e.find(e=>e.label===n.E.COLOR),i=e.find(e=>e.label===n.E.COLOR_CODE);return(null==a?void 0:a.value)?(0,t.jsxs)("div",{className:"grid grid-cols-2 items-center",children:[(l||r&&!l)&&(0,t.jsx)("div",{className:"flex flex-row gap-x-1 lg:gap-x-2",children:(0,t.jsxs)(s.default,{variant:"body-xs",className:"text-gray-700",children:[(null==l?void 0:l.label)?"".concat(null==l?void 0:l.label," &"):""," ",null==r?void 0:r.label]})}),(0,t.jsx)(v.A,{trigger:(0,t.jsx)(t.Fragment,{children:(a||r)&&(0,t.jsxs)("div",{className:"flex cursor-pointer items-center justify-end gap-x-2",children:[l&&(0,t.jsx)(s.default,{element:"span",variant:"body-xs",weight:"medium",className:"text-secondary col-span-3",children:null==l?void 0:l.value}),(a||i)&&(0,t.jsx)("div",{className:"h-3 w-3 shrink-0 rounded-full border border-gray-400 md:h-4 md:w-4",style:{backgroundImage:(null==a?void 0:a.value)?"url(".concat(a.value,")"):"none",backgroundColor:(null==i?void 0:i.value)?i.value:"transparent",backgroundSize:"cover",backgroundPosition:"center"}}),r&&(0,t.jsx)(s.default,{element:"span",variant:"body-xs",weight:"medium",className:"text-secondary",children:r.value||r.value_code||""})]})}),tooltip:(0,t.jsx)("div",{className:"rounded-lg bg-white p-2 shadow-[0_0_10px_rgba(0,0,0,0.25)]",children:(0,t.jsx)("div",{className:"overflow-hidden rounded-lg",children:(0,t.jsx)("img",{src:null==a?void 0:a.value,alt:null==a?void 0:a.label,className:"h-[140px] w-[160px] object-cover"})})}),triggerType:"hover",toolTipInDom:!0,hotspotStyle:{placeSelf:"end"}})]}):(0,t.jsxs)("div",{className:"grid grid-cols-2 items-center",children:[(l||r&&!l)&&(0,t.jsx)("div",{className:"flex flex-row gap-x-1 lg:gap-x-2",children:(0,t.jsxs)(s.default,{variant:"body-xs",className:"text-gray-700",children:[(null==l?void 0:l.label)?"".concat(null==l?void 0:l.label," &"):""," ",null==r?void 0:r.label]})}),(a||r)&&(0,t.jsxs)("div",{className:"flex items-center justify-end gap-x-2",children:[l&&(0,t.jsx)(s.default,{element:"span",variant:"body-xs",weight:"medium",className:"text-secondary col-span-3",children:null==l?void 0:l.value}),(a||i)&&(0,t.jsx)("div",{className:"h-3 w-3 shrink-0 rounded-full border border-gray-400 md:h-4 md:w-4",style:{backgroundImage:(null==a?void 0:a.value)?"url(".concat(a.value,")"):"none",backgroundColor:(null==i?void 0:i.value)?i.value:"transparent",backgroundSize:"cover",backgroundPosition:"center"}}),r&&(0,t.jsx)(s.default,{element:"span",variant:"body-xs",weight:"medium",className:"text-secondary",children:r.value||r.value_code||""})]})]})},h=e=>{var l,a,n,c,u,m,x,v,f;let{data:_,setData:h,safeJSONParse:b}=e,N=e=>_.find(l=>(null==l?void 0:l.code)===e),E=N("personalize_type_option"),[j,w]=(0,r.useState)(!0);if((0,g.A)(!0),(0,r.useEffect)(()=>
1{if((null==E?void 0:E.value_code)!=="text")return;let e="google-font-Delius-Unicase";if(!document.getElementById(e)){let l=document.createElement("link");l.id=e,l.rel="stylesheet",l.href="https://fonts.googleapis.com/css2?family=Delius+Unicase&display=swap",document.head.appendChild(l)}document.fonts.load('1rem "Courier New"')},[]),!E||!(null==E?void 0:E.value)||!(null==E?void 0:E.value_code))return(0,t.jsx)(t.Fragment,{});let C=(null==(l=N("print_sides"))?void 0:l.value.split(","))||[],T=null==(a=N("print_area"))?void 0:a.label,A=(null==E?void 0:E.value_code)==="text",R=A?null==(n=N("personalize_name"))?void 0:n.value:null,D=A?null==(c=N("color_picker_value"))?void 0:c.value:null,U=A?null==(u=N("personalize_font"))?void 0:u.value:null,P=A?null==(m=N("personalize_color_code"))?void 0:m.value:null,M=A?null:b(null==(x=N("referencelogo_upload"))?void 0:x.value,{}),O=!!M&&y(M,["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","avif"]),I=(null==M||null==(f=M.main_image)||null==(v=f.split("/"))?void 0:v.pop())||"file";return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-5",onClick:()=>h([]),children:(0,t.jsxs)("div",{className:"relative w-full rounded-lg bg-white shadow-[0_20px_60px_rgba(0,0,0,0.25)]",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-400 px-4 py-4",children:[(0,t.jsx)(s.default,{variant:"body-xl",weight:"medium",className:"text-[16px]! md:text-[20px]!",children:"Personalize"}),(0,t.jsx)("button",{onClick:()=>h([]),className:"text-lg text-gray-900 hover:text-black",children:(0,t.jsx)(d.u,{size:18})})]}),(0,t.jsxs)("div",{className:"flex w-full flex-col gap-y-3 p-4 pb-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-x-6 gap-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.default,{variant:"body-xs",className:"text-secondary-100",children:"Personalize Type"}),(0,t.jsx)(s.default,{variant:"body-xs",weight:"medium",className:"text-secondary",children:null==E?void 0:E.value})]}),!!(null==C?void 0:C.length)&&(0,t.jsxs)("div",{className:"place-self-end",children:[(0,t.jsx)(s.default,{variant:"body-xs",className:"text-secondary-100",children:"Print Sides"}),(0,t.jsx)(s.default,{variant:"body-xs",weight:"medium",className:"text-secondary",children:null==C?void 0:C.join(" & ")})]}),!!T&&(0,t.jsxs)("div",{children:[(0,t.jsx)(s.default,{variant:"body-xs",className:"text-secondary-100",children:"Print Area"}),(0,t.jsx)(s.default,{variant:"body-xs",weight:"medium",className:"text-secondary",children:T})]})]}),!A&&(null==M?void 0:M.main_image)&&(0,t.jsxs)("div",{className:"mt-3 space-y-1",children:[(0,t.jsx)(s.default,{variant:"body-xs",className:"text-secondary-100",children:"Uploaded Logo"}),O?(0,t.jsx)("div",{className:"w-full space-y-3 px-3",children:(0,t.jsxs)("div",{className:"flex w-full items-center justify-center",children:[j&&(0,t.jsx)("div",{className:"relative aspect-square w-full rounded-lg bg-gray-500",children:(0,t.jsx)(p.A,{className:"absolute h-full"})}),(0,t.jsx)("div",{className:j?"h-0":"relative aspect-square w-full",children:(0,t.jsx)(i.CDNImage,{src:(null==M?void 0:M.thumb_image)||(null==M?void 0:M.main_image),alt:"personalize_uploaded_image",fill:!0,className:"rounded-lg object-contain",onLoad:()=>w(!1)})})]},null==M?void 0:M.main_image)}):(0,t.jsxs)("div",{className:"flex items-center gap-x-2 rounded-md border border-gray-400 bg-gray-100 px-3 py-2",children:[(0,t.jsx)(o.o,{size:16}),(0,t.jsx)(s.default,{title:I,variant:"body-xs",className:"text-secondary flex-1 truncate",children:I})]},null==M?void 0:M.main_image)]}),A&&R&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(s.default,{variant:"body-xs",className:"text-secondary-100 mb-1",children:"Text Preview"}),(0,t.jsx)("div",{style:{backgroundColor:P||"transparent"},className:"bg-primary-900 flex h-21 items-center justify-center overflow-hidden border p-5",children:(0,t.jsx)("span",{style:{color:D,fontFamily:U,fontSize:"1.2rem"},children:R})}),(0,t.jsx)(s.default,{variant:"body-3xs",className:"text-secondary-100 mt-1",children:"(Text Preview is for reference only, final print may differ on cover.)"})]})]})]})})},b=e=>{let{note:l,totalNotes:a}=e,[n,s]=(0,r.useState)(!1),d=(0,r.useRef)(null);return(0,r.useEffect)(()=>()=>{d.current&&(d.current.pause(),d.current.currentTime=0,d.current=null)},[]),(0,t.jsxs)("div",{className:(0,x.cn)("flex items-center rounded-xl border border-gray-500 bg-gray-300 px-3 py-4",a>1&&"mx-8"),children:[n?(0,t.jsx)("button",{onClick:()=>{var e;
1null==(e=d.current)||e.pause(),s(!1)},children:(0,t.jsx)(c.E,{className:"mx-auto text-blue-600",size:26,weight:"fill"})}):(0,t.jsx)("button",{onClick:()=>{d.current||(d.current=new Audio(l.filePath)),d.current.play(),s(!0),d.current.onended=()=>{s(!1)}},children:(0,t.jsx)(u.u,{className:"mx-auto text-blue-600",size:26,weight:"fill"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(i.CDNImage,{src:n?"/images/icons/recordplay.svg":"/images/icons/recorded.svg",alt:"recording-icon",className:"h-6 w-full object-contain",height:24,width:24})})]})},N=e=>{let{image:l,onLoad:a}=e;return(0,t.jsx)("div",{className:"flex w-full items-center justify-center",children:(0,t.jsx)("div",{className:"relative aspect-square w-[calc(100%-24px)]",children:(0,t.jsx)(i.CDNImage,{src:null==l?void 0:l.main_image,alt:"reference-image",fill:!0,onLoad:a,className:"rounded-lg object-contain"})})})},E=e=>{let{data:l,setData:a,safeJSONParse:i}=e;if((0,g.A)(!0),!l.length)return null;let c=[".jpg",".jpeg",".png",".gif",".webp",".bmp",".svg"],u=e=>{let{referenceImages:l}=e,[a,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{n(!0)},[l]),l.length)?(0,t.jsxs)("div",{className:"w-full space-y-1",children:[(0,t.jsx)(s.default,{className:"text-secondary-100 px-3",variant:"body-xs",children:"Reference Image"}),(0,t.jsxs)("div",{className:"cartSwiper w-full overflow-hidden",children:[a&&(0,t.jsx)("div",{className:"relative aspect-square w-full rounded-lg bg-gray-500",children:(0,t.jsx)(p.A,{className:"absolute h-full"})}),(0,t.jsx)(f,{slidesPerView:1,navigationEnable:!0,forceNavigationOnMobile:!0,wrapperClass:a?"h-0":"",children:l.map(e=>(0,t.jsx)(N,{image:e,totalImages:l.length,onLoad:()=>n(!1)},null==e?void 0:e.main_image))})]})]}):null},m=e=>{let{files:l}=e;return l.length?(0,t.jsxs)("div",{className:"space-y-1 px-3",children:[(0,t.jsx)(s.default,{className:"text-secondary-100",variant:"body-xs",children:"Reference File"}),(0,t.jsx)("div",{className:"flex flex-col gap-y-2",children:l.map((e,l)=>{var a,r;let n=(null==e||null==(r=e.main_image)||null==(a=r.split("/"))?void 0:a.pop())||"File ".concat(l+1);return(0,t.jsxs)("div",{className:"flex items-center gap-x-2 rounded-md border border-gray-400 bg-gray-100 px-3 py-2",children:[(0,t.jsx)(o.o,{size:16}),(0,t.jsx)(s.default,{title:n,variant:"body-xs",className:"text-secondary flex-1 truncate",children:n})]},(null==e?void 0:e.main_image)||l)})})]}):null};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-5",onClick:()=>a([]),children:(0,t.jsxs)("div",{className:"relative w-full rounded-lg bg-white shadow-[0_20px_60px_rgba(0,0,0,0.25)]",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-400 px-4 py-4",children:[(0,t.jsx)(s.default,{variant:"body-xl",weight:"medium",className:"text-[16px]! md:text-[20px]!",children:"Special Instructions"}),(0,t.jsx)("button",{onClick:()=>a([]),className:"text-lg text-gray-900 hover:text-black",children:(0,t.jsx)(d.u,{size:18})})]}),(0,t.jsx)("div",{className:"flex flex-col gap-y-4 px-[10%] py-4 pb-6 md:px-16",children:l.map(e=>{if([n.E.REFERENCE_IMAGE,n.E.UPLOAD_REFERENCE_IMAGE].includes(null==e?void 0:e.label)){let l=i(null==e?void 0:e.value,[]),a=null==l?void 0:l.uploaded_image,n=a?[a]:l,s=n.filter(e=>y(e,c)),d=n.filter(e=>!y(e,c));return(0,t.jsxs)(r.Fragment,{children:[s.length>0&&(0,t.jsx)(u,{referenceImages:s}),d.length>0&&(0,t.jsx)(m,{files:d})]},null==e?void 0:e.value_code)}if((null==e?void 0:e.label)===n.E.COMMENT)return(0,t.jsxs)("div",{className:"space-y-1 px-3",children:[(0,t.jsx)(s.default,{className:"text-secondary-100",variant:"body-xs",children:"Reference Text"}),(0,t.jsx)(s.default,{className:"text-secondary break-words",variant:"body-xs",children:null==e?void 0:e.value})]},null==e?void 0:e.value_code);if((null==e?void 0:e.label)===n.E.VOICE_NOTES){let l=i(null==e?void 0:e.value,[]);return(0,t.jsxs)("div",{className:"voiceSwiper px-3",children:[(0,t.jsx)(s.default,{className:"text-secondary-100 mb-1",variant:"body-xs",children:"Voice Note"}),(0,t.jsx)(f,{navigationEnable:!0,forceNavigationOnMobile:!0,children:l.map(e=>(0,t.jsx)(b,{note:e,totalNotes:l.length},null==e?void 0:e.filePath))})]},null==e?void 0:e.value_code)}})})]})})}},86906:(e,l,a)=>{a.d(l,{z:()=>n});var t=a(12115),r=a(1213);let n=()=>{let e=(0,r.d4)(e=>e.auth.customer);return(0,t.useMemo)(()=>s(e),[e])},s=e=>({user:{email:(null==e?void 0:e.email)||"[email protected]",name:e?"".concat(e.firstname," ").concat(e.lastname):"guest"}})},90268:(e,l,a)=>{a.d(l,{g:()=>u});var t=a(12115),r=a(20063);let n=0,s=0,i=null,d=null,o=()=>{let e=window.navigator.userAgent;return/iP(ad|hone|od)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1},c=()=>{let e=document.body,l=document.documentElement,a=o();i?(e.style.overflow=i.overflow,e.style.position=i.position,e.style.top=i.top,e.style.width=i.width):(e.style.overflow="",e.style.position="",e.style.top="",e.style.width=""),e.style.removeProperty("touch-action"),null!==d?l.style.overflow=d:l.style.overflow="",a&&window.scrollTo(0,s),i=null,d=null,s=0},u=e=>{let{isLocked:l,isMobile:a,type:u="drawer"}=e,m=(0,r.usePathname)(),x=(0,t.useRef)(m);(0,t.useEffect)(()=>{x.current!==m&&(x.current=m,n=0,c())},[m]),(0,t.useEffect)(()=>
1{if(!l)return;let e=document.querySelector(".mobile-float-menu");return n+=1,(()=>{let e=document.body,l=document.documentElement,a=o();i||(i={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width}),null===d&&(d=l.style.overflow),e.style.overflow="hidden",l.style.overflow="hidden",e.style.touchAction="none",a&&(s=window.scrollY,e.style.position="fixed",e.style.top="-".concat(s,"px"),e.style.width="100%")})(),a&&e&&"drawer"===u&&(e.style.display="none"),()=>{0===(n=Math.max(0,n-1))&&c(),a&&e&&(e.style.display="block")}},[l,a,u])}},97513:(e,l,a)=>{a.d(l,{A:()=>r});var t=a(12115);let r=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,[a,r]=(0,t.useState)(e);return(0,t.useEffect)(()=>{if(e)r(!0);else{let e=setTimeout(()=>r(!1),l);return()=>clearTimeout(e)}},[e,l]),{shouldRender:a}}}}]);

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.