@mediquo/elements 0.8.1 → 0.9.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 (170) hide show
  1. package/README.md +36 -1
  2. package/dist/chunks/api-chat-client-CJ1EGJe3.js +1 -0
  3. package/dist/chunks/{apple-pay-outcomes-BONpT54d.js → apple-pay-outcomes-B1LrUXHR.js} +1 -1
  4. package/dist/chunks/{appointment-action-unavailable-dialog-BYse3uIa.d.ts → appointment-action-unavailable-dialog-CTiL4nMo.d.ts} +1 -1
  5. package/dist/chunks/{appointment-card-skeleton-CAQmlCTm.js → appointment-card-skeleton-B_rJNvU9.js} +1 -1
  6. package/dist/chunks/{appointment-card-skeleton-C3mV8Ky1.d.ts → appointment-card-skeleton-C2Sim4nR.d.ts} +3 -3
  7. package/dist/chunks/document.model.d-DIzMiOmd.d.ts +6 -0
  8. package/dist/chunks/{documentation-view-GZI-DC3e.js → documentation-view-DEXxBFrV.js} +1 -1
  9. package/dist/chunks/index-Btj1mwcE.js +1 -0
  10. package/dist/chunks/index-Bw-MbGKw.js +1 -0
  11. package/dist/chunks/{index-PGYfkbm6.js → index-D6Hg-beW.js} +1 -1
  12. package/dist/chunks/{index-CDBk7hVW.d.ts → index-DTEtqjQF.d.ts} +0 -13
  13. package/dist/chunks/{index-KhJ8hC0H.d.ts → index-Dbbpnw8f.d.ts} +1 -1
  14. package/dist/chunks/index-DdkeWQrh.d.ts +53 -0
  15. package/dist/chunks/index-Nf3nZ9O3.d.ts +16 -0
  16. package/dist/chunks/index-iaTXVzFa.js +1 -0
  17. package/dist/chunks/{index.d-Bl682CAX.d.ts → index.d-XSe7Hy-Q.d.ts} +12 -0
  18. package/dist/chunks/{mq-chat-room-t3j3Tq4o.d.ts → mq-chat-room-jeDvIF1Z.d.ts} +1 -1
  19. package/dist/chunks/{mq-layout-L3TlCxI0.js → mq-layout-E5mKSz4A.js} +1 -1
  20. package/dist/chunks/{mq-layout-D1j50tKd.d.ts → mq-layout-TG2K4zRv.d.ts} +2 -5
  21. package/dist/chunks/next-appointment-card-6uXWTDx5.js +1 -0
  22. package/dist/chunks/next-appointment-card-Bc65OZ1_.d.ts +61 -0
  23. package/dist/chunks/{telemetry-client-CoWay8es.js → telemetry-client-BdPx4SXu.js} +1 -1
  24. package/dist/env.js +1 -1
  25. package/dist/mq-api-client-provider.d.ts +1 -1
  26. package/dist/mq-api-client-provider.js +1 -1
  27. package/dist/mq-apple-pay-checkout.d.ts +1 -1
  28. package/dist/mq-apple-pay-checkout.js +1 -1
  29. package/dist/mq-appointment-checkout.d.ts +1 -1
  30. package/dist/mq-appointment-checkout.js +1 -1
  31. package/dist/mq-appointment-documentation.d.ts +4 -3
  32. package/dist/mq-appointment-documentation.js +1 -1
  33. package/dist/mq-chat-room.d.ts +2 -2
  34. package/dist/mq-chat-room.js +1 -1
  35. package/dist/mq-checkout.d.ts +1 -1
  36. package/dist/mq-checkout.js +1 -1
  37. package/dist/mq-dashboard.d.ts +7 -6
  38. package/dist/mq-dashboard.js +1 -1
  39. package/dist/mq-documents.d.ts +13 -13
  40. package/dist/mq-documents.js +1 -1
  41. package/dist/mq-google-pay-checkout.d.ts +1 -1
  42. package/dist/mq-google-pay-checkout.js +1 -1
  43. package/dist/mq-immediate-videocall-checkout.d.ts +1 -1
  44. package/dist/mq-immediate-videocall-checkout.js +1 -1
  45. package/dist/mq-my-appointments.d.ts +6 -6
  46. package/dist/mq-my-appointments.js +1 -1
  47. package/dist/mq-next-appointments.d.ts +10 -48
  48. package/dist/mq-next-appointments.js +1 -1
  49. package/dist/mq-payment-poller.d.ts +1 -1
  50. package/dist/mq-payment-poller.js +1 -1
  51. package/dist/mq-recent-documents.d.ts +10 -6
  52. package/dist/mq-recent-documents.js +1 -1
  53. package/dist/mq-schedule-success.d.ts +2 -2
  54. package/dist/mq-schedule-success.js +1 -1
  55. package/dist/mq-schedule.d.ts +14 -3
  56. package/dist/mq-schedule.js +1 -1
  57. package/dist/mq-support-chat.d.ts +4 -3
  58. package/dist/mq-support-chat.js +1 -1
  59. package/dist/mq-terms-and-conditions.d.ts +2 -2
  60. package/dist/mq-terms-and-conditions.js +1 -1
  61. package/dist/mq-videocall.d.ts +4 -3
  62. package/dist/mq-videocall.js +1 -1
  63. package/dist/react/mq-api-client-provider.d.ts +1 -1
  64. package/dist/react/mq-api-client-provider.js +1 -1
  65. package/dist/react/mq-apple-pay-checkout.d.ts +1 -1
  66. package/dist/react/mq-apple-pay-checkout.js +1 -1
  67. package/dist/react/mq-appointment-checkout.d.ts +1 -1
  68. package/dist/react/mq-appointment-checkout.js +1 -1
  69. package/dist/react/mq-appointment-documentation.d.ts +4 -3
  70. package/dist/react/mq-appointment-documentation.js +1 -1
  71. package/dist/react/mq-chat-room.d.ts +2 -2
  72. package/dist/react/mq-chat-room.js +1 -1
  73. package/dist/react/mq-checkout.d.ts +1 -1
  74. package/dist/react/mq-checkout.js +1 -1
  75. package/dist/react/mq-dashboard.d.ts +6 -5
  76. package/dist/react/mq-dashboard.js +1 -1
  77. package/dist/react/mq-documents-page.d.ts +5 -3
  78. package/dist/react/mq-documents-page.js +1 -1
  79. package/dist/react/mq-documents.d.ts +5 -3
  80. package/dist/react/mq-documents.js +1 -1
  81. package/dist/react/mq-google-pay-checkout.d.ts +1 -1
  82. package/dist/react/mq-google-pay-checkout.js +1 -1
  83. package/dist/react/mq-immediate-videocall-checkout.d.ts +1 -1
  84. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  85. package/dist/react/mq-my-appointments.d.ts +5 -5
  86. package/dist/react/mq-my-appointments.js +1 -1
  87. package/dist/react/mq-next-appointments.d.ts +7 -4
  88. package/dist/react/mq-next-appointments.js +1 -1
  89. package/dist/react/mq-payment-poller.d.ts +1 -1
  90. package/dist/react/mq-payment-poller.js +1 -1
  91. package/dist/react/mq-recent-documents.d.ts +6 -2
  92. package/dist/react/mq-recent-documents.js +1 -1
  93. package/dist/react/mq-schedule-success.d.ts +2 -2
  94. package/dist/react/mq-schedule-success.js +1 -1
  95. package/dist/react/mq-schedule.d.ts +5 -1
  96. package/dist/react/mq-schedule.js +1 -1
  97. package/dist/react/mq-support-chat.d.ts +5 -2
  98. package/dist/react/mq-support-chat.js +1 -1
  99. package/dist/react/mq-terms-and-conditions.d.ts +2 -2
  100. package/dist/react/mq-terms-and-conditions.js +1 -1
  101. package/dist/react/mq-videocall.d.ts +4 -3
  102. package/dist/react/mq-videocall.js +1 -1
  103. package/dist/theme.d.ts +1 -0
  104. package/dist/theme.js +1 -1
  105. package/dist/ui/icons/alert-circle-icon.js +1 -1
  106. package/dist/ui/icons/annotation-question-icon.d.ts +1 -1
  107. package/dist/ui/icons/annotation-question-icon.js +1 -1
  108. package/dist/ui/icons/arrow-narrow-left-icon.js +1 -1
  109. package/dist/ui/icons/arrow-right-icon.js +1 -1
  110. package/dist/ui/icons/briefcase-icon.d.ts +1 -1
  111. package/dist/ui/icons/briefcase-icon.js +1 -1
  112. package/dist/ui/icons/calendar-icon.d.ts +1 -1
  113. package/dist/ui/icons/calendar-icon.js +1 -1
  114. package/dist/ui/icons/chat-bubble-icon.d.ts +1 -1
  115. package/dist/ui/icons/chat-bubble-icon.js +1 -1
  116. package/dist/ui/icons/check-double-icon.js +1 -1
  117. package/dist/ui/icons/check-icon.js +1 -1
  118. package/dist/ui/icons/chevron-down-icon.js +1 -1
  119. package/dist/ui/icons/chevron-left-icon.js +1 -1
  120. package/dist/ui/icons/chevron-right-icon.js +1 -1
  121. package/dist/ui/icons/clock-icon.d.ts +1 -1
  122. package/dist/ui/icons/clock-icon.js +1 -1
  123. package/dist/ui/icons/dots-horizontal-icon.js +1 -1
  124. package/dist/ui/icons/download-02-icon.d.ts +6 -0
  125. package/dist/ui/icons/download-02-icon.js +1 -0
  126. package/dist/ui/icons/download-icon.d.ts +1 -1
  127. package/dist/ui/icons/download-icon.js +1 -1
  128. package/dist/ui/icons/file-icon.d.ts +1 -1
  129. package/dist/ui/icons/file-icon.js +1 -1
  130. package/dist/ui/icons/heartbeat-icon.js +1 -1
  131. package/dist/ui/icons/info-circle-outine-icon.d.ts +1 -1
  132. package/dist/ui/icons/info-circle-outine-icon.js +1 -1
  133. package/dist/ui/icons/message-bubble-icon.d.ts +1 -1
  134. package/dist/ui/icons/message-bubble-icon.js +1 -1
  135. package/dist/ui/icons/message-square-icon.d.ts +1 -1
  136. package/dist/ui/icons/message-square-icon.js +1 -1
  137. package/dist/ui/icons/mic-icon.d.ts +1 -1
  138. package/dist/ui/icons/mic-icon.js +1 -1
  139. package/dist/ui/icons/mic-off-icon.d.ts +1 -1
  140. package/dist/ui/icons/mic-off-icon.js +1 -1
  141. package/dist/ui/icons/phone-icon.d.ts +1 -1
  142. package/dist/ui/icons/phone-icon.js +1 -1
  143. package/dist/ui/icons/tag-icon.d.ts +1 -1
  144. package/dist/ui/icons/tag-icon.js +1 -1
  145. package/dist/ui/icons/time-left-icon.js +1 -1
  146. package/dist/ui/icons/types.d.ts +2 -1
  147. package/dist/ui/icons/types.js +1 -1
  148. package/dist/ui/icons/upload-icon.d.ts +1 -1
  149. package/dist/ui/icons/upload-icon.js +1 -1
  150. package/dist/ui/icons/video-icon.d.ts +1 -1
  151. package/dist/ui/icons/video-icon.js +1 -1
  152. package/dist/ui/icons/video-off-icon.d.ts +1 -1
  153. package/dist/ui/icons/video-off-icon.js +1 -1
  154. package/dist/ui/icons/x-icon.d.ts +1 -1
  155. package/dist/ui/icons/x-icon.js +1 -1
  156. package/dist/ui/mq-callout.js +1 -1
  157. package/dist/ui/mq-dialog.js +1 -1
  158. package/dist/ui/mq-input.d.ts +1 -1
  159. package/dist/ui/mq-select.d.ts +1 -1
  160. package/dist/ui/mq-tabs.d.ts +27 -7
  161. package/dist/ui/mq-tabs.js +79 -1
  162. package/dist/ui/mq-text-button.js +1 -1
  163. package/dist/ui/mq-textarea.d.ts +1 -1
  164. package/dist/ui/mq-unread-badge.js +1 -1
  165. package/package.json +2 -1
  166. package/dist/chunks/api-chat-client-pGZWREjK.js +0 -1
  167. package/dist/chunks/index-6gxzoTLM.js +0 -1
  168. package/dist/chunks/index-CoZKmhwT.js +0 -1
  169. package/dist/ui/icons/check-circle-icon.d.ts +0 -5
  170. package/dist/ui/icons/check-circle-icon.js +0 -1
@@ -903,10 +903,13 @@ declare const GetSharedDocumentsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
903
903
  name: z$1.ZodString;
