@alfadocs/ui-kit 1.4.17 → 1.6.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 (92) hide show
  1. package/dist/_chunks/{booking-CGKof8QU.js → booking-D84O6H2X.js} +553 -546
  2. package/dist/_chunks/{care-plan-card-C83Hb9EE.js → care-plan-card-CehAU7F_.js} +2 -2
  3. package/dist/_chunks/{care-plan-entry-card-CHMPSTCz.js → care-plan-entry-card-ChWRMfMw.js} +2 -2
  4. package/dist/_chunks/{periodontal-chart-brakjj0s.js → periodontal-chart-C0nNQKKK.js} +121 -121
  5. package/dist/_chunks/practice-profile-hero-Bdd0bFqC.js +187 -0
  6. package/dist/_chunks/{practice-results-DWUZRm2x.js → practice-results-CKoLD_x5.js} +220 -206
  7. package/dist/_chunks/tooth-data-DR8Kdnup.js +903 -0
  8. package/dist/_chunks/tooth-finding-palette-vqC-D2Ye.js +708 -0
  9. package/dist/_chunks/tooth-scheme-BPXE1_3N.js +2051 -0
  10. package/dist/agent-catalog.json +497 -56
  11. package/dist/agent-i18n/en.json +29 -11
  12. package/dist/components/booking/booking-types.d.ts +9 -0
  13. package/dist/components/booking/index.js +1 -1
  14. package/dist/components/care-plan-card/index.js +1 -1
  15. package/dist/components/care-plan-entry-card/index.js +1 -1
  16. package/dist/components/index.d.ts +2 -0
  17. package/dist/components/periodontal-chart/index.js +1 -1
  18. package/dist/components/practice-profile-hero/index.d.ts +4 -0
  19. package/dist/components/practice-profile-hero/index.js +6 -0
  20. package/dist/components/practice-profile-hero/practice-profile-hero.agent.d.ts +4 -0
  21. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +60 -0
  22. package/dist/components/practice-results/index.js +1 -1
  23. package/dist/components/practice-results/practice-results.d.ts +15 -1
  24. package/dist/components/tooth-finding-palette/index.d.ts +4 -0
  25. package/dist/components/tooth-finding-palette/index.js +9 -0
  26. package/dist/components/tooth-finding-palette/tooth-finding-palette.agent.d.ts +4 -0
  27. package/dist/components/tooth-finding-palette/tooth-finding-palette.d.ts +89 -0
  28. package/dist/components/tooth-scheme/index.d.ts +2 -2
  29. package/dist/components/tooth-scheme/index.js +57 -30
  30. package/dist/components/tooth-scheme/tooth-data.d.ts +279 -10
  31. package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
  32. package/dist/components/tooth-scheme/tooth-scheme.d.ts +30 -3
  33. package/dist/host-compat.css +1 -4
  34. package/dist/i18n/locales/ar.d.ts +41 -1
  35. package/dist/i18n/locales/ar.js +42 -2
  36. package/dist/i18n/locales/de.d.ts +41 -1
  37. package/dist/i18n/locales/de.js +42 -2
  38. package/dist/i18n/locales/el.d.ts +41 -1
  39. package/dist/i18n/locales/el.js +42 -2
  40. package/dist/i18n/locales/en.d.ts +41 -1
  41. package/dist/i18n/locales/en.js +42 -2
  42. package/dist/i18n/locales/es.d.ts +41 -1
  43. package/dist/i18n/locales/es.js +42 -2
  44. package/dist/i18n/locales/fr.d.ts +41 -1
  45. package/dist/i18n/locales/fr.js +42 -2
  46. package/dist/i18n/locales/hi.d.ts +41 -1
  47. package/dist/i18n/locales/hi.js +42 -2
  48. package/dist/i18n/locales/it.d.ts +41 -1
  49. package/dist/i18n/locales/it.js +42 -2
  50. package/dist/i18n/locales/ja.d.ts +41 -1
  51. package/dist/i18n/locales/ja.js +42 -2
  52. package/dist/i18n/locales/nl.d.ts +41 -1
  53. package/dist/i18n/locales/nl.js +42 -2
  54. package/dist/i18n/locales/pl.d.ts +41 -1
  55. package/dist/i18n/locales/pl.js +42 -2
  56. package/dist/i18n/locales/pt.d.ts +41 -1
  57. package/dist/i18n/locales/pt.js +42 -2
  58. package/dist/i18n/locales/ro.d.ts +41 -1
  59. package/dist/i18n/locales/ro.js +42 -2
  60. package/dist/i18n/locales/ru.d.ts +41 -1
  61. package/dist/i18n/locales/ru.js +42 -2
  62. package/dist/i18n/locales/sq.d.ts +41 -1
  63. package/dist/i18n/locales/sq.js +42 -2
  64. package/dist/i18n/locales/sv.d.ts +41 -1
  65. package/dist/i18n/locales/sv.js +42 -2
  66. package/dist/i18n/locales/tr.d.ts +41 -1
  67. package/dist/i18n/locales/tr.js +42 -2
  68. package/dist/i18n/locales/zh.d.ts +41 -1
  69. package/dist/i18n/locales/zh.js +42 -2
  70. package/dist/index.js +561 -525
  71. package/dist/locales/ar.json +42 -2
  72. package/dist/locales/de.json +42 -2
  73. package/dist/locales/el.json +42 -2
  74. package/dist/locales/en.json +42 -2
  75. package/dist/locales/es.json +42 -2
  76. package/dist/locales/fr.json +42 -2
  77. package/dist/locales/hi.json +42 -2
  78. package/dist/locales/it.json +42 -2
  79. package/dist/locales/ja.json +42 -2
  80. package/dist/locales/nl.json +42 -2
  81. package/dist/locales/pl.json +42 -2
  82. package/dist/locales/pt.json +42 -2
  83. package/dist/locales/ro.json +42 -2
  84. package/dist/locales/ru.json +42 -2
  85. package/dist/locales/sq.json +42 -2
  86. package/dist/locales/sv.json +42 -2
  87. package/dist/locales/tr.json +42 -2
  88. package/dist/locales/zh.json +42 -2
  89. package/dist/tokens.css +1 -1
  90. package/package.json +9 -1
  91. package/dist/_chunks/tooth-data-BwuoKFf4.js +0 -660
  92. package/dist/_chunks/tooth-scheme-s0ipC0-Z.js +0 -1483
