@kmanueldc/vue-odontogram 0.1.1

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 (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +720 -0
  3. package/THIRD_PARTY_NOTICES.md +37 -0
  4. package/dist/catalogs/nts-peru.d.ts +277 -0
  5. package/dist/components/ConditionLabels.vue.d.ts +40 -0
  6. package/dist/components/FindingPrimitives.vue.d.ts +6 -0
  7. package/dist/components/Odontogram.vue.d.ts +131 -0
  8. package/dist/components/OdontogramTooltip.vue.d.ts +82 -0
  9. package/dist/components/SurfaceDiagrams.vue.d.ts +33 -0
  10. package/dist/components/SurfaceGuide.vue.d.ts +47 -0
  11. package/dist/components/Tooth.vue.d.ts +56 -0
  12. package/dist/components/ToothInspector.vue.d.ts +57 -0
  13. package/dist/composables/useOdontogram.d.ts +43 -0
  14. package/dist/composables/useToothSelection.d.ts +11 -0
  15. package/dist/data/index.d.ts +1 -0
  16. package/dist/data/permanent-horizontal.d.ts +8 -0
  17. package/dist/data/permanent.d.ts +8 -0
  18. package/dist/data/primary-horizontal.d.ts +19 -0
  19. package/dist/data/primary.d.ts +14 -0
  20. package/dist/index.d.ts +26 -0
  21. package/dist/types/findings.d.ts +154 -0
  22. package/dist/types/geometry.d.ts +18 -0
  23. package/dist/types/odontogram.d.ts +119 -0
  24. package/dist/types/surfaces.d.ts +21 -0
  25. package/dist/utils/anchors.d.ts +37 -0
  26. package/dist/utils/compositions.d.ts +41 -0
  27. package/dist/utils/dentition-layout.d.ts +27 -0
  28. package/dist/utils/finding-records.d.ts +82 -0
  29. package/dist/utils/findings.d.ts +74 -0
  30. package/dist/utils/labels.d.ts +4 -0
  31. package/dist/utils/layout.d.ts +19 -0
  32. package/dist/utils/mixed-layout.d.ts +20 -0
  33. package/dist/utils/navigation.d.ts +11 -0
  34. package/dist/utils/notation.d.ts +26 -0
  35. package/dist/utils/numbers.d.ts +28 -0
  36. package/dist/utils/primary-horizontal-layout.d.ts +13 -0
  37. package/dist/utils/primary-layout.d.ts +34 -0
  38. package/dist/utils/quadrants.d.ts +6 -0
  39. package/dist/utils/state-marks.d.ts +35 -0
  40. package/dist/utils/surfaces.d.ts +118 -0
  41. package/dist/utils/svg-geometry.d.ts +36 -0
  42. package/dist/utils/tooth-frames.d.ts +51 -0
  43. package/dist/vue-odontogram.css +1 -0
  44. package/dist/vue-odontogram.js +3202 -0
  45. package/dist/vue-odontogram.umd.cjs +1 -0
  46. package/package.json +52 -0
@@ -0,0 +1 @@
1
+ (function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D.VueOdontogram={},D.Vue))})(this,(function(D,t){"use strict";var ws=Object.defineProperty;var Cs=(D,t,ut)=>t in D?ws(D,t,{enumerable:!0,configurable:!0,writable:!0,value:ut}):D[t]=ut;var Ke=(D,t,ut)=>Cs(D,typeof t!="symbol"?t+"":t,ut);const ut=[{position:1,type:"Central Incisor",outlinePath:"M397.992 51.339C396.126 51.1841 393.495 50.5617 393.495 50.5617C393.495 50.5617 388.804 49.6453 386.903 48.5677C384.873 47.4162 382.213 45.7195 381.838 44.0514C381.487 42.4836 381.216 40.0226 381.478 38.243L381.503 38.0727C381.82 35.9287 382.29 32.7452 382.642 29.3191C382.817 27.6207 382.583 26.5905 383.332 24.0911C384.118 21.4652 384.555 20.2179 385.09 19.2766C385.648 18.2937 386.375 17.5159 386.841 16.5072C387.593 14.8802 388.91 12.8822 390.18 11.3573C390.902 10.4905 391.602 9.74461 392.207 9.11454C393.08 8.20669 394.629 6.4959 395.556 5.46719C396.866 4.01329 398.196 2.73364 399.344 2.32547C400.382 1.95648 401.652 1.80289 402.575 1.56192C403.741 1.25751 404.7 1.04041 406.481 1.59988C407.789 2.01078 408.79 2.15093 410.175 3.6958C411.909 5.63147 412.563 6.70795 413.119 7.75747C414.007 9.43534 415.224 11.7273 416.073 13.2435C416.584 14.1554 417.935 15.8859 419.471 20.7919C420.739 24.8422 421.417 27.4048 421.716 28.4564C422.057 29.6562 422.602 31.5093 422.815 33.7313C423.154 37.2832 423.699 40.0978 423.625 43.1077C423.562 45.6958 423.671 47.3905 422.667 48.4567C421.852 49.3227 420.962 50.1403 419.837 50.5815C418.166 51.2367 416.619 51.7043 415.323 51.8901C414.174 52.0548 409.33 52.1292 405.791 51.8445C404.461 51.7375 402.725 51.7319 397.992 51.339Z",shadowPath:"M410.562 10.2393C426.588 45.9698 419.344 47.3813 414.383 48.2436C409.421 49.1058 390.229 45.8566 389.156 45.6013C388.783 45.4122 381.586 45.5268 385.27 28.9613C388.307 15.307 399.25 6.5008 400.149 5.94125C402.84 4.2654 407.678 3.81025 410.562 10.2393Z",lineHighlightPath:"M386.65 40.1568C386.979 40.5013 390.29 43.0038 394.2 44.879C396.819 46.1347 400.79 46.3275 403.707 46.4582C411.145 46.8422 412.214 45.7688 414.456 45.2944C414.934 45.1809 415.23 45.0675 415.965 44.8037"},{position:2,type:"Lateral Incisor",outlinePath:"M339.362 5.90227C342.255 3.71416 346.038 1.25774 347.807 1.15688C351.997 0.918049 355.515 3.10622 357.625 6.73623C361.668 13.6941 364.043 21.5609 365.951 29.3396C366.793 32.7727 371.064 45.061 366.866 47.897C360.805 55.8472 336.444 55.8684 329.833 49.9979C323.057 43.9805 325.09 29.7675 327.77 22.2921C329.981 16.1281 334.178 9.82403 339.362 5.90227Z",shadowPath:"M340.341 10.7533C342.637 9.01674 345.639 7.06721 347.044 6.98717C350.369 6.79762 353.161 8.53425 354.835 11.4152C358.044 16.9373 359.929 23.1807 361.443 29.3542C362.112 32.0788 365.502 41.8314 362.169 44.0822C357.359 50.3918 338.025 50.4086 332.779 45.7496C327.401 40.9738 329.014 29.6938 331.142 23.761C332.896 18.869 336.227 13.8658 340.341 10.7533Z",lineHighlightPath:"M334.964 39.2131C335.743 39.9998 343.128 45.3167 349.494 44.3903C352.66 43.9297 359.564 41.7577 360.67 41.2767"},{position:3,type:"Canine",outlinePath:"M275.285 36.7016C275.461 34.8357 275.849 18.5473 286.018 5.57867C288.971 1.81325 299.434 0.829071 303.316 3.82989C310.408 9.31139 313.426 28.9506 310.396 37.4059C308.951 41.4393 297.215 55.4587 291.42 52.8366C285.975 50.3727 274.6 43.9742 275.285 36.7016Z",shadowPath:"M301.598 7.93945C307.291 12.3406 309.864 28.5513 307.396 35.4392C306.212 38.7427 296.601 50.225 291.854 48.0774C287.984 46.3265 281.376 42.5321 279.505 38.5086C275.156 29.1535 286.937 -3.39247 301.598 7.93945Z",lineHighlightPath:"M281.255 35.7132C281.766 36.2349 283.933 38.6225 286.307 40.4563C289.837 43.1816 290.269 43.5706 291.974 44.5673C293.243 45.3091 296.192 46.2724 304.782 36.2803 M287.379 19.4012C287.632 19.2016 291.839 21.1066 296.933 17.499"},{position:4,type:"First Premolar",outlinePath:"M236.98 4.87854C231.34 8.91989 227.474 33.8121 227.41 33.9971C227.423 35.3948 224.346 44.1157 245.059 53.0117C246.025 53.4266 247.125 52.888 247.86 52.4695C248.67 52.0073 250.354 50.8376 253.096 48.11C254.772 46.4429 261.519 39.4872 261.637 34.8665C261.691 32.7406 261.314 28.4868 260.916 24.2565C260.517 20.0262 259.172 12.5851 258.255 9.7502C257.37 7.00905 252.569 -3.57975 236.98 4.87854Z",shadowPath:"M238.114 7.66346C233.204 11.182 229.838 32.8544 229.782 33.0155C229.793 34.2324 227.114 41.8252 245.148 49.5706C245.989 49.9317 246.947 49.4629 247.586 49.0985C248.293 48.6961 249.758 47.6777 252.146 45.3029C253.605 43.8514 259.479 37.7955 259.582 33.7724C259.629 31.9215 259.301 28.218 258.954 24.5348C258.607 20.8517 257.435 14.3731 256.638 11.905C255.866 9.51838 251.687 0.299255 238.114 7.66346Z",lineHighlightPath:"M232.699 39.8277C232.885 39.9138 233.796 40.4028 238.753 42.4719C241.555 43.6416 243.526 43.4623 245.192 43.1391C246.68 42.8502 249.007 41.9121 250.856 40.686C251.932 39.8864 252.954 38.9499 254.698 37.0231C255.147 36.4782 255.449 36.0189 256.052 35.3458 M239.545 12.8442C241.885 10.1252 250.366 10.5793 250.366 10.5793"},{position:5,type:"Second Premolar",outlinePath:"M186.485 45.8905C188.39 47.4915 194.878 52.668 197.762 53.1457C200.384 53.5801 211.318 44.6344 213.743 37.254C214.322 35.4928 215.038 15.1384 208.58 4.13152C202.248 -2.02701 189.273 -0.756658 185.395 11.0477C183.218 17.6734 180.668 30.608 180.423 32.2205C180.177 33.8383 180.188 36.0117 180.547 38.1716C180.751 39.3933 180.853 40.0649 181.221 40.6135C181.726 41.3662 183.233 43.1574 186.485 45.8905Z",shadowPath:"M188.107 43.3403C189.761 44.7301 195.393 49.2236 197.896 49.6383C200.172 50.0154 209.664 42.2499 211.769 35.8432C212.271 34.3143 212.893 16.6453 207.287 7.09053C201.791 1.74449 190.527 2.84724 187.16 13.0943C185.271 18.8458 183.057 30.074 182.845 31.4738C182.631 32.8782 182.641 34.7648 182.953 36.6398C183.129 37.7003 183.218 38.2832 183.537 38.7594C183.976 39.4129 185.284 40.9678 188.107 43.3403Z",lineHighlightPath:"M185.566 38.954C200.902 47.5796 204.772 37.6999 208.388 34.1061 M191.566 11.1268C196.702 7.12464 201.745 8.78762 202.549 8.92105"},{position:6,type:"First Molar",outlinePath:"M128.904 45.8941C130.676 47.3001 145.884 61.9755 162.145 45.1423C163.249 43.9986 172.589 28.7255 163.065 9.88792C162.022 7.82514 161.32 5.92758 160.392 4.9355C159.008 3.45593 158.296 2.7052 156.622 2.60279C155.155 2.51311 153.656 3.01459 150.242 3.84879C148.517 4.2702 147.372 4.53309 144.251 3.3168C143.121 2.87675 141.495 2.08665 139.43 1.98738C137.768 1.90751 136.636 1.9765 135.262 2.89208C133.14 4.30717 131.556 6.06007 130.301 8.67838C129.938 9.43672 129.094 10.8117 127.581 13.8497C126.625 15.77 125.381 18.4495 124.394 20.9063C123.406 23.3631 122.657 25.5204 122.24 27.0814C121.585 29.5351 120.898 32.0017 121.468 34.2957L121.471 34.3102C121.817 35.7 122.322 37.7345 123.709 39.8068C125.153 41.9637 126.819 44.2397 128.904 45.8941Z",shadowPath:"M131.01 43.4559C132.509 44.7414 145.836 57.4979 160.034 42.7994C160.999 41.8008 169.154 28.4646 160.838 12.016C159.927 10.2149 159.315 8.55796 158.504 7.6917C157.296 6.39976 156.674 5.74424 155.212 5.65482C153.932 5.57651 152.623 6.01439 149.641 6.7428C148.135 7.11076 147.135 7.34032 144.41 6.27827C143.424 5.89404 142.004 5.20414 140.2 5.11746C129.959 4.62519 125.555 25.666 125.191 27.029L125.189 27.0338C124.616 29.1822 122.705 36.3359 131.01 43.4559Z",lineHighlightPath:"M153.854 27.4742C149.502 26.6409 144.049 27.8519 142.802 30.5372C143.302 25.2189 138.067 23.5889 133.932 23.5051 M153.854 27.4742C156.709 28.0209 159.09 29.4476 159.498 31.9153 M153.854 27.4742C155.556 27.6746 159.3 27.5062 160.657 25.2286 M129.139 24.6538C129.507 24.1665 131.326 23.4523 133.932 23.5051 M133.932 23.5051C132.471 22.6048 129.672 20.364 130.173 18.6034"},{position:7,type:"Second Molar",outlinePath:"M60.6793 25.3418C59.9161 27.6449 57.3636 48.9037 84.9129 53.0846C99.7889 54.3626 106.055 39.2037 106.365 36.7909C108.564 30.6549 106.469 17.6337 105.276 14.6833C103.739 10.8816 102.7 8.48706 101.946 7.37378C100.442 5.15401 99.23 3.29064 98.43 2.92655C97.2983 2.41145 95.3919 1.13034 91.2714 2.68435C88.4359 3.75373 86.0838 3.4998 83.6256 2.76604C80.7363 1.9036 76.9082 0.690209 75.4367 0.962055C74.4606 1.14236 73.4249 1.15689 72.6333 1.98215C71.4867 3.17764 70.1618 4.75807 67.8021 9.5839C66.634 11.9729 64.7932 15.7196 63.8949 17.7849C62.387 21.2519 61.3298 23.3785 60.6793 25.3418Z",shadowPath:"M63.8099 25.4532C63.1456 27.4579 60.9238 45.9624 84.9037 49.6015C97.8523 50.7139 103.307 37.5191 103.576 35.419C106.215 28.0569 104.202 16.4153 99.73 9.81324C98.4211 7.88108 97.3658 6.25914 96.6695 5.94222C95.6844 5.49387 93.796 4.7905 90.2093 6.14316C87.7412 7.07399 85.9229 6.4412 83.7832 5.80251C81.4234 5.09812 76.4488 2.79134 74.2151 5.12018C73.2171 6.16077 72.0638 7.53645 70.0098 11.737C67.83 16.195 65.3744 20.7318 63.8099 25.4532Z",lineHighlightPath:"M92.3375 21.9418C89.3377 22.2849 84.8906 23.6339 83.7253 27.9829C84.7838 23.138 77.3962 22.8185 73.5022 23.7247 M92.3375 21.9418C96.1666 21.5038 99.585 23.1101 100.215 24.165 M92.3375 21.9418C94.4127 21.402 98.5317 19.898 99.5584 17.8597 M68.7524 26.3173C69.2513 25.49 70.8242 24.3479 73.5022 23.7247 M73.5022 23.7247C71.8339 23.4169 68.3955 22.3238 67.9878 20.414"},{position:8,type:"Third Molar",outlinePath:"M22.8836 52.8066C23.9272 53.0915 25.7986 52.8756 26.2096 52.9116C26.501 52.9372 29.1459 52.7852 30.9534 52.2805C33.3552 51.4149 34.9901 50.7777 35.8495 50.1498C37.4391 48.9886 39.8965 46.9387 41.9506 44.3052C43.4092 42.4352 44.6381 40.2207 45.6008 37.6721C46.2927 35.8405 46.8536 34.1203 46.9928 31.3837C47.0827 29.6169 47.0888 27.1207 46.8396 24.256C46.5904 21.3913 46.1008 18.2531 45.5737 15.8629C45.0466 13.4727 44.4986 11.8788 43.9103 10.4861C43.3219 9.09334 42.7016 7.94145 42.3718 7.27535C41.7672 6.05446 41.3188 4.92976 40.5172 4.18705C38.9052 2.69353 37.6504 2.08716 36.39 1.85884C35.3031 1.66195 33.6407 1.67752 32.5207 2.07341C30.9374 2.63304 30.0912 3.2864 27.6613 3.30729C24.3667 3.3356 22.5667 1.96049 20.5098 1.81402C17.0827 1.56998 15.2376 1.60216 14.1182 2.20976C13.2193 2.69768 12.0927 3.47083 9.80979 6.74515C9.14188 7.70312 8.43252 8.93509 6.93122 12.162C5.88407 14.4128 4.32452 17.8482 3.48639 19.6641C2.55627 21.6793 1.61739 23.4684 0.935372 26.3698C0.449847 28.4352 0.305589 30.9466 0.839682 33.6862C1.20408 35.5554 1.8879 38.1004 4.17249 41.0505C6.62542 44.218 8.40151 46.3149 9.38601 47.091C10.2686 47.7868 11.1762 48.4668 12.4397 49.0231C14.0734 49.7423 15.5681 50.8399 17.5147 51.4152C19.7705 52.0818 21.1395 52.3305 22.8836 52.8066Z",shadowPath:"M22.9904 49.6908C23.9066 49.9409 25.5494 49.7513 25.9103 49.783C26.166 49.8054 28.488 49.6719 30.0748 49.2289C32.1834 48.469 33.6186 47.9096 34.3731 47.3584C35.7686 46.3389 37.9259 44.5394 39.7292 42.2274C41.0097 40.5858 42.0885 38.6416 42.9337 36.4042C43.5411 34.7963 44.0335 33.2862 44.1557 30.8837C44.2346 29.3326 44.24 27.1413 44.0212 24.6263C43.8025 22.1114 43.3726 19.3564 42.9099 17.2581C42.4472 15.1598 41.9661 13.7604 41.4496 12.5378C40.9331 11.3151 40.3885 10.3039 40.099 9.71911C39.5682 8.64729 39.1745 7.65993 38.4708 7.00789C37.0556 5.69674 35.9541 5.16442 34.8476 4.96398C33.8934 4.79113 32.434 4.8048 31.4507 5.15234C30.0608 5.64364 29.3179 6.21722 27.1847 6.23556C24.2924 6.26042 22.7122 5.05321 20.9064 4.92463C17.8978 4.71038 16.2779 4.73864 15.2953 5.27204C14.5061 5.70039 13.5171 6.37914 11.5129 9.25365C10.9266 10.0946 10.3038 11.1762 8.98585 14.0091C8.06656 15.9851 6.69744 19.001 5.96165 20.5951C5.1451 22.3642 4.32086 23.9349 3.72212 26.482C3.29588 28.2953 3.16924 30.4999 3.63812 32.9051C3.95802 34.546 4.55834 36.7803 6.56397 39.3702C8.71739 42.1509 10.2766 43.9917 11.1409 44.6731C11.9158 45.2839 12.7125 45.8809 13.8217 46.3692C15.256 47.0006 16.5682 47.9643 18.2771 48.4693C20.2574 49.0544 21.4592 49.2728 22.9904 49.6908Z",lineHighlightPath:"M7.13742 27.9101C7.89327 26.717 10.2562 25.7846 12.8627 25.483M38.0458 27.6444C37.0983 25.9368 34.2284 24.8447 31.1328 24.7739M37.58 21.3626C36.685 22.4687 34.1426 24.6994 31.1328 24.7739M31.1328 24.7739C27.1226 24.6823 22.7336 26.3048 21.6544 30.5239C21.9221 26.1555 17.0744 24.9957 12.8627 25.483M6.646 21.8371C7.23084 23.1942 9.29296 25.8232 12.8627 25.483"}],Xe=[{position:1,type:"Central Incisor",outlinePath:"M173.951 1.698c-2.198.16-5.302.862-5.302.862s-5.531 1.025-7.781 2.27c-2.403 1.333-5.553 3.299-6.013 5.258-.432 1.84-.78 4.734-.491 6.832l.027.2c.348 2.527.865 6.28 1.239 10.316.186 2-.101 3.21.751 6.16.895 3.1 1.395 4.573 2.013 5.687.646 1.164 1.493 2.087 2.03 3.28.866 1.924 2.393 4.29 3.87 6.1a48.805 48.805 0 0 0 2.36 2.663c1.016 1.078 2.819 3.11 3.898 4.331 1.526 1.727 3.076 3.248 4.423 3.742 1.217.446 2.709.642 3.793.936 1.369.372 2.494.638 4.597 0 1.545-.468 2.725-.621 4.372-2.424 2.064-2.258 2.846-3.517 3.512-4.746 1.065-1.964 2.524-4.648 3.541-6.422.611-1.068 2.221-3.089 4.086-8.845 1.54-4.752 2.367-7.76 2.731-8.994.415-1.408 1.079-3.583 1.355-6.196.44-4.176 1.114-7.482 1.062-11.026-.044-3.046.104-5.04-1.065-6.306-.95-1.029-1.988-2.001-3.306-2.534-1.959-.79-3.775-1.358-5.298-1.592-1.351-.207-7.05-.35-11.219-.057-1.567.11-3.61.097-9.185.505Z",shadowPath:"M188.269 50.215c19.275-41.867 10.766-43.612 4.937-44.684-5.829-1.073-28.455 2.53-29.72 2.817-.442.218-8.911 0-4.767 19.54 3.416 16.105 16.193 26.596 17.244 27.265 3.148 2.003 8.837 2.595 12.306-4.938Z",lineHighlightPath:"M160.472 14.727c.392-.402 4.317-3.309 8.941-5.47 3.097-1.448 7.773-1.629 11.207-1.749 8.759-.365 10.004.91 12.637 1.495.562.139.909.276 1.771.595"},{position:2,type:"Lateral Incisor",outlinePath:"M135.016 60.41c3.443 1.355 7.834 2.73 9.601 2.346 4.185-.91 7.044-4.017 8.123-8.152 2.069-7.927 2.249-16.288 1.995-24.436-.113-3.596.72-16.81-4.184-18.444-8.135-6.14-32.088.494-36.979 8.055-5.013 7.751.878 21.131 5.56 27.728 3.862 5.44 9.714 10.474 15.884 12.903Z",shadowPath:"M134.65 55.386c2.732 1.076 6.217 2.167 7.62 1.862 3.321-.723 5.59-3.188 6.446-6.47 1.642-6.29 1.786-12.927 1.583-19.393-.089-2.854.572-13.342-3.32-14.638-6.456-4.873-25.466.392-29.348 6.393-3.979 6.152.696 16.77 4.413 22.006 3.064 4.317 7.709 8.313 12.606 10.24Z",lineHighlightPath:"M121.569 28.952c.551-.984 6.354-8.214 12.866-9.045 3.238-.413 10.619-.17 11.838 0"},{position:3,type:"Canine",outlinePath:"M77.63 64.236c1.692 1.401 15.516 14.583 34.698 16.903 5.569.674 15.058-7.184 15.789-12.89 1.335-10.423-12.444-29.205-21.965-33.703-4.542-2.145-25.892-4.039-28.523 2.939-2.471 6.557-6.596 21.29 0 26.751Z",shadowPath:"M123.285 66.267c1.072-8.368-10.234-23.94-17.99-27.603-3.72-1.757-21.206-3.308-23.36 2.407-1.757 4.66-4.09 13.284-2.306 18.17 4.15 11.36 40.897 28.573 43.656 7.026Z",lineHighlightPath:["M82.84 60.043c-.01-.855-.193-4.63.256-8.12.667-5.185.703-5.866 1.29-8.106.437-1.666 2.083-4.91 17.487-3.748","M101.438 68.49c.376-.045 2.284-5.112 9.498-6.344"]},{position:4,type:"First Premolar",outlinePath:"M93.684 108.748c-7.498 3.397-35.368-7.397-35.596-7.441-1.429-.842-12.215-2.854-9.068-29.414.147-1.238 1.353-2.05 2.218-2.556.956-.559 3.157-1.595 7.587-2.794 2.707-.734 13.856-3.54 18.674-.92 2.216 1.206 6.363 4.117 10.473 7.036 4.11 2.919 10.958 8.715 13.327 11.338 2.291 2.537 10.324 13.75-7.615 24.751Z",shadowPath:"M91.495 105.931c-6.528 2.958-30.793-6.44-30.992-6.478-1.243-.734-10.634-2.486-7.895-25.61.128-1.078 1.178-1.785 1.932-2.225.832-.487 2.748-1.39 6.605-2.433 2.357-.639 12.064-3.082 16.258-.8 1.93 1.05 5.54 3.584 9.12 6.125 3.578 2.541 9.54 7.588 11.603 9.872 1.994 2.208 8.987 11.971-6.63 21.549Z",lineHighlightPath:["M55.234 92.414c.022-.242.06-1.469.875-7.79.46-3.573 1.813-5.49 3.134-7.01 1.18-1.359 3.524-3.193 5.88-4.365 1.46-.632 3.029-1.126 6.044-1.776.826-.138 1.477-.175 2.526-.395","M87.02 101.387c4.183-.792 8.747-9.774 8.747-9.774"]},{position:5,type:"Second Premolar",outlinePath:"M33.396 127.652c-1.088-2.713-4.486-11.852-3.962-15.246.477-3.085 14.47-12.008 23.595-12.008 2.178 0 25.157 6.665 35.073 17.908 4.551 9.324-1.624 23.339-16.22 23.339-8.193 0-23.563-1.897-25.453-2.215-1.896-.319-4.317-1.128-6.596-2.321-1.289-.675-2-1.035-2.478-1.647-.655-.84-2.101-3.178-3.96-7.81Z",shadowPath:"M36.837 126.778c-.945-2.356-3.895-10.289-3.44-13.235.414-2.679 12.561-10.424 20.483-10.424 1.89 0 21.837 5.785 30.445 15.545 3.951 8.094-1.41 20.26-14.08 20.26-7.112 0-20.454-1.647-22.095-1.922-1.645-.277-3.747-.98-5.725-2.015-1.12-.586-1.737-.899-2.151-1.43-.57-.729-1.825-2.759-3.437-6.779Z",lineHighlightPath:["M40.8 131.221c-4.003-20.278 8.442-20.974 13.779-23.692","M74.056 134.729c6.35-4.264 6.343-10.503 6.489-11.448"]},{position:6,type:"First Molar",outlinePath:"M35.539 203.323c-3.363.196-32.788-4.02-28.495-42.465 3.631-20.408 26.21-23.364 29.557-22.912 9.019-.745 25.727 6.743 29.255 9.403 4.546 3.427 7.384 5.681 8.606 7.092 2.436 2.814 4.499 5.11 4.7 6.313.284 1.703 1.317 4.72-2.248 9.687-2.453 3.418-2.957 6.663-2.856 10.223.118 4.185.37 9.754-.524 11.63-.592 1.244-.984 2.627-2.375 3.392-2.015 1.108-4.61 2.317-11.93 3.748-3.623.708-9.309 1.83-12.401 2.292-5.19.777-8.423 1.43-11.289 1.597Z",shadowPath:"M36.515 199.085c-2.927.17-28.54-3.499-24.803-36.963 3.16-17.764 22.814-20.337 25.727-19.944 10.82-.893 25.709 5.989 32.955 14.358 2.12 2.45 3.917 4.448 4.091 5.495.248 1.482.513 4.268-2.59 8.591-2.135 2.975-1.94 5.641-1.852 8.74.096 3.417 1.402 10.917-2.523 13.076-1.754.964-4.013 2.016-10.384 3.261-6.762 1.322-13.728 2.984-20.621 3.386Z",lineHighlightPath:["M37.132 192.147c1.288-.372 3.385-2.071 5.183-5.438m9.008-35.98c1.188 1.224 2.114 6.385.15 11.363m0 0c-1.537 3.899-4.944 9.378-11.195 9.378 6.877.321 4.651 10.343 2.037 15.239m9.159-24.617c1.47-2.589 4.966-7.572 8.068-8.217m-17.227 32.834c-.186 2.348.044 7.351 2.458 8.584"]},{position:7,type:"Second Molar",outlinePath:"M4.969 248.132c-1.188-2.74-14.708-27.152 12.319-42.139 1.836-1.018 24.508-7.711 45.28 10.874 2.274 2.035 4.455 3.579 5.403 5.102 1.414 2.271 2.128 3.435 1.687 5.606-.387 1.901-1.54 3.642-3.77 7.711-1.127 2.056-1.854 3.427-1.369 7.824.175 1.59.627 3.935.048 6.603-.466 2.147-.941 3.567-2.578 5.006-2.53 2.224-5.307 3.645-9.076 4.35-1.091.204-3.133.811-7.525 1.702-2.776.563-6.619 1.234-10.09 1.654-3.47.42-6.478.638-8.612.636-3.353-.002-6.734.031-9.465-1.48l-.018-.01c-1.654-.915-4.076-2.255-6.245-4.732-2.258-2.579-4.591-5.482-5.989-8.707Z",shadowPath:"M8.799 246.28c-1.128-2.352-12.843-23.709 10.756-36.796 1.604-.889 21.4-6.732 39.538 9.496 1.986 1.777 3.89 3.125 4.717 4.454 1.235 1.983 1.859 3 1.473 4.895-.337 1.66-1.343 3.18-3.291 6.734-.984 1.795-1.619 2.992-1.196 6.831.154 1.389.548 3.436.042 5.766-2.872 13.231-31.213 11.657-33.076 11.656h-.007c-2.936-.003-12.714-.01-18.956-13.036Z",lineHighlightPath:["M32.14 255.091c.748-.303 2.28-2.378 3.103-5.721m-1.99-35.481c3.009 1.363 4.015 4.888 3.736 8.716m0 0c-.424 5.835-3.832 12.377-7.683 13.049 6.954 1.18 7.244 8.414 5.937 13.716m1.746-26.765c.327-2.24 1.82-6.958 5.19-7.91m-6.936 34.675c.65 2.172 2.55 6.507 4.967 6.471"]},{position:8,type:"Third Molar",outlinePath:"M.895 291.331c-.362-1.218-.116-3.411-.164-3.892-.035-.34.124-3.438.727-5.558 1.04-2.82 1.808-4.74 2.573-5.752 1.413-1.872 3.913-4.769 7.135-7.2 2.288-1.726 5.003-3.187 8.133-4.339 2.249-.828 4.362-1.502 7.732-1.693 2.175-.123 5.25-.155 8.782.108s7.403.804 10.353 1.397 4.92 1.218 6.641 1.893c1.722.675 3.148 1.389 3.972 1.768 1.51.696 2.9 1.209 3.824 2.14 1.857 1.872 2.617 3.334 2.912 4.807.254 1.27.252 3.216-.224 4.531-.672 1.859-1.468 2.856-1.468 5.7 0 3.857 1.713 5.95 1.915 8.356.337 4.008.317 6.168-.42 7.485-.591 1.057-1.532 2.383-5.541 5.088-1.173.791-2.684 1.634-6.643 3.424-2.762 1.248-6.977 3.108-9.205 4.107-2.473 1.109-4.667 2.226-8.234 3.053-2.54.589-5.631.784-9.012.186-2.307-.408-5.449-1.183-9.107-3.827-3.928-2.839-6.53-4.897-7.497-6.041-.866-1.026-1.714-2.082-2.412-3.555-.904-1.905-2.272-3.643-3-5.916-.846-2.633-1.167-4.233-1.772-6.27Z",shadowPath:"M4.732 291.175c-.317-1.07-.101-2.994-.144-3.416-.03-.299.11-3.019.638-4.88.914-2.476 1.588-4.161 2.26-5.05 1.24-1.643 3.434-4.187 6.263-6.321 2.009-1.515 4.393-2.797 7.14-3.809 1.974-.727 3.83-1.318 6.788-1.486 1.91-.108 4.61-.136 7.71.095 3.1.231 6.498.706 9.088 1.226 2.59.521 4.319 1.07 5.83 1.662 1.512.592 2.764 1.22 3.487 1.553 1.326.61 2.547 1.061 3.357 1.878 1.63 1.643 2.298 2.927 2.557 4.22.223 1.115.221 2.824-.196 3.978-.59 1.632-1.29 2.507-1.29 5.004 0 3.385 1.504 5.223 1.682 7.335.296 3.519.278 5.416-.369 6.571-.52.928-1.345 2.093-4.865 4.467-1.03.695-2.355 1.435-5.831 3.006-2.425 1.096-6.126 2.728-8.082 3.606-2.17.973-4.096 1.954-7.228 2.68-2.229.517-4.944.688-7.912.163-2.024-.358-4.783-1.038-7.995-3.359-3.448-2.493-5.732-4.299-6.58-5.304-.761-.901-1.505-1.827-2.119-3.121-.793-1.672-1.994-3.198-2.634-5.193-.742-2.312-1.024-3.717-1.555-5.505Z",lineHighlightPath:["M31.732 309.511c1.462-.897 2.585-3.672 2.93-6.726m-2.93-29.453c2.114 1.092 3.49 4.44 3.61 8.062m4.133-7.58c-1.353 1.058-4.074 4.057-4.134 7.58m0 0c.155 4.693-1.797 9.846-6.983 11.152 5.379-.357 6.859 5.305 6.303 10.239m4.557 7.24c-1.678-.671-4.938-3.058-4.557-7.24"]}],Ue=[{position:1,type:"Primary Central Incisor",transform:"translate(360.75 13.3) scale(-0.75 0.75)",outlinePath:"M176 5C170 6 165 10 164 17c-1 8 1 18 4 25 3 7 7 12 12 15 4 2 10 2 14-1 6-5 10-13 12-22 1-7 1-14-2-19-4-7-12-11-18-10Z",shadowPath:"M178 10c-5 1-8 5-9 10-1 7 1 15 4 21 2 5 5 9 9 11 3 1 7 1 10-2 5-4 8-10 9-18 1-6 1-11-2-15-3-5-9-8-15-7Z",lineHighlightPath:"M170 19c4-5 15-7 24-3"},{position:2,type:"Primary Lateral Incisor",transform:"translate(36.75 10.5) scale(0.75)",outlinePath:"M177 21c5-5 15-6 22-3 7 3 11 10 11 18 0 10-5 20-12 25-6 4-14 3-20-2-6-5-9-13-8-22 0-7 2-12 7-16Z",shadowPath:"M180 25c4-4 12-4 17-2 6 3 8 8 8 15 0 8-4 16-10 20-5 3-11 2-15-2-4-4-6-10-5-17 0-6 2-11 5-14Z",lineHighlightPath:"M178 36c5-4 14-5 20-1"},{position:3,type:"Primary Canine",transform:"translate(24.75 10.25) scale(0.75)",outlinePath:"M135 49c1-12 7-24 16-32 4-4 10-4 14-1 7 6 8 17 5 27-3 11-10 20-19 23-6 2-13-2-15-8-2-3-2-6-1-9Z",shadowPath:"M140 49c1-10 6-19 13-26 3-3 7-3 10 0 5 5 5 14 3 22-3 9-8 16-15 19-4 1-9-2-10-6-1-3-1-6-1-9Z",lineHighlightPath:["M142 52c2-10 7-18 14-24","M156 28c4 8 3 17-1 25"]},{position:4,type:"Primary First Molar",transform:"translate(19.5 11) scale(0.75)",outlinePath:"M82 19c10-7 26-7 36 0 9 7 12 19 8 30-4 12-15 19-28 20-13 1-25-4-31-14-6-11-3-26 15-36Z",shadowPath:"M85 24c8-5 21-5 29 1 7 5 9 15 6 24-4 9-12 15-23 16-11 1-20-3-25-11-5-9-2-20 13-26Z",lineHighlightPath:["M78 42c6-5 13-7 19-4 5 2 7 7 8 11","M105 49c5-6 11-7 16-3","M97 27c1 7 1 15 0 22"]},{position:5,type:"Primary Second Molar",transform:"translate(4.5 11.25) scale(0.75)",outlinePath:"M23 16c11-6 28-5 39 3 10 8 13 21 9 33-5 13-17 21-32 22-16 1-29-5-35-17-6-12-1-31 19-41Z",shadowPath:"M27 21c9-5 23-4 32 3 8 6 10 17 7 27-4 10-14 17-27 18-13 1-23-4-28-14-5-10-1-25 16-34Z",lineHighlightPath:["M18 43c7-6 15-8 23-5 5 3 8 8 10 13","M51 51c6-7 14-8 20-3","M40 28c2 8 2 17 0 26"]}],Ge=[{position:1,type:"Primary Central Incisor",outlinePath:"M176 5C170 6 165 10 164 17c-1 8 1 18 4 25 3 7 7 12 12 15 4 2 10 2 14-1 6-5 10-13 12-22 1-7 1-14-2-19-4-7-12-11-18-10Z",shadowPath:"M178 10c-5 1-8 5-9 10-1 7 1 15 4 21 2 5 5 9 9 11 3 1 7 1 10-2 5-4 8-10 9-18 1-6 1-11-2-15-3-5-9-8-15-7Z",lineHighlightPath:"M170 19c4-5 15-7 24-3"},{position:2,type:"Primary Lateral Incisor",outlinePath:"M137 15c-6 1-11 5-13 10-3 7-2 16 1 23 3 7 8 12 14 15 5 2 11 1 15-3 5-5 7-12 7-20 0-7-2-14-6-18-5-6-12-8-18-7Z",shadowPath:"M139 20c-5 1-8 4-10 8-2 6-1 13 2 19 2 5 6 9 10 11 4 1 8 1 11-3 4-4 5-10 5-16 0-6-2-11-5-14-4-4-8-6-13-5Z",lineHighlightPath:"M130 29c5-5 15-7 23-3"},{position:3,type:"Primary Canine",outlinePath:"M95 38c1-9 6-16 13-21 5-4 13-3 18 1 6 5 9 13 8 21-1 8-6 16-12 21-5 5-12 8-18 5-7-3-11-11-9-27Z",shadowPath:"M100 40c1-7 5-12 10-16 4-3 10-2 14 1 5 4 6 10 6 16-1 7-4 13-10 18-4 3-9 5-13 3-5-3-8-9-7-22Z",lineHighlightPath:["M102 47c2-8 7-14 14-18","M116 29c4 7 4 15 1 23"]},{position:4,type:"Primary First Molar",outlinePath:"M57 108c3-9 12-15 23-16 12-1 24 4 30 13 5 8 5 19 0 27-5 9-16 14-28 15-12 1-24-3-29-12-5-8-3-19 4-27Z",shadowPath:"M62 111c3-7 10-11 19-12 10-1 20 3 25 10 4 6 4 14 0 21-5 7-13 10-24 11-10 1-19-2-24-9-4-6-2-14 4-21Z",lineHighlightPath:["M67 120c5-5 10-7 15-5 4 2 6 5 8 8","M90 123c5-5 11-6 16-2","M82 107c1 6 1 12 0 18"]},{position:5,type:"Primary Second Molar",outlinePath:"M13 162c4-11 15-19 29-20 15-2 29 3 37 14 7 10 7 23 1 34-7 12-20 18-35 19-15 1-29-4-36-15-6-10-3-22 4-32Z",shadowPath:"M19 165c4-8 12-14 24-16 12-1 24 3 30 12 5 8 5 18 1 27-6 9-16 14-30 15-12 1-24-3-30-12-5-8-2-18 5-26Z",lineHighlightPath:["M24 178c5-7 13-10 20-7 5 2 7 7 9 12","M53 183c6-7 14-8 21-3","M43 157c2 8 2 17 0 26"]}],st={arch:{viewBox:"0 0 409 694",quadrants:[{quadrant:1,transform:""},{quadrant:2,transform:"scale(-1, 1) translate(-409, 0)"},{quadrant:4,transform:"scale(1, -1) translate(0, -694)"},{quadrant:3,transform:"scale(-1, -1) translate(-409, -694)"}]},horizontal:{viewBox:"0 0 900 150",quadrants:[{quadrant:1,transform:""},{quadrant:2,transform:"translate(840, 0) scale(-1, 1) translate(-55,0)"},{quadrant:4,transform:"scale(1, -1) translate(0, -150)"},{quadrant:3,transform:"translate(840, 0) scale(-1, -1) translate(-55,-150)"}]}};function Wt(e,o,n=!1){return`scale(${n?-1:1}, -1) translate(${n?-409:0}, -${o})`}const Ye={"Primary Central Incisor":"translate(366 0) scale(-1 1)","Primary Lateral Incisor":"translate(-6 0)","Primary Canine":"translate(209 20) scale(-1 1)","Primary First Molar":"translate(-20 -4)","Primary Second Molar":"translate(0 6)"},Ct={viewBox:"0 0 409 461",quadrants:[{quadrant:5,transform:""},{quadrant:6,transform:"scale(-1, 1) translate(-409, 0)"},{quadrant:8,transform:Wt(409,461)},{quadrant:7,transform:Wt(409,461,!0)}],toothTransforms:Ye},rt=e=>Math.round(e*1e3)/1e3,Je=447.5,ve=260,to=1.1,Kt=16.9,Xt=66.9,eo=53.7,oo=95.8,no=150,Ut=80,ao=40;function so(){const e=to,o=rt(Je-ve*e),n=eo+Ut,s=rt(n-Kt*e),a=s+Xt*e,r=rt(a+ao+Xt*e),i=r-Kt*e,c=rt(i+Ut-oo),d=Math.ceil(no+c),h=m=>`translate(${o}, ${m}) scale(${e})`,u=st.horizontal.quadrants.map(({quadrant:m,transform:l})=>({quadrant:m,transform:m===3||m===4?`translate(0, ${c}) ${l}`.trim():l}));return{viewBox:`0 0 900 ${d}`,permanent:u,primary:[{quadrant:5,transform:h(s)},{quadrant:6,transform:`${h(s)} translate(520, 0) scale(-1, 1)`},{quadrant:8,transform:`${h(r)} scale(1, -1)`},{quadrant:7,transform:`${h(r)} translate(520, 0) scale(-1, -1)`}]}}const ro=409,io=694,co=461,lo=.58,ho=140,uo=4.8;function mo(){const e=lo,o=rt(ro/2*(1-e)),n=rt(ho-uo*e),s=rt(io-n-co*e),a=r=>`translate(${o}, ${r}) scale(${e})`;return{viewBox:st.arch.viewBox,permanent:st.arch.quadrants,primary:Ct.quadrants.map(({quadrant:r,transform:i})=>({quadrant:r,transform:`${a(r===5||r===6?n:s)} ${i}`.trim()}))}}const fo={arch:mo(),horizontal:so()},go={permanent:{upper:{right:1,left:2},lower:{right:4,left:3}},primary:{upper:{right:5,left:6},lower:{right:8,left:7}}};function yo(e,o,n){return go[e][o][n]}function po(e,o){const n=e==="permanent"?1:5;return Number.isInteger(o)&&o>=n&&o<=n+3}const Gt={permanent:8,primary:5};function Yt(e,o,n,s="FDI"){if(!po(e,o))throw new RangeError(`Quadrant ${o} is not valid for ${e} dentition.`);const a=Gt[e];if(!Number.isInteger(n)||n<1||n>a)throw new RangeError(`Position ${n} is not valid for ${e} dentition; expected 1–${a}.`);if(s!=="FDI")throw new Error(`Tooth IDs are always FDI; format ${s} numbers with formatToothNumber.`);return`${o}${n}`}const ko=["upper-right","upper-left","lower-left","lower-right"],xo={"upper-right":e=>`${e}┘`,"upper-left":e=>`└${e}`,"lower-left":e=>`┌${e}`,"lower-right":e=>`${e}┐`},wo={"upper-right":"UR","upper-left":"UL","lower-left":"LL","lower-right":"LR"};function Nt(e){const o=/^([1-8])([1-8])$/.exec(e),n=Number(o==null?void 0:o[1]),s=Number(o==null?void 0:o[2]),a=n>4;if(!o||s>Gt[a?"primary":"permanent"])throw new RangeError(`"${e}" is not a valid FDI tooth ID.`);return{quadrant:n,position:s,primary:a}}const Co=["Central Incisor","Lateral Incisor","Canine","First Premolar","Second Premolar","First Molar","Second Molar","Third Molar"],bo=["Primary Central Incisor","Primary Lateral Incisor","Primary Canine","Primary First Molar","Primary Second Molar"];function Jt(e){const{position:o,primary:n}=Nt(e);return(n?bo:Co)[o-1]}function It(e){const{quadrant:o}=Nt(e);return ko[(o-1)%4]}function et(e,o,n="symbol"){if(o==="FDI")return e;const{quadrant:s,position:a,primary:r}=Nt(e);if(o==="Universal"){const d=r?5:8,h=(s-1)%4,u=h===0||h===2,m=h*d+(u?d-a:a-1);return r?String.fromCharCode(65+m):String(m+1)}const i=r?String.fromCharCode(64+a):String(a),c=It(e);return n==="symbol"?xo[c](i):`${wo[c]}${i}`}const Vt={viewBox:"0 0 520 180",quadrants:[{quadrant:5,transform:"translate(0, 105)"},{quadrant:6,transform:"translate(520, 105) scale(-1, 1)"},{quadrant:8,transform:"translate(0, 75) scale(1, -1)"},{quadrant:7,transform:"translate(520, 75) scale(-1, -1)"}]};Vt.quadrants.map(({quadrant:e})=>e);const Tt={arch:{dentition:"permanent",quadrants:st.arch.quadrants,shapes:Xe},horizontal:{dentition:"permanent",quadrants:st.horizontal.quadrants,shapes:ut}},Dt={arch:{dentition:"primary",quadrants:Ct.quadrants,shapes:Ge,toothTransforms:Ct.toothTransforms},horizontal:{dentition:"primary",quadrants:Vt.quadrants,shapes:Ue}};function vt(e){const{viewBox:o,permanent:n,primary:s}=fo[e];return{viewBox:o,parts:[{...Tt[e],quadrants:n},{...Dt[e],quadrants:s}]}}const Mo={permanent:{arch:{viewBox:st.arch.viewBox,parts:[Tt.arch]},horizontal:{viewBox:st.horizontal.viewBox,parts:[Tt.horizontal]}},primary:{arch:{viewBox:Ct.viewBox,parts:[Dt.arch]},horizontal:{viewBox:Vt.viewBox,parts:[Dt.horizontal]}},mixed:{arch:vt("arch"),horizontal:vt("horizontal")}};function te(e,o){return Mo[e][o]}function Ft(e,o){return te(e,o).parts.flatMap(n=>n.quadrants.map(({quadrant:s,transform:a})=>({quadrant:s,transform:a,teeth:n.shapes.map(r=>{var i;return{tooth:{id:Yt(n.dentition,s,r.position),position:r.position,quadrant:s,dentition:n.dentition,type:r.type,shape:r},transform:(i=n.toothTransforms)==null?void 0:i[r.type]}})})))}function Bo(e,o){return Ft(e,o).flatMap(({teeth:n})=>n.map(({tooth:s})=>s.id))}const So=[1,0,0,1,0,0];function gt(e,o){const[n,s,a,r,i,c]=e,[d,h,u,m,l,g]=o;return[n*d+a*h,s*d+r*h,n*u+a*m,s*u+r*m,n*l+a*g+i,s*l+r*g+c]}function $o([e,o,n,s,a,r],{x:i,y:c}){return{x:e*i+n*c+a,y:o*i+s*c+r}}const Eo=/(matrix|translate|scale|rotate|skewX|skewY)\s*\(([^)]*)\)/g;function Lt(e){let o=So;for(const[,n,s]of(e??"").matchAll(Eo)){const a=s.trim().split(/[\s,]+/).filter(Boolean).map(Number);o=gt(o,Po(n,a))}return o}function Po(e,o){switch(e){case"matrix":return[o[0],o[1],o[2],o[3],o[4],o[5]];case"translate":return[1,0,0,1,o[0]??0,o[1]??0];case"scale":return[o[0],0,0,o[1]??o[0],0,0];case"rotate":{const n=(o[0]??0)*Math.PI/180,s=Math.cos(n),a=Math.sin(n),r=o[1]??0,i=o[2]??0,c=[s,a,-a,s,0,0];return gt(gt([1,0,0,1,r,i],c),[1,0,0,1,-r,-i])}case"skewX":return[1,0,Math.tan((o[0]??0)*Math.PI/180),1,0,0];default:return[1,Math.tan((o[0]??0)*Math.PI/180),0,1,0,0]}}function yt(e){if(!e.length)return{x:0,y:0,width:0,height:0};let o=1/0,n=1/0,s=-1/0,a=-1/0;for(const{x:r,y:i}of e)o=Math.min(o,r),n=Math.min(n,i),s=Math.max(s,r),a=Math.max(a,i);return{x:o,y:n,width:s-o,height:a-n}}function No(e,o){return yt([{x:o.x,y:o.y},{x:o.x+o.width,y:o.y},{x:o.x,y:o.y+o.height},{x:o.x+o.width,y:o.y+o.height}].map(n=>$o(e,n)))}function ee(e){return yt(Io(e))}function Io(e){const o=new To(e),n=[];let s={x:0,y:0},a=s,r,i="",c="";for(;o.hasMore();){const d=o.readCommand();if(d)c=d;else if(!c)throw new SyntaxError(`Invalid SVG path: ${e}`);const h=c===c.toLowerCase(),u=h?s:{x:0,y:0},m=()=>({x:u.x+o.readNumber(),y:u.y+o.readNumber()});let l;switch(c.toUpperCase()){case"M":s=m(),a=s,n.push(s),c=h?"l":"L";break;case"L":s=m(),n.push(s);break;case"H":s={x:(h?s.x:0)+o.readNumber(),y:s.y},n.push(s);break;case"V":s={x:s.x,y:(h?s.y:0)+o.readNumber()},n.push(s);break;case"C":{const g=m();l=m();const p=m();n.push(...se(s,g,l,p)),s=p;break}case"S":{const g=oe(s,r,i,"CS");l=m();const p=m();n.push(...se(s,g,l,p)),s=p;break}case"Q":{l=m();const g=m();n.push(...re(s,l,g)),s=g;break}case"T":{l=oe(s,r,i,"QT");const g=m();n.push(...re(s,l,g)),s=g;break}case"A":{const g=Math.abs(o.readNumber()),p=Math.abs(o.readNumber()),w=o.readNumber(),b=o.readFlag(),C=o.readFlag(),x=m();n.push(...Vo(s,g,p,w,b,C,x)),s=x;break}case"Z":s=a;break;default:throw new SyntaxError(`Unsupported SVG path command "${c}".`)}r=l,i=c.toUpperCase(),i==="Z"&&(c="")}return n}function oe(e,o,n,s){return!o||!s.includes(n)?e:{x:2*e.x-o.x,y:2*e.y-o.y}}function ne(e,o,n,s,a){const r=1-a;return r*r*r*e+3*r*r*a*o+3*r*a*a*n+a*a*a*s}function ae(e,o,n,s){const a=-e+3*o-3*n+s,r=2*(e-2*o+n),i=o-e,c=1e-12;if(Math.abs(a)<c)return Math.abs(r)<c?[]:[-i/r];const d=r*r-4*a*i;if(d<0)return[];const h=Math.sqrt(d);return[(-r+h)/(2*a),(-r-h)/(2*a)]}function se(e,o,n,s){return[...[...ae(e.x,o.x,n.x,s.x),...ae(e.y,o.y,n.y,s.y)].filter(r=>r>0&&r<1).map(r=>({x:ne(e.x,o.x,n.x,s.x,r),y:ne(e.y,o.y,n.y,s.y,r)})),s]}function re(e,o,n){const s=[];for(const a of["x","y"]){const r=e[a]-2*o[a]+n[a];if(r===0)continue;const i=(e[a]-o[a])/r;if(i>0&&i<1){const c=1-i;s.push({x:c*c*e.x+2*c*i*o.x+i*i*n.x,y:c*c*e.y+2*c*i*o.y+i*i*n.y})}}return[...s,n]}function Vo(e,o,n,s,a,r,i){if(o===0||n===0||e.x===i.x&&e.y===i.y)return[i];const c=s*Math.PI/180,d=Math.cos(c),h=Math.sin(c),u=(e.x-i.x)/2,m=(e.y-i.y)/2,l=d*u+h*m,g=-h*u+d*m,p=l*l/(o*o)+g*g/(n*n);if(p>1){const q=Math.sqrt(p);o*=q,n*=q}const w=o*o*n*n-o*o*g*g-n*n*l*l,b=o*o*g*g+n*n*l*l,x=(a===r?-1:1)*Math.sqrt(Math.max(0,w/b)),M=x*o*g/n,y=-x*n*l/o,f=d*M-h*y+(e.x+i.x)/2,$=h*M+d*y+(e.y+i.y)/2,F=(q,W)=>Math.atan2(W,q),P=F((l-M)/o,(g-y)/n);let N=F((-l-M)/o,(-g-y)/n)-P;r&&N<0?N+=2*Math.PI:!r&&N>0&&(N-=2*Math.PI);const E=q=>({x:f+o*d*Math.cos(q)-n*h*Math.sin(q),y:$+o*h*Math.cos(q)+n*d*Math.sin(q)}),V=Math.atan2(-n*h,o*d),T=Math.atan2(n*d,o*h),H=[];for(const q of[V,V+Math.PI,T,T+Math.PI]){const W=2*Math.PI;(r?((q-P)%W+W)%W:((P-q)%W+W)%W)<Math.abs(N)&&H.push(E(q))}return[...H,i]}class To{constructor(o){Ke(this,"index",0);this.source=o}hasMore(){return this.skipSeparators(),this.index<this.source.length}readCommand(){this.skipSeparators();const o=this.source[this.index];if(o&&/[MmLlHhVvCcSsQqTtAaZz]/.test(o))return this.index+=1,o}readNumber(){this.skipSeparators();const o=/^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/.exec(this.source.slice(this.index));if(!o)throw new SyntaxError(`Expected a number at ${this.index} in SVG path.`);return this.index+=o[0].length,Number(o[0])}readFlag(){this.skipSeparators();const o=this.source[this.index];if(o!=="0"&&o!=="1")throw new SyntaxError(`Expected an arc flag at ${this.index} in SVG path.`);return this.index+=1,o==="1"}skipSeparators(){for(;this.index<this.source.length&&/[\s,]/.test(this.source[this.index]);)this.index+=1}}const Do=new Set([1,2,5,6]),ie=new Map,ce=new Map;function Fo(e){let o=ie.get(e);return o||(o=ee(e),ie.set(e,o)),o}function Lo(e){const[o=0,n=0,s=0,a=0]=e.trim().split(/[\s,]+/).map(Number);return{x:o,y:n,width:s,height:a}}function le(e,o){const n=`${e}:${o}`,s=ce.get(n);if(s)return s;const a=Ft(e,o).flatMap(({quadrant:r,transform:i,teeth:c})=>{const d=Lt(i);return c.map(({tooth:h,transform:u})=>{const m=gt(gt(d,Lt(h.shape.transform)),Lt(u)),l=No(m,Fo(h.shape.outlinePath)),g=Do.has(r)?"upper":"lower",p=h.dentition;return{toothId:h.id,quadrant:r,arch:g,dentition:p,row:`${g}-${p}`,box:l,center:{x:l.x+l.width/2,y:l.y+l.height/2}}})});return ce.set(n,a),a}function de(e,o){return Lo(te(e,o).viewBox)}const zo=.24,he=new Set([1,4,5,8]);function mt({x:e,y:o}){const n=Math.hypot(e,o)||1;return{x:e/n,y:o/n}}function pt(e,o,n){const s=n.x?e/2/Math.abs(n.x):1/0,a=n.y?o/2/Math.abs(n.y):1/0;return Math.min(s,a)}function ue(e){return Math.hypot(e.width,e.height)/2*.82}function me(e){return Math.max(1,e*.06)}function _o(e){const o=[...e].sort((s,a)=>s-a),n=Math.floor(o.length/2);return o.length%2?o[n]:(o[n-1]+o[n])/2}function fe(e,o,n){const s=new Map,a=new Map,r=e.length?Math.round(zo*_o(e.map(({box:c})=>c.width))*10)/10:0,i={x:o.x+o.width/2,y:o.y+o.height/2};for(const c of new Set(e.map(({row:d})=>d))){const d=u=>{const m=Number(u.toothId.slice(1));return he.has(u.quadrant)?-m:m},h=e.filter(u=>u.row===c).sort((u,m)=>d(u)-d(m));a.set(c,h.map(({toothId:u})=>u)),h.forEach((u,m)=>{const{center:l,box:g}=u,p={x:i.x-l.x,y:i.y-l.y},w={x:0,y:Math.sign(p.y)||1},b=h[m-1]??u,C=h[m+1]??u,x=h.length>1?mt({x:C.center.x-b.center.x,y:C.center.y-b.center.y}):{x:1,y:0};let M;n==="horizontal"?M=w:h.length>1?(M={x:-x.y,y:x.x},M.x*p.x+M.y*p.y<0&&(M={x:-M.x,y:-M.y})):M=mt(p);const y=he.has(u.quadrant)?x:{x:-x.x,y:-x.y};s.set(u.toothId,{toothId:u.toothId,arch:u.arch,row:c,box:g,center:l,size:Math.min(g.width,g.height),inner:M,outer:{x:-M.x,y:-M.y},occlusal:w,mesial:y})})}return{frames:s,order:a,fontSize:r,gap:r*.3}}const Zo=.62,ge=.2,bt=e=>Math.round(e*100)/100;function ye(e,o,n,s,a){const r=a==="Palmer",i=r?et(e,a,"text").slice(2):et(e,a),c=r?s*ge:0,d=s*Zo*i.length+2*c,h=s+2*c,u={x:o-d/2,y:n-h/2,width:d,height:h};return{toothId:e,text:i,x:o,y:n,fontSize:s,...r?{corner:qo(It(e),u)}:{},box:u}}function qo(e,{x:o,y:n,width:s,height:a}){const r=e.startsWith("upper"),i=e.endsWith("right"),c=bt(r?n+a:n),d=bt(r?n:n+a),h=bt(i?o+s:o);return`M${bt(i?o:o+s)} ${c} L${h} ${c} L${h} ${d}`}function Ro(e,o,n,s="FDI"){if(!e.length)return[];const{frames:a,fontSize:r,gap:i}=fe(e,o,n),c={x:o.x+o.width/2,y:o.y+o.height/2};if(n==="horizontal")return Ho(e,c,r,i,s);const d=[];for(const{toothId:h,box:u,center:m}of e){const l=a.get(h).inner,g=M=>ye(h,m.x+l.x*M,m.y+l.y*M,r,s),{width:p,height:w}=g(0).box,b=pt(u.width,u.height,l)+i+pt(p,w,l),C=b+r*4;let x=g(b);for(let M=b;M<=C&&(x=g(M),!!(e.some(f=>pe(f.box,x.box))||d.some(f=>pe(f.box,x.box))));M+=i);d.push(x)}return d}function Ho(e,o,n,s,a){const r=new Map;for(const i of new Set(e.map(({row:c})=>c))){const c=e.filter(l=>l.row===i),d=c.reduce((l,{center:g})=>l+g.y,0)/c.length,h=o.y>=d,u=h?Math.max(...c.map(({box:l})=>l.y+l.height)):Math.min(...c.map(({box:l})=>l.y)),m=n/2+(a==="Palmer"?n*ge:0);r.set(i,u+(h?1:-1)*(s+m))}return e.map(({toothId:i,row:c,center:d})=>ye(i,d.x,r.get(c),n,a))}function pe(e,o){return e.x<o.x+o.width&&o.x<e.x+e.width&&e.y<o.y+o.height&&o.y<e.y+e.height}const it={caries:{name:"Lesión de caries dental",symbol:{kind:"fill"},tone:"bad"},restoration:{name:"Restauración definitiva",symbol:{kind:"fill"},tone:"good"},"temporary-restoration":{name:"Restauración temporal",symbol:{kind:"outline"},tone:"bad"},extraction:{name:"Extracción",symbol:{kind:"cross"},tone:"bad"},fracture:{name:"Fractura",symbol:{kind:"line"},tone:"bad"},crown:{name:"Corona definitiva",symbol:{kind:"circle"},tone:"good"},"temporary-crown":{name:"Corona temporal",symbol:{kind:"circle"},tone:"bad"},extruded:{name:"Diente extruido",symbol:{kind:"arrow",direction:"occlusal"},tone:"good"},intruded:{name:"Diente intruido",symbol:{kind:"arrow",direction:"apical"},tone:"good"},rotated:{name:"Giroversión",symbol:{kind:"curved-arrow"},tone:"good"},migrated:{name:"Migración",symbol:{kind:"arrow",direction:"auto"},tone:"good"},erupting:{name:"Pieza dentaria en erupción",symbol:{kind:"zigzag"},tone:"good"},supernumerary:{name:"Supernumerario",symbol:{kind:"encircled-text",text:"S"},tone:"good"},fusion:{name:"Fusión",symbol:{kind:"double-circle"},tone:"good"},peg:{name:"Diente en clavija",symbol:{kind:"triangle"},tone:"good"},implant:{name:"Implante dental",symbol:{kind:"text",text:"IMP"},tone:"good"},"root-remnant":{name:"Remanente radicular",symbol:{kind:"text",text:"RR"},tone:"bad"},mobility:{name:"Movilidad",symbol:{kind:"text",text:"M1"},tone:"bad"},discolored:{name:"Diente discrómico",symbol:{kind:"text",text:"DIS"},tone:"bad"},ectopic:{name:"Diente ectópico",symbol:{kind:"text",text:"E"},tone:"bad"},impacted:{name:"Impactación",symbol:{kind:"text",text:"I"},tone:"bad"},"semi-impacted":{name:"Semi-impactación",symbol:{kind:"text",text:"SI"},tone:"bad"},macrodontia:{name:"Macrodoncia",symbol:{kind:"text",text:"MAC"},tone:"good"},microdontia:{name:"Microdoncia",symbol:{kind:"text",text:"MIC"},tone:"good"},worn:{name:"Superficie desgastada",symbol:{kind:"text",text:"DES"},tone:"bad"},"pulp-treatment":{name:"Tratamiento pulpar",symbol:{kind:"text",text:"TC"},tone:"good"},"enamel-defect":{name:"Defecto de desarrollo del esmalte",symbol:{kind:"text",text:"HP"},tone:"bad"},diastema:{name:"Diastema",symbol:{kind:"diastema"},tone:"good"},transposition:{name:"Transposición",symbol:{kind:"transposition"},tone:"good"},"fixed-prosthesis":{name:"Prótesis fija",symbol:{kind:"bridge"},tone:"good"},"removable-prosthesis":{name:"Prótesis removible",symbol:{kind:"double-line"},tone:"good"},"complete-prosthesis":{name:"Prótesis total",symbol:{kind:"double-line"},tone:"good"},"fixed-orthodontic-appliance":{name:"Aparato ortodóntico fijo",symbol:{kind:"brackets"},tone:"good"},"removable-orthodontic-appliance":{name:"Aparato ortodóntico removible",symbol:{kind:"zigzag-line"},tone:"good"},edentulous:{name:"Edéntulo total",symbol:{kind:"center-line"},tone:"good"}},A=["vestibular","mesial","occlusal","distal","lingual"],Ao=["square","circle"],Oo=2.4,jo=.4,Qo=.45,Mt=12,ke=3,xe=new Set([1,2,5,6]),Bt=e=>Math.round(e*100)/100;function Wo(e,{x:o,y:n}){return Math.hypot(e.width/2*o,e.height/2*n)}function ot(e,o){return e==="occlusal"&&Number(o.slice(1))<=3?"incisal":e==="lingual"&&xe.has(Number(o[0]))?"palatal":e}function we(e){return`${e.map(({x:o,y:n},s)=>`${s?"L":"M"}${Bt(o)} ${Bt(n)}`).join(" ")} Z`}function Ko(e,o,n,s){const a=({x:i,y:c})=>i*o.x+c*o.y,r=(i,c)=>i.flatMap((d,h)=>{const u=i[(h+1)%i.length],m=c(d),l=c(u),g=m>=0?[d]:[];if(m>=0!=l>=0){const p=m/(m-l);g.push({x:d.x+(u.x-d.x)*p,y:d.y+(u.y-d.y)*p})}return g});return r(r(e,i=>a(i)-n),i=>s-a(i))}function Xo(e,o,n,s){if(s<=1)return o.points;const a=o.surface==="mesial"||o.surface==="distal"?e.axes.vestibular:e.axes.mesial,r=o.points.map(({x:d,y:h})=>d*a.x+h*a.y),i=Math.min(...r),c=(Math.max(...r)-i)/s;return Ko(o.points,a,i+c*n,i+c*(n+1))}function Uo(e,o,n="square"){return n==="circle"?Jo(e,e*Qo):Yo(e,o)}const Go=.22,Ce=4;function Yo(e,o){const n=(r,i,c,d)=>{const h=r*Go,u=g=>g*Math.PI/180,m=(r-h)*Math.sign(Math.round(Math.cos(u(i))*1e9)),l=(r-h)*Math.sign(Math.round(Math.sin(u(i))*1e9));return Array.from({length:Ce+1},(g,p)=>{const w=u(c+(d-c)*p/Ce);return[m+h*Math.cos(w),l+h*Math.sin(w)]})},s=(r,i)=>[...n(r,i-45,i-45,i),...n(r,i+45,i,i+45)],a=r=>[...s(e,r),...s(o,r).reverse()];return{vestibular:a(0),mesial:a(90),lingual:a(180),distal:a(270),occlusal:[0,90,180,270].flatMap(r=>s(o,r).slice(1))}}function Jo(e,o){const n=(r,i)=>{const c=i*Math.PI/180;return[r*Math.cos(c),r*Math.sin(c)]},s=(r,i,c)=>Array.from({length:Mt+1},(d,h)=>n(r,i+(c-i)*h/Mt)),a=r=>[...s(e,r-45,r+45),...s(o,r+45,r-45)];return{vestibular:a(0),mesial:a(90),lingual:a(180),distal:a(270),occlusal:Array.from({length:Mt*4},(r,i)=>n(o,360*i/(Mt*4)))}}function be(e,o,n,s,a=Math.max(.5,Bt(s*.05)),r="square"){const{vestibular:i,mesial:c}=n,d=Uo(s/2,s/2*jo,r),h=([g,p])=>({x:o.x+i.x*g+c.x*p,y:o.y+i.y*g+c.y*p}),u=A.map(g=>{const p=d[g].map(h);return{surface:g,name:ot(g,e),d:we(p),points:p}}),m=yt(u.flatMap(({points:g})=>g)),l=a/2;return{toothId:e,center:o,size:s,axes:n,strokeWidth:a,surfaces:u,box:{x:m.x-l,y:m.y-l,width:m.width+a,height:m.height+a}}}const vo=new Set([1,4,5,8]);function tn(e){const o=Number(e[0]);return{vestibular:{x:0,y:xe.has(o)?-1:1},mesial:{x:vo.has(o)?1:-1,y:0}}}function Me({points:e}){return{x:e.reduce((o,{x:n})=>o+n,0)/e.length,y:e.reduce((o,{y:n})=>o+n,0)/e.length}}const en=.12;function on(e,o){return e.map((n,s)=>Math.max(...e.map((a,r)=>a-o*Math.abs(s-r))))}function nn(e,o,n){const s=a=>{const{center:r,outer:i}=e[a];return{x:r.x+i.x*o[a],y:r.y+i.y*o[a]}};return o.map((a,r)=>{if(r<2||r>e.length-3||o.slice(r-2,r+3).some((w,b)=>b!==2&&w>=a))return a;const[c,d,h,u]=[s(r-2),s(r-1),s(r+1),s(r+2)],m={x:(-c.x+9*d.x+9*h.x-u.x)/16,y:(-c.y+9*d.y+9*h.y-u.y)/16},{center:l,outer:g}=e[r],p=(m.x-l.x)*g.x+(m.y-l.y)*g.y;return p<a?Math.max(p,n[r]):a})}function an(e){return e.slice(1,-1).map((o,n)=>{const[s,a]=[e[n],e[n+2]],r=Math.atan2(a.y-o.y,a.x-o.x)-Math.atan2(o.y-s.y,o.x-s.x);return Math.atan2(Math.sin(r),Math.cos(r))*180/Math.PI})}const Be=120;function sn(e,o,n,s){const a=[...o],r=(i,c=a[i])=>{const{center:d,outer:h}=e[i];return{x:d.x+h.x*c,y:d.y+h.y*c}};return e.forEach((i,c)=>{if(!(i.row.endsWith("primary")&&i.toothId[1]==="3")||c<1||c>e.length-2)return;const h=Math.max(0,c-3),u=Math.min(e.length-1,c+3),m=b=>{const C=e.slice(h,u+1).map((M,y)=>h+y===c?r(c,b):r(h+y)),x=an(C);return x.slice(1).reduce((M,y,f)=>M+(y-x[f])**2,0)},l=n[c],g=o[c]+s;let p=o[c],w=m(p);for(let b=0;b<=Be;b++){const C=l+(g-l)*b/Be,x=m(C);x<w&&(p=C,w=x)}a[c]=p}),a}function rn({frames:e,order:o,fontSize:n,gap:s},a={}){const r=Bt(n*Oo),i=r/2,c=new Map,d=new Map;for(const l of e.values()){const g=Wo(l.box,l.outer),p=Math.max(g,ue(l.box)+me(l.size)/2);c.set(l.toothId,p+s+ke+i),d.set(l.toothId,g+s+i)}const h=new Map;for(const l of o.values()){const g=l.map(x=>e.get(x)),p=l.map(x=>c.get(x)),w=a.fairCurve?nn(g,p,l.map(x=>d.get(x))):p;if(a.alignRows){const x=(y,f)=>(y.center.x+y.outer.x*f)*y.outer.x+(y.center.y+y.outer.y*f)*y.outer.y,M=Math.max(...g.map((y,f)=>x(y,p[f])));g.forEach(y=>h.set(y.toothId,M-x(y,0)));continue}const b=on(w,r*en),C=a.fairCurve?sn(g,b,l.map(x=>d.get(x)),r):b;l.forEach((x,M)=>h.set(x,C[M]))}const u=[];let m=0;for(const l of e.values()){const g=l.outer;let p={x:-g.y,y:g.x};p.x*l.mesial.x+p.y*l.mesial.y<0&&(p={x:-p.x,y:-p.y});const w=h.get(l.toothId)??c.get(l.toothId),b={x:l.center.x+g.x*w,y:l.center.y+g.y*w};u.push(be(l.toothId,b,{vestibular:g,mesial:p},r,void 0,a.shape));const C=w+i-pt(l.box.width,l.box.height,g);m=Math.max(m,C+ke)}return{diagrams:u,reserved:m}}function Se(e,o,n){const s=new Set((e==null?void 0:e[o])??[]);s.has(n)?s.delete(n):s.add(n);const a={...e};return s.size?a[o]=A.filter(r=>s.has(r)):delete a[o],a}const cn=new Set(["fill","outline"]),ln=new Set(["diastema","transposition"]),dn=new Set(["bridge","double-line","brackets","zigzag-line","center-line"]),$e=new Set(["text","encircled-text"]),hn=.62;function nt(e){return cn.has(e.kind)?"surface":ln.has(e.kind)?"between":dn.has(e.kind)?"span":"tooth"}const R=(e,o,n=1)=>({x:e.x+o.x*n,y:e.y+o.y*n}),zt=({x:e,y:o})=>({x:-o,y:e}),Ee=({x:e,y:o},n)=>{const s=n*Math.PI/180,a=Math.cos(s),r=Math.sin(s);return{x:e*a-o*r,y:e*r+o*a}},ct=e=>Math.round(e*100)/100,v=({x:e,y:o})=>`${ct(e)} ${ct(o)}`,U=e=>e.map((o,n)=>`${n?"L":"M"}${v(o)}`).join(" ");function St(e,o,n){const s={x:-o.x,y:-o.y};return U([R(e,Ee(s,28),n),e,R(e,Ee(s,-28),n)])}function un(e,o,n){const s=mt({x:o.x-e.x,y:o.y-e.y});return[{type:"path",d:U([e,o])},{type:"path",d:St(o,s,n)}]}function Pe(e,o,n,s){const a={x:(o.x-e.x)/n,y:(o.y-e.y)/n},r=zt(mt(a));return Array.from({length:n+1},(i,c)=>{const d=R(e,a,c);return c===0||c===n?d:R(d,r,c%2?s:-s)})}function mn(e,o,n){const s=o==="auto"?n??"mesial":o;return{occlusal:e.occlusal,apical:{x:-e.occlusal.x,y:-e.occlusal.y},mesial:e.mesial,distal:{x:-e.mesial.x,y:-e.mesial.y}}[s]}function Ne(e,o,n){const{box:s,center:a,size:r,occlusal:i,mesial:c}=o,d=r*.7,h=r*.18;switch(e.kind){case"line":return[{type:"path",d:U([{x:s.x+s.width*.2,y:s.y+s.height*.8},{x:s.x+s.width*.8,y:s.y+s.height*.2}])}];case"cross":{const u=r*.12,[m,l]=[s.x+u,s.x+s.width-u],[g,p]=[s.y+u,s.y+s.height-u];return[{type:"path",d:U([{x:m,y:g},{x:l,y:p}])},{type:"path",d:U([{x:l,y:g},{x:m,y:p}])}]}case"circle":return[{type:"circle",cx:a.x,cy:a.y,r:ue(s)}];case"double-circle":{const u=r*.36;return[-1,1].map(m=>{const l=R(a,c,m*r*.2);return{type:"circle",cx:l.x,cy:l.y,r:u}})}case"triangle":{const u=r*.38,m=zt(i),l=R(a,i,u),g=R(a,i,-u*.5);return[{type:"path",d:`${U([l,R(g,m,u*.87),R(g,m,-u*.87)])} Z`}]}case"arrow":{const u=mn(o,e.direction,n.direction);return un(R(a,u,-d/2),R(a,u,d/2),h)}case"curved-arrow":{const u=r*.3,m=160*Math.PI/180,l=380*Math.PI/180,g={x:a.x+u*Math.cos(m),y:a.y+u*Math.sin(m)},p={x:a.x+u*Math.cos(l),y:a.y+u*Math.sin(l)},w={x:-Math.sin(l),y:Math.cos(l)};return[{type:"path",d:`M${v(g)} A${ct(u)} ${ct(u)} 0 1 1 ${v(p)}`},{type:"path",d:St(p,w,h)}]}case"zigzag":{const u=R(a,i,-d/2),m=R(a,i,d/2);return[{type:"path",d:U(Pe(u,m,5,r*.1))},{type:"path",d:St(m,i,h)}]}default:return[]}}function Ie(e,o){return{width:Math.max(1,e.length)*o*hn,height:o}}function Ve(e,o,n,s){const a=[{type:"text",x:o.x,y:o.y,text:e,fontSize:n}];return s&&a.unshift({type:"circle",cx:o.x,cy:o.y,r:n*.72}),a}function Te(e,o,n){const s=Math.min(o.size,n.size),a={x:(o.center.x+n.center.x)/2,y:(o.center.y+n.center.y)/2},r=mt({x:n.center.x-o.center.x,y:n.center.y-o.center.y}),i=zt(r),c=s*.12,d=s*.35;if(e.kind==="diastema")return[-1,1].map(u=>{const m=R(a,r,u*c*1.6),l=R(a,r,u*c*.2);return{type:"path",d:`M${v(R(m,i,d))} Q${v(l)} ${v(R(m,i,-d))}`}});const h=s*.16;return[1,-1].flatMap(u=>{const[m,l]=u>0?[o.center,n.center]:[n.center,o.center],g=R(a,i,u*d*1.4),p=mt({x:l.x-g.x,y:l.y-g.y});return[{type:"path",d:`M${v(m)} Q${v(g)} ${v(l)}`},{type:"path",d:St(l,p,h)}]})}function De(e,o){return R(e.center,e.outer,pt(e.box.width,e.box.height,e.outer)+o)}function Fe(e,o,n,s=0){const a=Math.min(...o.map(({size:i})=>i));if(e.kind==="center-line")return[{type:"path",d:U(o.map(({center:i})=>i))}];const r=o.map(i=>De(i,s+n));switch(e.kind){case"bridge":{const i=[o[0],o[o.length-1]].map((c,d)=>{const h=r[d?r.length-1:0];return{type:"path",d:U([h,R(h,c.outer,-n*1.5)])}});return[{type:"path",d:U(r)},...i]}case"double-line":return[.4,-.4].map(i=>({type:"path",d:U(o.map((c,d)=>R(r[d],c.outer,n*i)))}));case"brackets":{const i=a*.09;return[{type:"path",d:U(r)},...r.map(c=>({type:"path",d:`M${v({x:c.x-i,y:c.y-i})} h${ct(i*2)} v${ct(i*2)} h${ct(-i*2)} Z`}))]}case"zigzag-line":{const i=r.flatMap((c,d)=>d?Pe(r[d-1],c,4,n*.6).slice(1):[c]);return[{type:"path",d:U(i)}]}default:return[]}}function fn(e,o,n,s){return e.kind!=="fill"?o.surfaces.filter(({surface:a})=>n.includes(a)).map(({d:a})=>({type:"path",d:a})):o.surfaces.filter(({surface:a})=>n.includes(a)).map(a=>{const{index:r,count:i}=s(a.surface);return{type:"area",d:i>1?we(Xo(o,a,r,i)):a.d}})}function Le(e){var o;return(o=e.surfaces)!=null&&o.length?A.filter(n=>e.surfaces.includes(n)):[...A]}function ze(e,o){return e.tone?e.tone:e.status==="planned"?"bad":e.status==="done"?"good":o.tone}function gn(e,o){const n=e.flatMap(r=>{if(r.type==="circle"){const{cx:u,cy:m,r:l}=r;return[{x:u-l,y:m-l},{x:u+l,y:m+l}]}if(r.type==="text"){const{width:u,height:m}=Ie(r.text,r.fontSize);return[{x:r.x-u/2,y:r.y-m/2},{x:r.x+u/2,y:r.y+m/2}]}const{x:i,y:c,width:d,height:h}=ee(r.d);return[{x:i,y:c},{x:i+d,y:c+h}]}),s=yt(n),a=o/2;return{x:s.x-a,y:s.y-a,width:s.width+o,height:s.height+o}}function _e(e,o,{frames:n,order:s,fontSize:a,gap:r},i){const c=(i==null?void 0:i.reserved)??0,d=new Map(i==null?void 0:i.diagrams.map(f=>[f.toothId,f])),h=[],u=[],m=a*.9,l=new Map,g=(f,$,F,P,N,E,V=me(E))=>({key:f,code:$.code,name:F.name,status:$.status??"existing",tone:ze($,F),...$.color?{color:$.color}:{},teeth:P,strokeWidth:V,primitives:N,box:gn(N,V)}),p=new Map;e.forEach((f,$)=>{var F;if(((F=o[f.code])==null?void 0:F.symbol.kind)==="fill")for(const P of f.teeth)for(const N of Le(f)){const E=`${P}:${N}`;p.set(E,[...p.get(E)??[],$])}});const w=(f,$)=>F=>{const P=p.get(`${$}:${F}`)??[f];return{index:P.indexOf(f),count:P.length}},b=e.map((f,$)=>({finding:f,index:$})),C=({finding:f})=>{const $=o[f.code];return $?nt($.symbol):"tooth"},x=[...b.filter(f=>C(f)==="span"),...b.filter(f=>C(f)!=="span")];for(const{finding:f,index:$}of x){const F=o[f.code];if(!F){u.push(`Unknown finding code "${f.code}".`);continue}const{symbol:P}=F,N=f.teeth.filter(_=>n.has(_)),E=nt(P);if(E==="surface"){if(!N.length)continue;if(!d.size){u.push(`Finding "${f.code}" is drawn on tooth surfaces and needs showSurfaces.`);continue}const _=Le(f);for(const X of N){const Y=d.get(X),tt=Y.strokeWidth*(P.kind==="outline"?2.5:1);h.push({...g(`${$}:${X}`,f,F,[X],fn(P,Y,_,w($,X)),Y.size,tt),surfaces:_})}continue}if(E==="tooth"){for(const _ of N){const X=n.get(_);let Y;if($e.has(P.kind)){const tt=f.label??P.text,$t=P.kind==="encircled-text",{width:Ht,height:At}=$t?{width:m*1.44,height:m*1.44}:Ie(tt,m),j=l.get(_)??c,xt=pt(Ht,At,X.outer),Q=j+r+xt;Y=Ve(tt,De(X,Q),m,$t),l.set(_,Q+xt)}else Y=Ne(P,X,f);h.push(g(`${$}:${_}`,f,F,[_],Y,X.size))}continue}if(N.length!==f.teeth.length)continue;const V=new Set(N.map(_=>n.get(_).row));if(!(E==="between"?N.length===2:N.length>=2)||V.size!==1){u.push(`Finding "${f.code}" needs ${E==="between"?"two teeth":"at least two teeth"} of the same arch and dentition.`);continue}if(E==="between"){const[_,X]=N.map(Y=>n.get(Y));h.push(g(`${$}`,f,F,N,Te(P,_,X),Math.min(_.size,X.size)));continue}const H=s.get([...V][0]),q=N.map(_=>H.indexOf(_)),W=H.slice(Math.min(...q),Math.max(...q)+1),lt=W.map(_=>n.get(_));h.push(g(`${$}`,f,F,W,Fe(P,lt,r,c),Math.min(...lt.map(({size:_})=>_))));for(const _ of W)l.set(_,Math.max(l.get(_)??c,c+r*1.6))}const M=({code:f})=>{var $;return(($=o[f])==null?void 0:$.symbol.kind)==="outline"?1:0},y=f=>Number(f.split(":")[0]);return h.sort((f,$)=>M(f)-M($)||y(f.key)-y($.key)),{findings:h,issues:u}}function yn(e,o,n){const{toothId:s,box:a,center:r,size:i}=n,c=e.filter(({code:u,teeth:m})=>{const l=o[u];return m.includes(s)&&l&&nt(l.symbol)==="surface"}).map(u=>({...u,teeth:[s]})),d={...kt(s,a),center:r,size:i};return _e(c,o,{frames:new Map([[s,d]]),order:new Map,fontSize:0,gap:0},{diagrams:[n],reserved:0}).findings}function kt(e,o){return{toothId:e,arch:"upper",row:"upper-permanent",box:o,center:{x:o.x+o.width/2,y:o.y+o.height/2},size:Math.min(o.width,o.height),inner:{x:0,y:1},outer:{x:0,y:-1},occlusal:{x:0,y:1},mesial:{x:1,y:0}}}function pn(e){const o=nt(e);if(o==="surface"){const n=(a,r)=>`M${a} ${a} h${r} v${r} h${-r} Z`,s=n(5.5,5);return[{type:"path",d:n(1.5,13)},e.kind==="fill"?{type:"area",d:s}:{type:"path",d:s}]}if(o==="between")return Te(e,kt("a",{x:-2,y:2,width:10,height:12}),kt("b",{x:8,y:2,width:10,height:12}));if(o==="span"){const n=[1,6.5,12].map((s,a)=>kt(`${a}`,{x:s,y:9,width:3,height:5}));return Fe(e,n,1.5)}if($e.has(e.kind)){const{text:n}=e,s=n.length>2?5.5:8;return Ve(n,{x:8,y:8},e.kind==="encircled-text"?7:s,e.kind==="encircled-text")}return Ne(e,kt("t",{x:2,y:2,width:12,height:12}),{})}const kn=new Set([1,2,5,6]);function Ze(e,o){const n=yt(e.flatMap(({x:s,y:a,width:r,height:i})=>[{x:s,y:a},{x:s+r,y:a+i}]));return{x:n.x-o,y:n.y-o,width:n.width+2*o,height:n.height+2*o}}function xn(e){const o=()=>t.toValue(e.dentition),n=()=>t.toValue(e.layout),s=()=>t.toValue(e.showHalf)??"full",a=()=>t.toValue(e.showNumbers)??!1,r=y=>s()==="full"||s()==="upper"===kn.has(y),i=t.computed(()=>{const y=t.toValue(e.teeth);return y?new Set(y):void 0}),c=y=>!i.value||i.value.has(y);t.watch(()=>[t.toValue(e.teeth),o()],([y,f])=>{if(!y)return;const $=new Set(Bo(f,"arch")),F=y.filter(P=>!$.has(P));F.length&&console.warn(`[vue-odontogram] Teeth ${F.join(", ")} are not part of the ${f} dentition.`)},{immediate:!0});const d=t.computed(()=>Ft(o(),n()).filter(({quadrant:y})=>r(y)).map(y=>({...y,teeth:y.teeth.filter(({tooth:f})=>c(f.id))})).filter(({teeth:y})=>y.length)),h=t.computed(()=>de(o(),n())),u=t.computed(()=>le(o(),n()).filter(({quadrant:y,toothId:f})=>r(y)&&c(f))),m=t.computed(()=>Object.fromEntries(u.value.map(y=>[y.toothId,y]))),l=t.computed(()=>a()?Ro(u.value,h.value,n(),t.toValue(e.notation)):[]),g=t.computed(()=>fe(u.value,h.value,n())),p=t.computed(()=>t.toValue(e.showSurfaces)?rn(g.value,{fairCurve:n()==="arch",alignRows:n()==="horizontal",shape:t.toValue(e.surfaceShape)}):{diagrams:[],reserved:0}),w=t.computed(()=>{const y=t.toValue(e.findings)??[];return y.length?_e(y,t.toValue(e.findingCatalog)??it,g.value,p.value):{findings:[],issues:[]}});t.watch(()=>w.value.issues,y=>y.forEach(f=>console.warn(`[vue-odontogram] ${f}`)),{immediate:!0});const b=t.computed(()=>{const y=new Map;for(const f of w.value.findings)for(const $ of f.teeth)y.set($,[...y.get($)??[],f]);return y}),C=t.computed(()=>{const y=h.value,f=[...l.value.map(({box:N})=>N),...p.value.diagrams.map(({box:N})=>N),...w.value.findings.map(({box:N})=>N)],$=g.value.fontSize||4;if(s()==="full"){if(!f.length)return y;const N=Ze(f,$/2),E=Math.min(y.x,N.x),V=Math.min(y.y,N.y);return{x:E,y:V,width:Math.max(y.x+y.width,N.x+N.width)-E,height:Math.max(y.y+y.height,N.y+N.height)-V}}const F=[...u.value.map(({box:N})=>N),...f];if(!F.length)return y;const P=Ze(F,$);return{x:y.x,y:P.y,width:y.width,height:P.height}}),x=t.computed(()=>{const{x:y,y:f,width:$,height:F}=C.value,P=N=>Math.round(N*100)/100;return[y,f,$,F].map(P).join(" ")}),M=t.computed(()=>{const y=new Map;for(const f of t.toValue(e.conditions)??[])for(const $ of f.teeth)y.set($,f);return y});return{viewBox:x,viewBoxRect:C,quadrants:d,anchors:m,anchorList:u,numberLabels:l,surfaceDiagrams:t.computed(()=>p.value.diagrams),findingLayout:w,findingsByTooth:b,conditionByTooth:M}}function wn(e){const o=t.computed(()=>[...new Set(t.toValue(e.modelValue)??[])]);function n(a){return o.value.includes(a)}function s(a){const r=o.value;return t.toValue(e.singleSelect)?r.includes(a)?[]:[a]:r.includes(a)?r.filter(i=>i!==a):[...r,a]}return{isSelected:n,selectedTeeth:o,toggle:s}}const qe=["present","missing","extracted","implant","unerupted"],J={odontogram:"Odontogram",chartTitles:{permanent:"permanent odontogram",primary:"primary odontogram",mixed:"mixed odontogram"},tooth:"Tooth",type:"Type",selected:"Selected",yes:"Yes",no:"No",condition:"Condition",legend:"Tooth condition legend",toothTypes:{},state:"State",states:{present:"Present",missing:"Missing",extracted:"Extracted",implant:"Implant",unerupted:"Unerupted"},findings:"Findings",findingStatuses:{existing:"Existing",planned:"Planned",done:"Done"},surfaces:"Tooth surfaces",surface:"Surface",surfaceSummary:"Surfaces",surfaceNames:{vestibular:"Vestibular",mesial:"Mesial",occlusal:"Occlusal",incisal:"Incisal",distal:"Distal",lingual:"Lingual",palatal:"Palatal"},surfaceLetters:{vestibular:"V",mesial:"M",occlusal:"O",incisal:"I",distal:"D",lingual:"L",palatal:"P"},surfaceDescriptions:{vestibular:"Faces the lips or cheeks (outward).",mesial:"Closest to the midline of the mouth.",occlusal:"Chewing surface of molars and premolars.",incisal:"Cutting edge of incisors and canines.",distal:"Farthest from the midline of the mouth.",lingual:"Faces the tongue (lower teeth).",palatal:"Faces the palate (upper teeth)."},surfaceGuide:"Surface guide",surfaceMenu:"Surface findings",inspector:{title:"Tooth details",surfaceFindings:"Findings by surface",toothFindings:"Whole tooth",noFindings:"No findings",addFinding:"Add a finding",finding:"Finding",status:"Status",add:"Add",remove:"Remove",chooseSurfaces:"Choose the surfaces on the diagram.",onSurfaces:"On surfaces",onTooth:"On the whole tooth"}};function _t(e){return{...J,...e,chartTitles:{...J.chartTitles,...e==null?void 0:e.chartTitles},toothTypes:{...J.toothTypes,...e==null?void 0:e.toothTypes},states:{...J.states,...e==null?void 0:e.states},surfaceNames:{...J.surfaceNames,...e==null?void 0:e.surfaceNames},surfaceLetters:{...J.surfaceLetters,...e==null?void 0:e.surfaceLetters},surfaceDescriptions:{...J.surfaceDescriptions,...e==null?void 0:e.surfaceDescriptions},findingStatuses:{...J.findingStatuses,...e==null?void 0:e.findingStatuses},inspector:{...J.inspector,...e==null?void 0:e.inspector}}}const Re=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"]);function Cn(e,o){return e.center.x-o.center.x}function bn(e){const o=new Map;for(const{row:n,center:s}of e){const a=o.get(n)??{total:0,count:0};o.set(n,{total:a.total+s.y,count:a.count+1})}return new Map([...o].map(([n,{total:s,count:a}])=>[n,s/a]))}function He(e,o,n){var i,c,d,h,u,m;const s=e.find(({toothId:l})=>l===o);if(!s)return;const a=e.filter(({row:l})=>l===s.row).sort(Cn),r=a.indexOf(s);switch(n){case"ArrowLeft":return(i=a[r-1])==null?void 0:i.toothId;case"ArrowRight":return(c=a[r+1])==null?void 0:c.toothId;case"Home":return(d=a[0])==null?void 0:d.toothId;case"End":return(h=a[a.length-1])==null?void 0:h.toothId;default:{const l=n==="ArrowDown",g=bn(e),p=g.get(s.row),b=(u=[...g].filter(([x,M])=>x!==s.row&&(l?M>p:M<p)).sort(([,x],[,M])=>Math.abs(x-p)-Math.abs(M-p))[0])==null?void 0:u[0];return(m=e.filter(({row:x})=>x===b).reduce((x,M)=>!x||Math.abs(M.center.x-s.center.x)<Math.abs(x.center.x-s.center.x)?M:x,void 0))==null?void 0:m.toothId}}}const Zt=new Set(["missing","extracted"]);function qt(e,o){return(e==null?void 0:e[o])??"present"}function Mn(e,o){return{x:e.x+e.width*o,y:e.y+e.height*o,width:e.width*(1-2*o),height:e.height*(1-2*o)}}function Bn(e,o){const n=[];for(const{toothId:s,box:a}of e){const r=qt(o,s),i=Math.max(1,Math.min(a.width,a.height)*.06);if(r==="extracted"){const c=Mn(a,.12);n.push({kind:"cross",toothId:s,strokeWidth:i,lines:[{x1:c.x,y1:c.y,x2:c.x+c.width,y2:c.y+c.height},{x1:c.x+c.width,y1:c.y,x2:c.x,y2:c.y+c.height}]})}else if(r==="implant"){const c=Math.min(a.width,a.height)*.22,d=a.height*.62,h={x:a.x+(a.width-c)/2,y:a.y+(a.height-d)/2,width:c,height:d},u=4,m=c*.35,l=Array.from({length:u},(g,p)=>{const w=h.y+h.height*(p+1)/(u+1);return{x1:h.x-m,y1:w,x2:h.x+c+m,y2:w}});n.push({kind:"implant",toothId:s,body:h,threads:l,strokeWidth:i*.8})}}return n}const Sn=[[1,2],[4,3],[5,6],[8,7]];function $n(e){const o=Number(e[0]),[n,s]=Sn.find(i=>i.includes(o))??[o,o],a=n>4?5:8,r=i=>Array.from({length:a},(c,d)=>`${i}${d+1}`);return[...r(n).reverse(),...r(s)]}function En(e,o){const n=$n(o),s=e.teeth.map(r=>n.indexOf(r));if(s.some(r=>r<0)||!s.length)return!1;const a=n.indexOf(o);return a>=Math.min(...s)&&a<=Math.max(...s)}function Ae(e){var o;return(o=e.surfaces)!=null&&o.length?A.filter(n=>e.surfaces.includes(n)):[...A]}function ft(e,o,n=it){const s={toothId:e,surfaces:Object.fromEntries(A.map(a=>[a,[]])),tooth:[]};return o.forEach((a,r)=>{const i=n[a.code],c=i?nt(i.symbol):"unknown";if(!(c==="span"?En(a,e):a.teeth.includes(e)))return;const h={index:r,finding:a,definition:i,scope:c};c==="surface"?Ae(a).forEach(u=>s.surfaces[u].push(h)):s.tooth.push(h)}),s}function Pn(e,o){return e.code===o.code&&(e.status??"existing")===(o.status??"existing")&&e.tone===o.tone&&e.color===o.color&&e.label===void 0&&e.direction===void 0}function Oe(e,o){var a;const n=A.filter(r=>o.surfaces.includes(r)),s=e.findIndex(r=>r.teeth.length===1&&r.teeth[0]===o.toothId&&Pn(r,o));if(s>=0){const r=e[s],i=(a=r.surfaces)!=null&&a.length?A.filter(c=>r.surfaces.includes(c)||n.includes(c)):void 0;return e.map((c,d)=>d===s?{...r,...i?{surfaces:i}:{}}:c)}return[...e,{code:o.code,teeth:[o.toothId],surfaces:n,...o.status?{status:o.status}:{},...o.tone?{tone:o.tone}:{},...o.color?{color:o.color}:{}}]}function Nn(e,o,n=it){const s=n[o.code];return s&&nt(s.symbol)==="surface"?Oe(e,{...o,surfaces:o.surfaces??[]}):[...e,{code:o.code,teeth:[o.toothId],...o.status?{status:o.status}:{},...o.tone?{tone:o.tone}:{},...o.color?{color:o.color}:{}}]}function In(e,{index:o,toothId:n,surface:s}){const a=e[o];if(!(a!=null&&a.teeth.includes(n)))return[...e];const r=a.teeth.filter(d=>d!==n),i=s?Ae(a).filter(d=>d!==s):[],c=[...r.length?[{...a,teeth:r}]:[],...i.length?[{...a,teeth:[n],surfaces:i}]:[]];return[...e.slice(0,o),...c,...e.slice(o+1)]}const Vn=["d"],Tn=["d"],Dn=["cx","cy","r"],Fn=["x","y","font-size"],Rt=t.defineComponent({__name:"FindingPrimitives",props:{primitives:{}},setup(e){return(o,n)=>(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.primitives,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:a},[s.type==="path"?(t.openBlock(),t.createElementBlock("path",{key:0,class:"odontogram-finding__stroke",d:s.d},null,8,Vn)):s.type==="area"?(t.openBlock(),t.createElementBlock("path",{key:1,class:"odontogram-finding__area",d:s.d},null,8,Tn)):s.type==="circle"?(t.openBlock(),t.createElementBlock("circle",{key:2,class:"odontogram-finding__stroke",cx:s.cx,cy:s.cy,r:s.r},null,8,Dn)):(t.openBlock(),t.createElementBlock("text",{key:3,class:"odontogram-finding__text",x:s.x,y:s.y,"font-size":s.fontSize,"text-anchor":"middle","dominant-baseline":"central"},t.toDisplayString(s.text),9,Fn))],64))),128))}}),Ln=["aria-label"],zn=["data-state"],_n={"aria-hidden":"true",class:"odontogram-condition-labels__icon",viewBox:"0 0 16 16",fill:"none"},Zn=["stroke-dasharray"],qn={key:0,class:"odontogram-state-mark--cross"},Rn={key:1,class:"odontogram-state-mark--implant"},Hn=["data-finding","data-status","data-tone"],An=t.defineComponent({__name:"ConditionLabels",props:{conditions:{default:void 0},states:{default:()=>[]},findings:{default:()=>[]},ariaLabel:{default:"Tooth condition legend"}},setup(e){return(o,n)=>{var s;return(s=e.conditions)!=null&&s.length||e.states.length||e.findings.length?(t.openBlock(),t.createElementBlock("ul",{key:0,class:"odontogram-condition-labels","aria-label":e.ariaLabel},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.conditions,(a,r)=>(t.openBlock(),t.createElementBlock("li",{key:`${r}-${a.label}`,class:"odontogram-condition-labels__item"},[t.createElementVNode("span",{"aria-hidden":"true",class:"odontogram-condition-labels__swatch",style:t.normalizeStyle({background:a.fillColor,borderColor:a.outlineColor??a.fillColor})},null,4),t.createElementVNode("span",null,t.toDisplayString(a.label),1)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.states,({state:a,label:r})=>(t.openBlock(),t.createElementBlock("li",{key:`state-${a}`,class:"odontogram-condition-labels__item","data-state":a},[(t.openBlock(),t.createElementBlock("svg",_n,[t.createElementVNode("rect",{class:t.normalizeClass(["odontogram-condition-labels__icon-tooth",`odontogram-condition-labels__icon-tooth--${a}`]),x:"2",y:"2",width:"12",height:"12",rx:"4","stroke-dasharray":a==="missing"||a==="extracted"?"2.5 2":void 0},null,10,Zn),a==="extracted"?(t.openBlock(),t.createElementBlock("g",qn,[...n[0]||(n[0]=[t.createElementVNode("line",{x1:"3",y1:"3",x2:"13",y2:"13"},null,-1),t.createElementVNode("line",{x1:"13",y1:"3",x2:"3",y2:"13"},null,-1)])])):a==="implant"?(t.openBlock(),t.createElementBlock("g",Rn,[...n[1]||(n[1]=[t.createElementVNode("rect",{x:"6.5",y:"4",width:"3",height:"8"},null,-1),t.createElementVNode("line",{x1:"5.5",y1:"6",x2:"10.5",y2:"6"},null,-1),t.createElementVNode("line",{x1:"5.5",y1:"8",x2:"10.5",y2:"8"},null,-1),t.createElementVNode("line",{x1:"5.5",y1:"10",x2:"10.5",y2:"10"},null,-1)])])):t.createCommentVNode("",!0)])),t.createElementVNode("span",null,t.toDisplayString(r),1)],8,zn))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.findings,a=>(t.openBlock(),t.createElementBlock("li",{key:a.key,class:"odontogram-condition-labels__item","data-finding":a.code,"data-status":a.status,"data-tone":a.tone},[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":"true",class:t.normalizeClass(["odontogram-condition-labels__icon odontogram-finding",[`odontogram-finding--${a.tone}`,`odontogram-finding--${a.status}`]]),style:t.normalizeStyle(a.color?{color:a.color}:void 0),viewBox:"0 0 16 16",fill:"none","stroke-width":"1.4"},[t.createVNode(Rt,{primitives:a.icon},null,8,["primitives"])],6)),t.createElementVNode("span",null,t.toDisplayString(a.name),1)],8,Hn))),128))],8,Ln)):t.createCommentVNode("",!0)}}}),On={key:0,class:"odontogram-tooltip__description"},jn={key:1},Qn={key:2},Wn={key:0},Kn={key:1},Xn=["data-summary-surface"],Un={class:"odontogram-tooltip__letter"},Gn={key:3},Yn=t.defineComponent({__name:"OdontogramTooltip",props:{active:{type:Boolean},tooth:{},selected:{type:Boolean,default:!1},condition:{default:void 0},state:{default:"present"},findings:{default:()=>[]},number:{default:void 0},surface:{default:void 0},surfaceName:{default:void 0},surfaceDescription:{default:void 0},surfaceSummary:{default:()=>[]},anchorRect:{default:void 0},placement:{default:"top"},margin:{default:10},labels:{default:()=>J}},setup(e){const o=e,n=t.ref(null),s=t.ref({left:-9999,top:-9999,isBelow:!1});function a(i,c,d){return Math.min(Math.max(i,c),d)}async function r(){if(!(o.active&&o.anchorRect&&n.value))return;await t.nextTick();const i=n.value.getBoundingClientRect(),c=8,d=12,h=o.placement.startsWith("bottom"),u=o.anchorRect.left+(o.anchorRect.right-o.anchorRect.left)/2,m=Math.max(c,window.innerWidth-i.width-c),l=a(u-i.width/2,c,m),g=o.anchorRect.top-i.height-o.margin-d,p=o.anchorRect.bottom+o.margin+d,w=Math.max(c,window.innerHeight-i.height-c);let b=h,C=h?p:g;!b&&C<c&&(b=!0,C=p),b&&C>w&&(b=!1,C=g),s.value={left:l,top:a(C,c,w),isBelow:b}}return t.watch(()=>[o.active,o.anchorRect,o.placement,o.margin],()=>void r(),{deep:!0,flush:"post"}),(i,c)=>e.active&&e.tooth?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"tooltip",ref:n,class:"odontogram-tooltip",role:"tooltip",style:t.normalizeStyle({position:"fixed",left:`${s.value.left}px`,top:`${s.value.top}px`,opacity:s.value.left===-9999?0:1})},[t.renderSlot(i.$slots,"default",{tooth:e.tooth,selected:e.selected,condition:e.condition,state:e.state,findings:e.findings,number:e.number??e.tooth.id,surface:e.surface,surfaceName:e.surfaceName,surfaceSummary:e.surfaceSummary},()=>{var d;return[e.surface?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",null,t.toDisplayString(e.labels.tooth)+": "+t.toDisplayString(e.number??e.tooth.id),1),t.createElementVNode("div",null,t.toDisplayString(e.labels.surface)+": "+t.toDisplayString(e.surfaceName??e.surface),1),e.surfaceDescription?(t.openBlock(),t.createElementBlock("div",On,t.toDisplayString(e.surfaceDescription),1)):t.createCommentVNode("",!0),e.state!=="present"?(t.openBlock(),t.createElementBlock("div",jn,t.toDisplayString(e.labels.state)+": "+t.toDisplayString(e.labels.states[e.state]),1)):t.createCommentVNode("",!0),e.findings.length?(t.openBlock(),t.createElementBlock("div",Qn,t.toDisplayString(e.labels.findings)+": "+t.toDisplayString(e.findings.join(", ")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",null,t.toDisplayString(e.labels.selected)+": "+t.toDisplayString(e.selected?e.labels.yes:e.labels.no),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",null,t.toDisplayString(e.labels.tooth)+": "+t.toDisplayString(e.number??e.tooth.id),1),t.createElementVNode("div",null,t.toDisplayString(e.labels.type)+": "+t.toDisplayString(e.labels.toothTypes[e.tooth.type]??e.tooth.type),1),e.state!=="present"?(t.openBlock(),t.createElementBlock("div",Wn,t.toDisplayString(e.labels.state)+": "+t.toDisplayString(e.labels.states[e.state]),1)):t.createCommentVNode("",!0),e.findings.length?(t.openBlock(),t.createElementBlock("div",Kn,t.toDisplayString(e.labels.findings)+": "+t.toDisplayString(e.findings.join(", ")),1)):t.createCommentVNode("",!0),e.surfaceSummary.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",null,t.toDisplayString(e.labels.surfaceSummary)+":",1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.surfaceSummary,h=>(t.openBlock(),t.createElementBlock("div",{key:h.surface,class:"odontogram-tooltip__summary","data-summary-surface":h.surface},[t.createElementVNode("span",Un,t.toDisplayString(h.letter),1),t.createTextVNode(" "+t.toDisplayString(h.name)+": "+t.toDisplayString(h.findings.join(", ")),1)],8,Xn))),128))],64)):t.createCommentVNode("",!0),t.createElementVNode("div",null,t.toDisplayString(e.labels.selected)+": "+t.toDisplayString(e.selected?e.labels.yes:e.labels.no),1),(d=e.condition)!=null&&d.label?(t.openBlock(),t.createElementBlock("div",Gn,t.toDisplayString(e.labels.condition)+": "+t.toDisplayString(e.condition.label),1)):t.createCommentVNode("",!0)],64))]}),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["odontogram-tooltip__arrow",{"odontogram-tooltip__arrow--below":s.value.isBelow}])},null,2)],4)):t.createCommentVNode("",!0)}}),Jn=["aria-label"],vn=["data-surfaces-for","stroke-width"],ta=["d","role","aria-label","aria-checked","aria-haspopup","aria-expanded","aria-disabled","tabindex","data-surface-tooth","data-surface","onClick","onFocus","onMouseenter","onKeydown"],ea=t.defineComponent({__name:"SurfaceDiagrams",props:{diagrams:{},anchors:{},surfaces:{},disabled:{type:Boolean},inactiveTeeth:{},labels:{},spokenNumber:{type:Function},menu:{type:Boolean},openMenu:{}},emits:["activate","enter","leave"],setup(e,{emit:o}){const n=e,s=o,a=t.ref(null),r=t.ref();function i(w,b,C){r.value={toothId:w,surface:b},s("enter",w,b,C)}function c(w,b){var C;return((C=n.surfaces[w])==null?void 0:C.includes(b))??!1}const d=t.computed(()=>n.diagrams.filter(({toothId:w})=>!n.inactiveTeeth.has(w))),h=t.computed(()=>{const w=d.value;if(r.value&&w.some(({toothId:b})=>b===r.value.toothId))return r.value;for(const{toothId:b}of w){const C=A.find(x=>c(b,x));if(C)return{toothId:b,surface:C}}return w[0]?{toothId:w[0].toothId,surface:A[0]}:void 0});function u(w,b){var C;return((C=h.value)==null?void 0:C.toothId)===w&&h.value.surface===b}function m(w,b,C){!n.disabled&&!n.inactiveTeeth.has(w)&&C.currentTarget instanceof SVGElement&&(r.value={toothId:w,surface:b},s("activate",w,b,C.currentTarget))}function l(w,b){var C;return((C=n.openMenu)==null?void 0:C.toothId)===w&&n.openMenu.surface===b}function g(w,b,C){if(C==="ArrowUp"||C==="ArrowDown"){const y=A.indexOf(b)+(C==="ArrowDown"?1:-1);return A[y]?{toothId:w,surface:A[y]}:void 0}const x=n.anchors.filter(y=>!n.inactiveTeeth.has(y.toothId)||y.toothId===w),M=He(x,w,C);return M&&M!==w?{toothId:M,surface:b}:void 0}async function p(w,b,C){var M,y;if(w.key==="Enter"||w.key===" "){w.preventDefault(),m(b,C,w);return}if(!Re.has(w.key))return;w.preventDefault();const x=g(b,C,w.key);x&&(r.value=x,await t.nextTick(),(y=(M=a.value)==null?void 0:M.querySelector(`[data-surface-tooth="${x.toothId}"][data-surface="${x.surface}"]`))==null||y.focus())}return(w,b)=>(t.openBlock(),t.createElementBlock("g",{ref_key:"root",ref:a,class:"odontogram__surfaces",role:"group","aria-label":e.labels.surfaces},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.diagrams,C=>(t.openBlock(),t.createElementBlock("g",{key:C.toothId,class:t.normalizeClass(["odontogram-surfaces",{"odontogram-surfaces--inactive":e.inactiveTeeth.has(C.toothId)}]),"data-surfaces-for":C.toothId,"stroke-width":C.strokeWidth},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.surfaces,({surface:x,name:M,d:y})=>(t.openBlock(),t.createElementBlock("path",{key:x,class:t.normalizeClass(["odontogram-surface",{"odontogram-surface--selected":c(C.toothId,x)}]),d:y,role:e.menu?"button":"checkbox","aria-label":`${e.labels.tooth} ${e.spokenNumber(C.toothId)}, ${e.labels.surfaceNames[M]}`,"aria-checked":e.menu?void 0:c(C.toothId,x),"aria-haspopup":e.menu?"dialog":void 0,"aria-expanded":e.menu?l(C.toothId,x):void 0,"aria-disabled":e.disabled||e.inactiveTeeth.has(C.toothId)||void 0,tabindex:!e.disabled&&u(C.toothId,x)?0:-1,"data-surface-tooth":C.toothId,"data-surface":x,onClick:f=>m(C.toothId,x,f),onFocus:f=>i(C.toothId,x,f),onBlur:b[0]||(b[0]=f=>s("leave")),onMouseenter:f=>s("enter",C.toothId,x,f),onMouseleave:b[1]||(b[1]=f=>s("leave")),onKeydown:f=>p(f,C.toothId,x)},null,42,ta))),128))],10,vn))),128))],8,Jn))}}),oa=["role","aria-label","data-tooth-state","aria-selected","aria-disabled","tabindex","data-tooth-id","transform"],na=["stroke","stroke-dasharray","d"],aa=["fill","d","data-colored"],sa=["stroke","d"],ra=["stroke","d"],je=t.defineComponent({__name:"Tooth",props:{tooth:{},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},condition:{default:void 0},layoutTransform:{default:void 0},label:{default:"Tooth"},focusable:{type:Boolean,default:!0},state:{default:"present"},stateLabel:{default:void 0},description:{default:void 0},number:{default:void 0},spokenNumber:{default:void 0}},emits:["select","mouseenter","mouseleave","focus","blur","navigate"],setup(e,{emit:o}){const n=e,s=t.computed(()=>Zt.has(n.state)),a=t.computed(()=>[`${n.label} ${n.spokenNumber??n.number??n.tooth.id}`,n.state!=="present"?n.stateLabel:void 0,n.description].filter(Boolean).join(", ")),r=o,i=t.computed(()=>{var m;return((m=n.condition)==null?void 0:m.outlineColor)??(n.selected?"var(--odontogram-selected-stroke-color, #b8c0cc)":"currentColor")}),c=t.computed(()=>{var m;return((m=n.condition)==null?void 0:m.fillColor)??"currentColor"}),d=t.computed(()=>{const m=[n.tooth.shape.transform,n.layoutTransform].filter(l=>!!l);return m.length?m.join(" "):void 0});function h(){n.disabled||r("select",n.tooth)}function u(m){m.key==="Enter"||m.key===" "?(m.preventDefault(),h()):Re.has(m.key)&&(m.preventDefault(),r("navigate",n.tooth,m.key))}return(m,l)=>(t.openBlock(),t.createElementBlock("g",{class:t.normalizeClass(["odontogram-tooth",{"odontogram-tooth--selected":e.selected,"odontogram-tooth--disabled":e.disabled,"odontogram-tooth--absent":s.value,[`odontogram-tooth--${e.state}`]:e.state!=="present"}]),role:e.disabled?void 0:"option","aria-label":a.value,"data-tooth-state":e.state,"aria-selected":e.disabled?void 0:e.selected,"aria-disabled":e.disabled,tabindex:e.disabled||!e.focusable?-1:0,"data-tooth-id":e.tooth.id,style:t.normalizeStyle({cursor:e.disabled?"default":"pointer",color:i.value}),transform:d.value,onClick:h,onKeydown:u,onMouseenter:l[0]||(l[0]=g=>r("mouseenter",e.tooth,g)),onMouseleave:l[1]||(l[1]=g=>r("mouseleave",e.tooth,g)),onFocus:l[2]||(l[2]=g=>r("focus",e.tooth,g)),onBlur:l[3]||(l[3]=g=>r("blur",e.tooth,g))},[t.createElementVNode("title",null,t.toDisplayString(e.number??e.tooth.id),1),t.createElementVNode("path",{stroke:i.value,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":s.value?"4 3":void 0,d:e.tooth.shape.outlinePath},null,8,na),e.tooth.shape.shadowPath?(t.openBlock(),t.createElementBlock("path",{key:0,fill:c.value,d:e.tooth.shape.shadowPath,"data-colored":e.condition&&!s.value?"true":void 0,style:t.normalizeStyle({opacity:e.condition&&!s.value?1:void 0})},null,12,aa)):t.createCommentVNode("",!0),s.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[],64)):Array.isArray(e.tooth.shape.lineHighlightPath)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.tooth.shape.lineHighlightPath,g=>(t.openBlock(),t.createElementBlock("path",{key:g,stroke:i.value,"stroke-linecap":"round","stroke-linejoin":"round",d:g},null,8,sa))),128)):e.tooth.shape.lineHighlightPath?(t.openBlock(),t.createElementBlock("path",{key:3,stroke:i.value,"stroke-linecap":"round","stroke-linejoin":"round",d:e.tooth.shape.lineHighlightPath},null,8,ra)):t.createCommentVNode("",!0)],46,oa))}}),ia=["aria-label","aria-multiselectable","aria-disabled"],ca=["viewBox","aria-label"],la=["transform"],da={key:0,class:"odontogram__state-marks","aria-hidden":"true"},ha=["data-mark-for","stroke-width"],ua=["data-mark-for","stroke-width"],ma=["x","y","width","height","rx"],fa={key:2,class:"odontogram__findings","aria-hidden":"true"},ga=["data-finding","data-status","data-teeth","stroke-width","stroke-dasharray"],ya={key:3,class:"odontogram__surface-letters","aria-hidden":"true"},pa=["data-letter-for","x","y","font-size"],ka={key:4,class:"odontogram__numbers","aria-hidden":"true"},xa=["data-number-for","x","y","font-size"],wa=["data-corner-for","d","stroke-width"],Ca={key:5,class:"odontogram__overlay"},ba=["aria-label","data-menu-for"],Ma=t.defineComponent({__name:"Odontogram",props:{modelValue:{default:()=>[]},dentition:{default:"permanent"},notation:{default:"FDI"},singleSelect:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showLabels:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},conditions:{default:void 0},layout:{default:"arch"},labels:{default:void 0},showNumbers:{type:Boolean,default:!1},showHalf:{default:"full"},toothStates:{default:void 0},findings:{default:void 0},findingCatalog:{default:()=>it},showSurfaces:{type:Boolean,default:!1},showSurfaceLetters:{type:Boolean,default:!1},surfaceShape:{default:"square"},surfaces:{default:()=>({})},teeth:{default:void 0}},emits:["update:modelValue","change","tooth-click","update:surfaces","surface-click"],setup(e,{emit:o}){const n=e,s=o,{viewBox:a,viewBoxRect:r,quadrants:i,anchors:c,anchorList:d,numberLabels:h,surfaceDiagrams:u,findingLayout:m,findingsByTooth:l,conditionByTooth:g}=xn({dentition:()=>n.dentition,layout:()=>n.layout,notation:()=>n.notation,conditions:()=>n.conditions,showHalf:()=>n.showHalf,showNumbers:()=>n.showNumbers,findings:()=>n.findings,findingCatalog:()=>n.findingCatalog,showSurfaces:()=>n.showSurfaces,teeth:()=>n.teeth,surfaceShape:()=>n.surfaceShape});function p(k){const{surfaceNames:B,findingStatuses:I}=j.value,L=({name:O,surfaces:K,status:S})=>{const Z=[...(K??[]).map(z=>B[ot(z,k)]),...S==="existing"?[]:[I[S]]];return Z.length?`${O} (${Z.join(", ")})`:O};return[...new Set((l.value.get(k)??[]).map(L))]}const w=t.computed(()=>{const k=new Map;for(const B of m.value.findings){const I=[B.code,B.status,B.tone,B.color??""].join(":");k.set(I,k.get(I)??B)}return[...k.entries()].map(([B,{code:I,name:L,status:O,tone:K,color:S}])=>({key:B,code:I,name:O==="existing"?L:`${L} (${j.value.findingStatuses[O]})`,status:O,tone:K,color:S,icon:pn(n.findingCatalog[I].symbol)}))});function b(k){return qt(n.toothStates,k)}function C(k){return et(k,n.notation)}function x(k){return et(k,n.notation,"text")}const M=t.computed(()=>n.showSurfaceLetters?u.value.flatMap(k=>k.surfaces.map(B=>({key:`${k.toothId}:${B.surface}`,...Me(B),fontSize:k.size*.24,text:j.value.surfaceLetters[B.name]}))):[]),y=t.computed(()=>new Set(d.value.filter(({toothId:k})=>Zt.has(b(k))).map(({toothId:k})=>k))),f=t.computed(()=>new Map(i.value.flatMap(({teeth:k})=>k.map(({tooth:B})=>[B.id,B]))));function $(k,B){const I=Se(n.surfaces,k,B);s("update:surfaces",I),s("surface-click",f.value.get(k),B,I)}const F=t.useSlots(),P=t.ref(),N=t.ref(null),E=t.ref({left:-9999,top:-9999});function V(k,B,I){if(!F["surface-menu"]){$(k,B);return}s("surface-click",f.value.get(k),B,n.surfaces),Pt(),P.value={toothId:k,surface:B,element:I},T()}async function T(){var G,at;E.value={left:-9999,top:-9999},await t.nextTick();const k=N.value,B=(G=P.value)==null?void 0:G.element;if(!k||!B)return;const I=8,L=B.getBoundingClientRect(),{width:O,height:K}=k.getBoundingClientRect(),S=(ht,xs)=>Math.min(Math.max(ht,I),Math.max(I,xs)),Z=L.bottom+I,z=Z+K>window.innerHeight-I?L.top-K-I:Z;E.value={left:S(L.left+L.width/2-O/2,window.innerWidth-O-I),top:S(z,window.innerHeight-K-I)},(at=k.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))==null||at.focus()}function H(k=!0){var I;const B=(I=P.value)==null?void 0:I.element;P.value=void 0,k&&(B==null||B.focus())}const q=t.computed(()=>{const k=P.value;if(k)return{toothId:k.toothId,tooth:f.value.get(k.toothId),surface:k.surface,surfaceName:j.value.surfaceNames[ot(k.surface,k.toothId)],record:ft(k.toothId,n.findings??[],n.findingCatalog),close:()=>H()}});function W(k){var I;const B=k.target;P.value&&B&&!((I=N.value)!=null&&I.contains(B))&&B!==P.value.element&&H(!1)}function lt(k){P.value&&k.key==="Escape"&&(k.preventDefault(),H())}t.watch(()=>!!P.value,k=>{k?(document.addEventListener("pointerdown",W,!0),document.addEventListener("keydown",lt)):(document.removeEventListener("pointerdown",W,!0),document.removeEventListener("keydown",lt))}),t.watch(()=>P.value&&!u.value.some(({toothId:k})=>k===P.value.toothId),k=>k&&H(!1)),t.onBeforeUnmount(()=>{document.removeEventListener("pointerdown",W,!0),document.removeEventListener("keydown",lt)});const _=t.computed(()=>Bn(d.value,n.toothStates)),X=t.computed(()=>{const k=new Set(d.value.map(({toothId:B})=>b(B)));return qe.filter(B=>B!=="present"&&k.has(B)).map(B=>({state:B,label:j.value.states[B]}))}),Y=t.ref(null),tt=t.ref(),$t=t.computed(()=>{var B;const k=c.value;return tt.value&&k[tt.value]?tt.value:n.modelValue.find(I=>k[I])??((B=d.value[0])==null?void 0:B.toothId)});function Ht(k,B){tt.value=k.id,jt(k,B)}async function At(k,B){var L,O;const I=He(d.value,k.id,B);I&&(tt.value=I,await t.nextTick(),(O=(L=Y.value)==null?void 0:L.querySelector(`[data-tooth-id="${I}"]`))==null||O.focus())}const j=t.computed(()=>_t(n.labels)),xt=t.computed(()=>j.value.chartTitles[n.dentition]),Q=t.ref(),wt=t.ref(),Ot=t.ref(),{isSelected:Et,toggle:ys}=wn({modelValue:()=>n.modelValue,singleSelect:()=>n.singleSelect});function jt(k,B){const I=B.currentTarget;if(!(I instanceof SVGElement))return;const L=I.getBoundingClientRect();Q.value=k,wt.value=void 0,Ot.value={top:L.top,right:L.right,bottom:L.bottom,left:L.left}}function Pt(){Q.value=void 0,wt.value=void 0,Ot.value=void 0}function ps(k,B,I){const L=f.value.get(k);L&&(jt(L,I),wt.value=B)}const Qt=t.computed(()=>{const k=Q.value;if(!k||wt.value)return;const{surfaceNames:B,surfaceLetters:I,findingStatuses:L}=j.value,O=({finding:z,definition:G})=>{const at=z.status??"existing",ht=(G==null?void 0:G.name)??z.code;return at==="existing"?ht:`${ht} (${L[at]})`},K=ft(k.id,n.findings??[],n.findingCatalog),S=A.filter(z=>K.surfaces[z].length).map(z=>{const G=ot(z,k.id);return{surface:z,letter:I[G],name:B[G],findings:[...new Set(K.surfaces[z].map(O))]}}),Z=[...new Set((l.value.get(k.id)??[]).filter(({surfaces:z})=>!z).map(z=>z.status==="existing"?z.name:`${z.name} (${L[z.status]})`))];return{summary:S,findings:Z}}),dt=t.computed(()=>{var Z;const k=Q.value,B=wt.value;if(!k||!B)return;const{surfaceNames:I,surfaceDescriptions:L,findingStatuses:O}=j.value,K=ot(B,k.id),S=ft(k.id,n.findings??[],n.findingCatalog).surfaces[B].map(({finding:z,definition:G})=>{const at=z.status??"existing",ht=(G==null?void 0:G.name)??z.code;return at==="existing"?ht:`${ht} (${O[at]})`});return{surface:B,name:I[K],description:L[K],findings:[...new Set(S)],selected:((Z=n.surfaces[k.id])==null?void 0:Z.includes(B))??!1}});function ks(k){const B=ys(k.id);s("update:modelValue",B),s("change",B),s("tooth-click",k,B)}return(k,B)=>{var I,L,O,K;return t.openBlock(),t.createElementBlock("div",{class:"odontogram",role:"listbox","aria-label":j.value.odontogram,"aria-multiselectable":!e.singleSelect,"aria-disabled":e.disabled},[(t.openBlock(),t.createElementBlock("svg",{ref_key:"svgElement",ref:Y,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:t.unref(a),class:"odontogram__svg","aria-label":xt.value},[t.createElementVNode("title",null,t.toDisplayString(xt.value),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i),S=>(t.openBlock(),t.createElementBlock("g",{key:S.quadrant,transform:S.transform},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.teeth,({tooth:Z,transform:z})=>(t.openBlock(),t.createBlock(je,{key:Z.id,tooth:Z,selected:t.unref(Et)(Z.id),disabled:e.disabled,condition:t.unref(g).get(Z.id),"layout-transform":z,label:j.value.tooth,focusable:Z.id===$t.value,state:b(Z.id),"state-label":j.value.states[b(Z.id)],description:p(Z.id).join(", ")||void 0,number:C(Z.id),"spoken-number":x(Z.id),onSelect:ks,onMouseenter:jt,onMouseleave:Pt,onFocus:Ht,onBlur:Pt,onNavigate:At},null,8,["tooth","selected","disabled","condition","layout-transform","label","focusable","state","state-label","description","number","spoken-number"]))),128))],8,la))),128)),_.value.length?(t.openBlock(),t.createElementBlock("g",da,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,S=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:S.toothId},[S.kind==="cross"?(t.openBlock(),t.createElementBlock("g",{key:0,class:"odontogram-state-mark--cross","data-mark-for":S.toothId,"stroke-width":S.strokeWidth},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.lines,(Z,z)=>(t.openBlock(),t.createElementBlock("line",t.mergeProps({key:z},{ref_for:!0},Z),null,16))),128))],8,ha)):(t.openBlock(),t.createElementBlock("g",{key:1,class:"odontogram-state-mark--implant","data-mark-for":S.toothId,"stroke-width":S.strokeWidth},[t.createElementVNode("rect",{x:S.body.x,y:S.body.y,width:S.body.width,height:S.body.height,rx:S.body.width/4},null,8,ma),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.threads,(Z,z)=>(t.openBlock(),t.createElementBlock("line",t.mergeProps({key:z},{ref_for:!0},Z),null,16))),128))],8,ua))],64))),128))])):t.createCommentVNode("",!0),t.unref(u).length?(t.openBlock(),t.createBlock(ea,{key:1,diagrams:t.unref(u),anchors:t.unref(d),surfaces:e.surfaces,disabled:e.disabled,"inactive-teeth":y.value,labels:j.value,"spoken-number":x,menu:!!k.$slots["surface-menu"],"open-menu":P.value,onActivate:V,onEnter:ps,onLeave:Pt},null,8,["diagrams","anchors","surfaces","disabled","inactive-teeth","labels","menu","open-menu"])):t.createCommentVNode("",!0),t.unref(m).findings.length?(t.openBlock(),t.createElementBlock("g",fa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m).findings,S=>(t.openBlock(),t.createElementBlock("g",{key:S.key,class:t.normalizeClass(["odontogram-finding",[`odontogram-finding--${S.tone}`,`odontogram-finding--${S.status}`]]),style:t.normalizeStyle(S.color?{color:S.color}:void 0),"data-finding":S.code,"data-status":S.status,"data-teeth":S.teeth.join(" "),"stroke-width":S.strokeWidth,"stroke-dasharray":S.status==="planned"?`${S.strokeWidth*2} ${S.strokeWidth*1.6}`:void 0},[t.createVNode(Rt,{primitives:S.primitives},null,8,["primitives"])],14,ga))),128))])):t.createCommentVNode("",!0),M.value.length?(t.openBlock(),t.createElementBlock("g",ya,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,S=>(t.openBlock(),t.createElementBlock("text",{key:S.key,class:"odontogram__surface-letter","data-letter-for":S.key,x:S.x,y:S.y,"font-size":S.fontSize,"text-anchor":"middle","dominant-baseline":"central"},t.toDisplayString(S.text),9,pa))),128))])):t.createCommentVNode("",!0),t.unref(h).length?(t.openBlock(),t.createElementBlock("g",ka,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(h),S=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:S.toothId},[t.createElementVNode("text",{class:t.normalizeClass(["odontogram__number",{"odontogram__number--selected":t.unref(Et)(S.toothId)}]),"data-number-for":S.toothId,x:S.x,y:S.y,"font-size":S.fontSize,"text-anchor":"middle","dominant-baseline":"central"},t.toDisplayString(S.text),11,xa),S.corner?(t.openBlock(),t.createElementBlock("path",{key:0,class:t.normalizeClass(["odontogram__number-corner",{"odontogram__number-corner--selected":t.unref(Et)(S.toothId)}]),"data-corner-for":S.toothId,d:S.corner,"stroke-width":S.fontSize*.08},null,10,wa)):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0),k.$slots.overlay?(t.openBlock(),t.createElementBlock("g",Ca,[t.renderSlot(k.$slots,"overlay",{anchors:t.unref(c),viewBox:t.unref(r),dentition:e.dentition,layout:e.layout,surfaceDiagrams:t.unref(u)})])):t.createCommentVNode("",!0)],8,ca)),e.showTooltip?(t.openBlock(),t.createBlock(Yn,{key:0,active:!!Q.value&&!P.value,tooth:Q.value,selected:dt.value?dt.value.selected:Q.value?t.unref(Et)(Q.value.id):!1,condition:Q.value?t.unref(g).get(Q.value.id):void 0,state:Q.value?b(Q.value.id):"present",findings:dt.value?dt.value.findings:Qt.value?Qt.value.findings:[],number:Q.value?C(Q.value.id):void 0,surface:(I=dt.value)==null?void 0:I.surface,"surface-name":(L=dt.value)==null?void 0:L.name,"surface-description":(O=dt.value)==null?void 0:O.description,"surface-summary":((K=Qt.value)==null?void 0:K.summary)??[],"anchor-rect":Ot.value,labels:j.value},t.createSlots({_:2},[k.$slots.tooltip?{name:"default",fn:t.withCtx(S=>[t.renderSlot(k.$slots,"tooltip",t.normalizeProps(t.guardReactiveProps(S)))]),key:"0"}:void 0]),1032,["active","tooth","selected","condition","state","findings","number","surface","surface-name","surface-description","surface-summary","anchor-rect","labels"])):t.createCommentVNode("",!0),q.value&&k.$slots["surface-menu"]?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"surfaceMenuElement",ref:N,class:"odontogram-surface-menu",role:"dialog","aria-label":`${j.value.surfaceMenu}: ${j.value.tooth} ${x(q.value.toothId)}, ${q.value.surfaceName}`,"data-menu-for":`${q.value.toothId}:${q.value.surface}`,style:t.normalizeStyle({position:"fixed",left:`${E.value.left}px`,top:`${E.value.top}px`,opacity:E.value.left===-9999?0:1})},[t.renderSlot(k.$slots,"surface-menu",t.normalizeProps(t.guardReactiveProps(q.value)))],12,ba)):t.createCommentVNode("",!0),e.showLabels?(t.openBlock(),t.createBlock(An,{key:2,conditions:e.conditions,states:X.value,findings:w.value,"aria-label":j.value.legend},null,8,["conditions","states","findings","aria-label"])):t.createCommentVNode("",!0)],8,ia)}}}),Ba=["aria-label","data-tooth-id"],Sa={class:"odontogram-surface-guide__title"},$a=["d","stroke-width","data-guide-surface","onMouseenter","onClick"],Ea={class:"odontogram-surface-guide__findings"},Pa=["stroke-width","data-finding"],Na=["d","data-highlight"],Ia=["x","y"],Va={key:0,class:"odontogram-surface-guide__list"},Ta=["aria-pressed","disabled","data-guide-item","onMouseenter","onFocus","onClick"],Da={class:"odontogram-surface-guide__badge","aria-hidden":"true"},Fa={class:"odontogram-surface-guide__text"},La={key:0,class:"odontogram-surface-guide__findings-text"},za=84,Qe=t.defineComponent({__name:"SurfaceGuide",props:{toothId:{},findings:{default:()=>[]},findingCatalog:{default:()=>it},selected:{default:()=>[]},active:{default:void 0},labels:{default:void 0},notation:{default:"FDI"},disabled:{type:Boolean,default:!1},shape:{default:"square"},showList:{type:Boolean,default:!0}},emits:["surface-click","update:active"],setup(e,{emit:o}){const n=e,s=o,a={x:50,y:50},r=t.computed(()=>_t(n.labels)),i=t.computed(()=>et(n.toothId,n.notation)),c=t.computed(()=>et(n.toothId,n.notation,"text")),d=t.computed(()=>be(n.toothId,a,tn(n.toothId),za,1.2,n.shape)),h=t.computed(()=>yn(n.findings,n.findingCatalog,d.value)),u=t.computed(()=>ft(n.toothId,n.findings,n.findingCatalog));function m(M){const{findingStatuses:y}=r.value;return u.value.surfaces[M].map(({finding:f,definition:$})=>{const F=($==null?void 0:$.name)??f.code,P=f.status??"existing";return P==="existing"?F:`${F} (${y[P]})`})}const l=t.ref(),g=t.computed(()=>l.value??n.active);function p(M){l.value=M,s("update:active",M)}function w(M){n.disabled||s("surface-click",M)}const b=t.computed(()=>d.value.surfaces.map(M=>({...M,center:Me(M),letter:r.value.surfaceLetters[M.name]}))),C=t.computed(()=>b.value.find(({surface:M})=>M===g.value)),x=t.computed(()=>A.map(M=>{const{name:y,letter:f}=b.value.find($=>$.surface===M);return{surface:M,letter:f,name:r.value.surfaceNames[y],description:r.value.surfaceDescriptions[y],findings:m(M),selected:n.selected.includes(M)}}));return(M,y)=>(t.openBlock(),t.createElementBlock("section",{class:"odontogram-surface-guide","aria-label":`${r.value.surfaceGuide}, ${r.value.tooth} ${c.value}`,"data-tooth-id":e.toothId},[t.createElementVNode("p",Sa,t.toDisplayString(r.value.tooth)+" "+t.toDisplayString(i.value),1),(t.openBlock(),t.createElementBlock("svg",{class:"odontogram-surface-guide__diagram",viewBox:"0 0 100 100",fill:"none","aria-hidden":"true",onMouseleave:y[0]||(y[0]=f=>p(void 0))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,f=>(t.openBlock(),t.createElementBlock("path",{key:f.surface,class:t.normalizeClass(["odontogram-surface",{"odontogram-surface--selected":e.selected.includes(f.surface)}]),d:f.d,"stroke-width":d.value.strokeWidth,"data-guide-surface":f.surface,onMouseenter:$=>p(f.surface),onClick:$=>w(f.surface)},null,42,$a))),128)),t.createElementVNode("g",Ea,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,f=>(t.openBlock(),t.createElementBlock("g",{key:f.key,class:t.normalizeClass(["odontogram-finding",[`odontogram-finding--${f.tone}`,`odontogram-finding--${f.status}`]]),style:t.normalizeStyle(f.color?{color:f.color}:void 0),"stroke-width":f.strokeWidth,"data-finding":f.code},[t.createVNode(Rt,{primitives:f.primitives},null,8,["primitives"])],14,Pa))),128))]),C.value?(t.openBlock(),t.createElementBlock("path",{key:0,class:"odontogram-surface-guide__highlight",d:C.value.d,"data-highlight":C.value.surface},null,8,Na)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,f=>(t.openBlock(),t.createElementBlock("text",{key:`letter-${f.surface}`,class:t.normalizeClass(["odontogram-surface-guide__letter",{"odontogram-surface-guide__letter--active":f.surface===g.value}]),x:f.center.x,y:f.center.y,"text-anchor":"middle","dominant-baseline":"central"},t.toDisplayString(f.letter),11,Ia))),128))],32)),e.showList?(t.openBlock(),t.createElementBlock("ul",Va,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(x.value,f=>(t.openBlock(),t.createElementBlock("li",{key:f.surface},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["odontogram-surface-guide__item",{"odontogram-surface-guide__item--active":f.surface===g.value}]),"aria-pressed":f.selected,disabled:e.disabled,"data-guide-item":f.surface,onMouseenter:$=>p(f.surface),onMouseleave:y[1]||(y[1]=$=>p(void 0)),onFocus:$=>p(f.surface),onBlur:y[2]||(y[2]=$=>p(void 0)),onClick:$=>w(f.surface)},[t.createElementVNode("span",Da,t.toDisplayString(f.letter),1),t.createElementVNode("span",Fa,[t.createElementVNode("strong",null,t.toDisplayString(f.name),1),t.createElementVNode("span",null,t.toDisplayString(f.description),1),f.findings.length?(t.openBlock(),t.createElementBlock("span",La,t.toDisplayString(r.value.findings)+": "+t.toDisplayString(f.findings.join(", ")),1)):t.createCommentVNode("",!0)])],42,Ta)]))),128))])):t.createCommentVNode("",!0)],8,Ba))}}),We=["existing","planned","done"],_a=["aria-label","data-tooth-id"],Za={class:"odontogram-inspector__header"},qa={class:"odontogram-inspector__title"},Ra={class:"odontogram-inspector__type"},Ha=["data-state"],Aa={class:"odontogram-inspector__body"},Oa={class:"odontogram-inspector__details"},ja={class:"odontogram-inspector__section"},Qa={class:"odontogram-inspector__heading"},Wa={key:0,class:"odontogram-inspector__list"},Ka=["data-inspector-surface"],Xa={class:"odontogram-inspector__badge","aria-hidden":"true"},Ua={class:"odontogram-inspector__surface-name"},Ga={class:"odontogram-inspector__entries"},Ya=["aria-label","onClick"],Ja={key:1,class:"odontogram-inspector__empty"},va={class:"odontogram-inspector__section"},ts={class:"odontogram-inspector__heading"},es={key:0,class:"odontogram-inspector__list"},os={class:"odontogram-inspector__entry"},ns=["aria-label","onClick"],as={key:1,class:"odontogram-inspector__empty"},ss={class:"odontogram-inspector__heading"},rs={class:"odontogram-inspector__field"},is=["label"],cs=["value"],ls=["label"],ds=["value"],hs={key:0,class:"odontogram-inspector__hint","data-inspector-chosen":""},us={class:"odontogram-inspector__status"},ms=["value"],fs=["disabled"],gs=t.defineComponent({__name:"ToothInspector",props:{toothId:{},findings:{default:()=>[]},findingCatalog:{default:()=>it},toothStates:{default:void 0},labels:{default:void 0},notation:{default:"FDI"},shape:{default:"square"},disabled:{type:Boolean,default:!1},selectedSurfaces:{default:void 0}},emits:["add-finding","remove-finding","update:selectedSurfaces"],setup(e,{emit:o}){var P,N;const n=e,s=o,a=t.computed(()=>_t(n.labels)),r=t.computed(()=>et(n.toothId,n.notation)),i=t.computed(()=>et(n.toothId,n.notation,"text")),c=t.computed(()=>{const E=Jt(n.toothId);return a.value.toothTypes[E]??E}),d=t.computed(()=>qt(n.toothStates,n.toothId)),h=t.computed(()=>Zt.has(d.value)),u=t.computed(()=>ft(n.toothId,n.findings,n.findingCatalog)),m=t.computed(()=>A.filter(E=>u.value.surfaces[E].length).map(E=>{const V=ot(E,n.toothId);return{surface:E,name:a.value.surfaceNames[V],letter:a.value.surfaceLetters[V],entries:u.value.surfaces[E]}}));function l({finding:E,definition:V}){const T=E.status??"existing",H=(V==null?void 0:V.name)??E.code;return T==="existing"?H:`${H} (${a.value.findingStatuses[T]})`}function g({scope:E,finding:V}){return(E==="tooth"||E==="unknown")&&V.teeth.includes(n.toothId)}const p=t.computed(()=>{const E=Object.entries(n.findingCatalog).map(([V,T])=>({code:V,name:T.name,scope:nt(T.symbol)}));return{surface:E.filter(({scope:V})=>V==="surface"),tooth:E.filter(({scope:V})=>V==="tooth")}}),w=t.ref(((P=p.value.surface[0])==null?void 0:P.code)??((N=p.value.tooth[0])==null?void 0:N.code)??""),b=t.ref("existing"),C=t.ref([]),x=t.computed({get:()=>n.selectedSurfaces??C.value,set:E=>{C.value=E,s("update:selectedSurfaces",E)}});t.watch(()=>n.toothId,()=>{C.value=[]});const M=t.computed(()=>p.value.surface.some(E=>E.code===w.value)),y=t.computed(()=>!n.disabled&&!!w.value&&(!M.value||x.value.length>0&&!h.value));function f(E){x.value=x.value.includes(E)?x.value.filter(V=>V!==E):A.filter(V=>V===E||x.value.includes(V))}function $(){y.value&&(s("add-finding",{code:w.value,toothId:n.toothId,...M.value?{surfaces:[...x.value]}:{},...b.value==="existing"?{}:{status:b.value}}),x.value=[])}function F(E,V){n.disabled||s("remove-finding",{index:E.index,toothId:n.toothId,...V?{surface:V}:{}})}return(E,V)=>(t.openBlock(),t.createElementBlock("section",{class:"odontogram-inspector","aria-label":`${a.value.inspector.title}, ${a.value.tooth} ${i.value}`,"data-tooth-id":e.toothId},[t.createElementVNode("div",Za,[t.createElementVNode("strong",qa,t.toDisplayString(a.value.tooth)+" "+t.toDisplayString(r.value),1),t.createElementVNode("span",Ra,t.toDisplayString(c.value),1),d.value!=="present"?(t.openBlock(),t.createElementBlock("span",{key:0,class:"odontogram-inspector__state","data-state":d.value},t.toDisplayString(a.value.states[d.value]),9,Ha)):t.createCommentVNode("",!0)]),t.createElementVNode("div",Aa,[t.createVNode(Qe,{class:"odontogram-inspector__guide","tooth-id":e.toothId,findings:e.findings,"finding-catalog":e.findingCatalog,selected:x.value,labels:e.labels,notation:e.notation,shape:e.shape,disabled:e.disabled||h.value,"show-list":!1,onSurfaceClick:f},null,8,["tooth-id","findings","finding-catalog","selected","labels","notation","shape","disabled"]),t.createElementVNode("div",Oa,[t.createElementVNode("div",ja,[t.createElementVNode("p",Qa,t.toDisplayString(a.value.inspector.surfaceFindings),1),m.value.length?(t.openBlock(),t.createElementBlock("ul",Wa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,T=>(t.openBlock(),t.createElementBlock("li",{key:T.surface,"data-inspector-surface":T.surface},[t.createElementVNode("span",Xa,t.toDisplayString(T.letter),1),t.createElementVNode("span",Ua,t.toDisplayString(T.name),1),t.createElementVNode("span",Ga,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.entries,H=>(t.openBlock(),t.createElementBlock("span",{key:H.index,class:"odontogram-inspector__entry"},[t.createTextVNode(t.toDisplayString(l(H))+" ",1),e.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"odontogram-inspector__remove","aria-label":`${a.value.inspector.remove}: ${l(H)}, ${T.name}`,onClick:q=>F(H,T.surface)}," × ",8,Ya))]))),128))])],8,Ka))),128))])):(t.openBlock(),t.createElementBlock("p",Ja,t.toDisplayString(a.value.inspector.noFindings),1))]),t.createElementVNode("div",va,[t.createElementVNode("p",ts,t.toDisplayString(a.value.inspector.toothFindings),1),u.value.tooth.length?(t.openBlock(),t.createElementBlock("ul",es,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value.tooth,T=>(t.openBlock(),t.createElementBlock("li",{key:T.index,"data-inspector-tooth-finding":""},[t.createElementVNode("span",os,[t.createTextVNode(t.toDisplayString(l(T))+" ",1),!e.disabled&&g(T)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"odontogram-inspector__remove","aria-label":`${a.value.inspector.remove}: ${l(T)}`,onClick:H=>F(T)}," × ",8,ns)):t.createCommentVNode("",!0)])]))),128))])):(t.openBlock(),t.createElementBlock("p",as,t.toDisplayString(a.value.inspector.noFindings),1))]),e.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("form",{key:0,class:"odontogram-inspector__section odontogram-inspector__form",onSubmit:t.withModifiers($,["prevent"])},[t.createElementVNode("p",ss,t.toDisplayString(a.value.inspector.addFinding),1),t.createElementVNode("label",rs,[t.createTextVNode(t.toDisplayString(a.value.inspector.finding)+" ",1),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":V[0]||(V[0]=T=>w.value=T),name:"finding"},[p.value.surface.length?(t.openBlock(),t.createElementBlock("optgroup",{key:0,label:a.value.inspector.onSurfaces},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value.surface,T=>(t.openBlock(),t.createElementBlock("option",{key:T.code,value:T.code},t.toDisplayString(T.name),9,cs))),128))],8,is)):t.createCommentVNode("",!0),p.value.tooth.length?(t.openBlock(),t.createElementBlock("optgroup",{key:1,label:a.value.inspector.onTooth},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value.tooth,T=>(t.openBlock(),t.createElementBlock("option",{key:T.code,value:T.code},t.toDisplayString(T.name),9,ds))),128))],8,ls)):t.createCommentVNode("",!0)],512),[[t.vModelSelect,w.value]])]),M.value?(t.openBlock(),t.createElementBlock("p",hs,[x.value.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(x.value.map(T=>a.value.surfaceNames[t.unref(ot)(T,e.toothId)]).join(", ")),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(a.value.inspector.chooseSurfaces),1)],64))])):t.createCommentVNode("",!0),t.createElementVNode("fieldset",us,[t.createElementVNode("legend",null,t.toDisplayString(a.value.inspector.status),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(We),T=>(t.openBlock(),t.createElementBlock("label",{key:T},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":V[1]||(V[1]=H=>b.value=H),type:"radio",name:"status",value:T},null,8,ms),[[t.vModelRadio,b.value]]),t.createTextVNode(" "+t.toDisplayString(a.value.findingStatuses[T]),1)]))),128))]),t.createElementVNode("button",{type:"submit",class:"odontogram-inspector__add",disabled:!y.value},t.toDisplayString(a.value.inspector.add),9,fs)],32))])])],8,_a))}});D.Odontogram=Ma,D.SurfaceGuide=Qe,D.Tooth=je,D.ToothInspector=gs,D.addFinding=Nn,D.addSurfaceFinding=Oe,D.buildToothId=Yt,D.defaultOdontogramLabels=J,D.findingStatuses=We,D.formatToothNumber=et,D.getFindingScope=nt,D.getLayoutViewBox=de,D.getPalmerQuadrant=It,D.getQuadrant=yo,D.getSurfaceName=ot,D.getToothAnchors=le,D.getToothRecord=ft,D.getToothType=Jt,D.ntsPeruFindingCatalog=it,D.removeSurfaceFinding=In,D.resolveFindingTone=ze,D.surfaceShapeKinds=Ao,D.toggleSurface=Se,D.toothStates=qe,D.toothSurfaces=A,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@kmanueldc/vue-odontogram",
3
+ "version": "0.1.1",
4
+ "description": "Vue 3 dental chart component library",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/vue-odontogram.umd.cjs",
8
+ "module": "./dist/vue-odontogram.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/vue-odontogram.js",
14
+ "require": "./dist/vue-odontogram.umd.cjs"
15
+ },
16
+ "./style.css": "./dist/vue-odontogram.css"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "THIRD_PARTY_NOTICES.md"
21
+ ],
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "npm run typecheck && vite build && vue-tsc -p tsconfig.publish.json --emitDeclarationOnly",
25
+ "typecheck": "vue-tsc --noEmit",
26
+ "test": "vitest run --config vite.config.ts --dir tests",
27
+ "dev:playground": "vite --config playground/vite.config.ts",
28
+ "build:playground": "vite build --config playground/vite.config.ts"
29
+ },
30
+ "peerDependencies": {
31
+ "vue": "^3.5.0"
32
+ },
33
+ "devDependencies": {
34
+ "@vitejs/plugin-vue": "^5.2.3",
35
+ "@vue/test-utils": "^2.5.1",
36
+ "jsdom": "^30.1.0",
37
+ "typescript": "^5.7.3",
38
+ "vite": "^6.2.0",
39
+ "vitest": "^3.0.9",
40
+ "vue": "^3.5.13",
41
+ "vue-tsc": "^2.2.0"
42
+ },
43
+ "author": "Manuel Díaz Calua",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/kmanuelDC/vue-odontogram.git"
47
+ },
48
+ "homepage": "https://github.com/kmanuelDC/vue-odontogram#readme",
49
+ "bugs": {
50
+ "url": "https://github.com/kmanuelDC/vue-odontogram/issues"
51
+ }
52
+ }