1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,437749,(e,t,r)=>{t.exports=new Proxy({},{get:(e,t)=>"__esModule"===t||(()=>null)})},938870,e=>{"use strict";var t=e.i(470733),r=e.i(205318),a=e.i(957504);let s=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:l="",children:o,iconNode:c,...d},x)=>(0,a.createElement)("svg",{ref:x,...n,width:t,height:t,stroke:e,strokeWidth:i?24*Number(r)/Number(t):r,className:s("lucide",l),...d},[...c.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(o)?o:[o]])),l=(e,t)=>{let r=(0,a.forwardRef)(({className:r,...n},l)=>(0,a.createElement)(i,{ref:l,iconNode:t,className:s(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n}));return r.displayName=`${e}`,r},o=l("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),c=l("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),d=l("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),x=l("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]),m=l("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),h=l("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),u=l("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),p=l("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var g=e.i(72785);let v=l("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),f=l("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),y=l("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),b=l("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),j=l("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),N=l("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),w=l("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]),k=l("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),C=l("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),M=l("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),S=l("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),L=l("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),P=l("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),F=l("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),T=l("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]),R=l("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),A=l("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),D=l("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),$=l("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.5
179a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]),U=l("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),E=l("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);l("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);let I=l("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);l("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),l("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),l("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);let _=l("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);l("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),l("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]),l("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),l("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]),l("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);let z=l("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);l("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),l("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),l("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),l("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),l("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),l("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),l("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),l("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),l("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);let B=l("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function q(...e){return(0,r.twMerge)((0,t.clsx)(e))}function O(e){return"GBP"===e?"£":"USD"===e?"$":"EUR"===e?"â¬":e}e.i(437749);var H={searchFacilities:"Searching facilities",selectFacility:"Loading facility details",openPreview:"Opening preview",o
1penMapView:"Opening map view",startCheckout:"Starting checkout",getMyRentals:"Checking your rentals",getMyPaymentMethods:"Looking up payment methods",getMyNextPayment:"Checking next payment",getDashboardSummary:"Loading account overview",getMyProfile:"Checking your profile",getMyLoyalty:"Loading loyalty status",checkVerificationStatus:"Checking identity verification",startIdentityVerification:"Starting identity verification",requestPriceReduction:"Requesting price reduction",escalateToOperator:"Contacting operator",checkNegotiationStatus:"Checking negotiation",offerChoices:"",offerAddOns:"Preparing add-ons",offerProtection:"Loading protection plans",presentOperatorTerms:"Loading operator terms",collectDates:"Setting dates",updateCheckout:"Updating checkout",postRentalSummary:"Preparing rental summary",collectPhoneForCallback:"Collecting phone number",reserveUnit:"Reserving unit",scheduleWalkthrough:"Scheduling walkthrough",requestCallback:"Requesting callback",getRentalHistory:"Loading rental history",getRentalDetail:"Loading rental details",getPaymentMethods:"Looking up payment methods",getMyActivities:"Loading recent activity",getMyTasks:"Checking pending tasks",getUpcomingMoveIns:"Checking upcoming moves",getMyContracts:"Loading your contracts",getMyInvoices:"Loading your invoices",getMySubscriptions:"Loading your subscriptions",getMyMoveEvents:"Loading move events",getMyAccessUnits:"Loading your access units",unlockUnit:"Unlocking unit",getMyAccessCodes:"Loading access codes",getOperatorOverview:"Loading operator overview",getFacilitySnapshot:"Loading facility data",listFacilities:"Loading facilities",listTickets:"Loading tickets",getTicket:"Fetching ticket details",createTicket:"Creating ticket",assignTicket:"Assigning ticket",closeTicket:"Closing ticket",getRevenueAnalytics:"Pulling revenue analytics",getOccupancyAnalytics:"Checking occupancy",getChurnAnalytics:"Analysing churn",getMarketingAnalytics:"Loading marketing metrics",getMoveStatistics:"Pulling move statistics",createCustomReport:"Generating report",exportReport:"Exporting report",listGoals:"Loading pipeline goals",getGoal:"Fetching goal details",createGoal:"Creating goal",moveGoalStage:"Updating pipeline stage",getPipelineSummary:"Loading pipeline summary",getPipelineForecast:"Generating forecast",listContacts:"Searching contacts",getContact:"Loading contact details",createContact:"Creating contact",updateContact:"Updating contact",convertLead:"Converting lead",getContactTenancies:"Loading contact tenancies",listCompanies:"Loading companies",getCompany:"Fetching company details",createCompany:"Creating company",listCompanyContacts:"Loading company contacts",listCompanyFacilities:"Loading company facilities",associateCompanyFacility:"Linking company to facility",listCompanyUnits:"Loading company units",associateCompanyUnit:"Linking company to unit",associateCompanyContact:"Linking contact to company",listTenancies:"Loading tenancies",getTenancy:"Fetching tenancy details",listSubscriptions:"Loading subscriptions",pauseSubscription:"Pausing subscription",cancelSubscription:"Cancelling subscription",listMoveEvents:"Loading move events",getMoveEvent:"Fetching move event details",scheduleMoveEvent:"Scheduling move event",updateMoveEvent:"Updating move event",completeMoveEvent:"Completing move event",listOverdueInvoices:"Loading overdue invoices",getAgingReport:"Generating aging report",sendInvoice:"Sending invoice",recordPayment:"Recording payment",createCreditNote:"Creating credit note",listUnits:"Loading units",getUnit:"Fetching unit details",listUnitTypes:"Loading unit types",listPricingPlans:"Loading pricing plans",createUnit:"Creating unit",updateUnit:"Updating unit",deleteUnit:"Deleting unit",createUnitType:"Creating unit type",updateUnitType:"Updating unit type",copyUnitType:"Copying unit type",listIssues:"Loading issues",createIssue:"Creating issue",completeIssue:"Completing issue",listProjects:"Loading projects",createProject:"Creating project",listConversations:"Loading conversations",getConversation:"Fetching conversation",summariseConversation:"Summarising conversation",sendConversationMessage:"Sending message",listAccessSystems:"Loading access systems",listAccessPoints:"Loading access points",getAccessPointHealth:"Checking access point health",remoteOpenDoor:"Opening door remotely",listAccessGrants:"Loading access grants",createAccessGrant:"Creating access grant",listInsuranceContracts:"Loading insurance contracts",sendInsuranceContract:"Sending insurance contract",listProtectionProducts:"Loading protection products",getTrialBalance:"Loading trial balance",getRevenueSummary:"Loading revenue summary",getJournalEntries:"Lo
1ading journal entries",getVatSummary:"Loading VAT summary",getReconciliation:"Running reconciliation",getAccountingConnectionStatus:"Checking accounting connections",getExternalBalances:"Fetching external balances",getExternalProfitAndLoss:"Fetching external P&L",compareInternalVsExternal:"Comparing internal vs external",listListings:"Loading listings",getListing:"Fetching listing details",createListing:"Creating listing",updateListing:"Updating listing",getListingPerformance:"Loading listing performance"},V=new Set(["offerChoices"]);function W(e){return!e||["result","output-available","complete","error","output-error"].includes(e)}function G(e){return"error"===e||"output-error"===e}function K({toolName:e,state:t,children:r}){let a=H[e]??e,s=W(t),n=G(t);return(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[s?(0,g.jsx)("div",{className:q("w-4.5 h-4.5 rounded-full flex items-center justify-center flex-shrink-0",n?"bg-red-50":"bg-[var(--hive-color-surface,var(--bd-surface-2,#f3f4f6))]"),children:n?(0,g.jsx)(o,{className:"w-3 h-3 text-[var(--hive-color-danger,#dc2626)]"}):(0,g.jsx)(d,{className:"w-3 h-3 text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]"})}):(0,g.jsx)(m,{className:"w-4 h-4 text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] animate-spin flex-shrink-0"}),(0,g.jsx)("span",{className:"text-xs font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#4b5563))]",children:a}),(0,g.jsx)("span",{className:"text-[10px] text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] ml-auto",children:s?n?"Failed":"Done":"Workingâ¦"})]}),s&&r&&(0,g.jsx)("div",{className:"pl-6 mt-1",children:r})]})}function Z({choices:e,onSelect:t,disabled:r}){let[s,n]=a.useState(null),i=r||null!==s;return(0,g.jsx)("div",{className:"flex flex-wrap gap-1.5 max-w-[90%]",children:e.map(e=>(0,g.jsx)("button",{disabled:i,onClick:()=>{n(e.value),t?.(e.value)},className:q("text-sm px-3.5 py-1.5 rounded-full border transition-all duration-200",s===e.value?"bg-[var(--hive-color-primary,#111827)] text-white border-[var(--hive-color-primary,#111827)]":i?"bg-[var(--hive-color-chip-bg,var(--bd-surface,#ffffff))] text-[var(--hive-color-text-secondary,var(--bd-text-3,#d1d5db))] border-[var(--hive-color-border,var(--bd-border,#f3f4f6))] cursor-default opacity-50":"bg-[var(--hive-color-chip-bg,var(--bd-surface,#ffffff))] text-[var(--hive-color-chip-text,var(--bd-text,#374151))] border-[var(--hive-color-chip-border,var(--bd-border,#e5e7eb))] hover:border-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] cursor-pointer"),children:e.label},e.value))})}function Y({url:e,sessionRef:t,onVerified:r,pollingUrl:s="/api/agent/verification-status"}){let[n,i]=a.useState("pending"),l=a.useRef(r);l.current=r;let o=a.useMemo(()=>{if(!t)return s;let e=s.includes("?")?"&":"?";return`${s}${e}sessionRef=${encodeURIComponent(t)}`},[s,t]);return(a.useEffect(()=>{if(!e||"pending"!==n)return;let t=!0,r=0,a=async()=>{if(t&&!(r>=30)){r++;try{let e=await fetch(o);if(!e.ok)return;let r=await e.json();if(!t)return;if("approved"===r.status||"verified"===r.status){i("approved"),l.current?.();return}if("declined"===r.status)return void i("declined")}catch{}!t||r>=30||setTimeout(a,r<=6?5e3:15e3)}},s=setTimeout(a,3e3);return()=>{t=!1,clearTimeout(s)}},[e,n,o]),e)?"approved"===n?(0,g.jsx)("div",{className:"max-w-[90%] rounded-2xl border border-green-200 bg-white overflow-hidden shadow-sm",children:(0,g.jsxs)("div",{className:"px-4 py-4 flex items-center gap-3.5",children:[(0,g.jsx)("div",{className:"w-10 h-10 rounded-xl bg-green-50 flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(d,{className:"w-5 h-5 text-green-600"})}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Identity verified"}),(0,g.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Verification complete â you're all set"})]})]})}):(0,g.jsxs)("div",{className:"max-w-[90%] rounded-2xl border border-gray-200 bg-white overflow-hidden shadow-sm",children:[(0,g.jsx)("div",{className:"px-4 pt-4 pb-3.5",children:(0,g.jsxs)("div",{className:"flex items-start gap-3.5",children:[(0,g.jsx)("div",{className:"w-10 h-10 rounded-xl bg-indigo-50 flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(x,{className:"w-5 h-5 text-indigo-600"})}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Identity verification required"}),(0,g.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 leading-relaxed",children:"Qu
1ick and secure via Didit. This is a one-time process."})]})]})}),(0,g.jsx)("div",{className:"px-4 pb-4",children:(0,g.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full py-2.5 bg-indigo-600 hover:bg-indigo-700 text-white text-sm font-semibold rounded-xl transition-colors",children:[(0,g.jsx)(p,{className:"w-4 h-4"}),"Verify identity",(0,g.jsx)(c,{className:"w-3.5 h-3.5 opacity-60"})]})})]}):null}var Q=[{code:"+44",flag:"ð¬ð§",name:"UK"},{code:"+1",flag:"ðºð¸",name:"US"},{code:"+353",flag:"ð®ðª",name:"IE"},{code:"+49",flag:"ð©ðª",name:"DE"},{code:"+33",flag:"ð«ð·",name:"FR"},{code:"+61",flag:"ð¦ðº",name:"AU"},{code:"+91",flag:"ð®ð³",name:"IN"}];function J({content:e}){let t=function(e){let t=e.split("\n"),r=e=>t[e]??"",a=[],s=0;for(;s<t.length;){let e=r(s);if(/^(-{3,}|\*{3,}|_{3,})\s*$/.test(e)){a.push({type:"hr"}),s++;continue}if(e.trimStart().startsWith("|")&&s+1<t.length&&/^\|[\s:-]+\|/.test(r(s+1).trim())){let n=X(e);s+=2;let i=[];for(;s<t.length&&r(s).trimStart().startsWith("|");)i.push(X(r(s))),s++;a.push({type:"table",headers:n,rows:i});continue}if(/^\s*[-*+]\s/.test(e)){let e=[];for(;s<t.length&&/^\s*[-*+]\s/.test(r(s));)e.push(r(s).replace(/^\s*[-*+]\s/,"")),s++;a.push({type:"list",ordered:!1,items:e});continue}if(/^\s*\d+[.)]\s/.test(e)){let e=[];for(;s<t.length&&/^\s*\d+[.)]\s/.test(r(s));)e.push(r(s).replace(/^\s*\d+[.)]\s/,"")),s++;a.push({type:"list",ordered:!0,items:e});continue}if(!e.trim()){s++;continue}let n=e;for(s++;s<t.length&&r(s).trim()&&!r(s).trimStart().startsWith("|")&&!/^\s*[-*+]\s/.test(r(s))&&!/^\s*\d+[.)]\s/.test(r(s))&&!/^(-{3,}|\*{3,}|_{3,})\s*$/.test(r(s));)n+="\n"+r(s),s++;a.push({type:"paragraph",text:n})}return a}(e);return(0,g.jsx)(g.Fragment,{children:t.map((e,t)=>(function(e,t){switch(e.type){case"hr":return(0,g.jsx)("hr",{className:"my-2 border-[var(--hive-color-border,var(--bd-border,#e5e7eb))]"},t);case"table":return(0,g.jsx)("div",{className:"my-2 overflow-x-auto",children:(0,g.jsxs)("table",{className:"w-full text-xs border-collapse",children:[(0,g.jsx)("thead",{children:(0,g.jsx)("tr",{children:e.headers.map((e,t)=>(0,g.jsx)("th",{className:"text-left font-semibold text-[var(--hive-color-text,var(--bd-text,#374151))] px-2 py-1.5 border-b border-[var(--hive-color-border,var(--bd-border,#e5e7eb))]",children:(0,g.jsx)(ee,{text:e})},t))})}),(0,g.jsx)("tbody",{children:e.rows.map((e,t)=>(0,g.jsx)("tr",{className:"border-b border-[var(--hive-color-border,var(--bd-border,#f3f4f6))] last:border-0",children:e.map((e,t)=>(0,g.jsx)("td",{className:"px-2 py-1.5 text-[var(--hive-color-text-secondary,var(--bd-text-2,#4b5563))]",children:(0,g.jsx)(ee,{text:e})},t))},t))})]})},t);case"list":{let r=e.ordered?"ol":"ul";return(0,g.jsx)(r,{className:`my-1.5 space-y-0.5 ${e.ordered?"list-decimal":"list-disc"} pl-4`,children:e.items.map((e,t)=>(0,g.jsx)("li",{className:"text-sm text-[var(--hive-color-text,var(--bd-text,#374151))] leading-relaxed",children:(0,g.jsx)(ee,{text:e})},t))},t)}case"paragraph":return(0,g.jsx)("p",{className:"leading-relaxed",children:(0,g.jsx)(ee,{text:e.text})},t)}})(e,t))})}function X(e){return e.replace(/^\|/,"").replace(/\|$/,"").split("|").map(e=>e.trim())}function ee({text:e}){let t=function(e){let t,r=[],a=/(\*\*(.+?)\*\*|\*(.+?)\*|`([^`]+)`)/g,s=0,n=0;for(;null!==(t=a.exec(e));)t.index>s&&r.push(et(e.slice(s,t.index),n++)),t[2]?r.push((0,g.jsx)("strong",{className:"font-semibold",children:t[2]},n++)):t[3]?r.push((0,g.jsx)("em",{children:t[3]},n++)):t[4]&&r.push((0,g.jsx)("code",{className:"text-[0.85em] bg-[var(--hive-color-code-bg,var(--bd-surface-2,#f3f4f6))] text-[var(--hive-color-code-text,var(--bd-text,#374151))] px-1 py-0.5 rounded",children:t[4]},n++)),s=t.index+t[0].length;return s<e.length&&r.push(et(e.slice(s),n++)),r}(e);return(0,g.jsx)(g.Fragment,{children:t})}function et(e,t){let r=e.split("\n");return 1===r.length?(0,g.jsx)(a.Fragment,{children:e},t):(0,g.jsx)(a.Fragment,{children:r.map((e,t)=>(0,g.jsxs)(a.Fragment,{children:[e,t<r.length-1&&(0,g.jsx)("br",{})]},t))},t)}var er={concierge:"Concierge",search:"Search",booking:"Rental",rental:"Rental",negotiation:"Negotiation",support:"Support",sales:"Sales",analytics:"Analytics",crm:"CRM",companies:"Companies",tenants:"Tenants",collections:"Collections",units:"Units",tasks:"Tasks",conversations:"Conversations",access:"Access Control",insurance:"Insurance",accounting:"Accounting"};function ea({routing:e}){let[t,r]=a.useState(!1),s=er[e.agent]??e.agent;return(0,g.jsxs)("div",{className:"mb-2",children:[(0,g.jsxs)("button",{onClick:()=>r(e=>!e),className:"flex items-center gap-1.5 text-xs text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] hover:text-[var(--hive-color-text,var(--bd-text-2,#4b5563))] transition-colors group",children:[t?(0,g.jsx)(v,{className:"w-3 h-3"}):(0,g.jsx)(f,{className:"w-3 h-3"}),(0,g.jsx)(y,{className:"w-3 h-3"}),(0,g.jsxs)("span",{children:["Routed to ",(0,g.jsx)("span",{className:"font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:s})]}),"number"==typeof e.confidence&&!Number.isNaN(e.confidence)&&(0,g.jsxs)("span",{className:"text-[var(--hive-color-text-secondary,var(--bd-text-3,#d1d5db))]",children:["(",(100*e.confidence).toFixed(0),"%)"]})]}),t&&(0,g.jsxs)("div",{className:"mt-1.5 ml-5 px-3 py-2.5 bg-[var(--hive-color-surface-elevated,var(--bd-surface-2,#f9fafb))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] rounded-lg text-xs text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))] space-y-1.5",children:[(0,g.jsxs)("p",{className:"italic",children:["â",e.reasoning,"â"]}),(0,g.jsxs)("div",{className:"flex items-center gap-3 text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))]",children:[(0,g.jsxs)("span",{children:["Model: ",(0,g.jsx)("span",{className:"font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:e.modelTier})]}),(0,g.jsxs)("span",{children:["Agent: ",(0,g.jsx)("span",{className:"font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:s})]})]})]})]})}function es({data:e}){let t=e?.rentals??e?.bookings??[];return 0===t.length?(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5 bg-gray-50 rounded-lg text-xs text-gray-500",children:[(0,g.jsx)(C,{className:"w-3.5 h-3.5"}),"No rentals found"]}
1):(0,g.jsxs)("div",{className:"space-y-2",children:[t.slice(0,5).map((e,t)=>{let r=e.listing,a=String(e.status??"unknown");return(0,g.jsxs)("div",{className:"border border-gray-200 rounded-lg px-3 py-2.5",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,g.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:String(r?.facilityName??e.rentalReference??e.bookingReference??`Rental ${t+1}`)}),(0,g.jsx)("span",{className:q("text-[10px] font-medium px-1.5 py-0.5 rounded","confirmed"===a?"bg-green-50 text-green-700":"pending"===a?"bg-amber-50 text-amber-700":"cancelled"===a?"bg-red-50 text-red-700":"bg-gray-50 text-gray-600"),children:a})]}),(0,g.jsxs)("div",{className:"flex items-center gap-3 mt-1 text-xs text-gray-500",children:[null!=e.agreedPricePence&&(0,g.jsxs)("span",{className:"font-medium text-gray-700",children:["£",(Number(e.agreedPricePence)/100).toFixed(0),"/",String(e.billingFrequency??"mo")]}),"string"==typeof e.moveInDate&&(0,g.jsxs)("span",{className:"flex items-center gap-1",children:[(0,g.jsx)(b,{className:"w-3 h-3"}),new Date(e.moveInDate).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})]})]})]},String(e.id??t))}),t.length>5&&(0,g.jsxs)("p",{className:"text-xs text-gray-400 text-center",children:["+ ",t.length-5," more rentals"]})]})}function en({data:e}){let t=e?.nextPayment,r=e?.methods??[];return(0,g.jsxs)("div",{className:"space-y-2",children:[t&&(0,g.jsxs)("div",{className:"border border-gray-200 rounded-lg px-3 py-2.5",children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400 mb-1",children:"Next payment"}),(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsxs)("span",{className:"text-lg font-bold text-gray-900",children:["£",(Number(t.amount??0)/100).toFixed(2)]}),"string"==typeof t.date&&(0,g.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,g.jsx)(b,{className:"w-3 h-3"}),new Date(t.date).toLocaleDateString("en-GB",{day:"numeric",month:"short"})]})]})]}),r.length>0&&(0,g.jsxs)("div",{className:"border border-gray-200 rounded-lg px-3 py-2.5",children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400 mb-1.5",children:"Payment methods"}),(0,g.jsx)("div",{className:"space-y-1.5",children:r.map((e,t)=>(0,g.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-700",children:[(0,g.jsx)(N,{className:"w-3.5 h-3.5 text-gray-400"}),(0,g.jsx)("span",{className:"font-medium",children:String(e.brand??"Card").toUpperCase()}),(0,g.jsxs)("span",{className:"text-gray-500",children:["····",String(e.last4??"****")]}),!!e.isDefault&&(0,g.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 bg-gray-100 rounded text-gray-500",children:"Default"})]},String(e.id??t)))})]}),!t&&0===r.length&&(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5 bg-gray-50 rounded-lg text-xs text-gray-500",children:[(0,g.jsx)(N,{className:"w-3.5 h-3.5"}),"No payment info available"]})]})}function ei({data:e}){let t=Number(e?.activeUnits??0),r=Number(e?.pendingTasks??0),a=String(e?.kycStatus??"unknown"),s=e?.nextPayment;return(0,g.jsx)("div",{className:"border border-gray-200 rounded-lg px-3 py-2.5",children:(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"Active units"}),(0,g.jsx)("p",{className:"text-lg font-bold text-gray-900",children:t})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"Pending tasks"}),(0,g.jsx)("p",{className:"text-lg font-bold text-gray-900",children:r})]}),s&&(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"Next payment"}),(0,g.jsxs)("p",{className:"text-sm font-semibold text-gray-900",children:["£",(Number(s.amount??0)/100).toFixed(0)]})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"Verification"}),(0,g.jsx)("span",{className:q("text-xs font-medium px-1.5 py-0.5 rounded","approved"===a?"bg-green-50 text-green-700":"bg-amber-50 text-amber-700"),children:a})]})]})})}function el({data:e}){let t=e?.profile,r=e?.points,a=String(t?.tier??r?.tier??"Member"),s=Number(r?.balance??r?.points??t?.points??0);return(0,g.jsxs)("div",{className:"border border-gray-200 rounded-lg px-3 py-2.5",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,g.jsx)(w,{className:"w-4 h-4 text-amber-500"}),(0,g.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:a})]}),(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"Points"}),(0,g.jsx)("p",{className:"text-base font-bold text-gray-900",children:s.toLocaleStr
1ing()})]}),t?.totalReferrals!=null&&(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"Referrals"}),(0,g.jsxs)("p",{className:"text-base font-bold text-gray-900 flex items-center gap-1",children:[(0,g.jsx)(S,{className:"w-3 h-3 text-gray-400"}),String(t.totalReferrals)]})]})]})]})}function eo({data:e}){let t=e?.user;if(!t)return(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5 bg-gray-50 rounded-lg text-xs text-gray-500",children:[(0,g.jsx)(P,{className:"w-3.5 h-3.5"}),"Profile not available"]});let r=String(t.email??""),a=[t.firstName,t.lastName].filter(Boolean).join(" "),s=e?.needsEmailVerification===!1;return(0,g.jsx)("div",{className:"border border-gray-200 rounded-lg px-3 py-2.5",children:(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("div",{className:"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center",children:(0,g.jsx)(P,{className:"w-4 h-4 text-gray-500"})}),(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[a&&(0,g.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:a}),r&&(0,g.jsx)("p",{className:"text-xs text-gray-500 truncate",children:r})]}),s&&(0,g.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-green-50 text-green-700 flex-shrink-0",children:"Verified"})]})})}function ec({name:e,onClick:t}){return(0,g.jsxs)("button",{onClick:t,className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-[var(--hive-color-surface,var(--bd-surface-2,#f3f4f6))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] hover:border-[var(--hive-color-border-hover,var(--bd-border-strong,#d1d5db))] text-xs font-medium text-[var(--hive-color-text,var(--bd-text,#374151))] transition-colors",children:[(0,g.jsx)(k,{className:"w-3 h-3 text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] flex-shrink-0"}),(0,g.jsx)("span",{className:"truncate max-w-[140px]",children:e})]})}function ed({facility:e,currSym:t,onDetails:r,onSelectUnit:s}){let[n,i]=a.useState(!1),l=e.units??[],o=n?l:l.slice(0,3),c=l.length>3,d=e.priceFrom??e.price,x=e.totalReviews??e.reviewCount;return(0,g.jsxs)("div",{className:"border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] rounded-lg hover:border-[var(--hive-color-border-hover,var(--bd-border-strong,#d1d5db))] transition-all overflow-hidden",children:[(0,g.jsxs)("div",{className:"p-3",children:[(0,g.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-[var(--hive-color-text,var(--bd-text,#111827))] truncate",children:e.name}),e.address&&(0,g.jsxs)("div",{className:"flex items-center gap-1 mt-0.5",children:[(0,g.jsx)(k,{className:"w-3 h-3 text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] flex-shrink-0"}),(0,g.jsx)("span",{className:"text-xs text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))] truncate",children:e.address})]})]}),null!=d&&(0,g.jsxs)("div",{className:"text-right flex-shrink-0",children:[(0,g.jsxs)("p",{className:"text-sm font-bold text-[var(--hive-color-text,var(--bd-text,#111827))]",children:[t,d.toFixed(0)]}),(0,g.jsx)("p",{className:"text-[10px] text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))]",children:"/mo"})]})]}),(0,g.jsxs)("div",{className:"flex items-center justify-between mt-1.5",children:[null!=e.rating&&e.rating>0&&(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[(0,g.jsx)(L,{className:"w-3 h-3 text-amber-500 fill-amber-500"}),(0,g.jsx)("span",{className:"text-xs font-medium text-[var(--hive-color-text,var(--bd-text,#374151))]",children:e.rating.toFixed(1)}),null!=x&&(0,g.jsxs)("span",{className:"text-xs text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))]",children:["(",x,")"]})]}),(0,g.jsxs)("button",{onClick:()=>r?.(e.name),className:"flex items-center gap-0.5 text-xs font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))] hover:text-[var(--hive-color-text,var(--bd-text,#374151))] transition-colors",children:["Full details",(0,g.jsx)(f,{className:"w-3 h-3"})]})]})]}),l.length>0&&(0,g.jsxs)("div",{className:"border-t border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] px-3 py-2 bg-[var(--hive-color-surface,var(--bd-surface-2,#f9fafb))]",children:[(0,g.jsxs)("button",{onClick:()=>i(!n),className:"flex items-center gap-1 text-[11px] font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))] mb-1.5 hover:text-[var(--hive-color-text,var(--bd-text,#374151))] transition-colors",children:[l.length," unit size",1!==l.length?"s":""," available",c&&(n?(0,g.jsx)(j,{className:"w-3 h-3"}):(0,g.jsx)(v,{className:"w-3 h-3"}))]}),(0,g.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[o.map(r=>(0,g.jsxs)("button",{onClick:()=>
1s?.(e.name,r),className:"inline-flex items-center gap-1 px-2 py-1 rounded-full bg-[var(--hive-color-surface-user,var(--bd-surface,#ffffff))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] hover:border-[var(--hive-color-border-hover,var(--bd-border-strong,#d1d5db))] text-[11px] font-medium text-[var(--hive-color-text,var(--bd-text,#374151))] transition-colors",children:[(0,g.jsx)("span",{children:r.size}),(0,g.jsx)("span",{className:"text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))]",children:"·"}),(0,g.jsxs)("span",{className:"text-[var(--hive-color-text,var(--bd-text,#111827))]",children:[t,r.price.toFixed(0),"/mo"]})]},r.size)),c&&!n&&(0,g.jsxs)("button",{onClick:()=>i(!0),className:"inline-flex items-center px-2 py-1 rounded-full bg-[var(--hive-color-surface-user,var(--bd-surface,#ffffff))] border border-dashed border-[var(--hive-color-border,#d1d5db)] text-[11px] text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] hover:text-[var(--hive-color-text,var(--bd-text,#374151))] transition-colors",children:["+",l.length-3," more"]})]})]})]})}function ex({data:e,onSendMessage:t}){let[r,s]=a.useState(!1),n=(Array.isArray(e.facilities)?e.facilities:[]).flatMap(e=>{let t;return e&&"object"==typeof e&&!Array.isArray(e)?[(t=Array.isArray(e.units)?e.units.flatMap(e=>{let t=String(e.size??e.sizeDescription??"").trim(),r=Number(e.price??e.pricePerMonth);return t&&Number.isFinite(r)?[{size:t,sqft:Number(e.sqft??e.sizeSqft??0),price:r}]:[]}):[],{id:String(e.id??""),name:String(e.name??""),address:"string"==typeof e.address?e.address:e.address&&"object"==typeof e.address?[e.address.line1??e.address.street,e.address.city,e.address.postcode].filter(Boolean).join(", "):void 0,city:"object"==typeof e.address&&e.address?e.address.city:e.city,priceFrom:"number"==typeof e.priceFrom?e.priceFrom:void 0,price:"number"==typeof e.price?e.price:void 0,currency:e.currency??"GBP",rating:"number"==typeof e.rating?e.rating:void 0,totalReviews:"number"==typeof e.totalReviews?e.totalReviews:void 0,reviewCount:"number"==typeof e.reviewCount?e.reviewCount:void 0,features:e.features,units:t,unitCount:"number"==typeof e.unitCount?e.unitCount:t.length})]:[]}),i=e.city;if(0===n.length)return null;let l=Math.min(...n.map(e=>e.priceFrom??e.price??1/0)),o=O(n[0]?.currency??"GBP"),c=r?n:n.slice(0,3),d=n.length>3;return(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:[(0,g.jsx)(M,{className:"w-3 h-3"}),(0,g.jsxs)("span",{children:[(0,g.jsx)("span",{className:"font-medium text-[var(--hive-color-text,var(--bd-text,#374151))]",children:n.length})," ","facilit",1===n.length?"y":"ies",i?` in ${i}`:"",l<1/0&&(0,g.jsxs)(g.Fragment,{children:[" from ",(0,g.jsxs)("span",{className:"font-medium text-[var(--hive-color-text,var(--bd-text,#374151))]",children:[o,l.toFixed(0),"/mo"]})]})]})]}),(0,g.jsx)("div",{className:"flex flex-wrap gap-1.5",children:n.slice(0,5).map(e=>(0,g.jsx)(ec,{name:e.name,onClick:()=>t?.(`Tell me more about ${e.name}`)},e.id))}),(0,g.jsx)("div",{className:"space-y-2",children:c.map(e=>(0,g.jsx)(ed,{facility:e,currSym:o,onDetails:e=>t?.(`Tell me more about ${e}`),onSelectUnit:(e,r)=>t?.(`I'd like the ${r.size} unit at ${e}`)},e.id))}),d&&!r&&(0,g.jsxs)("button",{onClick:()=>s(!0),className:"flex items-center gap-1 w-full justify-center py-2 text-xs font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))] hover:text-[var(--hive-color-text,var(--bd-text,#374151))] hover:bg-[var(--hive-color-surface,var(--bd-surface-2,#f9fafb))] rounded-lg transition-colors",children:[(0,g.jsx)(v,{className:"w-3.5 h-3.5"}),"Show ",n.length-3," more"]})]})}function em({data:e}){let t=e.facility??e;if(!t||!t.name)return null;let r=String(t.name),a="string"==typeof t.address?t.address:t.address&&"object"==typeof t.address?[t.address.line1??t.address.street,t.address.city,t.address.postcode].filter(Boolean).join(", "):void 0,s="number"==typeof t.priceFrom?t.priceFrom:"number"==typeof t.price?t.price:"number"==typeof t.base_price?t.base_price/100:null,n=O(t.currency??"GBP"),i="number"==typeof t.rating?t.rating:null,l="number"==typeof t.totalReviews?t.totalReviews:"number"==typeof t.reviewCount?t.reviewCount:null,o=t.features??[];return(0,g.jsx)("div",{className:"border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] rounded-lg overflow-hidden",children:(0,g.jsxs)("div",{className:"p-3",children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-[var(--hive-color-text,var(--bd-text,#111827))]",children:r}),a&&(0,g.jsxs)("div",{className:"flex items-center gap-1 mt-0.5",children:[(0,g.jsx)(k,{className:"w-3 h-3 text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] flex-shrink-0"}),(0,g.jsx)("span",{className:"text-xs text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:String(a)})]}),(0,g.jsxs)("div",{className:"flex items-center gap-3 mt-1.5",children:[null!=s&&(0,g.jsxs)("span",{className:"text-sm font-bold text-[var(--hive-color-text,var(--bd-text,#111827))]",children:[n,s.toFixed(0),(0,g.jsx)("span",{className:"text-xs font-normal text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:"/mo"})]}),null!=i&&i>0&&(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[(0,g.jsx)(L,{className:"w-3 h-3 text-amber-500 fill-amber-500"}),(0,g.jsx)("span",{className:"text-xs font-medium text-[var(--hive-color-text,var(--bd-text,#374151))]",children:i.toFixed(1)}),null!=l&&(0,g.jsxs)("span",{className:"text-xs text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))]",children:["(",l,")"]})]})]}),o.length>0&&(0,g.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:o.slice(0,6).map(e=>(0,g.jsx)("span",{className:"px-2 py-0.5 rounded-full bg-[var(--hive-color-surface,var(--bd-surface-2,#f3f4f6))] text-[10px] font-medium text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))]",children:e},e))})]})})}function eh({suggestedMoveIn:e,suggestedMoveOut:t,onConfirm:r}){let s,n,i=new Date,l=i.toISOString().split("T")[0],o=new Date(i);o.setDate(o.getDate()+1);let c=o.toISOString().split("T")[0],d=new Date(i);d.setDate(d.getDate()+7);let x=d.toISOString().split("T")[0],m=(n=(s=new Date(i)).getDay(),s.setDate(s.getDate()+((6-n+7)%7||7)),s.toISOString().split("T")[0]),[h,u]=a.useState(e||l),[p,f]=a.useState(t||null),[y,j]=a.useState(t?"custom"
1:"flexible"),[N,w]=a.useState(new Date(e||l)),[k,C]=a.useState("moveIn"),[M,S]=a.useState(!1),L=[{label:"Today",value:l},{label:"Tomorrow",value:c},{label:"This wknd",value:m},{label:"Next week",value:x}],P=a.useCallback((e,t)=>{if("flexible"===e)return null;let r=new Date(t);if("1month"===e)r.setMonth(r.getMonth()+1);else if("3months"===e)r.setMonth(r.getMonth()+3);else if("6months"===e)r.setMonth(r.getMonth()+6);else{if("12months"!==e)return p;r.setMonth(r.getMonth()+12)}return r.toISOString().split("T")[0]},[p]),F=a.useCallback(e=>{j(e),"custom"===e?C("moveOut"):f(P(e,h))},[h,P]),T=N.getFullYear(),R=N.getMonth(),A=N.toLocaleDateString("en-US",{month:"long",year:"numeric"}),D=new Date(T,R,1).getDay(),$=new Date(T,R+1,0).getDate(),U=e=>new Date(e+"T12:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"}),E="var(--hive-color-accent,var(--bd-accent,#4f46e5))",I="var(--hive-color-surface,var(--bd-surface,#ffffff))",_="var(--hive-color-border,var(--bd-border,#e5e7eb))",z="var(--hive-color-text,var(--bd-text,#111827))",B="var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))",q="var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))";return M?(0,g.jsx)("div",{className:"max-w-[90%] rounded-2xl overflow-hidden mb-2",style:{border:`1px solid ${_}`,background:I},children:(0,g.jsxs)("div",{className:"px-4 py-2.5 flex items-center justify-between",children:[(0,g.jsxs)("div",{className:"flex items-center gap-3",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(b,{className:"w-3.5 h-3.5",style:{color:E}}),(0,g.jsxs)("div",{children:[(0,g.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide",style:{color:q},children:"Move-in"}),(0,g.jsx)("p",{className:"text-sm font-semibold -mt-0.5",style:{color:z},children:U(h)})]})]}),(0,g.jsx)("div",{className:"w-px h-6",style:{background:_}}),(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(b,{className:"w-3.5 h-3.5",style:{color:E}}),(0,g.jsxs)("div",{children:[(0,g.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide",style:{color:q},children:"Move-out"}),(0,g.jsx)("p",{className:"text-sm font-semibold -mt-0.5",style:{color:z},children:p?U(p):"Flexible"})]})]})]}),(0,g.jsx)("button",{onClick:()=>{S(!1),C("moveIn")},className:"text-[11px] font-medium transition-colors ml-3 shrink-0",style:{color:E},children:"Edit"})]})}):(0,g.jsxs)("div",{className:"max-w-[90%] rounded-2xl overflow-hidden",style:{border:`1px solid ${_}`,background:I},children:[(0,g.jsx)("div",{className:"px-4 py-3",style:{borderBottom:`1px solid ${_}`},children:(0,g.jsx)("h4",{className:"text-sm font-semibold",style:{color:z},children:"When do you need storage?"})}),(0,g.jsxs)("div",{className:"px-4 py-3 space-y-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,g.jsxs)("span",{className:"text-xs font-medium",style:{color:"moveIn"===k?E:B},children:["Move in"," ",h&&(0,g.jsx)("span",{className:"font-normal ml-1",style:{color:q},children:U(h)})]}),(0,g.jsx)("button",{onClick:()=>C("moveIn"),className:"text-[10px] font-medium",style:{color:"moveIn"===k?E:q},children:"moveIn"===k?"selecting":"edit"})]}),(0,g.jsx)("div",{className:"flex flex-wrap gap-1.5",children:L.map(e=>(0,g.jsx)("button",{onClick:()=>{u(e.value),C("moveIn")},className:"px-3 py-1.5 rounded-lg text-xs font-medium transition-all",style:h===e.value?{background:E,color:"#fff",border:`1px solid ${E}`}:{background:I,color:B,border:`1px solid ${_}`},children:e.label},e.label))})]}),(0,g.jsxs)("div",{className:"rounded-xl p-2",style:{border:`1px solid ${_}`},children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-2 px-1",children:[(0,g.jsx)("button",{onClick:()=>w(new Date(T,R-1)),className:"p-1 rounded",children:(0,g.jsx)(v,{className:"w-3.5 h-3.5 rotate-90",style:{color:q}})}),(0,g.jsx)("span",{className:"text-xs font-semibold",style:{color:z},children:A}),(0,g.jsx)("button",{onClick:()=>w(new Date(T,R+1)),className:"p-1 rounded",children:(0,g.jsx)(v,{className:"w-3.5 h-3.5 -rotate-90",style:{color:q}})})]}),(0,g.jsxs)("div",{className:"grid grid-cols-7 gap-0 text-center",children:[["Mo","Tu","We","Th","Fr","Sa","Su"].map(e=>(0,g.jsx)("div",{className:"text-[10px] font-medium py-0.5",style:{color:q},children:e},e)),Array.from({length:(D+6)%7}).map((e,t)=>(0,g.jsx)("div",{},`empty-${t}`)),Array.from({length:$}).map((e,t)=>{let r=t+1,a=`${T}-${String(R+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`,s=a<l,n=a===h||a===p,i=h&&p&&a>h&&a<p;return(0,g.jsx)("button",{disabled:s,onClick:()=>{let e;!((e=`${T}-${String(R+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`)<l)&&("moveIn"===k?(u(e),p&&e>p&&f(null)):e>=h&&(f(e),j("custom")))},className:"w-7 h-7 mx-auto text-[11px] rounded-full transition-all",style:s?{color:"#d1d5db",curs
1or:"not-allowed"}:n?{background:E,color:"#fff",fontWeight:600}:i?{background:`color-mix(in srgb, ${E} 10%, transparent)`,color:E}:{color:z},children:r},r)})]})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,g.jsxs)("span",{className:"text-xs font-medium",style:{color:"moveOut"===k?E:B},children:["Move out"," ",p&&(0,g.jsx)("span",{className:"font-normal ml-1",style:{color:q},children:U(p)})]})}),(0,g.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[{label:"Flexible",mode:"flexible"},{label:"1 month",mode:"1month"},{label:"3 months",mode:"3months"},{label:"6 months",mode:"6months"},{label:"12 months",mode:"12months"},{label:"Pick date",mode:"custom"}].map(e=>(0,g.jsx)("button",{onClick:()=>F(e.mode),className:"px-3 py-1.5 rounded-lg text-xs font-medium transition-all",style:y===e.mode?{background:E,color:"#fff",border:`1px solid ${E}`}:{background:I,color:B,border:`1px solid ${_}`},children:e.label},e.mode))})]}),(0,g.jsx)("button",{onClick:()=>{S(!0),r?.({moveIn:h,moveOut:p||null})},className:"w-full py-2.5 text-sm font-semibold rounded-xl transition-colors",style:{background:E,color:"#fff"},onMouseEnter:e=>e.currentTarget.style.background="var(--hive-color-accent-hover,var(--bd-accent-hover,#4338ca))",onMouseLeave:e=>e.currentTarget.style.background=E,children:"Confirm dates"})]})]})}function eu({message:e,onSendMessage:t,renderToolResult:r}){let a="user"===e.role,s=e.parts,n=s&&s.length>0&&s.some(e=>"text"===e.type||e.type?.startsWith("tool-")),i=!!e.content?.trim();return(0,g.jsxs)("div",{className:q("flex flex-col gap-1",a?"items-end":"items-start"),children:[!a&&e.metadata?.routing&&(0,g.jsx)(ea,{routing:e.metadata.routing}),n?(0,g.jsx)(g.Fragment,{children:s.map((s,n)=>{if("text"===s.type&&s.text)return(0,g.jsx)("div",{className:q("max-w-[85%] px-4 py-3 rounded-2xl text-sm leading-relaxed",a?"bg-[var(--hive-color-surface-user,var(--bd-surface-2,#f3f4f6))] text-[var(--hive-color-text-user,var(--bd-text,#111827))] rounded-br-md":"bg-[var(--hive-color-surface,var(--bd-surface-2,#f9fafb))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] text-[var(--hive-color-text,var(--bd-text,#111827))] rounded-bl-md shadow-[var(--hive-shadow,var(--bd-shadow-card,0_1px_3px_0_rgb(0_0_0/0.1)))]"),children:(0,g.jsx)(J,{content:s.text})},`${e.id}-text-${n}`);if(s.type?.startsWith("tool-")&&s.toolName){let a=W(s.state);if("offerChoices"===s.toolName&&a){let r=s.output,a=r?.choices,i=Array.isArray(a)?a.flatMap(e=>"string"==typeof e?[{label:e,value:e}]:e&&"object"==typeof e&&"string"==typeof e.label&&"string"==typeof e.value?[e]:[]):[];return i.length>0?(0,g.jsx)(Z,{choices:i,onSelect:e=>{let r=i.find(t=>t.value===e)?.label??e;t?.(r)}},`${e.id}-qr-${n}`):null}if("startIdentityVerification"===s.toolName&&a){let r=s.output;return r?.url?(0,g.jsx)(Y,{url:r.url,sessionRef:r.sessionRef,onVerified:()=>t?.("My identity is now verified, please continue with the rental")},`${e.id}-verify-${n}`):null}if(V.has(s.toolName))return null;let i=r?.(s.toolName,s.output,t)??function(e,t,r){let a=t??{};switch(e){case"searchFacilities":return(0,g.jsx)(ex,{data:a,onSendMessage:r});case"selectFacility":case"openPreview":return(0,g.jsx)(em,{data:a});case"getMyRentals":return(0,g.jsx)(es,{data:a});case"getMyPaymentMethods":case"getMyNextPayment":return(0,g.jsx)(en,{data:a});case"getDashboardSummary":return(0,g.jsx)(ei,{data:a});case"getMyProfile":return(0,g.jsx)(eo,{data:a});case"getMyLoyalty":return(0,g.jsx)(el,{data:a});case"collectDates":return(0,g.jsx)(eh,{suggestedMoveIn:a.suggestedMoveIn,suggestedMoveOut:a.suggestedMoveOut,onConfirm:r?e=>r(`Move-in: ${e.moveIn}${e.moveOut?`, Move-out: ${e.moveOut}`:", flexible move-out"}`):void 0});default:return null}}(s.toolName,s.output,t);return(0,g.jsx)("div",{className:"w-full max-w-[90%]",children:(0,g.jsx)(K,{toolName:s.toolName,state:s.state,children:i})},`${e.id}-tool-${n}`)}return null})}):i?(0,g.jsx)("div",{className:q("max-w-[85%] px-4 py-3 rounded-2xl text-sm leading-relaxed",a?"bg-[var(--hive-color-surface-user,var(--bd-surface-2,#f3f4f6))] text-[var(--hive-color-text-user,var(--bd-text,#111827))] rounded-br-md":"bg-[var(--hive-color-surface,var(--bd-surface-2,#f9fafb))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] text-[var(--hive-color-text,var(--bd-text,#111827))] rounded-bl-md shadow-[var(--hive-shadow,var(--bd-shadow-card,0_1px_3px_0_rgb(0_0_0/0.1)))]"),children:(0,g.jsx)(J,{content:e.content||""})}):!a&&e.metadata?.routing?(0,g.jsx)("div",{className:"max-w-[85%] px-4 py-3 bg-[var(--hive-color-surface,var(--bd-surface-2,#f9fafb))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] rounded-2xl rounded-bl-md shadow-[var(--hive-shadow,var(--bd-shadow-card,0_1px_3px_0_rgb(0_0_0/0.1)))]",children:(0,g.jsxs)("div",{className:"flex items-center gap-2 text-[var(--hive-color-text-secondary,var(--bd-text-3,#6b7280))]",children:[(0,g.jsx)(m,{className:"w-3.5 h-3.5 animate-spin"}),(0,g.jsx)("span",{className:"text-sm",children:"Thinking..."})]})}):null,e.timestamp&&(0,g.jsx)("span",{className:"text-[10px] text-[var(--hive-color-text-secondary,var(--bd-text-3,#6b7280))] px-2",children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}function ep(){return(0,g.jsx)("div",{className:"flex flex-col gap-1 items-start",children:(0,g.jsx)("div",{className:"max-w-[85%] px-4 py-3 bg-[var(--hive-color-surface,var(--bd-surface-2,#f9fafb))] border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] rounded-2xl rounded-bl-md shadow-[var(--hive-shadow,var(--bd-shadow-card,0_1px_3px_0_rgb(0_0_0/0.1)))]",children:(0,g.jsxs)("div",{className:"flex items-center gap-2 text-[var(--hive-color-text-secondary,var(--bd-text-3,#6b7280))]",children:[(0,g.jsx)(m,{className:"w-3.5 h-3.5 animate-spin"}),(0,g.jsx)("span",{className:"text-sm",children:"Thinking..."})]})})})}
1function eg({value:e,onChange:t,onSubmit:r,onKeyDown:s,isLoading:n,placeholder:i="Ask Cora...",inputRef:l,className:o,showBranding:c}){let d=a.useRef(null),x=a.useCallback(()=>{let e=d.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,140)}px`)},[]);return(0,g.jsxs)("div",{className:q("border-t border-[var(--hive-color-border,var(--bd-border,#f3f4f6))]",o),children:[(0,g.jsx)("form",{onSubmit:r,className:"bg-[var(--hive-color-composer,var(--bd-surface,#ffffff))] rounded-[inherit]",children:(0,g.jsxs)("div",{className:"flex items-end gap-2 px-4 py-3",children:[(0,g.jsx)("button",{type:"button",className:"p-1.5 text-[var(--hive-color-text-secondary,var(--bd-text-3,#d1d5db))] hover:text-[var(--hive-color-text,var(--bd-text-2,#6b7280))] transition-colors rounded-lg flex-shrink-0 mb-0.5",title:"Attach file",children:(0,g.jsx)(T,{className:"w-4 h-4"})}),(0,g.jsx)("textarea",{ref:e=>{d.current=e,"function"==typeof l?l(e):l&&"object"==typeof l&&(l.current=e)},value:e,onChange:e=>{t(e.target.value),x()},onKeyDown:s,placeholder:i,rows:1,className:"flex-1 text-sm text-[var(--hive-color-text,var(--bd-text,#111827))] placeholder:text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] bg-transparent border-0 focus:outline-none focus:ring-0 resize-none leading-relaxed",disabled:n}),(0,g.jsx)("button",{type:"submit",disabled:!e.trim()||n,className:q("w-7 h-7 rounded-full flex items-center justify-center transition-all flex-shrink-0 mb-0.5",e.trim()?"bg-[var(--hive-color-primary,var(--bd-action,#111827))] text-[var(--bd-action-fg,#ffffff)] hover:opacity-90":"bg-[var(--hive-color-surface,var(--bd-surface-2,#f3f4f6))] text-[var(--hive-color-text-secondary,var(--bd-text-3,#d1d5db))]"),children:(0,g.jsx)(F,{className:"w-3.5 h-3.5"})})]})}),c&&(0,g.jsxs)("div",{className:"flex items-center justify-center gap-1.5 pb-2.5 pt-0.5",children:[(0,g.jsx)(y,{className:"w-3 h-3 text-[var(--hive-color-primary,#6366f1)]"}),(0,g.jsxs)("span",{className:"text-[11px] text-[var(--hive-color-text-secondary,#9ca3af)]",children:["powered by ",(0,g.jsx)("span",{className:"font-semibold text-[var(--hive-color-text,#374151)]",children:"Bagdock"})]})]})]})}function ev({threads:e,onSelect:t,onNewChat:r}){let[s,n]=a.useState(!1),i=a.useRef(null);return a.useEffect(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&n(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,g.jsxs)("div",{className:"relative",ref:i,children:[(0,g.jsx)("button",{onClick:()=>n(!s),className:"p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-md transition-colors","aria-label":"Recent threads",children:(0,g.jsx)(R,{className:"w-3.5 h-3.5"})}),s&&(0,g.jsxs)("div",{className:"absolute left-0 top-full mt-1 w-64 bg-white rounded-lg shadow-xl border border-gray-200 z-50 py-1 animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,g.jsxs)("div",{className:"px-3 py-2 border-b border-gray-100 flex items-center justify-between",children:[(0,g.jsx)("span",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Recent"}),r&&(0,g.jsx)("button",{onClick:()=>{r(),n(!1)},className:"text-xs text-gray-500 hover:text-gray-700 font-medium",children:"+ New chat"})]}),(0,g.jsx)("div",{className:"max-h-48 overflow-y-auto",children:e.slice(0,8).map(e=>(0,g.jsxs)("button",{onClick:()=>{t?.(e.id),n(!1)},className:"w-full text-left px-3 py-2 hover:bg-gray-50 transition-colors",children:[(0,g.jsx)("div",{className:"text-sm text-gray-900 truncate",children:e.preview||"Untitled chat"}),(0,g.jsxs)("div",{className:"text-xs text-gray-400 mt-0.5",children:[e.agentRole," · ",e.messageCount," messages ·"," ",function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let r=Math.floor(t/60);if(r<24)return`${r}h ago`;let a=Math.floor(r/24);return a<7?`${a}d ago`:new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"short"})}(e.createdAt)]})]},e.id))})]})]})}var ef=[{id:"s1",type:"action",title:"Check my next payment",description:"See upcoming charges",icon:"CreditCard",dismissible:!1,priority:1,context:"dashboard"},{id:"s2",type:"action",title:"Find a bigger unit",description:"Browse available upgrades",icon:"Package",dismissible:!1,priority:2,context:"dashboard"},{id:"s3",type:"action",title:"Help me move out",description:"Step-by-step guide",icon:"HelpCircle",dismissible:!1,priority:3,context:"dashboard"}
1],ey={CreditCard:N,HelpCircle:E,Sparkles:y,Zap:I},eb=[{id:"1",type:"action",title:"Explain my bill",description:"Understand your latest charges",icon:"CreditCard",dismissible:!0,priority:1,context:"dashboard"},{id:"2",type:"action",title:"Unit suggestions",description:"Find a better fit",icon:"Zap",dismissible:!0,priority:2,context:"dashboard"},{id:"3",type:"action",title:"Help me move out",description:"Step-by-step guide",icon:"HelpCircle",dismissible:!0,priority:3,context:"dashboard"}];function ej({suggestions:e=eb,onSuggestionClick:t,onOpenChat:r,className:a}){return(0,g.jsxs)("div",{className:q("bg-white rounded-2xl border border-gray-100 shadow-sm p-4",a),children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("div",{className:"w-7 h-7 rounded-lg bg-gray-900 flex items-center justify-center",children:(0,g.jsx)(y,{className:"w-3.5 h-3.5 text-white"})}),(0,g.jsx)("span",{className:"font-medium text-gray-900 text-sm",children:"Cora"})]}),r&&(0,g.jsx)("button",{onClick:r,className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",children:"Open chat"})]}),(0,g.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",children:e.slice(0,3).map(e=>{let r=ey[e.icon]||y;return(0,g.jsxs)("button",{onClick:()=>t?.(e),className:"flex items-center gap-2 px-3 py-2 rounded-xl bg-gray-50 hover:bg-gray-100 text-sm text-gray-700 font-medium transition-colors whitespace-nowrap flex-shrink-0",children:[(0,g.jsx)(r,{className:"w-3.5 h-3.5 text-gray-400"}),e.title]},e.id)})})]})}var eN=[{id:"summary",label:"Confirm unit",icon:_},{id:"contact",label:"Your details",icon:N},{id:"identity",label:"Identity verification",icon:x},{id:"protection",label:"Protection",icon:p},{id:"payment",label:"Payment",icon:N}],ew=[{id:"summary",label:"Confirm unit",icon:_},{id:"contact",label:"Your details",icon:N}],ek={colorPrimary:"#111827",colorPrimaryHover:"#1f2937",colorBackground:"#ffffff",colorSurface:"#f9fafb",colorSurfaceUser:"#f3f4f6",colorSurfaceElevated:"#f9fafb",colorText:"#111827",colorTextUser:"#111827",colorTextSecondary:"#6b7280",colorBorder:"#e5e7eb",colorSuccess:"#059669",colorWarning:"#d97706",colorDanger:"#dc2626",colorChipBg:"#ffffff",colorChipBorder:"#e5e7eb",colorChipText:"#374151",colorCodeBg:"#f3f4f6",colorCodeText:"#374151",fontFamily:"inherit",fontFamilyMono:'"SF Mono", "Fira Code", "Fira Mono", monospace',borderRadius:"0.75rem",borderRadiusLg:"1rem",shadow:"0 1px 3px 0 rgb(0 0 0 / 0.1)",shadowLg:"0 10px 15px -3px rgb(0 0 0 / 0.1)"},eC={colorPrimary:"#6366f1",colorPrimaryHover:"#4f46e5",colorBackground:"#0a0a0f",colorSurface:"rgba(255, 255, 255, 0.04)",colorSurfaceUser:"#4f46e5",colorSurfaceElevated:"rgba(255, 255, 255, 0.06)",colorText:"#f8fafc",colorTextUser:"#ffffff",colorTextSecondary:"#9ca3af",colorBorder:"rgba(255, 255, 255, 0.08)",colorSuccess:"#059669",colorWarning:"#d97706",colorDanger:"#f87171",colorChipBg:"rgba(255, 255, 255, 0.04)",colorChipBorder:"rgba(255, 255, 255, 0.1)",colorChipText:"#e5e7eb",colorCodeBg:"rgba(255, 255, 255, 0.08)",colorCodeText:"#e5e7eb",fontFamily:"inherit",fontFamilyMono:'"SF Mono", "Fira Code", "Fira Mono", monospace',borderRadius:"0.75rem",borderRadiusLg:"1rem",shadow:"none",shadowLg:"none"},eM={colorPrimary:"--hive-color-primary",colorPrimaryHover:"--hive-color-primary-hover",colorBackground:"--hive-color-bg",colorSurface:"--hive-color-surface",colorSurfaceUser:"--hive-color-surface-user",colorSurfaceElevated:"--hive-color-surface-elevated",colorText:"--hive-color-text",colorTextUser:"--hive-color-text-user",colorTextSecondary:"--hive-color-text-secondary",colorBorder:"--hive-color-border",colorSuccess:"--hive-color-success",colorWarning:"--hive-color-warning",colorDanger:"--hive-color-danger",colorChipBg:"--hive-color-chip-bg",colorChipBorder:"--hive-color-chip-border",colorChipText:"--hive-color-chip-text",colorCodeBg:"--hive-color-code-bg",colorCodeText:"--hive-color-code-text",fontFamily:"--hive-font",fontFamilyMono:"--hive-font-mono",borderRadius:"--hive-radius",borderRadiusLg:"--hive-radius-lg",shadow:"--hive-shadow",shadowLg:"--hive-shadow-lg"},eS=a.createContext({});e.s(["AGENT_LABELS",0,er,"ChatMarkdown",0,J,"ChatMessage",0,eu,"Composer",0,eg,"HIDDEN_TOOL_STEPS",0,V,"HiveAssistantPanel",0,function({suggestions:e,isExpanded:t=!1,onExpand:r,onCollapse:a,onSuggestionClick:s,className:n}){return t?(0,g.jsxs)("div",{className:q("bg-white rounded-2xl border border-gray-100 shadow-sm",n
1),children:[(0,g.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-gray-100",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("div",{className:"w-7 h-7 rounded-lg bg-gray-900 flex items-center justify-center",children:(0,g.jsx)(y,{className:"w-3.5 h-3.5 text-white"})}),(0,g.jsx)("span",{className:"font-medium text-gray-900 text-sm",children:"Cora"})]}),(0,g.jsx)("button",{onClick:a,className:"p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",children:(0,g.jsx)(U,{className:"w-4 h-4"})})]}),(0,g.jsx)("div",{className:"p-4 space-y-2",children:(e??[]).map(e=>(0,g.jsxs)("button",{onClick:()=>s?.(e),className:"w-full flex items-center gap-3 p-3 text-left bg-gray-50 hover:bg-gray-100 rounded-xl transition-colors",children:[(0,g.jsx)(y,{className:"w-4 h-4 text-gray-400"}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("p",{className:"text-sm font-medium text-gray-900",children:e.title}),e.description&&(0,g.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.description})]})]},e.id))})]}):(0,g.jsx)(ej,{suggestions:e,onSuggestionClick:s,onOpenChat:r,className:n})},"HiveChatPanel",0,function({isOpen:e,onClose:t,onExpand:r,messages:s=[],onSendMessage:n,isLoading:i=!1,suggestions:l=ef,recentThreads:o=[],onLoadThread:c,onNewChat:d,className:x,renderToolResult:m,showBranding:h}){let[u,p]=a.useState(""),v=a.useRef(null),f=a.useRef(null);a.useEffect(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[s,i]),a.useEffect(()=>{e&&setTimeout(()=>f.current?.focus(),300)},[e]);let y=e=>{e.preventDefault(),!i&&u.trim()&&n&&(n(u.trim()),p(""),f.current&&(f.current.style.height="auto"))};return e?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",role:"button",tabIndex:0,"aria-label":"Close",onClick:()=>t?.(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t?.())}}),(0,g.jsxs)("div",{className:q("fixed z-50","inset-x-0 bottom-0 top-0 md:inset-auto","md:bottom-24 md:right-6 md:w-[420px] md:max-h-[620px] md:rounded-2xl","bg-white shadow-2xl","flex flex-col overflow-hidden","animate-in slide-in-from-bottom duration-300 md:slide-in-from-bottom-0 md:fade-in",x),children:[(0,g.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:s.length>0?"Cora":"New chat"}),o.length>0&&(0,g.jsx)(ev,{threads:o,onSelect:c,onNewChat:d})]}),(0,g.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,g.jsx)("button",{onClick:t,className:"p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-colors","aria-label":"Minimize",children:(0,g.jsx)(D,{className:"w-4 h-4"})}),r&&(0,g.jsx)("button",{onClick:r,className:"p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-colors hidden md:flex","aria-label":"Expand",children:(0,g.jsx)(A,{className:"w-3.5 h-3.5"})}),(0,g.jsx)("button",{onClick:t,className:"p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-colors","aria-label":"Close",children:(0,g.jsx)(U,{className:"w-4 h-4"})})]})]}),(0,g.jsx)("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 bg-gray-50/30",children:0===s.length?(0,g.jsxs)("div",{className:"flex flex-col items-center justify-center h-full py-8 px-6",children:[(0,g.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gray-100 flex items-center justify-center mb-5",children:(0,g.jsx)($,{className:"w-5 h-5 text-gray-400"})}),(0,g.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Welcome to Cora"}),(0,g.jsx)("p",{className:"text-sm text-gray-500 text-center mb-6",children:"Ask anything or tell Cora what you need"}),(0,g.jsx)("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:l.slice(0,3).map(e=>(0,g.jsx)("button",{disabled:i,onClick:()=>n?.(e.title),className:q("px-3.5 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-200 rounded-xl transition-colors",i?"opacity-50 cursor-not-allowed":"hover:border-gray-300 hover:bg-gray-50"),children:e.title},e.id))}),(0,g.jsxs)("div",{className:"flex flex-col items-center gap-1.5 text-[11px] text-gray-400",children:[(0,g.jsxs)("span",{children:[(0,g.jsx)("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"@"})," ","to mention any unit, payment, or document"]}),(0,g.jsxs)("span",{children:[(0,g.jsx)("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Tab"})," ","to add current view to context"]})]})]}):(0,g.jsxs)(g.Fragment,{children:[s.map((e,t)=>(0,g.jsx)(eu,{message:e,onSendMessage:n,renderToolResult:m},e.id||t)),i&&!function(e){if(0===e.length)return!1;let t=e[e.length-1];if(!t||"user"===t.role)return!1;let r=t.parts&&t.parts.length>0&&t.parts.some(e=>"text"===e.type||e.type?.startsWith("tool-")),a=!!t.content?.trim();return!r&&!a&&!!t.metadata?.routing}(s)&&(0,g.jsx)(ep,{}),(0,g.jsx)("div",{ref:v})]})}),(0,g.jsx)(eg,{value:u,onChange:p,onSubmit:y,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),y(e))},isLoading:i,inputRef:f,showBranding:h})]})]}):null},"HiveCheckoutFlow",0,function({facilityId:e,facilityName:t,unitTypeId:r,unitSize:s,monthlyPrice:n,currency:i="GBP",pinned:l,userEmail:o,userName:c,userPhone:h,availablePlans:u,selectedPlanId:v,onPlanChange:b,availableAddOns:N,selectedAddOnIds:w=[],onAddOnsChange:k,rentalType:C,identityVerified:M,protectionPlans:S,preSelectedProtectionPlanId:L,preSelectedHasOwnInsurance:P,initialStep:F,initialCompletedSteps:T,onInitCheckoutSession:R,onCreateIdentitySession:A,onCheckVerificationStatus:D,onCreatePaymentIntent:$,renderPaymentForm:E,onMinimize:I,onStepChange:_,onComplete:O,onCancel:H,onBackToChat:V,onSendMessage:W}
1){let G,K="reserve"===C,Z=K?ew:eN,[Y,Q]=a.useState(F??"summary"),[J,X]=a.useState(new Set(T??[])),[ee,et]=a.useState(!1),[er,ea]=a.useState(null),[es,en]=a.useState(null),[ei,el]=a.useState(c??""),[eo,ec]=a.useState(o??""),[ed,ex]=a.useState(h??"");a.useEffect(()=>{!ei&&c&&el(c),!eo&&o&&ec(o),!ed&&h&&ex(h)},[c,o,h]);let[em,eh]=a.useState(""),[eu,ep]=a.useState(""),[eg,ev]=a.useState(""),[ef,ey]=a.useState("idle"),[eb,ej]=a.useState(null),[ek,eC]=a.useState(null),eM=a.useRef(!1),[eS,eL]=a.useState(L??null),[eP,eF]=a.useState(P??!1),eT=S??(G="USD"===i?"$":"EUR"===i?"â¬":"£",[{id:"basic",name:"Basic",description:"Essential coverage",coverAmount:1e3,pricePerMonth:4.99,features:[`Up to ${G}1,000 coverage`,"Theft protection"]},{id:"standard",name:"Standard",description:"Recommended coverage",coverAmount:5e3,pricePerMonth:9.99,features:[`Up to ${G}5,000 coverage`,"Theft + water damage"],isRecommended:!0},{id:"premium",name:"Premium",description:"Full coverage",coverAmount:1e4,pricePerMonth:14.99,features:[`Up to ${G}10,000 coverage`,"All risks covered"]}]),[eR,eA]=a.useState(null),[eD,e$]=a.useState("idle"),[eU,eE]=a.useState(!1),[eI,e_]=a.useState(!1),ez="USD"===i?"$":"EUR"===i?"â¬":"£",eB=Z.findIndex(e=>e.id===Y),eq=u?.find(e=>e.id===v),eO=eq?.pricePerMonth??n,eH=(N??[]).filter(e=>w.includes(e.id)).reduce((e,t)=>e+t.pricePerMonth,0),eV=eP?0:eT.find(e=>e.id===eS)?.pricePerMonth??0,eW=eO+eH+eV,[eG,eK]=a.useState(null);a.useEffect(()=>{eG&&(_?.(eG.step,eG.completed),eK(null))},[eG,_]);let eZ=a.useCallback(e=>{X(t=>{let r=new Set([...t,e]),a=Z.findIndex(t=>t.id===e)+1,s=a<Z.length?Z[a].id:"complete";return Q(s),eK({step:s,completed:[...r]}),r})},[Z]),eY=a.useCallback(()=>{if(0===eB)return void V?.();let e=Z[eB-1].id;Q(e),eK({step:e,completed:[...J]})},[Z,eB,J,V]),eQ=a.useCallback(async()=>{if(!A)return;if(ey("creating"),en(null),D)try{let e=await D(ek??void 0);if("approved"===e.status||"verified"===e.status){ey("approved"),eZ("identity");return}}catch{}let e=await A({email:eo||o,name:ei||c});if(!e.success||!e.url){ey("error"),en(e.error??"Failed to start verification");return}ej(e.url),eC(e.sessionRef??null),ey("polling"),window.open(e.url,"_blank","noopener,noreferrer")},[A,D,ek,eo,o,ei,c,eZ]),eJ=a.useRef(!1);a.useEffect(()=>{"identity"===Y&&M&&!eJ.current&&(eJ.current=!0,ey("approved"),eZ("identity"))},[Y,M,eZ]),a.useEffect(()=>{let e;if("polling"!==ef||!D)return;eM.current=!0;let t=0,r=async()=>{if(eM.current&&!(t>=30)){t++;try{let e=await D(ek??void 0);if(!eM.current)return;if("approved"===e.status||"verified"===e.status){ey("approved"),eZ("identity");return}if("declined"===e.status){ey("declined"),en("Verification was declined. Please try again.");return}}catch{}eM.current&&t<30&&(e=setTimeout(r,t<=6?5e3:15e3))}};return e=setTimeout(r,3e3),()=>{eM.current=!1,clearTimeout(e)}},[ef,ek,D,eZ]),a.useEffect(()=>{"payment"===Y&&"idle"===eD&&$&&(e$("loading"),$({amountPence:Math.round(100*eW),currency:i,checkoutSessionId:er??void 0,customerEmail:eo||o,rentalType:K?"reserve":"rent"}).then(e=>{e.success&&e.clientSecret?(eA(e.clientSecret),e$("ready")):(e$("error"),en(e.error??"Failed to prepare payment"))}))},[Y,eD,eW,i,er,eo,o,K,$]);let eX=a.useCallback(async()=>{et(!0),en(null);try{if(R){let t=await R({facilityId:e,unitTypeId:r,amountPence:Math.round(100*eO),currency:i});if(!t.success)return void en(t.error??"Failed to create session");t.sessionId&&ea(t.sessionId)}eZ("summary")}catch(e){en(e instanceof Error?e.message:"Something went wrong")}finally{et(!1)}},[e,r,eO,i,R,eZ]),e0=ei.trim().length>0&&eo.includes("@")&&eo.includes("."),e1=K?e0&&eg.trim().length>0:e0&&eg.trim().length>0&&em.trim().length>0&&eu.trim().length>0,e2=a.useCallback(e=>{let t=w??[],r=t.includes(e)?t.filter(t=>t!==e):[...t,e];k?.(r)},[w,k]);if("complete"===Y){let e=C??"rent",r="approved"===ef||M,a=0===w.length;return(0,g.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm p-5 text-center",children:[(0,g.jsx)("div",{className:"w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mx-auto mb-3",children:(0,g.jsx)(d,{className:"w-6 h-6 text-green-600"})}),(0,g.jsx)("h3",{className:"text-lg font-bold text-gray-900 mb-1",children:"reserve"===e?"Reservation confirmed":"Rental confirmed"}),(0,g.jsx)("p",{className:"text-sm text-gray-500 mb-1",children:t}),(0,g.jsxs)("p",{className:"text-sm text-gray-500",children:[s," · ",ez,eW.toFixed(2),"/mo"]}),(0,g.jsx)("button",{onClick:()=>{W?.(`I've completed the checkout for ${s} at ${t}. Rental type: ${e}. Identity verified: ${r?"yes":"no"}. Add-ons: ${a?"none":"selected"}.`),O?.()},className:"mt-4 w-full py-2.5 bg-indigo-800 hover:bg-indigo-900 text-white text-sm font-semibold rounded-xl transition-colors",children:"Done"})]})}return(0,g.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden",children:[(0,g.jsxs)("div",{className:"px-4 py-3 border-b border-gray-200 flex items-center justify-between",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(y,{className:"w-4 h-4 text-indigo-600"}),(0,g.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Checkout"})]}),(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[I&&(0,g.jsx)("button",{onClick:I,className:"w-7 h-7 rounded-full hover:bg-gray-100 flex items-center justify-center transition-colors",title:"Minimize checkout",children:(0,g.jsx)(j,{className:"w-3.5 h-3.5 text-gray-500 rotate-180"})}),l&&V&&(0,g.jsx)("button",{onClick:V,className:"text-xs text-gray-500 hover:text-gray-700 px-2 py-1 rounded-md hover:bg-gray-100 transition-colors",children:"Go to chat"}),(0,g.jsx)("button",{onClick:()=>{W?.("I've cancelled the checkout."),H?.()},className:"w-7 h-7 rounded-full hover:bg-gray-100 flex items-center justify-center transition-colors",children:(0,g.jsx)(U,{className:"w-3.5 h-3.5 text-gray-500"})})]})]}),(0,g.jsxs)("div",{className:"px-4 py-2.5 bg-gray-50/80 border-b border-gray-200",children:[(0,g.jsx)("div",{className:"flex items-center gap-1",children:Z.map((e,t)=>(0,g.jsxs)(a.Fragment,{children:[(0,g.jsx)("div",{className:q("w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold transition-colors",J.has(e.id)?"bg-green-100 text-green-600":e.id===Y?"bg-indigo-100 text-indigo-600":"bg-gray-100 text-gray-400"),children:J.has(e.id)?(0,g.jsx)(d,{className:"w-3.5 h-3.5"}):t+1}),t<Z.length-1&&(0,g.jsx)("div",{className:q("flex-1 h-0.5 rounded-full",J.has(e.id)?"bg-green-200":"bg-gray-200")})]},e.id))}),(0,g.jsxs)("p",{className:"text-xs font-medium text-gray-500 mt-1.5",children:["Step ",eB+1," of ",Z.length,": ",Z[eB]?.label]})]}),(0,g.jsxs)("div",{className:"p-4",children:["summary"===Y&&(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("button",{onClick:eY,className:"flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700 transition-colors -mt-1 mb-1",children:[(0,g.jsx)(z,{className:"w-3 h-3"}),"Back to chat"]}),(0,g.jsxs)("div",{className:"bg-gray-50 rounded-xl p-3.5",children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:t}),(0,g.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:s}),(0,g.jsxs)("div",{className:"mt-2 flex items-baseline gap-1",children:[(0,g.jsxs)("span",{className:"text-lg font-bold text-gray-900",children:[ez,eO.toFixed(2)]}),(0,g.jsx)("span",{className:"text-xs text-gray-500",children:"/month"})]})]}),u&&u.length>0&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("span",{className:"text-xs font-medium text-gray-700",children:eq?.name??"Monthly"}),(0,g.jsxs)("span",{className:"text-xs text-gray-400",children:[ez,eO.toFixed(2),"/mo"]})]}),(0,g.jsx)("button",{onClick:()=>eE(!eU),className:"text-xs font-medium text-indigo-600 hover:text-indigo-700 transition-colors",children:eU?"Done":"Change"})]}),eU&&(0,g.jsx)("div",{className:"mt-2 space-y-1.5",children:u.map(e=>(0,g.jsxs)("button",{onClick:()=>{b?.(e.id),eE(!1)},className:q("w-full flex items-center justify-between p-2.5 rounded-lg border text-left transition-colors",e.id===v?"border-indigo-300 bg-indigo-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"),children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-xs font-semibold text-gray-900",children:e.name}),e.badge&&(0,g.jsx)("p",{className:"text-[10px] text-gray-500",children:e.badge})]}),(0,g.jsxs)("span",{className:"text-xs font-semibold text-gray-900",children:[ez,e.pricePerMonth,"/mo"]})]},e.id))})]}),w.length>0&&N&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("button",{onClick:()=>e_(!eI),className:"flex items-center justify-between w-full text-xs",children:[(0,g.jsxs)("span",{className:"font-medium text-gray-700",children:[w.length," add-on",w.length>
11?"s":""," ","selected"]}),(0,g.jsx)(j,{className:q("w-3.5 h-3.5 text-gray-400 transition-transform",eI?"":"rotate-180")})]}),eI&&(0,g.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:N.filter(e=>w.includes(e.id)).map(e=>(0,g.jsxs)("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg bg-gray-50 border border-gray-200 text-[11px] font-medium text-gray-700",children:[e.name,(0,g.jsx)("button",{onClick:()=>e2(e.id),className:"w-3.5 h-3.5 rounded-full hover:bg-gray-200 flex items-center justify-center",children:(0,g.jsx)(U,{className:"w-2.5 h-2.5"})})]},e.id))})]}),es&&(0,g.jsx)("p",{className:"text-xs text-red-600 bg-red-50 rounded-lg px-3 py-2",children:es}),(0,g.jsx)("button",{onClick:eX,disabled:ee,className:"w-full py-2.5 bg-indigo-800 hover:bg-indigo-900 disabled:bg-indigo-400 text-white text-sm font-semibold rounded-xl transition-colors flex items-center justify-center gap-2",children:ee?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(m,{className:"w-4 h-4 animate-spin"}),"Creating session..."]}):(0,g.jsxs)(g.Fragment,{children:["Confirm & continue",(0,g.jsx)(f,{className:"w-4 h-4"})]})})]}),"contact"===Y&&(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("button",{onClick:eY,className:"flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700 transition-colors -mt-1 mb-1",children:[(0,g.jsx)(z,{className:"w-3 h-3"}),"Back"]}),(0,g.jsx)("p",{className:"text-sm text-gray-600",children:K?"Your details to hold this unit.":"Your contact and billing details."}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)("input",{type:"text",placeholder:"Full name",value:ei,onChange:e=>el(e.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-gray-200 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:border-gray-300"}),(0,g.jsx)("input",{type:"email",placeholder:"Email address",value:eo,onChange:e=>ec(e.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-gray-200 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:border-gray-300"}),(0,g.jsx)("input",{type:"tel",placeholder:"Phone number",value:ed,onChange:e=>ex(e.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-gray-200 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:border-gray-300"}),!K&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("input",{type:"text",placeholder:"Address line 1",value:em,onChange:e=>eh(e.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-gray-200 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:border-gray-300"}),(0,g.jsx)("input",{type:"text",placeholder:"City",value:eu,onChange:e=>ep(e.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-gray-200 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:border-gray-300"})]}),(0,g.jsx)("input",{type:"text",placeholder:"Postcode",value:eg,onChange:e=>ev(e.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-gray-200 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:border-gray-300"})]}),(0,g.jsxs)("button",{onClick:()=>{K?(X(e=>{let t=new Set([...e,"contact"]);return eK({step:"complete",completed:[...t]}),t}),Q("complete")):eZ("contact")},disabled:!e1,className:"w-full py-2.5 bg-indigo-800 hover:bg-indigo-900 disabled:bg-gray-300 disabled:text-gray-500 text-white text-sm font-semibold rounded-xl transition-colors flex items-center justify-center gap-2",children:[K?"Reserve unit":"Continue",(0,g.jsx)(f,{className:"w-4 h-4"})]})]}),"identity"===Y&&(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("button",{onClick:eY,className:"flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700 transition-colors -mt-1 mb-1",children:[(0,g.jsx)(z,{className:"w-3 h-3"}),"Back"]}),"approved"===ef?(0,g.jsxs)("div",{className:"bg-green-50 rounded-xl p-3.5 flex items-center gap-3",children:[(0,g.jsx)("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(d,{className:"w-4 h-4 text-green-600"})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Identity verified"}),(0,g.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Verification complete"})]})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"bg-indigo-50 rounded-xl p-3.5 flex items-start gap-3",children:[(0,g.jsx)(x,{className:"w-5 h-5 text-indigo-600 flex-shrink-0 mt-0.5"}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Identity verification required"}),(0,g.jsx)("p",{className:"text-xs text-gray-600 mt-0.5",children:"We use Didit to securely verify your identity. This is a one-time process."})]})]}),"polling"===ef&&(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5 bg-amber-50 rounded-lg border border-amber-200",children:[(0,g.jsx)(m,{className:"w-4 h-4 animate-spin text-amber-600 flex-shrink-0"}),(0,g.jsx)("p",{className:"text-xs text-amber-700",children:"Waiting for verification... A new tab has opened."})]}),es&&(0,g.jsx)("p",{className:"text-xs text-red-600 bg-red-50 rounded-lg px-3 py-2",children:es}),(0,g.jsx)("button",{onClick:"polling"===ef&&eb?()=>window.open(eb,"_blank","noopener,noreferrer"):eQ,disabled:"creating"===ef,className:"w-full py-2.5 bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm font-semibold rounded-xl transition-colors flex items-center justify-center gap-2",children:"creating"===ef?
1(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(m,{className:"w-4 h-4 animate-spin"})," Starting verification..."]}):"polling"===ef?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(x,{className:"w-4 h-4"})," Re-open verification"]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(x,{className:"w-4 h-4"})," Verify identity"]})}),"polling"===ef&&(0,g.jsx)("button",{onClick:()=>eZ("identity"),className:"w-full py-2 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:"Skip for now"})]})]}),"protection"===Y&&(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("button",{onClick:eY,className:"flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700 transition-colors -mt-1 mb-1",children:[(0,g.jsx)(z,{className:"w-3 h-3"}),"Back"]}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,g.jsx)(p,{className:"w-4 h-4 text-gray-600"}),(0,g.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Storage protection"})]}),(0,g.jsx)("p",{className:"text-xs text-gray-500 mb-2",children:"Protection covers your stored goods against damage and loss."}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[eT.map(e=>(0,g.jsxs)("button",{disabled:eP,onClick:()=>eL(eS===e.id?null:e.id),className:q("w-full flex items-center justify-between p-3 rounded-lg border text-left transition-colors",eP?"border-gray-100 bg-gray-50 opacity-50 cursor-not-allowed":eS===e.id?"border-indigo-300 bg-indigo-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"),children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[eS===e.id&&(0,g.jsx)(d,{className:"w-3.5 h-3.5 text-indigo-600 flex-shrink-0"}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("p",{className:"text-sm font-medium text-gray-900",children:[e.name,e.isRecommended&&(0,g.jsx)("span",{className:"ml-1.5 text-[10px] font-semibold text-indigo-600 bg-indigo-100 px-1.5 py-0.5 rounded-full",children:"Recommended"})]}),(0,g.jsxs)("p",{className:"text-xs text-gray-500",children:["Up to ",ez,(e.coverAmount??0).toLocaleString()," coverage"]})]})]}),(0,g.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[ez,e.pricePerMonth??0,"/mo"]})]},e.id)),eS&&!eP&&(0,g.jsx)("button",{onClick:()=>eL(null),className:"text-xs text-gray-500 hover:text-gray-700 transition-colors",children:"No protection needed"})]}),(0,g.jsxs)("button",{onClick:()=>{eF(!eP),eP||eL(null)},className:q("w-full flex items-center gap-2 p-3 rounded-lg border text-left text-sm transition-colors",eP?"border-emerald-300 bg-emerald-50 text-emerald-800":"border-gray-200 hover:border-gray-300 text-gray-600 hover:bg-gray-50"),children:[(0,g.jsx)(p,{className:"w-4 h-4 flex-shrink-0"}),(0,g.jsx)("span",{className:"font-medium",children:"I have my own insurance"}),eP&&(0,g.jsx)(d,{className:"w-3.5 h-3.5 ml-auto text-emerald-600"})]})]}),N&&N.length>0&&(0,g.jsxs)("div",{className:"border-t border-gray-100 pt-3",children:[(0,g.jsxs)("button",{onClick:()=>e_(!eI),className:"flex items-center justify-between w-full",children:[(0,g.jsxs)("p",{className:"text-sm font-semibold text-gray-900",children:["Optional add-ons",w.length>0&&(0,g.jsxs)("span",{className:"ml-1.5 text-xs font-normal text-gray-500",children:["(",w.length," selected)"]})]}),(0,g.jsx)(j,{className:q("w-4 h-4 text-gray-400 transition-transform",eI?"":"rotate-180")})]}),eI&&(0,g.jsx)("div",{className:"space-y-1.5 mt-2",children:N.map(e=>{let t=w.includes(e.id);return(0,g.jsxs)("button",{onClick:()=>e2(e.id),className:q("w-full flex items-center justify-between p-3 rounded-lg border text-left transition-colors",t?"border-indigo-300 bg-indigo-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"),children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[t?(0,g.jsx)(d,{className:"w-3.5 h-3.5 text-indigo-600 flex-shrink-0"}):(0,g.jsx)(B,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-sm font-medium text-gray-900",children:e.name}),(0,g.jsx)("p",{className:"text-xs text-gray-500",children:e.description})]})]}),(0,g.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[ez,e.pricePerMonth??0,"/mo"]})]},e.id)})})]}),(0,g.jsxs)("button",{onClick:()=>eZ("protection"),className:"w-full py-2.5 bg-indigo-800 hover:bg-indigo-900 text-white text-sm font-semibold rounded-xl transition-colors flex items-center justify-center gap-2",children:["Continue",(0,g.jsx)(f,{className:"w-4 h-4"})]})]}),"payment"===Y&&(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("button",{onClick:eY,className:"flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700 transition-colors -mt-1 mb-1",children:[(0,g.jsx)(z,{className:"w-3 h-3"}),"Back"]}),(0,g.jsxs)("div",{className:"bg-gray-50 rounded-xl p-3.5 space-y-1.5",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsx)("span",{className:"text-xs text-gray-500",children:"Monthly rent"}),(0,g.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[ez,eO.toFixed(2)]})]}),eV>0&&(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsx)("span",{className:"text-xs text-gray-500",children:"Protection"}),(0,g.jsxs)("span",{className:"text-sm text-gray-700",children:[ez,eV.toFixed(2)]})]}),eH>0&&(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsx)("span",{className:"text-xs text-gray-500",children:"Add-ons"}),(0,g.jsxs)("span",{className:"text-sm text-gray-700",children:[ez,eH.toFixed(2)]})]}),(0,g.jsxs)("div",{className:"border-t border-gray-200 pt-1.5 flex items-center justify-between",children:[(0,g.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Total due today"}),(0,g.jsxs)("span",{className:"text-lg font-bold text-gray-900",children:[ez,eW.toFixed(2)]})]})]}),"loading"===eD&&(0,g.jsxs)("div",{className:"flex items-center justify-center gap-2 py-6",children:[(0,g.jsx)(m,{className:"w-4 h-4 animate-spin text-gray-400"}),(0,g.jsx)("span",{className:"text-xs text-gray-500",children:"Preparing payment..."})]}),"ready"===eD&&eR&&E&&E({clientSecret:eR,totalLabel:`${ez}${eW.toFixed(2)}`,onSuccess:()=>eZ("payment"),onError:e=>en(e)}),"error"===eD&&(0,g.jsx)("p",{className:"text-xs text-red-600 bg-red-50 rounded-lg px-3 py-2",children:es??"Payment setup failed. Please try again."}),es&&"error"!==eD&&(0,g.jsx)("p",{className:"text-xs text-red-600 bg-red-50 rounded-lg px-3 py-2",children:es})]})]})]})},"HiveProvider",0,function({children:e,...t}){let[r,s]=a.useState(!1);a.useEffect(()=>{if(t.appearance?.theme!=="auto"||"function"!=typeof window.matchMedia)return;let e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>s(e.matches);return r(),e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[t.appearance?.theme]);let n=a.useMemo(()=>{var e;let a;return t.appearance?(e=t.appearance,{variables:{...(a=e?.theme==="dark"||e?.theme==="auto"&&(r??!1))?eC:ek,...e?.variables},elements:{...e?.elements},isDark:a}):void 0},[t.appearance,r]),i=a.useMemo(()=>n?function(e){let t={};for(let[r,a]of Object.entries(eM)){let s=e[r];
1s&&(t[a]=s)}return t}(n.variables):void 0,[n]),l=a.useMemo(()=>({renderToolResult:t.renderToolResult,botName:t.botName,accentColor:t.accentColor,appearance:t.appearance,resolvedTheme:n}),[t.renderToolResult,t.botName,t.accentColor,t.appearance,n]);return(0,g.jsx)(eS.Provider,{value:l,children:i?(0,g.jsx)("div",{className:"hive-root",style:{...i,display:"contents"},children:e}):e})},"LoadingMessage",0,ep,"QuickReplyChips",0,Z,"ReasoningBlock",0,ea,"SecurePhoneInput",0,function({reason:e,onSubmit:t,defaultCountryCode:r="+44",countryCodes:s=Q}){let[n,i]=a.useState(r),[l,o]=a.useState(""),[c,x]=a.useState(!1),[p,v]=a.useState(!1),[f,y]=a.useState(null),b=async()=>{if(!l.trim()||p)return;let e=`${n}${l.replace(/\s/g,"")}`;v(!0),y(null);try{await t(e),x(!0)}catch(e){y(e instanceof Error?e.message:"Failed to submit phone number")}finally{v(!1)}};return c?(0,g.jsx)("div",{className:"max-w-[90%] rounded-2xl border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] bg-[var(--hive-color-surface,var(--bd-surface,#ffffff))] shadow-[var(--hive-shadow,var(--bd-shadow-card,0_1px_3px_0_rgb(0_0_0/0.1)))] overflow-hidden",children:(0,g.jsxs)("div",{className:"px-4 py-4 flex items-center gap-2.5",children:[(0,g.jsx)(d,{className:"w-4 h-4 text-[var(--hive-color-success,#16a34a)] flex-shrink-0"}),(0,g.jsx)("p",{className:"text-sm text-[var(--hive-color-text,var(--bd-text,#374151))]",children:"Phone number submitted"})]})}):(0,g.jsxs)("div",{className:"max-w-[90%] rounded-2xl border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] bg-[var(--hive-color-surface,var(--bd-surface,#ffffff))] shadow-[var(--hive-shadow,var(--bd-shadow-card,0_1px_3px_0_rgb(0_0_0/0.1)))] overflow-hidden",children:[(0,g.jsxs)("div",{className:"px-4 py-3 border-b border-[var(--hive-color-border,var(--bd-border,#f3f4f6))] flex items-center gap-2.5",children:[(0,g.jsx)(h,{className:"w-4 h-4 text-[var(--hive-color-primary,#4f46e5)] flex-shrink-0"}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("p",{className:"text-sm font-semibold text-[var(--hive-color-text,var(--bd-text,#111827))]",children:"Secure callback"}),e&&(0,g.jsx)("p",{className:"text-xs text-[var(--hive-color-text-secondary,var(--bd-text-2,#6b7280))] mt-0.5",children:e})]})]}),(0,g.jsxs)("div",{className:"px-4 py-3.5 space-y-2.5",children:[f&&(0,g.jsx)("p",{className:"text-xs text-[var(--hive-color-danger,#dc2626)]",children:f}),(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)("select",{value:n,onChange:e=>i(e.target.value),className:"w-20 px-2 py-2 rounded-lg border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] text-xs text-[var(--hive-color-text,var(--bd-text,#374151))] focus:outline-none bg-[var(--hive-color-bg,var(--bd-surface,#ffffff))]",children:s.map(e=>(0,g.jsxs)("option",{value:e.code,children:[e.flag," ",e.code]},e.code))}),(0,g.jsx)("input",{type:"tel",value:l,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&b(),placeholder:"Phone number",className:"flex-1 px-3 py-2 rounded-lg border border-[var(--hive-color-border,var(--bd-border,#e5e7eb))] text-sm text-[var(--hive-color-text,var(--bd-text,#111827))] placeholder:text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] focus:outline-none bg-[var(--hive-color-bg,var(--bd-surface,#ffffff))]"})]}),(0,g.jsxs)("button",{onClick:b,disabled:!l.trim()||p,className:"w-full py-2.5 bg-[var(--hive-color-primary,#4f46e5)] hover:bg-[var(--hive-color-primary-hover,#4338ca)] disabled:opacity-40 text-white text-sm font-semibold rounded-xl transition-colors flex items-center justify-center gap-2",children:[p?(0,g.jsx)(m,{className:"w-3.5 h-3.5 animate-spin"}):(0,g.jsx)(u,{className:"w-3.5 h-3.5"}),p?"Submitting...":"Confirm number"]}),(0,g.jsx)("p",{className:"text-[10px] text-[var(--hive-color-text-secondary,var(--bd-text-3,#9ca3af))] text-center leading-relaxed",children:"Your number is shared only with the operator for this callback."})]})]})},"TOOL_STEP_LABELS",0,H,"ToolExecutionStep",0,K,"VerificationCard",0,Y,"isToolDone",0,W,"isToolError",0,G],938870)}]);
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.