@zerops/web-components 0.0.1 → 0.1.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.
@@ -0,0 +1,1726 @@
1
+ var me = (t) => {
2
+ throw TypeError(t);
3
+ };
4
+ var Xn = (t, e, n) => e.has(t) || me("Cannot " + n);
5
+ var _ = (t, e, n) => (Xn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), T = (t, e, n) => e.has(t) ? me("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), g = (t, e, n, o) => (Xn(t, e, "write to private field"), o ? o.call(t, n) : e.set(t, n), n), w = (t, e, n) => (Xn(t, e, "access private method"), n);
6
+ var ve = (t, e, n, o) => ({
7
+ set _(i) {
8
+ g(t, e, i, n);
9
+ },
10
+ get _() {
11
+ return _(t, e, o);
12
+ }
13
+ });
14
+ import { aa as R, at as G, r as Yn, bl as ke, au as Ee, av as Re, ax as V, aA as Z, ba as Le, bb as Dn, aw as m, aC as z, ay as d, aB as I, az as s, aD as pn, bh as L, bN as X, bi as A, aF as Ce, a3 as p, ao as M, B as xn, l as kn, b0 as we, bA as Un, n as ye, F as Me, b7 as Ae, b9 as Be, bL as Fn, bm as oe, ak as tn, bt as Fe, bs as je, bZ as Ie, b_ as qe, j as We, bT as Ge, J as Ve, bW as Ze, bU as He, bV as Ue, bX as Je, bY as Ye } from "./chunks/recipe-fetch-BEQGCaPU.js";
15
+ const Pe = {
16
+ endpoint: "https://my-app.com",
17
+ infrastructure: {
18
+ ctrl: { active: 1, standby: 1 },
19
+ stats: { active: 1, standby: 0 },
20
+ logger: { active: 1, standby: 0 }
21
+ },
22
+ routing: {
23
+ containers: { active: 2, standby: 0 }
24
+ },
25
+ services: [
26
+ {
27
+ id: "app",
28
+ label: "app:3000",
29
+ category: "http-runtime",
30
+ containers: { active: 3, standby: 0 },
31
+ techIcon: "nodejs"
32
+ },
33
+ {
34
+ id: "worker",
35
+ label: "worker:5432",
36
+ category: "side-runtime",
37
+ containers: { active: 2, standby: 0 },
38
+ techIcon: "python"
39
+ },
40
+ {
41
+ id: "cache",
42
+ label: "cache:6379",
43
+ category: "managed",
44
+ containers: { active: 3, standby: 0 },
45
+ techIcon: "valkey"
46
+ },
47
+ {
48
+ id: "db",
49
+ label: "db:3000",
50
+ category: "managed",
51
+ containers: { active: 3, standby: 0 },
52
+ techIcon: "postgresql",
53
+ hasLoadBalancer: !0,
54
+ loadBalancer: {
55
+ containers: { active: 2, standby: 0 }
56
+ }
57
+ },
58
+ {
59
+ id: "nats",
60
+ label: "nats:4222",
61
+ category: "managed",
62
+ containers: { active: 3, standby: 0 },
63
+ techIcon: "nats"
64
+ }
65
+ ],
66
+ storage: {
67
+ label: "Object storage",
68
+ sublabel: "storage:6379"
69
+ }
70
+ };
71
+ function Qe(t, e) {
72
+ if (t & 1 && (m(0, "div", 0)(1, "span", 7), z(2), d()()), t & 2) {
73
+ const n = I();
74
+ s(2), pn(n.label());
75
+ }
76
+ }
77
+ function Xe(t, e) {
78
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
79
+ const n = I(2);
80
+ M("color", n.barColor())("active", !0);
81
+ }
82
+ }
83
+ function Ke(t, e) {
84
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
85
+ const n = I(2);
86
+ M("color", n.barColor())("active", !1);
87
+ }
88
+ }
89
+ function nt(t, e) {
90
+ if (t & 1 && p(0, "mat-icon", 12), t & 2) {
91
+ const n = e.$implicit;
92
+ M("svgIcon", n);
93
+ }
94
+ }
95
+ function et(t, e) {
96
+ if (t & 1 && L(0, nt, 1, 1, "mat-icon", 12, X), t & 2) {
97
+ const n = I(2);
98
+ A(n.techIcons());
99
+ }
100
+ }
101
+ function tt(t, e) {
102
+ if (t & 1 && p(0, "mat-icon", 12), t & 2) {
103
+ const n = I(2);
104
+ M("svgIcon", n.techIcon());
105
+ }
106
+ }
107
+ function ot(t, e) {
108
+ if (t & 1 && (m(0, "div", 1)(1, "div", 8), L(2, Xe, 1, 2, "zui-bar-icon", 9, X), L(4, Ke, 1, 2, "zui-bar-icon", 9, X), d(), m(6, "span", 10), z(7), d(), m(8, "div", 11), V(9, et, 2, 0)(10, tt, 1, 1, "mat-icon", 12), d()()), t & 2) {
109
+ let n;
110
+ const o = I();
111
+ s(2), A(o.activeRange()), s(2), A(o.inactiveRange()), s(3), pn(o.label()), s(2), Z((n = o.techIcons()) != null && n.length ? 9 : o.techIcon() ? 10 : -1);
112
+ }
113
+ }
114
+ function it(t, e) {
115
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
116
+ const n = I(2);
117
+ M("color", n.barColor())("active", !0);
118
+ }
119
+ }
120
+ function at(t, e) {
121
+ if (t & 1 && p(0, "mat-icon", 16), t & 2) {
122
+ const n = I(2);
123
+ M("svgIcon", n.techIcon());
124
+ }
125
+ }
126
+ function rt(t, e) {
127
+ if (t & 1 && (m(0, "div", 2)(1, "div", 13), L(2, it, 1, 2, "zui-bar-icon", 9, X), d(), m(4, "div", 14)(5, "span", 15), z(6), d(), V(7, at, 1, 1, "mat-icon", 16), d()()), t & 2) {
128
+ const n = I();
129
+ s(2), A(n.activeRange()), s(4), pn(n.formatLabel(n.label())), s(), Z(n.techIcon() ? 7 : -1);
130
+ }
131
+ }
132
+ function st(t, e) {
133
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
134
+ const n = I(2);
135
+ M("color", n.barColor())("active", !0);
136
+ }
137
+ }
138
+ function ct(t, e) {
139
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
140
+ const n = I(2);
141
+ M("color", n.barColor())("active", !1);
142
+ }
143
+ }
144
+ function lt(t, e) {
145
+ if (t & 1 && p(0, "mat-icon", 20), t & 2) {
146
+ const n = I(2);
147
+ M("svgIcon", n.techIcon());
148
+ }
149
+ }
150
+ function dt(t, e) {
151
+ if (t & 1 && (m(0, "div", 3)(1, "div", 17), L(2, st, 1, 2, "zui-bar-icon", 9, X), L(4, ct, 1, 2, "zui-bar-icon", 9, X), d(), m(6, "div", 18)(7, "span", 19), z(8), d(), V(9, lt, 1, 1, "mat-icon", 20), d()()), t & 2) {
152
+ const n = I();
153
+ s(2), A(n.activeRange()), s(2), A(n.inactiveRange()), s(4), pn(n.label()), s(), Z(n.techIcon() ? 9 : -1);
154
+ }
155
+ }
156
+ function _t(t, e) {
157
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
158
+ const n = I(2);
159
+ M("color", n.barColor())("active", !0);
160
+ }
161
+ }
162
+ function ht(t, e) {
163
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
164
+ const n = I(2);
165
+ M("color", n.barColor())("active", !1);
166
+ }
167
+ }
168
+ function gt(t, e) {
169
+ if (t & 1 && p(0, "mat-icon", 12), t & 2) {
170
+ const n = I(2);
171
+ M("svgIcon", n.techIcon());
172
+ }
173
+ }
174
+ function pt(t, e) {
175
+ if (t & 1 && (m(0, "div", 4)(1, "div", 21), L(2, _t, 1, 2, "zui-bar-icon", 9, X), L(4, ht, 1, 2, "zui-bar-icon", 9, X), d(), m(6, "div", 22)(7, "span", 23), z(8), d(), V(9, gt, 1, 1, "mat-icon", 12), d()()), t & 2) {
176
+ const n = I();
177
+ s(2), A(n.activeRange()), s(2), A(n.inactiveRange()), s(4), pn(n.formatLabel(n.label())), s(), Z(n.techIcon() ? 9 : -1);
178
+ }
179
+ }
180
+ function ft(t, e) {
181
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
182
+ const n = I(2);
183
+ M("color", n.barColor())("active", !0);
184
+ }
185
+ }
186
+ function ut(t, e) {
187
+ if (t & 1 && p(0, "zui-bar-icon", 9), t & 2) {
188
+ const n = I(2);
189
+ M("color", n.barColor())("active", !1);
190
+ }
191
+ }
192
+ function mt(t, e) {
193
+ if (t & 1 && (m(0, "div", 5)(1, "div", 21), L(2, ft, 1, 2, "zui-bar-icon", 9, X), L(4, ut, 1, 2, "zui-bar-icon", 9, X), d(), m(6, "span", 19), z(7), d()()), t & 2) {
194
+ const n = I();
195
+ s(2), A(n.activeRange()), s(2), A(n.inactiveRange()), s(3), pn(n.label());
196
+ }
197
+ }
198
+ function vt(t, e) {
199
+ if (t & 1 && (m(0, "div", 26)(1, "span", 27), z(2), d()()), t & 2) {
200
+ const n = I(2);
201
+ s(2), pn(n.sublabel());
202
+ }
203
+ }
204
+ function bt(t, e) {
205
+ if (t & 1 && (m(0, "div", 6)(1, "div", 24)(2, "span", 25), z(3), d()(), V(4, vt, 3, 1, "div", 26), d()), t & 2) {
206
+ const n = I();
207
+ s(3), Ce("", n.label(), `
208
+ External`), s(), Z(n.sublabel() ? 4 : -1);
209
+ }
210
+ }
211
+ const un = class un {
212
+ constructor() {
213
+ this.variant = R.required(), this.label = R.required(), this.sublabel = R(), this.containers = R(), this.barColor = R("orange"), this.techIcon = R(), this.techIcons = R(), this.highlighted = R(!1), this.activeRange = G(() => {
214
+ const e = this.containers();
215
+ return e ? Array.from({ length: e.active }, (n, o) => o) : [];
216
+ }), this.inactiveRange = G(() => {
217
+ const e = this.containers();
218
+ return e ? Array.from({ length: e.standby }, (n, o) => o) : [];
219
+ });
220
+ }
221
+ formatLabel(e) {
222
+ return e.replace(/\n/g, " ");
223
+ }
224
+ };
225
+ un.ɵfac = function(n) {
226
+ return new (n || un)();
227
+ }, un.ɵcmp = /* @__PURE__ */ Yn({ type: un, selectors: [["zw-diagram-node"]], hostVars: 4, hostBindings: function(n, o) {
228
+ n & 2 && (Le("__node __node--" + o.variant()), Dn("__node--highlighted", o.highlighted()));
229
+ }, inputs: { variant: [1, "variant"], label: [1, "label"], sublabel: [1, "sublabel"], containers: [1, "containers"], barColor: [1, "barColor"], techIcon: [1, "techIcon"], techIcons: [1, "techIcons"], highlighted: [1, "highlighted"] }, decls: 7, vars: 1, consts: [[1, "__endpoint-pill"], [1, "__infra-core-box"], [1, "__infra-side-box"], [1, "__balancer-box"], [1, "__service-box"], [1, "__service-highlighted-box"], [1, "__external-box"], [1, "__endpoint-label"], [1, "__bar-row", "__bar-row--infra"], [3, "color", "active"], [1, "__node-label", "__node-label--mono-core", "__node-label--multiline"], [1, "__tech-icons-row"], [1, "__tech-icon", 3, "svgIcon"], [1, "__bar-col"], [1, "__side-bottom"], [1, "__node-label", "__node-label--mono", "__node-label--side"], [1, "__tech-icon", "__tech-icon--side", 3, "svgIcon"], [1, "__bar-row", "__bar-row--balancer"], [1, "__balancer-label-area"], [1, "__node-label", "__node-label--mono", "__node-label--multiline"], [1, "__tech-icon", "__tech-icon--sm", 3, "svgIcon"], [1, "__bar-row"], [1, "__label-block"], [1, "__node-label", "__node-label--mono"], [1, "__ext-inner-card"], [1, "__node-label", "__node-label--mono", "__node-label--ext-text"], [1, "__ext-sublabel-frame"], [1, "__node-label", "__node-label--mono", "__node-label--sub"]], template: function(n, o) {
230
+ if (n & 1 && V(0, Qe, 3, 1, "div", 0)(1, ot, 11, 2, "div", 1)(2, rt, 8, 2, "div", 2)(3, dt, 10, 2, "div", 3)(4, pt, 10, 2, "div", 4)(5, mt, 8, 1, "div", 5)(6, bt, 5, 2, "div", 6), n & 2) {
231
+ let i;
232
+ Z((i = o.variant()) === "endpoint" ? 0 : i === "infra-core" ? 1 : i === "infra-side" ? 2 : i === "balancer" ? 3 : i === "service" ? 4 : i === "service-highlighted" ? 5 : i === "external" ? 6 : -1);
233
+ }
234
+ }, dependencies: [ke, Ee, Re], styles: [`[_nghost-%COMP%] {
235
+ display: block;
236
+ position: relative;
237
+ contain: layout style;
238
+ }
239
+
240
+ .__node-label[_ngcontent-%COMP%] {
241
+ font-family: var(--font-family-brand);
242
+ font-weight: 600;
243
+ font-size: 11px;
244
+ line-height: 14px;
245
+ letter-spacing: 0.12em;
246
+ text-transform: uppercase;
247
+ color: #254E4A;
248
+ white-space: nowrap;
249
+ font-variation-settings: "CRSV" 0, "SHRP" 100, "slnt" 0;
250
+ }
251
+
252
+ .__node-label--mono[_ngcontent-%COMP%] {
253
+ font-family: "Roboto Mono", "JetBrains Mono", ui-monospace, monospace;
254
+ font-weight: 500;
255
+ font-size: 10px;
256
+ line-height: 12px;
257
+ letter-spacing: 0.02em;
258
+ text-transform: none;
259
+ color: #464646;
260
+ text-align: center;
261
+ padding: 0 8px;
262
+ }
263
+
264
+ .__node-label--mono-core[_ngcontent-%COMP%] {
265
+ font-family: "Roboto Mono", "JetBrains Mono", ui-monospace, monospace;
266
+ font-weight: 500;
267
+ font-size: 10px;
268
+ line-height: 12px;
269
+ letter-spacing: 0.02em;
270
+ text-transform: none;
271
+ color: #254E4A;
272
+ text-align: center;
273
+ }
274
+
275
+ .__node-label--side[_ngcontent-%COMP%] {
276
+ color: #464646;
277
+ }
278
+
279
+ .__node-label--sub[_ngcontent-%COMP%] {
280
+ margin: 0 auto;
281
+ }
282
+
283
+ .__node-label--multiline[_ngcontent-%COMP%] {
284
+ white-space: pre-line;
285
+ }
286
+
287
+ .__node-label--ext-text[_ngcontent-%COMP%] {
288
+ white-space: pre-line;
289
+ text-align: center;
290
+ font-size: 9px;
291
+ line-height: 12px;
292
+ }
293
+
294
+ .__bar-row[_ngcontent-%COMP%] {
295
+ display: flex;
296
+ gap: 5px;
297
+ align-items: flex-end;
298
+ }
299
+
300
+ .__bar-row--infra[_ngcontent-%COMP%] {
301
+ gap: 9px;
302
+ }
303
+
304
+ .__bar-row--balancer[_ngcontent-%COMP%] {
305
+ gap: 5px;
306
+ }
307
+
308
+ .__bar-col[_ngcontent-%COMP%] {
309
+ display: flex;
310
+ flex-direction: column;
311
+ gap: 4px;
312
+ }
313
+
314
+ .__label-block[_ngcontent-%COMP%] {
315
+ display: flex;
316
+ flex-direction: column;
317
+ align-items: center;
318
+ gap: 5px;
319
+ }
320
+
321
+ .__tech-icon[_ngcontent-%COMP%] {
322
+ width: 16px !important;
323
+ height: 16px !important;
324
+ font-size: 16px !important;
325
+ line-height: 16px !important;
326
+ opacity: 1;
327
+ filter: grayscale(1);
328
+ }
329
+
330
+ .__service-box[_ngcontent-%COMP%] .__tech-icon[_ngcontent-%COMP%] {
331
+ width: 25px !important;
332
+ height: 25px !important;
333
+ font-size: 25px !important;
334
+ line-height: 25px !important;
335
+ position: absolute;
336
+ flex-shrink: 0;
337
+ left: -5px;
338
+ bottom: -5px;
339
+ }
340
+
341
+ .__tech-icons-row[_ngcontent-%COMP%] {
342
+ display: flex;
343
+ align-items: center;
344
+ gap: 6px;
345
+ }
346
+
347
+ .__endpoint-pill[_ngcontent-%COMP%] {
348
+ display: flex;
349
+ align-items: center;
350
+ justify-content: center;
351
+ width: 278px;
352
+ height: 51px;
353
+ padding: 22px;
354
+ background: #fff;
355
+ border-radius: 8px;
356
+ box-shadow: 0px 38px 15px rgba(0, 0, 0, 0.01), 0px 21px 13px rgba(0, 0, 0, 0.02), 0px 10px 10px rgba(0, 0, 0, 0.03), 0px 2px 5px rgba(0, 0, 0, 0.03);
357
+ }
358
+
359
+ .__endpoint-label[_ngcontent-%COMP%] {
360
+ font-family: var(--font-family-brand);
361
+ font-weight: 600;
362
+ font-size: 11px;
363
+ line-height: 14px;
364
+ letter-spacing: 0.12em;
365
+ text-transform: uppercase;
366
+ color: #464646;
367
+ text-align: center;
368
+ font-variation-settings: "CRSV" 0, "SHRP" 100, "slnt" 0;
369
+ }
370
+
371
+ .__infra-core-box[_ngcontent-%COMP%] {
372
+ display: flex;
373
+ flex-direction: column;
374
+ align-items: center;
375
+ gap: 11px;
376
+ width: var(--diagram-node-infra-core-width, 89px);
377
+ min-height: 97px;
378
+ }
379
+
380
+ .__infra-side-box[_ngcontent-%COMP%] {
381
+ display: flex;
382
+ flex-direction: column;
383
+ align-items: center;
384
+ min-height: 97px;
385
+ gap: 11px;
386
+ }
387
+
388
+ .__side-bottom[_ngcontent-%COMP%] {
389
+ display: flex;
390
+ flex-direction: column;
391
+ align-items: center;
392
+ gap: 5px;
393
+ }
394
+
395
+ .__balancer-box[_ngcontent-%COMP%] {
396
+ display: flex;
397
+ flex-direction: column;
398
+ align-items: center;
399
+ gap: 11px;
400
+ padding: 11px;
401
+ background: var(--alt-card-banner-bg);
402
+ background-blend-mode: multiply;
403
+ border-radius: 8px;
404
+ width: 85px;
405
+ height: 108px;
406
+ overflow: hidden;
407
+ }
408
+
409
+ .__balancer-label-area[_ngcontent-%COMP%] {
410
+ display: flex;
411
+ flex-direction: column;
412
+ align-items: center;
413
+ gap: 5px;
414
+ }
415
+
416
+ .__service-box[_ngcontent-%COMP%] {
417
+ position: relative;
418
+ overflow: hidden;
419
+ display: flex;
420
+ flex-direction: column;
421
+ align-items: center;
422
+ gap: 11px;
423
+ padding: 5px 5px 11px;
424
+ padding-bottom: 20px;
425
+ background: var(--service-bg, #D8D7D7);
426
+ border-radius: 8px;
427
+ }
428
+
429
+ .__services-row--top[_nghost-%COMP%] .__service-box[_ngcontent-%COMP%], .__services-row--top [_nghost-%COMP%] .__service-box[_ngcontent-%COMP%] {
430
+ padding: 5px;
431
+ padding-bottom: 20px;
432
+ }
433
+
434
+ .__compound[_nghost-%COMP%], .__compound [_nghost-%COMP%] {
435
+ position: static;
436
+ contain: style;
437
+ overflow: visible;
438
+ }
439
+
440
+ .__compound[_nghost-%COMP%] .__service-box[_ngcontent-%COMP%], .__compound [_nghost-%COMP%] .__service-box[_ngcontent-%COMP%] {
441
+ background: none;
442
+ border-radius: 0;
443
+ padding: 0;
444
+ position: static;
445
+ overflow: visible;
446
+ }
447
+
448
+ .__service-highlighted-box[_ngcontent-%COMP%] {
449
+ display: flex;
450
+ flex-direction: column;
451
+ align-items: center;
452
+ padding: 5px 5px 11px;
453
+ gap: 9px;
454
+ background: var(--alt-card-banner-bg);
455
+ background-blend-mode: multiply;
456
+ border-radius: 5px;
457
+ }
458
+
459
+ .__external-box[_ngcontent-%COMP%] {
460
+ display: flex;
461
+ flex-direction: column;
462
+ align-items: flex-start;
463
+ gap: 5px;
464
+ padding: 5px;
465
+ background: #D8D7D7;
466
+ border-radius: 8px;
467
+ width: 115px;
468
+ height: 74px;
469
+ justify-content: center;
470
+ }
471
+
472
+ .__ext-inner-card[_ngcontent-%COMP%] {
473
+ display: flex;
474
+ flex-direction: column;
475
+ align-items: center;
476
+ gap: 14px;
477
+ padding: 11px;
478
+ background: #fff;
479
+ border-radius: 5px;
480
+ width: 104px;
481
+ height: 41px;
482
+ justify-content: center;
483
+ box-shadow: 0px 38px 15px rgba(0, 0, 0, 0.01), 0px 21px 13px rgba(0, 0, 0, 0.02), 0px 10px 10px rgba(0, 0, 0, 0.03), 0px 2px 5px rgba(0, 0, 0, 0.03);
484
+ }
485
+
486
+ .__ext-sublabel-frame[_ngcontent-%COMP%] {
487
+ display: flex;
488
+ align-items: center;
489
+ justify-content: center;
490
+ width: 104px;
491
+ height: 18px;
492
+ padding: 5px;
493
+ background: #E8E7E7;
494
+ border-radius: 3px;
495
+ }`], changeDetection: 0 });
496
+ let Jn = un;
497
+ const xt = ["*"];
498
+ function Ct(t, e) {
499
+ if (t & 1 && (Fn(), p(0, "path", 27)), t & 2) {
500
+ const n = e.$implicit;
501
+ tn("d", n);
502
+ }
503
+ }
504
+ const Kn = {
505
+ ctrl: { active: 1, standby: 1 },
506
+ stats: { active: 1, standby: 0 },
507
+ logger: { active: 1, standby: 0 }
508
+ }, wt = {
509
+ containers: { active: 2, standby: 0 }
510
+ };
511
+ var Cn, En, wn, yn, ln, dn, Nn;
512
+ const mn = class mn {
513
+ // ─── Lifecycle ──────────────────────────────────────────
514
+ constructor() {
515
+ T(this, dn);
516
+ T(this, Cn);
517
+ T(this, En);
518
+ T(this, wn);
519
+ T(this, yn);
520
+ T(this, ln);
521
+ this.config = R({}), this.lightweight = R(!1), this.showPaths = R(!0), this.internalPaths = xn([]), this.pathsVisible = xn(!0), g(this, Cn, kn(ye)), g(this, En, kn(Me)), g(this, yn, !1), this.resolvedInfra = {
522
+ ctrl: {
523
+ id: "ctrl",
524
+ label: `Project ctrl
525
+ & L3 balancer
526
+ + firewall`,
527
+ containers: Kn.ctrl,
528
+ techIcons: ["go"],
529
+ highlighted: !0
530
+ },
531
+ stats: {
532
+ id: "stats",
533
+ label: "Stats",
534
+ containers: Kn.stats,
535
+ techIcon: "sqlite",
536
+ highlighted: !1
537
+ },
538
+ logger: {
539
+ id: "logger",
540
+ label: "Logger",
541
+ containers: Kn.logger,
542
+ techIcon: "victorialogs",
543
+ highlighted: !1
544
+ }
545
+ }, this.resolvedLightweightNode = {
546
+ id: "ctrl",
547
+ label: `Project ctrl
548
+ & L3/L7 balancer
549
+ + firewall + stats
550
+ + logger`,
551
+ containers: { active: 1, standby: 0 },
552
+ techIcons: ["go", "sqlite", "victorialogs"],
553
+ highlighted: !0
554
+ }, this.resolvedRoutingDisplay = {
555
+ id: "l7",
556
+ label: `L7 HTTP
557
+ balancer`,
558
+ containers: wt.containers,
559
+ techIcon: "nginx",
560
+ highlighted: !0
561
+ }, we(() => {
562
+ g(this, yn, !0), g(this, ln, this.lightweight()), g(this, wn, new ResizeObserver(() => w(this, dn, Nn).call(this))), _(this, wn).observe(_(this, Cn).nativeElement), _(this, En).onDestroy(() => _(this, wn)?.disconnect()), requestAnimationFrame(() => {
563
+ requestAnimationFrame(() => w(this, dn, Nn).call(this));
564
+ });
565
+ }), Un(() => {
566
+ this.config();
567
+ const e = this.lightweight();
568
+ if (!_(this, yn))
569
+ return;
570
+ const n = _(this, ln) !== void 0 && _(this, ln) !== e;
571
+ g(this, ln, e), n ? (this.pathsVisible.set(!1), setTimeout(() => {
572
+ requestAnimationFrame(() => {
573
+ requestAnimationFrame(() => {
574
+ w(this, dn, Nn).call(this), this.pathsVisible.set(!0);
575
+ });
576
+ });
577
+ }, 200)) : requestAnimationFrame(() => {
578
+ requestAnimationFrame(() => w(this, dn, Nn).call(this));
579
+ });
580
+ });
581
+ }
582
+ };
583
+ Cn = new WeakMap(), En = new WeakMap(), wn = new WeakMap(), yn = new WeakMap(), ln = new WeakMap(), dn = new WeakSet(), // ─── Internal path computation ──────────────────────────
584
+ Nn = function() {
585
+ if (!this.showPaths()) {
586
+ this.internalPaths.set([]);
587
+ return;
588
+ }
589
+ const n = _(this, Cn).nativeElement.querySelector(".__project");
590
+ if (!n)
591
+ return;
592
+ const o = n.getBoundingClientRect();
593
+ if (o.width === 0)
594
+ return;
595
+ const i = (C) => Math.round(C * 10) / 10, P = (C) => {
596
+ const b = C.getBoundingClientRect();
597
+ return [
598
+ i(b.left - o.left + b.width / 2),
599
+ i(b.top - o.top + b.height)
600
+ ];
601
+ }, v = (C) => {
602
+ const b = C.getBoundingClientRect();
603
+ return [
604
+ i(b.left - o.left + b.width / 2),
605
+ i(b.top - o.top)
606
+ ];
607
+ }, c = [], D = 16, j = 27, q = (C, b, O) => {
608
+ const [N, S] = C, [E, K] = b, U = E - N;
609
+ if (Math.abs(U) < 3) {
610
+ const W = i((N + E) / 2);
611
+ return `M${W},${i(S)}L${W},${i(K)}`;
612
+ }
613
+ const nn = Math.min(D, Math.abs(U) / 2, Math.abs(O - S) / 2, Math.abs(K - O) / 2), F = Math.sign(U), J = Math.sign(K - O) || 1;
614
+ return [
615
+ `M${i(N)},${i(S)}`,
616
+ `L${i(N)},${i(O - nn)}`,
617
+ `Q${i(N)},${i(O)},${i(N + nn * F)},${i(O)}`,
618
+ `L${i(E - nn * F)},${i(O)}`,
619
+ `Q${i(E)},${i(O)},${i(E)},${i(O + nn * J)}`,
620
+ `L${i(E)},${i(K)}`
621
+ ].join("");
622
+ }, k = n.querySelector(".__zone--services");
623
+ if (this.lightweight()) {
624
+ const C = n.querySelector('[data-mode="lw"]');
625
+ if (C && k) {
626
+ const b = C.querySelector(".__infra-group");
627
+ if (b) {
628
+ const [O, N] = P(b), S = v(k)[1];
629
+ c.push(`M${i(O)},${i(N)}L${i(O)},${i(S)}`);
630
+ }
631
+ }
632
+ } else {
633
+ const C = n.querySelector('[data-mode="hw"]');
634
+ if (!C) {
635
+ this.internalPaths.set(c);
636
+ return;
637
+ }
638
+ const b = C.querySelector(".__infra-group"), O = C.querySelector('[data-node-id="ctrl"]'), N = C.querySelector('[data-node-id="l7"]');
639
+ if (b && O && N) {
640
+ const S = P(O)[0], E = P(b)[1], K = [S, E], U = Array.from(N.querySelectorAll("zui-bar-icon")), nn = this.resolvedRoutingDisplay.containers.active;
641
+ for (let F = 0; F < U.length; F++) {
642
+ if (F >= nn)
643
+ continue;
644
+ const J = v(U[F]), W = J[1] - j;
645
+ c.push(q(K, J, W));
646
+ }
647
+ if (k) {
648
+ const [F, J] = P(N), W = v(k)[1];
649
+ c.push(`M${i(F)},${i(J)}L${i(F)},${i(W)}`);
650
+ }
651
+ }
652
+ }
653
+ this.internalPaths.set(c);
654
+ }, mn.ɵfac = function(n) {
655
+ return new (n || mn)();
656
+ }, mn.ɵcmp = /* @__PURE__ */ Yn({ type: mn, selectors: [["zw-project-shell"]], inputs: { config: [1, "config"], lightweight: [1, "lightweight"], showPaths: [1, "showPaths"] }, ngContentSelectors: xt, decls: 48, vars: 28, consts: [[1, "__project"], [1, "__project-header"], [1, "__project-title"], [1, "__vxlan-label"], [1, "__infra-stack"], ["data-mode", "lw", 1, "__infra-mode"], [1, "__infra-mode-inner"], [1, "__zone", "__zone--infra", "__zone--infra-lightweight"], [1, "__zone-label"], [1, "__infra-content", "__infra-content--lightweight"], [1, "__infra-group"], ["variant", "infra-core", "barColor", "orange", 3, "label", "containers", "techIcons", "highlighted"], ["data-mode", "hw", 1, "__infra-mode"], [1, "__zone", "__zone--infra"], [1, "__infra-content"], ["data-node-id", "ctrl"], [1, "__infra-side-nodes"], ["data-node-id", "stats"], ["variant", "infra-side", "barColor", "orange", 3, "label", "containers", "techIcon", "highlighted"], ["data-node-id", "logger"], [1, "__zone-spacer", "__zone-spacer--infra-to-routing"], [1, "__zone", "__zone--routing"], [1, "__routing-content"], ["data-node-id", "l7"], ["variant", "balancer", "barColor", "orange", 3, "label", "containers", "techIcon", "highlighted"], ["data-spacer", "routing-services", 1, "__zone-spacer", "__zone-spacer--routing-to-services"], [1, "__svg-layer"], [1, "__path-base"]], template: function(n, o) {
657
+ n & 1 && (Ae(), m(0, "div", 0)(1, "div", 1)(2, "span", 2), z(3, "Project"), d(), m(4, "span", 3), z(5, "Private VXLAN network"), d()(), m(6, "div", 4)(7, "div", 5)(8, "div", 6)(9, "div", 7)(10, "span", 8), z(11, "Dedicated"), p(12, "br"), z(13, "infrastructure"), p(14, "br"), z(15, "core with routing"), p(16, "br"), z(17, "and balancing"), d(), m(18, "div", 9)(19, "div", 10)(20, "div"), p(21, "zw-diagram-node", 11), d()()()()()(), m(22, "div", 12)(23, "div", 6)(24, "div", 13)(25, "span", 8), z(26, "Dedicated infrastructure core"), d(), m(27, "div", 14)(28, "div", 10)(29, "div", 15), p(30, "zw-diagram-node", 11), d(), m(31, "div", 16)(32, "div", 17), p(33, "zw-diagram-node", 18), d(), m(34, "div", 19), p(35, "zw-diagram-node", 18), d()()()()(), p(36, "div", 20), m(37, "div", 21)(38, "span", 8), z(39, "Dedicated routing and balancing"), d(), m(40, "div", 22)(41, "div", 23), p(42, "zw-diagram-node", 24), d()()()()()(), p(43, "div", 25), Be(44), Fn(), m(45, "svg", 26), L(46, Ct, 1, 1, ":svg:path", 27, oe), d()()), n & 2 && (Dn("__project--lightweight", o.lightweight()), s(7), Dn("__infra-mode--active", o.lightweight()), s(14), M("label", o.resolvedLightweightNode.label)("containers", o.resolvedLightweightNode.containers)("techIcons", o.resolvedLightweightNode.techIcons)("highlighted", o.resolvedLightweightNode.highlighted), s(), Dn("__infra-mode--active", !o.lightweight()), s(8), M("label", o.resolvedInfra.ctrl.label)("containers", o.resolvedInfra.ctrl.containers)("techIcons", o.resolvedInfra.ctrl.techIcons)("highlighted", o.resolvedInfra.ctrl.highlighted), s(3), M("label", o.resolvedInfra.stats.label)("containers", o.resolvedInfra.stats.containers)("techIcon", o.resolvedInfra.stats.techIcon)("highlighted", o.resolvedInfra.stats.highlighted), s(2), M("label", o.resolvedInfra.logger.label)("containers", o.resolvedInfra.logger.containers)("techIcon", o.resolvedInfra.logger.techIcon)("highlighted", o.resolvedInfra.logger.highlighted), s(7), M("label", o.resolvedRoutingDisplay.label)("containers", o.resolvedRoutingDisplay.containers)("techIcon", o.resolvedRoutingDisplay.techIcon)("highlighted", o.resolvedRoutingDisplay.highlighted), s(3), Dn("__svg-layer--visible", o.pathsVisible()), s(), A(o.internalPaths()));
658
+ }, dependencies: [Jn], styles: [`[_nghost-%COMP%] {
659
+ display: block;
660
+ position: relative;
661
+ }
662
+
663
+ .__project[_ngcontent-%COMP%] {
664
+ position: relative;
665
+ width: 100%;
666
+ border: 1px solid #D8D7D7;
667
+ border-left-width: var(--project-shell-side-border, 1px);
668
+ border-right-width: var(--project-shell-side-border, 1px);
669
+ border-radius: var(--project-shell-border-radius, 16px);
670
+ background: #F0F0F0;
671
+ padding: var(--project-shell-padding, 88px 9px 11px);
672
+ display: flex;
673
+ flex-direction: column;
674
+ gap: 0;
675
+ }
676
+
677
+ .__project-header[_ngcontent-%COMP%] {
678
+ position: absolute;
679
+ top: var(--project-shell-header-top, 31px);
680
+ left: var(--project-shell-header-left, 31px);
681
+ display: flex;
682
+ flex-direction: column;
683
+ gap: 3px;
684
+ }
685
+
686
+ .__project-title[_ngcontent-%COMP%] {
687
+ font-family: var(--font-family-brand);
688
+ font-weight: 600;
689
+ font-size: 11px;
690
+ line-height: 14px;
691
+ letter-spacing: 0.12em;
692
+ text-transform: uppercase;
693
+ color: #254E4A;
694
+ font-variation-settings: "CRSV" 0, "SHRP" 100, "slnt" 0;
695
+ }
696
+
697
+ .__vxlan-label[_ngcontent-%COMP%] {
698
+ font-family: "Roboto Mono", "JetBrains Mono", ui-monospace, monospace;
699
+ font-weight: 400;
700
+ font-size: 9px;
701
+ line-height: 12px;
702
+ letter-spacing: 0.02em;
703
+ color: #254E4A;
704
+ }
705
+
706
+ .__infra-stack[_ngcontent-%COMP%] {
707
+ display: grid;
708
+ }
709
+
710
+ .__infra-mode[_ngcontent-%COMP%] {
711
+ grid-row: 1;
712
+ grid-column: 1;
713
+ display: grid;
714
+ grid-template-rows: 0fr;
715
+ opacity: 0;
716
+ pointer-events: none;
717
+ transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s, grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.12s;
718
+ }
719
+ .__infra-mode--active[_ngcontent-%COMP%] {
720
+ grid-template-rows: 1fr;
721
+ opacity: 1;
722
+ pointer-events: auto;
723
+ transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0s, opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
724
+ }
725
+
726
+ .__infra-mode-inner[_ngcontent-%COMP%] {
727
+ min-height: 0;
728
+ overflow: hidden;
729
+ }
730
+
731
+ .__zone[_ngcontent-%COMP%] {
732
+ position: relative;
733
+ border-radius: 8px;
734
+ background: rgba(232, 231, 231, 0.5);
735
+ padding: 20px 14px;
736
+ }
737
+
738
+ .__zone-label[_ngcontent-%COMP%] {
739
+ position: absolute;
740
+ top: var(--project-shell-zone-label-top, 23px);
741
+ left: var(--project-shell-zone-label-left, 23px);
742
+ font-family: var(--font-family-brand);
743
+ font-weight: 600;
744
+ font-size: 11px;
745
+ line-height: 14px;
746
+ letter-spacing: 0.12em;
747
+ text-transform: uppercase;
748
+ color: #254E4A;
749
+ opacity: 0.6;
750
+ font-variation-settings: "CRSV" 0, "SHRP" 100, "slnt" 0;
751
+ }
752
+
753
+ .__zone--infra[_ngcontent-%COMP%] > .__zone-label[_ngcontent-%COMP%] {
754
+ top: 28px;
755
+ max-width: 119px;
756
+ }
757
+
758
+ .__zone--infra-lightweight[_ngcontent-%COMP%] > .__zone-label[_ngcontent-%COMP%] {
759
+ max-width: 180px;
760
+ }
761
+
762
+ .__zone--routing[_ngcontent-%COMP%] > .__zone-label[_ngcontent-%COMP%] {
763
+ max-width: 139px;
764
+ }
765
+
766
+ .__zone-spacer[_ngcontent-%COMP%] {
767
+ flex-shrink: 0;
768
+ }
769
+
770
+ .__zone-spacer--infra-to-routing[_ngcontent-%COMP%] {
771
+ height: 9px;
772
+ }
773
+
774
+ .__zone-spacer--routing-to-services[_ngcontent-%COMP%] {
775
+ height: 34px;
776
+ }
777
+
778
+ .__infra-content[_ngcontent-%COMP%] {
779
+ display: flex;
780
+ justify-content: center;
781
+ padding-left: var(--project-shell-infra-pad-left, 122px);
782
+ }
783
+
784
+ .__infra-content--lightweight[_ngcontent-%COMP%] {
785
+ padding-left: 0;
786
+ --diagram-node-infra-core-width: 120px;
787
+ }
788
+
789
+ .__infra-group[_ngcontent-%COMP%] {
790
+ display: flex;
791
+ flex-direction: row;
792
+ align-items: flex-start;
793
+ gap: 18px;
794
+ padding: 11px;
795
+ background: var(--alt-card-banner-bg);
796
+ background-blend-mode: multiply;
797
+ border-radius: 8px;
798
+ }
799
+
800
+ .__infra-side-nodes[_ngcontent-%COMP%] {
801
+ display: flex;
802
+ gap: 3px;
803
+ align-items: flex-start;
804
+ }
805
+
806
+ .__routing-content[_ngcontent-%COMP%] {
807
+ display: flex;
808
+ justify-content: center;
809
+ }
810
+
811
+ .__svg-layer[_ngcontent-%COMP%] {
812
+ position: absolute;
813
+ inset: 0;
814
+ pointer-events: none;
815
+ overflow: visible;
816
+ opacity: 0;
817
+ transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
818
+ }
819
+ .__svg-layer--visible[_ngcontent-%COMP%] {
820
+ opacity: 1;
821
+ }
822
+
823
+ .__path-base[_ngcontent-%COMP%] {
824
+ fill: none;
825
+ stroke: #C4C3C3;
826
+ stroke-width: 2;
827
+ stroke-linecap: round;
828
+ stroke-linejoin: round;
829
+ }`], changeDetection: 0 });
830
+ let ie = mn;
831
+ const ae = (t, e) => e.service.id;
832
+ function yt(t, e) {
833
+ if (t & 1 && (m(0, "div"), p(1, "zw-diagram-node", 13), d()), t & 2) {
834
+ const n = e.$implicit;
835
+ tn("data-node-id", n.service.id), s(), M("label", n.service.label)("containers", n.service.containers)("barColor", n.barColor)("techIcon", n.service.techIcon);
836
+ }
837
+ }
838
+ function Mt(t, e) {
839
+ if (t & 1 && (m(0, "div"), p(1, "zw-diagram-node", 13), d()), t & 2) {
840
+ const n = e.$implicit;
841
+ tn("data-node-id", n.service.id), s(), M("label", n.service.label)("containers", n.service.containers)("barColor", n.barColor)("techIcon", n.service.techIcon);
842
+ }
843
+ }
844
+ function It(t, e) {
845
+ if (t & 1 && (m(0, "div", 8), L(1, Mt, 2, 5, "div", null, ae), d()), t & 2) {
846
+ const n = I();
847
+ s(), A(n.row1SideServices());
848
+ }
849
+ }
850
+ function Pt(t, e) {
851
+ t & 1 && p(0, "div");
852
+ }
853
+ function Ot(t, e) {
854
+ if (t & 1 && (m(0, "div", 14)(1, "div", 15), p(2, "zw-diagram-node", 16), d(), m(3, "div", 17), p(4, "zw-diagram-node", 13), d()()), t & 2) {
855
+ const n = e, o = I().$implicit;
856
+ tn("data-node-id", o.service.id + "-compound"), s(), tn("data-node-id", n.id), s(), M("label", n.label)("containers", n.containers)("barColor", n.barColor)("highlighted", !0), s(), tn("data-node-id", o.service.id), s(), M("label", o.service.label)("containers", o.service.containers)("barColor", o.barColor)("techIcon", o.service.techIcon);
857
+ }
858
+ }
859
+ function Tt(t, e) {
860
+ if (t & 1 && (m(0, "div"), p(1, "zw-diagram-node", 13), d()), t & 2) {
861
+ const n = I().$implicit;
862
+ tn("data-node-id", n.service.id), s(), M("label", n.service.label)("containers", n.service.containers)("barColor", n.barColor)("techIcon", n.service.techIcon);
863
+ }
864
+ }
865
+ function $t(t, e) {
866
+ if (t & 1 && V(0, Ot, 5, 11, "div", 14)(1, Tt, 2, 5, "div"), t & 2) {
867
+ let n;
868
+ const o = e.$implicit;
869
+ Z((n = o.loadBalancer) ? 0 : 1, n);
870
+ }
871
+ }
872
+ function St(t, e) {
873
+ if (t & 1 && (m(0, "div", 11), p(1, "zw-diagram-node", 18), d()), t & 2) {
874
+ const n = e;
875
+ s(), M("label", n.label)("sublabel", n.sublabel);
876
+ }
877
+ }
878
+ function zt(t, e) {
879
+ if (t & 1 && (Fn(), p(0, "path", 19)), t & 2) {
880
+ const n = I().$implicit;
881
+ tn("d", n.d);
882
+ }
883
+ }
884
+ function Dt(t, e) {
885
+ if (t & 1 && V(0, zt, 1, 1, ":svg:path", 19), t & 2) {
886
+ const n = e.$implicit;
887
+ Z(n.renderMode !== "glow-only" ? 0 : -1);
888
+ }
889
+ }
890
+ function Nt(t, e) {
891
+ if (t & 1 && (Fn(), p(0, "path", 20)), t & 2) {
892
+ const n = I(), o = n.$implicit, i = n.$index;
893
+ tn("d", o.d)("data-path-idx", i);
894
+ }
895
+ }
896
+ function kt(t, e) {
897
+ if (t & 1 && V(0, Nt, 1, 2, ":svg:path", 20), t & 2) {
898
+ const n = e.$implicit;
899
+ Z(n.renderMode !== "base-only" ? 0 : -1);
900
+ }
901
+ }
902
+ const Et = 660, ne = {
903
+ ctrl: { active: 1, standby: 1 },
904
+ stats: { active: 1, standby: 0 },
905
+ logger: { active: 1, standby: 0 }
906
+ }, Rt = {
907
+ containers: { active: 2, standby: 0 }
908
+ }, Sn = 600, zn = 1050, ee = 525, te = 900, Lt = 3300, At = 900, be = 2250, Bt = 2e3, Ft = 400;
909
+ var en, Mn, In, Pn, On, H, Rn, _n, hn, gn, on, an, rn, h, Gn, Oe, Te, Vn, $e, se, ce, Se, ze, De, Ne, Zn, Hn, le;
910
+ const vn = class vn {
911
+ // ─── Lifecycle ──────────────────────────────────────────
912
+ constructor() {
913
+ T(this, h);
914
+ T(this, en);
915
+ T(this, Mn);
916
+ T(this, In);
917
+ T(this, Pn);
918
+ T(this, On);
919
+ T(this, H);
920
+ // rAF id for coalesced recomputation
921
+ // ─── Trace orchestrator state ──────────────────────────
922
+ T(this, Rn);
923
+ T(this, _n);
924
+ T(this, hn);
925
+ T(this, gn);
926
+ T(this, on);
927
+ T(this, an);
928
+ T(this, rn);
929
+ this.config = R(Pe), this.annotatedPaths = xn([]), g(this, en, kn(ye)), g(this, Mn, kn(Me)), g(this, Pn, 1), g(this, On, !1), g(this, H, 0), g(this, Rn, 0), g(this, _n, 0), g(this, hn, 0), g(this, gn, !1), g(this, on, !1), g(this, an, /* @__PURE__ */ new Map()), g(this, rn, /* @__PURE__ */ new Map()), this.shellConfig = G(() => ({
930
+ infrastructure: this.config().infrastructure,
931
+ routing: this.config().routing
932
+ })), this.resolvedInfra = G(() => {
933
+ const e = this.config().infrastructure ?? {};
934
+ return {
935
+ ctrl: {
936
+ id: "ctrl",
937
+ label: `Project ctrl
938
+ & L3 balancer
939
+ + firewall`,
940
+ containers: e.ctrl ?? ne.ctrl,
941
+ techIcons: ["go"],
942
+ highlighted: !0
943
+ },
944
+ stats: {
945
+ id: "stats",
946
+ label: "Stats",
947
+ containers: e.stats ?? ne.stats,
948
+ techIcon: "sqlite",
949
+ highlighted: !1
950
+ },
951
+ logger: {
952
+ id: "logger",
953
+ label: "Logger",
954
+ containers: e.logger ?? ne.logger,
955
+ techIcon: "victorialogs",
956
+ highlighted: !1
957
+ }
958
+ };
959
+ }), this.resolvedRouting = G(() => {
960
+ const e = this.config().routing;
961
+ return e ? {
962
+ id: "l7",
963
+ label: `L7 HTTP
964
+ balancer`,
965
+ containers: e.containers ?? Rt.containers,
966
+ techIcon: "nginx",
967
+ highlighted: !0
968
+ } : null;
969
+ }), this.row1MainServices = G(() => this.config().services.filter((e) => e.category === "http-runtime").map((e) => w(this, h, Vn).call(this, e))), this.row1SideServices = G(() => this.config().services.filter((e) => e.category === "side-runtime").map((e) => w(this, h, Vn).call(this, e))), this.row1Services = G(() => [...this.row1MainServices()]), this.row2Services = G(() => this.config().services.filter((e) => e.category !== "http-runtime" && e.category !== "side-runtime").map((e) => w(this, h, Vn).call(this, e))), this.resolvedStorage = G(() => {
970
+ const e = this.config().storage;
971
+ return e ? {
972
+ label: e.label ?? "Object storage",
973
+ sublabel: e.sublabel ?? "storage:6379"
974
+ } : null;
975
+ }), we(() => {
976
+ g(this, On, !0), g(this, In, new ResizeObserver(() => {
977
+ w(this, h, Gn).call(this);
978
+ })), _(this, In).observe(_(this, en).nativeElement), _(this, Mn).onDestroy(() => {
979
+ _(this, In)?.disconnect(), w(this, h, se).call(this), _(this, H) && cancelAnimationFrame(_(this, H));
980
+ }), w(this, h, Gn).call(this);
981
+ const e = new IntersectionObserver(([n]) => {
982
+ n.isIntersecting ? w(this, h, $e).call(this) : w(this, h, se).call(this);
983
+ }, { rootMargin: "200px 0px" });
984
+ e.observe(_(this, en).nativeElement), _(this, Mn).onDestroy(() => e.disconnect());
985
+ }), Un(() => {
986
+ this.config(), _(this, On) && w(this, h, Gn).call(this);
987
+ });
988
+ }
989
+ };
990
+ en = new WeakMap(), Mn = new WeakMap(), In = new WeakMap(), Pn = new WeakMap(), On = new WeakMap(), H = new WeakMap(), Rn = new WeakMap(), _n = new WeakMap(), hn = new WeakMap(), gn = new WeakMap(), on = new WeakMap(), an = new WeakMap(), rn = new WeakMap(), h = new WeakSet(), // ─── Private ────────────────────────────────────────────
991
+ /**
992
+ * Coalesces all path recomputation requests through a single double-rAF.
993
+ * Prevents stale DOM measurements when ResizeObserver fires before Angular
994
+ * has flushed template changes from a config update.
995
+ */
996
+ Gn = function() {
997
+ _(this, H) && cancelAnimationFrame(_(this, H)), g(this, H, requestAnimationFrame(() => {
998
+ g(this, H, requestAnimationFrame(() => {
999
+ g(this, H, 0), w(this, h, ce).call(this), w(this, h, Oe).call(this), w(this, h, Te).call(this);
1000
+ }));
1001
+ }));
1002
+ }, Oe = function() {
1003
+ const e = _(this, en).nativeElement, o = e.clientWidth / Et;
1004
+ g(this, Pn, o), e.style.setProperty("--diagram-scale", String(o));
1005
+ const i = e.querySelector(".__canvas");
1006
+ i && (e.style.height = `${i.scrollHeight * o}px`);
1007
+ }, Te = function() {
1008
+ const e = _(this, en).nativeElement, n = e.querySelector(".__canvas");
1009
+ if (!n)
1010
+ return;
1011
+ const o = n.getBoundingClientRect();
1012
+ if (o.width === 0)
1013
+ return;
1014
+ const i = _(this, Pn), P = (r) => {
1015
+ const l = r.getBoundingClientRect();
1016
+ return {
1017
+ x: (l.left - o.left) / i,
1018
+ y: (l.top - o.top) / i,
1019
+ w: l.width / i,
1020
+ h: l.height / i
1021
+ };
1022
+ }, v = (r) => {
1023
+ const l = P(r);
1024
+ return [l.x + l.w / 2, l.y];
1025
+ }, c = (r) => {
1026
+ const l = P(r);
1027
+ return [l.x + l.w / 2, l.y + l.h];
1028
+ }, D = (r) => n.querySelector(`[data-node-id="${r}"]`), j = (r, l) => {
1029
+ const f = D(r);
1030
+ return f ? Array.from(f.querySelectorAll("zui-bar-icon")).map((u, y) => ({
1031
+ point: v(u),
1032
+ barIndex: y,
1033
+ active: l !== void 0 ? y < l : !0
1034
+ })) : [];
1035
+ }, q = 16, k = 27, a = (r) => Math.round(r * 10) / 10, C = (r, l, f) => {
1036
+ const [u, y] = r, [x, $] = l, sn = x - u;
1037
+ if (Math.abs(sn) < 3) {
1038
+ const cn = a((u + x) / 2);
1039
+ return `M${cn},${a(y)}L${cn},${a($)}`;
1040
+ }
1041
+ const B = Math.min(q, Math.abs(sn) / 2, Math.abs(f - y) / 2, Math.abs($ - f) / 2), Y = Math.sign(sn), qn = Math.sign($ - f) || 1;
1042
+ return [
1043
+ `M${a(u)},${a(y)}`,
1044
+ `L${a(u)},${a(f - B)}`,
1045
+ `Q${a(u)},${a(f)},${a(u + B * Y)},${a(f)}`,
1046
+ `L${a(x - B * Y)},${a(f)}`,
1047
+ `Q${a(x)},${a(f)},${a(x)},${a(f + B * qn)}`,
1048
+ `L${a(x)},${a($)}`
1049
+ ].join("");
1050
+ }, b = [], O = D("endpoint"), N = this.resolvedInfra(), S = j("ctrl", N.ctrl.containers.active);
1051
+ if (O && S.length) {
1052
+ const r = c(O), f = Math.min(...S.map((u) => u.point[1])) - k;
1053
+ for (const u of S)
1054
+ b.push({
1055
+ d: C(r, u.point, f),
1056
+ depth: 0,
1057
+ sourceNodeId: "endpoint",
1058
+ targetNodeId: "ctrl",
1059
+ targetBarIndex: u.barIndex,
1060
+ active: u.active
1061
+ });
1062
+ }
1063
+ const E = D("ctrl"), K = n.querySelector(".__infra-mode--active .__infra-group"), U = D("l7"), nn = this.resolvedRouting();
1064
+ if (E && U && K && nn) {
1065
+ const r = j("l7", nn.containers.active);
1066
+ if (r.length) {
1067
+ const l = c(E)[0], f = c(K)[1], u = [l, f], x = Math.min(...r.map(($) => $.point[1])) - k;
1068
+ for (const $ of r)
1069
+ b.push({
1070
+ d: C(u, $.point, x),
1071
+ depth: 1,
1072
+ sourceNodeId: "ctrl",
1073
+ targetNodeId: "l7",
1074
+ targetBarIndex: $.barIndex,
1075
+ active: $.active
1076
+ });
1077
+ }
1078
+ }
1079
+ if (U)
1080
+ for (const r of this.row1Services()) {
1081
+ const l = j(r.service.id, r.service.containers.active);
1082
+ if (l.length) {
1083
+ const f = c(U), u = Math.min(...l.map((x) => x.point[1])), y = (f[1] + u) / 2;
1084
+ for (const x of l)
1085
+ b.push({
1086
+ d: C(f, x.point, y),
1087
+ depth: 2,
1088
+ sourceNodeId: "l7",
1089
+ targetNodeId: r.service.id,
1090
+ targetBarIndex: x.barIndex,
1091
+ active: x.active
1092
+ });
1093
+ }
1094
+ }
1095
+ const F = 19, J = 11, W = [], $n = [];
1096
+ for (const r of this.row2Services())
1097
+ if (r.loadBalancer)
1098
+ for (const l of j(r.loadBalancer.id, r.loadBalancer.containers.active))
1099
+ $n.push({ ...l, nodeId: r.loadBalancer.id });
1100
+ else
1101
+ for (const l of j(r.service.id, r.service.containers.active))
1102
+ W.push({ ...l, nodeId: r.service.id });
1103
+ const _e = D("storage"), jn = _e ? v(_e) : null;
1104
+ let fn = 0, he = 0;
1105
+ for (const r of this.row1Services()) {
1106
+ const l = D(r.service.id);
1107
+ if (!l)
1108
+ continue;
1109
+ const f = c(l);
1110
+ he = f[0];
1111
+ const u = W.length ? Math.min(...W.map((x) => x.point[1])) : $n.length ? Math.min(...$n.map((x) => x.point[1])) : 0, y = Math.max(f[1] + q, u - k);
1112
+ fn = y, jn && b.push({
1113
+ d: C(f, jn, y - F),
1114
+ depth: 3,
1115
+ sourceNodeId: r.service.id,
1116
+ targetNodeId: "storage",
1117
+ targetBarIndex: -1,
1118
+ active: !0
1119
+ });
1120
+ for (const x of W)
1121
+ b.push({
1122
+ d: C(f, x.point, y),
1123
+ depth: 3,
1124
+ sourceNodeId: r.service.id,
1125
+ targetNodeId: x.nodeId,
1126
+ targetBarIndex: x.barIndex,
1127
+ active: x.active
1128
+ });
1129
+ for (const x of $n)
1130
+ b.push({
1131
+ d: C(f, x.point, y + J),
1132
+ depth: 3,
1133
+ sourceNodeId: r.service.id,
1134
+ targetNodeId: x.nodeId,
1135
+ targetBarIndex: x.barIndex,
1136
+ active: x.active
1137
+ });
1138
+ }
1139
+ for (const r of this.row1SideServices()) {
1140
+ const l = D(r.service.id);
1141
+ if (!l || !fn)
1142
+ continue;
1143
+ const f = c(l);
1144
+ b.push({
1145
+ d: `M${a(f[0])},${a(f[1])}L${a(f[0])},${a(fn)}`,
1146
+ depth: 3,
1147
+ sourceNodeId: r.service.id,
1148
+ targetNodeId: "bus-rail",
1149
+ targetBarIndex: -1,
1150
+ active: !0,
1151
+ renderMode: "base-only"
1152
+ }), jn && b.push({
1153
+ d: C(f, jn, fn - F),
1154
+ depth: 3,
1155
+ sourceNodeId: r.service.id,
1156
+ targetNodeId: "storage",
1157
+ targetBarIndex: -1,
1158
+ active: !0,
1159
+ renderMode: "glow-only"
1160
+ });
1161
+ for (const u of W)
1162
+ b.push({
1163
+ d: C(f, u.point, fn),
1164
+ depth: 3,
1165
+ sourceNodeId: r.service.id,
1166
+ targetNodeId: u.nodeId,
1167
+ targetBarIndex: u.barIndex,
1168
+ active: u.active,
1169
+ renderMode: "glow-only"
1170
+ });
1171
+ for (const u of $n) {
1172
+ const [y, x] = f, [$, sn] = u.point, B = fn, Y = he, qn = Y - y, cn = Math.min(q, Math.abs(qn) / 2, Math.abs(B - x) / 2), ge = Math.sign(qn), Wn = $ - Y;
1173
+ let Qn;
1174
+ if (Math.abs(Wn) < 3) {
1175
+ const Q = a((Y + $) / 2);
1176
+ Qn = [
1177
+ `M${a(y)},${a(x)}`,
1178
+ `L${a(y)},${a(B - cn)}`,
1179
+ `Q${a(y)},${a(B)},${a(y + cn * ge)},${a(B)}`,
1180
+ `L${a(Q)},${a(B)}`,
1181
+ `L${a(Q)},${a(sn)}`
1182
+ ].join("");
1183
+ } else {
1184
+ const Q = B + J, pe = Math.sign(Wn), fe = Math.min(q, J / 2, Math.abs(Wn) / 2), ue = Math.min(q, Math.abs(Wn) / 2, Math.abs(sn - Q) / 2);
1185
+ Qn = [
1186
+ `M${a(y)},${a(x)}`,
1187
+ `L${a(y)},${a(B - cn)}`,
1188
+ `Q${a(y)},${a(B)},${a(y + cn * ge)},${a(B)}`,
1189
+ `L${a(Y)},${a(B)}`,
1190
+ `L${a(Y)},${a(Q - fe)}`,
1191
+ `Q${a(Y)},${a(Q)},${a(Y + fe * pe)},${a(Q)}`,
1192
+ `L${a($ - ue * pe)},${a(Q)}`,
1193
+ `Q${a($)},${a(Q)},${a($)},${a(Q + ue)}`,
1194
+ `L${a($)},${a(sn)}`
1195
+ ].join("");
1196
+ }
1197
+ b.push({
1198
+ d: Qn,
1199
+ depth: 3,
1200
+ sourceNodeId: r.service.id,
1201
+ targetNodeId: u.nodeId,
1202
+ targetBarIndex: u.barIndex,
1203
+ active: u.active,
1204
+ renderMode: "glow-only"
1205
+ });
1206
+ }
1207
+ }
1208
+ for (const r of this.row2Services())
1209
+ if (r.loadBalancer) {
1210
+ const l = D(r.loadBalancer.id), f = j(r.service.id, r.service.containers.active);
1211
+ if (l && f.length) {
1212
+ const u = c(l), y = Math.min(...f.map(($) => $.point[1])), x = (u[1] + y) / 2;
1213
+ for (const $ of f)
1214
+ b.push({
1215
+ d: C(u, $.point, x),
1216
+ depth: 4,
1217
+ sourceNodeId: r.loadBalancer.id,
1218
+ targetNodeId: r.service.id,
1219
+ targetBarIndex: $.barIndex,
1220
+ active: $.active
1221
+ });
1222
+ }
1223
+ }
1224
+ this.annotatedPaths.set(b), requestAnimationFrame(() => {
1225
+ const r = e.querySelector(".__canvas > .__svg-layer");
1226
+ if (!r)
1227
+ return;
1228
+ const l = this.annotatedPaths();
1229
+ let f = !1;
1230
+ for (let u = 0; u < l.length; u++) {
1231
+ if (l[u].cachedLength != null)
1232
+ continue;
1233
+ const y = r.querySelector(`[data-path-idx="${u}"]`);
1234
+ y && (l[u].cachedLength = Math.ceil(y.getTotalLength()), f = !0);
1235
+ }
1236
+ f && this.annotatedPaths.set([...l]);
1237
+ });
1238
+ }, Vn = function(e) {
1239
+ const n = e.category === "managed" ? "orange" : "cyan";
1240
+ let o;
1241
+ if (e.hasLoadBalancer) {
1242
+ const i = e.loadBalancer ?? {};
1243
+ o = {
1244
+ id: `${e.id}-lb`,
1245
+ label: i.label ?? `load
1246
+ balancers`,
1247
+ containers: i.containers ?? { active: 2, standby: 0 },
1248
+ barColor: "orange",
1249
+ highlighted: !0
1250
+ };
1251
+ }
1252
+ return { service: e, barColor: n, loadBalancer: o };
1253
+ }, // ─── Trace orchestrator ────────────────────────────────
1254
+ $e = function() {
1255
+ if (_(this, gn) || typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
1256
+ return;
1257
+ g(this, gn, !0);
1258
+ const e = () => {
1259
+ w(this, h, Se).call(this), g(this, _n, window.setTimeout(e, Lt + Math.random() * At));
1260
+ };
1261
+ g(this, _n, window.setTimeout(e, be));
1262
+ const n = () => {
1263
+ w(this, h, ze).call(this), g(this, hn, window.setTimeout(n, Bt + Math.random() * Ft));
1264
+ };
1265
+ this.row1SideServices().length && g(this, hn, window.setTimeout(n, be + 600));
1266
+ }, se = function() {
1267
+ g(this, gn, !1), clearTimeout(_(this, _n)), clearTimeout(_(this, hn)), w(this, h, ce).call(this);
1268
+ }, ce = function() {
1269
+ _(this, an).forEach((e) => e()), _(this, an).clear(), _(this, rn).clear(), g(this, on, !1);
1270
+ }, Se = function() {
1271
+ const e = this.annotatedPaths();
1272
+ if (!e.length)
1273
+ return;
1274
+ const n = w(this, h, Ne).call(this, e);
1275
+ n.length && w(this, h, le).call(this, n);
1276
+ }, ze = function() {
1277
+ if (_(this, on))
1278
+ return;
1279
+ const e = this.annotatedPaths();
1280
+ if (!e.length)
1281
+ return;
1282
+ const n = this.row1SideServices();
1283
+ if (!n.length)
1284
+ return;
1285
+ const o = n[Math.floor(Math.random() * n.length)], i = w(this, h, De).call(this, e, o.service.id);
1286
+ if (i.length) {
1287
+ g(this, on, !0), w(this, h, le).call(this, i);
1288
+ const P = i.length * ee + Sn + zn + te + 100;
1289
+ setTimeout(() => {
1290
+ g(this, on, !1);
1291
+ }, P);
1292
+ }
1293
+ }, /**
1294
+ * Pick a route starting from a side service (worker).
1295
+ * Uses worker's own glow-only depth-3 paths (invisible base, full path to target).
1296
+ * Optionally continues with depth-4 (LB → managed service).
1297
+ */
1298
+ De = function(e, n) {
1299
+ const o = [], i = e.filter((c) => c.depth === 3 && c.sourceNodeId === n && c.renderMode === "glow-only" && c.active);
1300
+ if (!i.length)
1301
+ return o;
1302
+ const P = w(this, h, Zn).call(this, i);
1303
+ o.push(e.indexOf(P));
1304
+ const v = e.filter((c) => c.depth === 4 && c.sourceNodeId === P.targetNodeId && c.active);
1305
+ if (v.length) {
1306
+ const c = w(this, h, Zn).call(this, v);
1307
+ o.push(e.indexOf(c));
1308
+ }
1309
+ return o;
1310
+ }, Ne = function(e) {
1311
+ const n = [];
1312
+ let o = "endpoint";
1313
+ for (let i = 0; i <= 4; i++) {
1314
+ const P = e.filter((c) => c.depth === i && c.sourceNodeId === o && c.active);
1315
+ if (!P.length)
1316
+ break;
1317
+ const v = w(this, h, Zn).call(this, P);
1318
+ n.push(e.indexOf(v)), o = v.targetNodeId;
1319
+ }
1320
+ return n;
1321
+ }, Zn = function(e) {
1322
+ if (e.length === 1)
1323
+ return w(this, h, Hn).call(this, e[0]), e[0];
1324
+ const n = e.map((v) => {
1325
+ const c = `${v.targetNodeId}:${v.targetBarIndex}`;
1326
+ return 1 / ((_(this, rn).get(c) ?? 0) + 1);
1327
+ }), o = n.reduce((v, c) => v + c, 0);
1328
+ let i = Math.random() * o;
1329
+ for (let v = 0; v < e.length; v++)
1330
+ if (i -= n[v], i <= 0)
1331
+ return w(this, h, Hn).call(this, e[v]), e[v];
1332
+ const P = e.at(-1);
1333
+ return w(this, h, Hn).call(this, P), P;
1334
+ }, Hn = function(e) {
1335
+ const n = `${e.targetNodeId}:${e.targetBarIndex}`;
1336
+ _(this, rn).set(n, (_(this, rn).get(n) ?? 0) + 1);
1337
+ }, le = function(e) {
1338
+ const n = this.annotatedPaths(), i = _(this, en).nativeElement.querySelector(".__canvas"), P = i?.querySelector(":scope > .__svg-layer");
1339
+ if (!i || !P)
1340
+ return;
1341
+ const v = [], c = ++ve(this, Rn)._, D = [];
1342
+ e.forEach((k, a) => {
1343
+ const C = n[k], b = a * ee, O = P.querySelector(`[data-path-idx="${k}"]`);
1344
+ if (O) {
1345
+ const S = C.cachedLength ?? Math.ceil(O.getTotalLength());
1346
+ O.style.setProperty("--path-len", String(S)), D.push({
1347
+ el: O,
1348
+ classes: ["__path-glow--active", "__path-glow--decay"]
1349
+ }), v.push(setTimeout(() => {
1350
+ O.classList.add("__path-glow--active");
1351
+ }, b)), v.push(setTimeout(() => {
1352
+ O.classList.remove("__path-glow--active"), O.classList.add("__path-glow--decay");
1353
+ }, b + Sn + zn)), v.push(setTimeout(() => {
1354
+ O.classList.remove("__path-glow--decay");
1355
+ }, b + Sn + zn + te));
1356
+ }
1357
+ const N = b + Sn * 0.85;
1358
+ if (C.targetBarIndex >= 0) {
1359
+ const E = i.querySelector(`[data-node-id="${C.targetNodeId}"]`)?.querySelectorAll("zui-bar-icon")[C.targetBarIndex];
1360
+ E && v.push(setTimeout(() => E.dispatchEvent(new CustomEvent("trace-pulse")), N));
1361
+ } else if (C.targetNodeId === "storage") {
1362
+ const S = i.querySelector('[data-node-id="storage"]');
1363
+ if (S) {
1364
+ const E = N + zn;
1365
+ D.push({ el: S, classes: ["--pulse"] }), v.push(setTimeout(() => S.classList.add("--pulse"), N)), v.push(setTimeout(() => S.classList.remove("--pulse"), E));
1366
+ }
1367
+ }
1368
+ });
1369
+ const j = () => {
1370
+ v.forEach((k) => clearTimeout(k)), D.forEach(({ el: k, classes: a }) => k.classList.remove(...a));
1371
+ };
1372
+ _(this, an).set(c, j);
1373
+ const q = e.length * ee + Sn + zn + te + 100;
1374
+ v.push(setTimeout(() => {
1375
+ _(this, an).delete(c);
1376
+ }, q));
1377
+ }, vn.ɵfac = function(n) {
1378
+ return new (n || vn)();
1379
+ }, vn.ɵcmp = /* @__PURE__ */ Yn({ type: vn, selectors: [["zw-network-diagram"]], inputs: { config: [1, "config"] }, decls: 26, vars: 5, consts: [[1, "__canvas"], ["data-node-id", "endpoint", 1, "__endpoint-row"], ["variant", "endpoint", 3, "label"], [3, "config", "showPaths"], [1, "__zone", "__zone--services"], [1, "__zone-label"], [1, "__services-content"], [1, "__services-row", "__services-row--top"], [1, "__services-side-nodes"], [1, "__services-spacer"], [1, "__services-row", "__services-row--bottom"], ["data-node-id", "storage", 1, "__external-node"], [1, "__svg-layer"], ["variant", "service", 3, "label", "containers", "barColor", "techIcon"], [1, "__compound"], [1, "__compound-lb"], ["variant", "service-highlighted", 3, "label", "containers", "barColor", "highlighted"], [1, "__compound-service"], ["variant", "external", 3, "label", "sublabel"], [1, "__path-base"], [1, "__path-glow"]], template: function(n, o) {
1380
+ if (n & 1 && (m(0, "div", 0)(1, "div", 1), p(2, "zw-diagram-node", 2), d(), m(3, "zw-project-shell", 3)(4, "div", 4)(5, "span", 5), z(6, "Your services"), p(7, "br"), z(8, "with system containers"), d(), m(9, "div", 6)(10, "div", 7), p(11, "div"), L(12, yt, 2, 5, "div", null, ae), V(14, It, 3, 0, "div", 8)(15, Pt, 1, 0, "div"), d(), p(16, "div", 9), m(17, "div", 10), L(18, $t, 2, 1, null, null, ae), d()()()(), V(20, St, 2, 2, "div", 11), Fn(), m(21, "svg", 12), L(22, Dt, 1, 1, null, null, oe), L(24, kt, 1, 1, null, null, oe), d()()), n & 2) {
1381
+ let i;
1382
+ s(2), M("label", o.config().endpoint), s(), M("config", o.shellConfig())("showPaths", !1), s(9), A(o.row1MainServices()), s(2), Z(o.row1SideServices().length ? 14 : 15), s(4), A(o.row2Services()), s(2), Z((i = o.resolvedStorage()) ? 20 : -1, i), s(2), A(o.annotatedPaths()), s(2), A(o.annotatedPaths());
1383
+ }
1384
+ }, dependencies: [Jn, ie], styles: [`[_nghost-%COMP%] {
1385
+ display: block;
1386
+ position: relative;
1387
+ width: 100%;
1388
+ overflow: visible;
1389
+ }
1390
+
1391
+ .__svg-layer[_ngcontent-%COMP%] {
1392
+ position: absolute;
1393
+ inset: 0;
1394
+ pointer-events: none;
1395
+ overflow: visible;
1396
+ contain: layout style;
1397
+ will-change: transform;
1398
+ }
1399
+
1400
+ .__path-base[_ngcontent-%COMP%] {
1401
+ fill: none;
1402
+ stroke: #C4C3C3;
1403
+ stroke-width: 2;
1404
+ stroke-linecap: round;
1405
+ stroke-linejoin: round;
1406
+ }
1407
+
1408
+ .__canvas[_ngcontent-%COMP%] {
1409
+ position: relative;
1410
+ z-index: 1;
1411
+ width: 680px;
1412
+ margin: 0 auto;
1413
+ transform: scale(var(--diagram-scale, 1));
1414
+ transform-origin: top center;
1415
+ display: flex;
1416
+ flex-direction: column;
1417
+ align-items: center;
1418
+ gap: 51px;
1419
+ overflow: visible;
1420
+ }
1421
+ @media (max-width: 1099px) {
1422
+ .__canvas[_ngcontent-%COMP%] {
1423
+ transform-origin: top left;
1424
+ margin-left: calc(50% - 340px * var(--diagram-scale, 1));
1425
+ margin-right: 0;
1426
+ }
1427
+ }
1428
+ @media (min-width: 1100px) and (max-width: 1439px) {
1429
+ .__canvas[_ngcontent-%COMP%] {
1430
+ transform-origin: top left;
1431
+ margin: 0;
1432
+ }
1433
+ }
1434
+
1435
+ .__endpoint-row[_ngcontent-%COMP%] {
1436
+ display: flex;
1437
+ justify-content: center;
1438
+ width: 100%;
1439
+ }
1440
+
1441
+ zw-project-shell[_ngcontent-%COMP%] {
1442
+ width: 100%;
1443
+ }
1444
+
1445
+ .__zone[_ngcontent-%COMP%] {
1446
+ position: relative;
1447
+ border-radius: 8px;
1448
+ background: rgba(232, 231, 231, 0.5);
1449
+ padding: 20px 14px;
1450
+ }
1451
+
1452
+ .__zone-label[_ngcontent-%COMP%] {
1453
+ position: absolute;
1454
+ top: 23px;
1455
+ left: 23px;
1456
+ font-family: var(--font-family-brand);
1457
+ font-weight: 600;
1458
+ font-size: 11px;
1459
+ line-height: 14px;
1460
+ letter-spacing: 0.12em;
1461
+ text-transform: uppercase;
1462
+ color: #254E4A;
1463
+ opacity: 0.6;
1464
+ font-variation-settings: "CRSV" 0, "SHRP" 100, "slnt" 0;
1465
+ }
1466
+
1467
+ .__zone--services[_ngcontent-%COMP%] > .__zone-label[_ngcontent-%COMP%] {
1468
+ max-width: 108px;
1469
+ }
1470
+
1471
+ .__services-content[_ngcontent-%COMP%] {
1472
+ display: flex;
1473
+ flex-direction: column;
1474
+ align-items: center;
1475
+ gap: 0;
1476
+ }
1477
+
1478
+ .__services-row[_ngcontent-%COMP%] {
1479
+ display: flex;
1480
+ justify-content: center;
1481
+ width: 100%;
1482
+ }
1483
+
1484
+ .__services-row--top[_ngcontent-%COMP%] {
1485
+ display: grid;
1486
+ grid-template-columns: 1fr auto 1fr;
1487
+ align-items: start;
1488
+ }
1489
+ .__services-row--top[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child {
1490
+ justify-self: start;
1491
+ }
1492
+
1493
+ .__services-row--bottom[_ngcontent-%COMP%] {
1494
+ display: grid;
1495
+ grid-template-columns: 1fr auto 1fr;
1496
+ gap: 11px;
1497
+ align-items: start;
1498
+ justify-content: center;
1499
+ }
1500
+ .__services-row--bottom[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child {
1501
+ justify-self: end;
1502
+ }
1503
+ .__services-row--bottom[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child {
1504
+ justify-self: start;
1505
+ }
1506
+
1507
+ .__services-side-nodes[_ngcontent-%COMP%] {
1508
+ display: flex;
1509
+ gap: 19px;
1510
+ align-items: flex-start;
1511
+ margin-left: 38px;
1512
+ }
1513
+
1514
+ .__services-spacer[_ngcontent-%COMP%] {
1515
+ height: 51px;
1516
+ flex-shrink: 0;
1517
+ }
1518
+
1519
+ .__compound[_ngcontent-%COMP%] {
1520
+ position: relative;
1521
+ overflow: hidden;
1522
+ display: flex;
1523
+ flex-direction: column;
1524
+ align-items: center;
1525
+ background: #D8D7D7;
1526
+ border-radius: 8px;
1527
+ padding: 5px;
1528
+ padding-bottom: 20px;
1529
+ gap: 40px;
1530
+ min-width: 111px;
1531
+ }
1532
+
1533
+ .__external-node[_ngcontent-%COMP%] {
1534
+ position: absolute;
1535
+ right: -40px;
1536
+ top: 708px;
1537
+ }
1538
+
1539
+ .__path-glow[_ngcontent-%COMP%] {
1540
+ fill: none;
1541
+ stroke: var(--mat-sys-primary);
1542
+ stroke-width: 3;
1543
+ stroke-linecap: round;
1544
+ stroke-linejoin: round;
1545
+ opacity: 0;
1546
+ stroke-dasharray: var(--path-len, 300);
1547
+ stroke-dashoffset: var(--path-len, 300);
1548
+ pointer-events: none;
1549
+ }
1550
+
1551
+ .__path-glow--active[_ngcontent-%COMP%] {
1552
+ opacity: 0.55;
1553
+ stroke-dashoffset: 0;
1554
+ filter: drop-shadow(0 0 3px rgba(0, 164, 154, 0.3));
1555
+ transition: opacity 0.2s ease, stroke-dashoffset 600ms cubic-bezier(0.25, 0.1, 0.25, 1);
1556
+ }
1557
+ @media (max-width: 767px) {
1558
+ .__path-glow--active[_ngcontent-%COMP%] {
1559
+ filter: none;
1560
+ }
1561
+ }
1562
+
1563
+ .__path-glow--decay[_ngcontent-%COMP%] {
1564
+ opacity: 0;
1565
+ stroke-dashoffset: 0;
1566
+ filter: none;
1567
+ transition: opacity 0.9s ease-out;
1568
+ }
1569
+
1570
+ .__external-node.--pulse[_ngcontent-%COMP%] zw-diagram-node[_ngcontent-%COMP%] {
1571
+ filter: drop-shadow(0 0 6px rgba(0, 164, 154, 0.2));
1572
+ transition: filter 0.5s ease;
1573
+ }
1574
+ @media (max-width: 767px) {
1575
+ .__external-node.--pulse[_ngcontent-%COMP%] zw-diagram-node[_ngcontent-%COMP%] {
1576
+ filter: none;
1577
+ }
1578
+ }
1579
+
1580
+ .__external-node[_ngcontent-%COMP%]:not(.--pulse) zw-diagram-node[_ngcontent-%COMP%] {
1581
+ filter: none;
1582
+ transition: filter 0.6s ease-out;
1583
+ }
1584
+
1585
+ @media (prefers-reduced-motion: reduce) {
1586
+ .__path-glow[_ngcontent-%COMP%] {
1587
+ display: none;
1588
+ }
1589
+ }`], changeDetection: 0 });
1590
+ let re = vn;
1591
+ function xe(t) {
1592
+ const e = t.hostname || t.name, n = t.ports?.[0]?.port;
1593
+ return n ? `${e}:${n}` : e;
1594
+ }
1595
+ function jt(t) {
1596
+ return t ? Ie[t]?.horizontal === !0 : !1;
1597
+ }
1598
+ const qt = /* @__PURE__ */ new Set(["postgresql", "mariadb", "mongodb", "clickhouse"]);
1599
+ function Wt(t) {
1600
+ const e = t.findIndex((P) => P.techIcon && qt.has(P.techIcon));
1601
+ if (e < 0)
1602
+ return t;
1603
+ const n = Math.floor(t.length / 2);
1604
+ if (e === n)
1605
+ return t;
1606
+ const o = [...t], [i] = o.splice(e, 1);
1607
+ return o.splice(n, 0, i), o;
1608
+ }
1609
+ function Gt(t) {
1610
+ const e = t._servicesExtended ?? t.services ?? [];
1611
+ let n = !1;
1612
+ const o = [], i = [];
1613
+ let P = !1, v;
1614
+ for (const c of e) {
1615
+ if (c.category === "CORE")
1616
+ continue;
1617
+ if (c.category === "OBJECT_STORAGE") {
1618
+ P = !0, v = c;
1619
+ continue;
1620
+ }
1621
+ const D = Fe(c), j = je(c.typeId, D, c.autoscaling?.horizontalAutoscaling?.minContainerCount || 1), q = c.typeId ? Ie[c.typeId]?.HAContainers : void 0, k = D === "HA" && (q?.freeContainers ?? 0) > 0, a = {
1622
+ id: c.hostname || c.name,
1623
+ label: xe(c),
1624
+ containers: { active: j, standby: 0 },
1625
+ techIcon: c.typeId,
1626
+ ...k ? {
1627
+ hasLoadBalancer: !0,
1628
+ loadBalancer: {
1629
+ containers: { active: q.freeContainers, standby: 0 }
1630
+ }
1631
+ } : {}
1632
+ };
1633
+ if (jt(c.typeId)) {
1634
+ const C = n ? "side-runtime" : "http-runtime";
1635
+ n || (n = !0), o.push({ ...a, category: C });
1636
+ } else
1637
+ i.push({ ...a, category: "managed" });
1638
+ }
1639
+ return {
1640
+ ...Pe,
1641
+ services: [...o, ...Wt(i)],
1642
+ ...P && v ? {
1643
+ storage: {
1644
+ label: "Object storage",
1645
+ sublabel: xe(v)
1646
+ }
1647
+ } : {}
1648
+ };
1649
+ }
1650
+ function Vt(t, e) {
1651
+ t & 1 && p(0, "div", 1);
1652
+ }
1653
+ function Zt(t, e) {
1654
+ if (t & 1 && (m(0, "div", 2), z(1), d()), t & 2) {
1655
+ const n = I();
1656
+ s(), Ce("Could not load recipe “", n.slug() || "unknown", "”.");
1657
+ }
1658
+ }
1659
+ function Ht(t, e) {
1660
+ t & 1 && p(0, "zw-network-diagram", 3), t & 2 && M("config", e);
1661
+ }
1662
+ var Ln, An, Tn, Bn;
1663
+ const bn = class bn {
1664
+ constructor() {
1665
+ T(this, Ln);
1666
+ T(this, An);
1667
+ T(this, Tn);
1668
+ T(this, Bn);
1669
+ this.slug = R(), this.recipeData = R(void 0, { transform: (e) => {
1670
+ if (typeof e != "string")
1671
+ return e ?? void 0;
1672
+ if (e.trim())
1673
+ try {
1674
+ return JSON.parse(e);
1675
+ } catch {
1676
+ return;
1677
+ }
1678
+ } }), this.environment = R("highly-available-production"), this.apiBase = R("https://api.zerops.io"), g(this, Ln, kn(He)), this.recipe = xn(null), this.loading = xn(!0), this.error = xn(!1), g(this, An, G(() => {
1679
+ const e = this.recipe();
1680
+ if (!e)
1681
+ return;
1682
+ const n = e._environmentsExtended || [];
1683
+ return n.find((o) => o._key === this.environment()) ?? qe(n) ?? void 0;
1684
+ })), this.diagramConfig = G(() => {
1685
+ const e = _(this, An).call(this);
1686
+ return e ? Gt(e) : void 0;
1687
+ }), g(this, Tn, new We()), g(this, Bn, Ge(_(this, Tn).pipe(Ve((e) => Ue(_(this, Ln), this.apiBase(), e))))), Un(() => {
1688
+ const e = this.recipeData(), n = this.slug();
1689
+ if (e) {
1690
+ const o = Ze(e);
1691
+ this.loading.set(!1), this.error.set(o.error), this.recipe.set(o.recipe);
1692
+ } else n && (this.loading.set(!0), this.error.set(!1), this.recipe.set(null), _(this, Tn).next(n));
1693
+ }), Un(() => {
1694
+ const e = _(this, Bn).call(this);
1695
+ e && (this.loading.set(!1), this.error.set(e.error), this.recipe.set(e.recipe));
1696
+ });
1697
+ }
1698
+ };
1699
+ Ln = new WeakMap(), An = new WeakMap(), Tn = new WeakMap(), Bn = new WeakMap(), bn.ɵfac = function(n) {
1700
+ return new (n || bn)();
1701
+ }, bn.ɵcmp = /* @__PURE__ */ Yn({ type: bn, selectors: [["zwe-network-diagram-element"]], inputs: { slug: [1, "slug"], recipeData: [1, "recipeData"], environment: [1, "environment"], apiBase: [1, "apiBase"] }, decls: 4, vars: 1, consts: [[1, "zerops"], ["aria-hidden", "true", 1, "__skeleton"], [1, "__error"], [3, "config"]], template: function(n, o) {
1702
+ if (n & 1 && (m(0, "div", 0), V(1, Vt, 1, 0, "div", 1)(2, Zt, 2, 1, "div", 2)(3, Ht, 1, 1, "zw-network-diagram", 3), d()), n & 2) {
1703
+ let i;
1704
+ s(), Z(o.loading() ? 1 : o.error() ? 2 : (i = o.diagramConfig()) ? 3 : -1, i);
1705
+ }
1706
+ }, dependencies: [re], styles: [`[_nghost-%COMP%] { display: block; }
1707
+
1708
+ .__skeleton[_ngcontent-%COMP%] {
1709
+ height: 420px;
1710
+ border-radius: 12px;
1711
+ background: var(--mat-sys-surface-container);
1712
+ animation: _ngcontent-%COMP%_zwe-nd-pulse 1.4s ease-in-out infinite;
1713
+ }
1714
+ @keyframes _ngcontent-%COMP%_zwe-nd-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.3; } }
1715
+
1716
+ .__error[_ngcontent-%COMP%] {
1717
+ padding: 16px 20px;
1718
+ border-radius: 12px;
1719
+ background: var(--mat-sys-error-container);
1720
+ color: var(--mat-sys-on-error-container);
1721
+ font-size: 14px;
1722
+ }`], changeDetection: 0 });
1723
+ let de = bn;
1724
+ Je().then((t) => {
1725
+ customElements.get("zerops-network-diagram") || customElements.define("zerops-network-diagram", Ye(de, { injector: t.injector }));
1726
+ });