1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b77832d8-9c40-43b2-b7d3-a30b7bb392b3",e._sentryDebugIdIdentifier="sentry-dbid-b77832d8-9c40-43b2-b7d3-a30b7bb392b3")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6343],{42737:function(e,t,o){"use strict";var i=o(44194),r=o(10063),a=o.n(r),n=o(25351),l=o(31549);let s=function(e={}){let{defaultTheme:t}=e;return e=>{let o=i.forwardRef(function(o,i){let r=(0,n.Z)()||t;return(0,l.jsx)(e,{theme:r,ref:i,...o})});return a()(o,e),o}}();t.Z=s},44036:function(e,t,o){"use strict";o.d(t,{Z:function(){return n}});var i=o(41496),r=o(63731);let a=(0,o(18854).Z)("MuiBox",["root"]);var n=(0,r.Z)({defaultClassName:a.root,generateClassName:i.Z.generate})},52082:function(e,t,o){var i=o(42997);e.exports=function(e,t){return i(e,t)}},14099:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/gear/clothing/[id]",function(){return o(32927)}])},88376:function(e,t,o){"use strict";var i=o(96083),r=o(31549);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload")},97223:function(e,t,o){"use strict";var i=o(96083),r=o(31549);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"}),"InfoRounded")},57609:function(e,t,o){"use strict";var i=o(96083),r=o(31549);t.Z=(0,i.Z)([(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3.2"},"0"),(0,r.jsx)("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera")},4758:function(e,t,o){"use strict";o.d(t,{Z:function(){return b}});var i=o(44194),r=o(7829),a=o(68359),n=o(65340),l=o(86485),s=o(87193),d=o(18854),u=o(79076);function c(e){return(0,u.ZP)("MuiCardActionArea",e)}let p=(0,d.Z)("MuiCardActionArea",["root","focusVisible","focusHighlight"]);var h=o(58755),m=o(65342),g=o(31549);let f=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"],focusHighlight:["focusHighlight"]},c,t)},v=(0,n.ZP)(h.Z,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})((0,l.Z)(e=>{let{theme:t}=e;return{display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",["&:hover .".concat(p.focusHighlight)]:{opacity:(t.vars||t).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},["&.".concat(p.focusVisible," .").concat(p.focusHighlight)]:{opacity:(t.vars||t).palette.action.focusOpacity}}})),x=(0,n.ZP)("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})((0,l.Z)(e=>{let{theme:t}=e;return{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:t.transitions.create("opacity",{duration:t.transitions.duration.short})}}));var b=i.forwardRef(function(e,t){let o=(0,s.i)({props:e,name:"MuiCardActionArea"}),{children:i,className:a,focusVisibleClassName:n,slots:l={},slotProps:d={},...u}=o,c=f(o),p={slots:l,slotProps:d},[h,b]=(0,m.Z)("root",{elementType:v,externalForwardedProps:{...p,...u},shouldForwardComponentProp:!0,ownerState:o,ref:t,className:(0,r.Z)(c.root,a),additionalProps:{focusVisibleClassName:(0,r.Z)(n,c.focusVisible)}}),[y,Z]=(0,m.Z)("focusHighlight",{elementType:x,externalForwardedProps:p,ownerState:o,ref:t,className:c.focusHighlight});return(0,g.jsxs)(h,{...b,children:[i,(0,g.jsx)(y,{...Z})]})})},98040:function(e,t,o){"use strict";o.d(t,{Z:function(){return f}});var i=o(44194),r=o(7829),a=o(68359),n=o(65340),l=o(87193),s=o(18854),d=o(79076);function u(e){return(0,d.ZP)("MuiCardMedia",e)}(0,s.Z)("MuiCardMedia",["root","media","img"]);var c=o(31549);let p=e=>{let{classes:t,isMediaComponent:o,isImageComponent:i}=e;return(0,a.Z)({root:["root",o&&"media",i&&"img"]},u,t)},h=(0,n.ZP)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e,{isMediaComponent:i,isImageComponent:r}=o;return[t.root,i&&t.media,r&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),m=["video","audio","picture","iframe","img"],g=["picture","img"];var f=i.forwardRef(function(e,t){let o=(0,l.i)({props:e,name:"MuiCardMedia"}),{children:i,className:a,component:n="div",image:s,src:d,style:u,...f}=o,v=m.includes(n),x=!v&&s?{backgroundImage:'url("'.concat(s,'")'),...u}:u,b={...o,component:n,isMediaComponent:v,isImageComponent:g.includes(n)},y=p(b);return(0,c.jsx)(h,{className:(0,r.Z)(y.root,a),as:n,role:!v&&s?"img":void 0,ref:t,style:x,ownerState:b,src:v?s||d:void 0,...f,children:i})})},32927:function(e,t,o){"use strict";o.r(t);var i=o(54835),r=o(61718),a=o(89274),n=o.n(a);let l=(0,o(19694).vU)({pageTitle:{id:"PageTitles.Gear.ClothingEdit.Title",defaultMessage:"Edit Your Clothing"}}).pageTitle;t.default=(0,i.Md)(i.Xw)((0,i._W)(l),(0,i.lB)(),(0,i.yI)(()=>n().push("/gear")))(r.Z)},61718:function(e,t,o){"use strict";o.d(t,{Z:function(){return X}});var i=o(31549),r=o(89274),a=o(44194),n=o(3079),l=o(12100),s=o(75366),d=o(78186),u=o(92995),c=o(89530),p=o(23828),h=o(52082),m=o.n(h),g=o(28578),f=o(20151),v=o(19694),x=o(36582),b=o(64023),y=o(97833),Z=o(64189),C=o(21055),M=o(21597),j=o(18449),P=o(29003),A=o(28526),w=o(25992),E=o(77088),I=o(88376),V=o(86132),T=o(42645),_=o(13656),H=o(60218),R=o(9242),S=o(97228),D=o(56261),k=o(20239),N=o(69987),F=o(39431),U=o(96317),z=o(34151),O=o(68010),B=o(29379),q=o(13471),L=o(33842),G=o(67566);let W=(0,v.vU)({saveLabel:{id:"ClothingForm.saveLabel",defaultMessage:"Save"},productTypeClothing:{id:"ClothingForm.ProductTypeClothing",defaultMessage:"clothing"},valueTooHigh:{id:"AccessoriesForm.Error.Clothing.AccessoryValueTooHigh",defaultMessage:"Value must be less than \xa3{max}"}}),Y=(0,s.Z)("clothing");var $=(0,p.qC)(G.ZP,(0,c.B)(g.KX,{skip:e=>!e.id,options:e=>({variables:{id:e.id}}),name:"product"}),(0,c.B)(g.dw,{name:"profileComplete"}),(0,c.B)(N.Z,{name:"activePolicies"}),(0,n.$j)((e,t)=>{var o,i,r,a,n,l,s,u,c;let{product:p,profileComplete:h}=t,m=null==h?void 0:null===(i=h.profileComplete)||void 0===i?void 0:null===(o=i.availablePolicies)||void 0===o?void 0:o.find(e=>"Property"===e.type&&e.active),g=null==h?void 0:null===(r=h.profileComplete)||void 0===r?void 0:r.attributes,f={modelName:"Clothing",category:"BicycleClothing"};if(p&&!p.loading&&!p.error&&p.product){let e=Object.assign({},f,p.product);e.initialValue=parseInt(e.initialValue),e.type=e.type?parseInt(e.type):0,f=e}let v=(0,F.A5)(null!==(u=null===(n=t.activePolicies)||void 0===n?void 0:null===(a=n.policiesV2)||void 0===a?void 0:a.rows)&&void 0!==u?u:[]);return{productPolicy:m,submitError:e.products.editProductDialogError,loading:e.transient.profileDataSaving,initialValue:Y(e,"initialValue"),attachments:Y(e,"attachments")||[],dirty:(0,d.Z)("clothing")(e),initialValues:f,dialog:(0,E.Ed)(e.products),hasActivePolicy:h&&!h.loading&&(null!==(c=null===(s=h.profileComplete)||void 0===s?void 0:null===(l=s.availablePolicies)||void 0===l?void 0:l.filter(e=>"Property"==e.type&&e.active).length)&&void 0!==c?c:0)>0,personAttributes:g,activePolicy:v}},(e,t)=>({setPageTitle:t=>e((0,Z.Iw)(t)),handleConfirmDialogClose:()=>e((0,y.Rw)()),handleConfirmDialogConfirm:()=>e((0,y.rd)()),clearSubmitError:()=>e((0,y.pZ)()),saveProduct:o=>{var i,r;let a=(0,O.H)(null===(r=t.profileComplete)||void 0===r?void 0:null===(i=r.profileComplete)||void 0===i?void 0:i.attributes);
1return e((0,y.gg)({...o,parent:{...o.parent,id:t.id}},a?"/commercial":"/gear"))}}),null,{areStatePropsEqual:m()}),(0,u.Z)({form:"clothing",enableReinitialize:!0,keepDirtyOnReinitialize:!0,touchOnChange:!0,onSubmit:(e,t,o)=>{let i=o.hasActivePolicy;o.saveProduct({hasActivePolicy:i,valueChanged:!0,parent:{...e},children:null})}}))((0,b.ZP)(e=>{var t;let{loading:o,anyTouched:r,dirty:n,submitting:s,product:d,handleSubmit:u,intl:c,dialog:p,handleConfirmDialogClose:h,handleConfirmDialogConfirm:m,submitError:g,clearSubmitError:v,productPolicy:b,activePolicies:Z,personAttributes:E,initialValue:N,activePolicy:G,features:Y,attachments:$}=e;(0,a.useEffect)(()=>()=>{v()},[]);let X=(0,z.QE)("sm");(0,a.useEffect)(()=>{d&&d.error&&"function"==typeof d.stopPolling&&d.stopPolling()},[d]);let Q=(0,a.useContext)(k.Z).defaultCurrency,K=(0,D.j)(c,Q),J=null==b?void 0:b.skipInsuredValueValidation,ee=(0,a.useMemo)(()=>{let e=(0,D.x)(c,Q,R.Y$);return[H.Av,t=>!J&&(t<=R.Y$?null:c.formatMessage(W.valueTooHigh,{max:e}))]},[c,Q,J]),et=Z.loading||!(0,F.el)(null==Z?void 0:Z.policiesV2.rows),eo=(0,O.H)(E),ei=!1,er=!0;if(!et){let e=(0,F.A5)(null==Z?void 0:Z.policiesV2.rows);ei=(0,F.mP)(e,eo),er=(0,U.oe)(null==e?void 0:e.packageId)}let ea=d&&!d.loading&&d.product?d.product:{},en=(null==G?void 0:null===(t=G.policyDefinition)||void 0===t?void 0:t.policyCustomerType)==="Retail",el=Y.bool("require_photo_on_clothing_edit"),es=Y.bool("split_uploader_on_clothing_edit"),ed=$.filter(e=>"ProductImage"===e.attachmentType).length,eu=en&&el,ec=eu?"required":"recommended",ep=eu&&(null!=N?N:0)>0&&ed<1,eh=!et&&ea.id&&(es?(0,i.jsx)(P.pn,{title:c.formatMessage(L.s.splitUploaderClothingEvidenceHeader),photoSection:(0,i.jsx)(P.wE,{subheader:c.formatMessage(L.s.splitUploaderClothingPhotosHeader),helperText:c.formatMessage(L.s.splitUploaderClothingPhotosHelper),badge:ec,children:(0,i.jsx)(l.Z,{name:"attachments",component:M.Z,dataTestId:"clothing-photos",accept:j.DD.imagesAndPdfs,maxFileSize:j.yz.image,service:"product-service",entityName:"Product",uploadType:"ProductImage",photoRequired:eu,entityId:ea.id,deleteAction:y.bL,variant:"split",multiple:!0})}),receiptSection:(0,i.jsx)(P.wE,{subheader:c.formatMessage(L.s.splitUploaderClothingProofOfPurchaseHeader),helperText:c.formatMessage(L.s.splitUploaderClothingProofOfPurchaseHelper),badge:"recommended",accordion:{header:c.formatMessage(P.xF.boughtUsedHeader),body:c.formatMessage(L.s.splitUploaderClothingBoughtUsedBody)},children:(0,i.jsx)(l.Z,{name:"attachments",component:M.Z,dataTestId:"clothing-receipt",accept:j.DD.imagesAndPdfs,maxFileSize:j.yz.image,service:"product-service",entityName:"Product",uploadType:"Receipt",entityId:ea.id,deleteAction:y.bL,variant:"split",multiple:!0})})}):(0,i.jsxs)("div",{children:[(0,i.jsx)(A.Z,{variant:"h5",children:(0,i.jsx)(x.Z,{id:"ClothingForm.picturesPrompt",defaultMessage:"Share pictures of your clothing with us"})}),(0,i.jsx)(l.Z,{name:"attachments",component:M.Z,icon:(0,i.jsx)(I.Z,{}),accept:j.DD.image,thumbSize:140,service:"product-service",entityName:"Product",uploadType:"ProductImage",entityId:ea.id,deleteAction:y.bL,multiple:!0})]}));return(null==d?void 0:d.error)?(0,i.jsx)(q.Z,{}):(null==d?void 0:d.loading)?(0,i.jsx)(f.Z,{}):(0,i.jsxs)("div",{children:[ei&&(0,i.jsx)(B.V,{dataTestId:"over-limit-error-banner",type:"error",message:c.formatMessage(L.s.overLimitErrorBannerMessage)}),(0,i.jsx)(F.RO,{policyActive:!et}),(0,i.jsxs)("form",{onSubmit:u,children:[(0,i.jsx)(w.Z,{handleConfirmDialogClose:h,handleConfirmDialogConfirm:m,open:p.open,data:p.data,productType:c.formatMessage(W.productTypeClothing)}),(0,i.jsx)(A.Z,{paragraph:!0,variant:"h5",children:(0,i.jsx)(x.Z,{id:"ClothingForm.totalValueQuestion",defaultMessage:"What is the total value of your clothing?"})}),X?(0,i.jsx)(l.Z,{name:"initialValue",validate:ee,step:1,disabled:et||ei||!er,min:0,max:!J&&R.Y$,component:V.Z,renderDrawer:!0,label:(0,i.jsx)(x.Z,{id:"ClothingForm.InitialValue",defaultMessage:"Total value"}),title:(0,i.jsx)(x.Z,{id:"Gear.ClothingForm.Value",defaultMessage:"Choose the value you want to insure your clothing for"}),body:(0,i.jsx)(x.Z,{id:"Gear.ClothingForm.ValueInfo",defaultMessage:"Choose the total value, of all the kit that you will have on you at any one time."})}):(0,i.jsx)(l.Z,{component:T.Z,name:"initialValue",fullWidth:!0,disabled:et||ei||!er,margin:"normal",type:"number",validate:ee,InputProps:{startAdornment:(0,i.jsx)(_.Z,{position:"start",children:K}),inputProps:{min:0,max:!J&&R.Y$,step:1}}}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("div",{children:eh}),(0,i.jsx)("div",{className:"fix-to-bottom",children:(0,i.jsxs)("div",{className:"form-actions",children:[(0,i.jsx)(S.Z,{submitError:g}),ep&&(0,i.jsx)(A.Z,{"data-testid":"required-photo-error",variant:"body2",color:"error",sx:{fontFamily:"Ambit",fontWeight:"bold",mb:2},children:c.formatMessage(L.s.splitUploaderRequiredPhotoError)}),(0,i.jsxs)(C.Z,{variant:"contained",disabled:o||!r&&!n||s||et||ep,type:"submit",color:"primary",fullWidth:!0,children:[o||s?(0,i.jsx)(f.Z,{size:25}):null,c.formatMessage(W.saveLabel)]})]})})]})]})})),X=()=>{let{query:{id:e}}=(0,r.useRouter)();return(0,i.jsx)($,{id:"add"!==e?e:null})}},97228:function(e,t,o){"use strict";var i=o(31549),r=o(19694),a=o(98342),n=o(44194),l=o(86094),s=o(28526),d=o(56261),u=o(20239);
1let c=(0,r.vU)({accessoriesValueExceedsMax:{id:"AddGear.SubmitError.AccessoriesValueExceedsMax",defaultMessage:"Sorry, the total combined values of Clothing and Accessories must be under {max}. Current value for Clothing is {otherValue}. Max value for Accessories is {maxAllowed}"},clothingValueExceedsMax:{id:"AddGear.SubmitError.ClothingValueExceedsMax",defaultMessage:"Sorry, the total combined values of Clothing and Accessories must be under {max}. Current value for Accessories is {otherValue}. Max value for Clothing is {maxAllowed}"}});t.Z=e=>{let{submitError:t}=e,o=(0,a.Z)(),r=(0,n.useContext)(u.Z);if(!t||!t.message)return null;{let e=r.defaultCurrency,a=t.graphQLErrors[0],{extensions:{exception:{metadata:n}}}=a,u=a.message;return Object.keys(c).forEach(t=>{if(a.message.includes(t)){let i;("clothingValueExceedsMax"===t||"accessoriesValueExceedsMax"===t)&&(i={max:(0,d.x)(o,e,n.max),otherValue:(0,d.x)(o,e,n.otherval),maxAllowed:(0,d.x)(o,e,parseInt(n.max)-parseInt(n.otherval))}),u=o.formatMessage(c[t],i)}}),(0,i.jsxs)(s.Z,{variant:"body2",gutterBottom:!0,style:{border:"2px solid #E95108",color:"#E95108",padding:8,display:"flex",alignItems:"center"},children:[(0,i.jsx)(l.Z,{style:{marginRight:8}}),u]})}}},75366:function(e,t,o){"use strict";o.d(t,{Z:function(){return l}});var i,r=o(21700),a=o.n(r),n=o(49994),l=(i=n.Z.getIn,function(e,t){a()(e,"Form value must be specified");var o=t||function(e){return i(e,"form")};return function(t){for(var r=arguments.length,l=Array(r>1?r-1:0),s=1;s<r;s++)l[s-1]=arguments[s];return a()(l.length,"No fields specified"),1===l.length?i(o(t),e+".values."+l[0]):l.reduce(function(r,a){var l=i(o(t),e+".values."+a);return void 0===l?r:n.Z.setIn(r,a,l)},{})}})},78186:function(e,t,o){"use strict";o.d(t,{Z:function(){return r}});var i,r=(i=o(49994).Z,function(e,t){var o,r,a,n=(o=i.deepEqual,r=i.empty,a=i.getIn,function(e,t){return function(i){for(var n=(t||function(e){return a(e,"form")})(i),l=arguments.length,s=Array(l>1?l-1:0),d=1;d<l;d++)s[d-1]=arguments[d];if(s&&s.length)return s.every(function(t){return o(a(n,e+".initial."+t),a(n,e+".values."+t))});var u=a(n,e+".initial")||r,c=a(n,e+".values")||u;return o(u,c)}})(e,t);return function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return!n.apply(void 0,[e].concat(o))}})}},function(e){e.O(0,[5972,8249,7009,1686,9966,7866,2847,9530,8171,2898,7841,5381,7341,8110,9969,1468,514,3154,1898,5693,27,4835,208,475,8069,2888,9774,179],function(){return e(e.s=14099)}),_N_E=e.O()}]);
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.