1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5802e95a-a8ba-4a4c-aeee-48948d735620",e._sentryDebugIdIdentifier="sentry-dbid-5802e95a-a8ba-4a4c-aeee-48948d735620")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9103,475],{28583:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cover",function(){return t(23255)}])},57997:function(e,a,t){"use strict";t.d(a,{Bq:function(){return n},ek:function(){return u},PH:function(){return o}});var i=t(65829),l=t(47094),r=t(93129);let o=e=>{if((0,l.J)(e))return e.toISOString();if("string"!=typeof e)return"";let a=new i.eJ(e);return(0,l.J)(a)&&(0,r.J)(a)?a.toISOString():""},n=e=>{if((0,l.J)(e))return e;if(!e||"string"!=typeof e)return null;let a=new i.eJ(e);return(0,l.J)(a)&&(0,r.J)(a)?a:null};var s=t(36740),d=t(42566);let c=function(e,a,t){let l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=new i.eJ(e),o=new i.eJ(a);if(!r||!o)throw Error("Invalid dates to compare");if(!t||!["days","months"].includes(t))throw Error("Invalid resolution supplied");let n="days"===t?(0,s.j)(o,r):(0,d.d)(o,r);return l?n:Math.abs(n)},u=(e,a)=>c(e,a,"days",!0)>0},20889:function(e,a,t){"use strict";t.d(a,{SN:function(){return n},UW:function(){return l},VA:function(){return r},cK:function(){return o},lW:function(){return u},rO:function(){return i}});let i={INVOICE:"Invoice",BANK_TRANSFER:"BankTransfer",BANK_TRANSFER_TRADE:"BankTransferTrade",BANK_TRANSFER_GOODWILL_LTD:"BankTransferGoodwillLTD",BANK_TRANSFER_GOODWILL_TRADE:"BankTransferGoodwillTrade",VOUCHER:"Voucher",CUSTOMER_TOP_UP:"CustomerTopUp",GOODWILL_TOP_UP:"GoodwillTopUp",REFUND:"Refund",RESERVE:"Reserve",REFUND_LTD:"RefundLtd",NET_SUBROGATION:"NetSubrogation",NET_SALVAGE:"NetSalvage",NET_SUBROGATION_REVERSAL:"NetSubrogationReversal",NET_SALVAGE_REVERSAL:"NetSalvageReversal"};i.BANK_TRANSFER_GOODWILL_LTD,i.BANK_TRANSFER_GOODWILL_TRADE,i.BANK_TRANSFER_GOODWILL_LTD,i.BANK_TRANSFER_GOODWILL_TRADE,i.GOODWILL_TOP_UP,i.BANK_TRANSFER,i.BANK_TRANSFER_TRADE,i.BANK_TRANSFER_GOODWILL_LTD,i.BANK_TRANSFER_GOODWILL_TRADE,i.INVOICE,i.VOUCHER,i.REFUND,i.BANK_TRANSFER_TRADE;let l={RESERVE:"reserve",WAITING_FOR_CUSTOMER:"waitingForCustomer",REFUND_PRESUMED:"refundPresumed",READY_TO_PAY:"readyToPay",PAYMENT_FAILED:"paymentFailed",PAID:"paid",RECONCILED:"reconciled",RECOUP:"recoup",DRAFT:"draft",DELETED:"deleted",LOCKED_FOR_PAYOUT:"lockedForPayout",REJECTED:"rejected"};Object.values(l).filter(e=>e!==l.REJECTED);let r=[l.PAID,l.RECONCILED,l.READY_TO_PAY,l.LOCKED_FOR_PAYOUT,l.DRAFT];l.PAID,l.RECOUP,l.PAID,l.RECONCILED;let o={ACCESSORIES:"Accessories",ASSESSMENT_COST:"Assessment cost",COST_ESTIMATE_FEE:"Cost estimate fee",BIKE_HIRE:"Bike hire",BRAKES:"Brakes",CLOTHING:"Clothing",COMPLETE_BIKE:"Complete bike",DAMAGE_ASSESSMENT:"Damage assessment",DRIVETRAIN:"Drivetrain",POLICE_REPORT:"Police Report",ELECTRICAL:"Electrical",FINISHING_KIT:"Finishing kit",FRAMESET:"Frameset",FULFILMENT:"Fulfilment",LABOUR:"Labour",LAKA_CREDIT:"Laka Credit",MEDICAL_EXPENSES:"Medical expenses",OTHER_PARTS:"Other parts",RECOVERY_CONVENIENCE_LIFESTYLE:"Recovery - Convenience / Lifestyle",RECOVERY_PERFORMANCE:"Recovery - performance",TRAVEL_COSTS:"Travel costs",WHEELSET:"Wheelset"},n={LESSOR:"Leasebuyout - Lessor",GAP_COVER:"Leasebuyout - GAP Cover",PROGRAMME_MANAGER_FEE:"Leasebuyout - ProgrammeManagerFee",BIKE_REPLACEMENT:"Leasebuyout - Bike Replacement",RI
1DER_CREDIT:"Rider credit towards new Lease"};o.COST_ESTIMATE_FEE,o.COST_ESTIMATE_FEE,n.RIDER_CREDIT,n.BIKE_REPLACEMENT;let s=[o.COST_ESTIMATE_FEE,"Replace inner tube","Replace tyre","Replace valve / tubeless service","Replace brake pads","Bleed brake","Replace brake disc","Adjust brake","Replace brake lever","Replace brake caliper","Replace or shorten brake line","Replace brake cable (mechanical)","Replace brake shoes (rim brake)","Replace chain","Replace cassette / sprockets","Replace chainring","Adjust rear derailleur","Replace rear derailleur","Replace derailleur hanger","Replace gear cable and housing","Replace shifter","Adjust front derailleur","Replace front derailleur","Service hub gear","Replace hub gear","Replace belt drive","Replace belt sprocket","Replace crank arm","Drivetrain wear inspection","True wheel","Replace spoke(s)","Replace wheel","Replace rim","Service hub","Replace hub dynamo","Replace thru-axle","Replace bottom bracket","Replace or service headset","Replace stem or handlebar","Replace grips or bar tape","Replace saddle","Replace seatpost","Replace seat clamp","Service suspension seatpost","Replace pedals","Repair lighting","Replace display","Motor diagnosis and service","Replace motor","Battery diagnosis","Replace battery","Firmware update","Replace speed sensor","Replace control unit / remote","Replace battery mount or lock","Replace charger","Repair motor cabling","Suspension fork service","Rear shock service","Frame or carbon repair","Replace frame lock","Replace chain guard","Replace luggage carrier","Fit basket or front carrier","Replace mudguard","Replace kickstand","Replace bell or mirror","First inspection","Small inspection","Full inspection","Cleaning and reconditioning","Other repair service (free text)"];o.COST_ESTIMATE_FEE,o.COMPLETE_BIKE,o.FRAMESET,o.DRIVETRAIN,o.POLICE_REPORT,o.BRAKES,o.WHEELSET,o.FINISHING_KIT,o.ELECTRICAL,o.ACCESSORIES,o.CLOTHING,o.LABOUR,o.DAMAGE_ASSESSMENT,o.OTHER_PARTS,o.ASSESSMENT_COST,o.MEDICAL_EXPENSES,o.RECOVERY_PERFORMANCE,o.RECOVERY_CONVENIENCE_LIFESTYLE,o.LABOUR,o.DAMAGE_ASSESSMENT,o.TRAVEL_COSTS,o.BIKE_HIRE,o.FULFILMENT;let d=[i.INVOICE,i.BANK_TRANSFER,i.VOUCHER,i.BANK_TRANSFER_TRADE,i.BANK_TRANSFER_GOODWILL_LTD,i.BANK_TRANSFER_GOODWILL_TRADE,i.RESERVE,i.CUSTOMER_TOP_UP,i.GOODWILL_TOP_UP],c={cover:["Property"],expenseType:[i.RESERVE,i.BANK_TRANSFER]},u={...Object.fromEntries(s.map(e=>[e,{cover:["Property"],expenseType:[i.BANK_TRANSFER]}])),[o.COST_ESTIMATE_FEE]:c,[n.LESSOR]:c,[n.GAP_COVER]:c,[n.PROGRAMME_MANAGER_FEE]:c,[n.BIKE_REPLACEMENT]:c,[n.RIDER_CREDIT]:c,[o.MEDICAL_EXPENSES]:{cover:["Health"],expenseType:[...d]},[o.RECOVERY_CONVENIENCE_LIFESTYLE]:{cover:["Health"],expenseType:[...d]},[o.RECOVERY_PERFORMANCE]:{cover:["Health"],expenseType:[...d]},[o.ASSESSMENT_COST]:{cover:["Health"],expenseType:[...d]},[o.ACCESSORIES]:{cover:["Property"],expenseType:[...d]},[o.BRAKES]:{cover:["Property"],expenseType:[...d]},[o.CLOTHING]:{cover:["Property"],expenseType:[...d]},[o.COMPLETE_BIKE]:{cover:["Property"],expenseType:[...d]},[o.DRIVETRAIN]:{cover:["Property"],expenseType:[...d]},[o.POLICE_REPORT]:{cover:["Property"],expenseType:[...d]},[o.ELECTRICAL]:{cover:["Property"],expenseType:[...d]},[o.FINISHING_KIT]:{cover:["Property"],expenseType:[...d]},[o.FRAMESET]:{cover:["Property"],expenseType:[...d]},[o.LABOUR]:{cover:["Property"],expenseType:[...d]},[o.DAMAGE_ASSESSMENT]:{cover:["Property"],expenseType:[...d]},[o.OTHER_PARTS]:{cover:["Property"],expenseType:[...d]},[o.WHEELSET]:{cover:["Property"],expenseType:[...d]},[o.BIKE_HIRE]:{cover:["Property"],expenseType:[i.INVOICE,i.BANK_TRANSFER]},[o.FULFILMENT]:{cover:["Property"],expenseType:[i.INVOICE,i.BANK_TRANSFER]},[o.TRAVEL_COSTS]:{cover:["Property"],expenseType:[i.INVOICE,i.BANK_TRANSFER]},[o.LAKA_CREDIT]:{cover:["Property"],expenseType:[i.BANK_TRANSFER]}};i.BANK_TRANSFER_GOODWILL_LTD,i.BANK_TRANSFER_GOODWILL_TRADE,i.BANK_TRANSFER_TRADE,i.BANK_TRANSFER,i.CUSTOMER_TOP_UP,i.GOODWILL_TOP_UP,i.INVOICE,i.NET_SALVAGE_REVERSAL,i.NET_SALVAGE,i.NET_SUBROGATION_REVERSAL,i.NET_SUBROGATION,i.REFUND_LTD,i.REFUND,i.RESERVE,i.VOUCHER},40475:function(e,a,t){"use strict";t.d(a,{TD:function(){return o},OM:function(){return r},$R:function(){return n},xL:function(){return i}}),[...new Set(["unreadable_document","wrong_document","insufficient_information","not_obtainable","not_applicable","not_covered","amount_disputed","duplicate","wrong_product","insufficient_information","not_applicable"])],t(20889);let i={DRAFT:"DRAFT",AWAITING_PAYOUT_DESTINATION_CONFIRMATION:"AWAITING_PAYOUT_DESTINATION_CONFIRMATION",READY:"READY",ATTEMPTING:"ATTEMPTING",NEEDS_REATTEMPT:"NEEDS_REATTEMPT",COMPLETED:"COMPLETED",FAILED:"FAILED",REJECTED:"REJECTED",BAD_STATE:"BAD_STATE",UNKNOWN:"UNKNOWN"};i.DRAFT,i.AWAITING_PAYOUT_DESTINATION_CONFIRMATION,i.READY;let l=["postalTown","postalCode","country"],r=e=>l.filter(a=>{var t;return!(null==e?void 0:null===(t=e[a])||void 0===t?void 0:t.trim())}),o=[{id:"923e5d5e-6b83-4906-9692-ff01d92aa691",name:"EScooter"},{id:"1d30d60f-fa5e-4e8d-89f7-7de7206d7166",name:"Gyroroue"},{id:"bfb49e66-f610-4cfd-82c3-1e985ff531e9",name:"Hoverboard"},{id:"6d31c84a-b094-4e7c-b176-ba7de75abe5b",name:"Longboard"},{id:"605c77a2-1a69-473c-b41a-4399744ed036",name:"UltraLightEScooter"},{id:"0daedce0-7353-4aa8-bbc9-f0e2c1a6fbfe",name:"Gyropode"},{id:"ba8eac7f-6e0e-4669-a5b2-e9cf74a910db",name:"Monocycle"}],n=e=>!!e&&o.some(a=>a.name===e);var s=t(53154);s.Ry({amount:s.Rx().optional(),currency:s.Z_().optional(),payoutId:s.Z_(),deeplinkUrl:s.Z_().optional()}),s.Ry({productId:s.Z_(),brand:s.Z_(),policyReference:s.Z_(),typeName:s.Z_().optional(),missingCount:s.Rx().optional()}),Object.values({PAYOUT_DESTINATION_REQUEST:{entityName:"Payouts",rootEntityName:"Claims",actionUrl:e=>"/payouts/".concat(e,"/payoutDestination"),translations:{tasksPayoutDestinationRequestTitle:{id:"tasks.payoutDestinationRequest.title",defaultMessage:"Confirm your payout details"},tasksPayoutDestinationRequestDescription:{id:"tasks.payoutDestinationRequest.description",defaultMessage:"We need you to confirm your payout destination for an outstanding payout."},tasksPayoutDestinationRequestDescriptionWithAmount:{id:"tasks.payoutDestinationRequest.descriptionWithAmount",defaultMessage:"We need you to confirm your payout destination for an outstanding payout of {amount}."}}},GEAR_MISSING_PHOTOS_BICYCLE:{entityName:"Products",rootEntityName:"Products",actionUrl:e=>"/gear/task/bike/".concat(e),translations:{tasksGearMissingPhotosBicycleTitle:{id:"tasks.gearMissingPhotosBicycle.title",defaultMessage:"Upload Bicycle Photos"},tasksGearMissingPhotosBicycleDescription:{id:"tasks.gearMissingPhotosBicycle.description",defaultMessage:"Please upload photos of your bicycle."},tasksGearMissingPhotosBicycleDescriptionWithName:{id:"tasks.gearMissingPhotosBicycle.descriptionWithName",defaultMessage:"Please upload photos of your {name} bicycle."}}},GEAR_MISSING_PHOTOS_NVEI:{entityName:"Products",rootEntityName:"Products",actionUrl:e=>"/gear/task/nvei/".concat(e),translations:{tasksGearMissingPhotosNveiTitle:{id:"tasks.gearMissingPhotosNvei.title",defaultMessage:"Upload Gear Photos"},tasksGearMissingPhotosNveiTitleWithType:{id:"tasks.gearMissingPhotosNvei.titleWithType",defaultMessage:"Upload {productType} Photos"},tasksGearMissingPhotosNveiDescription:{id:"tasks.gearMissingPhotosNvei.description",defaultMessage:"Please upload photos of your gear."},tasksGearMissingPhotosNveiDescriptionWithType:{id:"tasks.gearMissingPhotosNvei.descriptionWithType",defaultMessage:"Please upload photos of your {productType}."},tasksGearMissingPhotosNveiDescriptionWithNameAndType:{id:"tasks.gearMissingPhotosNvei.descriptionWithNameAndType",defaultMessage:"Please upload photos of your {name} {productType}."}}},GEAR_MISSING_PHOTOS_ACCESSORIES:{entityName:"Products",rootEntityName:"Products",actionUrl:e=>"/gear/task/accessories/".concat(e),translations:{tasksGearMissingPhotosAccessoriesTitle:{id:"tasks.gearMissingPhotosAccessories.title",defaultMessage:"Upload Accessory Photos"},tasksGearMissingPhotosAccessoriesDescription:{id:"tasks.gearMissingPhotosAccessories.description",defaultMessage:"Please upload photos of your accessories."},tasksGearMissingPhotosAccessoriesDescriptionWithCount:{id:"tasks.gearMissingPhotosAccessories.descriptionWithCount",defaultMessage:"Please upload photos of {count} accessories."}}},GEAR_MISSING_PHOTOS_CLOTHING:{entityName:"Products",rootEntityName:"Products",actionUrl:e=>"/gear/task/clothing/".concat(e),translations:{tasksGearMissingPhotosClothingTitle:{id:"tasks.gearMissingPhotosClothing.title",defaultMessage:"Upload Clothing Photos"},tasksGearMissingPhotosClothingDescription:{id:"tasks.gearMissingPhotosClothing.description",defaultMessage:"Please upload images of the kit you have on cover."}}}}).reduce((e,a)=>
1(Object.entries(a.translations).forEach(a=>{let[t,i]=a;if(e[t])throw Error("Duplicate translation key: ".concat(t));e[t]=i}),e),{});var d=t(43952);d.kq.GB_PROPERTY_CORE_NAME,d.kq.GB_COMPLETE_NAME,d.kq.GB_PROPERTY_PRO_W_LIABILITY_NAME,d.kq.NL_CORE_NAME,d.kq.NL_COMPLETE_NAME,d.kq.NL_COMPLETE_WITH_ADDON_NAME,d.kq.FR_CORE_NAME,d.kq.FR_COMPLETE_NAME,d.kq.FR_COMPLETE_WITH_ADDON_NAME,d.Dn.GB_PROPERTY_CORE_PACKAGE_ID,d.Dn.GB_COMPLETE_PACKAGE_ID,d.Dn.GB_PROPERTY_PRO_W_LIABILITY_PACKAGE_ID,d.Dn.NL_CORE_PACKAGE_ID,d.Dn.NL_COMPLETE_PACKAGE_ID,d.Dn.NL_COMPLETE_WITH_ADDON_PACKAGE_ID,d.Dn.FR_CORE_PACKAGE_ID,d.Dn.FR_COMPLETE_PACKAGE_ID,d.Dn.FR_COMPLETE_WITH_ADDON_PACKAGE_ID,d.Dn.GB_PROPERTY_CORE_PACKAGE_ID,d.Dn.GB_COMPLETE_PACKAGE_ID,d.Dn.GB_PROPERTY_PRO_W_LIABILITY_PACKAGE_ID,d.Dn.NL_CORE_PACKAGE_ID,d.Dn.NL_COMPLETE_PACKAGE_ID,d.Dn.NL_COMPLETE_WITH_ADDON_PACKAGE_ID,d.Dn.FR_CORE_PACKAGE_ID,d.Dn.FR_COMPLETE_PACKAGE_ID,d.Dn.FR_COMPLETE_WITH_ADDON_PACKAGE_ID,d.Dn.GB_PROPERTY_CORE_PACKAGE_ID,d.kq.GB_PROPERTY_CORE_NAME,d.Dn.GB_COMPLETE_PACKAGE_ID,d.kq.GB_COMPLETE_NAME,d.Dn.GB_PROPERTY_PRO_W_LIABILITY_PACKAGE_ID,d.kq.GB_PROPERTY_PRO_W_LIABILITY_NAME,d.Dn.GB_RECOVERY_PACKAGE_ID,d.kq.GB_RECOVERY_NAME,d.Dn.NL_CORE_PACKAGE_ID,d.kq.NL_CORE_NAME,d.Dn.NL_COMPLETE_PACKAGE_ID,d.kq.NL_COMPLETE_NAME,d.Dn.NL_COMPLETE_WITH_ADDON_PACKAGE_ID,d.kq.NL_COMPLETE_WITH_ADDON_NAME,d.Dn.FR_CORE_PACKAGE_ID,d.kq.FR_CORE_NAME,d.Dn.FR_COMPLETE_PACKAGE_ID,d.kq.FR_COMPLETE_NAME,d.Dn.FR_COMPLETE_WITH_ADDON_PACKAGE_ID,d.kq.FR_COMPLETE_WITH_ADDON_NAME},22891:function(e,a,t){"use strict";var i=t(31549),l=t(39209),r=t(48101),o=t(93434),n=t(88105),s=t(11090);a.Z=e=>{let{input:a,label:t,meta:{touched:d,error:c},...u}=e;return(0,i.jsxs)(n.Z,{variant:"outlined",...u,error:d&&c,children:[(0,i.jsx)(o.Z,{children:t}),(0,i.jsx)(l.Z,{error:c,variant:"standard",...a,...u,input:(0,i.jsx)(r.Z,{label:t})}),d&&c&&(0,i.jsx)(s.Z,{children:c})]})}},69162:function(e,a,t){"use strict";t.d(a,{E:function(){return o}});var i=t(31549),l=t(73938),r=t(75830);let o=(0,l.Z)(e=>({label:{whiteSpace:"initial"},chip:{margin:4,height:"auto",minHeight:32,border:"2px solid ".concat(e.palette.primary.main),justifyContent:"left"},container:{paddingRight:8}}))(e=>{let{options:a,classes:t,onChange:l,value:o,multiple:n=!1}=e,s=e=>{if(n){let a=Array.isArray(o)?[...o]:[];a.includes(e)?a=a.filter(a=>a!==e):a.push(e),0===a.length?l([]):l(a)}else l(e)};return(0,i.jsx)("div",{className:t.container,children:a.map((e,a)=>{let l=n?Array.isArray(o)&&o.includes(e.id):e.id===o;return(0,i.jsx)(r.Z,{onClick:()=>s(e.id),variant:l?"default":"outlined",label:e.label,icon:e.icon,className:t.chip,classes:{label:t.label},clickable:!0,id:"option_".concat(e.id),"data-test":"select-".concat(e.id),color:"primary"},"SelectList_".concat(e.id,"_").concat(a))})})});a.Z=e=>{let{input:a,...t}=e;return(0,i.jsx)(o,{...a,...t})}},42645:function(e,a,t){"use strict";var i=t(31549),l=t(54505),r=t(3079),o=t(64189);a.Z=(0,r.$j)(null,e=>({setFocused:()=>e((0,o.cN)()),setBlurred:()=>e((0,o.lF)())}))(e=>{let{input:a,input:{value:t},label:r,meta:{touched:o,error:n},onBlur:s,onFocus:d,setFocused:c,setBlurred:u,alternativeHelperText:y,...g}=e,p=!!((o||!o&&t)&&n),h=g.supressErrors;return(0,i.jsx)(l.Z,{variant:"outlined",error:p&&!h,helperText:p&&!h?n:y,label:r,InputProps:{onFocus:e=>{c(),d&&d(e)},onBlur:e=>{u(),s&&s(e)}},...a,...g})})},17937:function(e,a,t){"use strict";t.d(a,{w:function(){return r},z:function(){return o}});var i=t(19694),l=t(63839);let r=(0,i.vU)({theftFromHome:{id:"WhatsCovered.Description.TheftFromHome",defaultMessage:"Theft from your home, your locked vehicle and at sportives and triathlons in transition areas.",values:{lockType:"ART-2"}},cylantroTheftFromHome:{id:"WhatsCovered.Description.Cylantro.TheftFromHome",defaultMessage:"Theft at your home (in a locked premises) or outside, if your bike is locked by the frame to a fixed anchor point with an approved lock. Also covered in the event of theft by aggression.",values:{lockType:"ART-2"}},theftAwayFromHome:{id:"WhatsCovered.Description.TheftAwayFromHome",defaultMessage:"Theft away from your home when your bike is locked with a Sold Secure Gold rated lock or better. You are also covered if your bike is stolen from your person whilst out on a ride."},cylantroTheftAwayFromHome:{id:"WhatsCovered.Description.Cylantro.TheftAwayFromHome",defaultMessage:'Theft outside your home when your bike is locked to a fixed anchor point with an SRA-approved or FUB "2 roues" certified lock. Also covered in the event of theft by aggression.'},loss:{id:"WhatsCovered.Description.Loss",defaultMessage:"Loss caused by a third-party such as a removal company or airline."},racingCover:{id:"WhatsCovered.Description.RacingCover",defaultMessage:"Damage during racing which requires a valid racing licence."},worldwide:{id:"WhatsCovered.Description.Worldwide",defaultMessage:"Travel outside of the UK."},liability:{id:"WhatsCovered.Description.Liability",defaultMessage:"Up to \xa32m liability cover if you damage someone's property or need to defend yourself in court."},legalCosts:{id:"WhatsCovered.Description.LegalCosts",defaultMessage:"Cover for legal costs for pursuing a personal injury case after an accident that wasn't your fault. Be it driver or pothole."},eBike:{id:"WhatsCovered.Description.EBike",defaultMessage:"Any motor assisted bicycles classified as an EAPC."},damage:{id:"WhatsCovered.Description.Damage",defaultMessage:"Damage to the bicycle due to a collision, a fall, or other sudden and unforeseen damage event."},racingCover2:{id:"WhatsCovered.Description.RacingCover2",defaultMessage:"When your gear is used during professional races."},unlocked:{id:"WhatsCovered.Description.Unlocked",defaultMessage:"If you leave your bike unlocked away from home or abandon your bike."},cylantroUnlocked:{id:"WhatsCovered.Description.Cylantro.Unlocked",defaultMessage:"Theft if your bike was left unattended, not locked to a fixed anchor point, or not secured with an approved lock."},travelExpenses:{id:"WhatsCovered.Description.TravelExpenses",defaultMessage:"Travel expenses you incur as a result of an incident."},damage2:{id:"WhatsCovered.Description.Damage2",defaultMessage:"Damage to your gear during sportives and events that don't require a racing licence."},rental:{id:"WhatsCovered.Description.Rental",defaultMessage:"To keep you cycling - whatever happens. Youâll get up to \xa3200 towards the rental of a bike whilst youâre awaiting the fulfilment of a claim."},excess:{id:"WhatsCovered.Description.Excess",defaultMessage:"No excess to pay on bike claims. Excess is the amount it âcostsâ to make a claim, insurers normally deduct this from any payouts."},cylantroExcess:{id:"WhatsCovered.Description.Cylantro.Excess",defaultMessage:"A 10% excess applies to every claim: minimum â¬35, maximum â¬250 for repairs; minimum â¬50, maximum â¬250 in the event of total loss."},multiBike:{id:"WhatsCovered.Description.MultiBike",defaultMessage:"Get a 50% discount on any extra bikes that are in the same household and used by family members."}
1,euCoverage:{id:"WhatsCovered.Description.EUCoverage",defaultMessage:"Your bicycle is covered for overland travel within the EU for up to 48 hours outside the Netherlands"},wearAndTear:{id:"WhatsCovered.Description.WearAndTear",defaultMessage:"We will cover functional damage or mechanical breakdown to your bike arising from wear and tear that prevents norrmal usage, up to â¬1000 per year."},theftGenericTitle:{id:"Perk.Theft",defaultMessage:"Theft"},theftGenericDescription:{id:"Cover.Package.Theft.Description",defaultMessage:"Key reason. Bicycles, e-bikes and accessories are covered against theft. Be sure to check our requirements for locks."},recoveryTitle:{id:"Perk.Recovery",defaultMessage:"Recovery"},recoveryDescription:{id:"Cover.Package.Recovery.Description",defaultMessage:"A dedicated recovery team who will hunt for your bike for 48 hours as soon as you notify us via your app that your bike has been stolen."},damageTitle:{id:"Perk.Damage",defaultMessage:"Crash & Accidental Damage"},damageDescription:{id:"Cover.Package.Damage.Description",defaultMessage:"Traffic accident, collision with a hole in the road or vandalism: your bike and equipment are covered against damage."},roadsideRecoveryTitle:{id:"Perk.RoadsideRecovery",defaultMessage:"Roadside Recovery"},roadsideRecoveryDescription:{id:"Cover.Package.RoadsideRecovery.Description",defaultMessage:"After an accident or theft, you are assured that we will bring you home safely, with or without your bike."},bikeRentalTitle:{id:"Perk.Rental",defaultMessage:"Bike Hire"},worldwideTravelTitle:{id:"Cover.Package.WorldWide.Title",defaultMessage:"Worldwide travel"},worldwideTravelDescription:{id:"Cover.Package.WorldWide.Description",defaultMessage:"Your equipment is insured worldwide for up to 120 consecutive days. If you are travelling for longer, simply contact us - together we will find a solution."},lossTitle:{id:"Cover.Package.Loss.Title",defaultMessage:"Loss"},lossDescription:{id:"Cover.Package.Loss.Description",defaultMessage:"You are covered if your bike is lost in the care of a third party (such as an airline or haulage company)"},thirdPartyPropertyDamage:{id:"WhatsCovered.Description.ThirdPartyPropertyDamage",defaultMessage:"Third party property damages caused by you driving your insured vehicle up to the limit shown on your schedule."},thirdPartyInjury:{id:"WhatsCovered.Description.ThirdPartyInjury",defaultMessage:"Bodily injuries to third parties are compensated without a coverage limit."},thirdPartyLegalCosts:{id:"WhatsCovered.Description.ThirdPartyLegalCosts",defaultMessage:"Legal fees are covered in additon to these limits for any legal action against you."},thirdPartyLegalDefence:{id:"WhatsCovered.Description.ThirdPartyLegalDefence",defaultMessage:"Fees incurred to defend you when a third party is responsible for a traffic accident that causes you damage."},passengerDamage:{id:"WhatsCovered.Description.PassengerDamage",defaultMessage:"Damages caused to passengers on the insured vehicle, even if they are listed on the contract."},finesOrCriminalConvictions:{id:"WhatsCovered.Description.FinesOrCriminalConvictions",defaultMessage:"Fines or criminal convictions and other penalties."},civilLiability:{id:"WhatsCovered.Description.CivilLiability",defaultMessage:"The consequences of your professional civil liability."},defenceUnderInfluence:{id:"WhatsCovered.Description.DefenceUnderInfluence",defaultMessage:"Defence of the driver in case of driving under the influence of alcohol or drugs."},wearAndTearTitle:{id:"Cover.Package.WearAndTear.Title",defaultMessage:"Wear & Tear"},wearAndTearDescription:{id:"Cover.Package.WearAndTear.Description",defaultMessage:"We will cover functional damage or mechanical breakdown to your bike arising from wear and tear that prevents normal usage, up to â¬1000 per year."},cylantroBikeRegistration:{id:"WhatsCovered.Description.Cylantro.BikeRegistration",defaultMessage:"Theft of a bike not registered on the FNUCI national cycle register."},cylantroRepairCosts:{id:"WhatsCovered.Description.Cylantro.RepairCosts",defaultMessage:"Repair costs incurred without prior approval from the insurer."},cylantroAestheticDamage:{id:"WhatsCovered.Description.Cylantro.AestheticDamage",defaultMessage:"Cosmetic damage such as scratches, scuffs, dents or discolouration."},cylantroWorldwide:{id:"WhatsCovered.Description.Cylantro.Worldwide",defaultMessage:"Diagnosis, repair and settlement of your bike can only take place in mainland France and in euros, even if the incident occurs abroad."}}),o=e=>({[l.Bu]:{included:[r.theftAwayFromHome,r.liability,r.legalCosts,r.loss,r.eBike,r.theftFromHome],excluded:[r.damage,r.racingCover,r.racingCover2,r.unlocked,r.travelExpenses,r.damage2]},[l.pA]:{included:[r.theftAwayFromHome,r.damage,r.legalCosts,r.loss,r.eBike,r.travelExpenses,r.liability,r.theftFromHome,r.damage2],excluded:[r.racingCover,r.worldwide,r.racingCover2,r.unlocked]},[l.Zq]:{included:[r.theftAwayFromHome,r.damage,r.legalCosts,r.loss,r.eBike,r.travelExpenses,r.liability,r.theftFromHome,r.damage2],excluded:[r.racingCover,r.worldwide,r.racingCover2,r.unlocked]},[l.wb]:{included:[r.theftAwayFromHome,r.damage,r.legalCosts,r.loss,r.eBike,r.travelExpenses,r.liability,r.theftFromHome,r.damage2],excluded:[r.racingCover,r.worldwide,r.racingCover2,r.unlocked]},[l.y3]:{included:[],excluded:[]},[l.wQ]:{included:[r.theftAwayFromHome,r.damage,r.legalCosts,r.loss,r.eBike,r.travelExpenses,r.theftFromHome,r.damage2],excluded:[r.racingCover,r.worldwide,r.racingCover2,r.unlocked]},[l.oF]:{included:[r.theftFromHome,r.theftAwayFromHome,r.damage,r.damage2,r.loss,r.travelExpenses,r.rental,r.excess,r.multiBike,r.euCoverage],excluded:[r.racingCover,r.racingCover2,r.worldwide,r.unlocked]},[l.lD]:{included:[r.theftFromHome,r.theftAwayFromHome,r.rental,r.excess,r.multiBike,r.euCoverage],excluded:[r.loss,r.damage,r.damage2,r.racingCover,r.racingCover2,r.unlocked,r.travelExpenses]},[l.yt]:{included:[r.theftFromHome,r.theftAwayFromHome,r.damage,r.damage2,r.loss,r.travelExpenses,r.rental,r.excess,r.multiBike,r.euCoverage],excluded:[r.racingCover,r.racingCover2,r.worldwide,r.unlocked]},[l.sX]:{included:[r.theftAwayFromHome,r.damage,r.legalCosts,r.loss,r.eBike,r.travelExpenses,r.theftFromHome,r.damage2],excluded:[r.racingCover,r.worldwide,r.racingCover2,r.unlocked]},[l.Xk]:{included:[r.theftFromHome,r.theftAwayFromHome,r.rental,r.excess,r.multiBike,r.euCoverage],excluded:[r.loss,r.damage,r.damage2,r.racingCover,r.racingCover2,r.unlocked,r.travelExpenses]},[l.cr]:{included:[r.thirdPartyPropertyDamage,r.thirdPartyInjury,r.thirdPartyLegalCosts,r.thirdPartyLegalDefence],excluded:[r.passengerDamage,r.finesOrCriminalConvictions,r.civilLiability,r.defenceUnderInfluence]},[l.t$]:{included:[r.theftFromHome,r.theftAwayFromHome,r.loss,r.damage],excluded:[r.racingCover,r.racingCover2,r.unlocked,r.travelExpenses,r.damage2,r.liability,r.legalCosts,r.eBike]},[l.a$]:{included:[r.theftFromHome,r.theftAwayFromHome],excluded:[r.racingCover,r.racingCover2,r.unlocked,r.travelExpenses,r.damage2,r.liability,r.legalCosts,r.eBike,r.loss,r.damage]},[l.Gh]:{included:[r.damage],excluded:[r.racingCover,r.racingCover2,r.unlocked,r.travelExpenses,r.damage2,r.liability,r.legalCosts,r.eBike,r.loss,r.theftFromHome,r.theftAwayFromHome]},[l.DY]:{included:[],excluded:[]},[l.Z4]:{included:[r.theftFromHome,r.theftAwayFromHome,r.damage,r.damage2,r.wearAndTear,r.loss,r.worldwide,r.rental,r.racingCover,r.racingCover2,r.euCoverage],excluded:[r.unlocked,r.travelExpenses,r.excess,r.multiBike]},[l.i]:{included:[r.cylantroTheftFromHome,r.cylantroTheftAwayFromHome],excluded:[r.damage,r.damage2,r.cylantroUnlocked,r.travelExpenses,r.cylantroExcess,r.cylantroBikeRegistration]},[l.vS]:{included:[r.cylantroTheftFromHome,r.cylantroTheftAwayFromHome,r.damage,r.damage2],excluded:[r.cylantroWorldwide,r.racingCover,r.racingCover2,r.cylantroUnlocked,r.travelExpenses,r.cylantroExcess,r.cylantroBikeRegistration,r.cylantroRepairCosts,r.cylantroAestheticDamage]}})[e]},56261:function(e,a,t){"use strict";t.d(a,{j:function(){return o},x:function(){return r}});let i={minimumFractionDigits:0,maximumFractionDigits:0},l={minimumFractionDigits:2},r=function(e,a,t){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a?e.formatNumber(t,{style:"currency",currency:a,...t%1==0?i:l,...r}):t},o=(e,a)=>{let t=e.formatNumberToParts(0,{style:"currency",currency:a}).find(e=>"currency"===e.type);return null==t?void 0:t.value}},44392:function(e,a,t){"use strict";t.d(a,{D:function(){return o},y:function(){return n}});var i=t(11408),l=t(125),r=t(22447);let o=(0,i.Z)(r.b0),n=(0,l.ZP)({defaultTheme:o})},23255:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return iE}});var i=t(31549),l=t(44194),r=t(19694),o=t(89274),n=t.n(o),s=t(54835),d=t(3079),c=t(23828),u=t(98342),y=t(59966),g=t(28526),p=t(57661),h=t(89708),m=t(84025),v=t.n(m),f=t(75366),x=t(92995),C=t(64023),P=t(53530),b=t(72817),j=t(63384),M=t(73938),D=t(36582),E=t(21055),A=t(12100),R=t(22891),T=t(42645),k=t(36134),S=t(92217),Z=t(77377),I=t(20398),w=t(54470),_=e=>{let{intl:a,width:t,classes:r,BackButton:o,selectedReason:n,otherTextLength:s,showOtherField:d,withinCoolingOff:c,finalDate:u,nextStep:y,closeCancelDialog:p,pause:h,policyType:m,policyLabel:v,clubCancellationReasons:f,policyCancellationReasons:x,messagesPause:C,messagesCancel:P,propertyCancellationReasons:b,isLastStep:j,handleSubmit:M,submitCancelPolicy:_}=e,O=["LiabilityClubMonthly","Liability"].includes(v),L="property"===m.toLowerCase()||"thirdpartyliability"===m.toLowerCase(),B=O?f:L?b:x,N=(e=>{let a,t,i=e.length-2;for(;0!==i;)t=Math.floor(Math.random()*i),i-=1,a=e[i],e[i]=e[t],e[t]=a;return e})(Object.keys(B)),Y="xs"===t?12:"1rem",F=h?C:P;F.checkboxConfirmDefault,!0===c?F.checkboxConfirmCoolingOff:!1===c&&(u?F.checkboxConfirmCancelImmediately:F.checkboxConfirm);let W={Health:F.titleHealth,Property:F.titleProperty,LiabilityClubMonthly:F.titleMonthlyLiability,Liability:F.titleMonthlyLiability,LukoThirdPartyLiability:F.titleProperty};return(0,i.jsxs)(l.Fragment,{children:[(0,i.jsxs)(S.Z,{children:[o&&(0,l.createElement)(o,{}),a.formatMessage(W[v]),(0,i.jsx)(g.Z,{variant:"subtitle1",children:O?a.formatMessage(F.clubSubtitle):a.formatMessage(F.subtitle)})]}),(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(A.Z,{margin:"normal",fullWidth:!0,id:"reasonSelect",name:"reasonSelect",component:R.Z,label:O?a.formatMessage(F.clubReasonLabel):a.formatMessage(F.reasonLabel),children:N.map((e,t)=>(0,i.jsx)(k.Z,{value:a.formatMessage(B[e]),style:{fontSize:Y}
1,children:a.formatMessage(B[e])},t))}),(0,i.jsx)(w.Z,{in:d,children:(0,i.jsx)(A.Z,{fullWidth:!0,margin:"normal",id:"reasonOther",name:"reasonOther",component:T.Z,inputProps:{maxLength:247},helperText:(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.UsedCharacters",defaultMessage:"{usedCharacters} / 247 characters",values:{usedCharacters:s}}),multiline:!0,rows:3,rowsMax:"xs"==t||"sm"==t?6:3})}),(0,i.jsx)(g.Z,{variant:"body2",paragraph:!0,children:O?(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.LakaClub.CancellationDisclaimer",defaultMessage:"You'll receive a bill for your final month's membership at the end of this month"}):(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.CancellationDisclaimer",defaultMessage:"You'll receive a bill for your share at the end of the month but you'll only pay for the days you were covered this month"})})]}),(0,i.jsxs)(I.Z,{className:r.dialogActions,children:[(0,i.jsx)(E.Z,{variant:"outlined",fullWidth:!0,style:{display:"block"},onClick:p,className:r.actionButtons,children:a.formatMessage(F.exitLabel)},"close"),(0,i.jsx)(E.Z,{fullWidth:!0,variant:"contained",color:"primary",disabled:(!n||"Other"===n)&&0===s,type:"submit",className:r.actionButtons,onClick:j?M(_):y,children:j?(0,i.jsx)(D.Z,{id:"Generic.Cancel",defaultMessage:"Cancel"}):(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.Confirm",defaultMessage:"Next"})},"cancel")]})]})},O=t(69162),L=t(54505),B=t(39209),N=t(88105),Y=t(48101),F=t(93434),W=t(92847),H=t(11090),U=t(64189),G=t(34151);let K=(0,r.vU)({day:{id:"DOBSelector.Day",defaultMessage:"Day"},month:{id:"DOBSelector.Month",defaultMessage:"Month"},year:{id:"DOBSelector.Year",defaultMessage:"Year"}}),V=(0,c.qC)(C.ZP,(0,d.$j)((e,a)=>{let t=v()();t.locale(a.intl.locale);let i=t.localeData().months(),l=v()(a.value);if(l.isValid()){var r;return{year:l.year(),month:l.month()+1,day:l.date(),months:i,daysInMonth:l.daysInMonth(),policyType:(null===(r=e.onboarding)||void 0===r?void 0:r.policyType)||a.policyType}}return{months:i}},e=>({setFocused:()=>e((0,U.cN)()),setBlurred:()=>e((0,U.lF)())})))(e=>{var a,t,r;let[o,n]=(0,l.useState)({day:null!==(a=e.day)&&void 0!==a?a:"",month:null!==(t=e.month)&&void 0!==t?t:"",year:null!==(r=e.year)&&void 0!==r?r:"",daysInMonth:e.daysInMonth}),s=(a,t)=>{let{day:i,month:l,year:r}=o,{onChange:s}=e,d={day:i,month:l,year:r};d[a]=t;let c=v().utc([d.year,d.month-1,d.day]);n(d),c.isValid()&&s(c)},{label:d,onBlur:c,onFocus:u,setFocused:y,setBlurred:g,required:p,months:h,intl:m,policyType:f,...x}=e,C=(0,G.QE)("sm"),{month:P,day:b,year:j,daysInMonth:M}=o,D=v()().format("YYYY")-("liability"===f?16:18),E=v()().format("YYYY")-80,A=e=>{g(),c&&c()},R=e=>{y(),u&&u()};return(0,i.jsx)("div",{children:(0,i.jsxs)(W.ZP,{container:!0,spacing:1,style:e.center?{maxWidth:400,margin:"16px auto 8px"}:{margin:"16px 0px 8px"},children:[(0,i.jsx)(W.ZP,{item:!0,xs:12,children:d||p?(0,i.jsxs)(F.Z,{style:{marginBottom:8},children:[d,p?" *":""]}):null}),(0,i.jsx)(W.ZP,{item:!0,xs:3,children:(0,i.jsx)(L.Z,{variant:"outlined",fullWidth:!0,label:m.formatMessage(K.day),name:"dob.day",id:"day",type:"number",inputProps:{min:1,max:M,autoComplete:"bday-day",inputMode:"numeric"},max:M,value:b,onChange:e=>s("day",e.target.value),onBlur:A,onFocus:R})}),(0,i.jsx)(W.ZP,{item:!0,xs:6,children:(0,i.jsxs)(N.Z,{variant:"outlined",fullWidth:!0,children:[(0,i.jsx)(F.Z,{htmlFor:"month",children:m.formatMessage(K.month)}),(0,i.jsxs)(B.Z,{name:"dob.month",native:C,value:P,onChange:e=>s("month",e.target.value),onBlur:A,onFocus:R,inputProps:{autoComplete:"bday-month"},input:(0,i.jsx)(Y.Z,{label:m.formatMessage(K.month)}),children:[C&&(0,i.jsx)("option",{disabled:!0,value:""}),C?h.map((e,a)=>(0,i.jsx)("option",{value:a+1,children:e},e)):h.map((e,a)=>(0,i.jsx)(k.Z,{value:a+1,children:e},e))]})]})}),(0,i.jsx)(W.ZP,{item:!0,xs:3,children:(0,i.jsx)(L.Z,{label:m.formatMessage(K.year),variant:"outlined",name:"dob.year",id:"year",type:"number",fullWidth:!0,inputProps:{max:D,min:E,autoComplete:"bday-year",inputMode:"numeric"},onChange:e=>s("year",e.target.value),onBlur:A,onFocus:R,value:j})})]})})});var q=(0,C.ZP)(e=>
1{let{input:a,input:{value:t},label:r,meta:o,meta:{touched:n,dirty:s,error:d},...c}=e;return(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(V,{helperText:r,label:r,...a,...c}),(0,i.jsx)(H.Z,{error:!0,children:(n||!n&&t)&&d})]})}),z=e=>{let{classes:a,BackButton:t,reactivationDateActual:r,showDatePicker:o,canAutomaticallyCreatePolicy:n,handleSubmit:s,submitCancelPolicy:d,submitCancelPolicyReactivate:c,cancelInProgress:u,policyLabel:y}=e,p="LiabilityClubMonthly"===y,h=r?r.format("MMMM"):"",m=!r||r.isBefore(v()().add(29,"days"));return(0,i.jsxs)(l.Fragment,{children:[(0,i.jsxs)(S.Z,{children:[t&&(0,l.createElement)(t,{}),(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.TitleReactivate",defaultMessage:"Pick up where you left off"}),(0,i.jsx)(g.Z,{variant:"subtitle1",children:p?(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.LakaClub.SubtitleReactivate",defaultMessage:"We can automatically reactivate your membership if you'd like to."}):(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.SubtitleReactivate",defaultMessage:"We can automatically reactivate your cover if you'd like to. You will get a reminder including a quote a few days before your cover reactivates"})})]}),(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(g.Z,{variant:"body1",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.ReactivateIn",defaultMessage:"Reactivate in"})}),(0,i.jsx)(A.Z,{name:"reactivationDateQuick",component:O.Z,options:[{id:2,label:(0,i.jsx)(D.Z,{id:"Cover.CancelCoverDialog.ReactivateSelect.Option2months",defaultMessage:"2 months"})},{id:4,label:(0,i.jsx)(D.Z,{id:"Cover.CancelCoverDialog.ReactivateSelect.Option4months",defaultMessage:"4 months"})},{id:6,label:(0,i.jsx)(D.Z,{id:"Cover.CancelCoverDialog.ReactivateSelect.Option6months",defaultMessage:"6 months"})},{id:"Other",label:(0,i.jsx)(D.Z,{id:"Cover.CancelCoverDialog.ReactivateSelect.OptionAnotherDate",defaultMessage:"Another Date"})}]}),(0,i.jsx)("br",{}),o&&(0,i.jsx)(A.Z,{id:"reactivationDate",name:"reactivationDate",policyType:y,component:q}),o&&m&&(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.ReactivateErrorMessage",defaultMessage:"Reactivation date must be at least 30 days in the future"})}),!1===n&&(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.ReactivateMessage",defaultMessage:"As this date is more than 60 days in the future, we are not able to automatically reactivate your cover. But we'll send you a reminder when the time comes"})})]}),(0,i.jsxs)(I.Z,{className:a.dialogActions,children:[(0,i.jsx)(E.Z,{color:"primary",variant:"outlined",fullWidth:!0,style:{display:"block"},onClick:s(d),className:a.actionButtons,disabled:u,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.ConfirmNoReactivate",defaultMessage:"Don't Reactivate"})},"close"),(0,i.jsx)(E.Z,{fullWidth:!0,variant:"contained",color:"primary",disabled:m||u,type:"submit",className:a.actionButtons,onClick:s(c),children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.CancelDialog.ConfirmReactivate",defaultMessage:"Reactivate {prefix} {month}",values:{month:h,prefix:h?"in":""}})},"cancel")]})]})},$=t(74980),Q=t(4383);let J=(0,r.vU)({titleHealth:{id:"YourPolicyCard.CancelDialog.Health.PauseTitle",defaultMessage:"Pause Your Injury Cover"},titleProperty:{id:"YourPolicyCard.CancelDialog.Recovery.PauseTitle",defaultMessage:"Pause Your Bicycle Policy"},titleMonthlyLiability:{id:"YourPolicyCard.CancelDialog.MonthlyLiability.PauseTitle.",defaultMessage:"Pause Your Membership"},subtitle:{id:"YourPolicyCard.CancelDialog.PauseSubtitle",defaultMessage:"Help us improve our service by understanding why you are pausing your cover"},clubSubtitle:{id:"YourPolicyCard.CancelDialog.LakaClub.PauseSubtitle",defaultMessage:"Help us improve our service by understanding why you are pausing your membership"},checkboxConfirm:{id:"YourPolicyCard.CancelDialog.PauseCheckboxConfirm",defaultMessage:"I understand that I will still be charged at the end of the month for my share of the claims"},checkboxConfirmCoolingOff:{id:"YourPolicyCard.CancelDialog.PauseCheckboxConfirmCoolingOff",defaultMessage:"I understand that I am pausing within the 14 day cooling off period, and I will not be billed until I resume my cover"},checkboxConfirmCancelImmediately:{id:"YourPolicyCard.CancelDialog.PauseConfirmCancelImmediately",defaultMessage:"I understand that I am pausing my policy immediately, and will not be charged any further, until I resume my cover"},checkboxConfirmDefault:{id:"YourPolicyCard.CancelDialog.PauseCheckboxConfirmDefault",defaultMessage:"I understand that if I am pausing outside of the 14 day cooling off period, I will still be charged at the end of this month for my share of the claims"},reasonLabel:{id:"YourPolicyCard.CancelDialog.PauseReasonLabel",defaultMessage:"Reason for pausing cover"},clubReasonLabel:{id:"YourPolicyCard.CancelDialog.LakaClub.PauseReasonLabel",defaultMessage:"Reason for pausing membership"},exitLabel:{id:"YourPolicyCard.CancelDialog.PauseExitLabel",defaultMessage:"Exit without pausing"},chargeDisclosureWithinCoolingOff:{id:"YourPolicyCard.CancelDialog.PauseChargeDisclosureWithinCoolingOff",defaultMessage:"You can pause your cover at any time - you are within your 14 day cooling off period so you will not be billed."},chargeDisclosure:{id:"YourPolicyCard.CancelDialog.PauseChargeDisclosure",defaultMessage:"You can pause your cover at any time - but please bear in mind that you will still be charged for your share of the charges until {coverEnd}."},chargeDisclosureDefault:{id:"YourPolicyCard.CancelDialog.PauseChargeDisclosureDefault",defaultMessage:"You can pause your cover at any time - but please bear in mind that if you are outside of the 14 day cooling off period you will still be charged for your share of the charges until {coverEnd}."}}),X=(0,r.vU)({titleHealth:{id:"YourPolicyCard.CancelDialog.TitleHealth",defaultMessage:"Cancelling Your Injury Cover"},titleProperty:{id:"YourPolicyCard.CancelDialog.TitleProperty",defaultMessage:"Cancelling Your Bicycle\xa0Policy"},titleMonthlyLiability:{id:"YourPolicyCard.CancelDialog.TitleMonthlyLiability",defaultMessage:"Cancel Your Membership"},subtitle:{id:"YourPolicyCard.CancelDialog.Subtitle",defaultMessage:"Help us improve our service by understanding why you are cancelling your policy"},clubSubtitle:{id:"YourPolicyCard.CancelDialog.LakaClub.Subtitle",defaultMessage:"Help us improve our service by understanding why you are cancelling your membership"},checkboxConfirm:{id:"YourPolicyCard.CancelDialog.CheckboxConfirm",defaultMessage:"I understand that I will still be charged at the end of the month for my share of the claims"},checkboxConfirmCoolingOff:{id:"YourPolicyCard.CancelDialog.CheckboxConfirmCoolingOff",defaultMessage:"I understand that I am cancelling within the 14 day cooling off period. My cover will be void, and I will not be billed"},checkboxConfirmCancelImmediately:{id:"YourPolicyCard.CancelDialog.ConfirmCancelImmediately",defaultMessage:"I understand that I am terminating my policy immediately, and will not be charged any further"},checkboxConfirmDefault:{id:"YourPolicyCard.CancelDialog.CheckboxConfirmDefault",defaultMessage:"I understand that if I am cancelling outside of the 14 day cooling off period, I will still be charged at the end of the month for my share of the claims"},reasonLabel:{id:"YourPolicyCard.CancelDialog.ReasonLabel",defaultMessage:"Reason for cancelling policy"},clubReasonLabel:{id:"YourPolicyCard.CancelDialog.LakaClub.Cancel.ReasonLabel",defaultMessage:"Reason for cancelling membership"},exitLabel:{id:"YourPolicyCard.CancelDialog.ExitLabel",defaultMessage:"Exit without cancelling"},chargeDisclosureWithinCoolingOff:{id:"YourPolicyCard.CancelDialog.ChargeDisclosureWithinCoolingOff",defaultMessage:"You can cancel your policy at any time - you are within your 14 day cooling off period so you will not be billed."},chargeDisclosure:{id:"YourPolicyCard.CancelDialog.ChargeDisclosure",defaultMessage:"You can cancel your policy at any time - but please bear in mind that you will still be charged for your share of the charges until {coverEnd}."},chargeDisclosureDefault:{id:"YourPolicyCard.CancelDialog.ChargeDisclosureDefault",defaultMessage:"You can cancel your policy at any time - but please bear in mind that if you are outside of the 14 day cooling off period you will still be charged for your share of the charges until {coverEnd}."}}),ee=(0,r.vU)({homeContentsInsurer:{id:"CancelPolicy.Reason.HomeContents",defaultMessage:"I have home contents insurance"},anotherCycleInsurer:{id:"CancelPolicy.Reason.AnotherCycleInsurer",defaultMessage:"I moved to another cycle insurer"},moreExpensive:{id:"CancelPolicy.Reason.MoreExpensive",defaultMessage:"Laka is more expensive than expected"},justForRacing:{id:"CancelPolicy.Reason.JustForRacing",defaultMessage:"I only needed cover for racing"},specificTrip:{id:"CancelPolicy.Reason.SpecificTrip",defaultMessage:"I only needed cover for a specific event/trip"},covid19:{id:"CancelPolicy.Reason.Covid19",defaultMessage:"Coronavirus/Covid-19 Concerns"},other:{id:"CancelPolicy.Reason.Other",defaultMessage:"Other"}}),ea=(0,r.vU)({homeContentsInsurer:{id:"CancelPolicy.Reason.HomeInsurer",defaultMessage:"I'm covered on my home contents insurance"},anotherCycleInsurer:{id:"CancelPolicy.Reason.AnotherInsurer",defaultMessage:"I'm moving to another bike insurer"},moreExpensive:{id:"CancelPolicy.Reason.TooExpensive",defaultMessage:"Laka is too expensive"},justForRacing:{id:"CancelPolicy.Reason.JustRacing",defaultMessage:"I only need racing cover"},specificTrip:{id:"CancelPolicy.Reason.SpecificEventOrTrip",defaultMessage:"I only needed cover for a specific event/trip"},takingBreak:{id:"CancelPolicy.Reason.TakingBreak",defaultMessage:"I'm taking a break from cycling"},movingAway:{id:"CancelPolicy.Reason.MovingAwayFromUK",defaultMessage:"I'm moving away from UK"},other:{id:"CancelPolicy.Reason.OtherReason",defaultMessage:"Other"},preferNotToSay:{id:"CancelPolicy.Reason.PreferNotToSay",defaultMessage:"I'd prefer not to say"}}),et=(0,r.vU)({alreadyHaveBenefits:{id:"CancelMembership.Reason.AlreadyHaveBenefits",defaultMessage:"I already have these benefits elsewhere"},notUsingBenefits:{id:"CancelMembership.Reason.NotUsingBenefits",defaultMessage:"Iâm not using the Club benefits"},savingMoney:{id:"CancelMembership.Reason.SavingMoney",defaultMessage:"I like the benefits, but Iâm saving money"},other:{id:"CancelPolicy.Reason.Other",defaultMessage:"Other"}});var ei=(0,c.qC)((0,d.$j)((e,a)=>{let{formatMessage:t}=(0,Q.Z)(),i=t(ee.other),l=e.cover.selectedPolicy||a.policy,r=(0,f.Z)("cancelPolicy"),o=r
1(e,"voidCurrentMonth"),n=l?l.coverEnd:null,s="true"===o&&n?v()(n).subtract(1,"months").endOf("month"):null,d=r(e,"reasonSelect"),c=r(e,"reasonOther"),u=c?c.length:0,y=r(e,"reactivationDateQuick"),g=y===i,p=r(e,"reactivationDate"),h=g?v()(p):y?v()().add(30*y,"days"):null,m=h?h.isBefore(v()().add(60,"days")):void 0;return{initialValues:{reactivationDate:v()().add(30,"days").format()},voidCurrentMonth:o,finalDate:s,cancelDialogOpen:e.cover.cancelDialogOpen||a.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress,pause:e.cover.pauseCover,showOtherField:d===i,otherTextLength:u,otherTextValue:c,selectedReason:d,showDatePicker:g,reactivationDateActual:h,canAutomaticallyCreatePolicy:m,policy:l,otherStr:i}},e=>({closeCancelDialog:()=>e((0,$.Xv)()),pauseSubscription:(a,t,i,l,r,o)=>e((0,$.Ks)(a,t,i,l,r,o,!1)),cancelSubscription:(a,t,i,l,r,o,n)=>e((0,$.EO)(a,t,i,l,r,o,n,!1))})),(0,x.Z)({destroyOnUnmount:!1,forceUnregisterOnUnmount:!0,form:"cancelPolicy"}),(0,M.Z)(e=>({dialogActions:{[e.breakpoints.down("sm")]:{flexDirection:"column-reverse"}},actionButtons:{[e.breakpoints.down("sm")]:{margin:0,marginBottom:8}}})),C.ZP)(e=>{let[a,t]=(0,l.useState)(!1),[r,o]=(0,l.useState)(0),n=()=>{o(r-1)},s=a=>{let{pauseSubscription:t,cancelSubscription:i,voidCurrentMonth:l,pause:r,otherStr:o,policy:n}=e,{reasonSelect:s}=a,d=s;if(s===o){let{reasonOther:e}=a;d="".concat(o,": ").concat(e)}r?t(n.personId,n.package.id,d,null,null,"true"===l):i(n.personId,n.package.id,n.id,d,null,null,"true"===l)},{cancelDialogOpen:d,closeCancelDialog:c,policy:u,policyType:y,cancelInProgress:g,showOtherField:p,otherTextLength:h,handleSubmit:m,selectedReason:f,classes:x,showDatePicker:C,reactivationDateActual:M,canAutomaticallyCreatePolicy:D,finalDate:E,pause:A,intl:R}=e,T=(0,G.QE)("sm"),k=u.coverInception?!!v()().isBefore(v()(u.coverInception).add(14,"days")):void 0,S="liabilityClubMonthly"===u.policyType,Z=r>0?()=>(0,i.jsx)(b.Z,{style:{marginRight:8,paddingLeft:0,paddingRight:0},onClick:()=>{n()},size:"large",children:(0,i.jsx)(j.Z,{})}):null,I=[];return I.push({component:_,props:{classes:x,BackButton:Z,selectedReason:f,otherTextLength:h,confirmed:a,showOtherField:p,withinCoolingOff:k,finalDate:E,coverEnd:u.coverEnd,updateCheck:e=>{t(e.target.checked)},nextStep:()=>{o(r+1)},closeCancelDialog:c,pause:A,policyType:u.policyType||y,policyLabel:u.policyDefinition.label||u.policyDefinition.type,clubCancellationReasons:et,policyCancellationReasons:ee,propertyCancellationReasons:ea,messagesPause:J,messagesCancel:X,intl:R,isLastStep:S,handleSubmit:m,submitCancelPolicy:s}}),S||I.push({component:z,props:{classes:x,BackButton:Z,reactivationDateActual:M,showDatePicker:C,canAutomaticallyCreatePolicy:D,handleSubmit:m,submitCancelPolicy:s,submitCancelPolicyReactivate:a=>{let{pauseSubscription:t,cancelSubscription:i,reactivationDateActual:l,canAutomaticallyCreatePolicy:r,voidCurrentMonth:o,pause:n,otherStr:s}=e,{reasonSelect:d}=a,c=l&&l.format(),u=d;if(d===s){let{reasonOther:e}=a;u="".concat(s,": ").concat(e)}n?t(e.policy.personId,e.policy.package.id,u,c,r,"true"===o):i(e.policy.personId,e.policy.package.id,e.policy.id,u,c,r,"true"===o)},pause:A,cancelInProgress:g,policyLabel:u.policyDefinition.label}}),(0,i.jsx)(P.Z,{fullScreen:T,modal:!0,open:d,children:(0,l.createElement)(I[r].component,I[r].props)})}),el=t(76621),er=t(67566),eo=t(8938),en=t(5510),es=t(20151),ed=t(57667),ec=t(28578);let eu=e=>{let{closeDialog:a,reactivatePolicyError:t,policyType:l}=e;return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Error",defaultMessage:" There's been a problem reactivating your policy. Chat with us and we'll get this resolved."}),t.includes("Cannot reactivate policy because")&&(0,i.jsx)(g.Z,{variant:"body1",children:t})]}),(0,i.jsxs)(I.Z,{children:[(0,i.jsx)(en.Z,{children:e=>(0,i.jsx)(E.Z,{color:"primary",fullWidth:!0,children:e.isChatLoading?(0,i.jsx)(es.Z,{color:"primary",size:24}):(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.OpenChat",defaultMessage:"Chat with us"})})}),(0,i.jsx)(E.Z,{onClick:a,variant:"outlined",children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Close",defaultMessage:"Close"})})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z.Z,{children:"liabilityClubMonthly"===l?(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.LiabilityClubMonthly.Reactivated",defaultMessage:"Your membership has been reactivated, and
1you're now covered."}):(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Reactivated",defaultMessage:"Your policy has been reactivated, and you're now covered."})}),(0,i.jsx)(I.Z,{children:(0,i.jsx)(E.Z,{onClick:a,color:"primary",variant:"contained",children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Close",defaultMessage:"Close"})})})]})},ey=()=>(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Reactivating",defaultMessage:"Reactivating your Policy"}),(0,i.jsx)(es.Z,{style:{display:"block",margin:"16px auto"}})]})}),eg=(e,a,t)=>{switch(e.toLowerCase()){case"liabilityclubmonthly":return(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.LiabilityClubMonthly.Content",defaultMessage:"Your club membership and cover will be reinstated immediately, you'll keep your current policy terms. You will be billed for the entire period from {coverStart} to {coverEnd}.",values:{coverStart:v()(a).format("DD/MM/YYYY"),coverEnd:v()(t).format("DD/MM/YYYY")}});case"health":return(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Health.Content",defaultMessage:"Once activated, your cover will start immediately. At the end of the month, weâll send you a bill covering just the days your insurance was active."});default:return(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Content",defaultMessage:"Once activated, your cover will start immediately. Youâll start a 30-day lock-in period where you canât pause, cancel or downgrade. At the end of the month, weâll send you a bill covering just the days your insurance was active."})}},ep=e=>{let{coverStart:a,coverEnd:t,reactivatePolicy:l,closeDialog:r,paused:o,policyType:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z.Z,{children:eg(n,a,t)}),(0,i.jsxs)(I.Z,{children:[(0,i.jsx)(E.Z,{onClick:r,variant:"outlined",children:o?(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.KeepPaused",defaultMessage:"Keep it paused"}):(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.KeepCancelled",defaultMessage:"Keep it cancelled"})}),(0,i.jsx)(E.Z,{color:"primary",id:"reactivate-cover",variant:"contained",onClick:l,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Reactivate",defaultMessage:"Activate cover"})})]})]})};var eh=(0,c.qC)((0,d.$j)((e,a)=>({reactivatingPolicy:e.cover.reactivatingPolicy,reactivatePolicyError:e.cover.reactivatePolicyError,policy:e.cover.selectedPolicy||a.policy}),e=>({closeDialog:()=>e((0,$.PH)())})),(0,M.Z)(e=>({dialogActions:{[e.breakpoints.down("sm")]:{flexDirection:"column-reverse"}},actionButtons:{[e.breakpoints.down("sm")]:{margin:0,marginBottom:8}}})))(e=>{let{open:a,closeDialog:t,reactivatingPolicy:r,reactivatePolicyError:n,policy:s}=e,d=(0,o.useRouter)();(0,er.hz)();let[c,u]=(0,l.useState)(!1),[y,g]=(0,l.useState)(!1),[p]=(0,el.D)(ed.wl,{refetchQueries:[{query:ec._v}],onCompleted:()=>{d.reload()}}),[h]=(0,el.D)(ed.EL,{refetchQueries:[{query:ec._v}],onCompleted:()=>{d.reload()}});(0,l.useEffect)(()=>{if(!c&&r){u(!0);return}c&&!r&&g(!0)},[r]);let{coverStart:m,coverEnd:v,paused:f,cancelled:x,personId:C,package:{id:P}}=s,{policyType:b}=s;b||(b=s.type);let j=()=>{if(b.toLowerCase().includes("liability")){d.push("/onboard/liability");return}return f&&!x?h({variables:{personId:C,packageId:P}}):p({variables:{id:s.id},onCompleted:e=>{let{reactivateCancelledPolicy:a}=e;d.push("/v2_onboarding?quoteId=".concat(a.id))}})},M={health:(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Title.Health",defaultMessage:"Reactivate Your Injury Cover"}),property:(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Title.Property",defaultMessage:"Reactivate Your Bicycle Policy"}),liabilityClubMonthly:(0,i.jsx)(D.Z,{id:"YourPolicyCard.UncancelDialog.Title.LiabilityClub",defaultMessage:"Reactivate Your Laka Club Membership"})};return(0,i.jsxs)(eo.Z,{open:a,onClose:t,children:[(0,i.jsx)(S.Z,{children:M[b]}),r?(0,i.jsx)(ey,{}):y?(0,i.jsx)(eu,{reactivatePolicyError:n,closeDialog:t,policyType:b}):(0,i.jsx)(ep,{coverStart:m,coverEnd:v,closeDialog:t,policyType:b,reactivatePolicy:()=>j(),paused:f})]})}),em=t(94294);class ev extends l.Component{render(){let{policyCreationBlockedReason:e,intl:a}=this.props;if(!e)return null;let t="".concat(a.formatMessage(ef.ContactMessage),':\n "').concat(e,'"');return(0,i.jsx)("div",{style:{borderRadius:4,padding:4,border:"1px solid #ccc",marginBottom:8},children:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:8},children:[(0,i.jsx)(em.Z,{style:{marginRight:8}}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(g.Z,{variant:"body2",paragraph:!0,children:[(0,i.jsx)(D.Z,{id:"PolicyCreationBlocked.Sorry",defaultMessage:"Unfortunately, you are unable to create a new policy at this time because: "}),(0,i.jsx)("span",{children:e})]})," ",(0,i.jsxs)(g.Z,{variant:"body2",paragraph:!0,children:[(0,i.jsx)(D.Z,{id:"PolicyCreationBlocked.Please",defaultMessage:"Please"})," ",(0,i.jsxs)(en.Z,{renderHyperlink:!0,defaultMessage:t,children:[" ",(0,i.jsx)(D.Z,{id:"PolicyCreationBlocked.ContactUs",defaultMessage:"contact us"})]})," "]})]})]})})}}
1let ef=(0,r.vU)({ContactMessage:{id:"PolicyCreationBlocked.ContactMessage",defaultMessage:"I am unable to activate my policy"}});var ex=(0,d.$j)(e=>({reactivatePolicyError:e.cover.reactivatePolicyError}))((0,C.ZP)(ev)),eC=t(9242),eP=t(11796),eb=t(5556);let ej=(0,eP.Z)(e=>({button:{margin:4},buttonIcon:{margin:"0px 8px"},subtitle:{marginBottom:"1rem"}}));var eM=e=>{let a=(0,er.hz)().bool("nl_accessories_flow"),t=ej();return a?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Z,{variant:"h5",gutterBottom:!0,children:"Legal Cover"}),(0,i.jsx)(g.Z,{variant:"subtitle1",className:t.subtitle,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.LegalCover.Subtitle",defaultMessage:"As a Laka customer you have access to Laka Legal Services"})}),(0,i.jsxs)(E.Z,{variant:"contained",href:eC.z5,classes:{root:t.button},fullWidth:!0,children:[(0,i.jsx)(eb.Z,{className:t.buttonIcon}),(0,i.jsx)(D.Z,{id:"YourPolicyCard.LegalCover.Button",defaultMessage:"Legal Summary"})]})]})},eD=t(89530),eE=t(50666),eA=t(9645),eR=t(76059),eT=t(12389),ek=t(21353),eS=t(48790),eZ=t(35598),eI=t(44392),ew=t(35568);let e_=(0,eI.y)("div")(e=>{let{theme:a}=e;return{display:"flex",flexDirection:"row",[a.breakpoints.down("sm")]:{flexDirection:"column"}}}),eO=(0,eI.y)(E.Z)(e=>{let{theme:a}=e;return{margin:4}}),eL=(0,eI.y)(ew.Z)(e=>{let{theme:a,...t}=e;return{display:"grid",gridAutoFlow:t.column?"column":"row",alignItems:"center",gap:4,[a.breakpoints.down("sm")]:{width:"100%",gridAutoFlow:"row",flexDirection:"row",display:"flex"}}}),eB=e=>{let{column:a=!1,children:t}=e;return(0,i.jsx)(eL,{column:a,children:t})},eN=(0,eI.y)(eS.ZP)(()=>({width:"auto",paddingLeft:0,paddingRight:32})),eY=(0,eI.y)(eE.Z)(e=>{let{theme:a}=e;return{width:"auto",paddingLeft:0,paddingRight:32,[a.breakpoints.down("sm")]:{width:"100%",display:"flex",flexDirection:"column"}}}),eF=(0,eI.y)(eZ.Z)(()=>({maxWidth:"20px",marginBottom:"20px",marginRight:"5px",minWidth:"20px"}));var eW=t(31791),eH=t(56139);function eU(){let e=(0,eW._)(["\n query LiabilityPolicyQuery($policyId: String) {\n declarations {\n id\n type\n value\n details\n }\n policy(id: $policyId, type: Liability) {\n id\n coverStart\n coverEnd\n policyReference\n cancelled\n paused\n active\n cancelledOn\n personId\n policyDefinitionId\n policyDefinition {\n id\n label\n type\n }\n package {\n id\n key\n }\n documents {\n count\n rows {\n id\n url\n attachmentId\n title\n }\n }\n }\n }\n"]);return eU=function(){return e},e}let eG=(0,eH.Ps)(eU()),eK=e=>!e.cancelled&&v()().isBefore(e.coverStart)?{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.ActivationPending",defaultMessage:"Pending activation"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})}:v()().isBefore(e.coverEnd)&&e.cancelled?{message:(0,i.jsx)(D.Z,{id:"LiabilitySummary.PolicyStatus.CancelledBillPending",defaultMessage:"Cancelled (Bill Pending)"}),icon:(0,i.jsx)(em.Z,{color:"error"})}:e.cancelled?{message:(0,i.jsx)(D.Z,{id:"LiabilitySummary.PolicyStatus.Cancelled",defaultMessage:"Cancelled"}),icon:(0,i.jsx)(em.Z,{color:"error"})}:{message:(0,i.jsx)(D.Z,{id:"LiabilitySummary.PolicyStatus.Active",defaultMessage:"Active"}),icon:(0,i.jsx)(eT.Z,{color:"success"})}
1,eV=(0,r.vU)({policyReference:{id:"LiabilitySummary.PolicyReference",defaultMessage:"Policy Reference"},coverStart:{id:"LiabilitySummary.CoverStart",defaultMessage:"Cover Start"},coverEnd:{id:"LiabilitySummary.CoverEnd",defaultMessage:"Cover End"},policyStatus:{id:"LiabilitySummary.PolicyStatus",defaultMessage:"Status"}});var eq=(0,c.qC)((0,eD.B)(eG,{options:e=>{let{policyId:a}=e;return{variables:{policyId:a}}},props:e=>{let{data:{loading:a,error:t,policy:i}}=e;return{loading:a,policy:a||t?{}:i}}}),(0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress}),(e,a)=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"liabilityClubMonthly"})),openReactivateDialog:a=>e((0,$.M8)({policy:a,policyType:"liabilityClubMonthly"})),cancelPolicy:()=>e((0,$.vN)(a.policyId))})))(e=>{let{cancelInProgress:a,loading:t,openCancelDialog:l,openReactivateDialog:r,policy:n}=e,s=(0,o.useRouter)(),d=(0,u.Z)(),c=n.documents&&n.documents.count&&n.documents.rows.find(e=>"PolicyDocument"===e.title),y=eK(n);return t?(0,i.jsx)("div",{}):(0,i.jsxs)("div",{style:{marginBottom:8},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(g.Z,{variant:"subtitle1",paragraph:!0,children:v()(n.coverEnd)<v()()?(0,i.jsx)(D.Z,{id:"LiabilitySummary.DisclaimerExpired",defaultMessage:"This is a summary of your old policy, which has now expired."}):(0,i.jsx)(D.Z,{id:"LiabilitySummary.Disclaimer",defaultMessage:"This is a summary of your current policy. You can download your full documents at any time below."})}),(0,i.jsx)(eA.Z,{children:(0,i.jsxs)(e_,{children:[(0,i.jsxs)(eN,{children:[(0,i.jsx)(eF,{children:y.icon}),(0,i.jsx)(eY,{secondary:d.formatMessage(eV.policyStatus),primary:y.message}),(0,i.jsx)(eE.Z,{secondary:d.formatMessage(eV.policyReference),primary:n.policyReference})]}),(0,i.jsx)(eN,{children:(0,i.jsx)(eE.Z,{secondary:d.formatMessage(eV.coverStart),primary:v()(n.coverStart).format("DD/MM/YYYY")})})]})})]}),(0,i.jsxs)("div",{children:[c&&c.url?(0,i.jsxs)(eO,{id:"liabilityPolicyDocumentDownloadButton",variant:"contained",href:c.url,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{style:{marginRight:8}}),(0,i.jsx)(D.Z,{id:"LiabilitySummary.DownloadDocs",defaultMessage:"Evidence of Cover"})]}):null,n.cancelled?v()().isBefore(n.coverEnd)?(0,i.jsx)(eO,{variant:"contained",color:"secondary",onClick:()=>r(n),fullWidth:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Liability.Uncancel",defaultMessage:"Reactivate now"})}):(0,i.jsx)(eO,{variant:"contained",color:"primary",onClick:()=>{s.push("/onboard/liability")},fullWidth:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Liability.Reactivate",defaultMessage:"Reactivate now"})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(eO,{variant:"outlined",color:"primary",disabled:a,onClick:()=>l(n),fullWidth:!0,children:[(0,i.jsx)(eR.Z,{style:{marginRight:"8px"}}),(0,i.jsx)(D.Z,{id:"Generic.Cancel",defaultMessage:"Cancel"})]})})]})]})}),ez=t(56261),e$=t(20239),eQ=e=>{let{policyType:a,policyCreationBlocked:t}=e,r=(0,o.useRouter)(),n=(0,u.Z)(),s=(0,er.hz)(),d=(0,l.useContext)(e$.Z);return(0,i.jsxs)("div",{children:[(0,i.jsx)(g.Z,{variant:"subtitle1",paragraph:!0,children:"LiabilityClubMonthly"===a?(0,i.jsx)(D.Z,{id:"LiabilitySummaryInactive.Monthly.Header",defaultMessage:"Get third-party liability cover and cycling perks for {liabilityCost}",values:{liabilityCost:(0,ez.x)(n,null==d?void 0:d.defaultCurrency,s.get("liabilityCost")/100)}}):(0,i.jsx)(D.Z,{id:"LiabilitySummaryInactive.Header",defaultMessage:"Activate Liability cover and protect yourself against claims from third parties."})}),(0,i.jsx)(E.Z,{disabled:t,variant:"contained",color:"primary",fullWidth:!0,style:{margin:4},onClick:()=>{r.push("/onboard/liability")},children:(0,i.jsx)(D.Z,{id:"LiabilitySummaryInactive.Activate",defaultMessage:"Review and Activate"})})]})},eJ=t(36191),eX=t(65338),e0=t(42523),e1=t(6151),e2=t(97520);function e5(){let e=(0,eW._)(["\n query HealthPolicyQuery($policyId: String) {\n declarations {\n id\n type\n value\n details\n }\n policy(id: $policyId, type: Health) {\n id\n coverStart\n coverEnd\n policyReference\n cancelled\n paused\n active\n cancelledOn\n documents {\n count\n rows {\n id\n url\n attachmentId\n title\n }\n }\n policyDefinition {\n id\n label\n }\n }\n }\n"]);return e5=function(){return e},e}var e4=(0,eH.ZP)(e5()),e8=t(95949),e9=(0,M.Z)(e=>({listItem:{paddingLeft:0,flex:1,[e.breakpoints.down("md")]:{flexBasis:"50%"},[e.breakpoints.down("sm")]:{flexBasis:"100%"}}}))(e=>{let{classes:a}=e;return(0,i.jsx)(l.Fragment,{children:(0,i.jsxs)(W.ZP,{container:!0,children:[(0,i.jsx)(eS.ZP,{className:a.listItem,children:(0,i.jsx)(eE.Z,{primary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.DurationDetail",defaultMessage:"1 month"}),secondary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.Durationlabel`",defaultMessage:"Duration"})})}),(0,i.jsx)(eS.ZP,{className:a.listItem,children:(0,i.jsx)(eE.Z,{primary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.MedicalTreatmentsDetail",defaultMessage:"\xa31,500"}),secondary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.MedicalTreatmentsLabel`",defaultMessage:"Medical Treatments"})})}),(0,i.jsx)(eS.ZP,{className:a.listItem,children:(0,i.jsx)(eE.Z,{primary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.MedicalAssessmentsDetail",defaultMessage:"\xa350"}),secondary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.MedicalAssessmentsLabel`",defaultMessage:"Medical Assessments"})})}),(0,i.jsx)(eS.ZP,{className:a.listItem,children:(0,i.jsx)(eE.Z,{primary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.RecoveryDetail",defaultMessage:"\xa32,500"}),secondary:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.RecoveryLabel`",defaultMessage:"Recovery"})})}),(0,i.jsx)(p.Z,{color:"primary",style:{margin:"16px 0px",width:"100%"}}),(0,i.jsxs)(W.ZP,{container:!0,spacing:2,children:[(0,i.jsxs)(W.ZP,{item:!0,xs:12,md:6,children:[(0,i.jsx)(g.Z,{variant:"body1",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsCovered",defaultMessage:"What is covered"})}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsCovered.Body1",defaultMessage:"Up to \xa31,500 in medical treatments and \xa350 for medical assessments are covered after an injury."})}),(0,i.jsx)("br",{}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsCovered.Body12",defaultMessage:"Up to \xa32,500 in partner recovery services depen
1ding on your injuries. See a full list of injuries and benefits <a>here</a>.",values:{a:e=>(0,i.jsx)(e8.Z,{href:"//www.laka.co/gb/recovery-insurance",target:"_blank",children:e})}})}),(0,i.jsx)("br",{}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsNotCovered.Body3",defaultMessage:"Any accidents that occur in the UK or for up to 120 days anywhere in the world."})})]}),(0,i.jsxs)(W.ZP,{item:!0,xs:12,md:6,children:[(0,i.jsx)(g.Z,{variant:"body1",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsNotCovered",defaultMessage:"What is not covered"})}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsNotCovered.Body1",defaultMessage:"Any bodily injury or illness that is not a result of an accident."})}),(0,i.jsx)("br",{}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsNotCovered.Body2",defaultMessage:"Professional racing (for events where you are paid to participate or make an appearance)."})}),(0,i.jsx)("br",{}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsNotCovered.Body4",defaultMessage:"Any act of fraud or dishonesty by you or anyone acting on your behalf."})})]})]})]})})});
1let e3=(0,r.vU)({policyReference:{id:"HealthSummary.PolicyReference",defaultMessage:"Policy Reference"},coverStart:{id:"HealthSummary.CoverStart",defaultMessage:"Cover Start"},coverEnd:{id:"HealthSummary.CoverEnd",defaultMessage:"Cover End"},policyStatus:{id:"HealthSummary.PolicyStatus",defaultMessage:"Status"}});var e6=(0,c.qC)((0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress}),e=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"health"})),openPauseDialog:a=>e((0,$.sl)({pauseCover:!0,policy:a,policyType:"health"})),closeCancelDialog:()=>e((0,$.Xv)()),openReactivateDialog:a=>e((0,$.M8)({policy:a,policyType:"health"}))})))(e=>{let{policyId:a,cancelInProgress:t,openCancelDialog:n,openPauseDialog:s,openReactivateDialog:d}=e,c=(0,u.Z)(),h=(0,o.useRouter)(),[m,f]=(0,l.useState)(null),{loading:x}=(0,y.a)(e4,{variables:{policyId:a},onCompleted:e=>{var a;f(null!==(a=null==e?void 0:e.policy)&&void 0!==a?a:null)}}),[C,P]=(0,l.useState)(!1),j=e=>e.paused&&v()().isBefore(e.coverEnd)?{message:(0,i.jsx)(D.Z,{id:"HealthSummary.PolicyStatus.PausedBillPending",defaultMessage:"Paused (Bill Pending)"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})}:e.cancelled&&v()().isBefore(e.coverEnd)?{message:(0,i.jsx)(D.Z,{id:"HealthSummary.PolicyStatus.CancelledBillPending",defaultMessage:"Cancelled (Bill Pending)"}),icon:(0,i.jsx)(em.Z,{color:"error"})}:e.cancelled?{message:(0,i.jsx)(D.Z,{id:"HealthSummary.PolicyStatus.Cancelled",defaultMessage:"Cancelled"}),icon:(0,i.jsx)(em.Z,{color:"error"})}:e.paused?{message:(0,i.jsx)(D.Z,{id:"HealthSummary.PolicyStatus.Paused",defaultMessage:"Paused"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})}:!e.paused&&!e.cancelled&&v()().isBefore(e.coverStart)?{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.ActivationPending",defaultMessage:"Pending activation"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})}:{message:(0,i.jsx)(D.Z,{id:"HealthSummary.PolicyStatus.Active",defaultMessage:"Active"}),icon:(0,i.jsx)(eT.Z,{color:"success"})};if(x||!m)return null;let M=m.documents&&m.documents.count&&m.documents.rows.find(e=>"PolicyDocument"===e.title),A=j(m);return(0,i.jsxs)("div",{style:{marginBottom:8},children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)(g.Z,{variant:"subtitle1",paragraph:!0,children:[v()(m.coverEnd)<v()()&&(0,i.jsx)(D.Z,{id:"HealthSummary.DisclaimerExpired",defaultMessage:"This is a summary of your old policy, which has now expired."}),v()(m.coverEnd)>v()()&&(0,i.jsx)(D.Z,{id:"HealthSummary.Disclaimer",defaultMessage:"This is a summary of your current policy. You can download your full documents at any time below."})]}),(0,i.jsxs)(e1.Z,{children:[(0,i.jsxs)(e2.Z,{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},onClick:()=>{P(!C)},children:[(0,i.jsx)(g.Z,{variant:"h6",children:(0,i.jsx)(D.Z,{id:"HealthSummary.Details",defaultMessage:"Cover Details"})}),(0,i.jsx)(b.Z,{size:"large",children:C?(0,i.jsx)(eX.Z,{}):(0,i.jsx)(eJ.Z,{})})]}),(0,i.jsxs)(w.Z,{in:C,children:[(0,i.jsx)(p.Z,{}),(0,i.jsx)(e2.Z,{children:(0,i.jsx)(e9,{})})]})]}),(0,i.jsx)(eA.Z,{children:(0,i.jsxs)(e_,{children:[(0,i.jsxs)(eN,{children:[(0,i.jsx)(eF,{children:j(m).icon}),(0,i.jsx)(eY,{secondary:c.formatMessage(e3.policyStatus),primary:A.message}),(0,i.jsx)(eE.Z,{secondary:c.formatMessage(e3.policyReference),primary:m.policyReference})]}),(0,i.jsx)(eN,{children:(0,i.jsx)(eE.Z,{secondary:c.formatMessage(e3.coverStart),primary:(0,i.jsx)(r.Ji,{value:m.coverStart})})}),(0,i.jsx)(eN,{children:(0,i.jsx)(eE.Z,{secondary:c.formatMessage(e3.coverEnd),primary:v()(m.coverEnd).utc().format("DD/MM/YYYY")})})]})})]}),(0,i.jsxs)("div",{children:[M&&M.url?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(E.Z,{id:"healthPolicyDocumentDownloadButton",variant:"contained",href:M.url,fullWidth:!0,style:{margin:4},children:[(0,i.jsx)(eb.Z,{style:{marginRight:8}}),(0,i.jsx)(D.Z,{id:"HealthSummary.DownloadDocs",defaultMessage:"Policy Schedule"})]}),(0,i.jsxs)(eO,{variant:"contained",href:eC.cG,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{style:{marginRight:8}}),(0,i.jsx)(D.Z,{id:"HealthSummary.DownloadPolicyWording",defaultMessage:"Policy Wording"})]})]}
1):null,m.cancelled||m.paused?v()().isBefore(m.coverEnd)?(0,i.jsx)(eO,{variant:"contained",color:"secondary",onClick:()=>d(m),fullWidth:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Health.Uncancel",defaultMessage:"Reactivate now"})}):(0,i.jsx)(eO,{variant:"contained",color:"secondary",onClick:()=>{h.push("/onboard/recovery")},fullWidth:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Health.Reactivate",defaultMessage:"Reactivate now"})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(E.Z,{variant:"outlined",color:"primary",disabled:t,onClick:()=>s(m),style:{margin:4},fullWidth:!0,children:[(0,i.jsx)(e0.Z,{style:{marginRight:"8px"}}),(0,i.jsx)(D.Z,{id:"YourPolicyCard.Health.PausePolicy",defaultMessage:"Pause"})]}),(0,i.jsxs)(E.Z,{variant:"outlined",color:"primary",disabled:t,onClick:()=>n(m),fullWidth:!0,children:[(0,i.jsx)(eR.Z,{style:{marginRight:"8px"}}),(0,i.jsx)(D.Z,{id:"Generic.Cancel",defaultMessage:"Cancel"})]})]})]})]})}),e7=e=>{let{policyCreationBlocked:a}=e,t=(0,o.useRouter)();return(0,i.jsxs)("div",{children:[(0,i.jsx)(g.Z,{variant:"subtitle1",paragraph:!0,children:(0,i.jsx)(D.Z,{id:"HealthSummaryInactive.Header",defaultMessage:"Activate Injury cover."})}),(0,i.jsx)(E.Z,{disabled:a,variant:"contained",color:"primary",fullWidth:!0,style:{margin:4},onClick:()=>{t.push("/onboard/recovery")},children:(0,i.jsx)(D.Z,{id:"HealthSummaryInactive.Activate",defaultMessage:"Review and Activate"})})]})},ae=t(55931),aa=t(57658),at=t(64482);let ai=(0,eP.Z)(e=>({button:{margin:4},buttonIcon:{margin:"0px 8px"},subtitle:{marginBottom:"1rem"},marginTop:{marginTop:"2rem"}}));var al=e=>{var a;let t=ai(),{membershipPackage:l}=e,r=!1;if(!(r=(null==l?void 0:l.perks)&&l.perks.find(e=>"Securitas.Recovery"===e.name)))return null;let o=null===(a=r.links[0])||void 0===a?void 0:a.url;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Z,{className:t.marginTop,variant:"h5",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Securitas.Title",defaultMessage:"Bike Recovery Service"})}),(0,i.jsx)(g.Z,{variant:"subtitle1",className:t.subtitle,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Securitas.Subtitle",defaultMessage:"As a Decathlon customer insured by Laka you can also access the Bike Recovery Service"})}),(0,i.jsxs)(E.Z,{variant:"outlined",href:o,classes:{root:t.button},fullWidth:!0,children:[(0,i.jsx)(eb.Z,{className:t.buttonIcon}),(0,i.jsx)(D.Z,{id:"YourPolicyCard.Securitas.Button",defaultMessage:"Terms of Use"})]})]})},ar=t(25755);let ao=(0,eI.y)("div")(()=>({display:"flex",border:"2px solid #166C75",padding:16,marginTop:24,fontSize:14})),an=()=>(0,i.jsx)("div",{"data-testid":"switch-unavailable",children:(0,i.jsxs)(ao,{children:[(0,i.jsx)(ar.Z,{}),(0,i.jsxs)("div",{style:{paddingLeft:16},children:[(0,i.jsx)(g.Z,{variant:"h6",align:"left",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.SwitchUnavailable.Header",defaultMessage:"Switch unavailable"})}),(0,i.jsx)(g.Z,{variant:"body2",align:"left",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.SwitchUnavailable.Subheader",defaultMessage:"Weâre all about flexibility but we need to set some limits in the interest of the Collective."})}),(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:(0,i.jsx)(g.Z,{variant:"body2",align:"left",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.SwitchUnavailable.Detail1",defaultMessage:"Not all customers are eligible to switch. If thatâs you, youâre likely on the most suitable cover."})})}),(0,i.jsx)("li",{children:(0,i.jsx)(g.Z,{variant:"body2",align:"left",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.SwitchUnavailable.Detail2",defaultMessage:"If you switched recently, youâll need to wait 14 days from the date of your last switch."})})})]}),(0,i.jsx)(g.Z,{variant:"body2",align:"left",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.SwitchUnavailable.Help",defaultMessage:"If you have any questions, our team of bike gurus is at hand to help."})})]})]})}),as=(0,eI.y)(ew.Z)(e=>{let{theme:a}=e;return{gap:4,display:"flex",flexFlow:"row wrap",[a.breakpoints.down("sm")]:{gridAutoFlow:"row"}}}),ad=e=>{let{policyId:a,isCancelled:t,isPaused:l,policyCreationBlocked:r,disclaimerText:o,downloadDocsString:n,downloadPolicyWordingString:s,downloadFeeAgreementString:d,packageName:c,packageNamePrimary:u,packageNameSecondary:y,icon:p,message:h,coverStart:m,policyReference:f,policyStatusSecondaryString:x,policyReferenceSecondaryString:C,coverStartSecondaryString:P,coverEndDate:b,coverEndSecondaryText:j,billPending:M,billPendingSecondaryText:D,reactivateButtonText:E,pauseButtonText:A,policyDocumentDownloadUrl:R,propertyFeeAgreementUrl:T,showSwitchCoverButton:k,isSwitchButtonDisabled:S,isPauseButtonDisabled:Z,disablePolicyPause:I,onSwitchClick:w,onReactivateClick:_,onPauseClick:O,policydocumentpdfurl:L,amendCoverStartButtonText:B,cancelButtonText:N,coverStartIsAmendable:Y,membershipPackage:F,onAmendCoverStartDateClick:H,onCancelButtonClick:U,switchCoverOptionsAvailable:G,switchMyCoverText:K}=e;return(0,i.jsxs)(W.ZP,{container:!0,columns:1,sx:{marginBottom:1,gap:2},children:[(0,i.jsxs)(W.ZP,{item:!0,xs:12,children:[(0,i.jsx)(g.Z,{variant:"subtitle1",children:o}),(0,i.jsxs)(as,{"data-testid":"policy-card",children:[c&&(0,i.jsx)(eB,{children:(0,i.jsx)(eY,{primaryTypographyProps:{textTransform:"capitalize"},primary:u,secondary:y})}),(0,i.jsxs)(eB,{column:!0,children:[(0,i.jsx)(eF,{children:p}),(0,i.jsx)(eY,{primary:h,secondary:x,id:"policyStatus"})]}),(0,i.jsx)(eB,{children:(0,i.jsx)(eY,{secondary:C,primary:f})}),(0,i.jsx)(eB,{children:(0,i.jsx)(eY,{secondary:P,primary:v()(m).format("DD/MM/YYYY")})}),(0,i.jsx)(eB,{children:(0,i.jsx)(eY,{secondary:j,primary:v()(b).utc().format("DD/MM/YYYY")})}),M&&(0,i.jsx)(eB,{children:(0,i.jsx)(eY,{secondary:D,primary:v()().add(1,"month").startOf("month").format("DD/MM/YYYY")})})]})]}),(0,i.jsxs)(W.ZP,{item:!0,xs:12,children:[(null==R?void 0:R.url)&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(eO,{id:"propertyPolicyDocumentDownloadButton",variant:"contained",href:R.url,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{sx:{margin:"0px 8px"}}),n]})}),(0,i.jsxs)(eO,{variant:"contained",href:L,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{sx:{margin:"0px 8px"}}),s]}),T&&(0,i.jsxs)(eO,{variant:"contained",href:T,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{sx:{margin:"0px 8px"}}),d]}),k&&(0,i.jsxs)(eO,{variant:"outlined",onClick:w,disabled:S,fullWidth:!0,children:[(0,i.jsx)(at.Z,{sx:{margin:"0px 8px"}}),K]}),(t||l)&&(0,i.jsx)(eO,{disabled:r,variant:"contained",color:"secondary",id:"reactivate-now",onClick:_,fullWidth:!0,children:E}),!t&&!I&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eO,{variant:"outlined",color:"primary",disabled:Z,onClick:O,id:"pausePropertyPolicy",fullWidth:!0,children:[(0,i.jsx)(e0.Z,{style:{marginRight:"8px"}}),A]}),(0,i.jsxs)(eO,{variant:"outlined",color:"primary",disabled:Z,onClick:U,id:"cancelPropertyPolicy",fullWidth:!0,children:[(0,i.jsx)(eR.Z,{style:{marginRight:"8px"}}),N]})]}),Y&&(0,i.jsxs)(eO,{variant:"outlined",color:"primary",onClick:H,fullWidth:!0,children:[(0,i.jsx)(aa.Z,{style:{marginRight:"8px"}}),B]})]}),a&&k&&!G&&(0,i.jsx)(an,{}),(0,i.jsx)(al,{membershipPackage:F})]})},ac=(0,r.vU)({policyStatus:{id:"YourPolicyCard.PolicyStatus",defaultMessage:"Status"}
1,policyReference:{id:"YourPolicyCard.PolicyReference",defaultMessage:"Policy\xa0Reference"},coverStart:{id:"YourPolicyCard.CoverStart",defaultMessage:"Cover Start"},coverEnd:{id:"YourPolicyCard.CoverEnd",defaultMessage:"Cover End"},pausedDate:{id:"YourPolicyCard.PausedDate",defaultMessage:"Paused Date"},cancelledDate:{id:"YourPolicyCard.CancelledDate",defaultMessage:"Cancelled Date"},nextBillDate:{id:"YourPolicyCard.NextBillDate",defaultMessage:"Next Bill Date"},billPendingDate:{id:"YourPolicyCard.BillPendingDate",defaultMessage:"Bill Pending Date"}}),au=e=>{let{coverStart:a}=e;if(!a)return!1;let t=v().utc().startOf("day");return!v().utc(a).isSameOrBefore(t)},ay=e=>{if(e.cancelled&&v()().isBefore(e.coverEnd))return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.CancelledBillPending",defaultMessage:"Cancelled (Bill Pending)"}),icon:(0,i.jsx)(em.Z,{color:"error"})};if(e.cancelled)return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.Cancelled",defaultMessage:"Cancelled"}),icon:(0,i.jsx)(em.Z,{color:"error"})};if(v()().isAfter(e.coverEnd))return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.Inactive",defaultMessage:"Inactive {date}",values:{date:v()(e.coverEnd).format("DD/MM/YYYY")}}),icon:(0,i.jsx)(em.Z,{color:"error"})};if(!e.paused&&!e.cancelled&&v()().isBefore(e.coverStart))return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.ActivationPending",defaultMessage:"Pending activation"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})};if(e.paused&&v()().isBefore(e.coverStart))return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.ReactivationPending",defaultMessage:"Pending reactivation {date}",values:{date:v()(e.coverStart).format("DD/MM/YYYY")}}),icon:(0,i.jsx)(ek.Z,{color:"warning"})};if(e.paused&&v()().isBefore(e.coverEnd))return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.PausedBillPending",defaultMessage:"Paused (Bill Pending)"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})};if(e.paused)return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.Paused",defaultMessage:"Paused"}),icon:(0,i.jsx)(ek.Z,{color:"warning"})};return{message:(0,i.jsx)(D.Z,{id:"YourPolicyCard.PolicyStatus.Active",defaultMessage:"Active"}),icon:(0,i.jsx)(eT.Z,{color:"success"})}};var ag=(0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress}),e=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"property"})),goToUpdatePage:(a,t)=>{let i="/cover/property/".concat(t,"/update/").concat(a);e((0,ae.T8)(i))},openPauseDialog:a=>e((0,$.sl)({pauseCover:!0,policy:a,policyType:"property"})),closeCancelDialog:()=>e((0,$.Xv)()),openReactivateDialog:a=>e((0,$.M8)({policy:a,policyType:"property"}))}))(e=>{var a,t,r,n;let{sectionTitle:s,policyId:d,cancelInProgress:c,openCancelDialog:g,openPauseDialog:p,openReactivateDialog:m,goToUpdatePage:v,policyCreationBlocked:f,awaitingPolicyQuery:x,membershipPackage:C}=e,P=(0,u.Z)(),b=(0,o.useRouter)(),j=(0,er.hz)(),[M,D]=(0,l.useState)(!1),[E,A]=(0,l.useState)(""),[R,T]=(0,l.useState)(null),{loading:k}=(0,y.a)(ec.tc,{variables:{policyId:d},onCompleted:e=>{var a,t,i,l;D(null===(a=e.policy)||void 0===a?void 0:a.billPending),A((null==e?void 0:null===(i=e.policy)||void 0===i?void 0:null===(t=i.package)||void 0===t?void 0:t.key)||""),T(null!==(l=e.policy)&&void 0!==l?l:null)}});if(k||!R)return(0,i.jsx)("div",{});let S=j.bool("disable_policy_pause"),Z=j.get("property_fee_agreement_url"),I=j.bool("pause_or_cancel_page"),w=I?()=>v("cancel",R.id):()=>g(R),_=I?()=>v("pause",R.id):()=>p(R),O=R.documents.rows&&R.documents.count&&R.documents.rows.find(e=>"PolicyDocument"===e.title),L=au(R),B=j.bool("cover_switch_enabled"),N=E?h.WQ[E]:"",Y=(null==R?void 0:null===(t=R.coverOptions)||void 0===t?void 0:null===(a=t.downgradePackages)||void 0===a?void 0:a.length)>0||(null==R?void 0:null===(n=R.coverOptions)||void 0===n?void 0:null===(r=n.upgradePackages)||void 0===r?void 0:r.length)>0,F=R.paused?{label:ac.pausedDate,date:R.pausedOn}:R.cancelled?{label:ac.cancelledDate,date:R.cancelledOn}:{label:ac.nextBillDate,date:R.coverEnd},W=ay(R);return(0,i.jsx)(ad,{sectionTitle:s,disclaimerText:P.formatMessage({id:"YourPolicyCard.Disclaimer",defaultMessage:"This is a summary of your current policy. You can download your full documents at any time below."}),packageName:N,packageNamePrimary:N?P.formatMessage(N):void 0,packageNameSecondary:N?P.formatMessage(h.WQ.cover):void 0,icon:W.
1icon,message:W.message,policyId:R.id,isCancelled:R.cancelled,coverPausedDate:R.pausedOn,isPaused:R.paused,policyCreationBlocked:f,policyReference:R.policyReference,coverStart:R.coverStart,membershipPackage:C,switchCoverOptionsAvailable:Y,policyStatusSecondaryString:P.formatMessage(ac.policyStatus),policyReferenceSecondaryString:P.formatMessage(ac.policyReference),coverStartSecondaryString:P.formatMessage(ac.coverStart),coverEndSecondaryText:P.formatMessage(F.label),policydocumentpdfurl:(0,eC.ZP)().policydocumentpdfurl,downloadDocsString:P.formatMessage({id:"YourPolicyCard.DownloadDocs",defaultMessage:"Policy Schedule"}),downloadPolicyWordingString:P.formatMessage({id:"YourPolicyCard.DownloadPolicyWording",defaultMessage:"Policy Wording"}),downloadFeeAgreementString:P.formatMessage({id:"YourPolicyCard.DownloadFeeAgreement",defaultMessage:"Fee Agreement"}),billPending:M,billPendingSecondaryText:P.formatMessage(ac.billPendingDate),coverEndDate:F.date,policyDocumentDownloadUrl:O,isSwitchButtonDisabled:x||c||R.paused||R.cancelled||!Y,isPauseButtonDisabled:c||x,coverStartIsAmendable:L,onSwitchClick:()=>b.push("/cover/property/".concat(R.id,"/update/switch")),onReactivateClick:()=>m(R),onAmendCoverStartDateClick:()=>{b.push("/cover/property/".concat(R.id,"/update/startdate"))},onPauseClick:_,onCancelButtonClick:w,propertyFeeAgreementUrl:Z,showSwitchCoverButton:B,awaitingPolicyQuery:x,disablePolicyPause:S,switchMyCoverText:P.formatMessage({id:"YourPolicyCard.Property.SwitchCover",defaultMessage:"Switch my cover"}),reactivateButtonText:P.formatMessage({id:"YourPolicyCard.Property.Uncancel",defaultMessage:"Reactivate now"}),pauseButtonText:P.formatMessage({id:"YourPolicyCard.Property.PausePolicy",defaultMessage:"Pause"}),cancelButtonText:P.formatMessage({id:"Generic.CancelPolicy",defaultMessage:"Cancel"}),amendCoverStartButtonText:P.formatMessage({id:"YourPolicyCard.Button.ChangeReactivationDate",defaultMessage:"Change Reactivation Date"}),includedModules:[]})}),ap=t(58755),ah=t(53106);class am extends l.Component{render(){let{children:e,contactMessage:a}=this.props;return(0,i.jsx)(l.Fragment,{children:(0,i.jsxs)(P.Z,{open:this.state.open,onClose:this.handleClose,fullScreen:fullScreen,children:[(0,i.jsx)(S.Z,{children:(0,i.jsx)(g.Z,{variant:"h5",children:(0,i.jsx)(D.Z,{id:"DeclarationsFailedDialog.Sorry",defaultMessage:"Sorry, we are unable to activate your property policy right now"})})}),(0,i.jsxs)(Z.Z,{children:[e,(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{id:"DeclarationsFailedDialog.TalkToUsMessage",defaultMessage:"Talk to us and we'll check our terms to see if we are still able to cover you."})}),(0,i.jsx)("div",{style:{display:"block"},children:(0,i.jsx)(en.Z,{defaultMessage:a,children:e=>(0,i.jsx)(ap.Z,{onClick:this.handleClose,fullWidth:!0,style:{color:"#ff005a",display:"flex",flexDirection:"row",padding:4,margin:"auto",borderRadius:4},children:e.isChatLoading?(0,i.jsx)(es.Z,{color:"primary",size:24}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ah.Z,{style:{fontSize:64}}),(0,i.jsx)(g.Z,{variant:"button",color:"inherit",children:(0,i.jsx)(D.Z,{id:"DeclarationsFailedDialog.TalkToUs",defaultMessage:"Talk to us"})})]})})})}),(0,i.jsx)(g.Z,{variant:"body2",paragraph:!0,children:(0,i.jsx)(D.Z,{id:"DeclarationsFailedDialog.EnteredIncorrectly",defaultMessage:"If you think you've entered something incorrectly, click close below and follow the links to update your information."})})]}),(0,i.jsx)(I.Z,{children:(0,i.jsx)(E.Z,{onClick:this.handleClose,autoFocus:!0,children:(0,i.jsx)(D.Z,{id:"DeclarationsFailedDialog.Close",defaultMessage:"Close"})})})]})})}constructor(...e){super(...e),this.state={open:!0},this.handleClose=()=>{this.props.clearNewDeclarations(),this.setState({open:!1})}}}class av extends l.Component{render(){let{declarations:e,newDeclarations:a,clearNewDeclarations:t,intl:l}=this.props;if(!Array.isArray(e)||!e.length)return null;let r=e.filter(e=>aj(e)).map(e=>aP(e,l));if(!Array.isArray(r)||!r.length)return null;let o="".concat(l.formatMessage(af.ContactMessage),':\n "').concat(r.reduce((e,a)=>"".concat(e," & ").concat(a)),' "');return(0,i.jsxs)("div",{children:[(0,i.jsx)(g.Z,{variant:"body2",paragraph:!0,children:(0,i.jsx)(D.Z,{id:"DeclarationsFailed.Sorry",defaultMessage:"Sorry, we are unable to activate your property policy right now"})}),(0,i.jsx)(ax,{decMessages:r}),(0,i.jsxs)(g.Z,{variant:"body2",children:[(0,i.jsx)(D.Z,{id:"DeclarationsFailed.Please",defaultMessage:"Please"})," ",(0,i.jsxs)(en.Z,{renderHyperlink:!0,defaultMessage:o,children:[" ",(0,i.jsx)(D.Z,{id:"DeclarationsFailed.ContactUs",defaultMessage:"contact us"})]})," ",(0,i.jsx)(D.Z,{id:"DeclarationsFailed.CheckOurTerms",defaultMessage:"and we'll check our terms to see if we can still cover you."})]}),(0,i.jsx)(g.Z,{variant:"body2",paragraph:!0,children:(0,i.jsx)(D.Z,{id:"DeclarationsFailed.EnteredIncorreclty",defaultMessage:" If you think you entered something incorrectly, or anything changes, click 'Provide More Info' to update us."})}),a&&(0,i.jsx)(am,{clearNewDeclarations:t,contactMessage:o,children:(0,i.jsx)(ax,{decMessages:r})})]})}}let af=(0,r.vU)({DeclarationBikeStorage:{id:"DeclarationsFailed.DeclarationBikeStorage",defaultMessage:"The location in which your bike is stored when at home is"},DeclarationLastTheft:{id:"DeclarationsFailed.DeclarationLastTheft",defaultMessage:"You have had a bicycle stolen in the last three months"}
1,ContactMessage:{id:"DeclarationsFailed.ContactMessage",defaultMessage:"I am unable to activate my Bicycle Policy"}}),ax=e=>{let{decMessages:a}=e;return(0,i.jsx)("div",{style:{borderRadius:4,padding:4,border:"1px solid #ccc",marginBottom:8},children:a.map((e,a)=>(0,i.jsx)(aC,{message:e,spacing:0===a?0:8}))})},aC=e=>{let{message:a,spacing:t}=e;return(0,i.jsxs)(g.Z,{variant:"body2",style:{display:"flex",alignItems:"center",marginTop:t||0},children:[(0,i.jsx)(em.Z,{style:{marginRight:8}}),(0,i.jsx)("span",{children:a})]})},aP=(e,a)=>{let t="",i="";if(e&&e.type){let l=h.qY.get(e.type);switch(l&&h.AU[l.key]&&(i=h.AU[l.key]),e.type){case 1:{let i=(0,h.HI)(h.xp,h.xp.get(parseInt(e.value)),h.U1);t="".concat(a.formatMessage(af.DeclarationBikeStorage),": ").concat(i);break}case 4:t=a.formatMessage(af.DeclarationLastTheft);break;default:t=a.formatMessage(i)}}return t},ab=[{type:4,values:["1"]}],aj=e=>{let a=ab.find(a=>a.type===e.type);return!!(a&&a.values.includes(e.value))},aM=e=>!!e.some(e=>aj(e));(0,d.$j)(e=>({newDeclarations:e.cover.newDeclaration}),e=>({clearNewDeclarations:()=>e((0,$.u9)())}))((0,C.ZP)(av));let aD=()=>(0,i.jsx)(g.Z,{variant:"subtitle1",paragraph:!0,children:(0,i.jsx)(D.Z,{id:"Property.SummaryInactive.Header",defaultMessage:"Cover your bicyles and gear against loss, damage, and theft."})});var aE=e=>{let{policyId:a,policyCreationBlocked:t,wasPreviouslyCancelled:r}=e,n=(0,o.useRouter)(),[s,d]=(0,l.useState)([]),[c,u]=(0,l.useState)(!1),{loading:g}=(0,y.a)(ec.JX,{onCompleted:e=>{if(null==e?void 0:e.declarations){d(e.declarations),u(aM(s));return}u(!1)}}),[p]=(0,el.D)(ed.wl,{onCompleted:()=>{n.push("/cover")}});return g?(0,i.jsx)("div",{}):(0,i.jsxs)("div",{children:[(0,i.jsx)(aD,{}),(0,i.jsx)(E.Z,{disabled:t,variant:"contained",color:"primary",fullWidth:!0,onClick:()=>{if(a){if(!r)return n.push("/onboard/");p({variables:{id:a}})}},children:(0,i.jsx)(D.Z,{id:"Property.SummaryInactive.ReviewAndActivate",defaultMessage:"Review and Activate"})})]})};let aA=(0,r.vU)({policyStatus:{id:"YourPolicyCard.PolicyStatus",defaultMessage:"Status"}
1,policyReference:{id:"YourPolicyCard.PolicyReference",defaultMessage:"Policy\xa0Reference"}}),aR=(0,r.vU)({cover:{id:"YourPolicyCard.package.cover",defaultMessage:"Cover"}});var aT=e=>{var a;let{policyId:t}=e,r=(0,u.Z)(),[o,n]=(0,l.useState)(null),[s,d]=(0,l.useState)("null"),{loading:c}=(0,y.a)(ec.XA,{variables:{policyId:t},onCompleted:e=>{var a,t;n(null==e?void 0:e.policyV2),d(null==e?void 0:null===(t=e.policyV2)||void 0===t?void 0:null===(a=t.package)||void 0===a?void 0:a.key)}});if(!o||c)return(0,i.jsx)("div",{});let p=null==o?void 0:null===(a=o.documentsV2)||void 0===a?void 0:a.find(e=>"PolicyDocument"===e.title),h=s?aR[s]:"";return(0,i.jsxs)("div",{style:{marginBottom:8},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(g.Z,{variant:"subtitle1",children:(0,i.jsx)(D.Z,{id:"YourPolicyCard.Disclaimer",defaultMessage:"This is a summary of your current policy. You can download your full documents at any time below."})}),(0,i.jsx)(eA.Z,{children:(0,i.jsxs)(e_,{children:[h&&(0,i.jsx)(eN,{children:(0,i.jsx)(eE.Z,{primaryTypographyProps:{textTransform:"capitalize"},secondary:r.formatMessage(aR.cover),primary:r.formatMessage(h)})}),(0,i.jsxs)(eN,{children:[(0,i.jsx)(eN,{children:o.active?(0,i.jsx)(eT.Z,{color:"success"}):(0,i.jsx)(em.Z,{color:"error"})}),(0,i.jsx)(eE.Z,{secondary:r.formatMessage(aA.policyStatus),primary:o.active?(0,i.jsx)(D.Z,{id:"GroupPolicyCard.PolicyStatus.Active",defaultMessage:"Active"}):(0,i.jsx)(D.Z,{id:"GroupPolicyCard.PolicyStatus.Inactive",defaultMessage:"Inactive"}),id:"policyStatus"})]}),(0,i.jsx)(eN,{children:(0,i.jsx)(eE.Z,{secondary:r.formatMessage(aA.policyReference),primary:o.policyReference})})]})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:[p&&p.url?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(eO,{id:"groupPolicyDocumentDownloadButton",variant:"contained",href:p.url,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{sx:{margin:"0px 8px"}}),(0,i.jsx)(D.Z,{id:"YourPolicyCard.DownloadDocs",defaultMessage:"Policy Schedule"})]})}):null,(0,i.jsxs)(eO,{variant:"contained",href:(0,eC.ZP)().policydocumentpdfurl,fullWidth:!0,children:[(0,i.jsx)(eb.Z,{sx:{margin:"0px 8px"}}),(0,i.jsx)(D.Z,{id:"YourPolicyCard.DownloadPolicyWording",defaultMessage:"Policy Wording"})]})]})})]})},ak=t(59774);let aS=(0,r.vU)({Property:{id:"Cover.Type.Header.Property",defaultMessage:"Bicycle Policy"},"2020LiabilityPromotion":{id:"Cover.Type.Header.2020LiabilityPromotion",defaultMessage:"Liability Policy"},Health:{id:"Cover.Type.Header.Health",defaultMessage:"Injury Cover"},Liability:{id:"Cover.Type.Header.Liability",defaultMessage:"Liability Policy"}}),aZ=(0,eI.y)(p.Z)({margin:"16px 0px"});var aI=t(87315),aw=t(57997),a_=t(92156);let aO=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB";if(!e)return null;let t=(0,aw.Bq)(e);return Intl.DateTimeFormat(a,{dateStyle:"short"}).format(t)};var aL=t(17937);let aB=e=>e?e.cancelled&&v()().isBefore(e.coverEnd)?{status:"cancelled-bill-pending",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.CancelledBillPending",defaultMessage:"Cancelled (Bill Pending)"}),iconVariant:"cancelled"}:e.cancelled?{status:"cancelled",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.Cancelled",defaultMessage:"Cancelled"}),iconVariant:"cancelled"}:v()().isAfter(e.coverEnd)&&!e.paused?{status:"inactive-date",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.Inactive",defaultMessage:"Inactive {date}",values:{date:v()(e.coverEnd).format("DD/MM/YYYY")}}),iconVariant:"cancelled"}:!e.paused&&!e.cancelled&&v()().utc(!0).isBefore(e.coverStart)?{status:"pending-activation",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.ActivationPending",defaultMessage:"Pending activation"}),iconVariant:"pending"}:e.paused&&v()().isBefore(e.coverStart)?{status:"pending-reactivation",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.ReactivationPending",defaultMessage:"Pending reactivation {date}",values:{date:v()(e.coverStart).format("DD/MM/YYYY")}}),iconVariant:"pending"}:e.paused&&v()().isBefore(e.coverEnd)?{status:"paused-bill-pending",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.PausedBillPending",defaultMessage:"Paused (Bill Pending)"}),iconVariant:"paused"}:e.paused?{status:"paused",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.Paused",defaultMessage:"Paused"}),iconVariant:"paused"}:{status:"active",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.Active",defaultMessage:"Active"}),iconVariant:"active"}:{status:"inactive",message:(0,r.Em)({id:"YourPolicyCard.PolicyStatus.NotActivated",defaultMessage:"Inactive"}),iconVariant:"toActivate"};var aN=t(88608);let aY=(0,r.vU)({insuranceSticker:{id:"YourPolicyCard.DownloadInsuranceSticker",defaultMessage:"Insurance Sticker"},ipid:{id:"YourPolicyCard.DownloadIPID",defaultMessage:"IPID"},policyWording:{id:"YourPolicyCard.DownloadPolicyWording",defaultMessage:"Policy Wording"},feeAgreement:{id:"YourPolicyCard.DownloadFeeAgreement",defaultMessage:"Fee Agreement"},policySchedule:{id:"YourPolicyCard.DownloadDocs",defaultMessage:"Policy Schedule"}}),aF=e=>{var a,t;let i=(0,er.hz)(),l=[];
1if(!e)return{documents:l};let r=i.get("property_fee_agreement_url"),o=i.get("policydocumentpdfurl"),n=i.get("ipid_url"),s=a=>{var t;return null==e?void 0:null===(t=e.documents.rows.find(e=>e.title===a))||void 0===t?void 0:t.url},d=s("PolicyDocument"),c=s("InsuranceSticker"),u=(null==e?void 0:null===(a=e.policyDefinition)||void 0===a?void 0:a.policyWordingUrl)||o,y=(null==e?void 0:null===(t=e.policyDefinition)||void 0===t?void 0:t.ipidUrl)||n;return u&&l.push({href:u,text:aY.policyWording}),r&&l.push({href:r,text:aY.feeAgreement}),y&&l.push({href:y,text:aY.ipid}),d&&l.push({href:d,text:aY.policySchedule}),c&&l.push({href:c,text:aY.insuranceSticker}),{documents:l}};var aW=t(53261);let aH=(e,a,t)=>{let i=(0,u.Z)(),r=(0,l.useContext)(e$.Z),[o,n]=(0,l.useState)({cappedPriceInCents:0,usualPriceInCents:0}),[s,d]=(0,l.useState)({newPackageId:"",capPrice:"",pctChange:""}),[c,g]=(0,l.useState)({currentQuote:null,upgradeQuote:null,downgradeQuote:null}),{loading:p}=(0,y.a)(aW.Z,{skip:!e,variables:{policyId:e},onCompleted:e=>{let{getComparableQuotesForPolicy:a}=e,{currentQuote:t,upgradeQuotes:i,downgradeQuotes:l}=a;g({currentQuote:t,upgradeQuote:null==i?void 0:i.find(e=>(0,aN._y)({packageId:e.packageId})),downgradeQuote:null==l?void 0:l.find(e=>(0,aN.ew)({packageId:e.packageId}))})},fetchPolicy:"network-only"});return(0,l.useEffect)(()=>{var e;if(t||p||!c.currentQuote)return;let{newQuote:l,pctChange:o,capPrice:s,capDelta:u,avarage:y}=aG(a,c);d({newPackageId:l.packageId,pctChange:o,capPrice:(0,ez.x)(i,(null===(e=c.currentQuote)||void 0===e?void 0:e.currencyCode)||r.defaultCurrency,s/100)}),n({cappedPriceInCents:u,usualPriceInCents:y})},[p,e,t,c,a]),{quoteLoading:p,priceTypeProps:o,addOnDialogProps:s,comparableQuotes:c}},aU=()=>({packageId:"",capPrice:0,additionalCostsTotal:0,average:0,displayPrice:0,currencyCode:""}),aG=(e,a)=>{let t=aU(),i=e?(null==a?void 0:a.downgradeQuote)||t:(null==a?void 0:a.upgradeQuote)||t,l=null==a?void 0:a.currentQuote,r=(null==i?void 0:i.capPrice)+(null==i?void 0:i.additionalCostsTotal),o=(null==l?void 0:l.capPrice)+(null==l?void 0:l.additionalCostsTotal),n=Math.abs(o-r),s=(n/o*100).toFixed(2),d=Math.abs(i.average-l.average);return{newQuote:i,pctChange:s,capDelta:n,avarage:d,capPrice:r}};var aK=t(50514),aV=t(69969),aq=t(69073),az=t(23638),a$=t(44236),aQ=t(38645);let aJ=e=>{let{children:a}=e,t=Array.isArray(a)?[...a]:[a];return(0,i.jsx)(aK.Z,{container:!0,spacing:1,children:t.map((e,a)=>{if(e)return(0,i.jsx)(aK.Z,{size:{xs:12,lg:4},children:e},a)})})},aX=(0,eI.y)(E.Z,{name:"UnderPackageButton"})(e=>{let{theme:a}=e;return{borderRadius:18,borderWidth:2,minWidth:"fit-content",textWrap:"nowrap",width:"100%",borderColor:a.palette.navy.main,color:a.palette.navy.main,"&:hover":{borderWidth:2,borderColor:a.palette.navy.main,color:a.palette.navy.main}}}),a0=(0,eI.y)(E.Z,{name:"UnderPackageButton"})(e=>{let{theme:a}=e;return{borderRadius:18,borderWidth:2,minWidth:"fit-content",textWrap:"nowrap",width:"12.5rem",fontSize:"0.8rem",borderColor:a.palette.coral.main,backgroundColor:a.palette.coral.main,color:a.palette.navy.main,"&:hover":{borderColor:a.palette.navy.main,color:a.palette.navy.main}}}),a1=e=>{let{Icon:a}=e;return(0,i.jsx)(aX,{"data-testid":e.testId,startIcon:a&&(0,i.jsx)(a,{}),variant:e.variant||"outlined",onClick:e.onClick,disabled:e.disabled,color:e.color||"secondary",sx:e.sx||null,children:(0,i.jsx)(g.Z,{children:(0,i.jsx)(D.Z,{...e.copy})})})},a2=e=>{let{Icon:a}=e;return(0,i.jsx)(a0,{"data-testid":e.testId,startIcon:a&&(0,i.jsx)(a,{}),variant:e.variant||"outlined",onClick:e.onClick,disabled:e.disabled,color:e.color||"secondary",sx:e.sx||null,children:(0,i.jsx)(g.Z,{children:(0,i.jsx)(D.Z,{...e.copy})})})},a5=(0,r.vU)({makeClaim:{id:"PolicyCard.Buttons.MakeClaim",defaultMessage:"Make Claim"},switchCover:{id:"PolicyCard.Property.Switch",defaultMessage:"Switch My Cover"},pause:{id:"YourPolicyCard.Property.PausePolicy",defaultMessage:"Pause"},cancel:{id:"Generic.CancelPolicy",defaultMessage:"Cancel"},cancelAddon:{id:"YourPolicyCard.Property.CancelAddon",defaultMessage:"Cancel Add-on"},activate:{id:"YourPolicyCard.Property.ActivatePolicy",defaultMessage:"Review and Activate"},activateNow:{id:"PolicyCard.Buttons.ActivateAddOn",defaultMessage:"Activate now"},reactivate:{id:"YourPolicyCard.Property.ReactivatePolicy",defaultMessage:"Reactivate"},enableRenewal:{id:"PolicyCard.Buttons.EnableRenewal",defaultMessage:"Enable renewal"},disableRenewal:{id:"PolicyCard.Buttons.DisableRenewal",defaultMessage:"Disable renewal"},addPaymentDetailsFirst:{id:"PolicyCard.Buttons.AddPaymentDetailsFirst",defaultMessage:"You need to add payment details first"}}),a4=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.makeClaim,Icon:aq.Z,onClick:a,disabled:t,testId:"button-claim"})},a8=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.switchCover,Icon:at.Z,onClick:a,disabled:t,testId:"button-switch-cover"})},a9=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.pause,Icon:e0.Z,onClick:a,disabled:t,testId:"button-pause-cover"})},a3=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.cancel,Icon:a$.Z,onClick:a,disabled:t,testId:"button-cancel-cover"})},a6=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.reactivate,onClick:a,disabled:t,color:"secondary",variant:"contained",testId:"button-reactivate-cover"})},a7=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.activate,onClick:a,disabled:t,color:"secondary",variant:"contained",testId:"button-review-and-activate-cover"})},te=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{copy:a5.activate,onClick:a,disabled:t,color:"secondary",variant:"contained",testId:"button-review-and-activate-recovery-cover"})},ta=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a2,{Icon:aQ.Z,copy:a5.activateNow,onClick:a,disabled:t,color:"secondary",variant:"outlined",testId:"button-activate-race-add-on"})},tt=e=>{let{onClick:a,disabled:t}=e;return(0,i.jsx)(a1,{sx:{width:"12.5rem"},copy:a5.cancelAddon,Icon:a$.Z,onClick:a,disabled:t,testId:"button-cancel-race-add-on"})},ti=e=>{let{onClick:a,disabled:t,isEnabled:l}=e;return(0,i.jsx)(aV.Z,{title:t?(0,i.jsx)(D.Z,{...a5.addPaymentDetailsFirst}):"",arrow:!0,children:(0,i.jsx)("span",{children:(0,i.jsx)(a1,{copy:l?a5.disableRenewal:a5.enableRenewal,Icon:az.Z,onClick:a,disabled:t,testId:"button-auto-renew"})})})};var tl=t(6788);let tr=e=>(0,eI.y)("div")(a=>{let{theme:t}=a;return{borderWidth:1,borderColor:t.palette.base.coral.main,borderStyle:e,padding:t.spacing(1),borderRadius:6,display:"grid",gridTemplateRows:"1fr",gridAutoFlow:"row"}}),to=(0,eI.y)(g.Z)(e=>{let{theme:a}=e;return{color:a.palette.base.coral.main,fontSize:"0.8rem",display:"flex",flexDirection:"row",justifyContent:"flex-end"}}),tn=(0,eI.y)(g.Z)(e=>{let{theme:a}=e;return{color:a.palette.coral.main,display:"flex",textAlign:"center",textTransform:"uppercase",fontWeight:600}}),ts=(0,eI.y)(g.Z)(e=>{let{theme:a}=e;return{color:a.palette.text.primary,display:"flex",textAlign:"center",fontSize:"0.8rem"}}),td=(0,eI.y)(tl.Z)(e=>{let{theme:a}=e;return{marginTop:"-0.1rem",color:a.palette.coral.main}}),tc=(0,r.vU)({cappedAt:{id:"CoverCard.CappedAt",defaultMessage:"Capped At"},usually:{id:"CoverCard.Usually",defaultMessage:"Usually"}}),tu=e=>{let{cappedAtConfig:a,fixedPriceInCents:t,currency:l="GBP",monthStringIntl:r="mo",includedStrinIntl:o="Included",borderStyle:n="dashed"}=e,s=Intl.NumberFormat("en-GB",{currency:l,style:"currency",currencyDisplay:"symbol"}),d=tr(n);if(a){let e=s.format(a.usualPriceInCents/100),t=s.format(a.cappedPriceInCents/100);return(0,i.jsxs)(d,{children:[(0,i.jsxs)(to,{children:[(0,i.jsx)("span",{style:{textTransform:"uppercase"},children:(0,i.jsx)(D.Z,{...tc.usually})}),"\xa0",e," /",r]}),(0,i.jsxs)(ts,{children:[(0,i.jsx)("span",{style:{textTransform:"uppercase"},children:(0,i.jsx)(D.Z,{...tc.cappedAt})}),"\xa0",(0,i.jsx)("span",{"data-testid":"cover-capped-price",children:t})," /",r]})]})}return t?(0,i.jsx)(d,{children:(0,i.jsxs)(tn,{children:[s.format(t/100)," /",r]})}):(0,i.jsxs)(d,{children:[(0,i.jsx)(td,{}),(0,i.jsx)(tn,{children:o})]})},ty=(0,eI.y)("dl")(e=>{let{theme:a}=e;return{display:"flex",flexFlow:"row",flexWrap:"wrap",gap:a.spacing(2),fontWeight:100,fontFamily:a.typography.fontFamily}}),tg=(0,eI.y)("dt")(e=>{let{theme:a}=e;return{padding:0,display:"inline",margin:0,color:a.palette.navy.light,fontWeight:300,fontFamily:"Simula",fontSize:"0.9rem"}}),tp=(0,eI.y)("dd")(()=>({display:"inline",padding:0,margin:0,fontFamily:"Ambit",fontSize:"1rem"})),th=(0,r.vU)({Monthly:{id:"Generic.Monthly",defaultMessage:"Monthly"},Annually:{id:"Generic.Annual",defaultMessage:"Annual"}}),tm=e=>{let{isAnnualPolicy:a=!1,statusCopy:t,frequencyValue:l,startDate:o,endDate:n,pausedDate:s,cancelledDate:d,nextBillDate:c,pendingBillDate:u,paymentSchedule:y,upgradeDate:p}=e,h={Monthly:th.Monthly,month:th.Monthly,year:th.Annually,annual:th.Annually},m=[{id:"status",label:(0,r.Em)({id:"YourPolicyCard.PolicyStatus",defaultMessage:"Status"}),value:t,forAnnual:!1},{id:"statusAnnual",label:(0,r.Em)({id:"YourPolicyCard.PolicyStatus",defaultMessage:"Status"}),value:t,forAnnual:!0},{id:"start",label:(0,r.Em)({id:"AmendCoverForm.StartDate",defaultMessage:"Start Date"}),value:aO(o),forAnnual:!1},{id:"startAnnual",label:(0,r.Em)({id:"YourPolicyCard.CoverStart",defaultMessage:"Cover Start"}),value:aO(o),forAnnual:!0},{id:"end",label:(0,r.Em)({id:"AmendCoverForm.EndDate",defaultMessage:"End Date"}),value:aO(n),forAnnual:!1},{id:"endAnnual",label:(0,r.Em)({id:"AmendCoverForm.EndDate",defaultMessage:"End Date"}),value:aO(n),forAnnual:!0},{id:"cancelled",label:(0,r.Em)({id:"YourPolicyCard.Cancelled",defaultMessage:"Cancelled"}),value:aO(d),forAnnual:!0},{id:"paused",label:(0,r.Em)({id:"YourPolicyCard.PausedDate",defaultMessage:"Paused Date"}),value:aO(s),forAnnual:!1},{id:"next",label:(0,r.Em)({id:"YourPolicyCard.NextBillDate",defaultMessage:"Next Bill Date"}),value:aO(c),forAnnual:!1},{id:"nextAnnual",label:(0,r.Em)({id:"YourPolicyCard.NextBill",defaultMessage:"Next Bill"}),value:aO(c),forAnnual:!0},{id:"pending",label:(0,r.Em)({id:"YourPolicyCard.PendingBillDate",defaultMessage:"Pending Bill Date"}),value:aO(u),forAnnual:!1},{id:"upgradeDate",label:(0,r.Em)({id:"YourPolicyCard.UpgradeDate",defaultMessage:"Upgrade Date"}),value:aO(p),forAnnual:!1},{id:"frequency",label:(0,r.Em)({id:"YourPolicyCard.Renews",defaultMessage:"Renews"}),value:h[l],forAnnual:!1},{id:"frequencyAnnual",label:(0,r.Em)({id:"YourPolicyCard.Frequency",defaultMessage:"Frequency"}),value:h[y],forAnnual:!0}];return(0,i.jsx)(ty,{children:m.filter(e=>{let{forAnnual:t}=e;return t===a}).map(e=>{let{id:a,label:t,value:l}=e;return l?(0,i.jsxs)(ew.Z,{sx:{display:"flex",flexDirection:"column",width:"max-content"},children:[(0,i.jsx)(tg,{children:(0,i.jsx)(g.Z,{children:(0,i.jsx)(D.Z,{...t})})}),(0,i.jsx)(tp,{children:"string"==typeof l?l:(0,i.jsx)(D.Z,{...l})})]},a):null})})};var tv=t(86094);let tf={color:"#FF9800",borderColor:"#FF9800"},tx=(0,eI.y)(W.ZP)(()=>
1({border:"2px solid #FF9800",padding:"1rem",display:"flex",flexDirection:"row",alignItems:"center"})),tC=(0,eI.y)("div")(()=>({height:"100%"})),tP=e=>{let{variant:a="warning"}=e;return(0,i.jsxs)(tx,{item:!0,xs:12,children:["warning"===a&&(0,i.jsx)(tC,{sx:"warning"===a&&tf,children:(0,i.jsx)(tv.Z,{sx:{color:"#FF9800",height:"24px",width:"24px",marginRight:"8px"}})}),(0,i.jsx)(g.Z,{variant:"body2",children:(0,i.jsx)(D.Z,{...e.copy,values:e.values})})]})};var tb=t(65340);let tj=(0,r.vU)({excessExplainerBeforeLink:{id:"RacingAddOnConfirmDialog.ExcessExplainerBeforeLink",defaultMessage:""},excessExplainerLinkText:{id:"RacingAddOnConfirmDialog.ExcessExplainerLinkText",defaultMessage:""},excessExplainerLinkHref:{id:"RacingAddOnConfirmDialog.ExcessExplainerLinkHref",defaultMessage:""},excessExplainerAfterLink:{id:"RacingAddOnConfirmDialog.ExcessExplainerAfterLink",defaultMessage:""}}),tM=(0,tb.ZP)("span")(e=>{let{theme:a}=e;return{fontFamily:a.typography.fontFamily}}),tD=e=>{let a=(0,u.Z)();return e.isAddOnActive?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(P.Z,{open:e.isDialogOpen,"data-testid":"race-add-on-dialog_title",children:[(0,i.jsx)(S.Z,{"data-testid":"race-add-on-dialog_title",children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.RemoveTitle",defaultMessage:"You are about to decrease your cover"})}),(0,i.jsxs)(Z.Z,{"data-testid":"race-add-on-dialog_content",children:[(0,i.jsx)(g.Z,{gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.Remove",defaultMessage:"Please confirm you would like to remove Worldwide and Racing cover."})}),(0,i.jsx)(g.Z,{gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.ConfirmNotice.Decrease",defaultMessage:"This will decrease your monthly share by {pctChange}% and your share will now be capped at {capPrice}",values:{pctChange:e.pctChange,capPrice:e.capPrice}})}),(0,i.jsx)(g.Z,{gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.ConfirmNotice.Documents",defaultMessage:"All price changes will be effective immediately and we will send you your updated policy within the hour."})})]}),(0,i.jsxs)(I.Z,{children:[(0,i.jsx)(E.Z,{onClick:()=>e.onCancelClick(),color:"primary",children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.Close",defaultMessage:"Cancel","data-testid":"dialog-cancel"})}),!e.quoteErrors&&(0,i.jsx)(E.Z,{onClick:()=>e.onConfirmClick(e.newPackageId,"downgrade"),color:"primary",autoFocus:!0,variant:"contained",disabled:!e.newPackageId,"data-testid":"dialog-confirm",children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.Confirm",defaultMessage:"Confirm"})})]})]})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(P.Z,{open:e.isDialogOpen,"data-testid":"race-add-on-dialog",children:[(0,i.jsx)(S.Z,{"data-testid":"race-add-on-dialog_title",children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.AddTitle",defaultMessage:"You are about to increase your cover"})}),(0,i.jsxs)(Z.Z,{"data-testid":"race-add-on-dialog_content",children:[(0,i.jsx)(g.Z,{variant:"body2",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.Add",defaultMessage:"Please confirm you would like to add on Worldwide and Racing cover."})}),(0,i.jsx)(g.Z,{variant:"body2",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.LockIn",defaultMessage:"Once your initial period of 30 days has expired, you'll be able to cancel this add on at anytime."})}),(0,i.jsx)(g.Z,{variant:"body2",gutterBottom:!0,children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.ConfirmNotice.Documents",defaultMessage:"All price changes will be effective immediately and we will send you your updated policy within the hour."})}),(0,i.jsxs)(g.Z,{variant:"body2",gutterBottom:!0,children:[(0,i.jsx)(D.Z,{...tj.excessExplainerBeforeLink}),(0,i.jsx)(tM,{children:(0,i.jsx)(e8.Z,{href:a.formatMessage(tj.excessExplainerLinkHref),target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(D.Z,{...tj.excessExplainerLinkText})})}),(0,i.jsx)(D.Z,{...tj.excessExplainerAfterLink})]})]}),(0,i.jsxs)(I.Z,{"data-testid":"race-add-on-dialog_ctas",children:[(0,i.jsx)(E.Z,{onClick:()=>e.onCancelClick(),color:"primary","data-testid":"dialog-cancel",children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.Close",defaultMessage:"Cancel"})}),!e.quoteErrors&&(0,i.jsx)(E.Z,{onClick:()=>e.onConfirmClick(e.newPackageId,"upgrade"),color:"primary",autoF
1ocus:!0,variant:"contained",disabled:!e.newPackageId,"data-testid":"dialog-confirm",children:(0,i.jsx)(D.Z,{id:"RacingAddOnConfirmDialog.Confirm",defaultMessage:"Confirm"})})]})]})})};var tE=t(73550),tA=t(93075),tR=t(13919),tT=t(79892);let tk=e=>{let{withLabel:a,withIcon:t,header:l,children:r,variant:o="default",prefix:n,testId:s,defaultExpanded:d}=e,c="dashed"===o,u=(0,eI.y)(tE.Z)(e=>{let{theme:a}=e;return{padding:a.spacing(1),borderStyle:c?"dotted":"solid",borderWidth:"1px",background:c?"transparent":a.palette.background.paper,borderColor:c?a.palette.coral.main:a.palette.teal.lightest,borderRadius:"6px !important"}}),y=(0,eI.y)(tA.Z)(e=>{let{theme:a}=e;return{fontFamily:a.typography.fontFamily,".MuiAccordionSummary-content":{margin:0,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}}}),p=(0,eI.y)(tR.Z)(e=>{let{theme:a}=e;return{fontFamily:a.typography.fontFamily,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:a.palette.teal.lighter}}),h=(0,eI.y)("div")(e=>{let{theme:a}=e;return{borderRight:c?"1px dashed":"1px solid",borderColor:c?a.palette.coral.light:"#f0f0f0",marginRight:"0.93rem",marginLeft:"0.93rem",height:"3.12rem",width:"1px"}}),m=(0,eI.y)("div")(()=>({display:"flex",flexDirection:"row",alignItems:"center"})),v=(0,eI.y)(tR.Z)(e=>{let{theme:a}=e;return{fontSize:"0.8rem",color:a.palette.coral.main,padding:0}}),f=(0,eI.y)("div")(()=>({width:a?"50%":"100%",marginLeft:t?"0.8rem":0})),x=(0,eI.y)("div")(()=>({width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end"}));return(0,i.jsxs)(u,{"data-testid":s||"cover-accordion",defaultExpanded:d,children:[(0,i.jsxs)(y,{expandIcon:(0,i.jsx)(tT.Z,{}),children:[t&&t,(0,i.jsxs)(f,{"data-test":"cover-accordion__header-text",children:[n&&(0,i.jsx)(v,{children:(0,i.jsx)(D.Z,{...n})}),(0,i.jsx)(g.Z,{children:(0,i.jsx)(D.Z,{...l})})]}),a&&(0,i.jsx)(x,{children:a}),(0,i.jsx)(m,{children:(0,i.jsx)(h,{})})]}),(0,i.jsx)(p,{children:r})]})};var tS=t(24717);let tZ=(0,eI.y)(eA.Z)(()=>({listStyleType:"disc",listStylePosition:"inside"})),tI=(0,eI.y)(eS.ZP)(e=>{let{theme:a}=e;return{display:"flex",alignItems:"flex-start",fontFamily:a.typography.secondaryFontFamily}}),tw=(0,eI.y)(tS.Z)(e=>{let{theme:a}=e;return{marginRight:a.spacing(2),marginTop:a.spacing(.8),fontSize:"0.5rem"}}),t_=e=>{let a=null==e?void 0:e.itemLink;return(0,i.jsx)(D.Z,{id:e.id,defaultMessage:e.defaultMessage,values:a&&{a:a=>(0,i.jsx)(e8.Z,{href:null==e?void 0:e.itemLink,target:"_blank",children:a})}})},tO=e=>{let{includedCoverModules:a=[],excludedCoverModules:t=[],headersOverride:l}=e,r=(null==l?void 0:l.included)?null==l?void 0:l.included:(0,i.jsx)(D.Z,{id:"CoverList.WhatIsCovered",defaultMessage:"What is covered"}),o=(null==l?void 0:l.excluded)?null==l?void 0:l.excluded:(0,i.jsx)(D.Z,{id:"CoverList.WhatIsNotCovered",defaultMessage:"What is not covered"});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Z,{children:r}),(0,i.jsx)(tZ,{sx:{listStyleType:"disc"},children:a&&a.map((e,a)=>(0,i.jsxs)(tI,{children:[(0,i.jsx)(tw,{}),e]},"covered-".concat(a)))}),(0,i.jsx)(p.Z,{}),(0,i.jsx)(g.Z,{sx:{paddingTop:2},children:o}),(0,i.jsx)(tZ,{children:t&&t.map((e,a)=>(0,i.jsxs)(tI,{children:[(0,i.jsx)(tw,{}),e]},"not-covered-".concat(a)))})]})};var tL=t(38405),tB=t(31427);let tN={width:24,height:24},tY=(0,eI.y)(aQ.Z)(e=>{let{theme:a}=e;return{...tN,color:a.palette.coral.main}}),tF=e=>{switch(e.variant){case"active":return(0,i.jsx)(eT.Z,{color:"success","data-testid":"icon-".concat(e.variant)});case"cancelled":case"inactive":return(0,i.jsx)(em.Z,{color:"error","data-testid":"icon-".concat(e.variant)});case"toActivate":return(0,i.jsx)(tY,{"data-testid":"icon-".concat(e.variant)});case"pending":return(0,i.jsx)(tB.Z,{color:"warning","data-testid":"icon-".concat(e.variant)});case"paused":return(0,i.jsx)(ek.Z,{color:"warning","data-testid":"icon-".concat(e.variant)});case"none":return null;default:return(0,i.jsx)(tY,{"data-testid":"icon-add"})}},tW=e=>{let a=(0,eI.y)(W.ZP)(()=>e.subtitle?{alignContent:"top",marginTop:"0.4rem",alignItems:"center"}:{alignContent:"center",alignItems:"center"}),t=(0,r.vU)({defaultTitle:{id:"Cover.Bicycle.Insurance",defaultMessage:"Bicycle Insurance"}}),l=e.title?e.title:t.defaultTitle;return(0,i.jsxs)(W.ZP,{container:!0,gap:1,"data-test":"cover-card-header",children:[(0,i.jsx)(a,{item:!0,children:(0,i.jsx)(tF,{variant:e.iconVariant})}),(0,i.jsxs)(W.ZP,{item:!0,children:[(0,i.jsx)(g.Z,{fontSize:32,variant:"h2",children:(0,i.jsx)(D.Z,{...l})}),e.subtitle&&(0,i.jsx)(g.Z,{fontSize:16,variant:"body2",children:(0,i.jsx)(D.Z,{id:e.subt
1itle.id,defaultMessage:e.subtitle.defaultMessage,values:e.subtitle.values})})]})]})},tH=(0,tL.Z)(e1.Z)(e=>{let{theme:a}=e;return{padding:"24px",borderStyle:"solid",borderWidth:"1px",background:a.palette.background.paper,borderColor:a.palette.teal.lightest,borderRadius:"8px !important",margin:"1.5em 0 1.5em 0"}}),tU=e=>{var a,t;return(0,i.jsx)(tH,{children:(0,i.jsxs)(W.ZP,{container:!0,gap:1,"data-test":"cover-card",children:[(0,i.jsxs)(W.ZP,{container:!0,alignItems:"center",justifyContent:"space-between",children:[(0,i.jsx)(W.ZP,{item:!0,xs:12,md:e.cappedPrice?9:12,children:(0,i.jsx)(tW,{title:e.title,iconVariant:e.iconVariant,subtitle:e.subtitle})}),e.cappedPrice&&(0,i.jsx)(W.ZP,{item:!0,marginTop:1,marginBottom:1,children:(0,i.jsx)(tu,{currency:e.currency,borderStyle:"solid",cappedAtConfig:e.cappedPrice})})]}),e.bannerMessage&&(0,i.jsx)(tP,{copy:e.bannerMessage,values:e.bannerMessageValues}),e.DetailSection&&(0,i.jsx)(W.ZP,{item:!0,xs:12,"data-test":"cover-card__details",children:e.DetailSection}),e.DocumentSection&&(0,i.jsx)(W.ZP,{item:!0,xs:12,"data-test":"cover-card__documents",children:e.DocumentSection}),(null===(a=e.AdditionalSections)||void 0===a?void 0:a.length)>0&&(null===(t=e.AdditionalSections)||void 0===t?void 0:t.map((e,a)=>(0,i.jsx)(W.ZP,{item:!0,xs:12,"data-test":"cover-card__section-".concat(a),children:e},a))),e.CoverControls&&(0,i.jsx)(W.ZP,{item:!0,xs:12,"data-test":"cover-card__cover-controls",paddingTop:3,children:e.CoverControls})]})})},tG=(0,tL.Z)(e1.Z)(e=>{let{theme:a}=e;return{padding:"24px",borderStyle:"solid",borderWidth:"1px",background:a.palette.background.paper,borderColor:a.palette.teal.lightest,borderRadius:"8px !important",margin:"1.5em 0 1.5em 0"}}),tK=()=>(0,i.jsxs)(ew.Z,{sx:{position:"relative"},children:[(0,i.jsx)(tG,{children:(0,i.jsxs)(ew.Z,{sx:{visibility:"hidden"},children:[(0,i.jsx)(ew.Z,{sx:{height:60}})," ",(0,i.jsx)(ew.Z,{sx:{height:56,marginTop:1}})," ",(0,i.jsx)(ew.Z,{sx:{height:56,marginTop:1}})," ",(0,i.jsx)(ew.Z,{sx:{height:56,marginTop:1}})," ",(0,i.jsx)(ew.Z,{sx:{height:140,marginTop:3}})," "]})}),(0,i.jsx)(ew.Z,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(es.Z,{size:40})})]}),tV=(0,r.vU)({headerDetails:{id:"PropertyPolicyCard.RaceAndWorldwideHeader",defaultMessage:"Race + Worldwide"},headerPrefix:{id:"PropertyPolicyCard.RaceAndWorldwideHeaderPrefix",defaultMessage:"ADD ON"}}),tq=(0,r.vU)({includedCoverModule1:{id:"RaceAndWorldwideAddOn.includedCoverModule1",defaultMessage:"Damage during racing which requires a valid racing licence."},includedCoverModule2:{id:"RaceAndWorldwideAddOn.includedCoverModule2",defaultMessage:"Travel outside of the UK."}}),tz=(0,r.vU)({excludedCoverModule1:{id:"RaceAndWorldwideAddOn.excludedCoverModule1",defaultMessage:"When your gear is used during professional races."},excludedCoverModule2:{id:"RaceAndWorldwideAddOn.excludedCoverModule2",defaultMessage:"If you leave your bike unlocked away from home or abandon your bike."}}),t$=e=>{var a;let{isAddOnActive:t,policyStatus:r,upgradeDate:o,average:n,cap:s,hideAddonActions:d,isActionDisabled:c,onActivateClick:u,onCancelClick:y}=e,g=(0,l.useContext)(e$.Z).defaultCurrency,h=!!(o&&(0,aw.ek)(new Date,o)),m=r&&"active"!==r.status?r.message:h?{id:"YourPolicyCard.PolicyStatus.ActivationPending",defaultMessage:"Pending activation"}:{id:"YourPolicyCard.PolicyStatus.Active",defaultMessage:"Active"},v=Object.entries(tq).map(e=>{let[a,t]=e;return t_(t)}),f=(0,i.jsx)(D.Z,{id:"HealthPolicyCard.WhatIsNotCovered",defaultMessage:"What is not covered"}),x=Object.entries(tz).map(e=>{let[a,t]=e;return t_(t)});return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(tk,{header:tV.headerDetails,withLabel:!t&&(0,i.jsx)(()=>(0,i.jsx)(tu,{currency:g,borderStyle:"solid",cappedAtConfig:{usualPriceInCents:n,cappedPriceInCents:s}}),{}),variant:"dashed",prefix:tV.headerPrefix,withIcon:(0,i.jsx)(tF,{variant:t?null!==(a=null==r?void 0:r.iconVariant)&&void 0!==a?a:"active":"toActivate"}),children:(0,i.jsxs)(i.Fragment,{children:[t&&(0,i.jsxs)(ew.Z,{sx:{paddingBottom:2},children:[(0,i.jsx)(tm,{statusCopy:m,upgradeDate:o,frequencyValue:"Monthly"}),(0,i.jsx)(p.Z,{})]}),v&&x&&(0,i.jsx)(tO,{headersOverride:{excluded:f},includedCoverModules:v,excludedCoverModules:x}
1),!d&&(0,i.jsxs)(ew.Z,{children:[(0,i.jsx)(p.Z,{sx:{marginBottom:"2rem"}}),(0,i.jsxs)(aJ,{children:[t&&(0,i.jsx)(tt,{"test-data":"add-on__cancel-button",onClick:y,disabled:c}),!t&&(0,i.jsx)(ta,{"test-data":"add-on__activate-button",onClick:u})]})]})]})})})};var tQ=t(46765),tJ=t.n(tQ);let tX=e=>{let{href:a,text:t}=e;return(0,i.jsx)(tJ(),{href:a,legacyBehavior:!1,target:"_blank",rel:"noopener noreferrer",passHref:!0,children:(0,i.jsx)(E.Z,{variant:"contained",startIcon:(0,i.jsx)(eb.Z,{}),children:(0,i.jsx)(g.Z,{sx:{fontFamily:"Ambit"},children:(0,i.jsx)(D.Z,{...t})})})})},t0=(0,eI.y)(ew.Z)(e=>{let{theme:a}=e;return{display:"flex",flexFlow:"row",gap:8,justifyContent:"center",alignItems:"center",backgroundColor:a.palette.navy.lightest,color:a.palette.text.primary,borderRadius:100,fontSize:"1rem",padding:"2px 12px 2px 12px"}}),t1=e=>(0,i.jsxs)(W.ZP,{container:!0,gap:1,children:[(0,i.jsxs)(t0,{children:[(0,i.jsx)(g.Z,{sx:{fontFamily:"Simula"},children:(0,i.jsx)(D.Z,{id:"HealthSummary.PolicyReference",defaultMessage:"Policy Reference"})}),(0,i.jsx)(g.Z,{sx:{fontFamily:"Ambit"},children:e.policyReference})]}),e.documents.map(e=>{let{id:a,defaultMessage:t}=e.text;return e&&(0,i.jsx)(tX,{href:e.href,text:{id:a,defaultMessage:t}},a)})]}),t2=e=>{var a;let{loading:t,data:l}=(0,y.a)(eG,{variables:{policyId:e.liabilityPolicyId}}),r=null!==(a=null==l?void 0:l.policy)&&void 0!==a?a:null;if(t||!r)return null;let o=[],n=r.documents&&r.documents.count>0&&r.documents.rows.find(e=>"PolicyDocument"===e.title);return n?(o.push({href:n.url,text:{id:"LiabilitySummary.DownloadDocs",defaultMessage:"Evidence of Cover"}}),(0,i.jsx)(t1,{policyReference:r.policyReference,documents:o})):null};var t5=t(69883),t4=t(28999);let t8=(0,r.vU)({pro:{id:"PolicyCard.CompleteHeader",defaultMessage:"Complete Bike Insurance"},complete:{id:"PolicyCard.CompleteHeader",defaultMessage:"Complete Bike Insurance"},core:{id:"PolicyCard.CoreHeader",defaultMessage:"Core Bike Insurance"},default:{id:"Cover.Type.Header.Bicycle",defaultMessage:"Bicycle Insurance"},coverDetails:{id:"PropertyPolicyCard.Details",defaultMessage:"Cover Details"},documents:{id:"PropertyPolicyCard.BikeInsuranceDocumentsHeader",defaultMessage:"Bike Insurance Documents"},liabilityDocuments:{id:"PolicyCard.LiabilityDocumentsHeader",defaultMessage:"Liability Documents"}}),t9=e=>{var a;let{policyId:t,liabilityPolicyId:n,me:s}=e,d=(0,o.useRouter)(),c=(0,aI.dl)("nl-risk-group-restrictions"),u=d.locale,g=(0,l.useContext)(e$.Z).defaultCurrency,[h,m]=(0,l.useState)(null),[v,f]=(0,l.useState)(!1),[x,C]=(0,l.useState)([]),[P,b]=(0,l.useState)([]),[j,M]=(0,l.useState)(!1),[E,A]=(0,l.useState)(!1),[R,T]=(0,l.useState)(!1),[k,S]=(0,l.useState)(!1),[Z,I]=(0,l.useState)(!1),[w,_]=(0,l.useState)(0),[O,L]=(0,l.useState)(!1),[B]=(0,el.D)(ed.zc),[N,Y]=(0,l.useState)(!1),F=(e,a)=>{L(!1),B({variables:{policyId:t,packageId:e,userFeedback:"".concat(a,": Race & Worldwide Add-on"),applyLockIn:"upgrade"===a},onCompleted:()=>{d.reload()}})};(0,l.useEffect)(()=>{t||"gb"!==u||m(null)},[t,u]),(0,l.useEffect)(()=>{if(null==h?void 0:h.package.id){let e=(0,aL.z)(h.package.id);e&&(C(e.included),b(e.excluded))}},[h]),(0,l.useEffect)(()=>{if(null==h?void 0:h.lockedUntil){let e=new Date(null==h?void 0:h.lockedUntil),a=new Date;e.getTime()>a.getTime()&&M(!0)}},[h]),(0,l.useEffect)(()=>{!(null==h?void 0:h.cancelled)&&!(null==h?void 0:h.paused)&&(null==h?void 0:h.coverOptions)&&((null==h?void 0:h.coverOptions.upgradePackages.length)>0||(null==h?void 0:h.coverOptions.downgradePackages.length)>0)&&A(!0)},[h]),(0,l.useEffect)(()=>{if(j){var e,a;I((null==h?void 0:null===(e=h.coverOptions)||void 0===e?void 0:e.upgradePackages.length)>0&&(null==h?void 0:null===(a=h.coverOptions)||void 0===a?void 0:a.downgradePackages.length)===0)}else I(!0)},[h,j]);let{quoteLoading:H,priceTypeProps:U,addOnDialogProps:G,comparableQuotes:K}=aH(t,k,v),{currentQuote:V}=K,q=n?eC.q3:0,z=Math.round((null==h?void 0:h.capIncTax)*100),$=(null==h?void 0:h.active)&&V;v!==H&&f(H);let Q=(0,aN.go)(aN.$_.PRO),J=(0,aN.go)(aN.$_.COMPLETE),{loading:X}=(0,y.a)(t5.Z,{variables:{policyId:t},skip:!t,onCompleted:e=>{var a,t,i;m(null!==(i=e.policy)&&void 0!==i?i:null),f(X),T([...Q,...J].includes(null===(a=e.policy)||void 0===a?void 0:a.package.key)),S(Q.includes(null===(t=e.policy)||void 0===t?void 0:t.package.key))},fetchPolicy:"network-only"});if((0,y.a)(t4.q,{variables:{cap:z,region:u},skip:!z||!u,onCompleted:e=>{f(X),_(e.historicalAverage.average)}}),v||!h)return(0,i.jsx)(tK,{});let ee=aB(h),ea=(0,aN.LW)(null==h?void 0:h.package.key),et=t8[ea]?t8[ea]:t8.default,ei=(0,r.Em)({id:"Cover.Locked",defaultMessage:"As you changed your cover in the last 30 days, youâre in a lock-in period until {date}. During this time, you can upgrade or edit your gear, but you wonât be able to pause, cancel or downgrade your package.",values:{date:aO(null==h?void 0:h.lockedUntil)}}),er=e=>(0,aw.ek)(new Date,null==e?void 0:e.coverStart)&&(0,aw.ek)(new Date,null==e?void 0:e.coverInception),eo=h.products.filter(e=>"Bicycle"===e.category).map(e=>({value:(0,a_.LQ2)(e.initialValue),eBikeType:e.eBikeType})),en="core"!==ea||!(c&&(0,a_.OCv)({dateOfBirth:null!==(a=null==s?void 0:s.dateOfBirth)&&void 0!==a?a:null,bicycles:eo},u)),es=e=>{let a={activate:!!((!h||!(null==h?void 0:h.active)||(null==h?void 0:h.cancelled))&&!(null==h?void 0:h.paused))&&!er(h),reactivate:!!(h&&!(null==h?void 0:h.cancelled)&&(null==h?void 0:h.paused)),claim:null==h?void 0:h.active,switch:(null==h?void 0:h.active)&&en&&E,pause:(null==h?void 0:h.active)&&!(null==h?void 0:h.paused)&&!(null==h?void 0:h.cancelled),c
1ancel:(null==h?void 0:h.active)&&!(null==h?void 0:h.cancelled)};return!!a[e]&&a[e]};return(0,i.jsxs)(i.Fragment,{children:[N&&(0,i.jsx)(eh,{policy:h,open:N}),(0,i.jsx)(tU,{title:et,iconVariant:ee.iconVariant,bannerMessage:j&&ei,bannerMessageValues:j&&ei.values,DetailSection:h&&(0,i.jsx)(()=>{let e=x.length&&x.map((e,a)=>(0,i.jsx)(D.Z,{...e},a)),a=P.length&&P.map((e,a)=>(0,i.jsx)(D.Z,{...e},a));return(0,i.jsx)(tk,{"test-data":"property-detail",header:t8.coverDetails,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ew.Z,{sx:{paddingBottom:2},children:[(0,i.jsx)(tm,{statusCopy:ee.message,frequencyValue:"Monthly",startDate:null==h?void 0:h.coverStart,endDate:(null==h?void 0:h.active)?null:null==h?void 0:h.coverEnd,pausedDate:null==h?void 0:h.pausedOn,nextBillDate:h.nextBillDate}),(0,i.jsx)(p.Z,{})]}),x&&P&&(0,i.jsx)(tO,{includedCoverModules:e,excludedCoverModules:a})]})},"property-detail")},{}),DocumentSection:(null==h?void 0:h.active)&&(0,i.jsx)(()=>{let{documents:e}=aF(h);return(0,i.jsx)(tk,{"test-data":"property-documents",header:t8.documents,children:(0,i.jsx)(t1,{policyReference:h.policyReference,documents:e})},"property-documents")},{}),AdditionalSections:[(null==h?void 0:h.active)&&(0,i.jsx)(()=>h&&n?(0,i.jsx)(tk,{"test-data":"liability-documents",header:t8.liabilityDocuments,children:n&&(0,i.jsx)(t2,{liabilityPolicyId:n})},"liability-documents"):null,{},"liability-section"),R&&(0,i.jsx)(()=>{if(!h)return null;let e=h.paused||h.cancelled;return(0,i.jsx)("div",{"data-testid":"add-on__race-and-world-wide",children:(0,i.jsxs)(W.ZP,{item:!0,xs:12,"data-testid":k?"addon-active":"addon-add",children:[(0,i.jsx)(t$,{upgradeDate:h.coverStart,isAddOnActive:k,policyStatus:ee,average:U.usualPriceInCents,cap:U.cappedPriceInCents,hideAddonActions:e,isActionDisabled:j||er(h),onActivateClick:()=>L(!0),onCancelClick:()=>L(!0)}),(0,i.jsx)(tD,{capPrice:G.capPrice,pctChange:G.pctChange,newPackageId:G.newPackageId,currencyCode:g,isDialogOpen:O,isAddOnActive:k,quoteErrors:"",onConfirmClick:F,onCancelClick:()=>L(!1)})]})})},{})],CoverControls:(0,i.jsx)(()=>(0,i.jsxs)(aJ,{children:[es("activate")&&(0,i.jsx)(a7,{onClick:()=>d.push("/v2_onboarding")}),es("reactivate")&&(0,i.jsx)(a6,{onClick:()=>Y(!0)}),es("claim")&&(0,i.jsx)(a4,{onClick:()=>d.push("/claims/new-claim")}),es("switch")&&(0,i.jsx)(a8,{onClick:()=>d.push("/cover/property/".concat(null==h?void 0:h.id,"/update/switch")),disabled:!Z}),es("pause")&&(0,i.jsx)(a9,{onClick:()=>d.push("/cover/property/".concat(h.id,"/update/pause")),disabled:j}),es("cancel")&&(0,i.jsx)(a3,{onClick:()=>d.push("/cover/property/".concat(h.id,"/update/cancel")),disabled:j})]}),{}),cappedPrice:$&&{usualPriceInCents:w+q,cappedPriceInCents:z+q},currency:g})]})},t3=()=>{let e=[],a=[],t=[(0,r.Em)({id:"LegalSummaryCard.LegalServiceIncluded1",defaultMessage:"Laka's Legal referral scheme to Carpenters"}),(0,r.Em)({id:"LegalSummaryCard.LegalServiceIncluded2",defaultMessage:"Carpenters will act on your behalf"}),(0,r.Em)({id:"legal-summary-included-3",defaultMessage:"You will receive 100% of all awarded compensation."})],i=[(0,r.Em)({id:"LegalSummaryCard.LegalServiceExluded2",defaultMessage:"Any aspects of a claim brought under the MIB untraced drivers Agreement"}),(0,r.Em)({id:"LegalSummaryCard.LegalServiceExluded3",defaultMessage:"Where the identity of a third-party driver is not known"}),(0,r.Em)({id:"LegalSummaryCard.LegalServiceExluded4",defaultMessage:"Where the claim for damages for pain suffering and loss of amenity is less than \xa31,000"}),(0,r.Em)({id:"LegalSummaryCard.LegalServiceExluded5",defaultMessage:"That falls within the Small Claims Track limits under the Civil ProcedureRules"}),(0,r.Em)({id:"LegalSummaryCard.LegalServiceExluded6",defaultMessage:"Where you do not cooperate fully with Carpenters or their appointed experts and follow their advice or instructions"}),(0,r.Em)({id:"LegalSummaryCard.LegalServiceExluded7",defaultMessage:"Where the incident occurred outside the UK"})];return t.forEach(a=>e.push(t_(a))),i.forEach(e=>a.push(t_(e))),{includedModules:e,excludedModules:a}},t6=e=>{let{href:a,text:t}=e;return(0,i.jsx)(tJ(),{href:a,legacyBehavior:!1,target:"_blank",rel:"noopener noreferrer",passHref:!0,children:(0,i.jsx)(E.Z,{variant:"contained",startIcon:(0,i.jsx)(eb.Z,{}),children:(0,i.jsx)(g.Z,{sx:{fontFamily:"Ambit"},children:(0,i.jsx)(D.Z,{...t})})})})},t7=e=>(0,er.hz)().bool("hide_legal_services")?null:(0,i.jsx)(tU,{DetailSection:(0,i.jsx)(()=>{let{includedModules:e,excludedModules:a}=t3(),t=(0,i.jsx)(D.Z,{id:"LegalServicesCard.WhatIsCovered",defaultMessage:"You have access to"}),l=(0,i.jsx)(D.Z,{id:"LegalServicesCard.WhatIsNotCovered",defaultMessage:"You cannot access this service if"});return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(tk,{"test-data":"legal-detail",header:(0,r.Em)({id:"LegalServicesCard.Details",defaultMessage:"Cover Details"}),children:e&&a&&(0,i.jsx)(tO,{headersOverride:{included:t,excluded:l},includedCoverModules:e,excludedCoverModules:a})},"legal-detail")})},{}),DocumentSection:(0,i.jsx)(()=>(0,i.jsx)(tk,{header:(0,r.Em)({id:"LegalServicesCard.ServiceDocuments",defaultMessage:"Service Documents"}),children:(0,i.jsx)(W.ZP,{container:!0,gap:1,children:(0,i.jsx)(t6,{href:eC.z5,text:(0,r.Em)({id:"YourPolicyCard.LegalCover.Button",defaultMessage:"Legal Summary"})})})}),{}),title:(0,r.Em)({id:"Cover.legalServices",defaultMessage:"Legal Assistance"}),subtitle:{id:"YourPolicyCard.LegalCover.Subtitle",defaultMessage:"As a Laka customer you have access to Laka Legal Services"},iconVariant:e.isActive?"active":"toActivate"}),ie=()=>{let e=[],a=[];return[{id:"HealthPolicyCard.WhatIsCovered.Body1",defaultMessage:"Up to \xa31,500 in medical treatments and \xa350 for medical assessments are covered after an injury."},{id:"HealthPolicyCard.WhatIsCovered.Body12",defaultMessage:"Up to \xa32,500 in partner recovery services depen
1ding on your injuries. See a full list of injuries and benefits <a>here</a>.",itemLink:"//www.laka.co/gb/recovery-insurance"},{id:"HealthPolicyCard.WhatIsNotCovered.Body3",defaultMessage:"Any accidents that occur in the UK or for up to 120 days anywhere in the world."}].forEach(a=>e.push(t_(a))),[{id:"HealthPolicyCard.WhatIsNotCovered.Body1",defaultMessage:"Any bodily injury or illness that is not a result of an accident."},{id:"HealthPolicyCard.WhatIsNotCovered.Body2",defaultMessage:"Professional racing (for events where you are paid to participate or make an appearance)."},{id:"HealthPolicyCard.WhatIsNotCovered.Body4",defaultMessage:"Any act of fraud or dishonesty by you or anyone acting on your behalf."}].forEach(e=>a.push(t_(e))),{includedModules:e,excludedModules:a}};var ia=(0,c.qC)((0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress}),e=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"health"})),openPauseDialog:a=>e((0,$.sl)({pauseCover:!0,policy:a,policyType:"health"})),closeCancelDialog:()=>e((0,$.Xv)()),openReactivateDialog:a=>e((0,$.M8)({policy:a,policyType:"health"}))})))(e=>{let{cancelDialogOpen:a=!1,openPauseDialog:t,openCancelDialog:r}=e,n=(0,o.useRouter)(),[s,d]=(0,l.useState)(!1),[c,u]=(0,l.useState)(null),{loading:g}=(0,y.a)(t5.Z,{variables:{policyId:e.policyId},onCompleted:e=>{var a;u(null!==(a=e.policy)&&void 0!==a?a:null)},skip:!e.policyId});if(g)return null;let{includedModules:h,excludedModules:m}=ie(),v=aB(c),f=(null==c?void 0:c.active)||!1;return(0,i.jsxs)(i.Fragment,{children:[a?(0,i.jsx)(ei,{}):null,s&&(0,i.jsx)(eh,{policy:c,open:s}),(0,i.jsx)(tU,{title:{id:"Cover.Type.Header.Health",defaultMessage:"Injury Cover"},iconVariant:null==v?void 0:v.iconVariant,DetailSection:(0,i.jsx)(()=>(0,i.jsx)(tk,{"test-data":"health-detail",header:{id:"HealthSummary.Details",defaultMessage:"Cover Details"},children:(0,i.jsxs)(i.Fragment,{children:[f&&(0,i.jsxs)(ew.Z,{sx:{paddingBottom:2},children:[(0,i.jsx)(tm,{statusCopy:null==v?void 0:v.message,frequencyValue:"Monthly",startDate:null==c?void 0:c.coverStart,endDate:null==c?void 0:c.coverEnd,pausedDate:null==c?void 0:c.pausedOn,nextBillDate:null==c?void 0:c.nextBillDate}),(0,i.jsx)(p.Z,{})]}),h&&m&&(0,i.jsx)(tO,{includedCoverModules:h,excludedCoverModules:m})]})},"health-detail"),{}),DocumentSection:f&&(0,i.jsx)(()=>{let{documents:e}=aF(c);return(0,i.jsx)(tk,{"test-data":"health-documents",header:{id:"PolicyCard.BikeInsuranceDocumentsHeader",defaultMessage:"Policy Documents"},children:(0,i.jsx)(t1,{policyReference:null==c?void 0:c.policyReference,documents:e})},"health-documents")},{}),CoverControls:(0,i.jsx)(()=>(0,i.jsxs)(aJ,{children:[c&&(0,i.jsx)(a4,{onClick:()=>n.push("/claims/new-claim")}),c&&(c.cancelled||c.paused)&&(0,i.jsx)(a6,{onClick:()=>d(!0)}),c&&!c.paused&&!c.cancelled&&(0,i.jsx)(a9,{onClick:()=>t(c)}),c&&!c.cancelled&&(0,i.jsx)(a3,{onClick:()=>r(c)}),!c&&(0,i.jsx)(te,{onClick:()=>n.push("/onboard/recovery")})]}),{})})]})});let it=(0,r.vU)({warningBanner:{id:"Cover.Liability.Warning",defaultMessage:"The Laka Club no longer exists in this format. \n Third-Party Liability Insurance and perk access is now only available through our bike insurance. \n You still have access to the Laka Club until you cancel or take out a bike policy."},liabilityHeaderTitle:{id:"Cover.Type.Header.Liability",defaultMessage:"Liability Policy"},liabilityClubHeaderTitle:{id:"Cover.Type.Header.LiabilityClubMonthly",defaultMessage:"Laka Club Membership"}});var ii=(0,c.qC)((0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress,hasPolicyBeenCancelled:e.cover.hasPolicyBeenCancelled}),e=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"liabilityClubMonthly"})),openPauseDialog:a=>e((0,$.sl)({pauseCover:!0,policy:a,policyType:"health"})),closeCancelDialog:()=>e((0,$.Xv)())})))(e=>{let[a,t]=(0,l.useState)(!1),{cancelDialogOpen:r=!1,openCancelDialog:o,openPauseDialog:n,hasPolicyBeenCancelled:s}=e,{loading:d,refetch:c,data:{policy:u}={policy:null}}=(0,y.a)(t5.Z,{variables:{policyId:e.policyId},skip:!e.policyId});if((0,l.useEffect)(()=>{!d&&u&&c()},[s,u,c,d]),d)return null;
1let g=aB(u),p=(null==u?void 0:u.active)||!1;return(0,i.jsxs)(i.Fragment,{children:[r?(0,i.jsx)(ei,{}):null,a&&(0,i.jsx)(eh,{policy:u,open:a}),(0,i.jsx)(tU,{title:{id:"Cover.Type.Header.Liability.LakaClub",defaultMessage:"Laka Club Membership"},bannerMessage:it.warningBanner,iconVariant:null==g?void 0:g.iconVariant,DetailSection:(0,i.jsx)(()=>(0,i.jsx)(tk,{"test-data":"liability-detail",header:{id:"CoverCard.Details.Header",defaultMessage:"Cover Details"},children:(0,i.jsx)(i.Fragment,{children:p&&(0,i.jsx)(ew.Z,{sx:{paddingBottom:2},children:(0,i.jsx)(tm,{statusCopy:null==g?void 0:g.message,frequencyValue:"Monthly",startDate:null==u?void 0:u.coverStart,endDate:null==u?void 0:u.coverEnd,pausedDate:null==u?void 0:u.pausedOn,nextBillDate:null==u?void 0:u.coverEnd})})})},"liability-detail"),{}),DocumentSection:p&&(0,i.jsx)(()=>{let{documents:e}=aF(u);return(0,i.jsx)(tk,{"test-data":"liability-documents",header:{id:"Liability.InsuranceDocumentsHeader",defaultMessage:"Policy Documents"},children:(0,i.jsx)(t1,{policyReference:null==u?void 0:u.policyReference,documents:e})},"liability-documents")},{}),CoverControls:(0,i.jsx)(()=>(0,i.jsxs)(aJ,{children:[u&&!u.cancelled&&(0,i.jsx)(a3,{onClick:()=>o(u)}),u&&!u.paused&&!u.cancelled&&(0,i.jsx)(a9,{onClick:()=>n(u)}),u&&(u.cancelled||u.paused)&&(0,i.jsx)(a6,{onClick:()=>t(!0)})]}),{},"under-package-buttons-section")})]})});function il(){let e=(0,eW._)(["\n mutation SetPolicyAutoRenew($policyId: String!, $autoRenew: Boolean!) {\n setPolicyAutoRenew(input: { policyId: $policyId, autoRenew: $autoRenew }) {\n autoRenew\n }\n }\n"]);return il=function(){return e},e}let ir=(0,eH.ZP)(il());var io=t(75830),is=t(49713);let id=(0,r.vU)({headerDetails:{id:"PropertyPolicyCard.TheftAndDamageHeader",defaultMessage:"Theft + Damage"},headerPrefix:{id:"PropertyPolicyCard.TheftAndDamageHeaderPrefix",defaultMessage:"EXTENDED COVER"},includedHeader:{id:"TheftAndDamageAddOn.included.header",defaultMessage:"What's covered"},excludedHeader:{id:"TheftAndDamageAddOn.excluded.header",defaultMessage:"What isn't covered"},addonStatusActive:{id:"TheftAndDamageAddOn.addonStatus.active",defaultMessage:"Active"},addonStatusInactive:{id:"TheftAndDamageAddOn.addonStatus.inactive",defaultMessage:"Inactive"}}),ic=(0,r.vU)({naturalDisaster:{id:"TheftAndDamageAddOn.included.naturalDisaster",defaultMessage:"Material damage caused by a natural disaster recognised by the state (e.g. flooding)."},trafficAccident:{id:"TheftAndDamageAddOn.included.trafficAccident",defaultMessage:"Bodily injury or death of the insured driver resulting from a traffic accident, up to a maximum limit of â¬200,000. Compensation is reduced by 50% when a helmet is not worn."},assaultAndTheft:{id:"TheftAndDamageAddOn.included.assaultAndTheft",defaultMessage:"Coverage if you are assaulted and your vehicle is stolen."}
1,terrorism:{id:"TheftAndDamageAddOn.included.terrorism",defaultMessage:"Material damage caused by a terrorist attack recognised by the state."},collision:{id:"TheftAndDamageAddOn.included.collision",defaultMessage:"Damage caused by a collision with an identified third party, a pedestrian, or another vehicle."}}),iu=(0,r.vU)({intentionalFault:{id:"TheftAndDamageAddOn.excluded.intentionalFault",defaultMessage:"Accidents caused by intentional fault of the insured driver."},drivingUnderInfluence:{id:"TheftAndDamageAddOn.excluded.drivingUnderInfluence",defaultMessage:"Damage if the driver is over the legal limit for alcohol, medication or drugs."},theftWhenParked:{id:"TheftAndDamageAddOn.excluded.theftWhenParked",defaultMessage:"Theft of your vehicle when parked (even if locked with a chain) or any theft without violence."},wearAndTear:{id:"TheftAndDamageAddOn.excluded.wearAndTear",defaultMessage:"Damage due to poor maintenance or wear and tear.."},unidentifiedCollision:{id:"TheftAndDamageAddOn.excluded.unidentifiedCollision",defaultMessage:"Collision with an unidentified or fleeing party."}}),iy=e=>{let{isAddOnActive:a,upgradeDate:t,hideAddonActions:l,isActionDisabled:r,onActivateClick:o,onCancelClick:n}=e,s=(0,u.Z)(),d=(0,is.Z)(),c=Object.entries(ic).map(e=>{let[a,t]=e;return t_(t)}),y=Object.entries(iu).map(e=>{let[a,t]=e;return t_(t)});return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(tk,{header:id.headerDetails,withLabel:(0,i.jsx)(io.Z,{sx:{color:d.palette.base.coral.main,border:"1px dashed ".concat(d.palette.base.coral.main)},label:s.formatMessage(a?id.addonStatusActive:id.addonStatusInactive),variant:"outlined"}),variant:"dashed",prefix:id.headerPrefix,withIcon:(0,i.jsx)(tF,{variant:a?"active":"toActivate"}),children:(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsxs)(ew.Z,{sx:{paddingBottom:2},children:[(0,i.jsx)(tm,{statusCopy:{id:"YourPolicyCard.PolicyStatus.Active",defaultMessage:"Active"},upgradeDate:t,frequencyValue:"Monthly"}),(0,i.jsx)(p.Z,{})]}),c&&y&&(0,i.jsx)(tO,{headersOverride:{included:s.formatMessage(id.includedHeader),excluded:s.formatMessage(id.excludedHeader)},includedCoverModules:c,excludedCoverModules:y}),!l&&(0,i.jsxs)(ew.Z,{children:[(0,i.jsx)(p.Z,{sx:{marginBottom:"2rem"}}),(0,i.jsxs)(aJ,{children:[a&&(0,i.jsx)(tt,{"test-data":"add-on__cancel-button",onClick:n,disabled:r}),!a&&(0,i.jsx)(ta,{"test-data":"add-on__activate-button",onClick:o})]})]})]})})})},ig=(0,r.vU)({printingNotice:{id:"Cover.Documents.printingNotice",defaultMessage:"If you need assistance with printing the sticker, our support team is here to help."},policyDocuments:{id:"Cover.Header.PolicyDocuments",defaultMessage:"Policy Documents"}}),ip=e=>{let{cancelDialogOpen:a=!1,openCancelDialog:t,activeOrAvailablePolicy:l,policy:r,attributes:n,title:s,subtitle:d,includedCoverModules:c,excludedCoverModules:u,isAddOnActive:y,bannerMessage:p,bannerMessageUrl:h,showTheftAndDamageAddOn:m,policyType:v,autoRenew:f=!1,policyDefinitionId:x,isUserMissingPaymentSource:C=!1}=e,P=(0,o.useRouter)(),b="".concat((0,er.R2)().get("apiUrl"),"/v3/graphql"),[j]=(0,el.D)(ir,{context:{uri:b}}),M="45e15a48-635d-4c5b-878d-0de7fdabd7d3"===x,E=async()=>{try{var e;let a=await j({variables:{policyId:r.id,autoRenew:!f}});(null===(e=a.data)||void 0===e?void 0:e.setPolicyAutoRenew)&&P.reload()}catch(e){}},A=aB(r),R=(null==r?void 0:r.active)||!1,T=c.length&&c.map((e,a)=>(0,i.jsx)(D.Z,{...e},a)),k=u.length&&u.map((e,a)=>(0,i.jsx)(D.Z,{...e},a));return(0,i.jsxs)(i.Fragment,{children:[a?(0,i.jsx)(ei,{}):null,(0,i.jsx)(tU,{title:s,subtitle:d,iconVariant:null==A?void 0:A.iconVariant,DetailSection:(0,i.jsx)(()=>{let e="".concat(v,"-detail");return(0,i.jsxs)(tk,{testId:e,header:{id:"PropertyPolicyCard.Details",defaultMessage:"Cover Details"},children:[(0,i.jsx)(ew.Z,{sx:{paddingBottom:2},children:(0,i.jsx)(tm,{isAnnualPolicy:!0,statusCopy:null==A?void 0:A.message,frequencyValue:l.durationUnit,startDate:null==r?void 0:r.coverStart,endDate:null==r?void 0:r.coverEnd,pausedDate:null==r?void 0:r.pausedOn,cancelledDate:null==r?void 0:r.cancelledOn,nextBillDate:null==r?void 0:r.nextBillDate,paymentSchedule:null==r?void 0:r.paymentSchedule})}),c&&u&&(0,i.jsx)(tO,{includedCoverModules:T,excludedCoverModules:k})]},e)},{}),DocumentSection:R&&(0,i.jsx)(()=>{let{documents:e}=aF(r),a="".concat(v,"-documents");return(0,i.jsxs)(tk,{testId:a,header:ig.policyDocuments,children:[(0,i.jsx)(g.Z,{variant:"body2",color:"text.secondary",sx:{py:4},children:(0,i.jsx)(D.Z,{...ig.printingNotice})}),(0,i.jsx)(t1,{policyReference:null==r?void 0:r.policyReference,documents:e})]},a)},{}),AdditionalSections:[(null==r?void 0:r.active)&&(0,i.jsx)(()=>r&&m?(0,i.jsx)(ew.Z,{"data-testid":"add-on__race-and-world-wide",children:(0,i.jsx)(W.ZP,{item:!0,xs:12,"data-testid":y?"addon-active":"addon-add",children:(0,i.jsx)(iy,{upgradeDate:r.coverStart,isAddOnActive:y,average:0,cap:0,isActionDisabled:!1,onActivateClick:()=>!1,onCancelClick:()=>!1,hideAddonActions:!0})})}):null,{},"theft-and-damage-add-on")],CoverControls:(0,i.jsx)(()=>(0,i.jsxs)(aJ,{children:[(0,i.jsx)(a4,{onClick:()=>P.push("/claims/new-claim")}),M&&(0,i.jsx)(ti,{onClick:E,disabled:C,isEnabled:f}),r&&!r.cancelled&&(0,i.jsx)(a3,{onClick:()=>t(r)})]}),{},"under-package-buttons-section"),bannerMessage:p,bannerMessageValues:{link:e=>(0,i.jsx)(tJ(),{href:"".concat(h),passHref:!0,children:(0,i.jsx)(e8.Z,{children:e})})}})]})},ih=(0,r.vU)({title:{id:"Cover.Type.Header.ThirdPartyLiability",defaultMessage:"Third Party Liability"},missingPaymentDetails:{id:"Cover.Banner.MissingPaymentDetails",defaultMessage:"Please <link>update your payment details</link> to keep your policy active."}
1,missingSerialNumber:{id:"Cover.Banner.MissingSerialNumber",defaultMessage:"To generate your insurance sticker, please <link>register your serial number</link>."}});var im=(0,c.qC)((0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress,hasPolicyBeenCancelled:e.cover.hasPolicyBeenCancelled}),e=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"liabilityClubMonthly"})),closeCancelDialog:()=>e((0,$.Xv)())})))(e=>{var a,t,r,o;let{openCancelDialog:n,cancelDialogOpen:s,hasPolicyBeenCancelled:d,activeOrAvailablePolicy:c,isUserMissingPaymentSource:u,policyId:g,attributes:p}=e,[h,m]=(0,l.useState)(!1),[v,f]=(0,l.useState)([]),[x,C]=(0,l.useState)([]),{loading:P,refetch:b,data:{policy:j}={policy:null}}=(0,y.a)(t5.Z,{variables:{policyId:g},skip:!g}),M=null==j?void 0:j.parsedCoverModules,D=null==j?void 0:null===(a=j.package)||void 0===a?void 0:a.id,E=null!==(o=null==j?void 0:null===(r=j.policyProducts)||void 0===r?void 0:null===(t=r.rows)||void 0===t?void 0:t[0])&&void 0!==o?o:{brand:"",modelName:"",typeName:"EScooter"};if((0,l.useEffect)(()=>{if(D){let{included:e,excluded:a}=(0,aL.z)(D);f(e),C(a)}},[D]),(0,l.useEffect)(()=>{(null==j?void 0:j.active)&&!j.cancelled&&M&&m(M.includes("TheftWithAssault"))},[M]),(0,l.useEffect)(()=>{!P&&j&&b()},[d,j,b,P]),P)return null;let{brand:A,modelName:R,typeName:T}=E,k="".concat("other"===A?"":A||""," ").concat(R||""," ").concat((null==T?void 0:T.length)>0?T:"EScooter").trim(),S=u&&ih.missingPaymentDetails;return(0,i.jsx)(ip,{title:ih.title,subtitle:{id:"Cover.Subtitle.ThirdPartyLiability",defaultMessage:k},isAddOnActive:h,includedCoverModules:v,excludedCoverModules:x,policy:j,openCancelDialog:n,cancelDialogOpen:s,activeOrAvailablePolicy:c,attributes:p,packageId:D,bannerMessage:S,bannerMessageUrl:"/payments",showTheftAndDamageAddOn:!0,policyType:"ThirdPartyLiability"})});let iv=(0,r.vU)({title:{id:"Cover.Type.Header.Property",defaultMessage:"Property"},missingPaymentDetails:{id:"Cover.Banner.MissingPaymentDetails",defaultMessage:"Please <link>update your payment details</link> to keep your policy active."}});var ix=(0,c.qC)((0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,cancelInProgress:e.cover.cancelInProgress,hasPolicyBeenCancelled:e.cover.hasPolicyBeenCancelled}),e=>({openCancelDialog:a=>e((0,$.sl)({pauseCover:!1,policy:a,policyType:"property"})),closeCancelDialog:()=>e((0,$.Xv)())})))(e=>{var a,t,r,o,n;let{openCancelDialog:s,cancelDialogOpen:d,hasPolicyBeenCancelled:c,activeOrAvailablePolicy:u,isUserMissingPaymentSource:g,policyId:p,attributes:h}=e,[m,v]=(0,l.useState)(!1),[f,x]=(0,l.useState)([]),[C,P]=(0,l.useState)([]),{loading:b,refetch:j,data:{policy:M}={policy:null}}=(0,y.a)(t5.Z,{variables:{policyId:p},skip:!p}),D=null==M?void 0:M.parsedCoverModules,E=null==M?void 0:null===(a=M.package)||void 0===a?void 0:a.id,A=null!==(n=null==M?void 0:null===(r=M.policyProducts)||void 0===r?void 0:null===(t=r.rows)||void 0===t?void 0:t[0])&&void 0!==n?n:{brand:"",modelName:"",typeName:"Bicycle"};if((0,l.useEffect)(()=>{if(E){let{included:e,excluded:a}=(0,aL.z)(E);x(e),P(a)}},[E]),(0,l.useEffect)(()=>{(null==M?void 0:M.active)&&!M.cancelled&&D&&v(D.includes("TheftWithAssault"))},[D]),(0,l.useEffect)(()=>{!b&&M&&j()},[c,M,j,b]),b)return null;let{brand:R,modelName:T,typeName:k}=A,S="".concat("other"===R?"":R||""," ").concat(T||""," ").concat((null==k?void 0:k.length)>0?k:"Bicycle").trim(),Z=g&&iv.missingPaymentDetails;return(0,i.jsx)(ip,{title:iv.title,subtitle:{id:"Cover.Subtitle.Property",defaultMessage:S},isAddOnActive:m,includedCoverModules:f,excludedCoverModules:C,policy:M,openCancelDialog:s,cancelDialogOpen:d,activeOrAvailablePolicy:u,attributes:h,packageId:E,bannerMessage:Z,bannerMessageUrl:"/payments",showTheftAndDamageAddOn:!1,policyType:"Property",autoRenew:null==M?void 0:M.autoRenew,policyDefinitionId:null==M?void 0:null===(o=M.policyDefinition)||void 0===o?void 0:o.id,isUserMissingPaymentSource:g})});let iC=(0,r.vU)({missingPaymentInfo:{id:"Cover.MissingPaymentInfo",defaultMessage:"We are aware of some issues related to monthly payments and insurance policy details. No further payment collection will take place until the amounts are corrected. Our team is working to resolve this as soon as possible."}}),iP=e=>{let a=(0,er.hz)(),t=e.activeOrAvailablePolicies.find(e=>"Liability"===e.label),l=(0,ak.tE)(e.activeOrAvailablePolicies),r=a.bool("hide_legal_services"),o=a.bool("annual_policy_missing_payment_info_custom_message");return(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)("div",{"data-testid":"custom-cover-message",children:(0,i.jsx)(tP,{copy:iC.missingPaymentInfo})}),e.activeOrAvailablePolicies.map(a=>"Property"===a.label?l?null:"year"!==a.durationUnit?(0,i.jsx)("div",{"data-testid":"property-section",children:(0,i.jsx)(t9,{policyId:a.id,liabilityPolicyId:null==t?void 0:t.id,me:e.me})},"".concat(a.id,"-property-section")):(0,i.jsx)("div",{"data-testid":"annual-property-section",children:(0,i.jsx)(ix,{policyId:a.id,activeOrAvailablePolicy:a,isUserMissingPaymentSource:e.isUserMissingPaymentSource,attributes:e.attributes})},"".concat(a.id,"-annual-property-section")):"Health"===a.label?l?null:(0,i.jsx)("div",{"data-testid":"recovery-section",children:(0,i.jsx)(ia,{"data-testid":"recovery-section",policyId:a.id})},"".concat(a.id,"-recovery-section")):"ThirdPartyLiability"===a.type?(0,i.jsx)("div",{"data-testid":"third-party-liability-section",children:(0,i.jsx)(im,{policyId:a.id,activeOrAvailablePolicy:a,isUserMissingPaymentSource:e.isUserMissingPaymentSource,attributes:e.attributes})},"".concat(a.id,"-third-party-liability-section")):l?(0,i.jsx)("div",{"data-testid":"liability-standalone-section",children:(0,i.jsx)(ii,{policyId:a.id},a.id)},"".concat(a.id,"-liability-standalone-section")):void 0),!r&&(0,i.jsx)("div",{"data-testid":"legal-section",children:(0,i.jsx)(t7,{isActive:e.hasActivePolicy})},"legal")]})};var ib=(0,c.qC)((0,d.$j)(e=>({cancelDialogOpen:e.cover.cancelDialogOpen,reactivateDialogOpen:e.cover.reactivateDialogOpen,reactivatePolicyError:e.cover.reactivatePolicyError,hasPolicyBeenCancelled:e.cover.hasPolicyBeenCancelled,hasPoilicyBeenReactivated:e.cover.hasPolicyBeenReactivated})))(e=>{let{restrictions:a,hasPolicyBeenCancelled:t=!1,hasPolicyBeenReactivated:r=!1,cancelDialogOpen:n=!1,reactivateDialogOpen:s=!1}=e,d=(0,u.Z)(),c=(0,er.hz)(),m=(0,o.useRouter)(),[v,f]=(0,l.useState)([]),[x,C]=(0,l.useState)(!1),[P,b]=(0,l.useState)(!1),[j,M]=(0,l.useState)(null);(0,l.useEffect)(()=>{(t||r)&&m.reload()},[t,r]),(0,l.useEffect)(()=>{let e=(0,h.b3)(a,h.Cv.Policy),t=!!e.length,i=t?e[0].reason:null;b(t),M(i)},[a]),(0,l.useEffect)(()=>{(t||r)&&(f(v),setTimeout(()=>{D()},1e3))},[t,r]);let{refetch:D}=(0,y.a)(ec._v,{onCompleted:e=>{let a=e.policyDefinitions,t=e.profileComplete?e.profileComplete.availablePolicies:[],i=(0,ak.ZT)((0,ak.Wb)(a,t,c));f(i),C(i.some(e=>null==e?void 0:e.active))}});return(0,i.jsxs)("div",{children:[P?(0,i.jsx)(ex,{policyCreationBlockedReason:j}):null,n?(0,i.jsx)(ei,{}):null,s?(0,i.jsx)(eh,{open:s}):null,v.map((e,a)=>{if(!e)return null;let t=e.label||e.type;return"Liability"===t?c.has("hide_liability")?null:(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(aZ,{}),(0,i.jsxs)(g.Z,{variant:"h5",gutterBottom:!0,children:[d.formatMessage(
1aS.Liability),e.active||e.paused?(0,i.jsx)(eq,{policyId:e.id}):(0,i.jsx)(eQ,{policyCreationBlocked:P,policyType:e.type})]})]}):"Health"===t?(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(aZ,{}),(0,i.jsxs)(g.Z,{variant:"h5",gutterBottom:!0,children:[d.formatMessage(aS.Health),e.active||e.paused?(0,i.jsx)(e6,{policyId:e.id}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e7,{policyCreationBlocked:P})})]})]}):"Property"===t?(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(aZ,{}),(0,i.jsxs)(g.Z,{variant:"h5",gutterBottom:!0,children:[d.formatMessage(aS.Property),e.active||e.paused?(0,i.jsx)(ag,{sectionTitle:d.formatMessage(aS.Property),policyId:e.id,policyCreationBlocked:P}):(0,i.jsx)(aE,{policyId:e.id,policyCreationBlocked:P,policy:e,wasPreviouslyCancelled:e.wasPreviouslyCancelled})]})]}):"Group"===t?(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(aZ,{}),(0,i.jsxs)(g.Z,{variant:"h5",gutterBottom:!0,children:[d.formatMessage(aS.Property),e.active||e.paused?(0,i.jsx)(aT,{policyId:e.id}):(0,i.jsx)(aE,{policyId:e.id,policyCreationBlocked:P,policy:e,wasPreviouslyCancelled:!1})]})]}):void 0}),x&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{style:{margin:"16px 0px"}}),(0,i.jsx)(eM,{})]})]})}),ij=t(55856);let iM=(0,r.vU)({pageTitle:{id:"PageTitles.Cover",defaultMessage:"Your Cover"}}),iD=e=>{let a=/core|complete|gb_property_pro_w_liability|recovery|fr_third_party_liability_luko/;return e.some(e=>{var t;return a.test(null===(t=e.packageName)||void 0===t?void 0:t.toLowerCase())})};var iE=(0,s.Md)(s.Xw)((0,s._W)(iM.pageTitle),(0,s.yI)(()=>n().push("/")),(0,s.lB)())(()=>{var e,a,t;let r=(0,l.useContext)(e$.Z),o=(0,er.hz)(),n=r.restrictions||[],[s,d]=(0,l.useState)(!1),[c,u]=(0,l.useState)([]),{data:g}=(0,y.a)(ec._v,{onCompleted:e=>{let a=e.policyDefinitions,t=e.profileComplete?e.profileComplete.availablePolicies:[],i=(0,ak.ZT)((0,ak.Wb)(a,t,o));u(i),d(i.some(e=>null==e?void 0:e.active))}}),{data:p}=(0,y.a)(ij.I,{fetchPolicy:"network-only"}),h=!!(null==p?void 0:p.me)&&!(null==p?void 0:null===(a=p.me)||void 0===a?void 0:null===(e=a.paymentSources)||void 0===e?void 0:e.length),m=null==g?void 0:null===(t=g.profileComplete)||void 0===t?void 0:t.attributes,v=null==p?void 0:p.me.dateOfBirth;return iD(c)||(0,ak.tE)(c)||(0,ak.Q3)(c)?(0,i.jsx)(iP,{restrictions:n,activeOrAvailablePolicies:c,hasActivePolicy:s,isUserMissingPaymentSource:h,attributes:m,me:{dateOfBirth:null!=v?v:null}}):(0,i.jsx)(ib,{restrictions:n})})}},function(e){e.O(0,[3968,5972,8249,7009,1686,9966,7866,2847,9530,8171,2898,7841,5381,7341,8110,9969,1468,514,3154,6765,2981,371,2985,756,27,4835,2156,2888,9774,179],function(){return e(e.s=28583)}),_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.