PageSourceSearch

https://dainamite-core-production.up.railway.app/_next/static/chunks/0hyqdbyww2r24.js

js dainamite-core-production.up.railway.app collected 2026-10-03 12:12:48 UTC 51,897 bytes, 1,009 lines download raw bytes

1(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined,
222034, ((__turbopack_context__) => {
3"use strict";
4
5/**
6 * @license lucide-react v0.556.0 - ISC
7 *
8 * This source code is licensed under the ISC license.
9 * See the LICENSE file in the root directory of this source tree.
10 */ var __TURBOPACK__imported__module__475254__ = __turbopack_context__.i(475254);
11;
12const __iconNode = [
13    [
14        "path",
15        {
16            d: "M12.75 7.09a3 3 0 0 1 2.16 2.16",
17            key: "1d4wjd"
18        }
19    ],
20    [
21        "path",
22        {
23            d: "M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568",
24            key: "12yil7"
25        }
26    ],
27    [
28        "path",
29        {
30            d: "m2 2 20 20",
31            key: "1ooewy"
32        }
33    ],
34    [
35        "path",
36        {
37            d: "M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533",
38            key: "lhrkcz"
39        }
40    ],
41    [
42        "path",
43        {
44            d: "M9.13 9.13a3 3 0 0 0 3.74 3.74",
45            key: "13wojd"
46        }
47    ]
48];
49const MapPinOff = (0, __TURBOPACK__imported__module__475254__["default"])("map-pin-off", __iconNode);
50;
51__turbopack_context__.s([
52    "default",
53    0,
54    MapPinOff
55]);
56}),
57935894, ((__turbopack_context__) => {
58"use strict";
59
60// MERGED MODULE: [project]/node_modules/@open-mercato/core/dist/modules/customers/backend/customers/deals/map/page.js [app-client] (ecmascript)
61;
62var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476);
63var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645);
64var __TURBOPACK__imported__module__522016__ = __turbopack_context__.i(522016);
65var __TURBOPACK__imported__module__748039__ = __turbopack_context__.i(748039);
66var __TURBOPACK__imported__module__68874__ = __turbopack_context__.i(68874);
67var __TURBOPACK__imported__module__9762__ = __turbopack_context__.i(9762);
68var __TURBOPACK__imported__module__928441__ = __turbopack_context__.i(928441);
69var __TURBOPACK__imported__module__58393__ = __turbopack_context__.i(58393);
70var __TURBOPACK__imported__module__341200__ = __turbopack_context__.i(341200);
71// MERGED MODULE: [project]/node_modules/@open-mercato/core/dist/modules/customers/backend/customers/deals/map/components/DealsMapView.js [app-client] (ecmascript)
72;
73var __TURBOPACK__imported__module__843476__1 = __TURBOPACK__imported__module__843476__;
74var __TURBOPACK__imported__module__271645__1 = __TURBOPACK__imported__module__271645__;
75var __TURBOPACK__imported__module__266027__ = __turbopack_context__.i(266027);
76var __TURBOPACK__imported__module__110035__ = __turbopack_context__.i(110035);
77var __TURBOPACK__imported__module__475503__ = __turbopack_context__.i(475503);
78var __TURBOPACK__imported__module__360341__ = __turbopack_context__.i(360341);
79var __TURBOPACK__imported__module__445299__ = __turbopack_context__.i(445299);
80var __TURBOPACK__imported__module__490746__ = __turbopack_context__.i(490746);
81var __TURBOPACK__imported__module__928441__1 = __TURBOPACK__imported__module__928441__;
82var __TURBOPACK__imported__module__58393__1 = __TURBOPACK__imported__module__58393__;
83var __TURBOPACK__imported__module__477315__ = __turbopack_context__.i(477315);
84var __TURBOPACK__imported__module__747624__ = __turbopack_context__.i(747624);
85var __TURBOPACK__imported__module__522807__ = __turbopack_context__.i(522807);
86var __TURBOPACK__imported__module__802165__ = __turbopack_context__.i(802165);
87var __TURBOPACK__imported__module__874800__ = __turbopack_context__.i(874800);
88var __TURBOPACK__imported__module__964053__ = __turbopack_context__.i(964053);
89var __TURBOPACK__imported__module__51534__ = __turbopack_context__.i(51534);
90var __TURBOPACK__imported__module__13643__ = __turbopack_context__.i(13643);
91// MERGED MODULE: [project]/node_modules/@open-mercato/core/dist/modules/customers/backend/customers/deals/map/components/DealsLocationPanel.js [app-client] (ecmascript)
92;
93var __TURBOPACK__imported__module__843476__2 = __TURBOPACK__imported__module__843476__;
94var __TURBOPACK__imported__module__271645__2 = __TURBOPACK__imported__module__271645__;
95var __TURBOPACK__imported__module__346897__ = __turbopack_context__.i(346897);
96// MERGED MODULE: [project]/node_modules/lucide-react/dist/esm/icons/map-pin-off.js [app-client] (ecmascript) <export default as MapPinOff>
97;
98var __TURBOPACK__imported__module__22034__ = __turbopack_context__.i(22034);
99var __TURBOPACK__imported__module__22034__ = __TURBOPACK__imported__module__22034__;
100var __TURBOPACK__imported__module__110035__1 = __TURBOPACK__imported__module__110035__;
101var __TURBOPACK__imported__module__506602__ = __turbopack_context__.i(506602);
102var __TURBOPACK__imported__module__262524__ = __turbopack_context__.i(262524);
103var __TURBOPACK__imported__module__928441__2 = __TURBOPACK__imported__module__928441__;
104var __TURBOPACK__imported__module__58393__2 = __TURBOPACK__imported__module__58393__;
105var __TURBOPACK__imported__module__445106__ = __turbopack_context__.i(445106);
106"use client";
107;
108;
109;
110;
111;
112;
113;
114;
115;
116const STAGE_BADGE_TONE_CLASS = {
117    success: "bg-status-success-bg text-status-success-text",
118    error: "bg-status-error-bg text-status-error-text",
119    warning: "bg-status-warning-bg text-status-warning-text",
120    info: "bg-status-info-bg text-status-info-text",
121    neutral: "bg-status-neutral-bg text-status-neutral-text",
122    brand: "bg-brand-violet/14 text-brand-violet",
123    pink: "bg-status-pink-bg text-status-pink-text"
124};
125function getStageBadgeClass(tone) {
126    if (tone && tone in STAGE_BADGE_TONE_CLASS) return STAGE_BADGE_TONE_CLASS[tone];
127    return "bg-muted text-muted-foreground";
128}
129function haversineKm(a, b) {
130    const toRadians = (value)=>value * Math.PI / 180;
131    const earthRadiusKm = 6371;
132    const dLat = toRadians(b.latitude - a.latitude);
133    const dLng = toRadians(b.longitude - a.longitude);
134    const sinLat = Math.sin(dLat / 2);
135    const sinLng = Math.sin(dLng / 2);
136    const h = sinLat * sinLat + Math.cos(toRadians(a.latitude)) * Math.cos(toRadians(b.latitude)) * sinLng * sinLng;
137    return 2 * earthRadiusKm * Math.asin(Math.min(1, Math.sqrt(h)));
138}
139function DealsLocationPanel({ deals, locatedCount, stageMetaById, mapCenter, selectedDealId, onSelect }) {
140    const t = (0, __TURBOPACK__imported__module__928441__2["useT"])();
141    const [panelSort, setPanelSort] = __TURBOPACK__imported__module__271645__2["useState"]("proximity");
142    const visibleDeals = __TURBOPACK__imported__module__271645__2["useMemo"](()=>{
143        if (panelSort !== "proximity" || !mapCenter) return deals;
144        return deals.slice().sort((a, b)=>{
145            if (!a.location) return 1;
146            if (!b.location) return -1;
147            return haversineKm(mapCenter, a.location) - haversineKm(mapCenter, b.location);
148        });
149    }, [
150        deals,
151        panelSort,
152        mapCenter
153    ]);
154    const noAddressLabel = (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.noAddress", "No address coordinates");
155    return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("div", {
156        className: "flex max-h-[60vh] w-full shrink-0 flex-col overflow-hidden rounded-xl border border-border bg-card lg:max-h-none lg:w-80",
157        children: [
158            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("div", {
159                className: "flex flex-col gap-1 border-b border-border px-4 py-3",
160                children: [
161                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("div", {
162                        className: "flex items-baseline justify-between gap-2",
163                        children: [
164                            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("h2", {
165                                className: "text-sm font-semibold leading-normal text-foreground",
166                                children: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.title", "Deals with location")
167                            }),
168                            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("span", {
169                                className: "text-xs leading-normal text-muted-foreground",
170                                children: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.count", "{count} located", {
171                                    count: locatedCount
172                                })
173                            })
174                        ]
175                    }),
176                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("p", {
177                        className: "text-xs leading-normal text-muted-foreground",
178                        children: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.hint", "Click a deal or a map pin to preview it.")
179                    }),
180                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("div", {
181                        className: "mt-2 flex items-center gap-2",
182                        children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])(__TURBOPACK__imported__module__262524__["Select"], {
183                            value: panelSort,
184                            onValueChange: (value)=>setPanelSort(value),
185                            children: [
186                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__262524__["SelectTrigger"], {
187                                    size: "sm",
188                                    className: "w-auto min-w-36",
189                                    "aria-label": (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.sort.label", "Sort deals panel"),
190                                    children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__262524__["SelectValue"], {})
191                                }),
192                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])(__TURBOPACK__imported__module__262524__["SelectContent"], {
193                                    children: [
194                                        /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__262524__["SelectItem"], {
195                                            value: "proximity",
196                                            children: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.sort.proximity", "Closest first")
197                                        }),
198                                        /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__262524__["SelectItem"], {
199                                            value: "listOrder",
200                                            children: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.sort.listOrder", "List order")
201                                        })
202                                    ]
203                                })
204                            ]
205                        })
206                    })
207                ]
208            }),
209            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("div", {
210                className: "flex flex-1 flex-col gap-2 overflow-y-auto p-3",
211                children: [
212                    deals.length === 0 ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__506602__["EmptyState"], {
213                        variant: "subtle",
214                        size: "sm",
215                        icon: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__22034__["default"], {
216                            className: "size-6",
217                            "aria-hidden": "true"
218                        }),
219                        title: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.empty.title", "No deals on the map yet"),
220                        description: (0, __TURBOPACK__imported__module__58393__2["translateWithFallback"])(t, "customers.deals.map.panel.empty.description", "Add latitude and longitude to company or person addresses to plot their deals here.")
221                    }) : null,
222                    visibleDeals.map((deal)=>{
223                        const stageMeta = deal.pipelineStageId ? stageMetaById.get(deal.pipelineStageId) ?? null : null;
224                        const isSelected = deal.id === selectedDealId;
225                        const locationLine = deal.location ? [
226                            deal.location.city,
227                            deal.location.region
228                        ].filter(Boolean).join(", ") || deal.location.country || null : null;
229                        const valueLabel = typeof deal.valueAmount === "number" ? (0, __TURBOPACK__imported__module__445106__["formatCurrency"])(deal.valueAmount, deal.valueCurrency) : null;
230                        const cardAriaLabel = [
231                            deal.companyLabel,
232                            deal.title,
233                            valueLabel,
234                            stageMeta?.label,
235                            locationLine ?? noAddressLabel
236                        ].filter((part)=>typeof part === "string" && part.length > 0).join(", ") || deal.title;
237                        return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])(__TURBOPACK__imported__module__110035__1["Button"], {
238                            type: "button",
239                            variant: "ghost",
240                            "data-map-panel-card": deal.id,
241                            "aria-label": cardAriaLabel,
242                            "aria-pressed": isSelected,
243                            onClick: ()=>onSelect(deal.id),
244                            className: `h-auto w-full flex-col items-stretch justify-start gap-1 whitespace-normal rounded-lg border border-border p-3 text-left shadow-none ${isSelected ? "bg-muted" : "bg-card"}`,
245                            children: [
246                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("div", {
247                                    className: "flex items-baseline justify-between gap-2",
248                                    children: [
249                                        /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("span", {
250                                            className: "truncate text-sm font-medium leading-normal text-foreground",
251                                            children: deal.companyLabel ?? "\u2014"
252                                        }),
253                                        valueLabel ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("span", {
254                                            className: "shrink-0 text-sm font-semibold leading-normal text-foreground",
255                                            children: valueLabel
256                                        }) : null
257                                    ]
258                                }),
259                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("span", {
260                                    className: "truncate text-sm leading-normal text-muted-foreground",
261                                    children: deal.title
262                                }),
263                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("div", {
264                                    className: "flex items-center justify-between gap-2",
265                                    children: [
266                                        /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsxs"])("span", {
267                                            className: "flex min-w-0 items-center gap-1.5 text-xs leading-normal text-muted-foreground",
268                                            children: [
269                                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])(__TURBOPACK__imported__module__346897__["MapPin"], {
270                                                    className: "size-3.5 shrink-0",
271                                                    "aria-hidden": "true"
272                                                }),
273                                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("span", {
274                                                    className: "truncate",
275                                                    children: locationLine ?? noAddressLabel
276                                                })
277                                            ]
278                                        }),
279                                        stageMeta ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__2["jsx"])("span", {
280                                            className: `inline-flex shrink-0 items-center rounded-md px-2 py-0.5 text-xs font-semibold leading-normal ${getStageBadgeClass(stageMeta.tone)}`,
281                                            children: stageMeta.label
282                                        }) : null
283                                    ]
284                                })
285                            ]
286                        }, deal.id);
287                    })
288                ]
289            })
290        ]
291    });
292}
293var DealsLocationPanel_default = DealsLocationPanel;
294;
295// MERGED MODULE: [project]/node_modules/@open-mercato/core/dist/modules/customers/backend/customers/deals/map/components/DealsMapCanvas.js [app-client] (ecmascript)
296;
297var __TURBOPACK__imported__module__843476__3 = __TURBOPACK__imported__module__843476__;
298var __TURBOPACK__imported__module__271645__3 = __TURBOPACK__imported__module__271645__;
299var __TURBOPACK__imported__module__306994__ = __turbopack_context__.i(306994);
300"use client";
301;
302;
303;
304function DealsMapCanvas(props) {
305    const [Impl, setImpl] = __TURBOPACK__imported__module__271645__3["useState"](null);
306    __TURBOPACK__imported__module__271645__3["useEffect"](()=>{
307        let cancelled = false;
308        void __turbopack_context__.A(148531).then((mod)=>{
309            if (!cancelled) setImpl(()=>mod.default);
310        });
311        return ()=>{
312            cancelled = true;
313        };
314    }, []);
315    if (!Impl) {
316        return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__3["jsx"])("div", {
317            className: `flex items-center justify-center bg-muted/30 ${props.className ?? ""}`.trim(),
318            children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__3["jsx"])(__TURBOPACK__imported__module__306994__["Spinner"], {
319                className: "size-6 text-muted-foreground"
320            })
321        });
322    }
323    return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__3["jsx"])(Impl, {
324        ...props
325    });
326}
327var DealsMapCanvas_default = DealsMapCanvas;
328;
329"use client";
330;
331;
332;
333;
334;
335;
336;
337;
338;
339;
340;
341;
342;
343;
344;
345;
346;
347;
348const DEFAULT_SORT = "updated_desc";
349const PAGE_SIZE = 100;
350const MAX_DEALS = 500;
351const FALLBACK_TONES = [
352    "success",
353    "warning",
354    "error",
355    "info",
356    "neutral",
357    "brand"
358];
359const KNOWN_STAGE_TONES = /* @__PURE__ */ new Set([
360    "success",
361    "warning",
362    "info",
363    "error",
364    "neutral",
365    "brand",
366    "pink"
367]);
368const SUPPRESS_AUTH_REDIRECT_HEADERS = {
369    "x-om-forbidden-redirect": "0",
370    "x-om-unauthorized-redirect": "0"
371};
372const NO_FILTER_CHIPS = [];
373const noopChipClick = (_chipId)=>{};
374function normalizeNumber(value) {
375    if (typeof value === "number" && Number.isFinite(value)) return value;
376    if (typeof value === "string" && value.trim().length) {
377        const parsed = Number(value);
378        return Number.isFinite(parsed) ? parsed : null;
379    }
380    return null;
381}
382function normalizeText(value) {
383    return typeof value === "string" && value.trim().length ? value.trim() : null;
384}
385function normalizeLocation(location) {
386    if (!location) return null;
387    const latitude = normalizeNumber(location.latitude);
388    const longitude = normalizeNumber(location.longitude);
389    if (latitude === null || longitude === null) return null;
390    return {
391        latitude,
392        longitude,
393        city: normalizeText(location.city),
394        region: normalizeText(location.region),
395        country: normalizeText(location.country)
396    };
397}
398function mapApiItem(item, fallbackTitle) {
399    const id = normalizeText(item.id);
400    if (!id) return null;
401    const firstCompany = Array.isArray(item.companies) ? item.companies.find((entry)=>entry && normalizeText(entry.label)) : null;
402    return {
403        id,
404        title: normalizeText(item.title) ?? fallbackTitle,
405        status: normalizeText(item.status),
406        pipelineId: normalizeText(item.pipelineId),
407        pipelineStageId: normalizeText(item.pipelineStageId),
408        valueAmount: normalizeNumber(item.valueAmount),
409        valueCurrency: normalizeText(item.valueCurrency)?.toUpperCase() ?? null,
410        probability: normalizeNumber(item.probability),
411        expectedCloseAt: normalizeText(item.expectedCloseAt),
412        ownerUserId: normalizeText(item.ownerUserId),
413        companyLabel: firstCompany ? normalizeText(firstCompany.label) : null,
414        location: normalizeLocation(item.location)
415    };
416}
417function mapSortOptionToApi(option) {
418    switch(option){
419        case "updated_desc":
420            return {
421                sortField: "updatedAt",
422                sortDir: "desc"
423            };
424        case "updated_asc":
425            return {
426                sortField: "updatedAt",
427                sortDir: "asc"
428            };
429        case "created_desc":
430            return {
431                sortField: "createdAt",
432                sortDir: "desc"
433            };
434        case "value_desc":
435            return {
436                sortField: "value",
437                sortDir: "desc"
438            };
439        case "value_asc":
440            return {
441                sortField: "value",
442                sortDir: "asc"
443            };
444        case "probability_desc":
445            return {
446                sortField: "probability",
447                sortDir: "desc"
448            };
449        case "close_asc":
450            return {
451                sortField: "expectedCloseAt",
452                sortDir: "asc"
453            };
454        case "owner_asc":
455        default:
456            return null;
457    }
458}
459function buildStageMetaById(stages) {
460    const byPipeline = /* @__PURE__ */ new Map();
461    for (const stage of stages){
462        const key = stage.pipelineId ?? "";
463        const bucket = byPipeline.get(key) ?? [];
464        bucket.push(stage);
465        byPipeline.set(key, bucket);
466    }
467    const meta = /* @__PURE__ */ new Map();
468    for (const bucket of byPipeline.values()){
469        const sorted = bucket.slice().sort((a, b)=>a.order - b.order);
470        sorted.forEach((stage, index)=>{
471            const tone = stage.color && KNOWN_STAGE_TONES.has(stage.color) ? stage.color : FALLBACK_TONES[index % FALLBACK_TONES.length];
472            meta.set(stage.id, {
473                label: stage.label,
474                tone
475            });
476        });
477    }
478    return meta;
479}
480function DealsMapView({ search }) {
481    const t = (0, __TURBOPACK__imported__module__928441__1["useT"])();
482    const scopeVersion = (0, __TURBOPACK__imported__module__477315__["useOrganizationScopeVersion"])();
483    const [statusFilters, setStatusFilters] = __TURBOPACK__imported__module__271645__1["useState"]([]);
484    const [selectedPipelineId, setSelectedPipelineId] = __TURBOPACK__imported__module__271645__1["useState"](null);
485    const [ownerFilters, setOwnerFilters] = __TURBOPACK__imported__module__271645__1["useState"]([]);
486    const [peopleFilters, setPeopleFilters] = __TURBOPACK__imported__module__271645__1["useState"]([]);
487    const [companyFilters, setCompanyFilters] = __TURBOPACK__imported__module__271645__1["useState"]([]);
488    const [closeDateFilter, setCloseDateFilter] = __TURBOPACK__imported__module__271645__1["useState"]({
489        from: null,
490        to: null
491    });
492    const [sortBy, setSortBy] = __TURBOPACK__imported__module__271645__1["useState"](DEFAULT_SORT);
493    const [ownerLabels, setOwnerLabels] = __TURBOPACK__imported__module__271645__1["useState"]({});
494    const [peopleLabels, setPeopleLabels] = __TURBOPACK__imported__module__271645__1["useState"]({});
495    const [companyLabels, setCompanyLabels] = __TURBOPACK__imported__module__271645__1["useState"]({});
496    const [selectedDealId, setSelectedDealId] = __TURBOPACK__imported__module__271645__1["useState"](null);
497    const [mapCenter, setMapCenter] = __TURBOPACK__imported__module__271645__1["useState"](null);
498    const [debouncedSearch, setDebouncedSearch] = __TURBOPACK__imported__module__271645__1["useState"](search);
499    __TURBOPACK__imported__module__271645__1["useEffect"](()=>{
500        const handle = window.setTimeout(()=>setDebouncedSearch(search.trim()), 300);
501        return ()=>window.clearTimeout(handle);
502    }, [
503        search
504    ]);
505    const fallbackTitle = (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.pipeline.untitled", "Untitled deal");
506    const loadErrorLabel = (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.map.loadError", "Failed to load deals for the map.");
507    const apiSort = __TURBOPACK__imported__module__271645__1["useMemo"](()=>{
508        const mapped = mapSortOptionToApi(sortBy);
509        return mapped ?? {
510            sortField: "updatedAt",
511            sortDir: "desc"
512        };
513    }, [
514        sortBy
515    ]);
516    const pipelinesQuery = (0, __TURBOPACK__imported__module__266027__["useQuery"])({
517        queryKey: [
518            "customers",
519            "deals",
520            "map",
521            "pipelines",
522            `scope:${scopeVersion}`
523        ],
524        staleTime: 6e4,
525        queryFn: async ()=>{
526            const call = await (0, __TURBOPACK__imported__module__490746__["apiCall"])("/api/customers/pipelines", {
527                headers: SUPPRESS_AUTH_REDIRECT_HEADERS
528            });
529            if (!call.ok) return [];
530            return Array.isArray(call.result?.items) ? call.result.items : [];
531        }
532    });
533    const stagesQuery = (0, __TURBOPACK__imported__module__266027__["useQuery"])({
534        queryKey: [
535            "customers",
536            "deals",
537            "map",
538            "stages",
539            `scope:${scopeVersion}`
540        ],
541        staleTime: 6e4,
542        queryFn: async ()=>{
543            const call = await (0, __TURBOPACK__imported__module__490746__["apiCall"])("/api/customers/pipeline-stages", {
544                headers: SUPPRESS_AUTH_REDIRECT_HEADERS
545            });
546            if (!call.ok) return [];
547            return Array.isArray(call.result?.items) ? call.result.items : [];
548        }
549    });
550    const staffQuery = (0, __TURBOPACK__imported__module__266027__["useQuery"])({
551        queryKey: [
552            "customers",
553            "deals",
554            "map",
555            "staff",
556            `scope:${scopeVersion}`
557        ],
558        staleTime: 3e5,
559        queryFn: async ()=>{
560            try {
561                const members = await (0, __TURBOPACK__imported__module__490746__["withScopedApiRequestHeaders"])({
562                    ...SUPPRESS_AUTH_REDIRECT_HEADERS
563                }, ()=>(0, __TURBOPACK__imported__module__13643__["fetchAssignableStaffMembers"])("", {
564                        pageSize: 100
565                    }));
566                const names = /* @__PURE__ */ new Map();
567                for (const member of members){
568                    if (member.userId && member.displayName) names.set(member.userId, member.displayName);
569                }
570                return names;
571            } catch  {
572                return /* @__PURE__ */ new Map();
573            }
574        }
575    });
576    const ownerNamesById = staffQuery.data ?? null;
577    const dealsQuery = (0, __TURBOPACK__imported__module__266027__["useQuery"])({
578        queryKey: [
579            "customers",
580            "deals",
581            "map",
582            "deals",
583            `scope:${scopeVersion}`,
584            `search:${debouncedSearch}`,
585            `status:${statusFilters.slice().sort((a, b)=>a.localeCompare(b)).join(",")}`,
586            `pipeline:${selectedPipelineId ?? ""}`,
587            `owners:${ownerFilters.slice().sort((a, b)=>a.localeCompare(b)).join(",")}`,
588            `people:${peopleFilters.slice().sort((a, b)=>a.localeCompare(b)).join(",")}`,
589            `companies:${companyFilters.slice().sort((a, b)=>a.localeCompare(b)).join(",")}`,
590            `close:${closeDateFilter.from ?? ""}-${closeDateFilter.to ?? ""}`,
591            `sort:${apiSort.sortField}:${apiSort.sortDir}`
592        ],
593        staleTime: 3e4,
594        queryFn: async ()=>{
595            const buildParams = (page)=>{
596                const params = new URLSearchParams();
597                params.set("page", String(page));
598                params.set("pageSize", String(PAGE_SIZE));
599                params.set("sortField", apiSort.sortField);
600                params.set("sortDir", apiSort.sortDir);
601                if (debouncedSearch.length) params.set("search", debouncedSearch);
602                for (const status of statusFilters)params.append("status", status);
603                if (selectedPipelineId) params.set("pipelineId", selectedPipelineId);
604                for (const ownerId of ownerFilters)params.append("ownerUserId", ownerId);
605                for (const personId of peopleFilters)params.append("personId", personId);
606                for (const companyId of companyFilters)params.append("companyId", companyId);
607                if (closeDateFilter.from) params.set("expectedCloseAtFrom", closeDateFilter.from);
608                if (closeDateFilter.to) params.set("expectedCloseAtTo", closeDateFilter.to);
609                return params;
610            };
611            const fetchPage = (page)=>(0, __TURBOPACK__imported__module__490746__["readApiResultOrThrow"])(`/api/customers/deals/map?${buildParams(page).toString()}`, void 0, {
612                    errorMessage: loadErrorLabel
613                });
614            const collected = [];
615            const collectFrom = (payload)=>{
616                const items = Array.isArray(payload?.items) ? payload.items : [];
617                for (const item of items){
618                    const mapped = mapApiItem(item, fallbackTitle);
619                    if (mapped) collected.push(mapped);
620                }
621            };
622            const firstPage = await fetchPage(1);
623            collectFrom(firstPage);
624            const total = typeof firstPage?.total === "number" ? firstPage.total : collected.length;
625            const reportedTotalPages = typeof firstPage?.totalPages === "
625number" ? firstPage.totalPages : 1;
626            const maxPages = Math.max(1, Math.ceil(MAX_DEALS / PAGE_SIZE));
627            const lastPage = Math.min(reportedTotalPages, maxPages);
628            if (lastPage > 1) {
629                const rest = await Promise.all(Array.from({
630                    length: lastPage - 1
631                }, (_unused, index)=>fetchPage(index + 2)));
632                for (const payload of rest)collectFrom(payload);
633            }
634            const deals2 = collected.slice(0, MAX_DEALS);
635            return {
636                deals: deals2,
637                total,
638                truncated: total > deals2.length
639            };
640        }
641    });
642    const stageMetaById = __TURBOPACK__imported__module__271645__1["useMemo"](()=>buildStageMetaById(stagesQuery.data ?? []), [
643        stagesQuery.data
644    ]);
645    const deals = __TURBOPACK__imported__module__271645__1["useMemo"](()=>{
646        const fetched = dealsQuery.data?.deals ?? [];
647        if (sortBy !== "owner_asc" || !ownerNamesById) return fetched;
648        return fetched.slice().sort((a, b)=>{
649            const aLabel = (a.ownerUserId ? ownerNamesById.get(a.ownerUserId) : null) ?? a.ownerUserId ?? "";
650            const bLabel = (b.ownerUserId ? ownerNamesById.get(b.ownerUserId) : null) ?? b.ownerUserId ?? "";
651            return aLabel.localeCompare(bLabel);
652        });
653    }, [
654        dealsQuery.data,
655        sortBy,
656        ownerNamesById
657    ]);
658    const locatedDeals = __TURBOPACK__imported__module__271645__1["useMemo"](()=>deals.filter((deal)=>deal.location !== null), [
659        deals
660    ]);
661    const canvasDeals = __TURBOPACK__imported__module__271645__1["useMemo"](()=>locatedDeals.map((deal)=>({
662                id: deal.id,
663                latitude: deal.location.latitude,
664                longitude: deal.location.longitude,
665                tone: deal.pipelineStageId ? stageMetaById.get(deal.pipelineStageId)?.tone ?? null : null
666            })), [
667        locatedDeals,
668        stageMetaById
669    ]);
670    const legendStages = __TURBOPACK__imported__module__271645__1["useMemo"](()=>{
671        if (stageMetaById.size === 0) return [];
672        const presentStageIds = /* @__PURE__ */ new Set();
673        for (const deal of locatedDeals){
674            if (deal.pipelineStageId) presentStageIds.add(deal.pipelineStageId);
675        }
676        const stages = [];
677        for (const stage of stagesQuery.data ?? []){
678            if (!presentStageIds.has(stage.id)) continue;
679            const meta = stageMetaById.get(stage.id);
680            if (!meta) continue;
681            stages.push({
682                id: stage.id,
683                label: meta.label,
684                tone: meta.tone
685            });
686        }
687        return stages;
688    }, [
689        locatedDeals,
690        stageMetaById,
691        stagesQuery.data
692    ]);
693    const selectedDeal = __TURBOPACK__imported__module__271645__1["useMemo"](()=>selectedDealId ? deals.find((deal)=>deal.id === selectedDealId) ?? null : null, [
694        deals,
695        selectedDealId
696    ]);
697    const preview = __TURBOPACK__imported__module__271645__1["useMemo"](()=>{
698        if (!selectedDeal) return null;
699        const stageMeta = selectedDeal.pipelineStageId ? stageMetaById.get(selectedDeal.pipelineStageId) ?? null : null;
700        const locationLine = selectedDeal.location ? [
701            selectedDeal.location.city,
702            selectedDeal.location.region
703        ].filter(Boolean).join(", ") || selectedDeal.location.country : null;
704        return {
705            id: selectedDeal.id,
706            title: selectedDeal.title,
707            companyLabel: selectedDeal.companyLabel,
708            locationLine: locationLine || null,
709            valueAmount: selectedDeal.valueAmount,
710            valueCurrency: selectedDeal.valueCurrency,
711            probability: selectedDeal.probability,
712            expectedCloseAt: selectedDeal.expectedCloseAt,
713            stageLabel: stageMeta?.label ?? null,
714            stageTone: stageMeta?.tone ?? null,
715            ownerName: selectedDeal.ownerUserId && ownerNamesById ? ownerNamesById.get(selectedDeal.ownerUserId) ?? null : null
716        };
717    }, [
718        selectedDeal,
719        stageMetaById,
720        ownerNamesById
721    ]);
722    const handleSelect = __TURBOPACK__imported__module__271645__1["useCallback"]((dealId)=>{
723        setSelectedDealId(dealId);
724    }, []);
725    const handleCenterChange = __TURBOPACK__imported__module__271645__1["useCallback"]((center)=>{
726        setMapCenter(center);
727    }, []);
728    const pipelineFilterOptions = __TURBOPACK__imported__module__271645__1["useMemo"](()=>(pipelinesQuery.data ?? []).map((pipeline)=>({
729                id: pipeline.id,
730                name: pipeline.name
731            })), [
732        pipelinesQuery.data
733    ]);
734    const loadOwnerOptions = __TURBOPACK__imported__module__271645__1["useCallback"](async (query, _signal)=>{
735        try {
736            const members = await (0, __TURBOPACK__imported__module__490746__["withScopedApiRequestHeaders"])({
737                ...SUPPRESS_AUTH_REDIRECT_HEADERS
738            }, ()=>(0, __TURBOPACK__imported__module__13643__["fetchAssignableStaffMembers"])(query ?? "", {
739                    pageSize: 100
740                }));
741            const options = members.filter((member)=>!!member.userId && !!member.displayName).map((member)=>({
742                    value: member.userId,
743                    label: member.displayName
744                }));
745            setOwnerLabels((prev)=>{
746                const next = {
747                    ...prev
748                };
749                for (const option of options)next[option.value] = option.label;
750                return next;
751            });
752            return options;
753        } catch  {
754            return [];
755        }
756    }, []);
757    const loadPeopleOptions = __TURBOPACK__imported__module__271645__1["useCallback"](async (query, signal)=>{
758        const params = new URLSearchParams();
759        params.set("page", "1");
760        params.set("pageSize", "50");
761        if (query) params.set("search", query);
762        params.set("sortField", "displayName");
763        params.set("sortDir", "asc");
764        const call = await (0, __TURBOPACK__imported__module__490746__["apiCall"])(`/api/customers/people?${params.toString()}`, {
765            signal,
766            headers: SUPPRESS_AUTH_REDIRECT_HEADERS
767        });
768        if (!call.ok) return [];
769        const items = call.result?.items ?? [];
770        const options = [];
771        for (const item of items){
772            if (!item.id) continue;
773            const label = item.display_name && item.display_name.trim().length ? item.display_name.trim() : [
774                item.first_name,
775                item.last_name
776            ].filter(Boolean).join(" ").trim() || item.id.slice(0, 8);
777            options.push({
778                value: item.id,
779                label
780            });
781        }
782        setPeopleLabels((prev)=>{
783            const next = {
784                ...prev
785            };
786            for (const option of options)next[option.value] = option.label;
787            return next;
788        });
789        return options;
790    }, []);
791    const loadCompanyOptions = __TURBOPACK__imported__module__271645__1["useCallback"](async (query, signal)=>{
792        const params = new URLSearchParams();
793        params.set("page", "1");
794        params.set("pageSize", "50");
795        if (query) params.set("search", query);
796        params.set("sortField", "display_name");
797        params.set("sortDir", "asc");
798        const call = await (0, __TURBOPACK__imported__module__490746__["apiCall"])(`/api/customers/companies?${params.toString()}`, {
799            signal,
800            headers: SUPPRESS_AUTH_REDIRECT_HEADERS
801        });
802        if (!call.ok) return [];
803        const items = call.result?.items ?? [];
804        const options = [];
805        for (const item of items){
806            if (!item.id || !item.display_name) continue;
807            options.push({
808                value: item.id,
809                label: item.display_name
810            });
811        }
812        setCompanyLabels((prev)=>{
813            const next = {
814                ...prev
815            };
816            for (const option of options)next[option.value] = option.label;
817            return next;
818        });
819        return options;
820    }, []);
821    const leadingChipsNode = /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsxs"])(__TURBOPACK__imported__module__843476__1["Fragment"], {
822        children: [
823            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__522807__["StatusFilterPopover"], {
824                values: statusFilters,
825                onApply: setStatusFilters
826            }),
827            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__802165__["PipelineFilterPopover"], {
828                pipelines: pipelineFilterOptions,
829                selectedPipelineId,
830                onApply: setSelectedPipelineId
831            }),
832            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__874800__["EntityFilterPopover"], {
833                label: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.kanban.filter.owner", "Owner"),
834                anyLabel: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.kanban.filter.all", "All"),
835                values: ownerFilters,
836                onApply: setOwnerFilters,
837                loadOptions: loadOwnerOptions,
838                labelById: ownerLabels
839            }),
840            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__874800__["EntityFilterPopover"], {
841                label: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.kanban.filter.people", "People"),
842                values: peopleFilters,
843                onApply: setPeopleFilters,
844                loadOptions: loadPeopleOptions,
845                labelById: peopleLabels
846            }),
847            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__874800__["EntityFilterPopover"], {
848                label: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.kanban.filter.companies", "Companies"),
849                values: companyFilters,
850                onApply: setCompanyFilters,
851                loadOptions: loadCompanyOptions,
852                labelById: companyLabels
853            }),
854            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__964053__["CloseDateFilterPopover"], {
855                value: closeDateFilter,
856                onApply: setCloseDateFilter
857            })
858        ]
859    });
860    const sortNode = /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__51534__["SortByPopover"], {
861        value: sortBy,
862        onApply: setSortBy
863    });
864    return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("div", {
865        className: "flex flex-col gap-4",
866        children: [
867            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__747624__["FilterBarRow"], {
868                leadingChips: leadingChipsNode,
869                chips: NO_FILTER_CHIPS,
870                sortNode,
871                onChipClick: noopChipClick
872            }),
873            dealsQuery.isLoading ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__360341__["LoadingMessage"], {
874                label: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.map.canvas.loading", "Loading map\u2026")
875            }) : dealsQuery.isError ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__445299__["ErrorMessage"], {
876                label: dealsQuery.error instanceof Error ? dealsQuery.error.message : loadErrorLabel,
877                action: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__110035__["Button"], {
878                    type: "button",
879                    variant: "outline",
880                    size: "sm",
881                    onClick: ()=>void dealsQuery.refetch(),
882                    children: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.map.retry", "Retry")
883                })
884            }) : /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("div", {
885                className: "flex flex-col gap-2",
886                children: [
887                    dealsQuery.data?.truncated ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])("p", {
888                        className: "text-sm text-muted-foreground",
889                        children: (0, __TURBOPACK__imported__module__58393__1["translateWithFallback"])(t, "customers.deals.map.truncated", "Showing first {count} of {total} located deals \u2014 refine filters to narrow the map.", {
890                            count: deals.length,
891                            total: dealsQuery.data?.total ?? deals.length
892                        })
893                    }) : null,
894                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("div", {
895                        className: "flex min-h-[480px] flex-col gap-4 lg:h-[calc(100vh-360px)] lg:flex-row",
896                        children: [
897                            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(DealsLocationPanel, {
898                                deals,
899                                locatedCount: dealsQuery.data?.total ?? deals.length,
900                                stageMetaById,
901                                mapCenter,
902                                selectedDealId,
903                                onSelect: handleSelect
904                            }),
905                            /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(DealsMapCanvas, {
906                                className: "min-h-[480px] flex-1 overflow-hidden rounded-xl border border-border lg:min-h-0",
907                                deals: canvasDeals,
908                                legendStages,
909                                preview,
910                                selectedDealId,
911                                onSelect: handleSelect,
912                                onCenterChange: handleCenterChange
913                            })
914                        ]
915                    })
916                ]
917            })
918        ]
919    });
920}
921var DealsMapView_default = DealsMapView;
922;
923"use client";
924;
925;
926;
927;
928;
929;
930;
931;
932;
933;
934function DealsMapPage() {
935    const t = (0, __TURBOPACK__imported__module__928441__["useT"])();
936    const [search, setSearch] = __TURBOPACK__imported__module__271645__["useState"]("");
937    return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__748039__["Page"], {
938        children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsxs"])(__TURBOPACK__imported__module__748039__["PageBody"], {
939            children: [
940                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
941                    className: "flex flex-col gap-2",
942                    children: [
943                        /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["Breadcrumb"], {
944                            children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsxs"])(__TURBOPACK__imported__module__68874__["BreadcrumbList"], {
945                                children: [
946                                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbItem"], {
947                                        children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbLink"], {
948                                            asChild: true,
949                                            children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__522016__["default"], {
950                                                href: "/backend",
951                                                children: (0, __TURBOPACK__imported__module__58393__["translateWithFallback"])(t, "customers.deals.kanban.breadcrumb.dashboard", "Dashboard")
952                                            })
953                                        })
954                                    }),
955                                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbSeparator"], {}),
956                                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbItem"], {
957                                        children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbLink"], {
958                                            asChild: true,
959                                            children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__522016__["default"], {
960                                                href: "/backend/customers/deals",
961                                                children: (0, __TURBOPACK__imported__module__58393__["translateWithFallback"])(t, "customers.deals.kanban.breadcrumb.deals", "Deals")
962                                            })
963                                        })
964                                    }),
965                                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbSeparator"], {}),
966                                    /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbItem"], {
967                                        children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__68874__["BreadcrumbPage"], {
968                                            children: (0, __TURBOPACK__imported__module__58393__["translateWithFallback"])(t, "customers.nav.deals.map", "Deals Map")
969                                        })
970                                    })
971                                ]
972                            })
973                        }),
974                        /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
975                            className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
976                            children: [
977                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])("h1", {
978                                    className: "text-xl font-semibold leading-tight text-foreground sm:text-2xl",
979                                    children: (0, __TURBOPACK__imported__module__58393__["translateWithFallback"])(t, "customers.nav.deals.map", "Deals Map")
980                                }),
981                                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__9762__["SearchInput"], {
982                                    value: search,
983                                    onChange: setSearch,
984                                    placeholder: (0, __TURBOPACK__imported__module__58393__["translateWithFallback"])(t, "customers.deals.kanban.search.placeholder", "Search deals\u2026"),
985                                    className: "w-64"
986                                })
987                            ]
988                        })
989                    ]
990                }),
991                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__341200__["ViewTabsRow"], {
992                    active: "map",
993                    className: "mt-4"
994                }),
995                /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(DealsMapView, {
996                    search
997                })
998            ]
999        })
1000    });
1001}
1002;
1003__turbopack_context__.s([
1004    "default",
1005    0,
1006    DealsMapPage
1007], 935894);
1008}),
1009]);

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.