PageSourceSearch

https://www.theograce.co.uk/_next/static/chunks/2578.a33f4ddadad60ccb.js

js theograce.co.uk collected 2026-10-08 03:39:57 UTC 6,574 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2578],{10981:e=>{e.exports={LocalizationForm:"localizationForm_LocalizationForm__MSJAI",Actions:"localizationForm_Actions__ednFc"}},14313:e=>{e.exports={LocalizationPanel:"localizationModal_LocalizationPanel__xWoa6",Content:"localizationModal_Content__7IVqe"}},19983:(e,t,o)=>{"use strict";o.d(t,{A:()=>p});var n=o(37876),r=o(15039),i=o.n(r),a=o(14232),l=o(88992),c=o(93499),s=o(6936),d=o(43527),u=o.n(d);let p=e=>{let{children:t,onSubmit:o,id:r,className:d,defaultValues:p,values:h,onFormReady:m}=e,{register:y,handleSubmit:_,setValue:A,setError:C,clearErrors:f,trigger:x,getFieldState:g,formState:{errors:j}}=(0,l.mN)({defaultValues:p,values:h,resetOptions:{keepDirtyValues:!0,keepErrors:!0},reValidateMode:"onBlur"});return(0,a.useEffect)(()=>{m&&m({setValue:A,setError:C,clearErrors:f,trigger:x,getFieldState:g})},[m,A,C,f,x,g]),(0,n.jsx)("form",{onSubmit:_(o),id:r,className:i()(u().Form,d),noValidate:!0,autoComplete:"off",children:a.Children.map(t,e=>{if(!(0,a.isValidElement)(e))return e;{var t;let o=e.props.name||(null==(t=e.type)?void 0:t.fieldName);if(!o)return e;let{type:l,info:d,className:p}=e.props,h=j[o],m=i()(p,{["".concat(u().Field," field")]:!0,["".concat(u().Hidden," hidden")]:"hidden"===l,["".concat(u().HasError," hasError")]:h}),_={...e.props};return delete _.className,_.formId=r,["select","radio"].includes(e.props.type)&&(_.setValue=A,_.trigger=x),(0,n.jsxs)("div",{className:m,children:[(0,a.createElement)(e.type,{..._,register:y,key:o,error:h}),!!d&&(0,n.jsx)(c.A,{id:o,content:d}),h&&(0,n.jsx)(s.A,{variant:"caption1",className:i()(u().Error,"field-error-message"),children:h.message})]})}})})}},43527:e=>{e.exports={Form:"form_Form__31lV4",Error:"form_Error__OZ6uY",Field:"form_Field__0rlCv",Hidden:"form_Hidden__c9W9z"}},52578:(e,t,o)=>{"use strict";o.r(t),o.d(t,{LocalizationModal:()=>w});var n=o(37876),r=o(26635),i=o(4862),a=o(14232),l=o(89099),c=o(19110),s=o(58799),d=o(95993),u=o(75582),p=o(91298),h=o(70408),m=o(41948),y=o(12632),_=o(19983),A=o(76828),C=o(68200),f=o(6936),x=o(60391),g=o.n(x),j=o(173);let v=()=>{let e=(0,j.A)(e=>e.shippingNotification);return e?(0,n.jsxs)("div",{className:g().ShippingNotification,children:[(0,n.jsx)(C.A,{name:"info",className:g().InfoIcon}),(0,n.jsx)(f.A,{variant:"text4",children:e})]}):null};var b=o(88771),N=o(10981),z=o.n(N);let F=e=>{let{onClose:t}=e,{reload:o}=(0,l.useRouter)(),{t:C}=(0,b.B)("localization"),{pushToDataLayer:f}=(0,c.ur)(),x=(()=>{let{query:e}=(0,l.useRouter)(),{data:t}=(0,r.Ay)(e=>e.brand),{data:o}=(0,r.Ay)(e=>e.country),{data:n}=(0,r.Ay)(e=>e.siteId),a=(0,i.A)(e=>e.setUserCurrency);return r=>{try{({...e}).cur&&(e=>{let t=new URL(window.location.href);t.searchParams.delete("cur"),window.history.replaceState({},"",t.toString())})(0),(0,s.iF)(t,n,o,r),a(r)}catch(e){console.error("Error updating currency:",e)}}})(),g=(()=>{let{data:{brand:e,siteId:t,country:o}}=(0,r.Ay)(e=>e),n=(0,i.A)(e=>e.setUserCountry);return r=>{try{(0,h.wb)(e,t,o,r),n(r)}catch(e){console.error("Error updating shipping country:",e)}}})(),j=(0,i.A)(e=>e.submitLocaleChanges),N=(0,i.A)(e=>e.isLoading),{data:F}=(0,r.Ay)(e=>e),{country:E,currency:S,supportedCurrencies:M,multiCurrency:w}=F,{isMultiCurrencyEnabled:L}=w,k=(0,i.A)(e=>e.userCountry)||E,I=(0,p.F)(),O=(0,u.A)(e=>e.postToCartClientAPI),V=(0,u.A)(e=>e.initialized),[B,P]=(0,a.useState)(k),[T,H]=(0,a.useState)(S),[R,U]=(0,a.useState)(!1),W=async()=>{if(R)return;U(!0);let e=!1,n=k!==B,r=S!==T;if(I){if(V&&(n||r)&&B)try{await O("applyRegionalSettings",{isoCountryCode:B.toUpperCase(),isoCurrencyCode:T})}catch(e){}}else{let e=await (0,d.F6)(F);j(F,{userId:e,countryCode:B,currencyCode:T})}let i=B&&(0,h.K2)(B);f({event:"header_interactions",interaction_type:"submit",element:"ship_to",countryCode:B,country:i,currency:T}),n&&(g(B),e=!0),r&&(x(T),e=!0),U(!1),t(),e&&o()};(0,a.useEffect)(()=>{if(!L)return;let e=(0,s.wm)(B);e&&M.includes(e)?H(e):H(M[0])},[L,B,M]),(0,a.useEffect)(()=>{H(S)},[S]);let q=M.map(e=>({label:"".concat((0,s.Qn)(e)," ").concat(e),value:e,selected:e===T}));return(0,n.jsxs)(_.A,{className:z().LocalizationForm,id:"LocalizationForm",onSubmit:W,children:[(0,n.jsx)(A.A,{label:C("localeModal.shipTo"),onOptionChange:e=>{let{value:t}=e;P(t),f({event:"header_interactions",interaction_type:"select",element:"currency_ship_to_".concat(t)})},selectedCountry:B}),L&&M.length>1&&(0,n.jsx)(m.A,{id:"currencyCode",name:"currencyCode",className:z().CurrencySelectField,label:C("localeModal.chooseCurrency"),options:q,onOptionChange:e=>{let{value:t}=e;H(t),f({event:"header_interactions",interaction_type:"select",element:"currency_choose_".concat(t)})}}),(0,n.jsx)(v,{}),(0,n.jsxs)("section",{className:z().Actions,children:[(0,n.jsx)(y.A,{variant:"link",type:"button",onClick:t,children:C("localeModal.cancel")}),(0,n.jsx)(y.A,{variant:N||R?"disabled":"primary",type:"submit",disabled:N||R,children:C("localeModal.save")})]})]})};var E=o(852),S=o(14313),M=o.n(S);let w=()=>{let{t:e}=(0,b.B)("localization"),{data:{multiCurrency:t}}=(0,r.Ay)(e=>e),{isMultiCurrencyEnabled:o}=t,a=(0,i.A)(e=>e.localizationModalOpen),l=(0,i.A)(e=>e.closeLocalizationModal),{pushToDataLayer:s}=(0,c.ur)(),d=e(o?"localeModal.headingWithCurrency":"localeModal.heading"),u=()=>{s({event:"sc_interactions",interaction_type:"close",element:"ship_to"}),l()};return(0,n.jsx)(E.A,{visible:a,onClose:u,onBackdropClick:u,slideFrom:"center",header:d,className:M().LocalizationPanel,children:(0,n.jsxs)("section",{className:M().Content,children:[(0,n.jsx)(f.A,{variant:"text1",children:e("localeModal.description")}),(0,n.jsx)(F,{onClose:u})]})})}},60391:e=>{e.exports={ShippingNotification:"shippingNotification_ShippingNotification__Bn481",InfoIcon:"shippingNotification_InfoIcon__quyoD"}},76828:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(37876),r=o(14232),i=o(97250),a=o(35998),l=o(41948),c=o(173);let s=e=>{let{label:t,onOptionChange:o,selectedCountry:s}=e,d=(0,c.A)(e=>e.shippingCountries),u=(0,r.useMemo)(()=>Object.entries(d).map(e=>{let[t,o]=e,n=t.toLowerCase();return{label:o,value:n,selected:n===s}}),[d,s]);return Object.keys(d).length<1?null:(0,n.jsxs)(l.A,{id:"countryCode",name:"countryCode",label:t,options:u,onOptionChange:o,searchEnabled:!0,children:[(0,n.jsx)(l.A.Trigger,{children:e=>(0,n.jsxs)(a.A,{option:e,layout:"row",presentation:!0,children:[(0,n.jsx)(i.A,{countryCode:String(e.value)}),(0,n.jsx)(a.A.Title,{})]})}),(0,n.jsx)(l.A.List,{children:e=>(0,n.jsxs)(a.A,{layout:"row",children:[(0,n.jsx)(i.A,{countryCode:String(e.value)}),(0,n.jsx)(a.A.Title,{})]})})]})}}}]);

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.