@mediquo/elements 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +7 -18
  2. package/dist/chunks/api-chat-client-Dx-sFrf2.js +1 -0
  3. package/dist/chunks/{apple-pay-outcomes-SIvDJWN_.js → apple-pay-outcomes--uAwZeLE.js} +1 -1
  4. package/dist/chunks/appointment-details-BM8peAHH.js +1 -0
  5. package/dist/chunks/{appointment-details-CVEDe_k0.d.ts → appointment-details-KL9fK6vG.d.ts} +1 -2
  6. package/dist/chunks/ca_ES-DYhnenv6.js +1 -0
  7. package/dist/chunks/checkout-bridge-BFpVxNww.js +1 -0
  8. package/dist/chunks/{chunk-Y4EKUX25-Bix9r5ry.js → chunk-Y4EKUX25-Bdei04iw.js} +1 -1
  9. package/dist/chunks/{chunk-YTQUGGS3-DH0H7ld7.js → chunk-YTQUGGS3-sBILRfPo.js} +1 -1
  10. package/dist/chunks/de_DE-Dw0iVZNb.js +1 -0
  11. package/dist/chunks/{documentation-view-BSt0gtCR.js → documentation-view-BcA4Vbhp.js} +1 -1
  12. package/dist/chunks/en_US-DONnbI9l.js +1 -0
  13. package/dist/chunks/{external-JLtsAfi6.js → external-cM_kgYO_.js} +1 -1
  14. package/dist/chunks/{index-CUirgiWh.d.ts → index-BEPyJrJL.d.ts} +1 -1
  15. package/dist/chunks/{index-B3rs7SlM.d.ts → index-BKjqWyIs.d.ts} +1 -1
  16. package/dist/chunks/{index-B6OMnYjW.js → index-CGWd3FWG.js} +1 -1
  17. package/dist/chunks/index-Djkwyh_M.js +1 -0
  18. package/dist/chunks/{index-CCWMMqiq.js → index-Dw4Aeoyg.js} +1 -1
  19. package/dist/chunks/{appointment.model.d-BWwBLaEL.d.ts → index-DwlJg2um.d.ts} +13 -0
  20. package/dist/chunks/{index-D2yqKnpP.js → index-VQqG1eyA.js} +1 -1
  21. package/dist/chunks/{index-DFaKhE7Q.d.ts → index-fut7tm1R.d.ts} +1 -1
  22. package/dist/chunks/{index.d-ByhRBSb1.d.ts → index.d-DHMNq1lu.d.ts} +2 -7
  23. package/dist/chunks/{login-token-task-Yib__6a9.js → login-token-task-NQJ77O_q.js} +1 -1
  24. package/dist/chunks/mq-chat-room-BkXGHzrd.js +1 -0
  25. package/dist/chunks/{mq-chat-room-C8wCADp2.d.ts → mq-chat-room-C0dJCvpV.d.ts} +2 -2
  26. package/dist/chunks/{mq-next-appointments-CbjNpG1H.js → mq-next-appointments-BngkXupq.js} +1 -1
  27. package/dist/chunks/{mq-recent-documents-DNqh_8J0.js → mq-recent-documents-Ee-JRTdl.js} +1 -1
  28. package/dist/chunks/mq-schedule-DAKftQ3D.js +1 -0
  29. package/dist/chunks/{mq-support-chat-tdev5LC-.js → mq-support-chat-Bzj5LYHb.js} +1 -1
  30. package/dist/chunks/{mq-videocall-CwYtlPu6.js → mq-videocall-Cp7LSoDs.js} +1 -1
  31. package/dist/chunks/{next-appointment-card-DLU7-wIv.js → next-appointment-card-BE0KW2vv.js} +1 -1
  32. package/dist/chunks/{next-appointment-card-CPg9FuOI.d.ts → next-appointment-card-Z5G1jqtz.d.ts} +4 -4
  33. package/dist/chunks/professional-overview-Ck_SPivX.js +1 -0
  34. package/dist/chunks/{professional-overview-mO3tuMuH.d.ts → professional-overview-QVHl_ITk.d.ts} +1 -0
  35. package/dist/chunks/pt_PT-dELUeDqB.js +1 -0
  36. package/dist/chunks/task-CqjSKFwZ.js +1 -0
  37. package/dist/chunks/{telemetry-client-K37KMdy_.js → telemetry-client-DA2_SZBC.js} +1 -1
  38. package/dist/env.js +1 -1
  39. package/dist/events.d.ts +1 -22
  40. package/dist/events.js +1 -1
  41. package/dist/i18n.js +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/mq-api-client-provider.d.ts +1 -1
  45. package/dist/mq-api-client-provider.js +1 -1
  46. package/dist/mq-apple-pay-checkout.d.ts +1 -1
  47. package/dist/mq-apple-pay-checkout.js +1 -1
  48. package/dist/mq-appointment-checkout.d.ts +20 -14
  49. package/dist/mq-appointment-checkout.js +1 -1
  50. package/dist/mq-appointment-documentation.d.ts +4 -4
  51. package/dist/mq-appointment-documentation.js +1 -1
  52. package/dist/mq-chat-room.d.ts +3 -3
  53. package/dist/mq-chat-room.js +1 -1
  54. package/dist/mq-checkout.d.ts +44 -61
  55. package/dist/mq-checkout.js +1 -1
  56. package/dist/mq-dashboard.d.ts +6 -6
  57. package/dist/mq-dashboard.js +1 -1
  58. package/dist/mq-documents.d.ts +2 -2
  59. package/dist/mq-documents.js +1 -1
  60. package/dist/mq-google-pay-checkout.d.ts +1 -1
  61. package/dist/mq-google-pay-checkout.js +1 -1
  62. package/dist/mq-immediate-videocall-checkout.d.ts +10 -9
  63. package/dist/mq-immediate-videocall-checkout.js +1 -1
  64. package/dist/mq-my-appointments.d.ts +6 -6
  65. package/dist/mq-my-appointments.js +1 -1
  66. package/dist/mq-next-appointments.d.ts +5 -5
  67. package/dist/mq-next-appointments.js +1 -1
  68. package/dist/mq-payment-poller.d.ts +2 -2
  69. package/dist/mq-payment-poller.js +1 -1
  70. package/dist/mq-professional-presence-sync.js +1 -1
  71. package/dist/mq-recent-documents.d.ts +2 -2
  72. package/dist/mq-recent-documents.js +1 -1
  73. package/dist/mq-schedule-success.d.ts +5 -5
  74. package/dist/mq-schedule-success.js +2 -2
  75. package/dist/mq-schedule.d.ts +52 -98
  76. package/dist/mq-schedule.js +1 -1
  77. package/dist/mq-socket-provider.js +1 -1
  78. package/dist/mq-support-chat.d.ts +3 -3
  79. package/dist/mq-support-chat.js +1 -1
  80. package/dist/mq-terms-and-conditions.d.ts +2 -2
  81. package/dist/mq-terms-and-conditions.js +1 -1
  82. package/dist/mq-unread-count-sync.js +1 -1
  83. package/dist/mq-videocall.d.ts +5 -5
  84. package/dist/mq-videocall.js +1 -1
  85. package/dist/react/mq-api-client-provider.d.ts +1 -1
  86. package/dist/react/mq-api-client-provider.js +1 -1
  87. package/dist/react/mq-apple-pay-checkout.d.ts +1 -1
  88. package/dist/react/mq-apple-pay-checkout.js +1 -1
  89. package/dist/react/mq-appointment-checkout.d.ts +12 -8
  90. package/dist/react/mq-appointment-checkout.js +1 -1
  91. package/dist/react/mq-appointment-documentation.d.ts +4 -4
  92. package/dist/react/mq-appointment-documentation.js +1 -1
  93. package/dist/react/mq-chat-room.d.ts +3 -3
  94. package/dist/react/mq-chat-room.js +1 -1
  95. package/dist/react/mq-checkout.d.ts +11 -8
  96. package/dist/react/mq-checkout.js +1 -1
  97. package/dist/react/mq-dashboard.d.ts +6 -6
  98. package/dist/react/mq-dashboard.js +1 -1
  99. package/dist/react/mq-documents-page.d.ts +2 -2
  100. package/dist/react/mq-documents-page.js +1 -1
  101. package/dist/react/mq-documents.d.ts +2 -2
  102. package/dist/react/mq-documents.js +1 -1
  103. package/dist/react/mq-google-pay-checkout.d.ts +1 -1
  104. package/dist/react/mq-google-pay-checkout.js +1 -1
  105. package/dist/react/mq-immediate-videocall-checkout.d.ts +4 -2
  106. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  107. package/dist/react/mq-my-appointments.d.ts +6 -6
  108. package/dist/react/mq-my-appointments.js +1 -1
  109. package/dist/react/mq-next-appointments.d.ts +5 -5
  110. package/dist/react/mq-next-appointments.js +1 -1
  111. package/dist/react/mq-payment-poller.d.ts +1 -1
  112. package/dist/react/mq-payment-poller.js +1 -1
  113. package/dist/react/mq-professional-presence-sync.js +1 -1
  114. package/dist/react/mq-recent-documents.d.ts +2 -2
  115. package/dist/react/mq-recent-documents.js +1 -1
  116. package/dist/react/mq-schedule-success.d.ts +5 -5
  117. package/dist/react/mq-schedule-success.js +1 -1
  118. package/dist/react/mq-schedule.d.ts +4 -14
  119. package/dist/react/mq-schedule.js +1 -1
  120. package/dist/react/mq-socket-provider.js +1 -1
  121. package/dist/react/mq-support-chat.d.ts +3 -3
  122. package/dist/react/mq-support-chat.js +1 -1
  123. package/dist/react/mq-terms-and-conditions.d.ts +2 -2
  124. package/dist/react/mq-terms-and-conditions.js +1 -1
  125. package/dist/react/mq-unread-count-sync.js +1 -1
  126. package/dist/react/mq-videocall.d.ts +5 -5
  127. package/dist/react/mq-videocall.js +1 -1
  128. package/dist/ui/mq-calendar.js +1 -1
  129. package/dist/ui/mq-tabs.js +49 -22
  130. package/package.json +1 -1
  131. package/dist/chunks/api-chat-client-s45J7LKB.js +0 -1
  132. package/dist/chunks/appointment-details-BYGwLfww.js +0 -1
  133. package/dist/chunks/ca_ES-BOvS9ayb.js +0 -1
  134. package/dist/chunks/de_DE-B-4V4SgD.js +0 -1
  135. package/dist/chunks/en_US-CgxjeeCm.js +0 -1
  136. package/dist/chunks/mq-chat-room-B_WgeuXn.js +0 -1
  137. package/dist/chunks/mq-schedule-BfW7y8uG.js +0 -1
  138. package/dist/chunks/professional-overview-B4E05rLd.js +0 -1
  139. package/dist/chunks/pt_PT-Vb6hoo2l.js +0 -1
  140. package/dist/chunks/task-Bj8p7kJX.js +0 -1
