@wisemen/wise-crm-web 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/ActivityIcon-DNdtN-M_.js +19 -0
  2. package/dist/AppSkeletonLoader-Dq6pKznm.js +1112 -0
  3. package/dist/{AttachmentIcon-CsucE3yf.js → AttachmentIcon-BLUd7LaN.js} +9 -7
  4. package/dist/BoldIcon-WRYUWz15.js +16 -0
  5. package/dist/{BookIcon-DgT3flV5.js → BookIcon-Bb3r5y_J.js} +9 -7
  6. package/dist/{BuildingIcon-Bm18omgW.js → BuildingIcon-DFutRg8d.js} +9 -7
  7. package/dist/{BuildingsIcon-D4X7QciL.js → BuildingsIcon-BVHy6yoa.js} +9 -7
  8. package/dist/{BulletListIcon-CNCV-cOS.js → BulletListIcon-BhOXLSBa.js} +9 -7
  9. package/dist/BusinessDetailSidebarProvider-a6VeNUii.js +2946 -0
  10. package/dist/BusinessDetailView-Dz3wDSx5.js +24 -0
  11. package/dist/ChevronDownIcon-BmyTSPND.js +19 -0
  12. package/dist/ClockIcon-BYfZAvIE.js +23 -0
  13. package/dist/ClockPlusIcon-BcNi0Y9I.js +23 -0
  14. package/dist/{CopyIcon-CUomKXdn.js → CopyIcon-2eV8MRv_.js} +9 -7
  15. package/dist/CrmDetailHeaderCard-BkA0Z-Cu.js +2523 -0
  16. package/dist/CrmDetailView-BhZEQqUH.js +67 -0
  17. package/dist/DealCommunicationTabView-Drp9MEPu.js +140 -0
  18. package/dist/DealDetailView-DWLudchX.js +1049 -0
  19. package/dist/DealExternalAttachment-B6l0gDqF.js +179 -0
  20. package/dist/{DealIcon-CpO-DkyS.js → DealIcon-BwUWYDxo.js} +9 -7
  21. package/dist/DealSendMailDialog-Dqei4933.js +1566 -0
  22. package/dist/DownloadCloudIcon-BSrLGGrY.js +19 -0
  23. package/dist/{EditWithLineIcon-C0WMD50F.js → EditWithLineIcon-BKYDPJOY.js} +9 -7
  24. package/dist/{Error-X0deDY-N.js → Error-za-wClcU.js} +2591 -2462
  25. package/dist/{FileIcon-3FebXgYQ.js → FileIcon-DL1e1tAu.js} +9 -7
  26. package/dist/FilterLinesIcon-DgVMySAE.js +22 -0
  27. package/dist/H1Icon-B6NEsEbj.js +17 -0
  28. package/dist/{H2Icon-CuEmp9I0.js → H2Icon-CNof5Ohu.js} +9 -7
  29. package/dist/{H3Icon-wAPhdYIf.js → H3Icon-B2F2Tb6r.js} +9 -7
  30. package/dist/HashIcon-C_XttKfW.js +19 -0
  31. package/dist/HomeFilledIcon-DtZ2eXxt.js +16 -0
  32. package/dist/IndividualDetailSidebarProvider-jjRoK1Av.js +609 -0
  33. package/dist/IndividualDetailView-BqIRHn-0.js +24 -0
  34. package/dist/ItalicIcon-DqBns3yy.js +17 -0
  35. package/dist/{LayersTreeIcon-Ct-owndO.js → LayersTreeIcon-DZZCSCY9.js} +10 -8
  36. package/dist/{LinkBrokenIcon-CTlqmapl.js → LinkBrokenIcon-BNBpWSi7.js} +9 -7
  37. package/dist/{LinkExternalIcon-LOVtSqBT.js → LinkExternalIcon-B7SHeB1_.js} +9 -7
  38. package/dist/LinkIcon-8bCrZEv9.js +17 -0
  39. package/dist/{LocationPinIcon-Cp-wRgk2.js → LocationPinIcon-UySRqSfG.js} +9 -7
  40. package/dist/{MailIcon-CnTrB1k3.js → MailIcon-BT7gSIZb.js} +9 -7
  41. package/dist/{MobilePhoneIcon-B747hmpS.js → MobilePhoneIcon-_KQGnCSS.js} +9 -7
  42. package/dist/NumberedListIcon-B-JVTSAe.js +17 -0
  43. package/dist/{PhoneIcon-94MYVL85.js → PhoneIcon-DGGW_MNR.js} +9 -7
  44. package/dist/{RefreshIcon-DRe3coBc.js → RefreshIcon-D1QWfdPD.js} +9 -7
  45. package/dist/{SendIcon-MYItp1xI.js → SendIcon-BtJ-NCec.js} +9 -7
  46. package/dist/{SettingsIcon-C0qTAv0w.js → SettingsIcon-CWFwJelS.js} +10 -8
  47. package/dist/{StarOutlineIcon-CiFLgepk.js → StarOutlineIcon-C-ELTCDQ.js} +9 -7
  48. package/dist/{StarYellowIcon-C0v_XGwI.js → StarYellowIcon-7wuNWaQO.js} +9 -7
  49. package/dist/{ThreeDotsIcon-lujOTU3G.js → ThreeDotsIcon-C56RWk-0.js} +12 -10
  50. package/dist/TimeLineMarkerIcon-DLmPwfs6.js +18 -0
  51. package/dist/{TrashIcon-v4L9SEK_.js → TrashIcon-o4PWmcYe.js} +9 -7
  52. package/dist/UploadCloudIcon-D2tWB0NP.js +19 -0
  53. package/dist/{UserCircleIcon-BjUt_2C4.js → UserCircleIcon-DiDajcIH.js} +10 -8
  54. package/dist/UserIcon-Bv1eF7ln.js +22 -0
  55. package/dist/{VerticalDotsIcon-Y3m6tlQ2.js → VerticalDotsIcon-YcD73UqY.js} +9 -7
  56. package/dist/{WalletIcon-pPsKbzmh.js → WalletIcon-CUh92U5K.js} +9 -7
  57. package/dist/_plugin-vue_export-helper-D3hKq4w_.js +8 -0
  58. package/dist/client-9P6xe_5g.js +4188 -0
  59. package/dist/components/auto-focus/AutoFocus.vue.d.ts +13 -0
  60. package/dist/components/column-layout/ColumnLayout.vue.d.ts +1 -1
  61. package/dist/components/row-layout/RowLayout.vue.d.ts +1 -1
  62. package/dist/components/text/Text.vue.d.ts +1 -1
  63. package/dist/index.js +1881 -1693
  64. package/dist/style.css +2 -2
  65. package/dist/testing.js +102 -98
  66. package/dist/utils/color.util.d.ts +6 -0
  67. package/dist/{uuid.util-C1p-yuFc.js → uuid.util-DpiDKVoj.js} +4 -2
  68. package/package.json +30 -30
  69. package/dist/ActivityIcon-DFD9ZhO0.js +0 -17
  70. package/dist/AppSkeletonLoader-BAhoOmFD.js +0 -1106
  71. package/dist/BoldIcon-DY2FlAS0.js +0 -14
  72. package/dist/BusinessDetailSidebarProvider-Dm6Dd7Nq.js +0 -2899
  73. package/dist/BusinessDetailView-BHVUfCpV.js +0 -24
  74. package/dist/ChevronDownIcon-CfBAAAca.js +0 -17
  75. package/dist/ClockIcon-Ckr1IQBt.js +0 -21
  76. package/dist/ClockPlusIcon-CVN69pCS.js +0 -21
  77. package/dist/CrmDetailHeaderCard-CiVLyIuw.js +0 -2516
  78. package/dist/CrmDetailView-DaAuWeiB.js +0 -65
  79. package/dist/DealCommunicationTabView-xq_zOAsr.js +0 -137
  80. package/dist/DealDetailView-C54XpYN1.js +0 -1021
  81. package/dist/DealExternalAttachment-Dp44vkgt.js +0 -177
  82. package/dist/DealSendMailDialog-D11Tgd_A.js +0 -1552
  83. package/dist/DownloadCloudIcon-VMmB9vit.js +0 -17
  84. package/dist/FilterLinesIcon-DHpRPKJB.js +0 -20
  85. package/dist/H1Icon-CPVGTTtl.js +0 -15
  86. package/dist/HashIcon-C2kfHjTC.js +0 -17
  87. package/dist/HomeFilledIcon-CxIazF0B.js +0 -14
  88. package/dist/IndividualDetailSidebarProvider-BvjhFng9.js +0 -608
  89. package/dist/IndividualDetailView-Cq8iAwQv.js +0 -24
  90. package/dist/ItalicIcon-DfV3EOdk.js +0 -15
  91. package/dist/LinkIcon-DqBbVrvs.js +0 -15
  92. package/dist/NumberedListIcon-amJxDaaD.js +0 -15
  93. package/dist/TimeLineMarkerIcon-C4LfErbc.js +0 -16
  94. package/dist/UploadCloudIcon-j1-1Rvqb.js +0 -17
  95. package/dist/UserIcon-Cb2jFKLr.js +0 -20
  96. package/dist/_plugin-vue_export-helper-BSi1g3Lh.js +0 -6
  97. package/dist/client-S6BLV3Ct.js +0 -4191