@@ -0,0 +1,903 @@
1
+ const S = [
2
+ // upper
3
+ "18",
4
+ "17",
5
+ "16",
6
+ "15",
7
+ "14",
8
+ "13",
9
+ "12",
10
+ "11",
11
+ "21",
12
+ "22",
13
+ "23",
14
+ "24",
15
+ "25",
16
+ "26",
17
+ "27",
18
+ "28",
19
+ // lower
20
+ "48",
21
+ "47",
22
+ "46",
23
+ "45",
24
+ "44",
25
+ "43",
26
+ "42",
27
+ "41",
28
+ "31",
29
+ "32",
30
+ "33",
31
+ "34",
32
+ "35",
33
+ "36",
34
+ "37",
35
+ "38"
36
+ ], $ = [
37
+ // upper
38
+ "55",
39
+ "54",
40
+ "53",
41
+ "52",
42
+ "51",
43
+ "61",
44
+ "62",
45
+ "63",
46
+ "64",
47
+ "65",
48
+ // lower
49
+ "85",
50
+ "84",
51
+ "83",
52
+ "82",
53
+ "81",
54
+ "71",
55
+ "72",
56
+ "73",
57
+ "74",
58
+ "75"
59
+ ];
60
+ function Q(e) {
61
+ return e <= 2 ? "incisor" : e === 3 ? "canine" : e <= 5 ? "premolar" : "molar";
62
+ }
63
+ function U(e) {
64
+ return e <= 2 ? "incisor" : e === 3 ? "canine" : "molar";
65
+ }
66
+ function H(e, t) {
67
+ const n = (e - 1) % 4 + 1;
68
+ return `${n === 1 ? "UR" : n === 2 ? "UL" : n === 3 ? "LL" : "LR"}${t}`;
69
+ }
70
+ function Z(e, t) {
71
+ switch (e) {
72
+ case 1:
73
+ return String(1 + (8 - t));
74
+ case 2:
75
+ return String(8 + t);
76
+ case 3:
77
+ return String(17 + (8 - t));
78
+ case 4:
79
+ return String(24 + t);
80
+ default:
81
+ return "";
82
+ }
83
+ }
84
+ function j(e, t) {
85
+ const n = "ABCDEFGHIJKLMNOPQRST";
86
+ let r = -1;
87
+ switch (e) {
88
+ case 5:
89
+ r = 0 + (5 - t);
90
+ break;
91
+ case 6:
92
+ r = 5 + (t - 1);
93
+ break;
94
+ case 7:
95
+ r = 10 + (5 - t);
96
+ break;
97
+ case 8:
98
+ r = 15 + (t - 1);
99
+ break;
100
+ default:
101
+ r = -1;
102
+ }
103
+ return r >= 0 ? n[r] : "";
104
+ }
105
+ function G(e) {
106
+ const t = Number(e[0]), n = Number(e[1]), r = t >= 5, o = r ? U(n) : Q(n), c = t === 1 || t === 2 || t === 5 || t === 6 ? "upper" : "lower", l = t === 1 || t === 4 || t === 5 || t === 8 ? "right" : "left", i = r ? j(t, n) : Z(t, n), s = H(t, n);
107
+ return {
108
+ fdi: e,
109
+ universal: i,
110
+ palmer: s,
111
+ quadrant: t,
112
+ positionInQuadrant: n,
113
+ anatomy: o,
114
+ arch: c,
115
+ side: l,
116
+ dentition: r ? "primary" : "permanent"
117
+ };
118
+ }
119
+ const x = [
120
+ ...S,
121
+ ...$
122
+ ].reduce((e, t) => (e[t] = G(t), e), {}), Y = Object.fromEntries(
123
+ Object.entries(x).map(([e, t]) => [e, t.universal])
124
+ ), B = Object.fromEntries(
125
+ Object.entries(x).map(([e, t]) => [e, t.palmer])
126
+ );
127
+ function I(e) {
128
+ return e.dentition !== "primary" ? e.fdi : `${e.quadrant - 4}${e.positionInQuadrant}`;
129
+ }
130
+ const ge = 0.72;
131
+ function K(e) {
132
+ return Number(I(e)[1]) < 6 ? ["single"] : e.arch === "upper" ? ["mesial", "distal", "palatal"] : ["mesial", "distal"];
133
+ }
134
+ function P(e, t) {
135
+ const n = e.quadrant <= 4 ? e.quadrant : e.quadrant - 4, r = n === 1 || n === 4;
136
+ return t === "mesial" ? r ? "right" : "left" : r ? "left" : "right";
137
+ }
138
+ function V(e, t) {
139
+ return K(e).includes(t) ? t === "palatal" ? "center" : t === "mesial" || t === "distal" ? P(e, t) : "full" : "full";
140
+ }
141
+ const T = {
142
+ caries: "--destructive",
143
+ filled: "--info",
144
+ crowned: "--warning",
145
+ temporaryCrown: "--warning",
146
+ bridge: "--primary",
147
+ missing: "--muted-foreground",
148
+ implant: "--accent",
149
+ implantExtraction: "--accent",
150
+ stub: "--muted-foreground",
151
+ destroyed: "--destructive",
152
+ rootCanal: "--primary",
153
+ // Endodontics — a post sits inside the root next to the root canal.
154
+ pin: "--primary",
155
+ // Apicectomy removes tooth structure: the pathology-and-loss family.
156
+ rootAmputation: "--destructive",
157
+ // Fixtures & appliances, alongside the implants.
158
+ anchorage: "--accent",
159
+ hook: "--accent",
160
+ attachment: "--accent",
161
+ // Soft-tissue work, alongside the crown family. These three ship side art but
162
+ // no plan art, so in the occlusal view they fall through to the glyph badge —
163
+ // a thin stroke, where `--warning` (yellow-500) is ~1.6:1 on white. The
164
+ // readable alias is the one built for that job.
165
+ mucogingivalSurgery: "--warning-readable",
166
+ periodontalSurgery: "--warning-readable",
167
+ curettage: "--warning-readable",
168
+ // An interim dressing — reads as a restoration.
169
+ medication: "--info",
170
+ // Purely diagnostic, nothing on the tooth to tint.
171
+ xray: "--muted-foreground"
172
+ }, W = Object.entries(
173
+ T
174
+ ).reduce(
175
+ (e, [t, n]) => (e[t] = `var(${n})`, e),
176
+ {}
177
+ ), Se = Object.keys(
178
+ T
179
+ );
180
+ function w(e) {
181
+ return e in T;
182
+ }
183
+ const X = {
184
+ caries: "surface",
185
+ filled: "surface",
186
+ crowned: "element",
187
+ temporaryCrown: "element",
188
+ bridge: "element",
189
+ missing: "element",
190
+ implant: "element",
191
+ implantExtraction: "element",
192
+ stub: "element",
193
+ destroyed: "element",
194
+ rootCanal: "root",
195
+ pin: "root",
196
+ rootAmputation: "root",
197
+ // Flank-mounted appliances and gingival work sit on the whole element; their
198
+ // mesial/distal or left/right discriminator selects a side, not a root.
199
+ anchorage: "element",
200
+ hook: "element",
201
+ attachment: "element",
202
+ mucogingivalSurgery: "element",
203
+ periodontalSurgery: "element",
204
+ curettage: "element",
205
+ medication: "element",
206
+ xray: "element"
207
+ }, J = [
208
+ "missing",
209
+ "caries",
210
+ "filled"
211
+ ], v = new Set(J), _ = {
212
+ planned: "--info",
213
+ executed: "--success"
214
+ }, $e = {
215
+ planned: `var(${_.planned})`,
216
+ executed: `var(${_.executed})`
217
+ }, xe = {
218
+ planned: 0.55,
219
+ executed: 1
220
+ };
221
+ function Ie(e) {
222
+ return `toothScheme.status.${e}`;
223
+ }
224
+ const z = {
225
+ crowned: { folder: "crown", resolve: "per-fdi" },
226
+ temporaryCrown: { folder: "temporaryCrown", resolve: "per-fdi" },
227
+ bridge: { folder: "replacement", resolve: "per-fdi" },
228
+ destroyed: { folder: "destroyed", resolve: "per-fdi" },
229
+ implant: { folder: "implant", resolve: "general" },
230
+ implantExtraction: { folder: "implantExtraction", resolve: "general" },
231
+ stub: { folder: "stub", resolve: "general" },
232
+ rootCanal: { folder: "rootTreatment", resolve: "rct" },
233
+ pin: { folder: "pin", resolve: "per-fdi-root", wholeTooth: "always" },
234
+ rootAmputation: {
235
+ folder: "rootAmputation",
236
+ resolve: "per-fdi-root",
237
+ wholeTooth: "single-rooted-only"
238
+ },
239
+ anchorage: { folder: "anchorage", resolve: "per-fdi-side" },
240
+ hook: { folder: "hook", resolve: "per-fdi-lr" },
241
+ attachment: { folder: "attachment", resolve: "general" },
242
+ mucogingivalSurgery: { folder: "mucogingivalSurgery", resolve: "region" },
243
+ periodontalSurgery: { folder: "periodontalSurgery", resolve: "region" },
244
+ curettage: { folder: "other", resolve: "letter", letter: "c" },
245
+ medication: { folder: "other", resolve: "letter", letter: "m" },
246
+ xray: { folder: "other", resolve: "letter", letter: "x" }
247
+ };
248
+ function k(e, t, n) {
249
+ return t.region === "left" || t.region === "right" ? t.region : t.root === "mesial" || t.root === "distal" ? P(e, t.root) : n;
250
+ }
251
+ function R(e, t, n, r, o) {
252
+ const c = t.arch === "upper" ? "top" : "bottom", l = `${n}/${e}/${r.folder}/${c}`, i = I(t);
253
+ switch (r.resolve) {
254
+ case "general":
255
+ return `${l}/general.webp`;
256
+ case "rct": {
257
+ const s = o.root ? V(t, o.root) : "full";
258
+ return `${l}/${i}/${s}.webp`;
259
+ }
260
+ case "per-fdi-root": {
261
+ const s = K(t), a = o.root;
262
+ return a && a !== "single" && s.includes(a) ? `${l}/${i}-${a}.webp` : r.wholeTooth === "always" || s.length === 1 ? `${l}/${i}.webp` : `${l}/${i}-mesial.webp`;
263
+ }
264
+ case "per-fdi-side":
265
+ return `${l}/${i}-${o.root === "distal" ? "distal" : "mesial"}.webp`;
266
+ case "per-fdi-lr":
267
+ return `${l}/${i}_${k(t, o, "left")}.webp`;
268
+ case "region":
269
+ return `${l}/${o.region ?? "repeat"}.webp`;
270
+ case "screen-side":
271
+ return `${l}/${k(t, o, "left")}.webp`;
272
+ case "letter":
273
+ return `${l}/${r.letter}.webp`;
274
+ case "per-fdi":
275
+ default:
276
+ return `${l}/${i}.webp`;
277
+ }
278
+ }
279
+ function Te(e, t, n, r = {}) {
280
+ return R("side", e, t, n, r);
281
+ }
282
+ const ee = {
283
+ mesial: "mesial",
284
+ distal: "distal",
285
+ occlusal: "occlusal",
286
+ buccal: "vestibular",
287
+ lingual: "oral"
288
+ }, te = {
289
+ caries: "caries",
290
+ filled: "filling"
291
+ };
292
+ function Oe(e, t, n, r) {
293
+ const o = e.arch === "upper" ? "top" : "bottom";
294
+ return `${t}/plan/${n}/${o}/${I(e)}-${ee[r]}.webp`;
295
+ }
296
+ const ne = {
297
+ crowned: { folder: "crown", resolve: "per-fdi" },
298
+ temporaryCrown: { folder: "temporaryCrown", resolve: "per-fdi" },
299
+ // The bundled plan/replacement renders are byte-identical to plan/default, so
300
+ // this overlay is a visual no-op until distinct bridge art lands.
301
+ bridge: { folder: "replacement", resolve: "per-fdi" },
302
+ implant: { folder: "implant", resolve: "general" },
303
+ implantExtraction: { folder: "implantExtraction", resolve: "general" },
304
+ stub: { folder: "stub", resolve: "general" },
305
+ anchorage: { folder: "anchorage", resolve: "screen-side" }
306
+ };
307
+ function Le(e, t, n, r = {}) {
308
+ return R("plan", e, t, n, r);
309
+ }
310
+ const re = 328, oe = {
311
+ "anchorage/bottom/left.webp": 375,
312
+ "anchorage/bottom/right.webp": 375,
313
+ "anchorage/top/left.webp": 375,
314
+ "anchorage/top/right.webp": 375,
315
+ "crown/bottom/36.webp": 375,
316
+ "implant/bottom/general.webp": 375,
317
+ "implant/top/general.webp": 375,
318
+ "implantExtraction/bottom/general.webp": 375,
319
+ "implantExtraction/top/general.webp": 375,
320
+ "replacement/bottom/background.webp": 375,
321
+ "replacement/top/background.webp": 375,
322
+ "stub/bottom/general.webp": 375,
323
+ "stub/top/general.webp": 375,
324
+ "temporaryCrown/bottom/36.webp": 375,
325
+ "temporaryCrown/bottom/37.webp": 348,
326
+ "temporaryCrown/bottom/46.webp": 375,
327
+ "temporaryCrown/bottom/47.webp": 348
328
+ };
329
+ function Ae(e) {
330
+ const t = e.split("/plan/")[1], n = t ? oe[t] : void 0;
331
+ return n ? n / re : 1;
332
+ }
333
+ const ae = "--muted-foreground";
334
+ function le(e) {
335
+ return `toothScheme.condition.${e}`;
336
+ }
337
+ function y(e, t) {
338
+ return t == null ? void 0 : t.find((n) => n.id === e);
339
+ }
340
+ function ve(e, t) {
341
+ const n = y(e, t);
342
+ return n ? { kind: "text", text: n.label } : w(e) ? { kind: "key", key: le(e) } : { kind: "text", text: e };
343
+ }
344
+ function ie(e, t) {
345
+ const n = y(e, t);
346
+ return n != null && n.color ? n.color : w(e) ? W[e] : `var(${ae})`;
347
+ }
348
+ function _e(e, t) {
349
+ return e.color ?? ie(e.condition, t);
350
+ }
351
+ function ce(e, t) {
352
+ var n;
353
+ return ((n = y(e, t)) == null ? void 0 : n.sideSymbol) ?? (w(e) ? z[e] : void 0);
354
+ }
355
+ function se(e, t) {
356
+ var n;
357
+ return ((n = y(e, t)) == null ? void 0 : n.planSymbol) ?? (w(e) ? ne[e] : void 0);
358
+ }
359
+ function ue(e, t) {
360
+ var n;
361
+ return ((n = y(e, t)) == null ? void 0 : n.planFolder) ?? (w(e) ? te[e] : void 0);
362
+ }
363
+ function de(e, t) {
364
+ var n;
365
+ return ((n = y(e, t)) == null ? void 0 : n.part) ?? (w(e) ? X[e] : "element");
366
+ }
367
+ function pe(e) {
368
+ const t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s._-]+/).filter(Boolean);
369
+ return t.length === 0 ? "?" : t.slice(0, 2).map((n) => n[0].toUpperCase()).join("").slice(0, 3);
370
+ }
371
+ function ke(e, t) {
372
+ var r;
373
+ const n = (r = y(e, t)) == null ? void 0 : r.glyph;
374
+ return n ? n.slice(0, 3) : pe(e);
375
+ }
376
+ function Ce(e, t, n) {
377
+ return t === "side" ? ce(e, n) ? !0 : v.has(e) : se(e, n) || ue(e, n) ? !0 : v.has(e);
378
+ }
379
+ function Ee(e, t) {
380
+ return e ? e.symbols ? e.symbols : e.conditions.map((n) => {
381
+ const r = de(n, t);
382
+ return r === "surface" && e.surfaces.length > 0 ? { condition: n, part: r, surfaces: e.surfaces } : { condition: n, part: r };
383
+ }) : [];
384
+ }
385
+ function Ne(e) {
386
+ return e.anatomy === "molar" || e.anatomy === "premolar" ? ["top", "bottom", "left", "right", "center"] : ["top", "bottom", "left", "right"];
387
+ }
388
+ function Ke(e, t) {
389
+ if (t === "center") return "occlusal";
390
+ if (t === "top") return e.arch === "upper" ? "buccal" : "lingual";
391
+ if (t === "bottom") return e.arch === "upper" ? "lingual" : "buccal";
392
+ const n = e.quadrant <= 4 ? e.quadrant : e.quadrant - 4, r = n === 1 || n === 4;
393
+ return t === "left" ? r ? "distal" : "mesial" : r ? "mesial" : "distal";
394
+ }
395
+ const C = (e) => Math.round(e * 100) / 100;
396
+ function Pe(e, t, n) {
397
+ const { x: r, y: o, w: c, h: l } = t, i = r + c, s = o + l, a = (u, p) => `${C(u)} ${C(p)}`;
398
+ if (!n) {
399
+ const u = r + c / 2, p = o + l / 2;
400
+ switch (e) {
401
+ case "top":
402
+ return `M ${a(r, o)} L ${a(i, o)} L ${a(u, p)} Z`;
403
+ case "bottom":
404
+ return `M ${a(r, s)} L ${a(i, s)} L ${a(u, p)} Z`;
405
+ case "left":
406
+ return `M ${a(r, o)} L ${a(u, p)} L ${a(r, s)} Z`;
407
+ case "right":
408
+ return `M ${a(i, o)} L ${a(u, p)} L ${a(i, s)} Z`;
409
+ default:
410
+ return "";
411
+ }
412
+ }
413
+ const m = r + c * 0.3, f = o + l * 0.3, h = r + c * 0.7, b = o + l * 0.7;
414
+ switch (e) {
415
+ case "center":
416
+ return `M ${a(m, f)} L ${a(h, f)} L ${a(h, b)} L ${a(m, b)} Z`;
417
+ case "top":
418
+ return `M ${a(r, o)} L ${a(i, o)} L ${a(h, f)} L ${a(m, f)} Z`;
419
+ case "bottom":
420
+ return `M ${a(r, s)} L ${a(i, s)} L ${a(h, b)} L ${a(m, b)} Z`;
421
+ case "left":
422
+ return `M ${a(r, o)} L ${a(m, f)} L ${a(m, b)} L ${a(r, s)} Z`;
423
+ case "right":
424
+ return `M ${a(i, o)} L ${a(h, f)} L ${a(h, b)} L ${a(i, s)} Z`;
425
+ default:
426
+ return "";
427
+ }
428
+ }
429
+ const g = 5, E = 40, Re = 4, me = 36, fe = 62;
430
+ function qe(e, t, n = "default", r = "side") {
431
+ const o = e.arch === "upper" ? "top" : "bottom";
432
+ return `${t}/${r}/${n}/${o}/${I(e)}.webp`;
433
+ }
434
+ function Me(e, t = fe, n = {}) {
435
+ const r = e === "primary" ? $ : e === "mixed" ? [...S, ...$] : S, o = [], c = [];
436
+ for (const u of r)
437
+ x[u].arch === "upper" ? o.push(u) : c.push(u);
438
+ const l = me + g, i = Math.max(o.length, c.length), s = i > 0 ? i * l - g : 0;
439
+ function a(u, p) {
440
+ const q = u.length > 0 ? u.length * l - g : 0, M = (s - q) / 2;
441
+ return u.map((A, D) => {
442
+ const F = x[A];
443
+ return {
444
+ fdi: A,
445
+ meta: F,
446
+ x: M + D * l,
447
+ y: p
448
+ };
449
+ });
450
+ }
451
+ if (n.arch) {
452
+ const u = n.arch === "upper" ? o : c;
453
+ return { teeth: a(u, 0), width: s, height: t };
454
+ }
455
+ const m = a(o, 0), f = a(c, t + E), h = s > 0 ? s : i * l, b = t * 2 + E;
456
+ return { teeth: [...m, ...f], width: h, height: b };
457
+ }
458
+ const d = (e) => [...S, ...$].filter(
459
+ (t) => x[t].quadrant === e
460
+ ), O = [
461
+ // Upper facial (side) row — Q1, Q2, AS, Gen.
462
+ {
463
+ id: "Q1",
464
+ kind: "quadrant",
465
+ arch: "upper",
466
+ dentition: "permanent",
467
+ labelKey: "quadrant",
468
+ labelIndex: 1,
469
+ code: "Q1",
470
+ teeth: d(1),
471
+ column: 0,
472
+ row: "side"
473
+ },
474
+ {
475
+ id: "Q2",
476
+ kind: "quadrant",
477
+ arch: "upper",
478
+ dentition: "permanent",
479
+ labelKey: "quadrant",
480
+ labelIndex: 2,
481
+ code: "Q2",
482
+ teeth: d(2),
483
+ column: 1,
484
+ row: "side"
485
+ },
486
+ {
487
+ id: "AS",
488
+ kind: "arch",
489
+ arch: "upper",
490
+ dentition: "permanent",
491
+ labelKey: "archUpper",
492
+ code: "AS",
493
+ teeth: [...d(1), ...d(2)],
494
+ column: 2,
495
+ row: "side"
496
+ },
497
+ {
498
+ id: "general",
499
+ kind: "general",
500
+ arch: "upper",
501
+ dentition: "permanent",
502
+ labelKey: "general",
503
+ code: "Gen.",
504
+ teeth: S,
505
+ column: 3,
506
+ row: "side"
507
+ },
508
+ // Upper occlusal (plan) row — S1, S2, S3 (WHO sextants).
509
+ {
510
+ id: "S1",
511
+ kind: "sextant",
512
+ arch: "upper",
513
+ dentition: "permanent",
514
+ labelKey: "sextant",
515
+ labelIndex: 1,
516
+ code: "S1",
517
+ teeth: ["18", "17", "16", "15", "14"],
518
+ column: 0,
519
+ row: "plan"
520
+ },
521
+ {
522
+ id: "S2",
523
+ kind: "sextant",
524
+ arch: "upper",
525
+ dentition: "permanent",
526
+ labelKey: "sextant",
527
+ labelIndex: 2,
528
+ code: "S2",
529
+ teeth: ["13", "12", "11", "21", "22", "23"],
530
+ column: 1,
531
+ row: "plan"
532
+ },
533
+ {
534
+ id: "S3",
535
+ kind: "sextant",
536
+ arch: "upper",
537
+ dentition: "permanent",
538
+ labelKey: "sextant",
539
+ labelIndex: 3,
540
+ code: "S3",
541
+ teeth: ["24", "25", "26", "27", "28"],
542
+ column: 2,
543
+ row: "plan"
544
+ },
545
+ // Lower occlusal (plan) row — S4, S5, S6.
546
+ {
547
+ id: "S4",
548
+ kind: "sextant",
549
+ arch: "lower",
550
+ dentition: "permanent",
551
+ labelKey: "sextant",
552
+ labelIndex: 4,
553
+ code: "S4",
554
+ teeth: ["34", "35", "36", "37", "38"],
555
+ column: 0,
556
+ row: "plan"
557
+ },
558
+ {
559
+ id: "S5",
560
+ kind: "sextant",
561
+ arch: "lower",
562
+ dentition: "permanent",
563
+ labelKey: "sextant",
564
+ labelIndex: 5,
565
+ code: "S5",
566
+ teeth: ["43", "42", "41", "31", "32", "33"],
567
+ column: 1,
568
+ row: "plan"
569
+ },
570
+ {
571
+ id: "S6",
572
+ kind: "sextant",
573
+ arch: "lower",
574
+ dentition: "permanent",
575
+ labelKey: "sextant",
576
+ labelIndex: 6,
577
+ code: "S6",
578
+ teeth: ["44", "45", "46", "47", "48"],
579
+ column: 2,
580
+ row: "plan"
581
+ },
582
+ // Lower facial (side) row — Q4, Q3, AI.
583
+ {
584
+ id: "Q4",
585
+ kind: "quadrant",
586
+ arch: "lower",
587
+ dentition: "permanent",
588
+ labelKey: "quadrant",
589
+ labelIndex: 4,
590
+ code: "Q4",
591
+ teeth: d(4),
592
+ column: 0,
593
+ row: "side"
594
+ },
595
+ {
596
+ id: "Q3",
597
+ kind: "quadrant",
598
+ arch: "lower",
599
+ dentition: "permanent",
600
+ labelKey: "quadrant",
601
+ labelIndex: 3,
602
+ code: "Q3",
603
+ teeth: d(3),
604
+ column: 1,
605
+ row: "side"
606
+ },
607
+ {
608
+ id: "AI",
609
+ kind: "arch",
610
+ arch: "lower",
611
+ dentition: "permanent",
612
+ labelKey: "archLower",
613
+ code: "AI",
614
+ teeth: [...d(3), ...d(4)],
615
+ column: 2,
616
+ row: "side"
617
+ }
618
+ ], L = [
619
+ // Upper facial (side) row.
620
+ {
621
+ id: "mQ1",
622
+ kind: "quadrant",
623
+ arch: "upper",
624
+ dentition: "primary",
625
+ labelKey: "quadrant",
626
+ labelIndex: 1,
627
+ code: "Q1",
628
+ teeth: d(5),
629
+ column: 0,
630
+ row: "side"
631
+ },
632
+ {
633
+ id: "mQ2",
634
+ kind: "quadrant",
635
+ arch: "upper",
636
+ dentition: "primary",
637
+ labelKey: "quadrant",
638
+ labelIndex: 2,
639
+ code: "Q2",
640
+ teeth: d(6),
641
+ column: 1,
642
+ row: "side"
643
+ },
644
+ {
645
+ id: "mAS",
646
+ kind: "arch",
647
+ arch: "upper",
648
+ dentition: "primary",
649
+ labelKey: "archUpper",
650
+ code: "AS",
651
+ teeth: [...d(5), ...d(6)],
652
+ column: 2,
653
+ row: "side"
654
+ },
655
+ {
656
+ id: "mGeneral",
657
+ kind: "general",
658
+ arch: "upper",
659
+ dentition: "primary",
660
+ labelKey: "general",
661
+ code: "Gen.",
662
+ teeth: $,
663
+ column: 3,
664
+ row: "side"
665
+ },
666
+ // Upper occlusal (plan) row.
667
+ {
668
+ id: "mS1",
669
+ kind: "sextant",
670
+ arch: "upper",
671
+ dentition: "primary",
672
+ labelKey: "sextant",
673
+ labelIndex: 1,
674
+ code: "S1",
675
+ teeth: ["55", "54"],
676
+ column: 0,
677
+ row: "plan"
678
+ },
679
+ {
680
+ id: "mS2",
681
+ kind: "sextant",
682
+ arch: "upper",
683
+ dentition: "primary",
684
+ labelKey: "sextant",
685
+ labelIndex: 2,
686
+ code: "S2",
687
+ teeth: ["53", "52", "51", "61", "62", "63"],
688
+ column: 1,
689
+ row: "plan"
690
+ },
691
+ {
692
+ id: "mS3",
693
+ kind: "sextant",
694
+ arch: "upper",
695
+ dentition: "primary",
696
+ labelKey: "sextant",
697
+ labelIndex: 3,
698
+ code: "S3",
699
+ teeth: ["64", "65"],
700
+ column: 2,
701
+ row: "plan"
702
+ },
703
+ // Lower occlusal (plan) row.
704
+ {
705
+ id: "mS4",
706
+ kind: "sextant",
707
+ arch: "lower",
708
+ dentition: "primary",
709
+ labelKey: "sextant",
710
+ labelIndex: 4,
711
+ code: "S4",
712
+ teeth: ["74", "75"],
713
+ column: 0,
714
+ row: "plan"
715
+ },
716
+ {
717
+ id: "mS5",
718
+ kind: "sextant",
719
+ arch: "lower",
720
+ dentition: "primary",
721
+ labelKey: "sextant",
722
+ labelIndex: 5,
723
+ code: "S5",
724
+ teeth: ["73", "72", "71", "81", "82", "83"],
725
+ column: 1,
726
+ row: "plan"
727
+ },
728
+ {
729
+ id: "mS6",
730
+ kind: "sextant",
731
+ arch: "lower",
732
+ dentition: "primary",
733
+ labelKey: "sextant",
734
+ labelIndex: 6,
735
+ code: "S6",
736
+ teeth: ["84", "85"],
737
+ column: 2,
738
+ row: "plan"
739
+ },
740
+ // Lower facial (side) row.
741
+ {
742
+ id: "mQ4",
743
+ kind: "quadrant",
744
+ arch: "lower",
745
+ dentition: "primary",
746
+ labelKey: "quadrant",
747
+ labelIndex: 4,
748
+ code: "Q4",
749
+ teeth: d(8),
750
+ column: 0,
751
+ row: "side"
752
+ },
753
+ {
754
+ id: "mQ3",
755
+ kind: "quadrant",
756
+ arch: "lower",
757
+ dentition: "primary",
758
+ labelKey: "quadrant",
759
+ labelIndex: 3,
760
+ code: "Q3",
761
+ teeth: d(7),
762
+ column: 1,
763
+ row: "side"
764
+ },
765
+ {
766
+ id: "mAI",
767
+ kind: "arch",
768
+ arch: "lower",
769
+ dentition: "primary",
770
+ labelKey: "archLower",
771
+ code: "AI",
772
+ teeth: [...d(7), ...d(8)],
773
+ column: 2,
774
+ row: "side"
775
+ }
776
+ ], he = [
777
+ ...O,
778
+ ...L
779
+ ], be = he.reduce((e, t) => (e[t.id] = t, e), {});
780
+ function De(e) {
781
+ return e in be;
782
+ }
783
+ function Fe(e, t, n) {
784
+ return (e === "primary" ? L : O).filter(
785
+ (o) => o.arch === t && o.row === n && o.kind !== "general"
786
+ ).sort((o, c) => o.column - c.column);
787
+ }
788
+ function Qe(e) {
789
+ return (e === "primary" ? L : O).find((n) => n.kind === "general");
790
+ }
791
+ const we = 36;
792
+ function Ue(e, t) {
793
+ const n = e.kind === "quadrant" || e.kind === "arch" ? e.code : e.kind === "general" ? "general" : null;
794
+ return n ? `${/\/teeth\/?$/.test(t) ? t.replace(/\/teeth\/?$/, "/global") : `${t}/global`}/${n}.webp` : null;
795
+ }
796
+ const ye = 8, N = we + g;
797
+ function He(e, t) {
798
+ if (e.length === 0) return { specials: [], width: t };
799
+ const n = t + ye, r = e.map((l) => ({
800
+ element: l,
801
+ x: n + l.column * N,
802
+ y: 0
803
+ })), o = Math.max(...e.map((l) => l.column)), c = n + (o + 1) * N - g;
804
+ return { specials: r, width: c };
805
+ }
806
+ function Ze(e, t) {
807
+ switch (t) {
808
+ case "universal":
809
+ return Y[e] ?? e;
810
+ case "palmer":
811
+ return B[e] ?? e;
812
+ case "fdi":
813
+ default:
814
+ return e;
815
+ }
816
+ }
817
+ function je() {
818
+ return {};
819
+ }
820
+ function Ge(e) {
821
+ const t = {};
822
+ for (const [n, r] of Object.entries(e))
823
+ !r || r.length === 0 || (t[n] = { conditions: r, surfaces: [] });
824
+ return t;
825
+ }
826
+ function Ye(e) {
827
+ const t = {};
828
+ for (const [n, r] of Object.entries(e)) {
829
+ if (!r || r.length === 0) continue;
830
+ const o = [], c = [];
831
+ for (const l of r) {
832
+ w(l.condition) && !o.includes(l.condition) && o.push(l.condition);
833
+ for (const i of l.surfaces ?? [])
834
+ c.includes(i) || c.push(i);
835
+ }
836
+ t[n] = { conditions: o, surfaces: c, symbols: r };
837
+ }
838
+ return t;
839
+ }
840
+ export {
841
+ Ne as $,
842
+ Te as A,
843
+ je as B,
844
+ W as C,
845
+ Qe as D,
846
+ w as E,
847
+ ae as F,
848
+ De as G,
849
+ Ze as H,
850
+ J as I,
851
+ He as J,
852
+ Me as K,
853
+ Le as L,
854
+ V as M,
855
+ P as N,
856
+ K as O,
857
+ S as P,
858
+ Ue as Q,
859
+ Fe as R,
860
+ be as S,
861
+ Se as T,
862
+ Ie as U,
863
+ Oe as V,
864
+ _e as W,
865
+ Ee as X,
866
+ qe as Y,
867
+ Pe as Z,
868
+ Ke as _,
869
+ X as a,
870
+ fe as a0,
871
+ we as a1,
872
+ ge as a2,
873
+ Re as a3,
874
+ me as a4,
875
+ Ae as a5,
876
+ E as a6,
877
+ te as b,
878
+ ne as c,
879
+ z as d,
880
+ T as e,
881
+ x as f,
882
+ B as g,
883
+ Y as h,
884
+ $ as i,
885
+ he as j,
886
+ $e as k,
887
+ xe as l,
888
+ _ as m,
889
+ ee as n,
890
+ Ge as o,
891
+ Ye as p,
892
+ ie as q,
893
+ y as r,
894
+ ke as s,
895
+ Ce as t,
896
+ ve as u,
897
+ le as v,
898
+ de as w,
899
+ ue as x,
900
+ se as y,
901
+ ce as z
902
+ };
903
+ //# sourceMappingURL=tooth-data-DR8Kdnup.js.map