904
904
  professional: z$1.ZodObject<{
905
905
  speciality_id: z$1.ZodNumber;
906
+ speciality_name: z$1.ZodOptional<z$1.ZodString>;
906
907
  }, "strip", z$1.ZodTypeAny, {
907
908
  speciality_id: number;
909
+ speciality_name?: string | undefined;
908
910
  }, {
909
911
  speciality_id: number;
912
+ speciality_name?: string | undefined;
910
913
  }>;
911
914
  status: z$1.ZodEnum<["published", "draft"]>;
912
915
  url: z$1.ZodString;
@@ -918,6 +921,7 @@ declare const GetSharedDocumentsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
918
921
  created_at: string;
919
922
  professional: {
920
923
  speciality_id: number;
924
+ speciality_name?: string | undefined;
921
925
  };
922
926
  document_id: string;
923
927
  document_type: "prescription" | "report" | "diagnosticTestPrescription";
@@ -928,6 +932,7 @@ declare const GetSharedDocumentsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
928
932
  created_at: string;
929
933
  professional: {
930
934
  speciality_id: number;
935
+ speciality_name?: string | undefined;
931
936
  };
932
937
  document_id: string;
933
938
  document_type: "prescription" | "report" | "diagnosticTestPrescription";
@@ -997,10 +1002,13 @@ declare const GetPatientDocumentsResponseSchema: z$1.ZodObject<{
997
1002
  name: z$1.ZodString;
998
1003
  professional: z$1.ZodObject<{
999
1004
  speciality_id: z$1.ZodNumber;
1005
+ speciality_name: z$1.ZodOptional<z$1.ZodString>;
1000
1006
  }, "strip", z$1.ZodTypeAny, {
1001
1007
  speciality_id: number;
1008
+ speciality_name?: string | undefined;
1002
1009
  }, {
1003
1010
  speciality_id: number;
1011
+ speciality_name?: string | undefined;
1004
1012
  }>;
1005
1013
  status: z$1.ZodEnum<["published", "draft"]>;
1006
1014
  url: z$1.ZodString;
@@ -1012,6 +1020,7 @@ declare const GetPatientDocumentsResponseSchema: z$1.ZodObject<{
1012
1020
  created_at: string;
1013
1021
  professional: {
1014
1022
  speciality_id: number;
1023
+ speciality_name?: string | undefined;
1015
1024
  };
1016
1025
  document_id: string;
1017
1026
  document_type: "prescription" | "report" | "diagnosticTestPrescription";
@@ -1022,6 +1031,7 @@ declare const GetPatientDocumentsResponseSchema: z$1.ZodObject<{
1022
1031
  created_at: string;
1023
1032
  professional: {
1024
1033
  speciality_id: number;
1034
+ speciality_name?: string | undefined;
1025
1035
  };
1026
1036
  document_id: string;
1027
1037
  document_type: "prescription" | "report" | "diagnosticTestPrescription";
@@ -1050,6 +1060,7 @@ declare const GetPatientDocumentsResponseSchema: z$1.ZodObject<{
1050
1060
  created_at: string;
1051
1061
  professional: {
1052
1062
  speciality_id: number;
1063
+ speciality_name?: string | undefined;
1053
1064
  };
1054
1065
  document_id: string;
1055
1066
  document_type: "prescription" | "report" | "diagnosticTestPrescription";
@@ -1068,6 +1079,7 @@ declare const GetPatientDocumentsResponseSchema: z$1.ZodObject<{
1068
1079
  created_at: string;
1069
1080
  professional: {
1070
1081
  speciality_id: number;
1082
+ speciality_name?: string | undefined;
1071
1083
  };
1072
1084
  document_id: string;
1073
1085
  document_type: "prescription" | "report" | "diagnosticTestPrescription";
@@ -1,7 +1,7 @@
1
1
  import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { LitElement, PropertyValues } from 'lit';
4
- import { M as MediquoApiChatClient, a as Message, I as ImageMessage, F as FileMessage } from './index.d-Bl682CAX.js';
4
+ import { M as MediquoApiChatClient, a as Message, I as ImageMessage, F as FileMessage } from './index.d-XSe7Hy-Q.js';
5
5
  import '../ui/mq-avatar.js';
6
6
  import '../ui/mq-button.js';
7
7
  import '../ui/mq-skeleton.js';
@@ -1 +1 @@
1
- import{_ as t,c as o}from"./custom-element-D2ziPxYE.js";import{c as e}from"./consume-CovVqBjI.js";import{A as i}from"./api-client-context-V1UAGtKW.js";import{i as n,a as r,x as a}from"./lit-element-DiWJYFwC.js";import{n as s}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{downloadIcon as d}from"../ui/icons/download-icon.js";import"../ui/mq-button.js";import{m as p}from"./runtime-Bg1WXVCx.js";import{l as c}from"./localized-decorator-BlOuLhym.js";import{D as C}from"./api-chat-client-pGZWREjK.js";import{b as m}from"./blob-to-base64-CUL1trde.js";import{DownloadFileEvent as f}from"../events.js";import{getLocale as g}from"../i18n.js";const h=n`:host{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4);width:100%}.left{display:flex;flex-direction:column;gap:var(--sp-1);flex:1;min-width:0}.tag{border-radius:var(--border-radius-sm);display:inline-flex;align-items:center;justify-content:center;padding:var(--sp-0_5) var(--sp-2);background-color:#e5e5e5;width:fit-content}.tag-label{font-family:var(--font-body);font-size:11px;font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-transform:uppercase;letter-spacing:3px;line-height:normal}.title{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let v=class PatientDocument extends r{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=h}getFormatter(){const t=g().replace("_","-");return new Intl.DateTimeFormat(t,{year:"numeric",month:"numeric",day:"numeric"})}async _handleDownload(){this.isDownloading=!0;const t=await this.apiClient.flash.downloadDocument({url:this.downloadUrl}),o=await m(t);this.dispatchEvent(new f({url:o,filename:`${this.filename}.pdf`})),this.isDownloading=!1}formatKind(t){switch(t){case C.prescription:return p("Receta");case C.report:return p("Informe");case C.diagnosticTestPrescription:return p("Prescripción")}}render(){const t=this.getFormatter().format(new Date(this.date));return a`<div class="left"><div class="tag"><span class="tag-label">${this.formatKind(this.kind)}</span></div><div class="title">${t} - ${this.specialty}</div><div class="description">${this.description}</div></div><mq-button variant="ghost" size="icon-lg" @click="${this._handleDownload}" ?disabled="${this.isDownloading}">${d({size:24})}</mq-button>`}};t([e({context:i,subscribe:!0})],v.prototype,"apiClient",void 0),t([s({type:String})],v.prototype,"kind",void 0),t([s({type:String})],v.prototype,"filename",void 0),t([s({type:String})],v.prototype,"specialty",void 0),t([s({type:String})],v.prototype,"description",void 0),t([s({type:String})],v.prototype,"date",void 0),t([s({type:String})],v.prototype,"downloadUrl",void 0),t([l()],v.prototype,"isDownloading",void 0),v=t([c(),o("patient-document")],v);let u=class MQLayout extends r{constructor(){super(...arguments),this.background="default",this.variant="default",this.showMediquoBranding=!0}static{this.styles=n`:host{--content-max-width:560px;display:flex;flex-direction:column;height:100%;width:100%;max-width:var(--content-max-width);margin:0 auto;background-color:var(--color-background)}:host([background=solid]){background-color:var(--color-background)}:host([background=transparent]){background-color:transparent}:host([variant=wide]){--content-max-width:1000px}.content{flex:1;padding:var(--mq-layout-padding,0)}footer{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);padding-top:var(--sp-10);padding-bottom:var(--sp-3);padding-inline:var(--mq-layout-padding,0);margin-bottom:var(--sp-3);text-align:center}.branding{display:flex;justify-content:center;align-items:center;gap:var(--size-2);font-family:var(--font-body);font-size:var(--text-sm);line-height:normal;font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}`}render(){return this.showMediquoBranding?a`<div class="content"><slot></slot></div><footer><div class="branding">${p("Servicio y plataforma prestados por")} ${a`<svg width="82" height="16" viewBox="0 0 82 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M52.4506 8.97739V10.5665C52.4506 11.1054 52.0077 11.5477 51.4682 11.5477C50.9288 11.5477 50.486 11.1054 50.486 10.5665V8.97739H48.8531C48.3276 8.97739 47.8984 8.54894 47.8984 8.02383C47.8984 7.49893 48.3276 7.07053 48.8531 7.07053H50.486V5.48128C50.486 4.94243 50.9288 4.5002 51.4682 4.5002C52.0077 4.5002 52.4506 4.94243 52.4506 5.48128V7.07053H54.0836C54.609 7.07053 55.0379 7.49893 55.0379 8.02383C55.0379 8.54894 54.609 8.97739 54.0836 8.97739H52.4506ZM56.8563 5.46693C56.055 3.75203 54.5229 2.55033 52.6531 2.16979C52.3272 2.10809 51.9339 2.06818 51.5273 2.05679C48.7327 2.10005 46.4191 3.93204 45.7665 6.6209C45.397 8.13705 45.6843 9.78156 46.555 11.134C47.4258 12.4867 48.8053 13.431 50.3396 13.7243C51.7168 13.9883 53.0199 13.8046 54.2312 13.1767L54.2853 13.1506C54.554 13.0306 54.8304 12.9977 55.1481 13.0559L55.2243 13.0728C55.8277 13.2312 56.4308 13.389 57.0345 13.5467C56.8787 12.9784 56.7231 12.4168 56.5656 11.86L56.5512 11.8035C56.4673 11.4258 56.5163 11.0837 56.7011 10.7579C57.5947 9.11014 57.6548 7.17549 56.8563 5.46693ZM59.2901 15.5846C59.0891 15.8486 58.7811 16 58.4446 16C58.2872 16 58.1621 15.967 58.0617 15.9405L57.0944 15.6878C56.3739 15.4997 55.6553 15.312 54.936 15.1233C53.8594 15.6379 52.7204 15.8988 51.5464 15.8988C51.0243 15.8988 50.4877 15.8466 49.9521 15.7439C47.8668 15.3452 45.9973 14.0703 44.823 12.2461C43.6488 10.4223 43.2634 8.19505 43.7656 6.13553C44.6446 2.51324 47.7615 0.0472629 51.5211 0.000260881L51.5409 0L51.5605 0.000391321C52.0913 0.0140876 52.5926 0.0651767 53.0508 0.152094C55.5798 0.666768 57.6424 2.28597 58.7224 4.59729C59.7655 6.82947 59.7232 9.34593 58.6144 11.5401C58.8921 12.5275 59.1643 13.5268 59.4414 14.5471C59.4869 14.7106 59.6124 15.1611 59.2901 15.5846ZM79.7577 8.77869C79.7577 7.05748 78.5162 5.63246 76.7557 5.63246C74.9582 5.63246 73.8092 7.03887 73.8092 8.7416V8.77869C73.8092 10.4814 75.0508 11.9064 76.7927 11.9064C78.6089 11.9064 79.7577 10.4999 79.7577 8.81573V8.77869ZM76.7557 13.868C73.7722 13.868 71.5669 11.5915 71.5669 8.81573V8.77869C71.5669 5.98404 73.7907 3.67068 76.7927 3.67068C79.7949 3.67068 82 5.94717 82 8.7416V8.77869C82 11.5545 79.7764 13.868 76.7557 13.868ZM68.7934 13.7387C68.1816 13.7387 67.6628 13.2571 67.6628 12.6281V12.1285C67.0328 13.0538 66.1247 13.8495 64.6051 13.8495C62.4 13.8495 61.1213 12.3691 61.1213 10.0925V4.89208C61.1213 4.2631 61.6216 3.76329 62.2331 3.76329C62.8633 3.76329 63.3637 4.2631 63.3637 4.89208V9.42637C63.3637 10.944 64.1233 11.7951 65.4575 11.7951C66.7547 11.7951 67.6628 10.9071 67.6628 9.38919V4.89208C67.6628 4.2631 68.1631 3.76329 68.7934 3.76329C69.4048 3.76329 69.9236 4.2631 69.9236 4.89208V12.6281C69.9236 13.2386 69.4233 13.7387 68.7934 13.7387ZM40.4153 3.76329C41.0454 3.76329 41.5457 4.2631 41.5457 4.89208V12.6281C41.5457 13.2571 41.0454 13.7387 40.4153 13.7387C39.8038 13.7387 39.3034 13.2571 39.3034 12.6281V4.89208C39.3034 4.2631 39.7852 3.76329 40.4153 3.76329ZM40.4153 2.4678C39.6925 2.4678 39.1368 2.02361 39.1368 1.35732V1.2464C39.1368 0.580156 39.6925 0.154442 40.4153 0.154442C41.1379 0.154442 41.694 0.580156 41.694 1.2464V1.35732C41.694 2.02361 41.1379 2.4678 40.4153 2.4678ZM34.7693 8.7416C34.7693 6.85382 33.435 5.6139 31.9339 5.6139C30.3961 5.6139 29.1173 6.79821 29.1173 8.7416V8.77869C29.1173 10.6665 30.4145 11.9064 31.9339 11.9064C33.435 11.9064 34.7693 10.6476 34.7693 8.77869V8.7416ZM35.8627 13.7387C35.2325 13.7387 34.7321 13.2571 34.7321 12.6281V12.0172C34.0095 13.0353 32.9903 13.8495 31.3966 13.8495C29.0988 13.8495 26.8566 12.0172 26.8566 8.77869V8.7416C26.8566 5.50298 29.0616 3.67068 31.3966 3.67068C33.0088 3.67068 34.028 4.4665 34.7321 5.39189V1.15383C34.7321 0.524632 35.2325 0.0434802 35.8439 0.0434802C36.4742 0.0434802 36.9745 0.524632 36.9745 1.15383V12.6281C36.9745 13.2571 36.4742 13.7387 35.8627 13.7387ZM21.0065 5.50298C19.6353 5.50298 18.6718 6.55763 18.4678 8.07548H23.4897C23.3416 6.63203 22.4892 5.50298 21.0065 5.50298ZM24.6203 9.55589H18.4864C18.7272 11.1477 19.8578 12.0357 21.3032 12.0357C22.2482 12.0357 22.9895 11.7028 23.6196 11.1846C23.7863 11.0548 23.9346 10.981 24.194 10.981C24.6945 10.981 25.0836 11.3698 25.0836 11.8879C25.0836 12.1654 24.9539 12.406 24.787 12.5727C23.8975 13.3683 22.7858 13.868 21.2662 13.868C18.4308 13.868 16.244 11.8136 16.244 8.79712V8.76021C16.244 5.96556 18.227 3.67068 21.0253 3.67068C24.1384 3.67068 25.6765 6.22475 25.6765 8.48246C25.6765 9.1117 25.1948 9.55589 24.6203 9.55589ZM13.7686 13.7387C13.1387 13.7387 12.6382 13.2571 12.6382 12.6281V8.09396C12.6382 6.53915 11.9155 5.70655 10.6555 5.70655C9.43232 5.70655 8.56142 6.55763 8.56142 8.13083V12.6281C8.56142 13.2571 8.06108 13.7387 7.44958 13.7387C6.81941 13.7387 6.3192 13.2571 6.3192 12.6281V8.07548C6.3192 6.55763 5.57796 5.70655 4.33625 5.70655C3.09479 5.70655 2.24235 6.63203 2.24235 8.13083V12.6281C2.24235 13.2571 1.74205 13.7387 1.1118 13.7387C0.500341 13.7387 0 13.2571 0 12.6281V4.89208C0 4.2631 0.481844 3.76329 1.1118 3.76329C1.74205 3.76329 2.24235 4.2631 2.24235 4.89208V5.35475C2.87235 4.48511 3.72475 3.67068 5.22586 3.67068C6.63431 3.67068 7.63481 4.35545 8.15378 5.39189C8.93198 4.35545 9.96987 3.67068 11.4522 3.67068C13.5833 3.67068 14.8804 5.02183 14.8804 7.40919V12.6281C14.8804 13.2571 14.3988 13.7387 13.7686 13.7387Z" fill="#0A0A22"/></svg>`}</div></footer>`:a`<div class="content"><slot></slot></div>`}};t([s({type:String})],u.prototype,"background",void 0),t([s()],u.prototype,"variant",void 0),t([s({type:Boolean,attribute:"show-mediquo-branding"})],u.prototype,"showMediquoBranding",void 0),u=t([c(),o("mq-layout")],u);
1
+ import{_ as t,c as o}from"./custom-element-D2ziPxYE.js";import{c as e}from"./consume-CovVqBjI.js";import{A as i}from"./api-client-context-V1UAGtKW.js";import{i as n,a as r,x as a}from"./lit-element-DiWJYFwC.js";import{n as s}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{downloadIcon as d}from"../ui/icons/download-icon.js";import"../ui/mq-button.js";import{m as p}from"./runtime-Bg1WXVCx.js";import{l as c}from"./localized-decorator-BlOuLhym.js";import{D as C}from"./api-chat-client-CJ1EGJe3.js";import{b as m}from"./blob-to-base64-CUL1trde.js";import{DownloadFileEvent as f}from"../events.js";import{getLocale as g}from"../i18n.js";const h=n`:host{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4);width:100%}.left{display:flex;flex-direction:column;gap:var(--sp-1);flex:1;min-width:0}.tag{border-radius:var(--border-radius-sm);display:inline-flex;align-items:center;justify-content:center;padding:var(--sp-0_5) var(--sp-2);background-color:#e5e5e5;width:fit-content}.tag-label{font-family:var(--font-body);font-size:11px;font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-transform:uppercase;letter-spacing:3px;line-height:normal}.title{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let v=class PatientDocument extends r{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=h}getFormatter(){const t=g().replace("_","-");return new Intl.DateTimeFormat(t,{year:"numeric",month:"numeric",day:"numeric"})}async _handleDownload(){this.isDownloading=!0;const t=await this.apiClient.flash.downloadDocument({url:this.downloadUrl}),o=await m(t);this.dispatchEvent(new f({url:o,filename:`${this.filename}.pdf`})),this.isDownloading=!1}formatKind(t){switch(t){case C.prescription:return p("Receta");case C.report:return p("Informe");case C.diagnosticTestPrescription:return p("Prescripción")}}render(){const t=this.getFormatter().format(new Date(this.date));return a`<div class="left"><div class="tag"><span class="tag-label">${this.formatKind(this.kind)}</span></div><div class="title">${t} - ${this.specialty}</div><div class="description">${this.description}</div></div><mq-button variant="ghost" size="icon-lg" @click="${this._handleDownload}" ?disabled="${this.isDownloading}">${d({size:24})}</mq-button>`}};t([e({context:i,subscribe:!0})],v.prototype,"apiClient",void 0),t([s({type:String})],v.prototype,"kind",void 0),t([s({type:String})],v.prototype,"filename",void 0),t([s({type:String})],v.prototype,"specialty",void 0),t([s({type:String})],v.prototype,"description",void 0),t([s({type:String})],v.prototype,"date",void 0),t([s({type:String})],v.prototype,"downloadUrl",void 0),t([l()],v.prototype,"isDownloading",void 0),v=t([c(),o("patient-document")],v);let u=class MQLayout extends r{constructor(){super(...arguments),this.background="default",this.variant="default",this.showMediquoBranding=!0}static{this.styles=n`:host{--content-max-width:560px;display:flex;flex-direction:column;height:100%;width:100%;max-width:var(--content-max-width);margin:0 auto;background-color:var(--color-background)}:host([background=solid]){background-color:var(--color-background)}:host([background=transparent]){background-color:transparent}:host([variant=wide]){--content-max-width:1000px}.content{flex:1;padding:var(--mq-layout-padding,0)}footer{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);padding-top:var(--sp-10);padding-bottom:var(--sp-3);padding-inline:var(--mq-layout-padding,0);margin-bottom:var(--sp-3);text-align:center}.branding{display:flex;justify-content:center;align-items:center;gap:var(--size-2);font-family:var(--font-body);font-size:var(--text-sm);line-height:normal;font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}`}render(){return this.showMediquoBranding?a`<div class="content"><slot></slot></div><footer><div class="branding">${p("Servicio y plataforma prestados por")} ${a`<svg width="82" height="16" viewBox="0 0 82 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M52.4506 8.97739V10.5665C52.4506 11.1054 52.0077 11.5477 51.4682 11.5477C50.9288 11.5477 50.486 11.1054 50.486 10.5665V8.97739H48.8531C48.3276 8.97739 47.8984 8.54894 47.8984 8.02383C47.8984 7.49893 48.3276 7.07053 48.8531 7.07053H50.486V5.48128C50.486 4.94243 50.9288 4.5002 51.4682 4.5002C52.0077 4.5002 52.4506 4.94243 52.4506 5.48128V7.07053H54.0836C54.609 7.07053 55.0379 7.49893 55.0379 8.02383C55.0379 8.54894 54.609 8.97739 54.0836 8.97739H52.4506ZM56.8563 5.46693C56.055 3.75203 54.5229 2.55033 52.6531 2.16979C52.3272 2.10809 51.9339 2.06818 51.5273 2.05679C48.7327 2.10005 46.4191 3.93204 45.7665 6.6209C45.397 8.13705 45.6843 9.78156 46.555 11.134C47.4258 12.4867 48.8053 13.431 50.3396 13.7243C51.7168 13.9883 53.0199 13.8046 54.2312 13.1767L54.2853 13.1506C54.554 13.0306 54.8304 12.9977 55.1481 13.0559L55.2243 13.0728C55.8277 13.2312 56.4308 13.389 57.0345 13.5467C56.8787 12.9784 56.7231 12.4168 56.5656 11.86L56.5512 11.8035C56.4673 11.4258 56.5163 11.0837 56.7011 10.7579C57.5947 9.11014 57.6548 7.17549 56.8563 5.46693ZM59.2901 15.5846C59.0891 15.8486 58.7811 16 58.4446 16C58.2872 16 58.1621 15.967 58.0617 15.9405L57.0944 15.6878C56.3739 15.4997 55.6553 15.312 54.936 15.1233C53.8594 15.6379 52.7204 15.8988 51.5464 15.8988C51.0243 15.8988 50.4877 15.8466 49.9521 15.7439C47.8668 15.3452 45.9973 14.0703 44.823 12.2461C43.6488 10.4223 43.2634 8.19505 43.7656 6.13553C44.6446 2.51324 47.7615 0.0472629 51.5211 0.000260881L51.5409 0L51.5605 0.000391321C52.0913 0.0140876 52.5926 0.0651767 53.0508 0.152094C55.5798 0.666768 57.6424 2.28597 58.7224 4.59729C59.7655 6.82947 59.7232 9.34593 58.6144 11.5401C58.8921 12.5275 59.1643 13.5268 59.4414 14.5471C59.4869 14.7106 59.6124 15.1611 59.2901 15.5846ZM79.7577 8.77869C79.7577 7.05748 78.5162 5.63246 76.7557 5.63246C74.9582 5.63246 73.8092 7.03887 73.8092 8.7416V8.77869C73.8092 10.4814 75.0508 11.9064 76.7927 11.9064C78.6089 11.9064 79.7577 10.4999 79.7577 8.81573V8.77869ZM76.7557 13.868C73.7722 13.868 71.5669 11.5915 71.5669 8.81573V8.77869C71.5669 5.98404 73.7907 3.67068 76.7927 3.67068C79.7949 3.67068 82 5.94717 82 8.7416V8.77869C82 11.5545 79.7764 13.868 76.7557 13.868ZM68.7934 13.7387C68.1816 13.7387 67.6628 13.2571 67.6628 12.6281V12.1285C67.0328 13.0538 66.1247 13.8495 64.6051 13.8495C62.4 13.8495 61.1213 12.3691 61.1213 10.0925V4.89208C61.1213 4.2631 61.6216 3.76329 62.2331 3.76329C62.8633 3.76329 63.3637 4.2631 63.3637 4.89208V9.42637C63.3637 10.944 64.1233 11.7951 65.4575 11.7951C66.7547 11.7951 67.6628 10.9071 67.6628 9.38919V4.89208C67.6628 4.2631 68.1631 3.76329 68.7934 3.76329C69.4048 3.76329 69.9236 4.2631 69.9236 4.89208V12.6281C69.9236 13.2386 69.4233 13.7387 68.7934 13.7387ZM40.4153 3.76329C41.0454 3.76329 41.5457 4.2631 41.5457 4.89208V12.6281C41.5457 13.2571 41.0454 13.7387 40.4153 13.7387C39.8038 13.7387 39.3034 13.2571 39.3034 12.6281V4.89208C39.3034 4.2631 39.7852 3.76329 40.4153 3.76329ZM40.4153 2.4678C39.6925 2.4678 39.1368 2.02361 39.1368 1.35732V1.2464C39.1368 0.580156 39.6925 0.154442 40.4153 0.154442C41.1379 0.154442 41.694 0.580156 41.694 1.2464V1.35732C41.694 2.02361 41.1379 2.4678 40.4153 2.4678ZM34.7693 8.7416C34.7693 6.85382 33.435 5.6139 31.9339 5.6139C30.3961 5.6139 29.1173 6.79821 29.1173 8.7416V8.77869C29.1173 10.6665 30.4145 11.9064 31.9339 11.9064C33.435 11.9064 34.7693 10.6476 34.7693 8.77869V8.7416ZM35.8627 13.7387C35.2325 13.7387 34.7321 13.2571 34.7321 12.6281V12.0172C34.0095 13.0353 32.9903 13.8495 31.3966 13.8495C29.0988 13.8495 26.8566 12.0172 26.8566 8.77869V8.7416C26.8566 5.50298 29.0616 3.67068 31.3966 3.67068C33.0088 3.67068 34.028 4.4665 34.7321 5.39189V1.15383C34.7321 0.524632 35.2325 0.0434802 35.8439 0.0434802C36.4742 0.0434802 36.9745 0.524632 36.9745 1.15383V12.6281C36.9745 13.2571 36.4742 13.7387 35.8627 13.7387ZM21.0065 5.50298C19.6353 5.50298 18.6718 6.55763 18.4678 8.07548H23.4897C23.3416 6.63203 22.4892 5.50298 21.0065 5.50298ZM24.6203 9.55589H18.4864C18.7272 11.1477 19.8578 12.0357 21.3032 12.0357C22.2482 12.0357 22.9895 11.7028 23.6196 11.1846C23.7863 11.0548 23.9346 10.981 24.194 10.981C24.6945 10.981 25.0836 11.3698 25.0836 11.8879C25.0836 12.1654 24.9539 12.406 24.787 12.5727C23.8975 13.3683 22.7858 13.868 21.2662 13.868C18.4308 13.868 16.244 11.8136 16.244 8.79712V8.76021C16.244 5.96556 18.227 3.67068 21.0253 3.67068C24.1384 3.67068 25.6765 6.22475 25.6765 8.48246C25.6765 9.1117 25.1948 9.55589 24.6203 9.55589ZM13.7686 13.7387C13.1387 13.7387 12.6382 13.2571 12.6382 12.6281V8.09396C12.6382 6.53915 11.9155 5.70655 10.6555 5.70655C9.43232 5.70655 8.56142 6.55763 8.56142 8.13083V12.6281C8.56142 13.2571 8.06108 13.7387 7.44958 13.7387C6.81941 13.7387 6.3192 13.2571 6.3192 12.6281V8.07548C6.3192 6.55763 5.57796 5.70655 4.33625 5.70655C3.09479 5.70655 2.24235 6.63203 2.24235 8.13083V12.6281C2.24235 13.2571 1.74205 13.7387 1.1118 13.7387C0.500341 13.7387 0 13.2571 0 12.6281V4.89208C0 4.2631 0.481844 3.76329 1.1118 3.76329C1.74205 3.76329 2.24235 4.2631 2.24235 4.89208V5.35475C2.87235 4.48511 3.72475 3.67068 5.22586 3.67068C6.63431 3.67068 7.63481 4.35545 8.15378 5.39189C8.93198 4.35545 9.96987 3.67068 11.4522 3.67068C13.5833 3.67068 14.8804 5.02183 14.8804 7.40919V12.6281C14.8804 13.2571 14.3988 13.7387 13.7686 13.7387Z" fill="#0A0A22"/></svg>`}</div></footer>`:a`<div class="content"><slot></slot></div>`}};t([s({type:String})],u.prototype,"background",void 0),t([s()],u.prototype,"variant",void 0),t([s({type:Boolean,attribute:"show-mediquo-branding"})],u.prototype,"showMediquoBranding",void 0),u=t([c(),o("mq-layout")],u);
@@ -1,12 +1,9 @@
1
1
  import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { LitElement } from 'lit';
4
- import { M as MediquoApiChatClient } from './index.d-Bl682CAX.js';
4
+ import { M as MediquoApiChatClient } from './index.d-XSe7Hy-Q.js';
5
5
  import '../ui/mq-button.js';
6
- import z from 'zod';
7
-
8
- declare const DocumentTypeSchema: z.ZodEnum<["prescription", "report", "diagnosticTestPrescription"]>;
9
- type DocumentType = z.infer<typeof DocumentTypeSchema>;
6
+ import { D as DocumentType } from './document.model.d-DIzMiOmd.js';
10
7
 
11
8
  /**
12
9
  * @fires download-file - Fired when the user requests a download (bubbles, composed; `url` and `filename` on the event)
@@ -0,0 +1 @@
1
+ import{_ as e,c as t}from"./custom-element-D2ziPxYE.js";import{c as i}from"./consume-CovVqBjI.js";import{m as n,s as o}from"./runtime-Bg1WXVCx.js";import{l as a}from"./localized-decorator-BlOuLhym.js";import{Q as s}from"./query-controller-BlO1Ax65.js";import{A as r}from"./api-client-context-V1UAGtKW.js";import{l}from"./chunk-S5RWG6G2-DPesx3Od.js";import{i as c,A as p}from"./api-chat-client-CJ1EGJe3.js";import{g as m}from"./get-organization-setup-query-Dr1cXnHl.js";import{g as d,t as h,a as u,b as g,c as f,d as v,e as b}from"./telemetry-client-BdPx4SXu.js";import{g as y}from"./chunk-Y4EKUX25-QqMl3eiq.js";import{c as $}from"./refund-cancel-policy-CcsJ-pMx.js";import{i as x,a as w,E as C,x as O}from"./lit-element-DiWJYFwC.js";import{n as k}from"./property-scuRaFcM.js";import{r as j}from"./state-LQivXIgA.js";import{g as M}from"./action-unavailable-message-BIgsXk9u.js";import{MqAppointmentJoinVideocallEvent as z,MqAppointmentRescheduleEvent as q}from"../events.js";import{getLocale as I}from"../i18n.js";import{calendarIcon as R}from"../ui/icons/calendar-icon.js";import{dotsHorizontalIcon as S}from"../ui/icons/dots-horizontal-icon.js";import{messageBubbleIcon as _}from"../ui/icons/message-bubble-icon.js";import{phoneIcon as D}from"../ui/icons/phone-icon.js";import{videoIcon as E}from"../ui/icons/video-icon.js";import"../mq-chat-room.js";import"./professional-overview-C4H_znIJ.js";import"../ui/mq-button.js";import"../ui/mq-floating-bubble.js";import"../ui/mq-unread-badge.js";import{toast as T}from"../ui/mq-toast.js";const P=x`:host{display:flex;flex-direction:column;justify-content:space-between;gap:var(--sp-6);flex:1;width:100%;min-width:0;box-sizing:border-box;color:var(--color-text-icons--primary,#0a0a22)}professional-overview{--avatar-size-lg:66px;--text-lg--line-height:1.35;display:block}.details{display:flex;flex-direction:column;align-items:flex-start;gap:var(--sp-3)}.detail-row{display:inline-flex;align-items:center;gap:var(--sp-2);font-family:var(--font-body);font-size:var(--text-sm);line-height:1.35;font-weight:var(--font-weight-normal)}.detail-row svg{flex-shrink:0}.detail-row span::first-letter{text-transform:uppercase}.footer{display:flex;flex-direction:column;gap:var(--sp-4)}.reminder{font-family:var(--font-body);font-size:var(--text-sm);line-height:1.35;font-weight:var(--font-weight-normal);color:var(--color-text-icons--secondary,#6d658b);margin:0}.actions{--button-height-md:2.75rem;display:flex;align-items:stretch;gap:10px}.actions>mq-button{flex:1;min-width:0}.overflow{position:relative;flex:0 0 auto}.chat-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-badge{--mq-unread-badge-size:8px;flex-shrink:0}@media (max-width:767px){.actions{flex-wrap:wrap}.actions>mq-button.join{order:1;flex:1 0 100%}}.menu{position:absolute;right:0;bottom:calc(100% + var(--sp-2));z-index:2;display:flex;flex-direction:column;min-width:176px;padding:var(--sp-1);background-color:var(--color-card,#fff);border:1px solid var(--color-border-subtle,#edecf1);border-radius:var(--border-radius-lg);box-shadow:var(--shadow-lg)}.menu-item{display:block;width:100%;background:0 0;border:none;border-radius:var(--border-radius-sm);padding:var(--sp-2) var(--sp-3);cursor:pointer;text-align:left;font-family:var(--font-body);font-size:var(--text-sm);line-height:1.35;color:var(--color-text-icons--primary,#0a0a22)}.menu-item:hover{background-color:var(--color-muted)}.menu-item.negative{color:var(--color-negative)}`;let U=class NextAppointmentCard extends w{constructor(){super(...arguments),this.token="",this.patientHash="",this.isChatOpen=!1,this.isMenuOpen=!1,this.isCancelDialogOpen=!1,this.openDialog=null,this.getUnreadMessagesQuery=new s(this,()=>({...y(this.apiClient,{roomId:this.appointmentResource?.room?.id}),enabled:!!this.appointmentResource?.room?.id})),this.getOrganizationSetupQuery=new s(this,()=>m(this.apiClient)),this.getOrganizationSpecialtiesQuery=new s(this,()=>d(this.apiClient,{enabled:!!this.appointmentResource?.speciality?.id})),this.closeMenuOnOutsideClick=e=>{e.composedPath().includes(this)||(this.isMenuOpen=!1)},this.closeMenuOnEscape=e=>{"Escape"===e.key&&(this.isMenuOpen=!1)},this.handleJoinVideocall=()=>{h.track(u(this.sessionPatientHash,this.appointmentId)),this.dispatchEvent(new z({appointmentId:this.appointmentId}))},this.handleToggleChat=()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&h.track(g(this.sessionPatientHash,this.appointmentId))},this.handleModify=()=>{this.isMenuOpen=!1,this.isModifyUnavailable?this.openDialog="modify":(h.track(f(this.sessionPatientHash,this.appointmentId)),this.dispatchEvent(new q({appointmentId:this.appointmentId})))},this.handleCancel=()=>{this.isMenuOpen=!1,this.isCancelUnavailable?this.openDialog="cancel":(h.track(v(this.sessionPatientHash,this.appointmentId)),this.isCancelDialogOpen=!0)}}static{this.styles=P}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.closeMenuOnOutsideClick),document.addEventListener("keydown",this.closeMenuOnEscape)}disconnectedCallback(){document.removeEventListener("click",this.closeMenuOnOutsideClick),document.removeEventListener("keydown",this.closeMenuOnEscape),super.disconnectedCallback()}get appointmentId(){return this.appointmentResource.appointment.id??""}get channel(){return this.appointmentResource.appointment.channel}get sessionToken(){return this.token||this.loginToken?.access_token||""}get sessionPatientHash(){return this.patientHash||this.loginToken?.patient?.hash||""}get sessionTimezone(){return this.timezone??this.loginToken?.patient?.timezone}get unreadCount(){return this.getUnreadMessagesQuery.result?.data?.unread_count??0}get specialtyName(){const e=this.getOrganizationSpecialtiesQuery.result?.data?.find(e=>Number(e.id)===Number(this.appointmentResource.speciality?.id));return b(e?.code??"",I(),e?.name??this.appointmentResource.speciality?.name)}get hasChatSupport(){return this.appointmentResource.appointment.has_chat_in_appointment??this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment??!1}get isExpired(){return c(this.appointmentResource.appointment.expires_at)}get refundPolicySeconds(){return this.getOrganizationSetupQuery.result?.data?.appointments?.seconds_before_start_to_refund_on_cancel}get policyAllowsModifyOrCancel(){return $({startsAtIso:this.appointmentResource.appointment.starts_at,refundPolicySeconds:this.refundPolicySeconds})}get isModifyUnavailable(){return this.isExpired||0===this.appointmentResource.slots.length||!this.policyAllowsModifyOrCancel}get isCancelUnavailable(){return this.isExpired||!this.policyAllowsModifyOrCancel}get modifyUnavailableMessage(){return M({action:"modify",refundPolicySeconds:this.refundPolicySeconds})}get cancelUnavailableMessage(){return M({action:"cancel",refundPolicySeconds:this.refundPolicySeconds})}channelIcon(){switch(this.channel){case p.videocall:return E({size:20});case p.phonecall:return D({size:20});default:return _({size:20})}}channelLabel(){switch(this.channel){case p.videocall:return n("Videoconsulta");case p.phonecall:return n("Consulta telefónica");default:return n("Chat")}}formatWhen(){const e=I().replace("_","-"),t=this.sessionTimezone?{timeZone:this.sessionTimezone}:{},i=new Date(this.appointmentResource.appointment.starts_at);if(Number.isNaN(i.getTime()))return"";const a=new Intl.DateTimeFormat(e,{weekday:"long",day:"numeric",month:"long",year:"numeric",...t}).format(i),s=new Intl.DateTimeFormat(e,{timeStyle:"short",...t}).format(i);return n(o`${a}, ${s} h`)}renderActions(){const e=this.channel===p.videocall;return O`<div class="actions">${this.hasChatSupport?O`<mq-button variant="outline" @click="${this.handleToggleChat}"><span class="chat-label">${n("Ir a chat")}</span> ${this.unreadCount>0?O`<mq-unread-badge class="chat-badge"></mq-unread-badge>`:C}</mq-button>`:C} ${e?O`<mq-button class="join" variant="primary" @click="${this.handleJoinVideocall}">${n("Unirse a la videoconsulta")}</mq-button>`:C}<div class="overflow"><mq-button variant="outline" size="icon-lg" aria-label="${n("Más opciones")}" aria-haspopup="menu" aria-expanded="${this.isMenuOpen}" @click="${()=>{this.isMenuOpen=!this.isMenuOpen}}">${S({size:16})}</mq-button>${this.isMenuOpen?O`<div class="menu" role="menu"><button class="menu-item" type="button" role="menuitem" @click="${this.handleModify}">${n("Modificar cita")}</button> <button class="menu-item negative" type="button" role="menuitem" @click="${this.handleCancel}">${n("Anular cita")}</button></div>`:C}</div></div>`}render(){const{professional:e}=this.appointmentResource,t=this.formatWhen();return O`<professional-overview .name="${e.name}" .specialtyName="${this.specialtyName}" .collegiateNumber="${e.collegiate_number??void 0}" .description="${e.description??""}" .languages="${e.languages??[]}" .avatar="${e.avatar??""}"></professional-overview><div class="details">${t?O`<div class="detail-row">${R({size:20})} <span>${t}</span></div>`:C}<div class="detail-row">${this.channelIcon()} <span>${this.channelLabel()}</span></div></div><div class="footer"><p class="reminder">${n("Recibirás un recordatorio 15 minutos antes de la consulta")}</p>${this.renderActions()}</div><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" hideCloseButton @mq-close="${()=>{this.isChatOpen=!1}}">${this.isChatOpen?O`<mq-chat-room slot="content" .consultationId="${this.appointmentResource.appointment.id}" consultation-type="appointment" token="${this.sessionToken}" .roomId="${this.appointmentResource.room.id}" .professionalHash="${e.hash}" ?readonly="${this.isExpired}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}"></mq-chat-room>`:C}</mq-floating-bubble><appointment-action-unavailable-dialog .open="${"modify"===this.openDialog}" .heading="${n("Modificar cita")}" .message="${this.modifyUnavailableMessage}" @close="${()=>{this.openDialog=null}}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"cancel"===this.openDialog}" .heading="${n("Anular cita")}" .message="${this.cancelUnavailableMessage}" @close="${()=>{this.openDialog=null}}"></appointment-action-unavailable-dialog><cancel-appointment-confirmation-dialog .appointmentId="${this.appointmentResource.appointment.id}" .price="${this.appointmentResource.price??void 0}" .open="${this.isCancelDialogOpen}" @cancel="${()=>{this.isCancelDialogOpen=!1}}" @success="${()=>{this.isCancelDialogOpen=!1,T.success(n("Consulta anulada correctamente")),this.dispatchEvent(new CustomEvent("appointment-cancel-confirmed",{bubbles:!0,composed:!0,detail:{id:this.appointmentId}}))}}"></cancel-appointment-confirmation-dialog>`}};e([i({context:r,subscribe:!0})],U.prototype,"apiClient",void 0),e([i({context:l,subscribe:!0})],U.prototype,"loginToken",void 0),e([k({type:Object})],U.prototype,"appointmentResource",void 0),e([k({type:String})],U.prototype,"token",void 0),e([k({type:String})],U.prototype,"patientHash",void 0),e([k({type:String})],U.prototype,"timezone",void 0),e([j()],U.prototype,"isChatOpen",void 0),e([j()],U.prototype,"isMenuOpen",void 0),e([j()],U.prototype,"isCancelDialogOpen",void 0),e([j()],U.prototype,"openDialog",void 0),U=e([a(),t("next-appointment-card")],U);
@@ -0,0 +1,61 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { LitElement } from 'lit';
4
+ import { M as MediquoApiChatClient, G as GetAppointmentsResponse } from './index.d-XSe7Hy-Q.js';
5
+ import { L as LoginTokenResponse } from './schemas.d-b6_AekBb.js';
6
+ import './mq-chat-room-jeDvIF1Z.js';
7
+ import './appointment-action-unavailable-dialog-CTiL4nMo.js';
8
+ import './professional-overview-mO3tuMuH.js';
9
+ import '../ui/mq-button.js';
10
+ import '../ui/mq-floating-bubble.js';
11
+ import '../ui/mq-unread-badge.js';
12
+
13
+ declare class NextAppointmentCard extends LitElement {
14
+ static styles: lit.CSSResult;
15
+ apiClient: MediquoApiChatClient;
16
+ loginToken?: LoginTokenResponse;
17
+ appointmentResource: GetAppointmentsResponse["data"][number];
18
+ token: string;
19
+ patientHash: string;
20
+ timezone?: string;
21
+ private isChatOpen;
22
+ private isMenuOpen;
23
+ private isCancelDialogOpen;
24
+ private openDialog;
25
+ private getUnreadMessagesQuery;
26
+ private getOrganizationSetupQuery;
27
+ private getOrganizationSpecialtiesQuery;
28
+ private closeMenuOnOutsideClick;
29
+ private closeMenuOnEscape;
30
+ connectedCallback(): void;
31
+ disconnectedCallback(): void;
32
+ private get appointmentId();
33
+ private get channel();
34
+ private get sessionToken();
35
+ private get sessionPatientHash();
36
+ private get sessionTimezone();
37
+ private get unreadCount();
38
+ private get specialtyName();
39
+ private get hasChatSupport();
40
+ private get isExpired();
41
+ private get refundPolicySeconds();
42
+ private get policyAllowsModifyOrCancel();
43
+ private get isModifyUnavailable();
44
+ private get isCancelUnavailable();
45
+ private get modifyUnavailableMessage();
46
+ private get cancelUnavailableMessage();
47
+ private channelIcon;
48
+ private channelLabel;
49
+ private formatWhen;
50
+ private handleJoinVideocall;
51
+ private handleToggleChat;
52
+ private handleModify;
53
+ private handleCancel;
54
+ private renderActions;
55
+ render(): lit_html.TemplateResult<1>;
56
+ }
57
+ declare global {
58
+ interface HTMLElementTagNameMap {
59
+ "next-appointment-card": NextAppointmentCard;
60
+ }
61
+ }
@@ -1 +1 @@
1
- import{s as t}from"./chunk-6CCJWPGL-TiaqZaPV.js";function e(e,n){return{queryKey:t(e,"organization-specialties"),queryFn:()=>e.organizations.getOrganizationSpecialties(),...n}}function n(t,e){return{action_type:"event",event_type:"access to videocall button click",patient_hash:t,id_appointment:e}}function i(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function a(t,e){return{action_type:"event",event_type:"modify appoinment button click",patient_hash:t,id_appointment:e}}function o(t,e){return{action_type:"event",event_type:"cancel appoinment button click",patient_hash:t,id_appointment:e}}function p(t,e){return{action_type:"event",event_type:"view appointment document list button click",patient_hash:t,id_appointment:e}}function s(t,e){return{action_type:"event",event_type:"repeat appointment button click",patient_hash:t,id_appointment:e}}function c(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function _(t,e){return{action_type:"event",event_type:"access to videocall button click",patient_hash:t,id_appointment:e}}function r(t,e){return{action_type:"event",event_type:"add to calendar button click",patient_hash:t,id_appointment:e}}function l(t,e){return{action_type:"pageview",event_type:"appointment success page view",patient_hash:t,id_appointment:e}}function u(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function d(t,e){return{action_type:"event",event_type:"update documentation",patient_hash:t,id_appointment:e}}function y(t,e){return{action_type:"pageview",event_type:"documentation page view",patient_hash:t,id_appointment:e}}function h(t){return{action_type:"event",event_type:"view documentation list button click",patient_hash:t}}function v(t,e){return{action_type:"event",event_type:"download document button click",patient_hash:t,id_document:e}}function g(t){return{action_type:"event",event_type:"make an appointment button click",patient_hash:t}}function m(t){return{action_type:"event",event_type:"view appointment list button click",patient_hash:t}}function f(t){return{action_type:"pageview",event_type:"home page view",patient_hash:t}}function E(t,e,n){return{action_type:"event",event_type:"find availability button click",patient_hash:t,speciality_id:e,service_id:n}}function S(t,e,n,i,a,o,p){return{action_type:"debug",event_type:"find availability result",patient_hash:t,speciality_id:e,service_id:n,first_slot_date:i,first_slot_professional_hash:a,total_professionals:o,total_slots:p}}function k(t,e,n,i,a){return{action_type:"event",event_type:"professional schedule slot button click",patient_hash:t,professional_hash:e,start_date:n,speciality_id:i,service_id:a}}function b(t,e,n,i){return{action_type:"event",event_type:"professional availability button click",patient_hash:t,professional_hash:e,speciality_id:n,service_id:i}}function T(t,e,n,i,a){return{action_type:"event",event_type:"confirm appointment button click",patient_hash:t,professional_hash:e,start_date:n,speciality_id:i,service_id:a}}function w(t){return{action_type:"pageview",event_type:"select professional step page view",patient_hash:t}}function P(t,e){return{action_type:"pageview",event_type:"not time yet pageview",patient_hash:t,id_appointment:e}}function C(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function D(t,e){return{action_type:"pageview",event_type:"waiting room pageview",patient_hash:t,id_appointment:e}}function q(t,e){return{action_type:"pageview",event_type:"videocall pageview",patient_hash:t,id_appointment:e}}var K={digestive_system:{de_DE:"Verdauungssystem",en_US:"Digestive System",es_ES:"Aparato Digestivo",ca_ES:"Aparell Digestiu",pt_PT:"Aparelho Digestivo"},orthopedic_surgery_traumatology:{de_DE:"Traumatologie und Orthopädische Chirurgie",en_US:"Traumatology and Orthopedic Surgery",es_ES:"Traumatología y Cirugía Ortopédica",ca_ES:"Traumatologia i Cirurgia Ortopèdica",pt_PT:"Traumatologia e Cirurgia Ortopédica"},gynecology:{de_DE:"Gynäkologie",en_US:"Gynecology",es_ES:"Ginecología",ca_ES:"Ginecologia",pt_PT:"Ginecologia"},endocrinology:{de_DE:"Endokrinologie",en_US:"Endocrinology",es_ES:"Endocrinología",ca_ES:"Endocrinologia",pt_PT:"Endocrinologia"},psychiatry:{de_DE:"Psychiatrie",en_US:"Psychiatry",es_ES:"Psiquiatría",ca_ES:"Psiquiatria",pt_PT:"Psiquiatria"}},O={videocall:{de_DE:"Videosprechstunde",en_US:"Videocall",es_ES:"Videoconsulta",ca_ES:"Videoconsulta",pt_PT:"Videoconsulta"},phonecall:{de_DE:"Telefonische Behandlung",en_US:"Phone consultation",es_ES:"Consulta telefónica",ca_ES:"Consulta telefònica",pt_PT:"Consulta telefónica"}},U={de_DE:"Konsultationspreis",en_US:"Consultation price",es_ES:"Precio de consulta",ca_ES:"Preu de consulta",pt_PT:"Preço da consulta"},G={videocall:"videocall",phonecall:"phonecall",adeslas_videocall:"videocall",adeslas_prod_videocall:"videocall",adeslas_phonecall:"phonecall",adeslas_prod_phonecall:"phonecall"};function A(t,e,n){if(!t)return n??"";const i=G[t];return i?O[i][e]:n??U[e]}var V={consulta_telefonica:"phonecall",videoconsulta:"videocall"},x={"aparato-digestivo":"digestive_system","cirugia-ortopedica-y-traumatologia":"orthopedic_surgery_traumatology",ginecologia:"gynecology",endocrinologia:"endocrinology",psiquiatria:"psychiatry"};function z(t,e,n){const i=n?.trim();if(i)return i;const a=K[t]?.[e];return void 0!==a?a:t}class HttpTransport{endpoint;apiKey;constructor(t,e){this.endpoint=t,this.apiKey=e}send(t){fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":this.apiKey},body:JSON.stringify(t)}).catch(()=>{})}}class MediquoTelemetryClient{_apiKey=null;_transport=null;setApiKey(t){this._apiKey=t,this._buildTransport()}track(t){null!==this._transport&&this._transport.send(t)}_buildTransport(){null!==this._apiKey&&(this._transport=new HttpTransport("https://tracking.____.mediquo.com/sdk",this._apiKey))}}const j=new class AppTelemetryClient extends MediquoTelemetryClient{track(t){}};export{k as A,b as B,S as C,w as D,P as E,C as F,D as G,q as H,V as S,z as a,y as b,d as c,v as d,u as e,a as f,e as g,o as h,s as i,n as j,p as k,i as l,l as m,r as n,c as o,_ as p,g as q,h as r,f as s,j as t,x as u,m as v,A as w,T as x,E as y,K as z};
1
+ import{s as t}from"./chunk-6CCJWPGL-TiaqZaPV.js";function e(e,n){return{queryKey:t(e,"organization-specialties"),queryFn:()=>e.organizations.getOrganizationSpecialties(),...n}}function n(t,e){return{action_type:"event",event_type:"access to videocall button click",patient_hash:t,id_appointment:e}}function i(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function a(t,e){return{action_type:"event",event_type:"modify appoinment button click",patient_hash:t,id_appointment:e}}function o(t,e){return{action_type:"event",event_type:"cancel appoinment button click",patient_hash:t,id_appointment:e}}function p(t,e){return{action_type:"event",event_type:"view appointment document list button click",patient_hash:t,id_appointment:e}}function s(t,e){return{action_type:"event",event_type:"repeat appointment button click",patient_hash:t,id_appointment:e}}function c(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function _(t,e){return{action_type:"event",event_type:"access to videocall button click",patient_hash:t,id_appointment:e}}function r(t,e){return{action_type:"event",event_type:"add to calendar button click",patient_hash:t,id_appointment:e}}function l(t,e){return{action_type:"pageview",event_type:"appointment success page view",patient_hash:t,id_appointment:e}}function u(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function d(t,e){return{action_type:"event",event_type:"update documentation",patient_hash:t,id_appointment:e}}function y(t,e){return{action_type:"pageview",event_type:"documentation page view",patient_hash:t,id_appointment:e}}function h(t){return{action_type:"event",event_type:"view documentation list button click",patient_hash:t}}function v(t,e){return{action_type:"event",event_type:"download document button click",patient_hash:t,id_document:e}}function g(t){return{action_type:"event",event_type:"make an appointment button click",patient_hash:t}}function m(t){return{action_type:"event",event_type:"view appointment list button click",patient_hash:t}}function f(t){return{action_type:"pageview",event_type:"home page view",patient_hash:t}}function E(t,e,n){return{action_type:"event",event_type:"find availability button click",patient_hash:t,speciality_id:e,service_id:n}}function S(t,e,n,i,a,o,p){return{action_type:"debug",event_type:"find availability result",patient_hash:t,speciality_id:e,service_id:n,first_slot_date:i,first_slot_professional_hash:a,total_professionals:o,total_slots:p}}function k(t,e,n,i,a){return{action_type:"event",event_type:"professional schedule slot button click",patient_hash:t,professional_hash:e,start_date:n,speciality_id:i,service_id:a}}function b(t,e,n,i){return{action_type:"event",event_type:"professional availability button click",patient_hash:t,professional_hash:e,speciality_id:n,service_id:i}}function T(t,e,n,i,a){return{action_type:"event",event_type:"confirm appointment button click",patient_hash:t,professional_hash:e,start_date:n,speciality_id:i,service_id:a}}function w(t){return{action_type:"pageview",event_type:"select professional step page view",patient_hash:t}}function P(t,e){return{action_type:"pageview",event_type:"not time yet pageview",patient_hash:t,id_appointment:e}}function C(t,e){return{action_type:"event",event_type:"open chat button click",patient_hash:t,id_appointment:e}}function D(t,e){return{action_type:"pageview",event_type:"waiting room pageview",patient_hash:t,id_appointment:e}}function q(t,e){return{action_type:"pageview",event_type:"videocall pageview",patient_hash:t,id_appointment:e}}var K={digestive_system:{de_DE:"Verdauungssystem",en_US:"Digestive System",es_ES:"Aparato Digestivo",ca_ES:"Aparell Digestiu",pt_PT:"Aparelho Digestivo"},orthopedic_surgery_traumatology:{de_DE:"Traumatologie und Orthopädische Chirurgie",en_US:"Traumatology and Orthopedic Surgery",es_ES:"Traumatología y Cirugía Ortopédica",ca_ES:"Traumatologia i Cirurgia Ortopèdica",pt_PT:"Traumatologia e Cirurgia Ortopédica"},gynecology:{de_DE:"Gynäkologie",en_US:"Gynecology",es_ES:"Ginecología",ca_ES:"Ginecologia",pt_PT:"Ginecologia"},endocrinology:{de_DE:"Endokrinologie",en_US:"Endocrinology",es_ES:"Endocrinología",ca_ES:"Endocrinologia",pt_PT:"Endocrinologia"},psychiatry:{de_DE:"Psychiatrie",en_US:"Psychiatry",es_ES:"Psiquiatría",ca_ES:"Psiquiatria",pt_PT:"Psiquiatria"}},O={videocall:{de_DE:"Videosprechstunde",en_US:"Videocall",es_ES:"Videoconsulta",ca_ES:"Videoconsulta",pt_PT:"Videoconsulta"},phonecall:{de_DE:"Telefonische Behandlung",en_US:"Phone consultation",es_ES:"Consulta telefónica",ca_ES:"Consulta telefònica",pt_PT:"Consulta telefónica"}},U={de_DE:"Konsultationspreis",en_US:"Consultation price",es_ES:"Precio de consulta",ca_ES:"Preu de consulta",pt_PT:"Preço da consulta"},G={videocall:"videocall",phonecall:"phonecall",adeslas_videocall:"videocall",adeslas_prod_videocall:"videocall",adeslas_phonecall:"phonecall",adeslas_prod_phonecall:"phonecall"};function A(t,e,n){if(!t)return n??"";const i=G[t];return i?O[i][e]:n??U[e]}var V={consulta_telefonica:"phonecall",videoconsulta:"videocall"},x={"aparato-digestivo":"digestive_system","cirugia-ortopedica-y-traumatologia":"orthopedic_surgery_traumatology",ginecologia:"gynecology",endocrinologia:"endocrinology",psiquiatria:"psychiatry"};function z(t,e,n){const i=n?.trim();if(i)return i;const a=K[t]?.[e];return void 0!==a?a:t}class HttpTransport{endpoint;apiKey;constructor(t,e){this.endpoint=t,this.apiKey=e}send(t){fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":this.apiKey},body:JSON.stringify(t)}).catch(()=>{})}}class MediquoTelemetryClient{_apiKey=null;_transport=null;setApiKey(t){this._apiKey=t,this._buildTransport()}track(t){null!==this._transport&&this._transport.send(t)}_buildTransport(){null!==this._apiKey&&(this._transport=new HttpTransport("https://tracking.____.mediquo.com/sdk",this._apiKey))}}const j=new class AppTelemetryClient extends MediquoTelemetryClient{track(t){}};export{k as A,b as B,S as C,w as D,P as E,C as F,D as G,q as H,V as S,n as a,i as b,a as c,o as d,z as e,v as f,e as g,y as h,d as i,u as j,s as k,p as l,l as m,r as n,c as o,_ as p,g as q,h as r,f as s,j as t,x as u,m as v,A as w,T as x,E as y,K as z};
package/dist/env.js CHANGED
@@ -1 +1 @@
1
- const E="https://mediquo-landing.s3.eu-central-1.amazonaws.com/sdk-web/elements",o="production",e="0.8.1",n={development:{MODE:"development",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"47836441",ASSETS_BASE_URL:E},production:{MODE:"production",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"46655102",ASSETS_BASE_URL:E}};let t=o;const _=new Proxy({},{get:(E,o)=>n[t??"production"][o]});function S(E){t=E}export{E as ASSETS_BASE_URL,_ as env,S as setEnv};
1
+ const E="https://mediquo-landing.s3.eu-central-1.amazonaws.com/sdk-web/elements",o="production",e="0.9.0",n={development:{MODE:"development",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"47836441",ASSETS_BASE_URL:E},production:{MODE:"production",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"46655102",ASSETS_BASE_URL:E}};let t=o;const _=new Proxy({},{get:(E,o)=>n[t??"production"][o]});function S(E){t=E}export{E as ASSETS_BASE_URL,_ as env,S as setEnv};
@@ -1,5 +1,5 @@
1
1
  import * as lit_html from 'lit-html';
2
- import { M as MediquoApiChatClient } from './chunks/index.d-Bl682CAX.js';
2
+ import { M as MediquoApiChatClient } from './chunks/index.d-XSe7Hy-Q.js';
3
3
  import { LitElement, PropertyValues } from 'lit';
4
4
  import { Env } from './env.js';
5
5
  import 'axios';
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{e as o}from"./chunks/provide-BwI4DDGF.js";import{A as i}from"./chunks/api-client-context-V1UAGtKW.js";import{a as r,x as s}from"./chunks/lit-element-DiWJYFwC.js";import{n}from"./chunks/property-scuRaFcM.js";import{r as p}from"./chunks/state-LQivXIgA.js";import{setEnv as c}from"./env.js";import{c as a,n as m}from"./chunks/api-chat-client-pGZWREjK.js";import{e as h}from"./chunks/ensure-context-root-DbdqwnKB.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/external-CJj32K_p.js";import"./chunks/isBefore-CPpTogxo.js";h();let u=class MqApiClientProvider extends r{constructor(){super(...arguments),this.apiClient=a()}willUpdate(t){t.has("env")&&this.env&&c(this.env);const e=m(t,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale});e&&(this.apiClient=e)}render(){return s`<slot></slot>`}};t([n({type:String,attribute:"api-key"})],u.prototype,"apiKey",void 0),t([n({type:String,attribute:"token"})],u.prototype,"token",void 0),t([n({type:String,attribute:"locale"})],u.prototype,"locale",void 0),t([n({type:String,attribute:"env"})],u.prototype,"env",void 0),t([o({context:i}),p()],u.prototype,"apiClient",void 0),u=t([e("mq-api-client-provider")],u);export{u as MqApiClientProvider};
1
+ import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{e as o}from"./chunks/provide-BwI4DDGF.js";import{A as i}from"./chunks/api-client-context-V1UAGtKW.js";import{a as r,x as s}from"./chunks/lit-element-DiWJYFwC.js";import{n}from"./chunks/property-scuRaFcM.js";import{r as p}from"./chunks/state-LQivXIgA.js";import{setEnv as c}from"./env.js";import{c as a,n as m}from"./chunks/api-chat-client-CJ1EGJe3.js";import{e as h}from"./chunks/ensure-context-root-DbdqwnKB.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/external-CJj32K_p.js";import"./chunks/isBefore-CPpTogxo.js";h();let u=class MqApiClientProvider extends r{constructor(){super(...arguments),this.apiClient=a()}willUpdate(t){t.has("env")&&this.env&&c(this.env);const e=m(t,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale});e&&(this.apiClient=e)}render(){return s`<slot></slot>`}};t([n({type:String,attribute:"api-key"})],u.prototype,"apiKey",void 0),t([n({type:String,attribute:"token"})],u.prototype,"token",void 0),t([n({type:String,attribute:"locale"})],u.prototype,"locale",void 0),t([n({type:String,attribute:"env"})],u.prototype,"env",void 0),t([o({context:i}),p()],u.prototype,"apiClient",void 0),u=t([e("mq-api-client-provider")],u);export{u as MqApiClientProvider};
@@ -1,6 +1,6 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues } from 'lit';
3
- import { M as MediquoApiChatClient } from './chunks/index.d-Bl682CAX.js';
3
+ import { M as MediquoApiChatClient } from './chunks/index.d-XSe7Hy-Q.js';
4
4
  import { Env } from './env.js';
5
5
  import { Locale } from './i18n.js';
6
6
  import 'axios';
@@ -1 +1 @@
1
- import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{e as a}from"./chunks/provide-BwI4DDGF.js";import{c as i}from"./chunks/consume-CovVqBjI.js";import{m as s}from"./chunks/runtime-Bg1WXVCx.js";import{l as n}from"./chunks/localized-decorator-BlOuLhym.js";import{A as o}from"./chunks/api-client-context-V1UAGtKW.js";import{L as r}from"./chunks/login-token-task-Yib__6a9.js";import{l as p}from"./chunks/chunk-4FFT6DC2-CVWibomC.js";import{i as l,a as c,x as h}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as y}from"./chunks/state-LQivXIgA.js";import{setEnv as d}from"./env.js";import{initLocalization as m,setLocale as v,isValidLocale as k}from"./i18n.js";import{c as b,n as f}from"./chunks/api-chat-client-pGZWREjK.js";import{u as P,s as _,r as E}from"./chunks/apple-pay-outcomes-BONpT54d.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-CJj32K_p.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";function g(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/Safari/i.test(e)&&!/Chrome|Chromium|Edg|OPR|Firefox|FxiOS/i.test(e)}async function S(e){if("undefined"==typeof window||!window.isSecureContext)return{available:!1,reason:"unsupported"};if(!function(){if("undefined"==typeof window)return!1;const e="undefined"!=typeof ApplePaySession&&"function"==typeof ApplePaySession.canMakePayments,t="undefined"!=typeof customElements&&void 0!==customElements.get("apple-pay-button");return e&&t}())return{available:!1,reason:"sdk-missing"};if(!e.trim())return{available:!1,reason:"merchant-id-missing"};const t=ApplePaySession;if(function(e){return"function"==typeof e.applePayCapabilities}(t))try{return function(e){switch(e){case"applePayUnsupported":return{available:!1,reason:"unsupported"};case"paymentCredentialsUnavailable":case"paymentCredentialsAvailable":case"paymentCredentialStatusUnknown":return{available:!0,usesQrFlow:!g()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}const A={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{m()}catch{}const C=["visa","masterCard","amex"],w=["supports3DS"],x=l`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:center;font-family:system-ui,sans-serif;font-size:13px;line-height:1.4;color:#6e6e73}.pay-row{display:block;width:100%}.pay-row--paying{opacity:.55;pointer-events:none}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:10px;--apple-pay-button-padding:0;display:block;width:100%;min-height:48px;cursor:pointer}.state{text-align:center;font-family:system-ui,sans-serif;font-size:15px;color:#86868b;margin:0}`;class ApplePayCheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(ApplePayCheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(ApplePayCheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(ApplePayCheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}function j(e,t){p.warn(e,{error:t instanceof Error?t.message:String(t)})}let T=class MqApplePayCheckout extends c{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this.apiClient=b(),this._loginTokenTask=new r(this,()=>this.apiClient,{args:()=>[this.apiKey,this.token],onComplete:e=>{this._sessionToken=e.access_token,this.apiClient.setAuthToken(e.access_token),this._refreshAvailability()},onError:()=>{this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"auth"}))}}),this._onPayClick=()=>{if(this._paying||"ready"!==this._availabilityPhase)return;let e;try{e=new ApplePaySession(3,this._buildPaymentRequest())}catch(e){return j("mq-apple-pay-checkout: failed to create ApplePaySession",e),void this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}this._paying=!0,this._suppressCancelEvent=!1,e.onvalidatemerchant=async t=>{try{const a=await this.apiClient.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(P(a))}catch(t){j("mq-apple-pay-checkout: validate-merchant failed",t),this._suppressCancelEvent=!0,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"merchant"})),e.abort(),this._paying=!1}},e.onpaymentauthorized=async t=>{try{const a=await this.apiClient.payments.authorizeApplePay({order_id:this.sessionId,token:_(t.payment.token)}),{status:i,consultation_id:s}=a.data,n=E(i,s,this.sessionId);switch(n.kind){case"success":e.completePayment(ApplePaySession.STATUS_SUCCESS),this.dispatchEvent(new ApplePayCheckoutSuccessEvent({sessionId:n.sessionId,reference:n.reference}));break;case"denied":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutDeniedEvent({sessionId:n.sessionId}));break;case"error":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:n.reason}))}}catch(t){j("mq-apple-pay-checkout: authorize failed",t),e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"authorize"}))}finally{this._paying=!1}},e.oncancel=()=>{this._paying=!1,this._suppressCancelEvent?this._suppressCancelEvent=!1:this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"cancelled"}))};try{e.begin()}catch(e){j("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=x}willUpdate(e){e.has("env")&&this.env&&d(this.env),e.has("locale")&&v(k(this.locale)?this.locale:"es_ES");const t=f(e,{env:this.env,apiKey:this.apiKey,token:this._sessionToken,locale:k(this.locale)?this.locale:"es_ES"},this.inheritedApiClient);t&&(this.apiClient=t),e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await S(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return k(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...C],merchantCapabilities:[...w],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?h`<p class="state">${s("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:h`<p class="state">${s("Apple Pay no está disponible")}</p>`:h`<p class="state">${s("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>h`<p class="state">${s("Preparando Apple Pay…")}</p>`,error:()=>h`<p class="state">${s("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?h`<p class="state">${s("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():h`${this._showQrHelper?h`<p class="helper">${s("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,A[e]??"es-ES"}" aria-label="${s("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([u({type:String,attribute:"env"})],T.prototype,"env",void 0),e([u({type:String,attribute:"api-key"})],T.prototype,"apiKey",void 0),e([u({type:String,attribute:"token"})],T.prototype,"token",void 0),e([u({type:String,attribute:"locale",reflect:!0})],T.prototype,"locale",void 0),e([u({type:String,attribute:"merchant-id"})],T.prototype,"merchantId",void 0),e([u({type:String,attribute:"session-id"})],T.prototype,"sessionId",void 0),e([u({type:String,attribute:"amount"})],T.prototype,"amount",void 0),e([u({type:String,attribute:"currency"})],T.prototype,"currency",void 0),e([u({type:String,attribute:"country"})],T.prototype,"country",void 0),e([u({type:String,attribute:"label"})],T.prototype,"label",void 0),e([y()],T.prototype,"_availabilityPhase",void 0),e([y()],T.prototype,"_showQrHelper",void 0),e([y()],T.prototype,"_paying",void 0),e([i({context:o,subscribe:!0}),y()],T.prototype,"inheritedApiClient",void 0),e([a({context:o}),y()],T.prototype,"apiClient",void 0),T=e([n(),t("mq-apple-pay-checkout")],T);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,T as MqApplePayCheckout};
1
+ import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{e as a}from"./chunks/provide-BwI4DDGF.js";import{c as i}from"./chunks/consume-CovVqBjI.js";import{m as s}from"./chunks/runtime-Bg1WXVCx.js";import{l as n}from"./chunks/localized-decorator-BlOuLhym.js";import{A as o}from"./chunks/api-client-context-V1UAGtKW.js";import{L as r}from"./chunks/login-token-task-Yib__6a9.js";import{l as p}from"./chunks/chunk-4FFT6DC2-CVWibomC.js";import{i as l,a as c,x as h}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as y}from"./chunks/state-LQivXIgA.js";import{setEnv as d}from"./env.js";import{initLocalization as m,setLocale as v,isValidLocale as k}from"./i18n.js";import{c as b,n as f}from"./chunks/api-chat-client-CJ1EGJe3.js";import{u as P,s as _,r as E}from"./chunks/apple-pay-outcomes-B1LrUXHR.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-CJj32K_p.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";function g(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/Safari/i.test(e)&&!/Chrome|Chromium|Edg|OPR|Firefox|FxiOS/i.test(e)}async function S(e){if("undefined"==typeof window||!window.isSecureContext)return{available:!1,reason:"unsupported"};if(!function(){if("undefined"==typeof window)return!1;const e="undefined"!=typeof ApplePaySession&&"function"==typeof ApplePaySession.canMakePayments,t="undefined"!=typeof customElements&&void 0!==customElements.get("apple-pay-button");return e&&t}())return{available:!1,reason:"sdk-missing"};if(!e.trim())return{available:!1,reason:"merchant-id-missing"};const t=ApplePaySession;if(function(e){return"function"==typeof e.applePayCapabilities}(t))try{return function(e){switch(e){case"applePayUnsupported":return{available:!1,reason:"unsupported"};case"paymentCredentialsUnavailable":case"paymentCredentialsAvailable":case"paymentCredentialStatusUnknown":return{available:!0,usesQrFlow:!g()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}const A={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{m()}catch{}const C=["visa","masterCard","amex"],w=["supports3DS"],x=l`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:center;font-family:system-ui,sans-serif;font-size:13px;line-height:1.4;color:#6e6e73}.pay-row{display:block;width:100%}.pay-row--paying{opacity:.55;pointer-events:none}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:10px;--apple-pay-button-padding:0;display:block;width:100%;min-height:48px;cursor:pointer}.state{text-align:center;font-family:system-ui,sans-serif;font-size:15px;color:#86868b;margin:0}`;class ApplePayCheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(ApplePayCheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(ApplePayCheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(ApplePayCheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}function j(e,t){p.warn(e,{error:t instanceof Error?t.message:String(t)})}let T=class MqApplePayCheckout extends c{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this.apiClient=b(),this._loginTokenTask=new r(this,()=>this.apiClient,{args:()=>[this.apiKey,this.token],onComplete:e=>{this._sessionToken=e.access_token,this.apiClient.setAuthToken(e.access_token),this._refreshAvailability()},onError:()=>{this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"auth"}))}}),this._onPayClick=()=>{if(this._paying||"ready"!==this._availabilityPhase)return;let e;try{e=new ApplePaySession(3,this._buildPaymentRequest())}catch(e){return j("mq-apple-pay-checkout: failed to create ApplePaySession",e),void this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}this._paying=!0,this._suppressCancelEvent=!1,e.onvalidatemerchant=async t=>{try{const a=await this.apiClient.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(P(a))}catch(t){j("mq-apple-pay-checkout: validate-merchant failed",t),this._suppressCancelEvent=!0,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"merchant"})),e.abort(),this._paying=!1}},e.onpaymentauthorized=async t=>{try{const a=await this.apiClient.payments.authorizeApplePay({order_id:this.sessionId,token:_(t.payment.token)}),{status:i,consultation_id:s}=a.data,n=E(i,s,this.sessionId);switch(n.kind){case"success":e.completePayment(ApplePaySession.STATUS_SUCCESS),this.dispatchEvent(new ApplePayCheckoutSuccessEvent({sessionId:n.sessionId,reference:n.reference}));break;case"denied":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutDeniedEvent({sessionId:n.sessionId}));break;case"error":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:n.reason}))}}catch(t){j("mq-apple-pay-checkout: authorize failed",t),e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"authorize"}))}finally{this._paying=!1}},e.oncancel=()=>{this._paying=!1,this._suppressCancelEvent?this._suppressCancelEvent=!1:this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"cancelled"}))};try{e.begin()}catch(e){j("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=x}willUpdate(e){e.has("env")&&this.env&&d(this.env),e.has("locale")&&v(k(this.locale)?this.locale:"es_ES");const t=f(e,{env:this.env,apiKey:this.apiKey,token:this._sessionToken,locale:k(this.locale)?this.locale:"es_ES"},this.inheritedApiClient);t&&(this.apiClient=t),e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await S(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return k(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...C],merchantCapabilities:[...w],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?h`<p class="state">${s("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:h`<p class="state">${s("Apple Pay no está disponible")}</p>`:h`<p class="state">${s("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>h`<p class="state">${s("Preparando Apple Pay…")}</p>`,error:()=>h`<p class="state">${s("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?h`<p class="state">${s("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():h`${this._showQrHelper?h`<p class="helper">${s("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,A[e]??"es-ES"}" aria-label="${s("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([u({type:String,attribute:"env"})],T.prototype,"env",void 0),e([u({type:String,attribute:"api-key"})],T.prototype,"apiKey",void 0),e([u({type:String,attribute:"token"})],T.prototype,"token",void 0),e([u({type:String,attribute:"locale",reflect:!0})],T.prototype,"locale",void 0),e([u({type:String,attribute:"merchant-id"})],T.prototype,"merchantId",void 0),e([u({type:String,attribute:"session-id"})],T.prototype,"sessionId",void 0),e([u({type:String,attribute:"amount"})],T.prototype,"amount",void 0),e([u({type:String,attribute:"currency"})],T.prototype,"currency",void 0),e([u({type:String,attribute:"country"})],T.prototype,"country",void 0),e([u({type:String,attribute:"label"})],T.prototype,"label",void 0),e([y()],T.prototype,"_availabilityPhase",void 0),e([y()],T.prototype,"_showQrHelper",void 0),e([y()],T.prototype,"_paying",void 0),e([i({context:o,subscribe:!0}),y()],T.prototype,"inheritedApiClient",void 0),e([a({context:o}),y()],T.prototype,"apiClient",void 0),T=e([n(),t("mq-apple-pay-checkout")],T);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,T as MqApplePayCheckout};
@@ -1,5 +1,5 @@
1
1
  import * as lit_html from 'lit-html';
2
- import { C as CreatePaymentLinkRequest } from './chunks/index.d-Bl682CAX.js';
2
+ import { C as CreatePaymentLinkRequest } from './chunks/index.d-XSe7Hy-Q.js';
3
3
  import { LitElement } from 'lit';
4
4
  import { Env } from './env.js';
5
5
  import { Locale } from './i18n.js';
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{a as o,x as s}from"./chunks/lit-element-DiWJYFwC.js";import{n as i}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import"./mq-checkout.js";import"./chunks/provide-BwI4DDGF.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/consume-CovVqBjI.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/api-chat-client-pGZWREjK.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/external-CJj32K_p.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";import"./chunks/api-client-context-V1UAGtKW.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/login-token-task-Yib__6a9.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";class AppointmentPaidEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(AppointmentPaidEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let r=class MqAppointmentCheckout extends o{constructor(){super(...arguments),this._provideSession=async t=>{const e=await t.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,preconsultation_documents:this.preconsultationDocuments});return{sessionId:e.session_id,paymentUrl:e.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return s`<mq-checkout env="${n(this.env)}" api-key="${this.apiKey}" token="${this.token}" locale="${this.locale}" .provideSession="${this._provideSession}" @payment-success="${this._onSuccess}"></mq-checkout>`}};t([i({type:String,attribute:"env"})],r.prototype,"env",void 0),t([i({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([i({type:String,attribute:"token"})],r.prototype,"token",void 0),t([i({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([i({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([i({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([i({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([i({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([i({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([i({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
1
+ import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{a as o,x as s}from"./chunks/lit-element-DiWJYFwC.js";import{n as i}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import"./mq-checkout.js";import"./chunks/provide-BwI4DDGF.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/consume-CovVqBjI.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/api-chat-client-CJ1EGJe3.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/external-CJj32K_p.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";import"./chunks/api-client-context-V1UAGtKW.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/login-token-task-Yib__6a9.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";class AppointmentPaidEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(AppointmentPaidEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let r=class MqAppointmentCheckout extends o{constructor(){super(...arguments),this._provideSession=async t=>{const e=await t.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,preconsultation_documents:this.preconsultationDocuments});return{sessionId:e.session_id,paymentUrl:e.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return s`<mq-checkout env="${n(this.env)}" api-key="${this.apiKey}" token="${this.token}" locale="${this.locale}" .provideSession="${this._provideSession}" @payment-success="${this._onSuccess}"></mq-checkout>`}};t([i({type:String,attribute:"env"})],r.prototype,"env",void 0),t([i({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([i({type:String,attribute:"token"})],r.prototype,"token",void 0),t([i({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([i({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([i({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([i({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([i({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([i({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([i({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
@@ -1,14 +1,14 @@
1
1
  import * as lit_html from 'lit-html';
2
- import { M as MediquoApiChatClient } from './chunks/index.d-Bl682CAX.js';
2
+ import { M as MediquoApiChatClient } from './chunks/index.d-XSe7Hy-Q.js';
3
3
  import { LitElement, PropertyValues } from 'lit';
4
4
  import { Env } from './env.js';
5
5
  import './ui/mq-button.js';
6
- import './chunks/mq-chat-room-t3j3Tq4o.js';
6
+ import './chunks/mq-chat-room-jeDvIF1Z.js';
7
7
  import './ui/mq-floating-bubble.js';
8
8
  import './ui/mq-card.js';
9
9
  import './ui/mq-unread-badge.js';
10
10
  import './ui/mq-page-title.js';
11
- import './chunks/mq-layout-D1j50tKd.js';
11
+ import './chunks/mq-layout-TG2K4zRv.js';
12
12
  import 'axios';
13
13
  import 'zod';
14
14
  import './chunks/schemas.d-b6_AekBb.js';
@@ -16,6 +16,7 @@ import './ui/mq-avatar.js';
16
16
  import './ui/mq-skeleton.js';
17
17
  import './chunks/appointment.model.d-BWwBLaEL.js';
18
18
  import '@tanstack/query-core';
19
+ import './chunks/document.model.d-DIzMiOmd.js';
19
20
 
20
21
  /**
21
22
  * Standalone "appointment documentation" screen: fetches an appointment by id
@@ -1 +1 @@
1
- import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,c as o}from"./chunks/custom-element-D2ziPxYE.js";import{e as r}from"./chunks/provide-BwI4DDGF.js";import{c as n}from"./chunks/consume-CovVqBjI.js";import{Q as a}from"./chunks/query-controller-BlO1Ax65.js";import{A as c}from"./chunks/api-client-context-V1UAGtKW.js";import{g as p}from"./chunks/get-appointment-query-C-gTTuiQ.js";import{a as d,i as m,x as l}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as k}from"./chunks/state-LQivXIgA.js";import{setEnv as h}from"./env.js";import{c as v,n as j}from"./chunks/api-chat-client-pGZWREjK.js";import"./chunks/documentation-view-GZI-DC3e.js";import"./ui/mq-card.js";import"./chunks/mq-layout-L3TlCxI0.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/chunk-6CCJWPGL-TiaqZaPV.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/addSeconds-ofMnxlgT.js";import"./ui/icons/calendar-icon.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.js";import"./ui/icons/info-circle-outine-icon.js";import"./ui/mq-button.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/if-defined-BYeVdwgd.js";import"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./ui/icons/message-bubble-icon.js";import"./mq-chat-room.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-avatar.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/chunk-BUV4MGML-CkhBbfUu.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-Y4EKUX25-QqMl3eiq.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/mq-page-title.js";import"./ui/icons/arrow-narrow-left-icon.js";import"./chunks/telemetry-client-CoWay8es.js";import"./ui/icons/download-icon.js";import"./chunks/blob-to-base64-CUL1trde.js";let b=class DocumentationViewSkeleton extends d{static{this.styles=m`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.page-title-skeleton{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--size-3)}.back-button-skeleton{width:var(--size-10);height:var(--size-10);border-radius:var(--border-radius-full);flex-shrink:0}.title-bar-skeleton{width:120px;height:24px;border-radius:var(--border-radius-sm)}@media (min-width:768px){.page-title-skeleton{gap:var(--sp-6)}.title-bar-skeleton{width:200px;height:32px}}.description-skeleton{width:100%;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-2)}.description-skeleton:last-of-type{width:70%;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-name-skeleton{width:180px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-1)}.professional-speciality-skeleton{width:140px;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);font-family:var(--font-body)}.icon-skeleton{width:20px;height:20px;border-radius:var(--border-radius-sm)}.text-skeleton{width:120px;height:16px;border-radius:var(--border-radius-sm)}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card .skeleton{background-color:var(--color-muted)}.documents-card-title-skeleton{width:150px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.button-skeleton{width:100%;height:44px;border-radius:var(--border-radius-md);margin-top:var(--size-4)}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}`}render(){return l`<div class="page-title-skeleton"><div class="skeleton back-button-skeleton"></div><div class="skeleton title-bar-skeleton"></div></div><div class="skeleton description-skeleton"></div><div class="skeleton description-skeleton"></div><mq-card class="professional-card" roundness="md"><div><div class="skeleton professional-name-skeleton"></div><div class="skeleton professional-speciality-skeleton"></div></div><dl class="description-list"><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div></dl></mq-card><mq-card class="documents-card" roundness="md"><div class="skeleton documents-card-title-skeleton"></div><div class="skeleton button-skeleton"></div></mq-card>`}};b=s([o("documentation-view-skeleton")],b);let g=class MqAppointmentDocumentation extends d{constructor(){super(...arguments),this.getAppointmentQuery=new a(this,()=>p(this.apiClient,{id:this.appointmentId})),this.apiClient=v()}willUpdate(i){i.has("env")&&this.env&&h(this.env),i.has("locale")&&this.locale&&t(this.locale)&&e(this.locale);const s=j(i,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale},this.inheritedApiClient);s&&(this.apiClient=s)}render(){return l`<mq-layout background="transparent">${this.getAppointmentQuery.render({complete:t=>l`<documentation-view .token="${this.token}" .appointment="${t}"></documentation-view>`,error:()=>l``,pending:()=>l`<documentation-view-skeleton></documentation-view-skeleton>`})}</mq-layout>`}};s([u({type:String,attribute:"appointment-id"})],g.prototype,"appointmentId",void 0),s([u({type:String,attribute:"token"})],g.prototype,"token",void 0),s([u({type:String,attribute:"api-key"})],g.prototype,"apiKey",void 0),s([u({type:String,attribute:"locale"})],g.prototype,"locale",void 0),s([u({type:String,attribute:"env"})],g.prototype,"env",void 0),s([n({context:c,subscribe:!0}),k()],g.prototype,"inheritedApiClient",void 0),s([r({context:c}),k()],g.prototype,"apiClient",void 0),g=s([o("mq-appointment-documentation")],g),i();export{g as MqAppointmentDocumentation};
1
+ import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,c as o}from"./chunks/custom-element-D2ziPxYE.js";import{e as r}from"./chunks/provide-BwI4DDGF.js";import{c as n}from"./chunks/consume-CovVqBjI.js";import{Q as a}from"./chunks/query-controller-BlO1Ax65.js";import{A as c}from"./chunks/api-client-context-V1UAGtKW.js";import{g as p}from"./chunks/get-appointment-query-C-gTTuiQ.js";import{a as d,i as m,x as l}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as k}from"./chunks/state-LQivXIgA.js";import{setEnv as h}from"./env.js";import{c as v,n as j}from"./chunks/api-chat-client-CJ1EGJe3.js";import"./chunks/documentation-view-DEXxBFrV.js";import"./ui/mq-card.js";import"./chunks/mq-layout-E5mKSz4A.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/chunk-6CCJWPGL-TiaqZaPV.js";import"./chunks/chunk-HN62IQ7S-xbkIy7k_.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/addSeconds-ofMnxlgT.js";import"./ui/icons/calendar-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.js";import"./ui/icons/info-circle-outine-icon.js";import"./ui/mq-button.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./ui/icons/message-bubble-icon.js";import"./mq-chat-room.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-avatar.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/chunk-BUV4MGML-CkhBbfUu.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-Y4EKUX25-QqMl3eiq.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/mq-page-title.js";import"./ui/icons/arrow-narrow-left-icon.js";import"./chunks/telemetry-client-BdPx4SXu.js";import"./ui/icons/download-icon.js";import"./chunks/blob-to-base64-CUL1trde.js";let b=class DocumentationViewSkeleton extends d{static{this.styles=m`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.page-title-skeleton{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--size-3)}.back-button-skeleton{width:var(--size-10);height:var(--size-10);border-radius:var(--border-radius-full);flex-shrink:0}.title-bar-skeleton{width:120px;height:24px;border-radius:var(--border-radius-sm)}@media (min-width:768px){.page-title-skeleton{gap:var(--sp-6)}.title-bar-skeleton{width:200px;height:32px}}.description-skeleton{width:100%;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-2)}.description-skeleton:last-of-type{width:70%;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-name-skeleton{width:180px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-1)}.professional-speciality-skeleton{width:140px;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);font-family:var(--font-body)}.icon-skeleton{width:20px;height:20px;border-radius:var(--border-radius-sm)}.text-skeleton{width:120px;height:16px;border-radius:var(--border-radius-sm)}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card .skeleton{background-color:var(--color-muted)}.documents-card-title-skeleton{width:150px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.button-skeleton{width:100%;height:44px;border-radius:var(--border-radius-md);margin-top:var(--size-4)}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}`}render(){return l`<div class="page-title-skeleton"><div class="skeleton back-button-skeleton"></div><div class="skeleton title-bar-skeleton"></div></div><div class="skeleton description-skeleton"></div><div class="skeleton description-skeleton"></div><mq-card class="professional-card" roundness="md"><div><div class="skeleton professional-name-skeleton"></div><div class="skeleton professional-speciality-skeleton"></div></div><dl class="description-list"><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div></dl></mq-card><mq-card class="documents-card" roundness="md"><div class="skeleton documents-card-title-skeleton"></div><div class="skeleton button-skeleton"></div></mq-card>`}};b=s([o("documentation-view-skeleton")],b);let g=class MqAppointmentDocumentation extends d{constructor(){super(...arguments),this.getAppointmentQuery=new a(this,()=>p(this.apiClient,{id:this.appointmentId})),this.apiClient=v()}willUpdate(i){i.has("env")&&this.env&&h(this.env),i.has("locale")&&this.locale&&t(this.locale)&&e(this.locale);const s=j(i,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale},this.inheritedApiClient);s&&(this.apiClient=s)}render(){return l`<mq-layout background="transparent">${this.getAppointmentQuery.render({complete:t=>l`<documentation-view .token="${this.token}" .appointment="${t}"></documentation-view>`,error:()=>l``,pending:()=>l`<documentation-view-skeleton></documentation-view-skeleton>`})}</mq-layout>`}};s([u({type:String,attribute:"appointment-id"})],g.prototype,"appointmentId",void 0),s([u({type:String,attribute:"token"})],g.prototype,"token",void 0),s([u({type:String,attribute:"api-key"})],g.prototype,"apiKey",void 0),s([u({type:String,attribute:"locale"})],g.prototype,"locale",void 0),s([u({type:String,attribute:"env"})],g.prototype,"env",void 0),s([n({context:c,subscribe:!0}),k()],g.prototype,"inheritedApiClient",void 0),s([r({context:c}),k()],g.prototype,"apiClient",void 0),g=s([o("mq-appointment-documentation")],g),i();export{g as MqAppointmentDocumentation};
@@ -1,7 +1,7 @@
1
- export { M as MqChatRoom } from './chunks/mq-chat-room-t3j3Tq4o.js';
1
+ export { M as MqChatRoom } from './chunks/mq-chat-room-jeDvIF1Z.js';
2
2
  import 'lit-html';
3
3
  import 'lit';
4
- import './chunks/index.d-Bl682CAX.js';
4
+ import './chunks/index.d-XSe7Hy-Q.js';
5
5
  import 'axios';
6
6
  import 'zod';
7
7
  import './chunks/schemas.d-b6_AekBb.js';