@@ -0,0 +1,2523 @@
1
+ import { F as e, H as t, P as n, U as r, V as i, Y as a, _ as o, a as s, d as c, f as l, g as u, k as d, l as f, nt as p, o as m, p as h, rt as g, tt as _, u as v, x as ee, y as te } from "./Error-za-wClcU.js";
2
+ import { a as y, n as ne, r as re } from "./AppSkeletonLoader-Dq6pKznm.js";
3
+ import { mt as ie } from "./client-9P6xe_5g.js";
4
+ import ae, { z as b } from "zod";
5
+ import { Comment as oe, Fragment as se, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createTextVNode as E, createVNode as D, defineComponent as O, guardReactiveProps as ce, inject as k, markRaw as A, mergeProps as le, normalizeProps as ue, onBeforeUnmount as j, onMounted as de, openBlock as M, provide as N, ref as P, renderList as fe, renderSlot as pe, resolveDynamicComponent as me, toDisplayString as F, toRef as I, unref as L, watch as R, withCtx as z } from "vue";
6
+ import { useI18n as B } from "vue-i18n";
7
+ import { VcBadge as he, VcButton as ge, VcDropdownMenu as _e, VcDropdownMenuItem as ve, VcIcon as V, VcIconButton as ye, VcTextField as be, VcTooltip as xe, VcTooltipTrigger as Se } from "@wisemen/vue-core-components";
8
+ import { RouterLink as Ce } from "vue-router";
9
+ import { useClipboard as we } from "@vueuse/core";
10
+ import { useForm as Te } from "formango";
11
+ import { Motion as Ee } from "motion-v";
12
+ //#region src/helpers/assert.helper.ts
13
+ function De(e, t) {
14
+ if (!e) throw Error(t);
15
+ }
16
+ //#endregion
17
+ //#region src/components/activity/ActivityListItemMessage.vue?vue&type=script&setup=true&lang.ts
18
+ var Oe = { class: "gap-xs flex flex-wrap items-center" }, ke = {
19
+ key: 0,
20
+ class: "text-primary shrink-0 text-sm"
21
+ }, Ae = { class: "gap-md flex flex-wrap items-center text-sm" }, je = { class: "text-brand text-xs" }, Me = /* @__PURE__ */ O({
22
+ __name: "ActivityListItemMessage",
23
+ props: { activity: {} },
24
+ setup(e) {
25
+ let t = e, n = x(() => t.activity.message.split(" ").map((e) => e === "[note]" ? {
26
+ text: t.activity.content?.note?.name ?? "",
27
+ type: "text"
28
+ } : e === "[contactPerson]" ? {
29
+ route: { query: { individualUuid: t.activity.content?.contactPerson?.uuid } },
30
+ text: t.activity.content?.contactPerson?.name ?? "",
31
+ type: "link"
32
+ } : {
33
+ text: e,
34
+ type: "text"
35
+ }));
36
+ return (e, r) => (M(), w("div", Oe, [(M(!0), w(se, null, fe(n.value, (e) => (M(), w(se, { key: e }, [e.type === "text" ? (M(), w("span", ke, F(e.text), 1)) : C("", !0), e.type === "link" && e.route !== void 0 ? (M(), S(L(Ce), {
37
+ key: 1,
38
+ to: e.route,
39
+ class: "hover:text-brand hover:underline text-primary text-sm font-medium"
40
+ }, {
41
+ default: z(() => [E(F(e.text), 1)]),
42
+ _: 2
43
+ }, 1032, ["to"])) : C("", !0)], 64))), 128)), t.activity.changes.length > 0 ? (M(), S(L(xe), {
44
+ key: 0,
45
+ "class-config": {
46
+ arrow: "bg-primary border-primary",
47
+ innerContent: "max-w-80 bg-primary border-primary p-lg"
48
+ }
49
+ }, {
50
+ trigger: z(() => [D(L(V), {
51
+ icon: "infoCircle",
52
+ class: "text-tertiary size-3"
53
+ })]),
54
+ content: z(() => [D(g, { cols: 1 }, {
55
+ default: z(() => [(M(!0), w(se, null, fe(t.activity.changes, (e) => (M(), w("div", {
56
+ key: JSON.stringify(e),
57
+ class: "gap-sm flex flex-col"
58
+ }, [T("div", Ae, [
59
+ T("p", je, F(e.key) + ": ", 1),
60
+ e.oldValue === null ? C("", !0) : (M(), S(L(he), {
61
+ key: 0,
62
+ "class-config": { root: "rounded-sm border-none whitespace-pre-wrap" },
63
+ size: "sm",
64
+ variant: "translucent",
65
+ color: "error"
66
+ }, {
67
+ default: z(() => [E(F(e.oldValue), 1)]),
68
+ _: 2
69
+ }, 1024)),
70
+ e.oldValue !== null && e.value !== null ? (M(), S(L(V), {
71
+ key: 1,
72
+ class: "size-3",
73
+ icon: "arrowRight"
74
+ })) : C("", !0),
75
+ D(L(he), {
76
+ "class-config": { root: "rounded-sm border-none whitespace-pre-wrap" },
77
+ size: "sm",
78
+ variant: "translucent",
79
+ color: "success"
80
+ }, {
81
+ default: z(() => [E(F(e.value), 1)]),
82
+ _: 2
83
+ }, 1024)
84
+ ])]))), 128))]),
85
+ _: 1
86
+ })]),
87
+ _: 1
88
+ })) : C("", !0)]));
89
+ }
90
+ }), Ne = { class: "flex flex-col items-center justify-center" }, Pe = { class: "bg-tertiary p-md flex items-center justify-center rounded-md" }, Fe = {
91
+ key: 0,
92
+ class: "my-md bg-tertiary h-8 w-0.5 rounded-full"
93
+ }, Ie = { class: "text-quaternary text-xs" }, Le = { class: "text-quaternary text-xs" }, Re = /* @__PURE__ */ O({
94
+ __name: "ActivityListItem",
95
+ props: {
96
+ isLast: { type: Boolean },
97
+ activity: {}
98
+ },
99
+ setup(e) {
100
+ let t = e;
101
+ function n(e) {
102
+ return re.isToday(e) ? ne().fromNow(e.toInstant()) : ne().toDate(e.toPlainDate());
103
+ }
104
+ return (e, r) => (M(), S(y, {
105
+ gap: "lg",
106
+ align: "start"
107
+ }, {
108
+ default: z(() => [T("div", Ne, [T("div", Pe, [D(L(V), {
109
+ icon: "infoCircle",
110
+ class: "text-quaternary size-3"
111
+ })]), t.isLast ? C("", !0) : (M(), w("div", Fe))]), T("div", null, [D(Me, { activity: t.activity }, null, 8, ["activity"]), D(y, null, {
112
+ default: z(() => [
113
+ T("p", Ie, F(n(t.activity.createdAt)), 1),
114
+ r[0] ||= T("div", { class: "bg-quaternary size-1 rounded-full" }, null, -1),
115
+ T("p", Le, F(t.activity.changedBy), 1)
116
+ ]),
117
+ _: 1
118
+ })])]),
119
+ _: 1
120
+ }));
121
+ }
122
+ }), ze = /* @__PURE__ */ O({
123
+ __name: "ActivityList",
124
+ props: {
125
+ isLoading: { type: Boolean },
126
+ activities: {},
127
+ onNext: { type: Function }
128
+ },
129
+ setup(e) {
130
+ let t = e, n = B(), r = x(() => !t.isLoading && t.activities.length === 0);
131
+ async function i() {
132
+ await t.onNext();
133
+ }
134
+ return (t, a) => (M(), S(_, {
135
+ "on-next": i,
136
+ class: "h-full"
137
+ }, {
138
+ default: z(() => [D(y, {
139
+ direction: "col",
140
+ justify: "start",
141
+ align: "start",
142
+ gap: "none"
143
+ }, {
144
+ default: z(() => [(M(!0), w(se, null, fe(e.activities, (t, n) => (M(), S(Re, {
145
+ key: JSON.stringify(t),
146
+ "is-last": n === e.activities.length - 1,
147
+ activity: t
148
+ }, null, 8, ["is-last", "activity"]))), 128))]),
149
+ _: 1
150
+ }), r.value ? (M(), S(p, {
151
+ key: 0,
152
+ title: L(n).t("wise_crm.info_dialog.activity.empty_state.title"),
153
+ description: L(n).t("wise_crm.info_dialog.activity.empty_state.description"),
154
+ icon: "activity"
155
+ }, null, 8, ["title", "description"])) : C("", !0)]),
156
+ _: 1
157
+ }));
158
+ }
159
+ }), Be = class {
160
+ static format(e) {
161
+ return `${e.street} ${e.streetNumber}, ${e.postalCode} ${e.city}, ${e.country}`;
162
+ }
163
+ static formatShort(e) {
164
+ return `${e.street} ${e.streetNumber}, ${e.postalCode} ${e.city}`;
165
+ }
166
+ }, Ve = { class: "col-span-2 flex flex-col items-center" }, He = /* @__PURE__ */ O({
167
+ __name: "ContactPersonCreateExisitngForm",
168
+ props: { form: {} },
169
+ emits: ["createNewContactPerson"],
170
+ setup(r, { emit: s }) {
171
+ let c = r, u = s, d = B(), f = a(), p = c.form.register("position"), m = c.form.register("email"), _ = c.form.register("phone"), v = c.form.register("mobile"), ee = c.form.register("existingContactPerson");
172
+ function y() {
173
+ u("createNewContactPerson");
174
+ }
175
+ async function ne(e) {
176
+ if (e !== null) try {
177
+ let t = await te.getByUuid(e.value);
178
+ m.setValue(t.email), _.setValue(t.phone), v.setValue(t.mobilePhone);
179
+ } catch (e) {
180
+ f.show(e);
181
+ }
182
+ }
183
+ return (r, a) => (M(), S(t, {
184
+ "can-exit-when-dirty": !0,
185
+ form: c.form,
186
+ class: "flex h-full flex-1 flex-col justify-between"
187
+ }, {
188
+ default: z(() => [D(g, { cols: 2 }, {
189
+ default: z(() => [
190
+ T("div", Ve, [D(o, le(L(i)(L(ee)), {
191
+ label: L(d).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
192
+ "onUpdate:modelValue": ne,
193
+ onCreateNew: y
194
+ }), null, 16, ["label"]), D(h, {
195
+ class: "text-placeholder mt-sm text-xs underline",
196
+ onClick: y
197
+ }, {
198
+ default: z(() => [E(F(L(d).t("wise_crm.contact.create_dialog.form.create_new_contact_person")), 1)]),
199
+ _: 1
200
+ })]),
201
+ D(L(be), le(L(i)(L(p)), {
202
+ label: L(d).t("wise_crm.contact.create_dialog.form.fields.position"),
203
+ placeholder: L(d).t("wise_crm.contact.create_dialog.form.fields.position"),
204
+ class: "col-span-2"
205
+ }), null, 16, ["label", "placeholder"]),
206
+ D(l, {
207
+ email: L(m),
208
+ "mobile-phone": L(v),
209
+ phone: L(_)
210
+ }, null, 8, [
211
+ "email",
212
+ "mobile-phone",
213
+ "phone"
214
+ ])
215
+ ]),
216
+ _: 1
217
+ }), D(e, null, {
218
+ default: z(() => [D(n, {
219
+ "is-loading": c.form.isSubmitting.value,
220
+ label: L(d).t("wise_crm.shared.add"),
221
+ class: "col-span-2"
222
+ }, null, 8, ["is-loading", "label"])]),
223
+ _: 1
224
+ })]),
225
+ _: 1
226
+ }, 8, ["form"]));
227
+ }
228
+ }), Ue = /* @__PURE__ */ O({
229
+ __name: "ContactPersonCreateNewForm",
230
+ props: { form: {} },
231
+ setup(e) {
232
+ let n = e, r = B(), a = n.form.register("firstName"), o = n.form.register("lastName"), s = n.form.register("email"), u = n.form.register("mobilePhone"), d = n.form.register("position"), f = n.form.register("phone");
233
+ return (e, p) => (M(), S(t, {
234
+ "can-exit-when-dirty": !0,
235
+ form: n.form,
236
+ class: "flex h-full flex-col justify-between"
237
+ }, {
238
+ default: z(() => [D(g, { cols: 2 }, {
239
+ default: z(() => [
240
+ D(c, {
241
+ "first-name": L(a),
242
+ "last-name": L(o)
243
+ }, null, 8, ["first-name", "last-name"]),
244
+ D(L(be), le(L(i)(L(d)), {
245
+ label: L(r).t("wise_crm.contact.create_dialog.form.fields.position"),
246
+ placeholder: L(r).t("wise_crm.contact.create_dialog.form.fields.position"),
247
+ class: "col-span-2"
248
+ }), null, 16, ["label", "placeholder"]),
249
+ D(l, {
250
+ email: L(s),
251
+ "mobile-phone": L(u),
252
+ phone: L(f)
253
+ }, null, 8, [
254
+ "email",
255
+ "mobile-phone",
256
+ "phone"
257
+ ]),
258
+ D(ee, { form: n.form }, null, 8, ["form"])
259
+ ]),
260
+ _: 1
261
+ }), pe(e.$slots, "actions")]),
262
+ _: 3
263
+ }, 8, ["form"]));
264
+ }
265
+ }), We = ae.object({
266
+ email: ae.literal("").or(ae.email()).nullable(),
267
+ existingContactPerson: v,
268
+ mobile: u.nullable(),
269
+ phone: u.nullable(),
270
+ position: ae.string()
271
+ }), Ge = b.object({
272
+ email: b.literal("").or(b.email()).nullable(),
273
+ firstName: b.string().min(1),
274
+ lastName: b.string().min(1),
275
+ mobilePhone: u.nullable(),
276
+ phone: u.nullable(),
277
+ position: b.string().min(1).nullable()
278
+ }).superRefine((e, t) => {
279
+ e.email !== null && e.email !== "" || e.mobilePhone !== null && e.mobilePhone !== "" || e.phone !== null && e.phone !== "" || t.addIssue({
280
+ code: b.ZodIssueCode.custom,
281
+ message: r.global.t("wise_crm.form.errors.at_least_one")
282
+ });
283
+ }), Ke = /* @__PURE__ */ O({
284
+ __name: "ContactPersonCreateForm",
285
+ props: {
286
+ isCreatingNewContactPerson: {
287
+ type: Boolean,
288
+ default: !1
289
+ },
290
+ onLinkContactPerson: {},
291
+ onSubmit: {}
292
+ },
293
+ setup(t) {
294
+ let r = t, i = B(), a = P(r.isCreatingNewContactPerson), o = Te({
295
+ schema: Ge,
296
+ onSubmit: async (e) => {
297
+ await r.onSubmit(e);
298
+ }
299
+ }), s = Te({
300
+ schema: We,
301
+ onSubmit: async (e) => {
302
+ await c(e.existingContactPerson.value, {
303
+ email: e.email,
304
+ mobilePhone: e.mobile,
305
+ phone: e.phone
306
+ }, e.position);
307
+ }
308
+ });
309
+ async function c(e, t, n) {
310
+ e !== null && await r.onLinkContactPerson(e, t, n);
311
+ }
312
+ function l() {
313
+ a.value = !0;
314
+ }
315
+ function u() {
316
+ a.value = !1;
317
+ }
318
+ return (t, r) => (M(), S(L(Ee), {
319
+ key: a.value ? "new" : "existing",
320
+ initial: { opacity: 0 },
321
+ animate: { opacity: 1 },
322
+ exit: { opacity: 0 },
323
+ transition: { duration: .2 }
324
+ }, {
325
+ default: z(() => [a.value ? (M(), S(Ue, {
326
+ key: 0,
327
+ form: L(o)
328
+ }, {
329
+ actions: z(() => [D(y, { justify: "end" }, {
330
+ default: z(() => [D(e, null, {
331
+ default: z(() => [D(L(ge), {
332
+ size: "lg",
333
+ variant: "secondary",
334
+ onClick: u
335
+ }, {
336
+ default: z(() => [E(F(L(i).t("wise_crm.contact.create_dialog.form.back")), 1)]),
337
+ _: 1
338
+ }), D(n, {
339
+ "is-loading": L(o).isSubmitting.value,
340
+ label: L(i).t("wise_crm.shared.create")
341
+ }, null, 8, ["is-loading", "label"])]),
342
+ _: 1
343
+ })]),
344
+ _: 1
345
+ })]),
346
+ _: 1
347
+ }, 8, ["form"])) : (M(), S(He, {
348
+ key: 1,
349
+ form: L(s),
350
+ onCreateNewContactPerson: l
351
+ }, null, 8, ["form"]))]),
352
+ _: 1
353
+ }));
354
+ }
355
+ }), qe = b.object({
356
+ email: b.literal("").or(b.email()).nullable(),
357
+ firstName: b.string().min(1),
358
+ lastName: b.string().min(1),
359
+ mobilePhone: u.nullable(),
360
+ phone: u.nullable(),
361
+ position: b.string().nullable()
362
+ }).superRefine((e, t) => {
363
+ e.email !== null && e.email !== "" || e.mobilePhone !== null && e.mobilePhone !== "" || e.phone !== null && e.phone !== "" || t.addIssue({
364
+ code: b.ZodIssueCode.custom,
365
+ message: r.global.t("wise_crm.form.errors.at_least_one")
366
+ });
367
+ });
368
+ //#endregion
369
+ //#region ../../node_modules/.pnpm/vue3-google-map@0.27.1_vue@3.5.32_typescript@5.9.3_/node_modules/vue3-google-map/dist/index.mjs
370
+ (function() {
371
+ try {
372
+ if (typeof document < "u") {
373
+ var e = document.createElement("style");
374
+ e.nonce = document.head.querySelector("meta[property=csp-nonce]")?.content, e.appendChild(document.createTextNode(".mapdiv[data-v-4e398d5a]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-4d4142cf]{display:none}.mapdiv .info-window-wrapper[data-v-4d4142cf]{display:inline-block}.custom-marker-wrapper[data-v-574a274a]{display:none}.mapdiv .custom-marker-wrapper[data-v-574a274a]{display:inline-block}")), document.head.appendChild(e);
375
+ }
376
+ } catch (e) {
377
+ console.error("vite-plugin-css-injected-by-js", e);
378
+ }
379
+ })();
380
+ var Je = Object.defineProperty, Ye = (e, t, n) => t in e ? Je(e, t, {
381
+ enumerable: !0,
382
+ configurable: !0,
383
+ writable: !0,
384
+ value: n
385
+ }) : e[t] = n, Xe = (e, t, n) => (Ye(e, typeof t == "symbol" ? t : t + "", n), n), H = Symbol("map"), U = Symbol("api"), Ze = Symbol("marker"), Qe = Symbol("markerCluster"), $e = Symbol("CustomMarker"), et = Symbol("mapTilesLoaded"), W = [
386
+ "click",
387
+ "dblclick",
388
+ "drag",
389
+ "dragend",
390
+ "dragstart",
391
+ "mousedown",
392
+ "mousemove",
393
+ "mouseout",
394
+ "mouseover",
395
+ "mouseup",
396
+ "rightclick"
397
+ ];
398
+ function tt(e, t) {
399
+ e.src = t;
400
+ }
401
+ var nt = (e) => {
402
+ var t, n, r, i = "The Google Maps JavaScript API", a = "google", o = "importLibrary", s = "__ib__", c = document, l = window, u = l[a] || (l[a] = {}), d = u.maps ||= {}, f = /* @__PURE__ */ new Set(), p = new URLSearchParams(), m = () => t ||= new Promise(async (o, l) => {
403
+ for (r in await (n = c.createElement("script")), p.set("libraries", [...f] + ""), e) p.set(r.replace(/[A-Z]/g, (e) => "_" + e[0].toLowerCase()), e[r]);
404
+ p.set("callback", a + ".maps." + s), tt(n, "https://maps.googleapis.com/maps/api/js?" + p), d[s] = o, n.onerror = () => t = l(Error(i + " could not load.")), n.nonce = c.querySelector("script[nonce]")?.nonce || "", c.head.append(n);
405
+ });
406
+ d[o] ? console.warn(i + " only loads once. Ignoring:", e) : d[o] = (e, ...t) => f.add(e) && m().then(() => d[o](e, ...t));
407
+ }, rt = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, it = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, at = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", ot = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", st = process.env.NODE_ENV === "production" ? () => {} : (e) => {
408
+ console.warn(`[@googlemaps/js-api-loader] ${e}`);
409
+ }, ct = process.env.NODE_ENV === "production" ? () => {} : (e) => {
410
+ console.info(`[@googlemaps/js-api-loader] ${e}`);
411
+ }, lt = !1;
412
+ function ut(e) {
413
+ if (lt) {
414
+ st(rt(e));
415
+ return;
416
+ }
417
+ ft(e), lt = !0;
418
+ }
419
+ async function dt(e) {
420
+ var t;
421
+ if (lt || st(at), !((t = (window == null ? void 0 : window.google)?.maps) != null && t.importLibrary)) throw Error("google.maps.importLibrary is not installed.");
422
+ return await google.maps.importLibrary(e);
423
+ }
424
+ function ft(e) {
425
+ var t;
426
+ let n = !!((t = window.google?.maps) != null && t.importLibrary);
427
+ n ? ct(it(e)) : process.env.NODE_ENV !== "production" && document.querySelector("script[src*=\"maps.googleapis.com/maps/api/js\"]") && st(ot), n || nt(e);
428
+ }
429
+ function pt(e) {
430
+ return class extends e.OverlayView {
431
+ constructor(e) {
432
+ super(), Xe(this, "element"), Xe(this, "opts");
433
+ let { element: t, ...n } = e;
434
+ this.element = t, this.opts = n, this.opts.map && this.setMap(this.opts.map);
435
+ }
436
+ getPosition() {
437
+ return this.opts.position ? this.opts.position instanceof e.LatLng ? this.opts.position : new e.LatLng(this.opts.position) : null;
438
+ }
439
+ getVisible() {
440
+ if (!this.element) return !1;
441
+ let e = this.element;
442
+ return e.style.display !== "none" && e.style.visibility !== "hidden" && (e.style.opacity === "" || Number(e.style.opacity) > .01);
443
+ }
444
+ onAdd() {
445
+ if (!this.element) return;
446
+ let e = this.getPanes();
447
+ e && e.overlayMouseTarget.appendChild(this.element);
448
+ }
449
+ draw() {
450
+ if (!this.element) return;
451
+ let e = this.getProjection()?.fromLatLngToDivPixel(this.getPosition());
452
+ if (e) {
453
+ this.element.style.position = "absolute";
454
+ let t, n;
455
+ switch (this.opts.anchorPoint) {
456
+ case "TOP_CENTER":
457
+ t = "-50%", n = "-100%";
458
+ break;
459
+ case "BOTTOM_CENTER":
460
+ t = "-50%", n = "0";
461
+ break;
462
+ case "LEFT_CENTER":
463
+ t = "-100%", n = "-50%";
464
+ break;
465
+ case "RIGHT_CENTER":
466
+ t = "0", n = "-50%";
467
+ break;
468
+ case "TOP_LEFT":
469
+ t = "-100%", n = "-100%";
470
+ break;
471
+ case "TOP_RIGHT":
472
+ t = "0", n = "-100%";
473
+ break;
474
+ case "BOTTOM_LEFT":
475
+ t = "-100%", n = "0";
476
+ break;
477
+ case "BOTTOM_RIGHT":
478
+ t = "0", n = "0";
479
+ break;
480
+ default: t = "-50%", n = "-50%";
481
+ }
482
+ let r = e.x + (this.opts.offsetX || 0) + "px", i = e.y + (this.opts.offsetY || 0) + "px";
483
+ this.element.style.transform = `translateX(${t}) translateX(${r}) translateY(${n}) translateY(${i})`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
484
+ }
485
+ }
486
+ onRemove() {
487
+ this.element && this.element.remove();
488
+ }
489
+ setOptions(e) {
490
+ let { element: t, ...n } = e;
491
+ this.element = t, this.opts = n, this.draw();
492
+ }
493
+ };
494
+ }
495
+ var mt = !1, ht = [
496
+ "bounds_changed",
497
+ "center_changed",
498
+ "click",
499
+ "contextmenu",
500
+ "dblclick",
501
+ "drag",
502
+ "dragend",
503
+ "dragstart",
504
+ "heading_changed",
505
+ "idle",
506
+ "isfractionalzoomenabled_changed",
507
+ "mapcapabilities_changed",
508
+ "maptypeid_changed",
509
+ "mousemove",
510
+ "mouseout",
511
+ "mouseover",
512
+ "projection_changed",
513
+ "renderingtype_changed",
514
+ "rightclick",
515
+ "tilesloaded",
516
+ "tilt_changed",
517
+ "zoom_changed"
518
+ ], gt = O({
519
+ props: {
520
+ apiPromise: { type: Promise },
521
+ apiKey: {
522
+ type: String,
523
+ default: ""
524
+ },
525
+ version: {
526
+ type: String,
527
+ default: "weekly"
528
+ },
529
+ libraries: {
530
+ type: Array,
531
+ default: () => ["places", "marker"]
532
+ },
533
+ region: {
534
+ type: String,
535
+ required: !1
536
+ },
537
+ language: {
538
+ type: String,
539
+ required: !1
540
+ },
541
+ backgroundColor: {
542
+ type: String,
543
+ required: !1
544
+ },
545
+ center: {
546
+ type: Object,
547
+ default: () => ({
548
+ lat: 0,
549
+ lng: 0
550
+ })
551
+ },
552
+ clickableIcons: {
553
+ type: Boolean,
554
+ required: !1,
555
+ default: void 0
556
+ },
557
+ colorScheme: {
558
+ type: String,
559
+ required: !1
560
+ },
561
+ controlSize: {
562
+ type: Number,
563
+ required: !1
564
+ },
565
+ disableDefaultUi: {
566
+ type: Boolean,
567
+ required: !1,
568
+ default: void 0
569
+ },
570
+ disableDoubleClickZoom: {
571
+ type: Boolean,
572
+ required: !1,
573
+ default: void 0
574
+ },
575
+ draggable: {
576
+ type: Boolean,
577
+ required: !1,
578
+ default: void 0
579
+ },
580
+ draggableCursor: {
581
+ type: String,
582
+ required: !1
583
+ },
584
+ draggingCursor: {
585
+ type: String,
586
+ required: !1
587
+ },
588
+ fullscreenControl: {
589
+ type: Boolean,
590
+ required: !1,
591
+ default: void 0
592
+ },
593
+ fullscreenControlPosition: {
594
+ type: String,
595
+ required: !1
596
+ },
597
+ gestureHandling: {
598
+ type: String,
599
+ required: !1
600
+ },
601
+ heading: {
602
+ type: Number,
603
+ required: !1
604
+ },
605
+ isFractionalZoomEnabled: {
606
+ type: Boolean,
607
+ required: !1,
608
+ default: void 0
609
+ },
610
+ keyboardShortcuts: {
611
+ type: Boolean,
612
+ required: !1,
613
+ default: void 0
614
+ },
615
+ mapTypeControl: {
616
+ type: Boolean,
617
+ required: !1,
618
+ default: void 0
619
+ },
620
+ mapTypeControlOptions: {
621
+ type: Object,
622
+ required: !1
623
+ },
624
+ mapTypeId: {
625
+ type: [Number, String],
626
+ required: !1
627
+ },
628
+ mapId: {
629
+ type: String,
630
+ required: !1
631
+ },
632
+ maxZoom: {
633
+ type: Number,
634
+ required: !1
635
+ },
636
+ minZoom: {
637
+ type: Number,
638
+ required: !1
639
+ },
640
+ noClear: {
641
+ type: Boolean,
642
+ required: !1,
643
+ default: void 0
644
+ },
645
+ panControl: {
646
+ type: Boolean,
647
+ required: !1,
648
+ default: void 0
649
+ },
650
+ panControlPosition: {
651
+ type: String,
652
+ required: !1
653
+ },
654
+ restriction: {
655
+ type: Object,
656
+ required: !1
657
+ },
658
+ rotateControl: {
659
+ type: Boolean,
660
+ required: !1,
661
+ default: void 0
662
+ },
663
+ rotateControlPosition: {
664
+ type: String,
665
+ required: !1
666
+ },
667
+ scaleControl: {
668
+ type: Boolean,
669
+ required: !1,
670
+ default: void 0
671
+ },
672
+ scaleControlStyle: {
673
+ type: Number,
674
+ required: !1
675
+ },
676
+ scrollwheel: {
677
+ type: Boolean,
678
+ required: !1,
679
+ default: void 0
680
+ },
681
+ streetView: {
682
+ type: Object,
683
+ required: !1
684
+ },
685
+ streetViewControl: {
686
+ type: Boolean,
687
+ required: !1,
688
+ default: void 0
689
+ },
690
+ streetViewControlPosition: {
691
+ type: String,
692
+ required: !1
693
+ },
694
+ styles: {
695
+ type: Array,
696
+ required: !1
697
+ },
698
+ tilt: {
699
+ type: Number,
700
+ required: !1
701
+ },
702
+ zoom: {
703
+ type: Number,
704
+ required: !1
705
+ },
706
+ zoomControl: {
707
+ type: Boolean,
708
+ required: !1,
709
+ default: void 0
710
+ },
711
+ zoomControlPosition: {
712
+ type: String,
713
+ required: !1
714
+ },
715
+ cameraControl: {
716
+ type: Boolean,
717
+ required: !1,
718
+ default: void 0
719
+ },
720
+ cameraControlPosition: {
721
+ type: String,
722
+ required: !1
723
+ }
724
+ },
725
+ emits: [...ht],
726
+ setup(e, { emit: t }) {
727
+ let n = P(), r = P(!1), i = P(), a = P(), o = P(!1);
728
+ N(H, i), N(U, a), N(et, o);
729
+ let s = () => {
730
+ let t = { ...e };
731
+ Object.keys(t).forEach((e) => {
732
+ t[e] === void 0 && delete t[e];
733
+ });
734
+ let n = (e) => e ? { position: a.value?.ControlPosition[e] } : {}, r = {
735
+ scaleControlOptions: e.scaleControlStyle ? { style: e.scaleControlStyle } : {},
736
+ panControlOptions: n(e.panControlPosition),
737
+ zoomControlOptions: n(e.zoomControlPosition),
738
+ rotateControlOptions: n(e.rotateControlPosition),
739
+ streetViewControlOptions: n(e.streetViewControlPosition),
740
+ fullscreenControlOptions: n(e.fullscreenControlPosition),
741
+ cameraControlOptions: n(e.cameraControlPosition),
742
+ disableDefaultUI: e.disableDefaultUi
743
+ };
744
+ return {
745
+ ...t,
746
+ ...r
747
+ };
748
+ }, c = R([a, i], ([e, t]) => {
749
+ let n = e, r = t;
750
+ n && r && (n.event.addListenerOnce(r, "tilesloaded", () => {
751
+ o.value = !0;
752
+ }), setTimeout(c, 0));
753
+ }, { immediate: !0 }), l = () => {
754
+ let { apiKey: t, region: n, version: r, language: i, libraries: a } = e;
755
+ ut({
756
+ key: t,
757
+ region: n,
758
+ v: r,
759
+ language: i,
760
+ libraries: a
761
+ });
762
+ }, u = (o) => {
763
+ let c = o ? o.maps : google.maps;
764
+ a.value = A(c), i.value = A(new c.Map(n.value, s()));
765
+ let l = pt(a.value);
766
+ a.value[$e] = l, ht.forEach((e) => {
767
+ var n;
768
+ (n = i.value) == null || n.addListener(e, (n) => t(e, n));
769
+ }), r.value = !0, R([
770
+ () => e.center,
771
+ () => e.zoom,
772
+ ...Object.keys(e).filter((e) => ![
773
+ "apiPromise",
774
+ "apiKey",
775
+ "version",
776
+ "libraries",
777
+ "region",
778
+ "language",
779
+ "center",
780
+ "zoom"
781
+ ].includes(e)).map((t) => I(e, t))
782
+ ], ([e, t], [n, r]) => {
783
+ var a, o, c;
784
+ let { center: l, zoom: u, ...d } = s();
785
+ (a = i.value) == null || a.setOptions(d), t !== void 0 && t !== r && ((o = i.value) == null || o.setZoom(t));
786
+ let f = !n || e.lng !== n.lng || e.lat !== n.lat;
787
+ e && f && ((c = i.value) == null || c.panTo(e));
788
+ });
789
+ };
790
+ return de(() => {
791
+ if (e.apiPromise && e.apiPromise instanceof Promise) e.apiPromise.then(u);
792
+ else {
793
+ mt ||= (l(), !0);
794
+ let t = e.libraries && e.libraries.length > 0 ? e.libraries : ["maps", "marker"];
795
+ Promise.all(t.map((e) => dt(e))).then(() => u());
796
+ }
797
+ }), j(() => {
798
+ var e;
799
+ o.value = !1, i.value && ((e = a.value) == null || e.event.clearInstanceListeners(i.value));
800
+ }), {
801
+ mapRef: n,
802
+ ready: r,
803
+ map: i,
804
+ api: a,
805
+ mapTilesLoaded: o
806
+ };
807
+ }
808
+ }), _t = (e, t) => {
809
+ let n = e.__vccOpts || e;
810
+ for (let [e, r] of t) n[e] = r;
811
+ return n;
812
+ }, vt = {
813
+ ref: "mapRef",
814
+ class: "mapdiv"
815
+ };
816
+ function yt(e, t, n, r, i, a) {
817
+ return M(), w("div", null, [T("div", vt, null, 512), pe(e.$slots, "default", ue(ce({
818
+ ready: e.ready,
819
+ map: e.map,
820
+ api: e.api,
821
+ mapTilesLoaded: e.mapTilesLoaded
822
+ })), void 0, !0)]);
823
+ }
824
+ var bt = /* @__PURE__ */ _t(gt, [["render", yt], ["__scopeId", "data-v-4e398d5a"]]);
825
+ function xt(e) {
826
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
827
+ }
828
+ var St = /* @__PURE__ */ xt(function e(t, n) {
829
+ if (t === n) return !0;
830
+ if (t && n && typeof t == "object" && typeof n == "object") {
831
+ if (t.constructor !== n.constructor) return !1;
832
+ var r, i, a;
833
+ if (Array.isArray(t)) {
834
+ if (r = t.length, r != n.length) return !1;
835
+ for (i = r; i-- !== 0;) if (!e(t[i], n[i])) return !1;
836
+ return !0;
837
+ }
838
+ if (t.constructor === RegExp) return t.source === n.source && t.flags === n.flags;
839
+ if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === n.valueOf();
840
+ if (t.toString !== Object.prototype.toString) return t.toString() === n.toString();
841
+ if (a = Object.keys(t), r = a.length, r !== Object.keys(n).length) return !1;
842
+ for (i = r; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(n, a[i])) return !1;
843
+ for (i = r; i-- !== 0;) {
844
+ var o = a[i];
845
+ if (!e(t[o], n[o])) return !1;
846
+ }
847
+ return !0;
848
+ }
849
+ return t !== t && n !== n;
850
+ }), Ct = "click", wt = "gmp-click", Tt = [
851
+ "drag",
852
+ "dragend",
853
+ "dragstart",
854
+ wt
855
+ ];
856
+ O({
857
+ name: "AdvancedMarker",
858
+ props: {
859
+ options: {
860
+ type: Object,
861
+ required: !0
862
+ },
863
+ pinOptions: {
864
+ type: Object,
865
+ required: !1
866
+ }
867
+ },
868
+ emits: [...Tt, Ct],
869
+ setup(e, { emit: t, expose: n, slots: r }) {
870
+ let i = P(), a = x(() => r.content?.call(r).some((e) => e.type !== oe)), o = I(e, "options"), s = I(e, "pinOptions"), c = P(), l = k(H, P()), u = k(U, P()), d = k(Qe, P()), f = x(() => !!(d.value && u.value && c.value instanceof google.maps.marker.AdvancedMarkerElement));
871
+ return R([
872
+ l,
873
+ o,
874
+ s,
875
+ i
876
+ ], async (e, [n, r, p, m]) => {
877
+ var h, g, _;
878
+ let v = !St(o.value, r) || !St(s.value, p), ee = i.value !== m, te = v || ee || l.value !== n;
879
+ if (!l.value || !u.value || !te || a.value && !i.value) return;
880
+ let { AdvancedMarkerElement: y, PinElement: ne } = u.value.marker;
881
+ if (c.value) {
882
+ let { map: e, content: t, ...n } = o.value;
883
+ Object.assign(c.value, {
884
+ content: a.value ? i.value : s.value ? new ne(s.value) : t,
885
+ ...n
886
+ }), f.value && ((h = d.value) == null || h.removeMarker(c.value), (g = d.value) == null || g.addMarker(c.value));
887
+ } else a.value ? o.value.content = i.value : s.value && (o.value.content = new ne(s.value)), c.value = A(new y(o.value)), f.value ? (_ = d.value) == null || _.addMarker(c.value) : c.value.map = l.value, Tt.forEach((e) => {
888
+ var n;
889
+ (n = c.value) == null || n.addListener(e, (n) => {
890
+ t(e, n), e === wt && t(Ct, n);
891
+ });
892
+ });
893
+ }, {
894
+ immediate: !0,
895
+ flush: "post"
896
+ }), j(() => {
897
+ var e, t;
898
+ c.value && ((e = u.value) == null || e.event.clearInstanceListeners(c.value), f.value ? (t = d.value) == null || t.removeMarker(c.value) : c.value.map = null);
899
+ }), N(Ze, c), n({ marker: c }), {
900
+ hasCustomSlotContent: a,
901
+ markerRef: i
902
+ };
903
+ }
904
+ });
905
+ var Et = (e) => e === "Marker", Dt = (e) => e === $e, G = (e, t, n, r) => {
906
+ let i = P(), a = k(H, P()), o = k(U, P()), s = k(Qe, P()), c = x(() => !!(s.value && o.value && (i.value instanceof o.value.Marker || i.value instanceof o.value[$e])));
907
+ return R([a, n], (l, [u, d]) => {
908
+ var f, p, m;
909
+ let h = !St(n.value, d) || a.value !== u;
910
+ if (!(!a.value || !o.value || !h)) if (i.value) i.value.setOptions(n.value), c.value && ((f = s.value) == null || f.removeMarker(i.value), (p = s.value) == null || p.addMarker(i.value));
911
+ else {
912
+ if (Et(e)) i.value = A(new o.value[e](n.value));
913
+ else if (Dt(e)) {
914
+ let t = n.value;
915
+ t.element && (i.value = A(new o.value[e](t)));
916
+ } else i.value = A(new o.value[e]({
917
+ ...n.value,
918
+ map: a.value
919
+ }));
920
+ i.value && (c.value ? (m = s.value) == null || m.addMarker(i.value) : (Et(e) || Dt(e)) && i.value.setMap(a.value)), t.forEach((e) => {
921
+ var t;
922
+ (t = i.value) == null || t.addListener(e, (t) => r(e, t));
923
+ });
924
+ }
925
+ }, {
926
+ immediate: !0,
927
+ flush: "post"
928
+ }), j(() => {
929
+ var e, t;
930
+ i.value && ((e = o.value) == null || e.event.clearInstanceListeners(i.value), c.value ? (t = s.value) == null || t.removeMarker(i.value) : i.value.setMap(null));
931
+ }), i;
932
+ }, Ot = [
933
+ "animation_changed",
934
+ "click",
935
+ "dblclick",
936
+ "rightclick",
937
+ "dragstart",
938
+ "dragend",
939
+ "drag",
940
+ "mouseover",
941
+ "mousedown",
942
+ "mouseout",
943
+ "mouseup",
944
+ "draggable_changed",
945
+ "clickable_changed",
946
+ "contextmenu",
947
+ "cursor_changed",
948
+ "flat_changed",
949
+ "zindex_changed",
950
+ "icon_changed",
951
+ "position_changed",
952
+ "shape_changed",
953
+ "title_changed",
954
+ "visible_changed"
955
+ ];
956
+ O({
957
+ name: "Marker",
958
+ props: { options: {
959
+ type: Object,
960
+ required: !0
961
+ } },
962
+ emits: [...Ot],
963
+ setup(e, { emit: t, expose: n, slots: r }) {
964
+ let i = G("Marker", Ot, I(e, "options"), t);
965
+ return N(Ze, i), n({ marker: i }), () => r.default?.call(r);
966
+ }
967
+ }), O({
968
+ name: "Polyline",
969
+ props: { options: {
970
+ type: Object,
971
+ required: !0
972
+ } },
973
+ emits: [...W],
974
+ setup(e, { emit: t }) {
975
+ return { polyline: G("Polyline", W, I(e, "options"), t) };
976
+ },
977
+ render: () => null
978
+ }), O({
979
+ name: "Polygon",
980
+ props: { options: {
981
+ type: Object,
982
+ required: !0
983
+ } },
984
+ emits: [...W],
985
+ setup(e, { emit: t }) {
986
+ return { polygon: G("Polygon", W, I(e, "options"), t) };
987
+ },
988
+ render: () => null
989
+ });
990
+ var kt = [...W, "bounds_changed"];
991
+ O({
992
+ name: "Rectangle",
993
+ props: { options: {
994
+ type: Object,
995
+ required: !0
996
+ } },
997
+ emits: [...kt],
998
+ setup(e, { emit: t }) {
999
+ return { rectangle: G("Rectangle", kt, I(e, "options"), t) };
1000
+ },
1001
+ render: () => null
1002
+ });
1003
+ var At = [
1004
+ ...W,
1005
+ "center_changed",
1006
+ "radius_changed"
1007
+ ];
1008
+ O({
1009
+ name: "Circle",
1010
+ props: { options: {
1011
+ type: Object,
1012
+ required: !0
1013
+ } },
1014
+ emits: [...At],
1015
+ setup(e, { emit: t }) {
1016
+ return { circle: G("Circle", At, I(e, "options"), t) };
1017
+ },
1018
+ render: () => null
1019
+ }), O({
1020
+ props: {
1021
+ position: {
1022
+ type: String,
1023
+ required: !0
1024
+ },
1025
+ index: {
1026
+ type: Number,
1027
+ default: 1
1028
+ }
1029
+ },
1030
+ emits: ["content:loaded"],
1031
+ setup(e, { emit: t }) {
1032
+ let n = P(null), r = k(H, P()), i = k(U, P()), a = R([
1033
+ k(et, P(!1)),
1034
+ i,
1035
+ n
1036
+ ], ([n, r, i]) => {
1037
+ r && n && i && (o(e.position), t("content:loaded"), setTimeout(a, 0));
1038
+ }, { immediate: !0 }), o = (t) => {
1039
+ if (r.value && i.value && n.value) {
1040
+ let a = i.value.ControlPosition[t];
1041
+ n.value.index = e.index, r.value.controls[a].push(n.value);
1042
+ }
1043
+ }, s = (e) => {
1044
+ if (r.value && i.value) {
1045
+ let t = null, a = i.value.ControlPosition[e];
1046
+ r.value.controls[a].forEach((e, r) => {
1047
+ e === n.value && (t = r);
1048
+ }), t !== null && r.value.controls[a].removeAt(t);
1049
+ }
1050
+ };
1051
+ return j(() => s(e.position)), R(() => e.position, (e, t) => {
1052
+ s(t), o(e);
1053
+ }), R(() => e.index, (e) => {
1054
+ n.value && (n.value.index = e);
1055
+ }), { controlRef: n };
1056
+ }
1057
+ });
1058
+ function jt(e) {
1059
+ return e instanceof google.maps.marker.AdvancedMarkerElement ? "gmp-click" : "click";
1060
+ }
1061
+ var Mt = [
1062
+ "closeclick",
1063
+ "content_changed",
1064
+ "domready",
1065
+ "position_changed",
1066
+ "visible",
1067
+ "zindex_changed"
1068
+ ];
1069
+ O({
1070
+ inheritAttrs: !1,
1071
+ props: {
1072
+ options: {
1073
+ type: Object,
1074
+ default: () => ({})
1075
+ },
1076
+ modelValue: { type: Boolean }
1077
+ },
1078
+ emits: [...Mt, "update:modelValue"],
1079
+ setup(e, { slots: t, emit: n, expose: r }) {
1080
+ let i = P(), a = P(), o = k(H, P()), s = k(U, P()), c = k(Ze, P()), l, u = e.modelValue, d = x(() => t.default?.call(t).some((e) => e.type !== oe)), f = (e) => {
1081
+ u = e, n("update:modelValue", e);
1082
+ }, p = (e) => {
1083
+ i.value && (i.value.open({
1084
+ map: o.value,
1085
+ anchor: c.value,
1086
+ ...e
1087
+ }), f(!0));
1088
+ }, m = () => {
1089
+ i.value && (i.value.close(), f(!1));
1090
+ };
1091
+ return de(() => {
1092
+ R([o, () => e.options], ([e, t], [r, m]) => {
1093
+ var h;
1094
+ let g = !St(t, m) || o.value !== r;
1095
+ o.value && s.value && g && (i.value ? (i.value.setOptions({
1096
+ ...t,
1097
+ content: d.value ? a.value : t.content
1098
+ }), c.value || p()) : (i.value = A(new s.value.InfoWindow({
1099
+ ...t,
1100
+ content: d.value ? a.value : t.content
1101
+ })), c.value && (l = c.value.addListener(jt(c.value), () => p())), (!c.value || u) && p(), Mt.forEach((e) => {
1102
+ var t;
1103
+ (t = i.value) == null || t.addListener(e, (t) => n(e, t));
1104
+ }), (h = i.value) == null || h.addListener("closeclick", () => f(!1))));
1105
+ }, {
1106
+ immediate: !0,
1107
+ flush: "post"
1108
+ }), R(c, (e, t) => {
1109
+ !i.value || e === t || (l &&= (l.remove(), void 0), e && (l = e.addListener(jt(e), () => p())));
1110
+ }, { flush: "post" }), R(() => e.modelValue, (e) => {
1111
+ e !== u && (e ? p() : m());
1112
+ });
1113
+ }), j(() => {
1114
+ var e;
1115
+ l && l.remove(), i.value && ((e = s.value) == null || e.event.clearInstanceListeners(i.value), m());
1116
+ }), r({
1117
+ infoWindow: i,
1118
+ open: p,
1119
+ close: m
1120
+ }), {
1121
+ infoWindow: i,
1122
+ infoWindowRef: a,
1123
+ hasSlotContent: d,
1124
+ open: p,
1125
+ close: m
1126
+ };
1127
+ }
1128
+ });
1129
+ var Nt = Object.getOwnPropertyNames, Pt = Object.getOwnPropertySymbols, Ft = Object.prototype.hasOwnProperty;
1130
+ function It(e, t) {
1131
+ return function(n, r, i) {
1132
+ return e(n, r, i) && t(n, r, i);
1133
+ };
1134
+ }
1135
+ function Lt(e) {
1136
+ return function(t, n, r) {
1137
+ if (!t || !n || typeof t != "object" || typeof n != "object") return e(t, n, r);
1138
+ var i = r.cache, a = i.get(t), o = i.get(n);
1139
+ if (a && o) return a === n && o === t;
1140
+ i.set(t, n), i.set(n, t);
1141
+ var s = e(t, n, r);
1142
+ return i.delete(t), i.delete(n), s;
1143
+ };
1144
+ }
1145
+ function Rt(e) {
1146
+ return Nt(e).concat(Pt(e));
1147
+ }
1148
+ var zt = Object.hasOwn || function(e, t) {
1149
+ return Ft.call(e, t);
1150
+ };
1151
+ function K(e, t) {
1152
+ return e === t || !e && !t && e !== e && t !== t;
1153
+ }
1154
+ var Bt = "__v", Vt = "__o", Ht = "_owner", Ut = Object.getOwnPropertyDescriptor, Wt = Object.keys;
1155
+ function Gt(e, t, n) {
1156
+ var r = e.length;
1157
+ if (t.length !== r) return !1;
1158
+ for (; r-- > 0;) if (!n.equals(e[r], t[r], r, r, e, t, n)) return !1;
1159
+ return !0;
1160
+ }
1161
+ function Kt(e, t) {
1162
+ return K(e.getTime(), t.getTime());
1163
+ }
1164
+ function qt(e, t) {
1165
+ return e.name === t.name && e.message === t.message && e.cause === t.cause && e.stack === t.stack;
1166
+ }
1167
+ function Jt(e, t) {
1168
+ return e === t;
1169
+ }
1170
+ function Yt(e, t, n) {
1171
+ var r = e.size;
1172
+ if (r !== t.size) return !1;
1173
+ if (!r) return !0;
1174
+ for (var i = Array(r), a = e.entries(), o, s, c = 0; (o = a.next()) && !o.done;) {
1175
+ for (var l = t.entries(), u = !1, d = 0; (s = l.next()) && !s.done;) {
1176
+ if (i[d]) {
1177
+ d++;
1178
+ continue;
1179
+ }
1180
+ var f = o.value, p = s.value;
1181
+ if (n.equals(f[0], p[0], c, d, e, t, n) && n.equals(f[1], p[1], f[0], p[0], e, t, n)) {
1182
+ u = i[d] = !0;
1183
+ break;
1184
+ }
1185
+ d++;
1186
+ }
1187
+ if (!u) return !1;
1188
+ c++;
1189
+ }
1190
+ return !0;
1191
+ }
1192
+ var Xt = K;
1193
+ function Zt(e, t, n) {
1194
+ var r = Wt(e), i = r.length;
1195
+ if (Wt(t).length !== i) return !1;
1196
+ for (; i-- > 0;) if (!an(e, t, n, r[i])) return !1;
1197
+ return !0;
1198
+ }
1199
+ function Qt(e, t, n) {
1200
+ var r = Rt(e), i = r.length;
1201
+ if (Rt(t).length !== i) return !1;
1202
+ for (var a, o, s; i-- > 0;) if (a = r[i], !an(e, t, n, a) || (o = Ut(e, a), s = Ut(t, a), (o || s) && (!o || !s || o.configurable !== s.configurable || o.enumerable !== s.enumerable || o.writable !== s.writable))) return !1;
1203
+ return !0;
1204
+ }
1205
+ function $t(e, t) {
1206
+ return K(e.valueOf(), t.valueOf());
1207
+ }
1208
+ function en(e, t) {
1209
+ return e.source === t.source && e.flags === t.flags;
1210
+ }
1211
+ function tn(e, t, n) {
1212
+ var r = e.size;
1213
+ if (r !== t.size) return !1;
1214
+ if (!r) return !0;
1215
+ for (var i = Array(r), a = e.values(), o, s; (o = a.next()) && !o.done;) {
1216
+ for (var c = t.values(), l = !1, u = 0; (s = c.next()) && !s.done;) {
1217
+ if (!i[u] && n.equals(o.value, s.value, o.value, s.value, e, t, n)) {
1218
+ l = i[u] = !0;
1219
+ break;
1220
+ }
1221
+ u++;
1222
+ }
1223
+ if (!l) return !1;
1224
+ }
1225
+ return !0;
1226
+ }
1227
+ function nn(e, t) {
1228
+ var n = e.length;
1229
+ if (t.length !== n) return !1;
1230
+ for (; n-- > 0;) if (e[n] !== t[n]) return !1;
1231
+ return !0;
1232
+ }
1233
+ function rn(e, t) {
1234
+ return e.hostname === t.hostname && e.pathname === t.pathname && e.protocol === t.protocol && e.port === t.port && e.hash === t.hash && e.username === t.username && e.password === t.password;
1235
+ }
1236
+ function an(e, t, n, r) {
1237
+ return (r === Ht || r === Vt || r === Bt) && (e.$$typeof || t.$$typeof) ? !0 : zt(t, r) && n.equals(e[r], t[r], r, r, e, t, n);
1238
+ }
1239
+ var on = "[object Arguments]", sn = "[object Boolean]", cn = "[object Date]", ln = "[object Error]", un = "[object Map]", dn = "[object Number]", fn = "[object Object]", pn = "[object RegExp]", mn = "[object Set]", hn = "[object String]", gn = "[object URL]", _n = Array.isArray, vn = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, yn = Object.assign, bn = Object.prototype.toString.call.bind(Object.prototype.toString);
1240
+ function xn(e) {
1241
+ var t = e.areArraysEqual, n = e.areDatesEqual, r = e.areErrorsEqual, i = e.areFunctionsEqual, a = e.areMapsEqual, o = e.areNumbersEqual, s = e.areObjectsEqual, c = e.arePrimitiveWrappersEqual, l = e.areRegExpsEqual, u = e.areSetsEqual, d = e.areTypedArraysEqual, f = e.areUrlsEqual;
1242
+ return function(e, p, m) {
1243
+ if (e === p) return !0;
1244
+ if (e == null || p == null) return !1;
1245
+ var h = typeof e;
1246
+ if (h !== typeof p) return !1;
1247
+ if (h !== "object") return h === "number" ? o(e, p, m) : h === "function" ? i(e, p, m) : !1;
1248
+ var g = e.constructor;
1249
+ if (g !== p.constructor) return !1;
1250
+ if (g === Object) return s(e, p, m);
1251
+ if (_n(e)) return t(e, p, m);
1252
+ if (vn != null && vn(e)) return d(e, p, m);
1253
+ if (g === Date) return n(e, p, m);
1254
+ if (g === RegExp) return l(e, p, m);
1255
+ if (g === Map) return a(e, p, m);
1256
+ if (g === Set) return u(e, p, m);
1257
+ var _ = bn(e);
1258
+ return _ === cn ? n(e, p, m) : _ === pn ? l(e, p, m) : _ === un ? a(e, p, m) : _ === mn ? u(e, p, m) : _ === fn ? typeof e.then != "function" && typeof p.then != "function" && s(e, p, m) : _ === gn ? f(e, p, m) : _ === ln ? r(e, p, m) : _ === on ? s(e, p, m) : _ === sn || _ === dn || _ === hn ? c(e, p, m) : !1;
1259
+ };
1260
+ }
1261
+ function Sn(e) {
1262
+ var t = e.circular, n = e.createCustomConfig, r = e.strict, i = {
1263
+ areArraysEqual: r ? Qt : Gt,
1264
+ areDatesEqual: Kt,
1265
+ areErrorsEqual: qt,
1266
+ areFunctionsEqual: Jt,
1267
+ areMapsEqual: r ? It(Yt, Qt) : Yt,
1268
+ areNumbersEqual: Xt,
1269
+ areObjectsEqual: r ? Qt : Zt,
1270
+ arePrimitiveWrappersEqual: $t,
1271
+ areRegExpsEqual: en,
1272
+ areSetsEqual: r ? It(tn, Qt) : tn,
1273
+ areTypedArraysEqual: r ? Qt : nn,
1274
+ areUrlsEqual: rn
1275
+ };
1276
+ if (n && (i = yn({}, i, n(i))), t) {
1277
+ var a = Lt(i.areArraysEqual), o = Lt(i.areMapsEqual), s = Lt(i.areObjectsEqual), c = Lt(i.areSetsEqual);
1278
+ i = yn({}, i, {
1279
+ areArraysEqual: a,
1280
+ areMapsEqual: o,
1281
+ areObjectsEqual: s,
1282
+ areSetsEqual: c
1283
+ });
1284
+ }
1285
+ return i;
1286
+ }
1287
+ function Cn(e) {
1288
+ return function(t, n, r, i, a, o, s) {
1289
+ return e(t, n, s);
1290
+ };
1291
+ }
1292
+ function wn(e) {
1293
+ var t = e.circular, n = e.comparator, r = e.createState, i = e.equals, a = e.strict;
1294
+ if (r) return function(e, o) {
1295
+ var s = r(), c = s.cache, l = c === void 0 ? t ? /* @__PURE__ */ new WeakMap() : void 0 : c, u = s.meta;
1296
+ return n(e, o, {
1297
+ cache: l,
1298
+ equals: i,
1299
+ meta: u,
1300
+ strict: a
1301
+ });
1302
+ };
1303
+ if (t) return function(e, t) {
1304
+ return n(e, t, {
1305
+ cache: /* @__PURE__ */ new WeakMap(),
1306
+ equals: i,
1307
+ meta: void 0,
1308
+ strict: a
1309
+ });
1310
+ };
1311
+ var o = {
1312
+ cache: void 0,
1313
+ equals: i,
1314
+ meta: void 0,
1315
+ strict: a
1316
+ };
1317
+ return function(e, t) {
1318
+ return n(e, t, o);
1319
+ };
1320
+ }
1321
+ var Tn = q();
1322
+ q({ strict: !0 }), q({ circular: !0 }), q({
1323
+ circular: !0,
1324
+ strict: !0
1325
+ }), q({ createInternalComparator: function() {
1326
+ return K;
1327
+ } }), q({
1328
+ strict: !0,
1329
+ createInternalComparator: function() {
1330
+ return K;
1331
+ }
1332
+ }), q({
1333
+ circular: !0,
1334
+ createInternalComparator: function() {
1335
+ return K;
1336
+ }
1337
+ }), q({
1338
+ circular: !0,
1339
+ createInternalComparator: function() {
1340
+ return K;
1341
+ },
1342
+ strict: !0
1343
+ });
1344
+ function q(e) {
1345
+ e === void 0 && (e = {});
1346
+ var t = e.circular, n = t === void 0 ? !1 : t, r = e.createInternalComparator, i = e.createState, a = e.strict, o = a === void 0 ? !1 : a, s = xn(Sn(e));
1347
+ return wn({
1348
+ circular: n,
1349
+ comparator: s,
1350
+ createState: i,
1351
+ equals: r ? r(s) : Cn(s),
1352
+ strict: o
1353
+ });
1354
+ }
1355
+ var En = [
1356
+ Int8Array,
1357
+ Uint8Array,
1358
+ Uint8ClampedArray,
1359
+ Int16Array,
1360
+ Uint16Array,
1361
+ Int32Array,
1362
+ Uint32Array,
1363
+ Float32Array,
1364
+ Float64Array
1365
+ ], Dn = 1, On = 8, kn = class e {
1366
+ static from(t) {
1367
+ if (!(t instanceof ArrayBuffer)) throw Error("Data must be an instance of ArrayBuffer.");
1368
+ let [n, r] = new Uint8Array(t, 0, 2);
1369
+ if (n !== 219) throw Error("Data does not appear to be in a KDBush format.");
1370
+ let i = r >> 4;
1371
+ if (i !== Dn) throw Error(`Got v${i} data when expected v${Dn}.`);
1372
+ let a = En[r & 15];
1373
+ if (!a) throw Error("Unrecognized array type.");
1374
+ let [o] = new Uint16Array(t, 2, 1), [s] = new Uint32Array(t, 4, 1);
1375
+ return new e(s, o, a, t);
1376
+ }
1377
+ constructor(e, t = 64, n = Float64Array, r) {
1378
+ if (isNaN(e) || e < 0) throw Error(`Unpexpected numItems value: ${e}.`);
1379
+ this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = n, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
1380
+ let i = En.indexOf(this.ArrayType), a = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, o = e * this.IndexArrayType.BYTES_PER_ELEMENT, s = (8 - o % 8) % 8;
1381
+ if (i < 0) throw Error(`Unexpected typed array class: ${n}.`);
1382
+ r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, On, e), this.coords = new this.ArrayType(this.data, On + o + s, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(On + a + o + s), this.ids = new this.IndexArrayType(this.data, On, e), this.coords = new this.ArrayType(this.data, On + o + s, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (Dn << 4) + i]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1383
+ }
1384
+ add(e, t) {
1385
+ let n = this._pos >> 1;
1386
+ return this.ids[n] = n, this.coords[this._pos++] = e, this.coords[this._pos++] = t, n;
1387
+ }
1388
+ finish() {
1389
+ let e = this._pos >> 1;
1390
+ if (e !== this.numItems) throw Error(`Added ${e} items when expected ${this.numItems}.`);
1391
+ return An(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1392
+ }
1393
+ range(e, t, n, r) {
1394
+ if (!this._finished) throw Error("Data not yet indexed - call index.finish().");
1395
+ let { ids: i, coords: a, nodeSize: o } = this, s = [
1396
+ 0,
1397
+ i.length - 1,
1398
+ 0
1399
+ ], c = [];
1400
+ for (; s.length;) {
1401
+ let l = s.pop() || 0, u = s.pop() || 0, d = s.pop() || 0;
1402
+ if (u - d <= o) {
1403
+ for (let o = d; o <= u; o++) {
1404
+ let s = a[2 * o], l = a[2 * o + 1];
1405
+ s >= e && s <= n && l >= t && l <= r && c.push(i[o]);
1406
+ }
1407
+ continue;
1408
+ }
1409
+ let f = d + u >> 1, p = a[2 * f], m = a[2 * f + 1];
1410
+ p >= e && p <= n && m >= t && m <= r && c.push(i[f]), (l === 0 ? e <= p : t <= m) && (s.push(d), s.push(f - 1), s.push(1 - l)), (l === 0 ? n >= p : r >= m) && (s.push(f + 1), s.push(u), s.push(1 - l));
1411
+ }
1412
+ return c;
1413
+ }
1414
+ within(e, t, n) {
1415
+ if (!this._finished) throw Error("Data not yet indexed - call index.finish().");
1416
+ let { ids: r, coords: i, nodeSize: a } = this, o = [
1417
+ 0,
1418
+ r.length - 1,
1419
+ 0
1420
+ ], s = [], c = n * n;
1421
+ for (; o.length;) {
1422
+ let l = o.pop() || 0, u = o.pop() || 0, d = o.pop() || 0;
1423
+ if (u - d <= a) {
1424
+ for (let n = d; n <= u; n++) Pn(i[2 * n], i[2 * n + 1], e, t) <= c && s.push(r[n]);
1425
+ continue;
1426
+ }
1427
+ let f = d + u >> 1, p = i[2 * f], m = i[2 * f + 1];
1428
+ Pn(p, m, e, t) <= c && s.push(r[f]), (l === 0 ? e - n <= p : t - n <= m) && (o.push(d), o.push(f - 1), o.push(1 - l)), (l === 0 ? e + n >= p : t + n >= m) && (o.push(f + 1), o.push(u), o.push(1 - l));
1429
+ }
1430
+ return s;
1431
+ }
1432
+ };
1433
+ function An(e, t, n, r, i, a) {
1434
+ if (i - r <= n) return;
1435
+ let o = r + i >> 1;
1436
+ jn(e, t, o, r, i, a), An(e, t, n, r, o - 1, 1 - a), An(e, t, n, o + 1, i, 1 - a);
1437
+ }
1438
+ function jn(e, t, n, r, i, a) {
1439
+ for (; i > r;) {
1440
+ if (i - r > 600) {
1441
+ let o = i - r + 1, s = n - r + 1, c = Math.log(o), l = .5 * Math.exp(2 * c / 3), u = .5 * Math.sqrt(c * l * (o - l) / o) * (s - o / 2 < 0 ? -1 : 1);
1442
+ jn(e, t, n, Math.max(r, Math.floor(n - s * l / o + u)), Math.min(i, Math.floor(n + (o - s) * l / o + u)), a);
1443
+ }
1444
+ let o = t[2 * n + a], s = r, c = i;
1445
+ for (Mn(e, t, r, n), t[2 * i + a] > o && Mn(e, t, r, i); s < c;) {
1446
+ for (Mn(e, t, s, c), s++, c--; t[2 * s + a] < o;) s++;
1447
+ for (; t[2 * c + a] > o;) c--;
1448
+ }
1449
+ t[2 * r + a] === o ? Mn(e, t, r, c) : (c++, Mn(e, t, c, i)), c <= n && (r = c + 1), n <= c && (i = c - 1);
1450
+ }
1451
+ }
1452
+ function Mn(e, t, n, r) {
1453
+ Nn(e, n, r), Nn(t, 2 * n, 2 * r), Nn(t, 2 * n + 1, 2 * r + 1);
1454
+ }
1455
+ function Nn(e, t, n) {
1456
+ let r = e[t];
1457
+ e[t] = e[n], e[n] = r;
1458
+ }
1459
+ function Pn(e, t, n, r) {
1460
+ let i = e - n, a = t - r;
1461
+ return i * i + a * a;
1462
+ }
1463
+ var Fn = {
1464
+ minZoom: 0,
1465
+ maxZoom: 16,
1466
+ minPoints: 2,
1467
+ radius: 40,
1468
+ extent: 512,
1469
+ nodeSize: 64,
1470
+ log: !1,
1471
+ generateId: !1,
1472
+ reduce: null,
1473
+ map: (e) => e
1474
+ }, In = Math.fround || ((e) => (t) => (e[0] = +t, e[0]))(new Float32Array(1)), J = 2, Y = 3, Ln = 4, X = 5, Rn = 6, zn = class {
1475
+ constructor(e) {
1476
+ this.options = Object.assign(Object.create(Fn), e), this.trees = Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1477
+ }
1478
+ load(e) {
1479
+ let { log: t, minZoom: n, maxZoom: r } = this.options;
1480
+ t && console.time("total time");
1481
+ let i = `prepare ${e.length} points`;
1482
+ t && console.time(i), this.points = e;
1483
+ let a = [];
1484
+ for (let t = 0; t < e.length; t++) {
1485
+ let n = e[t];
1486
+ if (!n.geometry) continue;
1487
+ let [r, i] = n.geometry.coordinates, o = In(Hn(r)), s = In(Un(i));
1488
+ a.push(o, s, Infinity, t, -1, 1), this.options.reduce && a.push(0);
1489
+ }
1490
+ let o = this.trees[r + 1] = this._createTree(a);
1491
+ t && console.timeEnd(i);
1492
+ for (let e = r; e >= n; e--) {
1493
+ let n = +Date.now();
1494
+ o = this.trees[e] = this._createTree(this._cluster(o, e)), t && console.log("z%d: %d clusters in %dms", e, o.numItems, +Date.now() - n);
1495
+ }
1496
+ return t && console.timeEnd("total time"), this;
1497
+ }
1498
+ getClusters(e, t) {
1499
+ let n = ((e[0] + 180) % 360 + 360) % 360 - 180, r = Math.max(-90, Math.min(90, e[1])), i = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180, a = Math.max(-90, Math.min(90, e[3]));
1500
+ if (e[2] - e[0] >= 360) n = -180, i = 180;
1501
+ else if (n > i) {
1502
+ let e = this.getClusters([
1503
+ n,
1504
+ r,
1505
+ 180,
1506
+ a
1507
+ ], t), o = this.getClusters([
1508
+ -180,
1509
+ r,
1510
+ i,
1511
+ a
1512
+ ], t);
1513
+ return e.concat(o);
1514
+ }
1515
+ let o = this.trees[this._limitZoom(t)], s = o.range(Hn(n), Un(a), Hn(i), Un(r)), c = o.data, l = [];
1516
+ for (let e of s) {
1517
+ let t = this.stride * e;
1518
+ l.push(c[t + X] > 1 ? Bn(c, t, this.clusterProps) : this.points[c[t + Y]]);
1519
+ }
1520
+ return l;
1521
+ }
1522
+ getChildren(e) {
1523
+ let t = this._getOriginId(e), n = this._getOriginZoom(e), r = "No cluster with the specified id.", i = this.trees[n];
1524
+ if (!i) throw Error(r);
1525
+ let a = i.data;
1526
+ if (t * this.stride >= a.length) throw Error(r);
1527
+ let o = this.options.radius / (this.options.extent * 2 ** (n - 1)), s = a[t * this.stride], c = a[t * this.stride + 1], l = i.within(s, c, o), u = [];
1528
+ for (let t of l) {
1529
+ let n = t * this.stride;
1530
+ a[n + Ln] === e && u.push(a[n + X] > 1 ? Bn(a, n, this.clusterProps) : this.points[a[n + Y]]);
1531
+ }
1532
+ if (u.length === 0) throw Error(r);
1533
+ return u;
1534
+ }
1535
+ getLeaves(e, t, n) {
1536
+ t ||= 10, n ||= 0;
1537
+ let r = [];
1538
+ return this._appendLeaves(r, e, t, n, 0), r;
1539
+ }
1540
+ getTile(e, t, n) {
1541
+ let r = this.trees[this._limitZoom(e)], i = 2 ** e, { extent: a, radius: o } = this.options, s = o / a, c = (n - s) / i, l = (n + 1 + s) / i, u = { features: [] };
1542
+ return this._addTileFeatures(r.range((t - s) / i, c, (t + 1 + s) / i, l), r.data, t, n, i, u), t === 0 && this._addTileFeatures(r.range(1 - s / i, c, 1, l), r.data, i, n, i, u), t === i - 1 && this._addTileFeatures(r.range(0, c, s / i, l), r.data, -1, n, i, u), u.features.length ? u : null;
1543
+ }
1544
+ getClusterExpansionZoom(e) {
1545
+ let t = this._getOriginZoom(e) - 1;
1546
+ for (; t <= this.options.maxZoom;) {
1547
+ let n = this.getChildren(e);
1548
+ if (t++, n.length !== 1) break;
1549
+ e = n[0].properties.cluster_id;
1550
+ }
1551
+ return t;
1552
+ }
1553
+ _appendLeaves(e, t, n, r, i) {
1554
+ let a = this.getChildren(t);
1555
+ for (let t of a) {
1556
+ let a = t.properties;
1557
+ if (a && a.cluster ? i + a.point_count <= r ? i += a.point_count : i = this._appendLeaves(e, a.cluster_id, n, r, i) : i < r ? i++ : e.push(t), e.length === n) break;
1558
+ }
1559
+ return i;
1560
+ }
1561
+ _createTree(e) {
1562
+ let t = new kn(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1563
+ for (let n = 0; n < e.length; n += this.stride) t.add(e[n], e[n + 1]);
1564
+ return t.finish(), t.data = e, t;
1565
+ }
1566
+ _addTileFeatures(e, t, n, r, i, a) {
1567
+ for (let o of e) {
1568
+ let e = o * this.stride, s = t[e + X] > 1, c, l, u;
1569
+ if (s) c = Vn(t, e, this.clusterProps), l = t[e], u = t[e + 1];
1570
+ else {
1571
+ let n = this.points[t[e + Y]];
1572
+ c = n.properties;
1573
+ let [r, i] = n.geometry.coordinates;
1574
+ l = Hn(r), u = Un(i);
1575
+ }
1576
+ let d = {
1577
+ type: 1,
1578
+ geometry: [[Math.round(this.options.extent * (l * i - n)), Math.round(this.options.extent * (u * i - r))]],
1579
+ tags: c
1580
+ }, f;
1581
+ f = s || this.options.generateId ? t[e + Y] : this.points[t[e + Y]].id, f !== void 0 && (d.id = f), a.features.push(d);
1582
+ }
1583
+ }
1584
+ _limitZoom(e) {
1585
+ return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1586
+ }
1587
+ _cluster(e, t) {
1588
+ let { radius: n, extent: r, reduce: i, minPoints: a } = this.options, o = n / (r * 2 ** t), s = e.data, c = [], l = this.stride;
1589
+ for (let n = 0; n < s.length; n += l) {
1590
+ if (s[n + J] <= t) continue;
1591
+ s[n + J] = t;
1592
+ let r = s[n], u = s[n + 1], d = e.within(s[n], s[n + 1], o), f = s[n + X], p = f;
1593
+ for (let e of d) {
1594
+ let n = e * l;
1595
+ s[n + J] > t && (p += s[n + X]);
1596
+ }
1597
+ if (p > f && p >= a) {
1598
+ let e = r * f, a = u * f, o, m = -1, h = ((n / l | 0) << 5) + (t + 1) + this.points.length;
1599
+ for (let r of d) {
1600
+ let c = r * l;
1601
+ if (s[c + J] <= t) continue;
1602
+ s[c + J] = t;
1603
+ let u = s[c + X];
1604
+ e += s[c] * u, a += s[c + 1] * u, s[c + Ln] = h, i && (o || (o = this._map(s, n, !0), m = this.clusterProps.length, this.clusterProps.push(o)), i(o, this._map(s, c)));
1605
+ }
1606
+ s[n + Ln] = h, c.push(e / p, a / p, Infinity, h, -1, p), i && c.push(m);
1607
+ } else {
1608
+ for (let e = 0; e < l; e++) c.push(s[n + e]);
1609
+ if (p > 1) for (let e of d) {
1610
+ let n = e * l;
1611
+ if (!(s[n + J] <= t)) {
1612
+ s[n + J] = t;
1613
+ for (let e = 0; e < l; e++) c.push(s[n + e]);
1614
+ }
1615
+ }
1616
+ }
1617
+ }
1618
+ return c;
1619
+ }
1620
+ _getOriginId(e) {
1621
+ return e - this.points.length >> 5;
1622
+ }
1623
+ _getOriginZoom(e) {
1624
+ return (e - this.points.length) % 32;
1625
+ }
1626
+ _map(e, t, n) {
1627
+ if (e[t + X] > 1) {
1628
+ let r = this.clusterProps[e[t + Rn]];
1629
+ return n ? Object.assign({}, r) : r;
1630
+ }
1631
+ let r = this.points[e[t + Y]].properties, i = this.options.map(r);
1632
+ return n && i === r ? Object.assign({}, i) : i;
1633
+ }
1634
+ };
1635
+ function Bn(e, t, n) {
1636
+ return {
1637
+ type: "Feature",
1638
+ id: e[t + Y],
1639
+ properties: Vn(e, t, n),
1640
+ geometry: {
1641
+ type: "Point",
1642
+ coordinates: [Wn(e[t]), Gn(e[t + 1])]
1643
+ }
1644
+ };
1645
+ }
1646
+ function Vn(e, t, n) {
1647
+ let r = e[t + X], i = r >= 1e4 ? `${Math.round(r / 1e3)}k` : r >= 1e3 ? `${Math.round(r / 100) / 10}k` : r, a = e[t + Rn], o = a === -1 ? {} : Object.assign({}, n[a]);
1648
+ return Object.assign(o, {
1649
+ cluster: !0,
1650
+ cluster_id: e[t + Y],
1651
+ point_count: r,
1652
+ point_count_abbreviated: i
1653
+ });
1654
+ }
1655
+ function Hn(e) {
1656
+ return e / 360 + .5;
1657
+ }
1658
+ function Un(e) {
1659
+ let t = Math.sin(e * Math.PI / 180), n = .5 - .25 * Math.log((1 + t) / (1 - t)) / Math.PI;
1660
+ return n < 0 ? 0 : n > 1 ? 1 : n;
1661
+ }
1662
+ function Wn(e) {
1663
+ return (e - .5) * 360;
1664
+ }
1665
+ function Gn(e) {
1666
+ let t = (180 - e * 360) * Math.PI / 180;
1667
+ return 360 * Math.atan(Math.exp(t)) / Math.PI - 90;
1668
+ }
1669
+ function Kn(e, t) {
1670
+ var n = {};
1671
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1672
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
1673
+ return n;
1674
+ }
1675
+ var Z = class {
1676
+ static isAdvancedMarkerAvailable(e) {
1677
+ return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
1678
+ }
1679
+ static isAdvancedMarker(e) {
1680
+ return google.maps.marker && e instanceof google.maps.marker.AdvancedMarkerElement;
1681
+ }
1682
+ static setMap(e, t) {
1683
+ this.isAdvancedMarker(e) ? e.map = t : e.setMap(t);
1684
+ }
1685
+ static getPosition(e) {
1686
+ if (this.isAdvancedMarker(e)) {
1687
+ if (e.position) {
1688
+ if (e.position instanceof google.maps.LatLng) return e.position;
1689
+ if (Number.isFinite(e.position.lat) && Number.isFinite(e.position.lng)) return new google.maps.LatLng(e.position.lat, e.position.lng);
1690
+ }
1691
+ return new google.maps.LatLng(null);
1692
+ }
1693
+ return e.getPosition();
1694
+ }
1695
+ static getVisible(e) {
1696
+ return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1697
+ }
1698
+ }, qn = class {
1699
+ constructor({ markers: e, position: t }) {
1700
+ this.markers = [], e && (this.markers = e), t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1701
+ }
1702
+ get bounds() {
1703
+ if (this.markers.length === 0 && !this._position) return;
1704
+ let e = new google.maps.LatLngBounds(this._position, this._position);
1705
+ for (let t of this.markers) e.extend(Z.getPosition(t));
1706
+ return e;
1707
+ }
1708
+ get position() {
1709
+ return this._position || this.bounds.getCenter();
1710
+ }
1711
+ get count() {
1712
+ return this.markers.filter((e) => Z.getVisible(e)).length;
1713
+ }
1714
+ push(e) {
1715
+ this.markers.push(e);
1716
+ }
1717
+ delete() {
1718
+ this.marker &&= (Z.setMap(this.marker, null), void 0), this.markers.length = 0;
1719
+ }
1720
+ };
1721
+ function Q(e, t = "assertion failed") {
1722
+ if (e == null) throw Error(t);
1723
+ }
1724
+ var Jn = (e, t, n, r) => {
1725
+ let i = e.getBounds();
1726
+ Q(i);
1727
+ let a = Yn(i, t, r);
1728
+ return n.filter((e) => a.contains(Z.getPosition(e)));
1729
+ }, Yn = (e, t, n) => {
1730
+ let { northEast: r, southWest: i } = Zn(e, t);
1731
+ return $n(Qn({
1732
+ northEast: r,
1733
+ southWest: i
1734
+ }, n), t);
1735
+ }, Xn = (e, t, n) => {
1736
+ let r = Yn(e, t, n), i = r.getNorthEast(), a = r.getSouthWest();
1737
+ return [
1738
+ a.lng(),
1739
+ a.lat(),
1740
+ i.lng(),
1741
+ i.lat()
1742
+ ];
1743
+ }, Zn = (e, t) => {
1744
+ let n = t.fromLatLngToDivPixel(e.getNorthEast()), r = t.fromLatLngToDivPixel(e.getSouthWest());
1745
+ return Q(n), Q(r), {
1746
+ northEast: n,
1747
+ southWest: r
1748
+ };
1749
+ }, Qn = ({ northEast: e, southWest: t }, n) => (e.x += n, e.y -= n, t.x -= n, t.y += n, {
1750
+ northEast: e,
1751
+ southWest: t
1752
+ }), $n = ({ northEast: e, southWest: t }, n) => {
1753
+ let r = n.fromDivPixelToLatLng(t), i = n.fromDivPixelToLatLng(e);
1754
+ return new google.maps.LatLngBounds(r, i);
1755
+ }, er = class {
1756
+ constructor({ maxZoom: e = 16 }) {
1757
+ this.maxZoom = e;
1758
+ }
1759
+ noop({ markers: e }) {
1760
+ return nr(e);
1761
+ }
1762
+ }, tr = class extends er {
1763
+ constructor(e) {
1764
+ var { viewportPadding: t = 60 } = e, n = Kn(e, ["viewportPadding"]);
1765
+ super(n), this.viewportPadding = 60, this.viewportPadding = t;
1766
+ }
1767
+ calculate({ markers: e, map: t, mapCanvasProjection: n }) {
1768
+ let r = t.getZoom();
1769
+ return Q(r), r >= this.maxZoom ? {
1770
+ clusters: this.noop({ markers: e }),
1771
+ changed: !1
1772
+ } : { clusters: this.cluster({
1773
+ markers: Jn(t, n, e, this.viewportPadding),
1774
+ map: t,
1775
+ mapCanvasProjection: n
1776
+ }) };
1777
+ }
1778
+ }, nr = (e) => e.map((e) => new qn({
1779
+ position: Z.getPosition(e),
1780
+ markers: [e]
1781
+ })), rr = class extends er {
1782
+ constructor(e) {
1783
+ var { maxZoom: t, radius: n = 60 } = e, r = Kn(e, ["maxZoom", "radius"]);
1784
+ super({ maxZoom: t }), this.markers = [], this.clusters = [], this.state = { zoom: -1 }, this.superCluster = new zn(Object.assign({
1785
+ maxZoom: this.maxZoom,
1786
+ radius: n
1787
+ }, r));
1788
+ }
1789
+ calculate(e) {
1790
+ let t = !1, n = e.map.getZoom();
1791
+ Q(n), n = Math.round(n);
1792
+ let r = { zoom: n };
1793
+ if (!Tn(e.markers, this.markers)) {
1794
+ t = !0, this.markers = [...e.markers];
1795
+ let n = this.markers.map((e) => {
1796
+ let t = Z.getPosition(e);
1797
+ return {
1798
+ type: "Feature",
1799
+ geometry: {
1800
+ type: "Point",
1801
+ coordinates: [t.lng(), t.lat()]
1802
+ },
1803
+ properties: { marker: e }
1804
+ };
1805
+ });
1806
+ this.superCluster.load(n);
1807
+ }
1808
+ return t || (this.state.zoom <= this.maxZoom || r.zoom <= this.maxZoom) && (t = !Tn(this.state, r)), this.state = r, e.markers.length === 0 ? (this.clusters = [], {
1809
+ clusters: this.clusters,
1810
+ changed: t
1811
+ }) : (t && (this.clusters = this.cluster(e)), {
1812
+ clusters: this.clusters,
1813
+ changed: t
1814
+ });
1815
+ }
1816
+ cluster({ map: e }) {
1817
+ let t = e.getZoom();
1818
+ return Q(t), this.superCluster.getClusters([
1819
+ -180,
1820
+ -90,
1821
+ 180,
1822
+ 90
1823
+ ], Math.round(t)).map((e) => this.transformCluster(e));
1824
+ }
1825
+ transformCluster({ geometry: { coordinates: [e, t] }, properties: n }) {
1826
+ if (n.cluster) return new qn({
1827
+ markers: this.superCluster.getLeaves(n.cluster_id, Infinity).map((e) => e.properties.marker),
1828
+ position: {
1829
+ lat: t,
1830
+ lng: e
1831
+ }
1832
+ });
1833
+ let r = n.marker;
1834
+ return new qn({
1835
+ markers: [r],
1836
+ position: Z.getPosition(r)
1837
+ });
1838
+ }
1839
+ }, ir = class extends tr {
1840
+ constructor(e) {
1841
+ var { maxZoom: t, radius: n = 60, viewportPadding: r = 60 } = e, i = Kn(e, [
1842
+ "maxZoom",
1843
+ "radius",
1844
+ "viewportPadding"
1845
+ ]);
1846
+ super({
1847
+ maxZoom: t,
1848
+ viewportPadding: r
1849
+ }), this.markers = [], this.clusters = [], this.superCluster = new zn(Object.assign({
1850
+ maxZoom: this.maxZoom,
1851
+ radius: n
1852
+ }, i)), this.state = {
1853
+ zoom: -1,
1854
+ view: [
1855
+ 0,
1856
+ 0,
1857
+ 0,
1858
+ 0
1859
+ ]
1860
+ };
1861
+ }
1862
+ calculate(e) {
1863
+ let t = this.getViewportState(e), n = !Tn(this.state, t);
1864
+ if (!Tn(e.markers, this.markers)) {
1865
+ n = !0, this.markers = [...e.markers];
1866
+ let t = this.markers.map((e) => {
1867
+ let t = Z.getPosition(e);
1868
+ return {
1869
+ type: "Feature",
1870
+ geometry: {
1871
+ type: "Point",
1872
+ coordinates: [t.lng(), t.lat()]
1873
+ },
1874
+ properties: { marker: e }
1875
+ };
1876
+ });
1877
+ this.superCluster.load(t);
1878
+ }
1879
+ return n && (this.clusters = this.cluster(e), this.state = t), {
1880
+ clusters: this.clusters,
1881
+ changed: n
1882
+ };
1883
+ }
1884
+ cluster(e) {
1885
+ let t = this.getViewportState(e);
1886
+ return this.superCluster.getClusters(t.view, t.zoom).map((e) => this.transformCluster(e));
1887
+ }
1888
+ transformCluster({ geometry: { coordinates: [e, t] }, properties: n }) {
1889
+ if (n.cluster) return new qn({
1890
+ markers: this.superCluster.getLeaves(n.cluster_id, Infinity).map((e) => e.properties.marker),
1891
+ position: {
1892
+ lat: t,
1893
+ lng: e
1894
+ }
1895
+ });
1896
+ let r = n.marker;
1897
+ return new qn({
1898
+ markers: [r],
1899
+ position: Z.getPosition(r)
1900
+ });
1901
+ }
1902
+ getViewportState(e) {
1903
+ let t = e.map.getZoom(), n = e.map.getBounds();
1904
+ return Q(t), Q(n), {
1905
+ zoom: Math.round(t),
1906
+ view: Xn(n, e.mapCanvasProjection, this.viewportPadding)
1907
+ };
1908
+ }
1909
+ }, ar = class {
1910
+ constructor(e, t) {
1911
+ this.markers = { sum: e.length };
1912
+ let n = t.map((e) => e.count), r = n.reduce((e, t) => e + t, 0);
1913
+ this.clusters = {
1914
+ count: t.length,
1915
+ markers: {
1916
+ mean: r / t.length,
1917
+ sum: r,
1918
+ min: Math.min(...n),
1919
+ max: Math.max(...n)
1920
+ }
1921
+ };
1922
+ }
1923
+ }, or = class {
1924
+ render({ count: e, position: t }, n, r) {
1925
+ let i = `<svg fill="${e > Math.max(10, n.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1926
+ <circle cx="120" cy="120" opacity=".6" r="70" />
1927
+ <circle cx="120" cy="120" opacity=".3" r="90" />
1928
+ <circle cx="120" cy="120" opacity=".2" r="110" />
1929
+ <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
1930
+ </svg>`, a = `Cluster of ${e} markers`, o = Number(google.maps.Marker.MAX_ZINDEX) + e;
1931
+ if (Z.isAdvancedMarkerAvailable(r)) {
1932
+ let e = new DOMParser().parseFromString(i, "image/svg+xml").documentElement;
1933
+ e.setAttribute("transform", "translate(0 25)");
1934
+ let n = {
1935
+ map: r,
1936
+ position: t,
1937
+ zIndex: o,
1938
+ title: a,
1939
+ content: e
1940
+ };
1941
+ return new google.maps.marker.AdvancedMarkerElement(n);
1942
+ }
1943
+ let s = {
1944
+ position: t,
1945
+ zIndex: o,
1946
+ title: a,
1947
+ icon: {
1948
+ url: `data:image/svg+xml;base64,${btoa(i)}`,
1949
+ anchor: new google.maps.Point(25, 25)
1950
+ }
1951
+ };
1952
+ return new google.maps.Marker(s);
1953
+ }
1954
+ };
1955
+ function sr(e, t) {
1956
+ for (let n in t.prototype) e.prototype[n] = t.prototype[n];
1957
+ }
1958
+ var cr = class e {
1959
+ constructor() {
1960
+ sr(e, google.maps.OverlayView);
1961
+ }
1962
+ }, $;
1963
+ (function(e) {
1964
+ e.CLUSTERING_BEGIN = "clusteringbegin", e.CLUSTERING_END = "clusteringend", e.CLUSTER_CLICK = "click", e.GMP_CLICK = "gmp-click";
1965
+ })($ ||= {});
1966
+ var lr = (e, t, n) => {
1967
+ t.bounds && n.fitBounds(t.bounds);
1968
+ }, ur = class extends cr {
1969
+ constructor({ map: e, markers: t = [], algorithmOptions: n = {}, algorithm: r = new rr(n), renderer: i = new or(), onClusterClick: a = lr }) {
1970
+ super(), this.map = null, this.idleListener = null, this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = i, this.onClusterClick = a, e && this.setMap(e);
1971
+ }
1972
+ addMarker(e, t) {
1973
+ this.markers.includes(e) || (this.markers.push(e), t || this.render());
1974
+ }
1975
+ addMarkers(e, t) {
1976
+ e.forEach((e) => {
1977
+ this.addMarker(e, !0);
1978
+ }), t || this.render();
1979
+ }
1980
+ removeMarker(e, t) {
1981
+ let n = this.markers.indexOf(e);
1982
+ return n === -1 ? !1 : (Z.setMap(e, null), this.markers.splice(n, 1), t || this.render(), !0);
1983
+ }
1984
+ removeMarkers(e, t) {
1985
+ let n = !1;
1986
+ return e.forEach((e) => {
1987
+ n = this.removeMarker(e, !0) || n;
1988
+ }), n && !t && this.render(), n;
1989
+ }
1990
+ clearMarkers(e) {
1991
+ this.markers.length = 0, e || this.render();
1992
+ }
1993
+ render() {
1994
+ let e = this.getMap();
1995
+ if (e instanceof google.maps.Map && e.getProjection()) {
1996
+ google.maps.event.trigger(this, $.CLUSTERING_BEGIN, this);
1997
+ let { clusters: t, changed: n } = this.algorithm.calculate({
1998
+ markers: this.markers,
1999
+ map: e,
2000
+ mapCanvasProjection: this.getProjection()
2001
+ });
2002
+ if (n || n == null) {
2003
+ let e = /* @__PURE__ */ new Set();
2004
+ for (let n of t) n.markers.length == 1 && e.add(n.markers[0]);
2005
+ let n = [];
2006
+ for (let t of this.clusters) t.marker != null && (t.markers.length == 1 ? e.has(t.marker) || Z.setMap(t.marker, null) : n.push(t.marker));
2007
+ this.clusters = t, this.renderClusters(), requestAnimationFrame(() => n.forEach((e) => Z.setMap(e, null)));
2008
+ }
2009
+ google.maps.event.trigger(this, $.CLUSTERING_END, this);
2010
+ }
2011
+ }
2012
+ onAdd() {
2013
+ let e = this.getMap();
2014
+ Q(e), this.idleListener = e.addListener("idle", this.render.bind(this)), this.render();
2015
+ }
2016
+ onRemove() {
2017
+ this.idleListener && google.maps.event.removeListener(this.idleListener), this.reset();
2018
+ }
2019
+ reset() {
2020
+ this.markers.forEach((e) => Z.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
2021
+ }
2022
+ renderClusters() {
2023
+ let e = new ar(this.markers, this.clusters), t = this.getMap();
2024
+ this.clusters.forEach((n) => {
2025
+ if (n.markers.length === 1) n.marker = n.markers[0];
2026
+ else if (n.marker = this.renderer.render(n, e, t), n.markers.forEach((e) => Z.setMap(e, null)), this.onClusterClick) {
2027
+ let e = Z.isAdvancedMarker(n.marker) ? $.GMP_CLICK : $.CLUSTER_CLICK;
2028
+ n.marker.addListener(
2029
+ e,
2030
+ /* istanbul ignore next */
2031
+ (e) => {
2032
+ google.maps.event.trigger(this, $.CLUSTER_CLICK, n), this.onClusterClick(e, n, t);
2033
+ }
2034
+ );
2035
+ }
2036
+ Z.setMap(n.marker, t);
2037
+ });
2038
+ }
2039
+ };
2040
+ function dr(e) {
2041
+ var t = typeof e;
2042
+ return e != null && (t == "object" || t == "function");
2043
+ }
2044
+ var fr = typeof global == "object" && global && global.Object === Object && global, pr = typeof self == "object" && self && self.Object === Object && self, mr = fr || pr || Function("return this")(), hr = function() {
2045
+ return mr.Date.now();
2046
+ }, gr = /\s/;
2047
+ function _r(e) {
2048
+ for (var t = e.length; t-- && gr.test(e.charAt(t)););
2049
+ return t;
2050
+ }
2051
+ var vr = /^\s+/;
2052
+ function yr(e) {
2053
+ return e && e.slice(0, _r(e) + 1).replace(vr, "");
2054
+ }
2055
+ var br = mr.Symbol, xr = Object.prototype, Sr = xr.hasOwnProperty, Cr = xr.toString, wr = br ? br.toStringTag : void 0;
2056
+ function Tr(e) {
2057
+ var t = Sr.call(e, wr), n = e[wr];
2058
+ try {
2059
+ e[wr] = void 0;
2060
+ var r = !0;
2061
+ } catch {}
2062
+ var i = Cr.call(e);
2063
+ return r && (t ? e[wr] = n : delete e[wr]), i;
2064
+ }
2065
+ var Er = Object.prototype.toString;
2066
+ function Dr(e) {
2067
+ return Er.call(e);
2068
+ }
2069
+ var Or = "[object Null]", kr = "[object Undefined]", Ar = br ? br.toStringTag : void 0;
2070
+ function jr(e) {
2071
+ return e == null ? e === void 0 ? kr : Or : Ar && Ar in Object(e) ? Tr(e) : Dr(e);
2072
+ }
2073
+ function Mr(e) {
2074
+ return typeof e == "object" && !!e;
2075
+ }
2076
+ var Nr = "[object Symbol]";
2077
+ function Pr(e) {
2078
+ return typeof e == "symbol" || Mr(e) && jr(e) == Nr;
2079
+ }
2080
+ var Fr = NaN, Ir = /^[-+]0x[0-9a-f]+$/i, Lr = /^0b[01]+$/i, Rr = /^0o[0-7]+$/i, zr = parseInt;
2081
+ function Br(e) {
2082
+ if (typeof e == "number") return e;
2083
+ if (Pr(e)) return Fr;
2084
+ if (dr(e)) {
2085
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
2086
+ e = dr(t) ? t + "" : t;
2087
+ }
2088
+ if (typeof e != "string") return e === 0 ? e : +e;
2089
+ e = yr(e);
2090
+ var n = Lr.test(e);
2091
+ return n || Rr.test(e) ? zr(e.slice(2), n ? 2 : 8) : Ir.test(e) ? Fr : +e;
2092
+ }
2093
+ var Vr = "Expected a function", Hr = Math.max, Ur = Math.min;
2094
+ function Wr(e, t, n) {
2095
+ var r, i, a, o, s, c, l = 0, u = !1, d = !1, f = !0;
2096
+ if (typeof e != "function") throw TypeError(Vr);
2097
+ t = Br(t) || 0, dr(n) && (u = !!n.leading, d = "maxWait" in n, a = d ? Hr(Br(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
2098
+ function p(t) {
2099
+ var n = r, a = i;
2100
+ return r = i = void 0, l = t, o = e.apply(a, n), o;
2101
+ }
2102
+ function m(e) {
2103
+ return l = e, s = setTimeout(_, t), u ? p(e) : o;
2104
+ }
2105
+ function h(e) {
2106
+ var n = e - c, r = e - l, i = t - n;
2107
+ return d ? Ur(i, a - r) : i;
2108
+ }
2109
+ function g(e) {
2110
+ var n = e - c, r = e - l;
2111
+ return c === void 0 || n >= t || n < 0 || d && r >= a;
2112
+ }
2113
+ function _() {
2114
+ var e = hr();
2115
+ if (g(e)) return v(e);
2116
+ s = setTimeout(_, h(e));
2117
+ }
2118
+ function v(e) {
2119
+ return s = void 0, f && r ? p(e) : (r = i = void 0, o);
2120
+ }
2121
+ function ee() {
2122
+ s !== void 0 && clearTimeout(s), l = 0, r = c = i = s = void 0;
2123
+ }
2124
+ function te() {
2125
+ return s === void 0 ? o : v(hr());
2126
+ }
2127
+ function y() {
2128
+ var e = hr(), n = g(e);
2129
+ if (r = arguments, i = this, c = e, n) {
2130
+ if (s === void 0) return m(c);
2131
+ if (d) return clearTimeout(s), s = setTimeout(_, t), p(c);
2132
+ }
2133
+ return s === void 0 && (s = setTimeout(_, t)), o;
2134
+ }
2135
+ return y.cancel = ee, y.flush = te, y;
2136
+ }
2137
+ var Gr = class extends ur {
2138
+ constructor(e, t = 10) {
2139
+ super(e), Xe(this, "debouncedRender"), this.debouncedRender = Wr(() => {
2140
+ super.render();
2141
+ }, t, {
2142
+ leading: !0,
2143
+ trailing: !0
2144
+ });
2145
+ }
2146
+ addMarker(e, t) {
2147
+ super.addMarker(e, !0), t || this.debouncedRender();
2148
+ }
2149
+ removeMarker(e, t) {
2150
+ let n = super.removeMarker(e, !0);
2151
+ return t || this.debouncedRender(), n;
2152
+ }
2153
+ addMarkers(e, t) {
2154
+ super.addMarkers(e, !0), t || this.debouncedRender();
2155
+ }
2156
+ removeMarkers(e, t) {
2157
+ let n = super.removeMarkers(e, !0);
2158
+ return t || this.debouncedRender(), n;
2159
+ }
2160
+ clearMarkers(e) {
2161
+ super.clearMarkers(!0), e || this.debouncedRender();
2162
+ }
2163
+ render() {
2164
+ this.debouncedRender.cancel(), super.render();
2165
+ }
2166
+ destroy() {
2167
+ this.debouncedRender.cancel();
2168
+ }
2169
+ }, Kr = class extends ir {
2170
+ calculate(e) {
2171
+ return e.markers.length === 0 ? {
2172
+ clusters: [],
2173
+ changed: !0
2174
+ } : super.calculate(e);
2175
+ }
2176
+ }, qr = Object.values($);
2177
+ O({
2178
+ name: "MarkerCluster",
2179
+ props: {
2180
+ options: {
2181
+ type: Object,
2182
+ default: () => ({})
2183
+ },
2184
+ renderDebounceDelay: {
2185
+ type: Number,
2186
+ default: 10
2187
+ }
2188
+ },
2189
+ emits: qr,
2190
+ setup(e, { emit: t, expose: n, slots: r }) {
2191
+ let i = P(), a = k(H, P()), o = k(U, P());
2192
+ return N(Qe, i), R(a, () => {
2193
+ a.value && (i.value = A(new Gr({
2194
+ map: a.value,
2195
+ algorithm: new Kr(e.options.algorithmOptions ?? {}),
2196
+ ...e.options
2197
+ }, e.renderDebounceDelay)), qr.forEach((e) => {
2198
+ var n;
2199
+ (n = i.value) == null || n.addListener(e, (n) => t(e, n));
2200
+ }));
2201
+ }, { immediate: !0 }), j(() => {
2202
+ var e;
2203
+ i.value && ((e = o.value) == null || e.event.clearInstanceListeners(i.value), i.value.clearMarkers(!0), i.value.setMap(null), i.value.destroy());
2204
+ }), n({ markerCluster: i }), () => r.default?.call(r);
2205
+ }
2206
+ }), O({
2207
+ inheritAttrs: !1,
2208
+ props: { options: {
2209
+ type: Object,
2210
+ required: !0
2211
+ } },
2212
+ setup(e, { slots: t, emit: n, expose: r }) {
2213
+ let i = P(), a = x(() => t.default?.call(t).some((e) => e.type !== oe)), o = G($e, [], x(() => ({
2214
+ ...e.options,
2215
+ element: i.value
2216
+ })), n);
2217
+ return r({ customMarker: o }), {
2218
+ customMarkerRef: i,
2219
+ customMarker: o,
2220
+ hasSlotContent: a
2221
+ };
2222
+ }
2223
+ }), O({
2224
+ name: "HeatmapLayer",
2225
+ props: { options: {
2226
+ type: Object,
2227
+ default: () => ({})
2228
+ } },
2229
+ setup(e) {
2230
+ let t = P(), n = k(H, P()), r = k(U, P());
2231
+ return R([n, () => e.options], ([e, i], [a, o]) => {
2232
+ let s = !St(i, o) || n.value !== a;
2233
+ if (n.value && r.value && s) {
2234
+ let e;
2235
+ if (i.data && !(i.data instanceof r.value.MVCArray)) {
2236
+ let t = r.value.LatLng, n = i.data.map((e) => e instanceof t || "location" in e && (e.location instanceof t || e.location === null) ? e : "location" in e ? {
2237
+ ...e,
2238
+ location: new t(e.location)
2239
+ } : new t(e));
2240
+ e = {
2241
+ ...i,
2242
+ data: n
2243
+ };
2244
+ } else e = i;
2245
+ t.value ? t.value.setOptions(e) : t.value = A(new r.value.visualization.HeatmapLayer({
2246
+ ...e,
2247
+ map: n.value
2248
+ }));
2249
+ }
2250
+ }, { immediate: !0 }), j(() => {
2251
+ t.value && t.value.setMap(null);
2252
+ }), { heatmapLayer: t };
2253
+ },
2254
+ render: () => null
2255
+ });
2256
+ //#endregion
2257
+ //#region src/components/app/AppGoogleMaps.vue
2258
+ var Jr = /* @__PURE__ */ O({
2259
+ __name: "AppGoogleMaps",
2260
+ props: {
2261
+ center: {},
2262
+ zoom: {}
2263
+ },
2264
+ setup(e) {
2265
+ let t = e, n = d();
2266
+ return (e, r) => L(n).googleMapsApiKey.value ? (M(), S(L(bt), {
2267
+ key: 0,
2268
+ "api-key": L(n).googleMapsApiKey.value,
2269
+ zoom: t.zoom,
2270
+ center: {
2271
+ lat: t.center.lat,
2272
+ lng: t.center.lng
2273
+ },
2274
+ "disable-default-ui": !0
2275
+ }, null, 8, [
2276
+ "api-key",
2277
+ "zoom",
2278
+ "center"
2279
+ ])) : C("", !0);
2280
+ }
2281
+ }), Yr = { class: "bg-brand-500 px-md py-xxs absolute top-3 left-3 z-2 rounded-full font-medium text-(--brand-contrast)" }, Xr = { class: "absolute inset-0 z-1 flex flex-col items-center justify-center bg-gradient-to-t from-white from-10% to-transparent" }, Zr = { class: "gap-md flex flex-col items-center" }, Qr = { class: "bg-primary size-fit rounded-full border-1 border-white" }, $r = { class: "text-center" }, ei = { class: "font-semibold" }, ti = /* @__PURE__ */ O({
2282
+ __name: "CrmDetailSidebarMapCard",
2283
+ props: { address: {} },
2284
+ setup(e) {
2285
+ let t = e, n = B();
2286
+ return (e, r) => t.address === null ? C("", !0) : (M(), S(m, {
2287
+ key: 0,
2288
+ class: "relative overflow-hidden !p-0"
2289
+ }, {
2290
+ default: z(() => [
2291
+ T("div", Yr, [T("p", null, F(L(n).t("wise_crm.shared.home_address")), 1)]),
2292
+ T("div", Xr, [T("div", Zr, [T("div", Qr, [D(L(V), {
2293
+ class: "text-brand-500",
2294
+ icon: "homeFilled"
2295
+ })]), T("div", $r, [T("p", ei, F(t.address?.street) + " " + F(t.address?.streetNumber), 1), T("p", null, F(t.address?.postalCode) + " " + F(t.address?.city), 1)])])]),
2296
+ D(Jr, {
2297
+ center: {
2298
+ lat: t.address?.coordinates.lat ?? 0,
2299
+ lng: t.address?.coordinates.lng ?? 0
2300
+ },
2301
+ zoom: 14,
2302
+ class: "h-30 w-full rounded-2xl"
2303
+ }, null, 8, ["center"])
2304
+ ]),
2305
+ _: 1
2306
+ }));
2307
+ }
2308
+ }), ni = { class: "text-primary font-semibold" }, ri = { class: "gap-sm flex flex-col" }, ii = /* @__PURE__ */ O({
2309
+ __name: "CrmDetailSidebarAccordionBillingInformation",
2310
+ props: {
2311
+ invoiceAddress: {},
2312
+ invoiceEmail: {}
2313
+ },
2314
+ setup(e) {
2315
+ let t = e;
2316
+ return (e, n) => (M(), S(m, { class: "gap-md flex flex-col" }, {
2317
+ default: z(() => [T("p", ni, F(t.invoiceEmail), 1), T("div", ri, [D(f, {
2318
+ label: t.invoiceAddress === null ? "-" : L(Be).formatShort(t.invoiceAddress),
2319
+ icon: "locationPin"
2320
+ }, null, 8, ["label"])])]),
2321
+ _: 1
2322
+ }));
2323
+ }
2324
+ }), ai = { class: "flex items-start justify-between" }, oi = { class: "flex flex-col items-start" }, si = { class: "text-brand-700" }, ci = { class: "-mt-2 -mr-2 flex items-center justify-end" }, li = { class: "gap-lg grid" }, ui = /* @__PURE__ */ O({
2325
+ __name: "CrmDetailSidebarAccordionContactPersonInfo",
2326
+ props: {
2327
+ contactPerson: {},
2328
+ onToggleIsPrimary: { type: Function }
2329
+ },
2330
+ emits: ["delete", "update"],
2331
+ setup(e, { emit: t }) {
2332
+ let n = e, r = t, i = B();
2333
+ function a() {
2334
+ r("update");
2335
+ }
2336
+ function o() {
2337
+ r("delete");
2338
+ }
2339
+ function c() {
2340
+ n.onToggleIsPrimary();
2341
+ }
2342
+ return (e, t) => (M(), S(m, { class: "gap-lg flex flex-col" }, {
2343
+ default: z(() => [T("div", ai, [T("div", oi, [D(s, {
2344
+ "class-config": { root: "bg-transparent border-none text-primary shadow-none h-auto w-auto hover:underline p-0 font-semibold" },
2345
+ "entity-type": L(ie).INDIVIDUAL,
2346
+ uuid: n.contactPerson.uuid
2347
+ }, {
2348
+ default: z(() => [E(F(n.contactPerson.firstName) + " " + F(n.contactPerson.lastName), 1)]),
2349
+ _: 1
2350
+ }, 8, ["entity-type", "uuid"]), T("p", si, F(n.contactPerson.position), 1)]), T("div", ci, [D(L(ye), {
2351
+ icon: n.contactPerson.isPrimary ? "starYellow" : "starOutline",
2352
+ label: L(i).t("wise_crm.info_dialog.sidebar.overview.contact_person_primary"),
2353
+ variant: "tertiary",
2354
+ size: "sm",
2355
+ onClick: c
2356
+ }, null, 8, ["icon", "label"]), D(L(_e), {
2357
+ "class-config": { content: "min-w-fit p-sm" },
2358
+ "popover-align": "end"
2359
+ }, {
2360
+ trigger: z(() => [D(L(ye), {
2361
+ variant: "tertiary",
2362
+ size: "sm",
2363
+ label: "actionMenu",
2364
+ icon: "threeDots"
2365
+ })]),
2366
+ content: z(() => [D(L(ve), {
2367
+ label: L(i).t("wise_crm.info_dialog.sidebar.overview.update_contact_person"),
2368
+ icon: "editWithLine",
2369
+ onSelect: a
2370
+ }, null, 8, ["label"]), D(L(ve), {
2371
+ "is-destructive": !0,
2372
+ "is-disabled": n.contactPerson.isPrimary,
2373
+ label: L(i).t("wise_crm.info_dialog.sidebar.overview.delete_contact_person"),
2374
+ icon: "linkBroken",
2375
+ onSelect: o
2376
+ }, null, 8, ["is-disabled", "label"])]),
2377
+ _: 1
2378
+ })])]), T("div", li, [
2379
+ n.contactPerson.email === null ? C("", !0) : (M(), S(f, {
2380
+ key: 0,
2381
+ label: n.contactPerson.email,
2382
+ icon: "mail"
2383
+ }, null, 8, ["label"])),
2384
+ n.contactPerson.mobilePhone === null ? C("", !0) : (M(), S(f, {
2385
+ key: 1,
2386
+ label: n.contactPerson.mobilePhone,
2387
+ icon: "mobilePhone"
2388
+ }, null, 8, ["label"])),
2389
+ n.contactPerson.phone === null ? C("", !0) : (M(), S(f, {
2390
+ key: 2,
2391
+ label: n.contactPerson.phone,
2392
+ icon: "phone"
2393
+ }, null, 8, ["label"]))
2394
+ ])]),
2395
+ _: 1
2396
+ }));
2397
+ }
2398
+ }), di = { class: "gap-sm text-brand-500 flex items-center" }, fi = ["href"], pi = ["href"], mi = { key: 2 }, hi = /* @__PURE__ */ O({
2399
+ __name: "CrmDetailHeaderContactTooltip",
2400
+ props: {
2401
+ type: {},
2402
+ value: {}
2403
+ },
2404
+ setup(e) {
2405
+ let t = e, n = B(), r = x(() => {
2406
+ switch (t.type) {
2407
+ case "address": return "locationPin";
2408
+ case "email": return "mail";
2409
+ case "phone": return "phone";
2410
+ default: return "phone";
2411
+ }
2412
+ }), i = x(() => {
2413
+ switch (t.type) {
2414
+ case "email": return `mailto:${t.value}`;
2415
+ case "phone": return `tel:${t.value}`;
2416
+ case "address": return `https://maps.google.com/?q=${encodeURIComponent(t.value)}`;
2417
+ default: return null;
2418
+ }
2419
+ }), a = x(() => {
2420
+ switch (t.type) {
2421
+ case "email": return n.t("component.contact_tooltip.aria_label.email", { value: t.value });
2422
+ case "phone": return n.t("component.contact_tooltip.aria_label.phone", { value: t.value });
2423
+ case "address": return n.t("component.contact_tooltip.aria_label.address", { value: t.value });
2424
+ default: return t.value;
2425
+ }
2426
+ }), o = we({ source: t.value });
2427
+ function s() {
2428
+ o.copy(t.value);
2429
+ }
2430
+ return (o, c) => (M(), S(L(xe), {
2431
+ "is-popover-arrow-hidden": !0,
2432
+ "class-config": { innerContent: "bg-primary border-secondary p-sm px-md" }
2433
+ }, {
2434
+ trigger: z(() => [D(L(Se), null, {
2435
+ default: z(() => [(M(), S(me(i.value ? "a" : "div"), {
2436
+ href: i.value,
2437
+ "aria-label": a.value,
2438
+ target: e.type === "address" ? "_blank" : void 0,
2439
+ rel: e.type === "address" ? "noopener noreferrer" : void 0,
2440
+ class: "dark:bg-brand-950 p-xs ring-brand-500 flex aspect-square size-8 items-center justify-center rounded-full border-none bg-gray-50/50 ring-offset-2 duration-300 outline-none focus-visible:ring-2 data-[loading=false]:not-disabled:hover:bg-gray-50/30"
2441
+ }, {
2442
+ default: z(() => [D(L(V), {
2443
+ icon: r.value,
2444
+ class: "text-brand-700 size-4 shrink-0 dark:text-brand-200"
2445
+ }, null, 8, ["icon"])]),
2446
+ _: 1
2447
+ }, 8, [
2448
+ "href",
2449
+ "aria-label",
2450
+ "target",
2451
+ "rel"
2452
+ ]))]),
2453
+ _: 1
2454
+ })]),
2455
+ content: z(() => [T("div", di, [
2456
+ D(L(V), {
2457
+ icon: r.value,
2458
+ class: "size-4"
2459
+ }, null, 8, ["icon"]),
2460
+ e.type === "email" ? (M(), w("a", {
2461
+ key: 0,
2462
+ href: `mailto:${t.value}`,
2463
+ class: "ring-brand-500 underline ring-offset-1 duration-200 outline-none focus-visible:ring-2"
2464
+ }, F(t.value), 9, fi)) : e.type === "phone" ? (M(), w("a", {
2465
+ key: 1,
2466
+ href: `tel:${t.value}`,
2467
+ class: "ring-brand-500 underline ring-offset-1 duration-200 outline-none focus-visible:ring-2"
2468
+ }, F(t.value), 9, pi)) : (M(), w("p", mi, F(t.value), 1)),
2469
+ D(L(ye), {
2470
+ "class-config": {
2471
+ root: "bg-transparent border-none shadow-none p-0 w-auto h-auto rounded-sm p-xs data-[loading=false]:not-disabled:hover:bg-secondary",
2472
+ icon: "text-primary size-4"
2473
+ },
2474
+ label: L(n).t("wise_crm.info_dialog.copy_to_clipboard"),
2475
+ icon: "copy",
2476
+ onClick: s
2477
+ }, null, 8, ["label"])
2478
+ ])]),
2479
+ _: 1
2480
+ }));
2481
+ }
2482
+ }), gi = { class: "gap-xl border-brand-300 from-brand-50 to-brand-200 p-xl flex flex-col rounded-2xl border bg-linear-to-r shadow-[0px_8px_12px_0px_rgba(104,186,246,0.12)] dark:from-brand-800 dark:to-brand-900" }, _i = { class: "flex justify-between" }, vi = { class: "text-primary max-w-55 text-xl font-bold" }, yi = { class: "gap-sm flex h-fit" }, bi = /* @__PURE__ */ O({
2483
+ __name: "CrmDetailHeaderCard",
2484
+ props: {
2485
+ name: {},
2486
+ address: {},
2487
+ email: {},
2488
+ entityName: {},
2489
+ entityType: {},
2490
+ mobilePhone: {},
2491
+ phone: {}
2492
+ },
2493
+ setup(e) {
2494
+ let t = e;
2495
+ return (e, n) => (M(), w("div", gi, [T("div", _i, [T("h2", vi, F(t.name), 1), T("div", yi, [
2496
+ pe(e.$slots, "actions"),
2497
+ t.email === null ? C("", !0) : (M(), S(hi, {
2498
+ key: 0,
2499
+ value: t.email,
2500
+ type: "email"
2501
+ }, null, 8, ["value"])),
2502
+ t.mobilePhone !== null || t.phone !== null ? (M(), S(hi, {
2503
+ key: 1,
2504
+ value: t.mobilePhone ?? t.phone ?? "",
2505
+ type: "phone"
2506
+ }, null, 8, ["value"])) : C("", !0),
2507
+ t.address === null ? C("", !0) : (M(), S(hi, {
2508
+ key: 2,
2509
+ value: L(Be).format(t.address),
2510
+ type: "address"
2511
+ }, null, 8, ["value"]))
2512
+ ])]), T("div", null, [D(L(he), {
2513
+ icon: t.entityType === L(ie).BUSINESS ? "building" : "user",
2514
+ variant: "translucent",
2515
+ color: "brand"
2516
+ }, {
2517
+ default: z(() => [E(F(t.entityName ?? "-"), 1)]),
2518
+ _: 1
2519
+ }, 8, ["icon"])])]));
2520
+ }
2521
+ });
2522
+ //#endregion
2523
+ export { qe as a, Be as c, ti as i, ze as l, ui as n, Ke as o, ii as r, Ue as s, bi as t, De as u };