PageSourceSearch

https://www.theograce.co.uk/_next/static/chunks/1948-483bc3954618536a.js

js theograce.co.uk collected 2026-10-08 03:35:05 UTC 9,373 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1948],{35887:e=>{e.exports={ProductPrices:"price_ProductPrices__ZFRUp",Crossed:"price_Crossed__rYJrz",Discount:"price_Discount__8_YUO",Selling:"price_Selling__9HODW",SaleDressing:"price_SaleDressing__D_KHt"}},35998:(e,t,l)=>{"use strict";l.d(t,{A:()=>b});var r=l(37876),i=l(14232),s=l(15039),n=l.n(s);let a=(0,i.createContext)(null),o=a.Provider,c=()=>{let e=(0,i.useContext)(a);if(!e)throw Error("Option.* sub-components must be used inside <Option>");return e};var d=l(49968),u=l(54587),p=l.n(u),_=l(50030),v=l.n(_);let h=e=>{var t,l;let{size:i,shape:s="square"}=e,{option:n}=c();return n.image?(0,r.jsx)(p(),{src:n.image,alt:null!=(l=null!=(t=n.altText)?t:n.label)?l:"",width:i,height:i,unoptimized:n.image.startsWith("data:"),className:v().Image,"data-shape":s,style:{"--image-size":"".concat(i,"px")}}):null};var x=l(6936),f=l(74280),m=l(68200);let g=e=>{var t;let{option:l,isSelected:s,disabled:a=!1,frame:c=!1,layout:u="row",onClick:p,className:_,children:x,presentation:f,itemRole:m}=e,g=(0,d.I)(),b=null!=l?l:null==g?void 0:g.option,j=null!=(t=null!=s?s:null==g?void 0:g.isSelected)&&t,y=null!=p?p:null==g?void 0:g.onClick;if(!b)throw Error("<Option> requires an `option` prop, or must be rendered inside a SelectField.List / RadioField.");let S=(e=>{let t;return i.Children.forEach(e,e=>{if((0,i.isValidElement)(e)&&e.type===h){let l=e.props;"number"==typeof l.size&&(t=l.size)}}),t})(x),C="string"==typeof b.label&&1===b.label.trim().length,A=(null!=f?f:null==g?void 0:g.presentation)||!!b.href,F=null!=m?m:"option";return(0,r.jsx)(o,{value:{option:b,isSelected:j,disabled:a},children:(0,r.jsx)("div",{className:n()(v().Option,_),"data-frame":c?"on":"off","data-layout":u,"data-singlechar":C||void 0,"data-selected":j||void 0,"data-disabled":a||void 0,role:A?void 0:F,"aria-selected":A||"option"!==F?void 0:j,"aria-checked":A||"radio"!==F?void 0:j,"aria-disabled":a||void 0,onClick:a?void 0:y,style:S?{"--image-size":"".concat(S,"px")}:void 0,children:x})})};g.Image=h,g.Title=e=>{let{variant:t}=e,{option:l,isSelected:i}=c();return(0,r.jsx)(x.A,{variant:null!=t?t:i?"text2":"text1",className:v().Title,children:l.label})},g.Price=e=>{let{variant:t}=e,{option:l}=c(),i=l.pricing;if(!i||null==i.price)return null;let s=null!=t?t:l.selected?"text2":"text1";return(0,r.jsxs)("div",{className:v().Price,children:[i.sign&&(0,r.jsx)(x.A,{variant:s,children:i.sign}),(0,r.jsx)(f.A,{selling:i.price,sellingPriceTypographyVariant:s})]})},g.Checkbox=()=>{let{isSelected:e}=c();return(0,r.jsx)("span",{className:v().Checkbox,children:(0,r.jsx)(m.A,{name:"checkbox",checked:e})})};let b=g},41948:(e,t,l)=>{"use strict";l.d(t,{A:()=>C});var r=l(37876),i=l(15039),s=l.n(i),n=l(14232),a=l(69610),o=l.n(a),c=l(97804),d=l(24963),u=l(35998);let p=(0,n.createContext)(null),_=p.Provider,v=()=>{let e=(0,n.useContext)(p);if(!e)throw Error("SelectField.* sub-components must be used inside <SelectField>");return e};var h=l(6936),x=l(68200);let f=e=>{let{children:t}=e,{selectedOption:l,isDropdownOpen:i,toggleDropdown:s,selectDisplayRef:n,placeholder:a,listboxId:c,ariaLabel:d}=v();return(0,r.jsxs)("div",{className:o().SelectDisplay,tabIndex:0,ref:n,onClick:s,role:"combobox","aria-label":d,"aria-expanded":i,"aria-haspopup":"listbox","aria-controls":i?c:void 0,children:[l?t(l):(0,r.jsx)(h.A,{variant:"text1",tag:"span",className:o().SelectedText,children:a||"Select an option"}),(0,r.jsx)(x.A,{name:"dropdown",direction:i?"block-start":"block-end"})]})};var m=l(60733),g=l(49968);let b=e=>{let{children:t}=e,{isDropdownOpen:l,filteredOptions:i,selectedOption:a,optionSelectHandler:c,searchEnabled:d,searchQuery:u,setSearchQuery:p,optionsLayout:_,listboxId:h}=v(),x=(0,n.useRef)(null);if((0,n.useLayoutEffect)(()=>{let e=x.current,t=null==e?void 0:e.querySelector("[data-selected]");if(!l||!e||!t)return;let r=t.getBoundingClientRect().top-e.getBoundingClientRect().top;e.scrollTop+=r-(e.clientHeight-t.offsetHeight)/2},[l]),!l)return null;let f=s()({["".concat(o().Dropdown," select-field-dropdown-option")]:!0,["".concat(o().Grid," grid")]:"grid"===_,["".concat(o().List," list")]:"list"===_,["".concat(o().Flex)]:"flex"===_}),b=i.some(e=>!!e.href);return(0,r.jsxs)("div",{className:f,ref:x,role:b?"group":"listbox",id:h,children:[d&&(0,r.jsx)(m.A,{type:"text",className:o().SearchInput,placeholder:"Search...",value:u,onChange:e=>p(e.target.value),autoFocus:!0}),i.map(e=>{let l=e.value===(null==a?void 0:a.value),i=()=>c(e);return(0,r.jsx)(g.A,{value:{option:e,isSelected:l,onClick:i},children:t(e,l,i)},e.value)})]})},j=e=>(0,r.jsx)(u.A,{option:e,layout:"row",presentation:!0,children:(0,r.jsx)(u.A.Title,{})}),y=(e,t,l)=>(0,r.jsx)(u.A,{option:e,isSelected:t,disabled:e.disabled,onClick:l,layout:"row",frame:!0,
1children:(0,r.jsx)(u.A.Title,{})},e.value),S=(0,n.forwardRef)((e,t)=>{var l,i;let{className:a,id:u,label:p,error:v,options:h=[],placeholder:x,optionsLayout:m="list",value:g="",setValue:S,trigger:C,onOptionChange:A,name:F,required:k,searchEnabled:w=!1,onDropdownToggle:D,children:N,ariaLabel:E,...I}=e,T=E||("string"==typeof p?p:void 0)||x,L=(0,n.useRef)(null),P=(0,n.useRef)(null),O=(0,n.useRef)([]),R=(0,n.useId)(),[q,z]=(0,n.useState)(!1),[M,V]=(0,n.useState)(h.find(e=>e.selected)),[H,G]=(0,n.useState)(-1),[U,B]=(0,n.useState)(""),J=!!v&&"string"==typeof(null==v?void 0:v.message)&&v.message.length>0;(0,c.A)(L,()=>z(!1)),(0,n.useEffect)(()=>{v&&P.current&&P.current.focus()},[v]);let W=null==(l=h.find(e=>e.selected))?void 0:l.value;(0,n.useEffect)(()=>V(h.find(e=>e.selected)),[W]);let K=()=>{q||G(Y.findIndex(e=>e.value===(null==M?void 0:M.value))),z(e=>{let t=!e;return!t&&P.current&&P.current.blur(),D&&D(t),t})},Q=e=>{!e.disabled&&(V(e),z(!1),P.current&&P.current.blur(),S&&S("".concat(F),e.value),C&&C(F),A&&A(e),D&&D(!1))},Y=h.filter(e=>"string"!=typeof(null==e?void 0:e.label)||e.label.toLowerCase().includes(U.toLowerCase())),Z=s()({["".concat(o().SelectField," ").concat(null!=a?a:""," select-field")]:!0,["".concat(o().NoLabel," no-label")]:!p,["".concat(o().Error," error")]:J});return(0,r.jsxs)("div",{className:Z,children:[(0,r.jsx)("input",{...I,id:u,name:F,ref:t,type:"hidden",value:null!=(i=null==M?void 0:M.value)?i:""}),p&&(0,r.jsx)(d.A,{htmlFor:u,required:k,children:p}),(0,r.jsx)("div",{className:o().SelectWrapper,ref:L,onKeyDown:e=>{if(("Enter"===e.key||" "===e.key)&&(e.preventDefault(),q?(z(!1),P.current&&P.current.blur(),D&&D(!1)):K()),q)switch(e.key){case"ArrowDown":e.preventDefault(),G(e=>(e+1)%Y.length);break;case"ArrowUp":e.preventDefault(),G(e=>(e-1+Y.length)%Y.length);break;case"Enter":case" ":{e.preventDefault();let t=Y[H];t&&t.value!==(null==M?void 0:M.value)&&Q(t);break}case"Escape":e.preventDefault(),z(!1),P.current&&P.current.blur()}},children:(0,r.jsx)(_,{value:{selectedOption:M,isDropdownOpen:q,toggleDropdown:K,optionSelectHandler:Q,filteredOptions:Y,searchQuery:U,setSearchQuery:e=>{B(e),G(-1)},searchEnabled:w,placeholder:x,optionsLayout:m,selectDisplayRef:P,optionRefs:O,listboxId:R,ariaLabel:T},children:(()=>{let e=n.Children.toArray(N).filter(n.isValidElement),t=e.some(e=>e.type===f),l=e.some(e=>e.type===b);return(0,r.jsxs)(r.Fragment,{children:[t?null:(0,r.jsx)(f,{children:j}),l?null:(0,r.jsx)(b,{children:y}),N]})})()})})]})});S.displayName="SelectField",S.Trigger=f,S.List=b;let C=S},49968:(e,t,l)=>{"use strict";l.d(t,{A:()=>s,I:()=>n});var r=l(14232);let i=(0,r.createContext)(null),s=i.Provider,n=()=>(0,r.useContext)(i)},50030:e=>{e.exports={Option:"option_Option__a_6Uy","js-has-pseudo":"option_js-has-pseudo___f3qZ","does-not-exist":"option_does-not-exist__mCzhN",Image:"option_Image__HMJAJ",Title:"option_Title__kacXT",Price:"option_Price__IyhTs",Checkbox:"option_Checkbox__MLl86"}},69610:e=>{e.exports={SelectField:"selectField_SelectField__IF_I_",SelectDisplay:"selectField_SelectDisplay__wdOuS","js-has-pseudo":"selectField_js-has-pseudo__u0G82","does-not-exist":"selectField_does-not-exist__VTlTA",Dropdown:"selectField_Dropdown__59g6q",NoLabel:"selectField_NoLabel__MrEdQ",SearchInput:"selectField_SearchInput__RlVDO",Grid:"selectField_Grid__LEqV9",Flex:"selectField_Flex__yngp_",List:"selectField_List__C_Tsu"}},74280:(e,t,l)=>{"use strict";l.d(t,{A:()=>h});var r=l(37876),i=l(15039),s=l.n(i),n=l(6936),a=l(35887),o=l.n(a),c=l(88771),d=l(26635),u=l(14232),p=l(66689),_=l(21029),v=l(58799);let h=e=>{let{id:t,className:l,selling:i,discountType:a,discountAmount:h,priceAdjustmentsSum:x=0,showDiscount:f=!1,showFreeLabel:m=!0,sellingPriceTypographyVariant:g="text6",crossedPriceTypographyVariant:b="text7",forcedCurrency:j}=e,{t:y}=(0,c.B)("base"),{data:{brand:S,siteId:C,country:A,locale:F,currency:k}}=(0,d.Ay)(e=>e),{data:{siteSaleEnabled:w}}=(0,_.g)(e=>e.themeOverrides),D=j||(0,v.sI)(S,C,A)||k,N=e=>(0,v.vv)(e,{locale:F,currency:D}),E=(0,u.useMemo)(()=>i+x,[i,x]),I=(0,u.useMemo)(()=>(0,p.x)(E,a,h),[h,a,E,x]),T=(0,u.useMemo)(()=>w&&h&&h>0,[w,h]),L=null!=I&&I>E;return(0,r.jsxs)("div",{id:t,className:s()(o().ProductPrices,l,"product-prices"),children:[L&&(0,r.jsx)(n.A,{variant:b,className:s()(o().Crossed,"crossed-price"),children:N(I)}),(0,r.jsx)(n.A,{variant:g,className:s()(o().Selling,"selling-price",{[o().SaleDressing]:T}),children:0===E&&m?y("price.free"):N(E)}),"percentage"===a&&h&&h>0&&f?(0,r.jsxs)(n.A,{variant:"text3",className:s()(o().Discount,"discount"),children:[y("price.youSaved")," ",h,"%"]}):null]})}}}]);

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.