@@ -1 +0,0 @@
1
- import{s as e}from"./runtime-Bg1WXVCx.js";const n={s0043fc30b467bc43:"Details ausblenden",s00c8bf60a179e056:"Google Pay ist nicht verfügbar. Versuche es mit Karte oder einer anderen Zahlungsmethode.",s035706a468d0c40b:"Freitag",s0520ac0a7da193d4:"Wir konnten den Code nicht überprüfen. Bitte versuchen Sie es erneut.",s071bd6bbf6c08f34:"Laden",s08404262212123ef:"Wie kann ich dir helfen?",s08fe5307b5987c42:"De",s08fe5907b5988674:"Do",s09165307b5ad0e23:"Mi",s09165b07b5ad1bbb:"Ma",s09195307b5af43fa:"Lu",s092e4f07b5c19938:"Ju",s093b3307b5cbf400:"Vi",s09462f07b5d5f4b9:"Sa",s09528d5c26b62213:"Donnerstag",s0aaec824f7c6b501:"Nachricht senden",s0b0085a15991b134:"Wiederherstellen...",s0b0955208f737a86:"Die Datei überschreitet die maximale Größe",s0eb69642cbc19745:"Dieser Termin liegt bereits in der Vergangenheit und kann daher nicht mehr geändert werden.",s0fc7c4bfd185800d:"Hier werden Ihre Rezepte und Arztberichte angezeigt.",s0fcbdef9dc977231:"Ein Fehler ist beim Laden der Seite aufgetreten. Bitte versuchen Sie es erneut oder kontaktieren Sie den Support.",s11605fc03de64e14:"Schreiben Sie hier...",s12f171594a5379d2:"Sind Sie sicher, dass Sie diese Behandlung stornieren möchten?",s132e84f499a23985:"Keine Zeitpläne verfügbar",s13317a76a9ed776e:"Wiederholen",s142eba34d93fe59e:"Beschreibung",s1513f3687bfcac96:"Sonntag",s1a0efa6ac51e8a85:"Vorherige Seite",s1a874fc38d0fcef0:"Ärztliche Verordnung",s1d318e9d0ccba86b:"Chat",s1ee6d7e6d04932a4:"Die E-Mail ist nicht gültig",s1fe8bb7f6ae07f9b:"Sie haben keine Behandlungen in Ihrer Chronik",s219b833c5ca095b3:"Hier sehen Sie alle Behandlungen, auf die Sie zugegriffen haben. Sie können auf die Dokumente jeder Behandlung zugreifen und eine Behandlung neu planen, wenn dies erforderlich ist.",s22cf91a84fba4c4e:"Wenn Sie eine Behandlung planen, erscheint hier, um Sie zu konsultieren, zu ändern oder zu stornieren.",s238c3ed6d3ecc66a:"Schließen",s24b59d5a129dc0d0:"Der Termin konnte nicht storniert werden. Bitte versuche es erneut.",s255bf4de23c83482:"Bedingungen der Buchung:",s256189bafbcd2e34:"Die Telefonnummer ist nicht gültig",s27e462e9f48eb3a6:"Dokumentation",s2a1d212b3cb5c1a1:"Sie können mit Ihrem Experten bis 48 Stunden nach der Behandlung chatten",s2aa2c19d07591438:"Sie erhalten 15 Minuten vor der Behandlung eine Erinnerung",s2aab27b26a86469f:"Behandlungsmotive",s2b9fde9a5739d2a0:"Vorname",s2bb20b2162a18938:"Warum benötigen Sie die Behandlung?",s2d6183fa992e10e9:"Dieser Experte hat keine verfügbaren Termine",s2ebd846b5a30f9d1:"Es tut uns leid, wir konnten Ihre Behandlung nicht wiederholen. Bitte wenden Sie sich an den Support.",s30c9095a2e07d929:"Wartezimmer",s31219c9bdeb7bc3e:"Weiter",s337e34cd11150eb6:"Meine Behandlungen anzeigen",s346d488070fe4cc8:"Behandlung anfragen",s3944638e633d719a:"Konsultation",s3b77baf6a4864231:"Unbekannter Fehler",s3bd87e3e21b07900:"Warten Sie, während die Verbindung wiederhergestellt wird",s3dc6584e403858df:"Wir konnten Ihre Dokumente nicht laden",s3f55bc3bfec41a5d:"Datei anhängen",s4177fe7f5d70fd33:"Zurück",s41826ac201c3cd85:"Der Chat mit Support konnte nicht geöffnet werden",s4364d4be7641e15f:"Termin bestätigen",s43e5edcc8801e9a4:"Professioneller Profil",s47afb8f6895a937b:e`Die Nachfrage nach Terminen in ${0} ist derzeit hoch, daher kann es zu längeren Wartezeiten als üblich kommen.`,s4813ee5d305442e5:"Es scheint, dass wir Sie zu der Zeit nicht gefunden haben, zu der Sie Ihre Behandlung haben. Sie können eine andere Behandlung planen, um Ihre Fragen zu beantworten.",s49683919cdaeca83:"Heute",s4a061033615c8016:"Dokumente",s4a8494821c987a17:"Bericht",s4a8f1fcd3f5e5952:"Es ist noch nicht die Zeit!",s4d20157b5a655e70:"Dieser Zeitplan ist nicht verfügbar. Bitte wählen Sie einen anderen.",s4de424f531892818:"Zu Videocall gehen",s51c461d40f9fb865:"Wählen Sie Ihren Experten",s536a0b4d3d4a5d9f:"Wir konnten Ihre nächste Behandlung nicht laden",s53d957dda6cc200b:"Service und Plattform von",s53e2497bf900c7fd:"Sie haben keine nächsten Behandlungen",s5558a2e389d04223:"Ändern",s55c5126e99bae190:"Verfügbarkeit suchen",s563dcbfd432eb18f:"Behandlung stornieren",s57e65113a89160cf:"Behandlungsmode",s59612eaa6993aa7e:e`${0} Minuten`,s5eef402d73eecbdc:"Datei anhängen",s5f7956aacb5c6ca2:"Google Pay wird geprüft…",s5f817b8841b188d2:"Weitere Optionen",s631f73a10d156b22:"Behandlung abgelaufen",s63f7af84683dd7c3:"Diese Behandlung kann nicht geändert oder storniert werden: Es ist nicht genügend Zeit vor dem Beginn verbleiben.",s643155d1b6ee1684:"Versuchen Sie es in einigen Minuten erneut.",s64b78a5026d4ce8d:"Keine Zeitpläne verfügbar",s65bedc0e516977d9:"Samstag",s679be6312356a21c:"Planen Sie eine medizinische Behandlung, wenn Sie sie benötigen. Hier sehen Sie alle Details und können Ihre nächsten Behandlungen verwalten.",s67f30f9f4ea881f3:"Dieser Code ist ungültig.",s6a50fd7f52263b04:"Rückkehr ins Wartezimmer nicht möglich",s6ab6fcd87fdbf217:"Hallo",s6b1c4fb634461e7c:"Vorheriger Monat",s6b6fa877ec1e6968:"Mit dem Experten chatten",s6c81d42670932f93:"Aktualisieren",s6e2423db05f36856:"Behandlungsanfrage",s6ecdc22accc55af7:"Videoanruf",s70258a0040dd9e19:"Zurück zum Wartezimmer",s718177442a7447b2:"Behandlung mit einem Experten in weniger als 72 Stunden",s733b3bf647b7b0fa:"Akzeptieren Sie die Berechtigungen für Kamera und Mikrofon",s73cad78d8a3c39c2:"Rezept",s74d7a739b6ab651d:"Chronik",s757fef148e0c94c6:"Verfügbarkeit",s77320b73fdd9cc40:"Verlassen",s775370fdb0af1546:"Geburtsdatum",s77c2b712a9813175:"Neue Behandlung anfragen",s77f8e4bee88d44aa:e`${0} von ${1}`,s7907902da8916212:"Der Experte wird Ihnen eine Nachricht senden, um die Behandlung zu koordinieren. Stellen Sie sicher, dass Sie eine gute Mobilfunkabdeckung haben und in dem ausgewählten Zeitplan antreten können.",s7aa3cd94d51825fc:"Es gibt keine professionellen für die ausgewählte Spezialität verfügbar. Bitte versuchen Sie es erneut oder wählen Sie eine andere Spezialität.",s7af26e861bb6f905:"Google Pay-Gateway-Händlerkennung fehlt",s7fd8da9511b66dd4:"Sie können Bilder oder zusätzliche Dokumentation (Analysen, Testresultate, etc.) für den Arzt hochladen",s83c6ce869a2bbaa7:"(1 ist sehr schlecht, 5 ist ausgezeichnet)",s8447efe79d058943:"Bezahlter Betrag",s8581adc786786298:"Dateiformat nicht unterstützt",s862ca980b16911d0:"Mit dem Experten chatten",s8c18dbf02590a72e:"Aktionscode angewendet",s8cce15c931017937:"Zurück zur Startseite",s8e7a6119525dc7c9:e`Leider können wir Ihren Termin nicht ändern, da bis dahin weniger als ${0} Minuten verbleiben.`,s9005845c358db9da:"Wir konnten das Dokument nicht herunterladen.",s92f34d487d1d0355:"Aktion",s94626d2ffd70f075:"Aktionscode erfolgreich angewendet",s9536695467bcf9c4:"Dieser Termin liegt bereits in der Vergangenheit und kann daher nicht mehr storniert werden.",s96474eac63a69381:"Zum Chat gehen",s96ceb408923a7ab1:e`Nr. KOL. ${0}`,s979ee14368bf1505:"Chatte mit mir",s9802dd10b2c2f760:"Senden",s99898f495319cd49:"Dieser Nachricht wurde gelöscht",s9c309154722f8e06:"Laden des Zahlungsportals",s9cabdaf42f04afee:"Code eingeben",s9cbf16425cadadb1:"Bitte versuchen Sie es erneut später.",s9d22fa67943fdc4c:"Telefonische Behandlung",sa00e726e1e7e46a9:"Aktionscode hinzufügen",sa27f38ad9db3bc4f:"Kommerzialberater",sa2fe3f3b565f15f4:"Stornieren",sa4186d5e26cab4bb:"Seite nicht gefunden",sa497ebaaeb251035:"Behandlung wiederholen",sa7de4334479674c6:"Behandlung ändern",sa82bc40dafbe3256:e`Behandlung geplant für ${0}`,sa83d79734eb60ee3:"Anwenden",sa86d729f62b39f99:"Am Videoanruf teilnehmen",sa87d2c48a52b2617:"Sie haben keine Dokumentation",sab964c37a0934399:"Google Pay konnte nicht geladen werden. Überprüfe die Website-Konfiguration und versuche es erneut.",sac2728ace11e5f4b:"Spezialität*",sadc5ede25dd6e126:"Der Experte wird Ihnen eine Nachricht senden, um die Behandlung zu koordinieren. Stellen Sie sicher, dass Sie eine gute Mobilfunkabdeckung haben und in dem ausgewählten Zeitplan antreten können.",sae8f7ac5552b2af1:"Wenn es 10 Minuten bis zur Behandlung gibt, können Sie auf die Videokonferenz zugreifen",saf63dc4c8601ec8c:"a",safe333e385f371ff:"Überprüfen Sie Ihre Zahlung...",saff3019e8a8c5f98:"Montag",sb01184796ad3832e:"Wie war dein Termin?",sb410a3509b92a90c:"Hast du Anmerkungen zum Termin?",sb49dc4c5edae9d4e:"Bewertung der Konsultation",sb5387e21dc21422b:"Behandlung geändert",sb621415007181c43:"Nächster Monat",sb73394814d122852:"Wenn Ihr Arzt irgendeine Dokumentation generiert hat, können Sie sie hier sehen und herunterladen, von der Dokumentation-Sektion, Ihrer E-Mail oder dem Chat.",sb882f28c9b20052e:"Behandlung bestätigt",sba98cf8b2a7dfca4:"Gestern",sbbee712c4900abc2:"Wir konnten den Zahlungsvorgang nicht starten",sbc0be90393c87447:e`Zusammenfassung der Behandlung für ${0}`,sbcf081de432a2172:"Details anzeigen",sbcfc05bdb868b383:"Rezept",sbd07d1f779e482ae:"Wir konnten Ihre Zahlung nicht bestätigen",sbd9803cceb34513a:"Chat mit Kommerzialberater starten",sbda1cf7b293e17d2:"Datei hochladen",sc27e7c4850fc5a34:e`Leider können wir Ihren Termin nicht stornieren, da bis dahin weniger als ${0} Stunden verbleiben.`,sc3bb7ea72886e4d0:"Neueste Dokumente",sc3c7734c15d2a045:"Erzähl uns, wie die Betreuung war oder ob es Probleme mit dem Videocall gab…",sc43929cc6582a185:"Vollständiges Kalender anzeigen",sc4edf6a4e0157d4e:"Nächste Behandlungen",sc6f816a96e8578ff:"Dieser Termin kann leider nicht mehr storniert werden.",sc7cf2be40c8614fa:e`Leider können wir Ihren Termin nicht stornieren, da bis dahin weniger als ${0} Minuten verbleiben.`,sca0e87aae6bde276:"Gab es ein Problem?",sca4bd395e3148194:"Behandlung stornieren bestätigen",sca90bc30758f9082:"Die von Ihnen gesuchte Seite wurde entfernt, umbenannt oder könnte nicht existieren.",scbe4c6673872bda5:"Telefon",sce29e337ebd75277:"Chat mit Support",scf469737e1670fd4:"Nächste Seite",scfc7f5c5f41936dc:"Meine Behandlungen",sd1f44f1a8bc20e67:"E-Mail",sd24922a2783f286e:"Mittwoch",sd2a8fc66c53c1a27:"Überspringen",sd3f7579076c6611c:"Es scheint, dass Sie die erforderlichen Berechtigungen für den Videocall abgelehnt haben. Bearbeiten Sie die Berechtigungen in Ihrem Browser, um einzutreten. Sobald sie erteilt sind, müssen Sie diese Seite aktualisieren.",sd4beaeb9a1b1fed5:"Vorherige Daten",sd812eb30f385776d:"Füllen Sie Ihr Profil aus",sd853d3bcf5341b59:"Mehr anzeigen",sda962b28e9110c82:"Suchen Sie in Ihrem medizinischen Digitalprofil",sdb7004e477873574:"Behandlung storniert",sdd963b1b2ce9a1f5:e`Der Experte wird Ihnen unter ${0} am ausgewählten Zeitplan anrufen. Stellen Sie sicher, dass Sie eine gute Mobilfunkabdeckung haben und in dem ausgewählten Zeitplan antreten können.`,sde993da26c048f19:"Traumatologie, Gynäkologie, Endokrinologie, Verdauungssystem oder Psychiatrie",sdee32ae81ca0d6d8:"Zu Kalender hinzufügen",se00b081edccfae39:"Nächste Daten",se07ea9607704c5ad:"Code ändern",se090f7226b372a4a:"Wenn der Termin nicht stattfinden konnte, kannst du",se0c7cc77f86aa8a0:"Nachname",se17f2b402ecea2e1:"Zurückzugebender Betrag",se18fa3ef98e155de:"Google Pay wird vorbereitet…",se1cce5af3e9bb6ee:"Es ist ein Fehler aufgetreten, während der Datei hochgeladen wurde",se1cf783f86c53031:"Dienstag",se45e6f6f3428ad50:e`Link zur Behandlung: ${0}`,se5a09223256f98db:"Dieses Feld ist erforderlich",se5f9264155b99909:"Es ist ein Problem aufgetreten, während der Zahlungszustand überprüft wurde. Bitte kontaktieren Sie den Support, wenn die Gebühr erstattet wurde.",se92e438da4e7099f:e`Leider können wir Ihren Termin nicht ändern, da bis dahin weniger als ${0} Stunden verbleiben.`,sea11fd8a12559bc5:"Vorherige Behandlung:",seb6739450e8d9c8d:"Sind Sie sicher, dass Sie diese Behandlung stornieren möchten? Sie erhalten den bezahlten Betrag innerhalb von 5-10 Werktagen zurück.",seb850e89f9ff58e8:"Nächste Behandlung",sed750da423170d47:"Ergebnisse für:",sed836a96c3b5d523:"Zahlungsportal",sed8ec5e3c64fa25d:"Gesamt",sed97e90642983578:"Zur Zahlung fortfahren",sedb2092dda465ea1:"DNI/NIE",sedbca9676f07a51f:"Behandlungsmode*",see7c0a7b5b6ebbc5:"Verwenden Sie den Chat, um das Behandlungsmotive, Dokumente oder Bilder zu senden",sefc0dd68776c9466:"Fragebogen vor der Behandlung",sf0638d3fc50964d2:"Andere Datum wählen",sf0695a0a125ae748:"Bestätigen",sf09d5e51b63f2b7d:"Mit Google Pay bezahlen",sf199b210440b7c5f:"Behandlung abgeschlossen",sf3457daf057bff15:"ins Wartezimmer zurückkehren.",sf484a0e20a7829ac:"Wir senden Ihnen eine E-Mail, wenn es Zeit ist, sich für die Videocall zu verbinden. Stellen Sie sicher, dass Sie eine gute Internetverbindung und ein Gerät mit Kamera und Mikrofon haben.",sf48d12e7ae207023:"Spezialität",sf5258cfb2fa10bdc:"Warten Sie auf Ihre Behandlung, ohne dieses Fenster zu verlassen",sf63a72ff4116c6a9:"Dokument herunterladen",sf9705e1c4e82c017:"Fragebogen konnte nicht gesendet werden",sfa6bc28a7faedc92:"Neue Digital-Spezialitäten-Behandlung",sfac5734d03595135:"Alle ansehen",sfc63af0362cfb78b:"Google Pay-Händlerkennung fehlt",sfd51ca4e1b145054:"Es konnte dieser Zeitplan nicht reserviert werden. Bitte wählen Sie einen anderen.",sff337500b69abf7f:"Der Arzt beendet Ihre Behandlung. Aktualisieren Sie in einigen Minuten, um zu sehen, ob Sie Dokumentation haben.",sffbc330c8a19f838:"Weniger anzeigen",sc6a6d42245892254:"Falta el identificador de comercio de Apple Pay",s3da77e69fe62cb2a:"No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.",se1dd5d211b5b00e4:"Apple Pay no está disponible",s7e8b7a5acbdf83ed:"Preparando Apple Pay…",sc8271ba819299b59:"Comprobando Apple Pay…",s57e95bc3afddfeb0:"Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.",sf32cd04f9a848ee2:"Pagar con Apple Pay",s6a796114fe45025d:e`${0}, ${1} h${2}`,s35d601992fe66fed:"Confirmando tu pago",s5370521b92483bf3:"No cierres, vuelvas atrás ni actualices la ventana; esto puede tardar unos momentos.",s77bf41039c589159:"Tu pago no se ha completado",s0e850d0fec6daf7d:"El pago ha sido rechazado y no hemos creado la cita. No se te ha cobrado nada: puedes volver a reservar desde el inicio.",s4007fa55a28f1f73:"Ese horario ya no está disponible",s0089e78f42dfd1a4:"Otro paciente ha reservado esa cita mientras completabas el pago, así que no hemos podido crearla.",saeefd0d6fb204a80:"Te hemos devuelto el importe automáticamente; puede tardar unos días en reflejarse en tu cuenta.",se478d6710916dadf:"No hemos podido devolverte el importe automáticamente. Escríbenos y lo resolvemos:",sf9e6fbadcce256d0:"Ha ocurrido un error",sa24acad3b1338788:"No hemos podido confirmar tu pago. Por favor, inténtalo de nuevo más tarde.",s8bbbd679ddb50d3b:"Si se te ha cobrado sin una cita confirmada, contacta con nuestro equipo en",s67ebdb57fc6ed724:"Confirmar y pagar",sf75ec3d5bb6b65ab:"Método de pago",s0ef2d611972d04af:"Selecciona un método para realizar el pago de la cita",s0569fb3d65e68486:"Tarjeta",sa8771906f4c82494:"Google pay",se2570afbd791e071:"Apple pay",s3a392bf1aa5a8813:"No se puede iniciar Google Pay",sc9c8fbf418b784ac:"No se puede iniciar Apple Pay",s55e29f17a7ab0b80:"Esperando confirmación de Google Pay",s8ff9b86afd460a55:"Esperando confirmación de Apple Pay",s5b8873ddba610f68:"Abrir Google Pay",s9506fb9bc66942ed:"Abrir Apple Pay",s6db69fd67f48404c:"Abrir ventana de Google Pay",s6911c9ad386cc8b9:"Abrir ventana de Apple Pay",s4a9be42496525265:"Volver a abrir Google Pay",s3356a53ef97dcfba:"Volver a abrir Apple Pay",s9ca719e1a40e96e3:"Faltan credenciales de pago. Vuelve atrás e inténtalo de nuevo, o paga con tarjeta.",s0f6deacf5441e291:"Elegir otro método",s275336b3d23d6d9c:"No cierres esta página.",s970d59d6d88e7e6c:"No se puede iniciar el pago",s705f4bd8bc8e04d8:"Faltan credenciales de pago. Vuelve atrás e inténtalo de nuevo.",s1dec877628213eef:"Tus citas",se0c593aac5e172e6:"Accede, modifica o anula tus citas.",s230b0bee447e61a5:"Ver mis citas"};export{n as templates};
@@ -1 +0,0 @@
1
- import{s as e}from"./runtime-Bg1WXVCx.js";const a={s0043fc30b467bc43:"Hide details",s00c8bf60a179e056:"Google Pay is not available. Try card or another payment method.",s035706a468d0c40b:"Friday",s0520ac0a7da193d4:"We couldn't validate the code. Please try again.",s071bd6bbf6c08f34:"Loading",s08404262212123ef:"How can I help you?",s08fe5307b5987c42:"De",s08fe5907b5988674:"Do",s09165307b5ad0e23:"Mi",s09165b07b5ad1bbb:"Ma",s09195307b5af43fa:"Lu",s092e4f07b5c19938:"Ju",s093b3307b5cbf400:"Vi",s09462f07b5d5f4b9:"Sa",s09528d5c26b62213:"Thursday",s0aaec824f7c6b501:"Send message",s0b0085a15991b134:"Reconnecting...",s0b0955208f737a86:"The file exceeds the maximum size allowed",s0eb69642cbc19745:"This appointment has already passed, so it can no longer be modified.",s0fc7c4bfd185800d:"Your prescriptions and medical reports will appear here.",s0fcbdef9dc977231:"An error occurred while loading the page. Please try again or contact support.",s11605fc03de64e14:"Write here...",s12f171594a5379d2:"Are you sure you want to cancel this appointment?",s132e84f499a23985:"No slots available currently",s13317a76a9ed776e:"Repeat",s142eba34d93fe59e:"Description",s1513f3687bfcac96:"Sunday",s1a0efa6ac51e8a85:"Previous page",s1a874fc38d0fcef0:"Medical order",s1d318e9d0ccba86b:"Chat",s1ee6d7e6d04932a4:"The email is not valid",s1fe8bb7f6ae07f9b:"You have no appointments in the history",s219b833c5ca095b3:"Here you will see all the appointments you have had. You can access the documents of each consultation and reschedule an appointment if necessary.",s22cf91a84fba4c4e:"When you schedule an appointment, it will appear here so you can consult it, modify it or cancel it.",s238c3ed6d3ecc66a:"Close",s24b59d5a129dc0d0:"We couldn't cancel the appointment. Please try again.",s255bf4de23c83482:"Booking conditions:",s256189bafbcd2e34:"The phone is not valid",s27e462e9f48eb3a6:"Documentation",s2a1d212b3cb5c1a1:"You can chat with your professional up to 48 hours after your appointment",s2aa2c19d07591438:"You will receive a reminder 15 minutes before the appointment",s2aab27b26a86469f:"Consultation reason",s2b9fde9a5739d2a0:"Name",s2bb20b2162a18938:"Why do you need the consultation?",s2d6183fa992e10e9:"This professional has no available time slots",s2ebd846b5a30f9d1:"We're sorry, we couldn't repeat your appointment. Please contact support.",s30c9095a2e07d929:"Waiting room",s31219c9bdeb7bc3e:"Continue",s337e34cd11150eb6:"View my appointments",s346d488070fe4cc8:"Request appointment",s3944638e633d719a:"Consultation",s3b77baf6a4864231:"Unknown error",s3bd87e3e21b07900:"Wait while the connection is restored",s3dc6584e403858df:"We could not load your documents",s3f55bc3bfec41a5d:"Attach files",s4177fe7f5d70fd33:"Back",s41826ac201c3cd85:"Could not open the support chat",s4364d4be7641e15f:"Confirm appointment",s43e5edcc8801e9a4:"Professional profile",s47afb8f6895a937b:e`We are currently experiencing high demand for ${0} appointments, so you may encounter longer waiting times than usual.`,s4813ee5d305442e5:"It seems we couldn't find you at the time of your appointment. You can schedule another consultation to resolve your questions.",s49683919cdaeca83:"Today",s4a061033615c8016:"Documents",s4a8494821c987a17:"Report",s4a8f1fcd3f5e5952:"It's not time yet!",s4d20157b5a655e70:"This time slot is not available. Please select another.",s4de424f531892818:"Go to videocall",s51c461d40f9fb865:"Select your specialist",s536a0b4d3d4a5d9f:"We could not load your next appointment",s53d957dda6cc200b:"Service and platform provided by",s53e2497bf900c7fd:"You have no upcoming appointments",s5558a2e389d04223:"Modify",s55c5126e99bae190:"Search availability",s563dcbfd432eb18f:"Cancel appointment",s57e65113a89160cf:"Appointment modality",s59612eaa6993aa7e:e`${0} minutes`,s5eef402d73eecbdc:"Attach file",s5f7956aacb5c6ca2:"Checking Google Pay…",s5f817b8841b188d2:"More options",s631f73a10d156b22:"Consultation expired",s63f7af84683dd7c3:"This appointment cannot be modified or cancelled: the minimum time required before the start has passed.",s643155d1b6ee1684:"Try again in a few minutes.",s64b78a5026d4ce8d:"No available schedules",s65bedc0e516977d9:"Saturday",s679be6312356a21c:"Schedule a medical consultation when you need it. Here you will see all the details and you can manage your upcoming appointments.",s67f30f9f4ea881f3:"This code is not valid.",s6a50fd7f52263b04:"Could not return to the waiting room",s6ab6fcd87fdbf217:"Hello",s6b1c4fb634461e7c:"Previous month",s6b6fa877ec1e6968:"Chat with the professional",s6c81d42670932f93:"Update",s6e2423db05f36856:"Appointment request",s6ecdc22accc55af7:"Videocall",s70258a0040dd9e19:"Return to the waiting room",s718177442a7447b2:"Appointment with an expert in less than 72 hours",s733b3bf647b7b0fa:"Accept camera and microphone permissions",s73cad78d8a3c39c2:"Prescription",s74d7a739b6ab651d:"History",s757fef148e0c94c6:"Availability",s77320b73fdd9cc40:"Leave",s775370fdb0af1546:"Birth date",s77c2b712a9813175:"Request a new appointment",s77f8e4bee88d44aa:e`${0} of ${1}`,s7907902da8916212:"The professional will call you at the number you indicate in this field.",s7aa3cd94d51825fc:"There are no professionals available for the selected specialty. Please try again later or select another specialty.",s7af26e861bb6f905:"Google Pay gateway merchant identifier is missing",s7fd8da9511b66dd4:"You can attach images or additional documentation (analyses, test results, etc.) for the doctor to evaluate",s83c6ce869a2bbaa7:"(1 is very bad, 5 is excellent)",s8447efe79d058943:"Amount paid",s8581adc786786298:"File format not supported",s862ca980b16911d0:"Chat with the professional",s8c18dbf02590a72e:"Promo code applied",s8cce15c931017937:"Back to home",s8e7a6119525dc7c9:e`Sorry, since there are less than ${0} minutes until your appointment, we can't modify it.`,s9005845c358db9da:"We couldn't download the document.",s92f34d487d1d0355:"Promotion",s94626d2ffd70f075:"Promo code applied successfully",s9536695467bcf9c4:"This appointment has already passed, so it can no longer be cancelled.",s96474eac63a69381:"Go to chat",s96ceb408923a7ab1:e`No. COL. ${0}`,s979ee14368bf1505:"Chat with me",s9802dd10b2c2f760:"Send",s99898f495319cd49:"This message was deleted",s9c309154722f8e06:"Loading payment portal",s9cabdaf42f04afee:"Enter the code",s9cbf16425cadadb1:"Please try again later.",s9d22fa67943fdc4c:"Phone consultation",sa00e726e1e7e46a9:"Add promo code",sa27f38ad9db3bc4f:"Commercial advisor",sa2fe3f3b565f15f4:"Cancel",sa4186d5e26cab4bb:"Page not found",sa497ebaaeb251035:"Repeat appointment",sa7de4334479674c6:"Modify appointment",sa82bc40dafbe3256:e`Scheduled appointment for ${0}`,sa83d79734eb60ee3:"Apply",sa86d729f62b39f99:"Join the videocall",sa87d2c48a52b2617:"You don't have documentation",sab964c37a0934399:"Google Pay could not be loaded. Check the site configuration and try again.",sac2728ace11e5f4b:"Specialty*",sadc5ede25dd6e126:"The professional will send you a message to coordinate the appointment. Make sure you have good coverage and can attend at the chosen time.",sae8f7ac5552b2af1:"When there are 10 minutes left for your consultation, you can access the videoconference",saf63dc4c8601ec8c:"a",safe333e385f371ff:"Verifying your payment...",saff3019e8a8c5f98:"Monday",sb01184796ad3832e:"How did your appointment go?",sb410a3509b92a90c:"Any comments about the appointment?",sb49dc4c5edae9d4e:"Consultation rating",sb5387e21dc21422b:"Modified appointment",sb621415007181c43:"Next month",sb73394814d122852:"If your doctor has generated any documentation, you can see and download it here, from the documentation section, your email or the chat.",sb882f28c9b20052e:"Confirmed appointment",sba98cf8b2a7dfca4:"Yesterday",sbbee712c4900abc2:"We couldn't start the payment",sbc0be90393c87447:e`Summary of the appointment for ${0}`,sbcf081de432a2172:"View details",sbcfc05bdb868b383:"Prescription",sbd07d1f779e482ae:"We couldn't confirm your payment",sbd9803cceb34513a:"Start chat with commercial advisor",sbda1cf7b293e17d2:"Upload file",sc27e7c4850fc5a34:e`Sorry, since there are less than ${0} hours until your appointment, we can't cancel it.`,sc3bb7ea72886e4d0:"Recent documents",sc3c7734c15d2a045:"Share how the care was or whether you had any issues with the video call…",sc43929cc6582a185:"View full calendar",sc4edf6a4e0157d4e:"Upcoming appointments",sc6f816a96e8578ff:"Sorry, this appointment can no longer be cancelled.",sc7cf2be40c8614fa:e`Sorry, since there are less than ${0} minutes until your appointment, we can't cancel it.`,sca0e87aae6bde276:"Did something go wrong?",sca4bd395e3148194:"Confirm cancellation",sca90bc30758f9082:"The page you are looking for has been removed, renamed, or may not exist.",scbe4c6673872bda5:"Phone",sce29e337ebd75277:"Support chat",scf469737e1670fd4:"Next page",scfc7f5c5f41936dc:"My appointments",sd1f44f1a8bc20e67:"Email",sd24922a2783f286e:"Wednesday",sd2a8fc66c53c1a27:"Skip",sd3f7579076c6611c:"It seems you have denied the necessary permissions to enter the videocall. Edit the permissions in your browser to enter. Once granted, you must refresh this screen.",sd4beaeb9a1b1fed5:"Previous dates",sd812eb30f385776d:"Complete your profile",sd853d3bcf5341b59:"See more",sda962b28e9110c82:"Search in your medical digital profile",sdb7004e477873574:"Consultation cancelled successfully",sdd963b1b2ce9a1f5:e`The professional will call you at ${0} at the selected time. Make sure you have good coverage and can attend at the chosen time.`,sde993da26c048f19:"Traumatology, gynecology, endocrinology, digestive or psychiatry",sdee32ae81ca0d6d8:"Add to calendar",se00b081edccfae39:"Next dates",se07ea9607704c5ad:"Change code",se090f7226b372a4a:"If the appointment couldn't take place, you can",se0c7cc77f86aa8a0:"Last name",se17f2b402ecea2e1:"Amount to refund",se18fa3ef98e155de:"Preparing Google Pay…",se1cce5af3e9bb6ee:"An error occurred while uploading the file",se1cf783f86c53031:"Tuesday",se45e6f6f3428ad50:e`Link to the consultation: ${0}`,se5a09223256f98db:"This field is required",se5f9264155b99909:"An error occurred while verifying your payment status. Please contact support if the charge has been made.",se92e438da4e7099f:e`Sorry, since there are less than ${0} hours until your appointment, we can't modify it.`,sea11fd8a12559bc5:"Previous appointment:",seb6739450e8d9c8d:"Are you sure you want to cancel this appointment? You will receive the amount paid within 5-10 business days.",seb850e89f9ff58e8:"Next appointment",sed750da423170d47:"Results for:",sed836a96c3b5d523:"Payment portal",sed8ec5e3c64fa25d:"Total",sed97e90642983578:"Continue to payment",sedb2092dda465ea1:"DNI/NIE",sedbca9676f07a51f:"Appointment modality*",see7c0a7b5b6ebbc5:"Use the chat to send the consultation reason, documents or images",sefc0dd68776c9466:"Pre-consultation questionnaire",sf0638d3fc50964d2:"Choose another date",sf0695a0a125ae748:"Confirm",sf09d5e51b63f2b7d:"Pay with Google Pay",sf199b210440b7c5f:"Consultation finished",sf3457daf057bff15:"return to the waiting room.",sf484a0e20a7829ac:"We will send you an email when it is time to connect to the videocall. Make sure you have good internet connection and a device with a camera and microphone.",sf48d12e7ae207023:"Specialty",sf5258cfb2fa10bdc:"Wait for your treatment without leaving this screen",sf63a72ff4116c6a9:"Download document",sf9705e1c4e82c017:"Could not submit the questionnaire",sfa6bc28a7faedc92:"New digital specialties appointment",sfac5734d03595135:"View all",sfc63af0362cfb78b:"Google Pay merchant identifier is missing",sfd51ca4e1b145054:"Could not reserve this time slot. Please select another.",sff337500b69abf7f:"The doctor is finishing your consultation. Update in a few minutes to see if you have documentation.",sffbc330c8a19f838:"See less",sc6a6d42245892254:"Falta el identificador de comercio de Apple Pay",s3da77e69fe62cb2a:"No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.",se1dd5d211b5b00e4:"Apple Pay no está disponible",s7e8b7a5acbdf83ed:"Preparando Apple Pay…",sc8271ba819299b59:"Comprobando Apple Pay…",s57e95bc3afddfeb0:"Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.",sf32cd04f9a848ee2:"Pagar con Apple Pay",s6a796114fe45025d:e`${0}, ${1} h${2}`,s35d601992fe66fed:"Confirmando tu pago",s5370521b92483bf3:"No cierres, vuelvas atrás ni actualices la ventana; esto puede tardar unos momentos.",s77bf41039c589159:"Tu pago no se ha completado",s0e850d0fec6daf7d:"El pago ha sido rechazado y no hemos creado la cita. No se te ha cobrado nada: puedes volver a reservar desde el inicio.",s4007fa55a28f1f73:"Ese horario ya no está disponible",s0089e78f42dfd1a4:"Otro paciente ha reservado esa cita mientras completabas el pago, así que no hemos podido crearla.",saeefd0d6fb204a80:"Te hemos devuelto el importe automáticamente; puede tardar unos días en reflejarse en tu cuenta.",se478d6710916dadf:"No hemos podido devolverte el importe automáticamente. Escríbenos y lo resolvemos:",sf9e6fbadcce256d0:"Ha ocurrido un error",sa24acad3b1338788:"No hemos podido confirmar tu pago. Por favor, inténtalo de nuevo más tarde.",s8bbbd679ddb50d3b:"Si se te ha cobrado sin una cita confirmada, contacta con nuestro equipo en",s67ebdb57fc6ed724:"Confirmar y pagar",sf75ec3d5bb6b65ab:"Método de pago",s0ef2d611972d04af:"Selecciona un método para realizar el pago de la cita",s0569fb3d65e68486:"Tarjeta",sa8771906f4c82494:"Google pay",se2570afbd791e071:"Apple pay",s3a392bf1aa5a8813:"No se puede iniciar Google Pay",sc9c8fbf418b784ac:"No se puede iniciar Apple Pay",s55e29f17a7ab0b80:"Esperando confirmación de Google Pay",s8ff9b86afd460a55:"Esperando confirmación de Apple Pay",s5b8873ddba610f68:"Abrir Google Pay",s9506fb9bc66942ed:"Abrir Apple Pay",s6db69fd67f48404c:"Abrir ventana de Google Pay",s6911c9ad386cc8b9:"Abrir ventana de Apple Pay",s4a9be42496525265:"Volver a abrir Google Pay",s3356a53ef97dcfba:"Volver a abrir Apple Pay",s9ca719e1a40e96e3:"Faltan credenciales de pago. Vuelve atrás e inténtalo de nuevo, o paga con tarjeta.",s0f6deacf5441e291:"Elegir otro método",s275336b3d23d6d9c:"No cierres esta página.",s970d59d6d88e7e6c:"No se puede iniciar el pago",s705f4bd8bc8e04d8:"Faltan credenciales de pago. Vuelve atrás e inténtalo de nuevo.",s1dec877628213eef:"Tus citas",se0c593aac5e172e6:"Accede, modifica o anula tus citas.",s230b0bee447e61a5:"Ver mis citas"};export{a as templates};
@@ -1 +0,0 @@
1
- import{_ as e,c as t}from"./custom-element-D2ziPxYE.js";import{e as s}from"./provide-BwI4DDGF.js";import{c as i}from"./consume-CovVqBjI.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{m as a,s as r}from"./runtime-Bg1WXVCx.js";import{A as n}from"./api-client-context-BXGqBAlO.js";import{i as l,a as d,x as c,E as m}from"./lit-element-DiWJYFwC.js";import{n as h}from"./property-scuRaFcM.js";import{r as p}from"./state-LQivXIgA.js";import{n as g}from"./create-context-DqP79qjF.js";import{tokens as u}from"../theme.js";import{xIcon as v}from"../ui/icons/x-icon.js";import"../ui/mq-avatar.js";import"../ui/mq-button.js";import"../ui/mq-skeleton.js";import{Q as y}from"./query-controller-B1byDHlF.js";import{g as b}from"./chunk-BUV4MGML-CkhBbfUu.js";import{o as f}from"./if-defined-BYeVdwgd.js";import{chevronLeftIcon as w}from"../ui/icons/chevron-left-icon.js";import{l as x}from"./chunk-S5RWG6G2-CQJ38pW6.js";import{r as k,c as $}from"./chunk-NIAGR3ZC-BDlNUZa1.js";import{e as C}from"./query-CeeutdfT.js";import{l as I}from"./chunk-FUCSYDW7-Duj5hy8S.js";import{DownloadFileEvent as z}from"../events.js";import{M as T,c as M,n as D}from"./api-chat-client-s45J7LKB.js";import{S,g as q}from"./chunk-Y4EKUX25-Bix9r5ry.js";import{checkDoubleIcon as j}from"../ui/icons/check-double-icon.js";import{checkIcon as P}from"../ui/icons/check-icon.js";import{getLocale as A}from"../i18n.js";import{f as _,p as E}from"./parseISO-CEksKisk.js";import{a as R}from"./addDays-CdyO-PRI.js";import{S as U,E as B}from"./chunk-YTQUGGS3-DH0H7ld7.js";import{s as N}from"./context-consumer-ESdICVAb.js";import{s as H}from"./chunk-6CCJWPGL-TiaqZaPV.js";import{Q as L}from"./chunk-RCFIJTXZ-C6Ir0-sM.js";import{e as K}from"./class-map-Co76I6aw.js";import{M as O}from"./mutation-controller-CR2qcqhH.js";const F=g("apiKey"),Q=g("token"),V=g("professionalHash"),G=g("roomId"),Z=g("consultationId"),J=g("consultationType");class MqChatRoomCloseEvent extends Event{static{this.eventName="mq-chat-room-close"}constructor(){super(MqChatRoomCloseEvent.eventName,{bubbles:!0,composed:!0})}}class MqChatRoomProfileEvent extends Event{static{this.eventName="mq-chat-room-profile"}constructor(){super(MqChatRoomProfileEvent.eventName,{bubbles:!0,composed:!0})}}const W=l`header{padding:var(--size-3) var(--size-4);background-color:var(--color-background-primary);display:flex;justify-content:space-between;gap:var(--size-1)}.left-side{display:flex;flex:1;min-width:0;align-items:center;gap:var(--size-3)}.left-side mq-avatar{flex-shrink:0}.info{min-width:0}.ghost-btn{text-align:left;background:0 0;border:none;padding:0;cursor:pointer}.right-side{display:flex;align-items:center}.name{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold);margin:0;color:var(--color-background);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.specialty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0;color:var(--color-white);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.name-skeleton{margin-bottom:var(--size-1)}.profile-title{font-family:var(--font-body);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-medium);margin:0;color:var(--color-white)}`;let Y=class ChatRoomHeader extends d{constructor(){super(...arguments),this.hideCloseButton=!1,this.getProfessionalQuery=new y(this,()=>b(this.apiClient,{hash:this.professionalHash}))}static{this.styles=W}handleClose(){this.dispatchEvent(new MqChatRoomCloseEvent)}handleClickProfile(){this.dispatchEvent(new MqChatRoomProfileEvent)}renderProfile(){return c`<div class="left-side"><mq-button type="button" size="icon-md" variant="ghost-inverted" @click="${()=>{this.dispatchEvent(new CustomEvent("goto-chat",{bubbles:!0,composed:!0}))}}">${w({size:24})}</mq-button><p class="profile-title">${a("Perfil de profesional")}</p></div>`}renderChat(){return c`${this.getProfessionalQuery.render({complete:e=>c`<button type="button" class="left-side ghost-btn" @click="${this.handleClickProfile}"><mq-avatar src="${f(e.avatar??void 0)}" alt="User Avatar" fallback="John Doe" size="sm"></mq-avatar><div class="info"><p class="name">${e.name}</p><p class="specialty">${e.title}</p></div></button>`,pending:()=>c`<div class="left-side"><mq-skeleton width="45px" height="45px" border-radius="full"></mq-skeleton><div><mq-skeleton class="name-skeleton" height="14px" width="120px"></mq-skeleton><mq-skeleton height="14px" width="100px"></mq-skeleton></div></div>`})}`}render(){return c`<header>${"profile"===this.view?this.renderProfile():this.renderChat()}<div class="right-side">${this.hideCloseButton?m:c`<mq-button type="button" size="icon-md" variant="ghost-inverted" @click="${this.handleClose}">${v({size:24})}</mq-button>`}</div></header>`}};e([i({context:n,subscribe:!0})],Y.prototype,"apiClient",void 0),e([h({type:String})],Y.prototype,"professionalHash",void 0),e([h({type:Boolean})],Y.prototype,"hideCloseButton",void 0),e([h({type:String})],Y.prototype,"view",void 0),Y=e([o(),t("chat-room-header")],Y);const X=/(https?:\/\/[^\s,;:!)\]}\]]+|www\.[^\s,;:!)\]}\]]+|[a-zA-Z0-9][-a-zA-Z0-9]*(?:\.[a-zA-Z0-9][-a-zA-Z0-9]*)+(?:\/[^\s,;:!)\]}\]]*|(?:\?|#|&)[^\s,;:!)\]}\]]*)?)/gi;function ee(e){return e.split(X).map((e,t)=>{if(t%2==1){const t=e.startsWith("http")?e:`https://${e}`;return c`<a href="${t}" target="_blank" rel="noopener noreferrer" class="message-link">${e}</a>`}return e})}let te=class TextMessageBubble extends d{static{this.styles=[l`:host{display:block}.message-bubble{padding:var(--size-2_5) var(--size-4);border-radius:var(--border-radius-lg);word-wrap:break-word;font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal)}.message-bubble.received{background-color:var(--chat-received-message-background);color:var(--chat-received-message-foreground);border-bottom-left-radius:0}.message-bubble.sent{background-color:var(--chat-sent-message-background);color:var(--chat-sent-message-foreground);border-bottom-right-radius:0}.message-content{white-space:pre-wrap}.message-paragraph{margin:0 0 var(--size-3) 0}.message-paragraph:last-child{margin-bottom:0}.message-bubble.received .message-content a.message-link,.message-bubble.sent .message-content a.message-link{color:var(--color-primary-link-default);text-decoration:underline}.message-bubble.received .message-content a.message-link:hover,.message-bubble.sent .message-content a.message-link:hover{opacity:.8}`]}formatMessageContent(e){const t=e.split("\n\n").filter(e=>e.trim());if(t.length<=1)return c`<div class="message-content">${ee(e)}</div>`;const s=t.map(e=>c`<div class="message-paragraph">${ee(e.trim())}</div>`);return c`<div class="message-content">${s}</div>`}render(){return c`<div class="message-bubble ${this.kind}">${this.formatMessageContent(this.message.string)}</div>`}};e([h({type:Object})],te.prototype,"message",void 0),e([h({type:String})],te.prototype,"kind",void 0),te=e([t("text-message-bubble")],te);const se=l`:host{display:block}.message-bubble{padding:var(--size-2);border-radius:var(--border-radius-lg);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);overflow:hidden}.message-bubble.received{background-color:var(--chat-received-message-background);border-bottom-left-radius:0}.message-bubble.sent{background-color:var(--chat-sent-message-background);border-bottom-right-radius:0}.image-content{display:block;width:229px;height:229px;object-fit:cover;border-radius:var(--border-radius-md)}.image-placeholder{display:flex;align-items:center;justify-content:center;width:100%;max-width:300px;height:200px;background-color:var(--color-gray-light);border-radius:var(--border-radius-md);color:var(--chat-sent-message-foreground);font-size:var(--text-sm)}.image-content{cursor:pointer;transition:opacity .2s ease}.image-content:hover{opacity:.9}.preview-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--dialog-underlay);display:flex;align-items:center;justify-content:center;z-index:1000;cursor:pointer;opacity:0;transition:opacity var(--dialog-transition-duration) ease}.preview-overlay.open{opacity:1}.preview-image{position:fixed;z-index:1000;inset:var(--mq-safe-top,0) var(--mq-safe-right,0) var(--mq-safe-bottom,0) var(--mq-safe-left,0);max-width:calc(100% - var(--mq-safe-left,4px) - var(--mq-safe-right,4px));max-height:calc(100% - var(--mq-safe-top,4px) - var(--mq-safe-bottom,4px));margin:auto;object-fit:contain;cursor:default;box-shadow:var(--dialog-shadow);transform:scale(.95);transition:transform var(--dialog-transition-duration) ease}.preview-overlay.open .preview-image{transform:scale(1)}.preview-close{z-index:1001;display:inline-flex;align-items:center;justify-content:center;height:var(--size-10);width:var(--size-10);position:absolute;top:var(--mq-safe-top,4px);right:var(--mq-safe-right,4px);background:rgba(255,255,255,.3);border:none;color:var(--color-neutrals-text-default);font-size:var(--text-xl);padding:var(--size-2) var(--size-3);border-radius:var(--border-radius-md);cursor:pointer;transition:background var(--dialog-transition-duration) ease}.preview-close:hover{background:var(--dialog-close-hover-bg)}`;let ie=class ImageMessageBubble extends d{constructor(){super(...arguments),this.showPreview=!1,this.isPreviewRendered=!1,this.isPreviewActive=!1,this.closeTimer=null}static{this.styles=se}handleImageError(e){const t=e.target;t.style.display="none";const s=t.nextElementSibling;s&&(s.style.display="flex")}handleImageLoad(e){const t=e.target.nextElementSibling;t&&(t.style.display="none")}handleImageClick(){this.showPreview=!0,this.isPreviewRendered=!0,this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.isPreviewActive=!0})})}handleImageKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleImageClick())}handleClosePreview(e){e&&e.stopPropagation(),this.isPreviewActive=!1,this.closeTimer&&window.clearTimeout(this.closeTimer),this.closeTimer=window.setTimeout(()=>{this.isPreviewRendered=!1,this.showPreview=!1,this.closeTimer=null},200)}handleOverlayClick(e){e.target===e.currentTarget&&this.handleClosePreview()}handleOverlayKeyDown(e){"Enter"!==e.key&&" "!==e.key||e.target===e.currentTarget&&(e.preventDefault(),this.handleClosePreview())}handleKeyDown(e){"Escape"===e.key&&this.showPreview&&(e.preventDefault(),this.handleClosePreview())}handlePreviewImageKeyDown(e){e.stopPropagation()}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),this.closeTimer&&(window.clearTimeout(this.closeTimer),this.closeTimer=null)}render(){const e=this.message.attachment.signed_url??this.message.attachment.url;return c`<div class="message-bubble ${this.kind}"><img class="image-content" src="${e}" width="229" height="229" alt="Shared attachment" @error="${this.handleImageError}" @load="${this.handleImageLoad}" @click="${this.handleImageClick}" @keydown="${this.handleImageKeyDown}" tabindex="0"><div class="image-placeholder" style="display:none">Image unavailable</div></div>${this.showPreview&&this.isPreviewRendered?c`<div class="preview-overlay ${this.isPreviewActive?"open":""}" @click="${this.handleOverlayClick}" @keydown="${this.handleOverlayKeyDown}" tabindex="0"><button class="preview-close" @click="${this.handleClosePreview}" aria-label="Close preview">${v({size:24})}</button> <img class="preview-image" src="${e}" alt="Shared attachment preview" @click="${e=>e.stopPropagation()}" @keydown="${this.handlePreviewImageKeyDown}" tabindex="0"></div>`:""}`}};e([h({type:Object})],ie.prototype,"message",void 0),e([h({type:String})],ie.prototype,"kind",void 0),e([i({context:Q})],ie.prototype,"token",void 0),e([p()],ie.prototype,"showPreview",void 0),e([p()],ie.prototype,"isPreviewRendered",void 0),e([p()],ie.prototype,"isPreviewActive",void 0),ie=e([t("image-message-bubble")],ie);const oe=l`:host{background-color:var(--chat-system-message-background);color:var(--chat-system-message-foreground);display:block;padding:var(--size-2_5) var(--size-4);border-radius:var(--border-radius-lg);font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-normal)}a.message-link{color:var(--color-primary-link-default);text-decoration:underline}a.message-link:hover{opacity:.8}`;let ae=class SystemMessageBubble extends d{static{this.styles=oe}render(){return c`<div class="system-message-bubble">${ee(this.message.string)}</div>`}};e([h({type:Object})],ae.prototype,"message",void 0),ae=e([t("system-message-bubble")],ae);const re=l`:host{display:block}.message-bubble{display:inline-block;padding:var(--size-2_5) var(--size-4);border-radius:var(--border-radius-lg);word-wrap:break-word;font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);text-decoration:underline;color:var(--color-primary-link-default);border:none;cursor:pointer;text-align:left}.message-bubble:hover:not(:disabled){opacity:.8}.message-bubble:disabled{opacity:.5;cursor:not-allowed}.message-bubble.received{background-color:var(--chat-received-message-background);border-bottom-left-radius:0}.message-bubble.sent{background-color:var(--chat-sent-message-background);border-bottom-right-radius:0}.message-content{white-space:pre-wrap}.message-paragraph{margin:0 0 var(--size-3) 0}.message-paragraph:last-child{margin-bottom:0}`;let ne=class FileMessageBubble extends d{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=re}formatMessageContent(e){const t=e.split("\n\n").filter(e=>e.trim());if(t.length<=1)return c`<div class="message-content">${e}</div>`;const s=t.map(e=>c`<div class="message-paragraph">${e.trim()}</div>`);return c`<div class="message-content">${s}</div>`}async handleDownload(){if(this.isDownloading)return;const e=this.message.attachment.url;try{this.isDownloading=!0;const t=await fetch(e,{headers:{Authorization:`Bearer ${this.token}`}});if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);const s=await t.blob(),i=new FileReader;i.onloadend=()=>{const e=i.result,t=new z({url:e,filename:this.message.attachment.file_name});this.dispatchEvent(t),this.isDownloading=!1},i.onerror=()=>{I.error("Error reading file as data URL"),this.isDownloading=!1},i.readAsDataURL(s)}catch(e){I.error("Error downloading file:",e),this.isDownloading=!1}}render(){return c`<button type="button" @click="${this.handleDownload}" class="message-bubble ${this.kind}" ?disabled="${this.isDownloading}">${this.formatMessageContent(this.message.attachment.file_name)}</button>`}};e([h({type:Object})],ne.prototype,"message",void 0),e([h({type:String})],ne.prototype,"kind",void 0),e([i({context:Q})],ne.prototype,"token",void 0),e([p()],ne.prototype,"isDownloading",void 0),ne=e([t("file-message-bubble")],ne);let le=class MessageBubble extends d{constructor(){super(...arguments),this.showTimestamp=!0}static{this.styles=[l`:host{display:block}.timestamp{font-family:var(--font-body);font-size:var(--text-xs);color:var(--color-gray-medium);font-weight:var(--font-weight-normal);text-align:left;display:flex;align-items:center;gap:var(--size-1)}.timestamp.sent{text-align:right;justify-content:flex-end}.status-icon{width:12px;height:12px}.status-icon.read{color:var(--color-primary)}`]}formatTimestamp(e){if(!e)return"";try{const t=new Date(e);return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:k(this.timezone)}).format(t)}catch{return e}}renderStatusIcon(){switch(this.message.status){case T.Sent:return P({size:12,color:"currentColor"});case T.Received:return j({size:12,color:"currentColor"});case T.Read:return j({size:12,color:"currentColor",className:"read"});default:return null}}renderBubbleContent(){switch(this.message.type){case"image":return c`<image-message-bubble .message="${this.message}" .kind="${this.kind}"></image-message-bubble>`;case"file":return c`<file-message-bubble .message="${this.message}" .kind="${this.kind}"></file-message-bubble>`;default:return c`<text-message-bubble .message="${this.message}" .kind="${this.kind}"></text-message-bubble>`}}render(){if(this.message.senderType===S.system)return c`<system-message-bubble .message="${this.message}"></system-message-bubble>`;const e=this.message.createdAt?new Date(this.message.createdAt):this.message.time?new Date(this.message.time):null;return c`${this.renderBubbleContent()} ${this.showTimestamp&&e?c`<div class="timestamp ${this.kind}">${this.formatTimestamp(e.toISOString())} ${"sent"===this.kind?c`<span class="status-icon ${this.message.status===T.Read?"read":""}">${this.renderStatusIcon()}</span>`:""}</div>`:""}`}};e([h({type:String})],le.prototype,"kind",void 0),e([h({type:Object})],le.prototype,"message",void 0),e([h({type:Boolean})],le.prototype,"showTimestamp",void 0),e([h({type:String})],le.prototype,"timezone",void 0),le=e([t("message-bubble")],le);let de=class DateBanner extends d{constructor(){super(...arguments),this.date=""}static{this.styles=[u,l`:host{display:block;margin-bottom:var(--size-2)}.date-banner{display:flex;align-items:center;justify-content:center;position:relative}.date-text{background-color:var(--color-gray-light);color:var(--color-gray-darker);font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);padding:var(--size-1) var(--size-2);border-radius:var(--border-radius-2xl);white-space:nowrap}`]}formatDate(e){const t=A().replace("_","-"),s=$(new Date,k(this.timezone)),i=_((o=E(s),R(o,-1,r)),"yyyy-MM-dd");var o,r;return e===s?a("Hoy"):e===i?a("Ayer"):E(e).toLocaleDateString(t,{dateStyle:"medium"})}render(){return c`<div class="date-banner"><span class="date-text">${this.formatDate(this.date)}</span></div>`}};function ce(e){return e.createdAt?new Date(e.createdAt):e.time?new Date(e.time):new Date}e([h({type:String})],de.prototype,"date",void 0),e([h({type:String})],de.prototype,"timezone",void 0),de=e([o(),t("date-banner")],de);let me=class MessagesList extends d{constructor(){super(...arguments),this.messages=[]}static{this.styles=[u,l`:host{display:block;width:100%;height:100%;overflow-y:auto;overflow-x:hidden}.messages-container{display:flex;flex-direction:column;padding:var(--size-4);gap:var(--size-1);background-color:var(--color-white);padding-bottom:var(--size-4)}.message-wrapper{display:flex;width:100%}.message-wrapper.received{justify-content:flex-start}.message-wrapper.sent{justify-content:flex-end}.message-wrapper.system{justify-content:center}message-bubble{max-width:70%}`]}get timezone(){return k(this.loginToken?.patient?.timezone)}scrollToBottom(){requestAnimationFrame(()=>{const e=this.messagesContainerEnd;e&&e.scrollIntoView({behavior:"instant",block:"end"})})}shouldShowMessageTimestamp(e,t){if(e.senderType===S.system)return!1;if(!t)return!0;if(t.senderType!==e.senderType)return!0;if(t.senderType===S.ordinary&&e.senderType===S.ordinary&&t.fromUserHash!==e.fromUserHash)return!0;return(ce(t).getTime()-ce(e).getTime())/6e4>1}groupMessagesByDate(e){const t=[];let s=null;const i=this.timezone;return e.forEach((o,a)=>{const r=$(ce(o),i);r!==s&&(t.push({type:"date",data:r}),s=r);const n=e[a+1],l=this.shouldShowMessageTimestamp(o,n);t.push({type:"message",data:o,showTimestamp:l})}),t}firstUpdated(){this.scrollToBottom()}willUpdate(e){e.has("messages")&&this.scrollToBottom()}render(){const e=this.groupMessagesByDate(this.messages),t=e.map((t,s)=>{if("date"===t.type)return c`<date-banner .date="${t.data}" .timezone="${this.timezone}"></date-banner>`;const i=this.professionalHash!==t.data.fromUserHash,o=t.data.senderType===S.system?"system":i?"sent":"received";return c`<div class="message-wrapper ${o}"><message-bubble .message="${t.data}" .kind="${o}" .timezone="${this.timezone}" .showTimestamp="${t.showTimestamp||"date"===e[s+1]?.type}"></message-bubble></div>`});return c`<div class="messages-container">${t}<div class="messages-container-end"></div></div>`}};e([h({type:Array})],me.prototype,"messages",void 0),e([h({type:String})],me.prototype,"professionalHash",void 0),e([i({context:x,subscribe:!0})],me.prototype,"loginToken",void 0),e([C(".messages-container-end")],me.prototype,"messagesContainerEnd",void 0),me=e([t("messages-list")],me);let he=class MessageBubbleSkeleton extends d{constructor(){super(...arguments),this.variant="patient",this.height="md",this.showTimestamp=!0}static{this.styles=[l`:host{display:block}.message-bubble{padding:var(--size-4);border-radius:var(--border-radius-lg);margin-bottom:var(--size-1);position:relative;overflow:hidden}.message-bubble.doctor{background-color:var(--color-gray-light);border-bottom-left-radius:0}.message-bubble.patient{background-color:var(--color-background-primary-light);border-bottom-right-radius:0}:host([height=sm]) .message-bubble{height:var(--size-8)}:host([height=md]) .message-bubble{height:var(--size-12)}`]}render(){return c`<div class="message-bubble ${this.variant}"></div>${this.showTimestamp?c`<div class="timestamp-skeleton ${this.variant}"></div>`:""}`}};e([h({type:String})],he.prototype,"variant",void 0),e([h({type:String})],he.prototype,"height",void 0),e([h({type:Boolean})],he.prototype,"showTimestamp",void 0),he=e([t("message-bubble-skeleton")],he);let pe=class MessagesSkeleton extends d{constructor(){super(...arguments),this.messageCount=6}static{this.styles=[u,l`:host{display:block;width:100%;height:100%;overflow:hidden}.messages-container{display:flex;flex-direction:column;padding:var(--size-4);gap:var(--size-3);max-width:100%;height:100%;background-color:var(--color-white)}.message-wrapper{display:flex;width:100%}.message-wrapper.doctor{justify-content:flex-start}.message-wrapper.patient{justify-content:flex-end}message-bubble-skeleton{max-width:85%;min-width:60%;width:100%}`]}getSkeletonHeight(e){const t=["sm","md","sm","md","sm","md"];return t[e%t.length]}getSkeletonVariant(e){const t=["doctor","patient","doctor","doctor","patient","doctor","patient"];return t[e%t.length]}renderSkeletonMessages(){return Array.from({length:this.messageCount},(e,t)=>{const s=this.getSkeletonVariant(t),i=this.getSkeletonHeight(t);return c`<div class="message-wrapper ${s}"><message-bubble-skeleton variant="${s}" height="${i}" ?showTimestamp="${t===this.messageCount-1||Math.random()>.7}"></message-bubble-skeleton></div>`})}render(){return c`<div class="messages-container">${this.renderSkeletonMessages()}</div>`}};e([h({type:Number})],pe.prototype,"messageCount",void 0),pe=e([t("messages-skeleton")],pe);var ge=class{constructor(e,t){this.host=e,this.listeners=[],this.host.addController(this),this.socketContext=new N(this.host,{context:U,subscribe:!0,callback:e=>{if(e&&(this.socket=e,t?.listeners)){this.listeners=t.listeners;for(const e of this.listeners)this.socket?.on(e.eventName,e.callback)}}})}hostConnected(){}hostDisconnected(){for(const e of this.listeners)this.socket?.off(e.eventName,e.callback)}};function ue(e,t){return{queryKey:H(e,"rooms",t.roomId),queryFn:()=>e.rooms.getRoomMessages(t),staleTime:0}}class OptimisticUpdatesController{constructor(e){this.host=e,this.apiClientContext=new N(this.host,{context:n,subscribe:!0,callback:e=>{this.apiClient=e}}),this.queryClientContext=new N(this.host,{context:L,subscribe:!0,callback:e=>{e&&(this.queryClient=e)}}),this.host.addController(this)}hostConnected(){}appendMessageToRoom(e,t){if(!this.apiClient)return;const s=ue(this.apiClient,{roomId:t}).queryKey;this.queryClient?.setQueriesData({queryKey:s,exact:!0},t=>[...t??[],e])}deleteMessage(e,t){if(!this.queryClient||!this.apiClient)return;const s=ue(this.apiClient,{roomId:t}).queryKey;this.queryClient.setQueryData(s,t=>(t??[]).map(t=>t.messageId===e?{...t,deletedAt:(new Date).toISOString(),string:a("Este mensaje fue eliminado")}:t))}updateMessageStatus({messageId:e,status:t,roomId:s}){if(!this.queryClient||!this.apiClient)return;const i=ue(this.apiClient,{roomId:s}).queryKey;this.queryClient.setQueryData(i,s=>(s??[]).map(s=>s.messageId===e?{...s,status:t}:s))}}let ve=class ChatRoomMessages extends d{constructor(){super(...arguments),this.getRoomMessagesQuery=new y(this,()=>ue(this.apiClient,{roomId:this.roomId})),this.optimisticUpdatesController=new OptimisticUpdatesController(this),this.onMessageReceived=e=>{if(e.roomId!==this.roomId)return;const t=function(e){const t={roomId:"string"==typeof e.roomId?Number.parseInt(e.roomId,10):e.roomId,messageId:e.messageId,status:e.status,senderType:e.senderType,fromUserHash:e.fromUserHash,time:e.time,createdAt:e.time?new Date(e.time).toISOString():null,deletedAt:null};switch(e.type){case"string":return{...t,type:"string",string:e.string,auto:e.auto?1:0,attachment:null};case"image":return{...t,type:"image",string:e.fileName||"",auto:0,attachment:{file_name:e.fileName,file_size:e.fileSize,url:e.imageUrl,type:"uncategorized",meta:{duration:0},signed_url:e.imageUrl}};case"file":return{...t,type:"file",string:e.fileName||"",auto:0,attachment:{file_name:e.fileName,file_size:e.fileSize,url:e.fileUrl,type:"uncategorized",meta:{duration:0},signed_url:e.fileUrl}};default:return{...t,type:"string",string:"",auto:0,attachment:null}}}(e);this.optimisticUpdatesController.appendMessageToRoom(t,t.roomId),t.roomId===this.roomId&&e.fromUserHash===this.professionalHash&&this._socketController.socket?.emit(B.messageStatus,e.messageId,this.roomId,T.Read)},this.onMessageDeleted=e=>{e.room_id===this.roomId&&this.optimisticUpdatesController.deleteMessage(e.message_id,e.room_id)},this.onMessageStatusUpdated=e=>{e.roomId===this.roomId&&this.optimisticUpdatesController.updateMessageStatus({messageId:e.messageId,status:e.status,roomId:e.roomId})},this._socketController=new ge(this,{listeners:[{eventName:B.message,callback:this.onMessageReceived},{eventName:B.message_deleted,callback:this.onMessageDeleted},{eventName:B.messageStatus,callback:this.onMessageStatusUpdated}]})}static{this.styles=[u,l`:host{display:block;width:100%;height:100%}`]}render(){return this.getRoomMessagesQuery.render({pending:()=>c`<messages-skeleton messageCount="8"></messages-skeleton>`,complete:e=>c`<messages-list .messages="${e}" .professionalHash="${this.professionalHash}"></messages-list>`})}};e([i({context:n,subscribe:!0})],ve.prototype,"apiClient",void 0),e([h({type:Number})],ve.prototype,"roomId",void 0),e([h({type:String})],ve.prototype,"professionalHash",void 0),ve=e([t("chat-room-messages")],ve);var ye=class{constructor(e){this.string=e.string,this.roomId=e.roomId,this.messageId=e.messageId,this.type=e.type,this.fileName=e.fileName,this.autoMessage=e.autoMessage,this.senderType=e.senderType,this.attachmentType=e.attachmentType,this.consultationId=e.consultationId,this.consultationType=e.consultationType}toSocketMessage(){return[B.message,this.string,this.roomId,this.messageId,this.type,this.fileName,this.autoMessage,this.senderType,this.attachmentType,this.consultationId,this.consultationType]}},be=class extends ye{constructor(e){super({roomId:e.roomId,messageId:e.messageId,string:e.string,type:"string",fileName:null,autoMessage:!1,senderType:S.ordinary,attachmentType:"uncategorized",consultationId:e.consultationId,consultationType:e.consultationType})}},fe=class extends ye{constructor(e){super({roomId:e.roomId,messageId:e.messageId,string:e.base64Attachment,fileName:e.fileName,type:e.type,autoMessage:!1,senderType:S.ordinary,attachmentType:"uncategorized",consultationId:e.consultationId,consultationType:e.consultationType})}};async function we(e){return await Promise.all(e.map(async e=>{const t=await function(e){return new Promise((t,s)=>{const i=new FileReader;i.onload=()=>{const o=i.result.split(",")[1];o?t(o):s(new Error(`Invalid data URL format for file: ${e.name}`))},i.onerror=()=>{s(new Error(`Failed to read file: ${e.name}`))},i.readAsDataURL(e)})}(e);return{name:e.name,size:e.size,type:e.type,base64:t}}))}const xe=l`:host{display:block;position:absolute;bottom:0;padding:var(--size-2) var(--size-2);background:#fff}.footer-container{display:flex;align-items:center;gap:var(--size-1);max-width:100%}.input-container{flex:1;position:relative;display:flex;align-items:center;border:1px solid var(--color-neutrals-border-disabled);border-radius:var(--border-radius-2xl);padding:0 var(--size-1);overflow:hidden}.input-container:focus-within{border-color:var(--color-primary)}.message-input{flex:1;border:none;outline:0;background:0 0;font-family:var(--font-body);font-size:var(--text-base);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);padding-left:var(--sp-2)}.message-input::placeholder{color:var(--color-neutrals-text-medium)}.attachment-icon{width:var(--size-5);height:var(--size-5);color:var(--color-primary)}.send-icon{width:var(--size-5);height:var(--size-5);color:var(--color-primary)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.send-button{color:var(--color-neutrals-link-disabled);background:0 0;border:none;padding:var(--size-2);border-radius:var(--border-radius-md);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease}.send-button:hover:not(.disabled){background:var(--color-primary-light)}.send-button:active:not(.disabled){background-color:var(--color-neutrals-background-active)}.send-button.disabled{cursor:not-allowed;opacity:.4}.send-button.disabled .send-icon{color:var(--color-neutrals-text-disabled)}`;let ke=class ChatRoomFooter extends d{constructor(){super(...arguments),this.isTyping=!1,this.typingTimeoutId=null,this.inputValue="",this.socketController=new ge(this)}static{this.styles=[xe]}handleInputChange(e){const t=e.target;this.inputValue=t.value,this.isTyping||(this.socketController.socket?.emit(B.typing,this.roomId),this.isTyping=!0),this.typingTimeoutId&&clearTimeout(this.typingTimeoutId),this.typingTimeoutId=setTimeout(()=>{this.isTyping&&(this.socketController.socket?.emit(B.stop_typing,this.roomId),this.isTyping=!1)},1500)}handleKeyDown(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),this.handleSendMessage())}async handleAttachment(e){const t=e.target.files;if(!t||0===t.length)return;const s=t.item(0);if(s)try{const e=(await we([s]))[0];if(!e)return void I.error("Error converting file to base64");const t=e?.type.includes("image")?"image":"file",i=crypto.randomUUID(),o=s.name,a=new fe({type:t,base64Attachment:e.base64,fileName:o,roomId:this.roomId,messageId:i,consultationId:this.consultationId,consultationType:this.consultationType});this.socketController.socket?.emit(...a.toSocketMessage())}catch(e){I.error("Error converting files to base64:",e)}}handleAttachmentClick(){this.attachmentInput.click()}handleSendMessage(){const e=this.inputValue.trim();if(!e)return;const t=crypto.randomUUID();this.isTyping&&(this.socketController.socket?.emit(B.stop_typing,this.roomId),this.isTyping=!1,this.typingTimeoutId&&clearTimeout(this.typingTimeoutId));const s=new be({messageId:t,string:e,roomId:this.roomId,consultationId:this.consultationId,consultationType:this.consultationType});this.socketController.socket?.emit(...s.toSocketMessage()),this.inputValue=""}disconnectedCallback(){this.isTyping&&(this.socketController.socket?.emit(B.stop_typing,this.roomId),this.typingTimeoutId&&clearTimeout(this.typingTimeoutId))}render(){const e=this.inputValue.trim().length>0;return c`<div class="footer-container"><div class="input-container"><input class="message-input" type="text" placeholder="${a("Escribe aquí...")}" .value="${this.inputValue}" @input="${this.handleInputChange}" @keydown="${this.handleKeyDown}"><div><input class="attachment-input sr-only" type="file" accept="image/jpeg,image/jpg,image/png,image/gif,image/bmp,image/tiff,application/pdf,text/*,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,audio/*,video/*" @change="${this.handleAttachment}"><mq-button variant="ghost" size="icon-sm" @click="${this.handleAttachmentClick}" title="${a("Adjuntar archivo")}">${c`<svg class="attachment-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`}</mq-button></div></div><button class="send-button ${e?"":"disabled"}" @click="${this.handleSendMessage}" ?disabled="${!e}" title="${a("Enviar mensaje")}">${c`<svg class="send-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 2L11 13"/><path d="M22 2L15 22L11 13L2 9L22 2z"/></svg>`}</button></div>`}};e([i({context:Z})],ke.prototype,"consultationId",void 0),e([i({context:J})],ke.prototype,"consultationType",void 0),e([h({type:Number})],ke.prototype,"roomId",void 0),e([p()],ke.prototype,"inputValue",void 0),e([C(".attachment-input")],ke.prototype,"attachmentInput",void 0),ke=e([t("chat-room-footer")],ke);const $e=e=>({all_week:!0,monday:1===e,tuesday:2===e,wednesday:3===e,thursday:4===e,friday:5===e,saturday:6===e,sunday:7===e,working_week:e>=1&&e<=5,weekend:0===e||6===e});function Ce(e,t){const s=$e(6===e?0:e+1);return t.some(e=>{const t=e.days_of_week;return!0===s[t]})}let Ie=class AvailabilitySection extends d{constructor(){super(...arguments),this.gaps=[],this.selectedDay=function(){const e=(new Date).getDay();return 0===e?6:e-1}()}static{this.styles=l`:host{display:flex;flex-direction:column;gap:var(--size-3)}.availability-header{font-family:var(--font-body);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-normal);color:var(--color-primary);text-align:center;margin:0;margin-bottom:var(--size-4) 0}.availability-days{display:flex;flex-direction:row;justify-content:center;gap:var(--size-1);overflow-x:auto;padding-bottom:var(--size-4)}.availability-button{outline:0;border:1px solid var(--color-gray-medium);background:0 0;color:var(--color-gray-medium);cursor:pointer;height:var(--size-9);width:var(--size-10);border-radius:var(--border-radius-sm);text-transform:capitalize;font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium)}.availability-button:hover{background-color:color-mix(in srgb,var(--color-gray-light) 50%,transparent)}.availability-button:focus{background-color:color-mix(in srgb,var(--color-gray-light) 50%,transparent)}.availability-button.active{background:var(--color-primary);color:var(--color-white);border:none}.availability-button:disabled{opacity:.5;cursor:not-allowed;background-color:var(--color-gray-light)}.time-title{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);color:var(--color-gray-dark);margin:0;margin-bottom:var(--size-1)}.time-entries{display:flex;flex-direction:column;gap:var(--size-1);margin-bottom:var(--size-6)}.time-entry{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-normal);color:var(--color-gray-medium);margin:0}`}updated(e){e.has("gaps")&&(void 0===this.selectedDay||Ce(this.selectedDay,this.gaps)||(this.selectedDay=void 0))}render(){const e=[{shortLabel:a("Lu"),label:a("Lunes"),key:"monday",disabled:!Ce(0,this.gaps)},{shortLabel:a("Ma"),label:a("Martes"),key:"tuesday",disabled:!Ce(1,this.gaps)},{shortLabel:a("Mi"),label:a("Miércoles"),key:"wednesday",disabled:!Ce(2,this.gaps)},{shortLabel:a("Ju"),label:a("Jueves"),key:"thursday",disabled:!Ce(3,this.gaps)},{shortLabel:a("Vi"),label:a("Viernes"),key:"friday",disabled:!Ce(4,this.gaps)},{shortLabel:a("Sa"),label:a("Sábado"),key:"saturday",disabled:!Ce(5,this.gaps)},{shortLabel:a("Do"),label:a("Domingo"),key:"sunday",disabled:!Ce(6,this.gaps)}];return c`<h2 class="availability-header">${a("Disponibilidad")}</h2><div class="availability-days">${e.map((e,t)=>c`<button type="button" class="availability-button ${K({active:this.selectedDay===t&&!e.disabled})}" ?disabled="${e.disabled}" @click="${()=>{e.disabled||(this.selectedDay=t)}}">${e.shortLabel}</button>`)}</div>${void 0===this.selectedDay||e[this.selectedDay]?.disabled?"":(()=>{const t=function(e,t){const s=$e(6===e?0:e+1);return t.filter(e=>{const t=e.days_of_week;return!0===s[t]}).map(e=>({from_time:e.from_time,to_time:e.to_time}))}(this.selectedDay,this.gaps);return c`<div class="availability-time"><p class="time-title">${e[this.selectedDay]?.label}</p><div class="time-entries">${t.length>0?t.map(e=>c`<p class="time-entry">${a("De")} ${e.from_time} ${a("a")} ${e.to_time}</p>`):c`<p class="time-entry">${a("No hay horarios disponibles")}</p>`}</div></div>`})()}`}};e([h({type:Array})],Ie.prototype,"gaps",void 0),e([p()],Ie.prototype,"selectedDay",void 0),Ie=e([o(),t("availability-section")],Ie);const ze=l`:host{display:flex;flex-direction:column;height:100%;overflow-y:auto;background-color:var(--color-white)}.profile-container{padding:var(--size-6);display:flex;flex-direction:column}.profile-header{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:var(--size-6);border-bottom:1px solid var(--color-gray-medium);margin-bottom:var(--size-6)}.profile-avatar{margin-bottom:var(--size-2)}.profile-name{font-family:var(--font-body);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-medium);color:var(--color-text-primary);margin:var(--size-4) 0}.profile-specialty{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);color:var(--color-text-icons--secondary);margin:0;margin-bottom:var(--size-2);text-transform:uppercase}.profile-collegiate{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);color:var(--color-gray-medium);text-transform:uppercase;margin:0}.description-header{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-medium);color:var(--color-primary);margin:0;margin-bottom:var(--size-3)}.description-text{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-foreground);margin:0}`;let Te=class ChatRoomProfile extends d{constructor(){super(...arguments),this.getProfessionalQuery=new y(this,()=>b(this.apiClient,{hash:this.professionalHash}))}static{this.styles=[u,ze]}renderProfile(e){return c`<div class="profile-container"><div class="profile-header"><mq-avatar class="profile-avatar" src="${e.avatar||""}" fallback="${e.name}" alt="${e.name}'s profile picture" size="xl"></mq-avatar><div><h1 class="profile-name">${e.name}</h1>${e.title?c`<p class="profile-specialty">${e.title}</p>`:""} ${e.collegiate_number?c`<p class="profile-collegiate">${a(r`Nº COL. ${e.collegiate_number}`)}</p>`:""}</div></div>${e.chat_schedule&&e.chat_schedule.gaps.length>0?c`<availability-section .gaps="${e.chat_schedule.gaps}"></availability-section>`:m} ${e.description||e.overview?c`<div><h2 class="description-header">${a("Descripción")}</h2><p class="description-text">${e.description||e.overview}</p></div>`:""}</div>`}render(){return this.getProfessionalQuery.render({pending:()=>c``,complete:e=>this.renderProfile(e)})}};e([i({context:n,subscribe:!0})],Te.prototype,"apiClient",void 0),e([h({type:String})],Te.prototype,"professionalHash",void 0),Te=e([o(),t("chat-room-profile")],Te);const Me=l`.root{display:flex;flex-direction:column;height:100%;overflow:hidden}chat-room-header{flex-shrink:0}chat-room-messages{flex:1;overflow-y:auto;overflow-x:hidden}chat-room-footer{position:sticky;bottom:0;left:0;right:0;flex-shrink:0}`;let De=class MqChatRoom extends d{constructor(){super(...arguments),this.consultationId=void 0,this.consultationType=void 0,this.readonly=!1,this.hideCloseButton=!1,this.view="chat",this.socketController=new ge(this),this.readAllMessagesMutation=new O(this,{mutationFn:()=>this.apiClient.professionals.readAllMessages({roomId:this.roomId}),onSuccess:()=>{this.queryClientContext?.invalidateQueries({queryKey:q(this.apiClient,{roomId:this.roomId}).queryKey})}}),this.apiClient=M()}static{this.styles=[u,Me]}willUpdate(e){const t=D(e,{apiKey:this.apiKey,token:this.token},this.inheritedApiClient);t&&(this.apiClient=t),e.has("roomId")&&(this.socketController.socket?.emit(B.joinRoom,this.roomId),this.readAllMessagesMutation.run(void 0))}render(){return c`<div class="root"><chat-room-header .professionalHash="${this.professionalHash}" .view="${this.view}" .hideCloseButton="${this.hideCloseButton}" @mq-chat-room-profile="${()=>{this.view="profile"}}" @goto-chat="${()=>{this.view="chat"}}"></chat-room-header>${"chat"===this.view?c`<chat-room-messages .roomId="${this.roomId}" .professionalHash="${this.professionalHash}"></chat-room-messages>${this.readonly?m:c`<chat-room-footer .roomId="${this.roomId}"></chat-room-footer>`}`:c`<chat-room-profile .professionalHash="${this.professionalHash}" @mq-chat-room-chat="${()=>{this.view="chat"}}"></chat-room-profile>`}</div>`}};e([s({context:F}),h({type:String,attribute:"api-key"})],De.prototype,"apiKey",void 0),e([s({context:Q}),h({type:String,attribute:"token"})],De.prototype,"token",void 0),e([s({context:V}),h({type:String,attribute:"professional-hash"})],De.prototype,"professionalHash",void 0),e([s({context:G}),h({type:Number,attribute:"room-id"})],De.prototype,"roomId",void 0),e([s({context:Z}),h({type:String,attribute:"consultation-id"})],De.prototype,"consultationId",void 0),e([s({context:J}),h({type:String,attribute:"consultation-type"})],De.prototype,"consultationType",void 0),e([h({type:Boolean,reflect:!0})],De.prototype,"readonly",void 0),e([h({type:Boolean,attribute:"hide-close-button"})],De.prototype,"hideCloseButton",void 0),e([p()],De.prototype,"view",void 0),e([i({context:L,subscribe:!0})],De.prototype,"queryClientContext",void 0),e([i({context:n,subscribe:!0}),p()],De.prototype,"inheritedApiClient",void 0),e([s({context:n}),p()],De.prototype,"apiClient",void 0),De=e([o(),t("mq-chat-room")],De);export{De as M,MqChatRoomCloseEvent as a,MqChatRoomProfileEvent as b};