@nylas/react 1.0.2-prealpha1 → 1.1.0-canary.3

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 (133) hide show
  1. package/dist/add-circle-icon_22.entry-8d0ac489.cjs +1 -0
  2. package/dist/add-circle-icon_22.entry-da31fa71.js +1733 -0
  3. package/dist/{archive-icon_7.entry-84d70dbf.cjs → archive-icon_7.entry-7aad8104.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-91aaa1aa.js → archive-icon_7.entry-bc2418f7.js} +20 -20
  5. package/dist/{arrow-icon.entry-400a08fa.cjs → arrow-icon.entry-6eba68a9.cjs} +1 -1
  6. package/dist/arrow-icon.entry-9a932082.js +15 -0
  7. package/dist/{bold-icon_3.entry-4b2798a8.js → bold-icon_3.entry-5f7e3755.js} +4 -4
  8. package/dist/{bold-icon_3.entry-9ad35153.cjs → bold-icon_3.entry-db17d481.cjs} +1 -1
  9. package/dist/{calendar-cancel-icon.entry-83ba884a.js → calendar-cancel-icon.entry-1ff7845a.js} +4 -4
  10. package/dist/{calendar-cancel-icon.entry-fcb66929.cjs → calendar-cancel-icon.entry-a5141f82.cjs} +1 -1
  11. package/dist/calendar-check-icon_2.entry-c3add652.cjs +1 -0
  12. package/dist/calendar-check-icon_2.entry-d7421059.js +25 -0
  13. package/dist/{calendar-icon.entry-8f38af4a.js → calendar-icon.entry-4458997f.js} +2 -2
  14. package/dist/{calendar-icon.entry-7bae38d7.cjs → calendar-icon.entry-445d624a.cjs} +1 -1
  15. package/dist/chevron-icon_3.entry-8961e6bb.cjs +1 -0
  16. package/dist/chevron-icon_3.entry-f7f3d487.js +117 -0
  17. package/dist/close-icon.entry-6dd5ff0a.js +15 -0
  18. package/dist/close-icon.entry-ebc527c5.cjs +1 -0
  19. package/dist/{nylas-booked-event-card_10.entry-7e66a648.js → constants-6ee60d6d-4cd16450.js} +1656 -2374
  20. package/dist/{nylas-booked-event-card_10.entry-ed515326.cjs → constants-6ee60d6d-6c0540db.cjs} +6 -6
  21. package/dist/document-refresh-icon.entry-298b2133.cjs +1 -0
  22. package/dist/document-refresh-icon.entry-bdc323b5.js +15 -0
  23. package/dist/elements/index.d.ts +31 -2
  24. package/dist/{forward-icon_6.entry-3345af84.cjs → forward-icon_6.entry-15208ea9.cjs} +3 -3
  25. package/dist/{forward-icon_6.entry-b60fcb35.js → forward-icon_6.entry-62759373.js} +127 -127
  26. package/dist/{globe-icon.entry-e3fd373f.js → globe-icon.entry-9e082178.js} +4 -4
  27. package/dist/{globe-icon.entry-8325e73e.cjs → globe-icon.entry-c8302bf5.cjs} +1 -1
  28. package/dist/google-logo-icon_3.entry-0c095209.js +258 -0
  29. package/dist/google-logo-icon_3.entry-f8433ff9.cjs +1 -0
  30. package/dist/index-0f3bd8df.js +1824 -0
  31. package/dist/index-7a55dc33.cjs +30 -0
  32. package/dist/index.d.ts +3 -1
  33. package/dist/index.es-2578c6a5-098d48d0.cjs +7 -0
  34. package/dist/{index-b30d446a-a90f84b2.js → index.es-2578c6a5-71441142.js} +833 -933
  35. package/dist/info-icon_2.entry-73106882.js +34 -0
  36. package/dist/info-icon_2.entry-ca224a3b.cjs +1 -0
  37. package/dist/{loading-icon.entry-27410cf8.js → loading-icon.entry-012644b7.js} +4 -4
  38. package/dist/{loading-icon.entry-b2096d2b.cjs → loading-icon.entry-f9f5e66f.cjs} +1 -1
  39. package/dist/mailbox-store-bb21512c-045c3ea0.cjs +1 -0
  40. package/dist/{mailbox-store-19f0c6c9-e3e8b4e5.js → mailbox-store-bb21512c-615660ef.js} +17 -16
  41. package/dist/nylas-additional-participants.entry-a50ef8e2.cjs +1 -0
  42. package/dist/nylas-additional-participants.entry-db85836a.js +83 -0
  43. package/dist/nylas-booked-event-card_10.entry-b49b2369.js +784 -0
  44. package/dist/nylas-booked-event-card_10.entry-fccb783c.cjs +1 -0
  45. package/dist/nylas-form-card.entry-090a4d3b.js +56 -0
  46. package/dist/nylas-form-card.entry-f5230005.cjs +1 -0
  47. package/dist/nylas-if-state.entry-7924dde0.js +96 -0
  48. package/dist/nylas-if-state.entry-ff9c9a85.cjs +1 -0
  49. package/dist/{nylas-list-folders.entry-a5437201.js → nylas-list-folders.entry-9dd96530.js} +9 -8
  50. package/dist/nylas-list-folders.entry-dbfc2cf8.cjs +1 -0
  51. package/dist/nylas-list-threads.entry-6bcc0328.cjs +1 -0
  52. package/dist/{nylas-list-threads.entry-fd6cda61.js → nylas-list-threads.entry-b435eaae.js} +5 -4
  53. package/dist/nylas-login.entry-1623d309.cjs +1 -0
  54. package/dist/nylas-login.entry-97350c76.js +75 -0
  55. package/dist/nylas-mailbox-pagination.entry-1776eb16.cjs +1 -0
  56. package/dist/{nylas-mailbox-pagination.entry-988214bc.js → nylas-mailbox-pagination.entry-ceef8be2.js} +4 -3
  57. package/dist/nylas-mailbox-toolbar-button.entry-7d3f79b9.cjs +1 -0
  58. package/dist/{nylas-mailbox-toolbar-button.entry-c720e22a.js → nylas-mailbox-toolbar-button.entry-e6b3d3a4.js} +11 -10
  59. package/dist/nylas-mailbox.entry-06d8014a.js +136 -0
  60. package/dist/nylas-mailbox.entry-ae8da6ff.cjs +1 -0
  61. package/dist/{nylas-provider.entry-70721009.js → nylas-provider.entry-8b9c2b69.js} +46 -33
  62. package/dist/nylas-provider.entry-97c9e272.cjs +1 -0
  63. package/dist/nylas-scheduler-editor.entry-c3791787.js +2181 -0
  64. package/dist/nylas-scheduler-editor.entry-f6cf1cd9.cjs +7 -0
  65. package/dist/nylas-scheduling.entry-08ae840a.cjs +1 -0
  66. package/dist/nylas-scheduling.entry-6380509a.js +237 -0
  67. package/dist/nylas-threads-refresh.entry-246e6d77.cjs +1 -0
  68. package/dist/{nylas-threads-refresh.entry-b7f9e93f.js → nylas-threads-refresh.entry-eaee86fb.js} +6 -5
  69. package/dist/nylas-threads-search.entry-42a2acb1.cjs +1 -0
  70. package/dist/{nylas-threads-search.entry-95afea9c.js → nylas-threads-search.entry-7e12758e.js} +15 -14
  71. package/dist/nylas-view-thread.entry-78e6927a.cjs +1 -0
  72. package/dist/{nylas-view-thread.entry-165173b1.js → nylas-view-thread.entry-b936e76a.js} +5 -4
  73. package/dist/people-icon.entry-5c8ee696.js +15 -0
  74. package/dist/people-icon.entry-bcf848c0.cjs +1 -0
  75. package/dist/play-icon_2.entry-356e63cc.js +25 -0
  76. package/dist/play-icon_2.entry-92e78f1b.cjs +1 -0
  77. package/dist/react.cjs +1 -1
  78. package/dist/react.js +92 -61
  79. package/dist/{refresh-icon.entry-e48a338f.js → refresh-icon.entry-77f0c377.js} +2 -2
  80. package/dist/{refresh-icon.entry-601cac89.cjs → refresh-icon.entry-bec053b6.cjs} +1 -1
  81. package/dist/{register-component-152c6ad2-a06f58c2.js → register-component-dc659dc3-0fdb18dc.js} +2 -2
  82. package/dist/{register-component-152c6ad2-0df7215b.cjs → register-component-dc659dc3-f58bf25b.cjs} +1 -1
  83. package/dist/scheduler-config-store-51ee4f42-ce3a9b0e.cjs +1 -0
  84. package/dist/scheduler-config-store-51ee4f42-e02895da.js +14 -0
  85. package/dist/{scheduler-store-7d48e682-0c0c3991.js → scheduler-store-72116723-3ba2480c.js} +100 -95
  86. package/dist/scheduler-store-72116723-db9d91f6.cjs +1 -0
  87. package/dist/time-period-selector.entry-decd251b.js +78 -0
  88. package/dist/time-period-selector.entry-f25fad77.cjs +1 -0
  89. package/dist/translate-icon.entry-cac02c46.js +15 -0
  90. package/dist/translate-icon.entry-dd5b707c.cjs +1 -0
  91. package/dist/utils-c00bdc3c-89ab163d.js +2111 -0
  92. package/dist/utils-c00bdc3c-94b9c3b6.cjs +8 -0
  93. package/dist/warning-icon.entry-370b9cf0.js +15 -0
  94. package/dist/warning-icon.entry-8af8a742.cjs +1 -0
  95. package/package.json +7 -4
  96. package/dist/add-circle-icon.entry-2ccb238b.cjs +0 -1
  97. package/dist/add-circle-icon.entry-35d6aa07.js +0 -15
  98. package/dist/arrow-icon.entry-8b2e96a6.js +0 -15
  99. package/dist/calendar-check-icon_3.entry-903e2d82.js +0 -35
  100. package/dist/calendar-check-icon_3.entry-a16ce05e.cjs +0 -1
  101. package/dist/chevron-icon.entry-58366662.cjs +0 -1
  102. package/dist/chevron-icon.entry-5e11cef5.js +0 -15
  103. package/dist/close-icon_2.entry-011d9cf4.js +0 -25
  104. package/dist/close-icon_2.entry-83088b9a.cjs +0 -1
  105. package/dist/document-refresh-icon.entry-071ffd66.cjs +0 -1
  106. package/dist/document-refresh-icon.entry-9083a2e9.js +0 -15
  107. package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
  108. package/dist/duration-bddc4a13-179ce826.js +0 -41
  109. package/dist/index-3b6f5cd5.cjs +0 -30
  110. package/dist/index-630f4e87.js +0 -1498
  111. package/dist/index-b30d446a-cbbef925.cjs +0 -7
  112. package/dist/mailbox-store-19f0c6c9-a0cbfa97.cjs +0 -1
  113. package/dist/nylas-if-state_3.entry-504be976.cjs +0 -1
  114. package/dist/nylas-if-state_3.entry-e96d01f1.js +0 -291
  115. package/dist/nylas-list-folders.entry-866361cc.cjs +0 -1
  116. package/dist/nylas-list-threads.entry-04989295.cjs +0 -1
  117. package/dist/nylas-mailbox-pagination.entry-e0bd4aef.cjs +0 -1
  118. package/dist/nylas-mailbox-toolbar-button.entry-3d772b26.cjs +0 -1
  119. package/dist/nylas-open-hours-picker.entry-6bdc7c73.js +0 -186
  120. package/dist/nylas-open-hours-picker.entry-881b6db7.cjs +0 -1
  121. package/dist/nylas-provider.entry-8d9a844b.cjs +0 -1
  122. package/dist/nylas-scheduler.entry-7321e18f.js +0 -230
  123. package/dist/nylas-scheduler.entry-e82977fb.cjs +0 -1
  124. package/dist/nylas-threads-refresh.entry-477e68e4.cjs +0 -1
  125. package/dist/nylas-threads-search.entry-c5854641.cjs +0 -1
  126. package/dist/nylas-view-thread.entry-8b72cbdb.cjs +0 -1
  127. package/dist/play-icon_2.entry-ed5877e3.js +0 -25
  128. package/dist/play-icon_2.entry-f23ed6c1.cjs +0 -1
  129. package/dist/scheduler-store-7d48e682-674705ef.cjs +0 -1
  130. package/dist/search-icon_3.entry-292138c3.js +0 -101
  131. package/dist/search-icon_3.entry-8e555357.cjs +0 -1
  132. package/dist/utils-5074a070-ce33ee6b.js +0 -119
  133. package/dist/utils-5074a070-d5ba6add.cjs +0 -2
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7a55dc33.cjs");require("react");require("react-dom");const c=".sc-document-refresh-icon-h{display:flex}",d=c,a=class{constructor(t){e.registerInstance(this,t),this.width="18",this.height="18"}render(){return e.h("svg",{key:"d06d6bc029572b2dd527aecf4ef7030185f2611b",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:this.width,height:this.height},e.h("rect",{key:"fff91f117af04f9f8a4bff9be0baab3037fdda72",id:"Canvas",fill:"#ff13dc",opacity:"0"}),e.h("path",{key:"037e7e2276dc5c92c23c7a4a12606b547cf8a2b3",d:"M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z"}),e.h("path",{key:"9d787ae2e585fdf096ad9ef94b564d0ae319346b",d:"M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z"}),e.h("path",{key:"c676cec50a84221d6da746d0597f1d9914e1991d",d:"M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z"}),e.h("path",{key:"30a681a5e8c6a660b39c41974ea70c42fbaa132b",d:"M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z"}))}};a.style=d;exports.document_refresh_icon=a;
@@ -0,0 +1,15 @@
1
+ import { r as t, h as e } from "./index-0f3bd8df.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const c = ".sc-document-refresh-icon-h{display:flex}", d = c, f = class {
5
+ constructor(a) {
6
+ t(this, a), this.width = "18", this.height = "18";
7
+ }
8
+ render() {
9
+ return e("svg", { key: "d06d6bc029572b2dd527aecf4ef7030185f2611b", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", width: this.width, height: this.height }, e("rect", { key: "fff91f117af04f9f8a4bff9be0baab3037fdda72", id: "Canvas", fill: "#ff13dc", opacity: "0" }), e("path", { key: "037e7e2276dc5c92c23c7a4a12606b547cf8a2b3", d: "M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z" }), e("path", { key: "9d787ae2e585fdf096ad9ef94b564d0ae319346b", d: "M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z" }), e("path", { key: "c676cec50a84221d6da746d0597f1d9914e1991d", d: "M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z" }), e("path", { key: "30a681a5e8c6a660b39c41974ea70c42fbaa132b", d: "M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z" }));
10
+ }
11
+ };
12
+ f.style = d;
13
+ export {
14
+ f as document_refresh_icon
15
+ };
@@ -4,42 +4,69 @@ export declare const AddCircleIcon: import("react").ForwardRefExoticComponent<JS
4
4
  export declare const ArchiveIcon: import("react").ForwardRefExoticComponent<JSX.ArchiveIcon & Omit<import("react").HTMLAttributes<HTMLArchiveIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLArchiveIconElement>>;
5
5
  export declare const ArrowIcon: import("react").ForwardRefExoticComponent<JSX.ArrowIcon & Omit<import("react").HTMLAttributes<HTMLArrowIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLArrowIconElement>>;
6
6
  export declare const BoldIcon: import("react").ForwardRefExoticComponent<JSX.BoldIcon & Omit<import("react").HTMLAttributes<HTMLBoldIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLBoldIconElement>>;
7
+ export declare const ButtonComponent: import("react").ForwardRefExoticComponent<JSX.ButtonComponent & Omit<import("react").HTMLAttributes<HTMLButtonComponentElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLButtonComponentElement>>;
7
8
  export declare const CalendarCancelIcon: import("react").ForwardRefExoticComponent<JSX.CalendarCancelIcon & Omit<import("react").HTMLAttributes<HTMLCalendarCancelIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCalendarCancelIconElement>>;
8
9
  export declare const CalendarCheckIcon: import("react").ForwardRefExoticComponent<JSX.CalendarCheckIcon & Omit<import("react").HTMLAttributes<HTMLCalendarCheckIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCalendarCheckIconElement>>;
9
10
  export declare const CalendarIcon: import("react").ForwardRefExoticComponent<JSX.CalendarIcon & Omit<import("react").HTMLAttributes<HTMLCalendarIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCalendarIconElement>>;
11
+ export declare const CalendarInfoIcon: import("react").ForwardRefExoticComponent<JSX.CalendarInfoIcon & Omit<import("react").HTMLAttributes<HTMLCalendarInfoIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCalendarInfoIconElement>>;
12
+ export declare const CalendarPatternsIcon: import("react").ForwardRefExoticComponent<JSX.CalendarPatternsIcon & Omit<import("react").HTMLAttributes<HTMLCalendarPatternsIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCalendarPatternsIconElement>>;
10
13
  export declare const CheckmarkCircleIcon: import("react").ForwardRefExoticComponent<JSX.CheckmarkCircleIcon & Omit<import("react").HTMLAttributes<HTMLCheckmarkCircleIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCheckmarkCircleIconElement>>;
11
14
  export declare const ChevronIcon: import("react").ForwardRefExoticComponent<JSX.ChevronIcon & Omit<import("react").HTMLAttributes<HTMLChevronIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLChevronIconElement>>;
12
15
  export declare const CloseIcon: import("react").ForwardRefExoticComponent<JSX.CloseIcon & Omit<import("react").HTMLAttributes<HTMLCloseIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCloseIconElement>>;
13
16
  export declare const DocumentRefreshIcon: import("react").ForwardRefExoticComponent<JSX.DocumentRefreshIcon & Omit<import("react").HTMLAttributes<HTMLDocumentRefreshIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLDocumentRefreshIconElement>>;
17
+ export declare const FlowIcon: import("react").ForwardRefExoticComponent<JSX.FlowIcon & Omit<import("react").HTMLAttributes<HTMLFlowIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLFlowIconElement>>;
14
18
  export declare const FolderIcon: import("react").ForwardRefExoticComponent<JSX.FolderIcon & Omit<import("react").HTMLAttributes<HTMLFolderIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLFolderIconElement>>;
15
19
  export declare const ForwardIcon: import("react").ForwardRefExoticComponent<JSX.ForwardIcon & Omit<import("react").HTMLAttributes<HTMLForwardIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLForwardIconElement>>;
16
20
  export declare const GlobeIcon: import("react").ForwardRefExoticComponent<JSX.GlobeIcon & Omit<import("react").HTMLAttributes<HTMLGlobeIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLGlobeIconElement>>;
21
+ export declare const GoogleLogoIcon: import("react").ForwardRefExoticComponent<JSX.GoogleLogoIcon & Omit<import("react").HTMLAttributes<HTMLGoogleLogoIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLGoogleLogoIconElement>>;
17
22
  export declare const InboxIcon: import("react").ForwardRefExoticComponent<JSX.InboxIcon & Omit<import("react").HTMLAttributes<HTMLInboxIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLInboxIconElement>>;
23
+ export declare const InfoIcon: import("react").ForwardRefExoticComponent<JSX.InfoIcon & Omit<import("react").HTMLAttributes<HTMLInfoIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLInfoIconElement>>;
18
24
  export declare const ItalicIcon: import("react").ForwardRefExoticComponent<JSX.ItalicIcon & Omit<import("react").HTMLAttributes<HTMLItalicIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLItalicIconElement>>;
19
25
  export declare const LoadingIcon: import("react").ForwardRefExoticComponent<JSX.LoadingIcon & Omit<import("react").HTMLAttributes<HTMLLoadingIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLLoadingIconElement>>;
26
+ export declare const LocationIcon: import("react").ForwardRefExoticComponent<JSX.LocationIcon & Omit<import("react").HTMLAttributes<HTMLLocationIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLLocationIconElement>>;
27
+ export declare const LocationOffIcon: import("react").ForwardRefExoticComponent<JSX.LocationOffIcon & Omit<import("react").HTMLAttributes<HTMLLocationOffIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLLocationOffIconElement>>;
28
+ export declare const MicrosoftLogoIcon: import("react").ForwardRefExoticComponent<JSX.MicrosoftLogoIcon & Omit<import("react").HTMLAttributes<HTMLMicrosoftLogoIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLMicrosoftLogoIconElement>>;
29
+ export declare const MultiSelectDropdown: import("react").ForwardRefExoticComponent<JSX.MultiSelectDropdown & Omit<import("react").HTMLAttributes<HTMLMultiSelectDropdownElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLMultiSelectDropdownElement>>;
30
+ export declare const NylasAdditionalParticipants: import("react").ForwardRefExoticComponent<JSX.NylasAdditionalParticipants & Omit<import("react").HTMLAttributes<HTMLNylasAdditionalParticipantsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasAdditionalParticipantsElement>>;
31
+ export declare const NylasAvailabilityPicker: import("react").ForwardRefExoticComponent<JSX.NylasAvailabilityPicker & Omit<import("react").HTMLAttributes<HTMLNylasAvailabilityPickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasAvailabilityPickerElement>>;
20
32
  export declare const NylasBookedEventCard: import("react").ForwardRefExoticComponent<JSX.NylasBookedEventCard & Omit<import("react").HTMLAttributes<HTMLNylasBookedEventCardElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasBookedEventCardElement>>;
33
+ export declare const NylasBookingCalendarPicker: import("react").ForwardRefExoticComponent<JSX.NylasBookingCalendarPicker & Omit<import("react").HTMLAttributes<HTMLNylasBookingCalendarPickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasBookingCalendarPickerElement>>;
21
34
  export declare const NylasBookingForm: import("react").ForwardRefExoticComponent<JSX.NylasBookingForm & Omit<import("react").HTMLAttributes<HTMLNylasBookingFormElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasBookingFormElement>>;
35
+ export declare const NylasBufferTime: import("react").ForwardRefExoticComponent<JSX.NylasBufferTime & Omit<import("react").HTMLAttributes<HTMLNylasBufferTimeElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasBufferTimeElement>>;
36
+ export declare const NylasCalendarPicker: import("react").ForwardRefExoticComponent<JSX.NylasCalendarPicker & Omit<import("react").HTMLAttributes<HTMLNylasCalendarPickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCalendarPickerElement>>;
22
37
  export declare const NylasCancelBookingForm: import("react").ForwardRefExoticComponent<JSX.NylasCancelBookingForm & Omit<import("react").HTMLAttributes<HTMLNylasCancelBookingFormElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCancelBookingFormElement>>;
23
38
  export declare const NylasCancelledEventCard: import("react").ForwardRefExoticComponent<JSX.NylasCancelledEventCard & Omit<import("react").HTMLAttributes<HTMLNylasCancelledEventCardElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCancelledEventCardElement>>;
24
39
  export declare const NylasComposer: import("react").ForwardRefExoticComponent<JSX.NylasComposer & Omit<import("react").HTMLAttributes<HTMLNylasComposerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasComposerElement>>;
40
+ export declare const NylasCustomBookingFlow: import("react").ForwardRefExoticComponent<JSX.NylasCustomBookingFlow & Omit<import("react").HTMLAttributes<HTMLNylasCustomBookingFlowElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasCustomBookingFlowElement>>;
25
41
  export declare const NylasDatePicker: import("react").ForwardRefExoticComponent<JSX.NylasDatePicker & Omit<import("react").HTMLAttributes<HTMLNylasDatePickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasDatePickerElement>>;
42
+ export declare const NylasEditorTabs: import("react").ForwardRefExoticComponent<JSX.NylasEditorTabs & Omit<import("react").HTMLAttributes<HTMLNylasEditorTabsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasEditorTabsElement>>;
43
+ export declare const NylasEventDescription: import("react").ForwardRefExoticComponent<JSX.NylasEventDescription & Omit<import("react").HTMLAttributes<HTMLNylasEventDescriptionElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasEventDescriptionElement>>;
44
+ export declare const NylasEventDuration: import("react").ForwardRefExoticComponent<JSX.NylasEventDuration & Omit<import("react").HTMLAttributes<HTMLNylasEventDurationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasEventDurationElement>>;
45
+ export declare const NylasEventInfo: import("react").ForwardRefExoticComponent<JSX.NylasEventInfo & Omit<import("react").HTMLAttributes<HTMLNylasEventInfoElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasEventInfoElement>>;
46
+ export declare const NylasEventLimits: import("react").ForwardRefExoticComponent<JSX.NylasEventLimits & Omit<import("react").HTMLAttributes<HTMLNylasEventLimitsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasEventLimitsElement>>;
47
+ export declare const NylasEventTitle: import("react").ForwardRefExoticComponent<JSX.NylasEventTitle & Omit<import("react").HTMLAttributes<HTMLNylasEventTitleElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasEventTitleElement>>;
48
+ export declare const NylasFormCard: import("react").ForwardRefExoticComponent<JSX.NylasFormCard & Omit<import("react").HTMLAttributes<HTMLNylasFormCardElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasFormCardElement>>;
26
49
  export declare const NylasIfState: import("react").ForwardRefExoticComponent<JSX.NylasIfState & Omit<import("react").HTMLAttributes<HTMLNylasIfStateElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasIfStateElement>>;
50
+ export declare const NylasLimitFutureBookings: import("react").ForwardRefExoticComponent<JSX.NylasLimitFutureBookings & Omit<import("react").HTMLAttributes<HTMLNylasLimitFutureBookingsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasLimitFutureBookingsElement>>;
27
51
  export declare const NylasListFolders: import("react").ForwardRefExoticComponent<JSX.NylasListFolders & Omit<import("react").HTMLAttributes<HTMLNylasListFoldersElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasListFoldersElement>>;
28
52
  export declare const NylasListThreads: import("react").ForwardRefExoticComponent<JSX.NylasListThreads & Omit<import("react").HTMLAttributes<HTMLNylasListThreadsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasListThreadsElement>>;
29
53
  export declare const NylasLocaleSwitch: import("react").ForwardRefExoticComponent<JSX.NylasLocaleSwitch & Omit<import("react").HTMLAttributes<HTMLNylasLocaleSwitchElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasLocaleSwitchElement>>;
54
+ export declare const NylasLocationComponent: import("react").ForwardRefExoticComponent<JSX.NylasLocationComponent & Omit<import("react").HTMLAttributes<HTMLNylasLocationComponentElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasLocationComponentElement>>;
30
55
  export declare const NylasLogin: import("react").ForwardRefExoticComponent<JSX.NylasLogin & Omit<import("react").HTMLAttributes<HTMLNylasLoginElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasLoginElement>>;
31
56
  export declare const NylasLogo: import("react").ForwardRefExoticComponent<JSX.NylasLogo & Omit<import("react").HTMLAttributes<HTMLNylasLogoElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasLogoElement>>;
32
57
  export declare const NylasMailbox: import("react").ForwardRefExoticComponent<JSX.NylasMailbox & Omit<import("react").HTMLAttributes<HTMLNylasMailboxElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasMailboxElement>>;
33
58
  export declare const NylasMailboxPagination: import("react").ForwardRefExoticComponent<JSX.NylasMailboxPagination & Omit<import("react").HTMLAttributes<HTMLNylasMailboxPaginationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasMailboxPaginationElement>>;
34
59
  export declare const NylasMailboxToolbarButton: import("react").ForwardRefExoticComponent<JSX.NylasMailboxToolbarButton & Omit<import("react").HTMLAttributes<HTMLNylasMailboxToolbarButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasMailboxToolbarButtonElement>>;
60
+ export declare const NylasMinCancellationNotice: import("react").ForwardRefExoticComponent<JSX.NylasMinCancellationNotice & Omit<import("react").HTMLAttributes<HTMLNylasMinCancellationNoticeElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasMinCancellationNoticeElement>>;
35
61
  export declare const NylasNotification: import("react").ForwardRefExoticComponent<JSX.NylasNotification & Omit<import("react").HTMLAttributes<HTMLNylasNotificationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasNotificationElement>>;
36
- export declare const NylasOpenHoursPicker: import("react").ForwardRefExoticComponent<JSX.NylasOpenHoursPicker & Omit<import("react").HTMLAttributes<HTMLNylasOpenHoursPickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasOpenHoursPickerElement>>;
37
62
  export declare const NylasProvider: import("react").ForwardRefExoticComponent<JSX.NylasProvider & Omit<import("react").HTMLAttributes<HTMLNylasProviderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasProviderElement>>;
38
- export declare const NylasScheduler: import("react").ForwardRefExoticComponent<JSX.NylasScheduler & Omit<import("react").HTMLAttributes<HTMLNylasSchedulerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSchedulerElement>>;
63
+ export declare const NylasSchedulerEditor: import("react").ForwardRefExoticComponent<JSX.NylasSchedulerEditor & Omit<import("react").HTMLAttributes<HTMLNylasSchedulerEditorElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSchedulerEditorElement>>;
64
+ export declare const NylasScheduling: import("react").ForwardRefExoticComponent<JSX.NylasScheduling & Omit<import("react").HTMLAttributes<HTMLNylasSchedulingElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSchedulingElement>>;
39
65
  export declare const NylasSelectedEventCard: import("react").ForwardRefExoticComponent<JSX.NylasSelectedEventCard & Omit<import("react").HTMLAttributes<HTMLNylasSelectedEventCardElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSelectedEventCardElement>>;
40
66
  export declare const NylasSummarizeMessageButton: import("react").ForwardRefExoticComponent<JSX.NylasSummarizeMessageButton & Omit<import("react").HTMLAttributes<HTMLNylasSummarizeMessageButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasSummarizeMessageButtonElement>>;
41
67
  export declare const NylasThreadsRefresh: import("react").ForwardRefExoticComponent<JSX.NylasThreadsRefresh & Omit<import("react").HTMLAttributes<HTMLNylasThreadsRefreshElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasThreadsRefreshElement>>;
42
68
  export declare const NylasThreadsSearch: import("react").ForwardRefExoticComponent<JSX.NylasThreadsSearch & Omit<import("react").HTMLAttributes<HTMLNylasThreadsSearchElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasThreadsSearchElement>>;
69
+ export declare const NylasTimeWindowPicker: import("react").ForwardRefExoticComponent<JSX.NylasTimeWindowPicker & Omit<import("react").HTMLAttributes<HTMLNylasTimeWindowPickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasTimeWindowPickerElement>>;
43
70
  export declare const NylasTimeslotPicker: import("react").ForwardRefExoticComponent<JSX.NylasTimeslotPicker & Omit<import("react").HTMLAttributes<HTMLNylasTimeslotPickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasTimeslotPickerElement>>;
44
71
  export declare const NylasViewEmail: import("react").ForwardRefExoticComponent<JSX.NylasViewEmail & Omit<import("react").HTMLAttributes<HTMLNylasViewEmailElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasViewEmailElement>>;
45
72
  export declare const NylasViewThread: import("react").ForwardRefExoticComponent<JSX.NylasViewThread & Omit<import("react").HTMLAttributes<HTMLNylasViewThreadElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLNylasViewThreadElement>>;
@@ -54,6 +81,8 @@ export declare const SentIcon: import("react").ForwardRefExoticComponent<JSX.Sen
54
81
  export declare const SpamIcon: import("react").ForwardRefExoticComponent<JSX.SpamIcon & Omit<import("react").HTMLAttributes<HTMLSpamIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSpamIconElement>>;
55
82
  export declare const StarIcon: import("react").ForwardRefExoticComponent<JSX.StarIcon & Omit<import("react").HTMLAttributes<HTMLStarIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLStarIconElement>>;
56
83
  export declare const StopIcon: import("react").ForwardRefExoticComponent<JSX.StopIcon & Omit<import("react").HTMLAttributes<HTMLStopIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLStopIconElement>>;
84
+ export declare const TimePeriodSelector: import("react").ForwardRefExoticComponent<JSX.TimePeriodSelector & Omit<import("react").HTMLAttributes<HTMLTimePeriodSelectorElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTimePeriodSelectorElement>>;
85
+ export declare const TooltipComponent: import("react").ForwardRefExoticComponent<JSX.TooltipComponent & Omit<import("react").HTMLAttributes<HTMLTooltipComponentElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTooltipComponentElement>>;
57
86
  export declare const TranslateIcon: import("react").ForwardRefExoticComponent<JSX.TranslateIcon & Omit<import("react").HTMLAttributes<HTMLTranslateIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTranslateIconElement>>;
58
87
  export declare const TrashIcon: import("react").ForwardRefExoticComponent<JSX.TrashIcon & Omit<import("react").HTMLAttributes<HTMLTrashIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLTrashIconElement>>;
59
88
  export declare const UnderlineIcon: import("react").ForwardRefExoticComponent<JSX.UnderlineIcon & Omit<import("react").HTMLAttributes<HTMLUnderlineIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLUnderlineIconElement>>;
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-3b6f5cd5.cjs"),y=require("./utils-5074a070-d5ba6add.cjs"),yn=require("./register-component-152c6ad2-0df7215b.cjs"),En=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");require("react");require("react-dom");const Tn=".sc-forward-icon-h{display:flex}",An=Tn,Ct=class{constructor(t){m.registerInstance(this,t),this.width="15",this.height="15"}render(){return m.h("svg",{key:"f6f2a0745a4ea7849081d7ac5d0244ee69d087b7",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},m.h("path",{key:"484a8d3299af5b6a48929d894214027e3c273fe4",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};Ct.style=An;const _n=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}',wn=_n,Lt=class{constructor(t){m.registerInstance(this,t),this.close=m.createEvent(this,"close",7),this.send=m.createEvent(this,"send",7),this.closeComposer=o=>{this.close.emit(o)},this.sendComposer=o=>{var s;if(!this.editorEl){y.debug("no editor element");return}const u=this.editorEl.querySelector(".message-body");if(!u){y.debug("no message body");return}this.message&&(this.send.emit({message:this.message,replyBody:((s=u.querySelector(".message-body"))==null?void 0:s.innerHTML)||""}),this.close.emit(o),this.editorEl.innerHTML="")},this.message=void 0,this.viewEmailElement=void 0}connectedCallback(){}disconnectedCallback(){this.editorEl&&(this.editorEl.innerHTML="")}componentWillLoad(){}async componentDidLoad(){if(this.message&&this.watchBody(this.message),!this.editorEl){y.debug("[connectedCallback] no editor element");return}if(!this.toolbarEl){y.debug("[connectedCallback] no toolbar element");return}const t=this.editorEl,o=this.toolbarEl;t.addEventListener("mouseup",u=>{var W;const s=(W=this.host.shadowRoot)==null?void 0:W.getSelection();if(!s){y.debug("no selection");return}const p=s.getRangeAt(0),r=s.toString();if(!r){o.style.display="none";return}const f=t.querySelector(".message-body");if(!f){y.debug("no message body");return}const l=p.commonAncestorContainer.parentElement;if(!l)return;const T=f.getBoundingClientRect();y.debug("messageBodyRect",{messageBodyRect:T});const _=l.getBoundingClientRect();y.debug("foundRect",{foundRect:_});const ce=(l.childNodes[0].textContent||"").indexOf(r),q=window.getComputedStyle(l).fontSize,X=parseInt(q.replace("px",""),10),ne=_.top-T.top-o.clientHeight,ye=ce*(1/X)*100;o.style.top=`${ne}px`,o.style.left=`${ye}px`,o.style.display="block"})}watchBody(t){var r;if(!this.editorEl){y.debug("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach(f=>f.remove());const o=document.createElement("div");o.classList.add("message-body");const u=document.createElement("p");u.innerHTML="&nbsp;",o.appendChild(u);const s=document.createElement("br");o.appendChild(s);const p=document.createElement("div");if(p.classList.add("reply-text"),p.innerText=`On ${new Date(t.date*1e3).toLocaleDateString(void 0,{dateStyle:"full"})} <${(r=t.from)==null?void 0:r.map(f=>f.name||f.email).join(", ")}> wrote:`,o.appendChild(p),t.body){const f=document.createElement("html");f.innerHTML=t.body;const i=document.createElement("blockquote");i.classList.add("collapsed"),i.classList.add("gmail_quote"),i.innerHTML=f.innerHTML,o.appendChild(i),y.debug("replyContainer",{replyContainer:i})}this.editorEl.appendChild(o),this.editorEl.querySelectorAll("blockquote.collapsed").forEach(f=>{f.addEventListener("click",function(i){i.preventDefault();const l=i.target;l.classList.remove("collapsed"),l.classList.add("expanded")},{once:!0})}),this.editorEl.focus()}render(){return m.h(m.Host,{key:"b25497b478659d675aadb91a6b7e147ff6e5e9b8"},m.h("sp-theme",{key:"dd88253135657e6cda8daf8e71635c16d736a317",scale:"medium",color:"dark"},m.h("div",{key:"f23ecbde8bda95328796f60bc5612cedd30cd488",class:"editor",contentEditable:!0,ref:t=>this.editorEl=t},m.h("div",{key:"871c357e3c095fe2237d228bbaaeb1f5247734b3",class:"toolbar",ref:t=>this.toolbarEl=t,contentEditable:!1},m.h("sp-button",{key:"626560dcbd264b9572be5f7d69268186c8b1a0f6",quiet:!0,onClick:()=>document.execCommand("bold")},m.h("div",{key:"d83785d23518d539064405eb657d9291f76436be",slot:"icon"},m.h("bold-icon",{key:"ce45db34d019a60e3955a3a32335447ae1e27b14"})),m.h("div",{key:"9f05672f538617fbaca46e8287f7e2ebc0909816",slot:"label"},"Bold")),m.h("sp-button",{key:"2906871fa67987ab87a7619b7bb0b9ee09b3dca8",quiet:!0,onClick:()=>document.execCommand("underline")},m.h("div",{key:"b75c2a77ed80693f66b6bddcc9c7af13c474bd7d",slot:"icon"},m.h("underline-icon",{key:"733d5dd3fa2906c9ad4e6a212c3282315290f0bb"})),m.h("div",{key:"f59da34a2ef65a4339a5e5770acd41e1e4c0d4b1",slot:"label"},"Underline")),m.h("sp-button",{key:"5654719682fe352f5a060e1a947d52686dcbb91c",quiet:!0,onClick:()=>document.execCommand("italic")},m.h("div",{key:"650498d94ec07f8fd43d305637f189336aaac2a1",slot:"icon"},m.h("italic-icon",{key:"8f03281a56c6b35f17b7a7f5f10285f3be87d757"})),m.h("div",{key:"03ba08b7ffb8023b44bbd7a107f8767e7430a692",slot:"label"},"Italic")))),m.h("div",{key:"19cd7d52d3f24a440a6b4ae6beb75a680403d94d",class:"buttons"},m.h("sp-button",{key:"dfe307499781aa00e03de3316043a4d47bf349a5",onClick:this.sendComposer,class:"send"},"Send"),m.h("sp-button",{key:"c8d6a72d27723f1c2ac789d0a03d22b14ebfdec6",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return m.getElement(this)}static get watchers(){return{message:["watchBody"]}}};Lt.style=wn;const vn=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}",Sn=vn;var Cn=function(t,o,u,s){var p=arguments.length,r=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,u):s,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,o,u,s);else for(var i=t.length-1;i>=0;i--)(f=t[i])&&(r=(p<3?f(r):p>3?f(o,u,r):f(o,u))||r);return p>3&&r&&Object.defineProperty(o,u,r),r},Fe=function(t,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,o)};const We=class{constructor(t){m.registerInstance(this,t),this.summarize=m.createEvent(this,"summarize",7),this.abortController=new AbortController,this.onClick=async o=>{var u,s;o.preventDefault(),o.stopPropagation(),this.state==="stopped"?this.message&&(this.abortController=new AbortController,this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState}).defaultPrevented||(y.debug("[nylas-summarize-message-button] Default event not prevented, summarizing message"),this.audioRef&&(await this.audioRef.play().then(()=>{var r;return(r=this.audioRef)==null?void 0:r.pause()}).catch(r=>console.error("Error playing audio:",r)),await this.audioRef.play().catch(r=>console.error("Error playing audio:",r))))):this.state==="playing"?((u=this.abortController)==null||u.abort(),(s=this.audioRef)==null||s.pause()):this.state="stopped"},this.message=void 0,this.state="stopped",this.playAudio=this.playAudio.bind(this),this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){y.debug("[nylas-summarize-message-button] Component will load")}async componentDidLoad(){y.debug("[nylas-summarize-message-button] Component did load")}async updateState(t){this.state=t}async playAudio(t){if(!this.audioRef){this.state="stopped";return}if(!t){this.state="stopped";return}const o=this.audioRef;if(!("MediaSource"in window)){const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=[];await this.readChunk(l,T);const _=new Blob(T,{type:"audio/mpeg"}),N=URL.createObjectURL(_);o.src=N;return}const u=new MediaSource;let s,p=!1;o.src=URL.createObjectURL(u),u.addEventListener("sourceopen",r);async function r(){s=u.addSourceBuffer("audio/mpeg"),s.addEventListener("updateend",f);const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=()=>{l.read().then(({done:_,value:N})=>{if(_){p=!0;return}s.updating||s.appendBuffer(N),T()}).catch(_=>{console.error("Error while fetching and appending chunks:",_)})};T(),o.paused&&o.play().catch(_=>console.error("Error playing audio:",_))}function f(){if(p){u.endOfStream(),u.removeEventListener("sourceopen",r),u.removeEventListener("sourceclose",()=>{y.debug("[nylas-summarize-message-button] Source closed")}),s.removeEventListener("updateend",f);return}}}async readChunk(t,o){return t.read().then(({done:u,value:s})=>u?o:(o.push(s),this.readChunk(t,o)))}render(){return m.h(m.Host,{key:"052c49f7b564274561da89404b06b490b993b1f0"},m.h("sp-theme",{key:"55b4965642873d51c445b4db4eac17119d6e0568",scale:"medium",color:"dark"},m.h("sp-button",{key:"c7bf00d3570f9129cdb3005d0e0877c95cb75466",label:"Summarize email","icon-only":!0,onClickCapture:this.onClick,class:{"summarize-button":!0,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&m.h("play-icon",null),this.state==="loading"&&m.h("loading-icon",null),this.state==="playing"&&m.h("stop-icon",null)),m.h("audio",{key:"489a2f36807bf74313ca4ce0cdfe84682a614a34",ref:t=>this.audioRef=t,autoPlay:!0,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped",y.debug("[nylas-summarize-message-button] Audio ended")}})))}};Cn([yn.RegisterComponent({name:"nylas-summarize-message-button",eventToProps:{summarize:async(t,o)=>{const{playAudio:u,updateState:s,abortController:p,message:r}=t.detail,f=y.htmlToPlainText(r.body||"");await s("loading");try{const i=await o.messages.summarizeText(f),l=o.messages.textToSpeech(i,p);await u(l)}catch(i){await s("stopped"),console.error("Error summarizing message:",i)}}},fireRegisterEvent:!0}),Fe("design:type",Function),Fe("design:paramtypes",[]),Fe("design:returntype",void 0)],We.prototype,"render",null);We.style=Sn;function P(t){return!window.matchMedia("(prefers-color-scheme: dark)").matches||!t?t:t==="transparent"?"color":t.startsWith("#")?Ln(t):t.startsWith("rgb")?Rt(t):t.startsWith("hsl")?Rn(t):kn(t)?Mn(t):t}function Ln(t){t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const o=(255-parseInt(t.slice(1,3),16)).toString(16).padStart(2,"0"),u=(255-parseInt(t.slice(3,5),16)).toString(16).padStart(2,"0"),s=(255-parseInt(t.slice(5,7),16)).toString(16).padStart(2,"0");return`#${o}${u}${s}`}function Rt(t){var r;const o=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`rgb(${255-u}, ${255-s}, ${255-p})`}function Rn(t){var r;const o=(r=t.match(/\d+\.?\d*/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`hsl(${u}, ${s}%, ${100-p}%)`}function kn(t){return/^[a-z]+$/i.test(t)}function Mn(t){return Rt(Nn(t))}function Nn(t){return t.toLowerCase()==="red"?"rgb(255, 0, 0)":"rgb(0, 0, 0)"}function St(t){if(t instanceof HTMLStyleElement){let o=t.textContent;if(o){o=o.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const u=o.matchAll(/border-color:\s*([^;]+)/g);if(u)for(const i of u){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}const s=o.matchAll(/border:\s*([^;]+)/g);if(s)for(const i of s){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const p=o.matchAll(/background-color:\s*([^;]+)/g);if(p)for(const i of p){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T))),y.debug("backgroundColor",{fullMatch:l,replace:l.replace(T,P(T)),color:T,invertColor:P(T)})}const r=o.matchAll(/background:\s*([^;]+)/g);if(r)for(const i of r){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const f=o.matchAll(/color:\s*([^;]+)/g);if(f)for(const i of f){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}t.textContent=o}}if(t instanceof HTMLElement){const o=window.getComputedStyle(t),u=o.color||t.style.color,s=o.backgroundColor||t.style.backgroundColor,p=o.borderColor||t.style.borderColor;u&&!s?t.style.color="":u&&s?(t.style.color=P(u),t.style.backgroundColor=P(s),y.debug("element",t),y.debug("computedStyle.color",u),y.debug("computedStyle.backgroundColor",s),y.debug("invertColor(color)",P(u)),y.debug("invertColor(backgroundColor)",P(s))):!u&&s&&(t.style.backgroundColor=""),p&&(y.debug("borderColor",p),t.style.borderColor=P(p)),t.hasAttribute("bgcolor")&&t.removeAttribute("bgcolor")}}function xn(t){St(t),t.querySelectorAll("*").forEach(u=>St(u))}var kt={exports:{}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(t,o){(function(u,s){t.exports=s()})(En.commonjsGlobal,function(){const{entries:u,setPrototypeOf:s,isFrozen:p,getPrototypeOf:r,getOwnPropertyDescriptor:f}=Object;let{freeze:i,seal:l,create:T}=Object,{apply:_,construct:N}=typeof Reflect<"u"&&Reflect;i||(i=function(c){return c}),l||(l=function(c){return c}),_||(_=function(c,E,g){return c.apply(E,g)}),N||(N=function(c,E){return new c(...E)});const U=I(Array.prototype.forEach),ce=I(Array.prototype.pop),q=I(Array.prototype.push),X=I(String.prototype.toLowerCase),ne=I(String.prototype.toString),ye=I(String.prototype.match),W=I(String.prototype.replace),Dt=I(String.prototype.indexOf),Ot=I(String.prototype.trim),O=I(RegExp.prototype.test),oe=It(TypeError);function I(b){return function(c){for(var E=arguments.length,g=new Array(E>1?E-1:0),k=1;k<E;k++)g[k-1]=arguments[k];return _(b,c,g)}}function It(b){return function(){for(var c=arguments.length,E=new Array(c),g=0;g<c;g++)E[g]=arguments[g];return N(b,E)}}function h(b,c){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X;s&&s(b,null);let g=c.length;for(;g--;){let k=c[g];if(typeof k=="string"){const H=E(k);H!==k&&(p(c)||(c[g]=H),k=H)}b[k]=!0}return b}function Pt(b){for(let c=0;c<b.length;c++)f(b,c)===void 0&&(b[c]=null);return b}function G(b){const c=T(null);for(const[E,g]of u(b))f(b,E)!==void 0&&(Array.isArray(g)?c[E]=Pt(g):g&&typeof g=="object"&&g.constructor===Object?c[E]=G(g):c[E]=g);return c}function de(b,c){for(;b!==null;){const g=f(b,c);if(g){if(g.get)return I(g.get);if(typeof g.value=="function")return I(g.value)}b=r(b)}function E(g){return console.warn("fallback value for",g),null}return E}const qe=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ee=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Te=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ut=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ae=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zt=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ge=i(["#text"]),$e=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),_e=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ye=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ue=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ht=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ft=l(/<%[\w\W]*|[\w\W]*%>/gm),Bt=l(/\${[\w\W]*}/gm),Wt=l(/^data-[\-\w.\u00B7-\uFFFF]/),qt=l(/^aria-[\-\w]+$/),je=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gt=l(/^(?:\w+script|data):/i),$t=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xe=l(/^html$/i);var Ve=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ht,ERB_EXPR:Ft,TMPLIT_EXPR:Bt,DATA_ATTR:Wt,ARIA_ATTR:qt,IS_ALLOWED_URI:je,IS_SCRIPT_OR_DATA:Gt,ATTR_WHITESPACE:$t,DOCTYPE_NAME:Xe});const Yt=function(){return typeof window>"u"?null:window},jt=function(c,E){if(typeof c!="object"||typeof c.createPolicy!="function")return null;let g=null;const k="data-tt-policy-suffix";E&&E.hasAttribute(k)&&(g=E.getAttribute(k));const H="dompurify"+(g?"#"+g:"");try{return c.createPolicy(H,{createHTML(V){return V},createScriptURL(V){return V}})}catch{return console.warn("TrustedTypes policy "+H+" could not be created."),null}};function Ze(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yt();const c=d=>Ze(d);if(c.version="3.0.8",c.removed=[],!b||!b.document||b.document.nodeType!==9)return c.isSupported=!1,c;let{document:E}=b;const g=E,k=g.currentScript,{DocumentFragment:H,HTMLTemplateElement:V,Node:we,Element:Ke,NodeFilter:ve,NamedNodeMap:Vt=b.NamedNodeMap||b.MozNamedAttrMap,HTMLFormElement:Zt,DOMParser:Kt,trustedTypes:me}=b,fe=Ke.prototype,Qt=de(fe,"cloneNode"),Jt=de(fe,"nextSibling"),en=de(fe,"childNodes"),Se=de(fe,"parentNode");if(typeof V=="function"){const d=E.createElement("template");d.content&&d.content.ownerDocument&&(E=d.content.ownerDocument)}let M,ie="";const{implementation:Ce,createNodeIterator:tn,createDocumentFragment:nn,getElementsByTagName:on}=E,{importNode:rn}=g;let z={};c.isSupported=typeof u=="function"&&typeof Se=="function"&&Ce&&Ce.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Le,ERB_EXPR:Re,TMPLIT_EXPR:ke,DATA_ATTR:an,ARIA_ATTR:sn,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:Qe}=Ve;let{IS_ALLOWED_URI:Je}=Ve,v=null;const et=h({},[...qe,...Ee,...Te,...Ae,...Ge]);let S=null;const tt=h({},[...$e,..._e,...Ye,...ue]);let w=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,Me=null,nt=!0,Ne=!0,ot=!1,it=!0,Z=!1,$=!1,xe=!1,De=!1,K=!1,pe=!1,he=!1,rt=!0,at=!1;const cn="user-content-";let Oe=!0,ae=!1,Q={},J=null;const st=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let lt=null;const ct=h({},["audio","video","img","source","image","track"]);let Ie=null;const dt=h({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let ee=F,Pe=!1,Ue=null;const dn=h({},[ge,be,F],ne);let se=null;const un=["application/xhtml+xml","text/html"],mn="text/html";let C=null,te=null;const fn=E.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},ze=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(te&&te===e)){if((!e||typeof e!="object")&&(e={}),e=G(e),se=un.indexOf(e.PARSER_MEDIA_TYPE)===-1?mn:e.PARSER_MEDIA_TYPE,C=se==="application/xhtml+xml"?ne:X,v="ALLOWED_TAGS"in e?h({},e.ALLOWED_TAGS,C):et,S="ALLOWED_ATTR"in e?h({},e.ALLOWED_ATTR,C):tt,Ue="ALLOWED_NAMESPACES"in e?h({},e.ALLOWED_NAMESPACES,ne):dn,Ie="ADD_URI_SAFE_ATTR"in e?h(G(dt),e.ADD_URI_SAFE_ATTR,C):dt,lt="ADD_DATA_URI_TAGS"in e?h(G(ct),e.ADD_DATA_URI_TAGS,C):ct,J="FORBID_CONTENTS"in e?h({},e.FORBID_CONTENTS,C):st,re="FORBID_TAGS"in e?h({},e.FORBID_TAGS,C):{},Me="FORBID_ATTR"in e?h({},e.FORBID_ATTR,C):{},Q="USE_PROFILES"in e?e.USE_PROFILES:!1,nt=e.ALLOW_ARIA_ATTR!==!1,Ne=e.ALLOW_DATA_ATTR!==!1,ot=e.ALLOW_UNKNOWN_PROTOCOLS||!1,it=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,K=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,he=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,rt=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,Oe=e.KEEP_CONTENT!==!1,ae=e.IN_PLACE||!1,Je=e.ALLOWED_URI_REGEXP||je,ee=e.NAMESPACE||F,w=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Ne=!1),pe&&(K=!0),Q&&(v=h({},Ge),S=[],Q.html===!0&&(h(v,qe),h(S,$e)),Q.svg===!0&&(h(v,Ee),h(S,_e),h(S,ue)),Q.svgFilters===!0&&(h(v,Te),h(S,_e),h(S,ue)),Q.mathMl===!0&&(h(v,Ae),h(S,Ye),h(S,ue))),e.ADD_TAGS&&(v===et&&(v=G(v)),h(v,e.ADD_TAGS,C)),e.ADD_ATTR&&(S===tt&&(S=G(S)),h(S,e.ADD_ATTR,C)),e.ADD_URI_SAFE_ATTR&&h(Ie,e.ADD_URI_SAFE_ATTR,C),e.FORBID_CONTENTS&&(J===st&&(J=G(J)),h(J,e.FORBID_CONTENTS,C)),Oe&&(v["#text"]=!0),$&&h(v,["html","head","body"]),v.table&&(h(v,["tbody"]),delete re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=e.TRUSTED_TYPES_POLICY,ie=M.createHTML("")}else M===void 0&&(M=jt(me,k)),M!==null&&typeof ie=="string"&&(ie=M.createHTML(""));i&&i(e),te=e}},mt=h({},["mi","mo","mn","ms","mtext"]),ft=h({},["foreignobject","desc","title","annotation-xml"]),pn=h({},["title","style","font","a","script"]),pt=h({},[...Ee,...Te,...Ut]),ht=h({},[...Ae,...zt]),hn=function(e){let n=Se(e);(!n||!n.tagName)&&(n={namespaceURI:ee,tagName:"template"});const a=X(e.tagName),A=X(n.tagName);return Ue[e.namespaceURI]?e.namespaceURI===be?n.namespaceURI===F?a==="svg":n.namespaceURI===ge?a==="svg"&&(A==="annotation-xml"||mt[A]):!!pt[a]:e.namespaceURI===ge?n.namespaceURI===F?a==="math":n.namespaceURI===be?a==="math"&&ft[A]:!!ht[a]:e.namespaceURI===F?n.namespaceURI===be&&!ft[A]||n.namespaceURI===ge&&!mt[A]?!1:!ht[a]&&(pn[a]||!pt[a]):!!(se==="application/xhtml+xml"&&Ue[e.namespaceURI]):!1},Y=function(e){q(c.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},He=function(e,n){try{q(c.removed,{attribute:n.getAttributeNode(e),from:n})}catch{q(c.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is"&&!S[e])if(K||pe)try{Y(n)}catch{}else try{n.setAttribute(e,"")}catch{}},gt=function(e){let n=null,a=null;if(De)e="<remove></remove>"+e;else{const R=ye(e,/^[\r\n\t ]+/);a=R&&R[0]}se==="application/xhtml+xml"&&ee===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const A=M?M.createHTML(e):e;if(ee===F)try{n=new Kt().parseFromString(A,se)}catch{}if(!n||!n.documentElement){n=Ce.createDocument(ee,"template",null);try{n.documentElement.innerHTML=Pe?ie:A}catch{}}const L=n.body||n.documentElement;return e&&a&&L.insertBefore(E.createTextNode(a),L.childNodes[0]||null),ee===F?on.call(n,$?"html":"body")[0]:$?n.documentElement:L},bt=function(e){return tn.call(e.ownerDocument||e,e,ve.SHOW_ELEMENT|ve.SHOW_COMMENT|ve.SHOW_TEXT,null)},gn=function(e){return e instanceof Zt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Vt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},yt=function(e){return typeof we=="function"&&e instanceof we},B=function(e,n,a){z[e]&&U(z[e],A=>{A.call(c,n,a,te)})},Et=function(e){let n=null;if(B("beforeSanitizeElements",e,null),gn(e))return Y(e),!0;const a=C(e.nodeName);if(B("uponSanitizeElement",e,{tagName:a,allowedTags:v}),e.hasChildNodes()&&!yt(e.firstElementChild)&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent))return Y(e),!0;if(!v[a]||re[a]){if(!re[a]&&At(a)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a)))return!1;if(Oe&&!J[a]){const A=Se(e)||e.parentNode,L=en(e)||e.childNodes;if(L&&A){const R=L.length;for(let x=R-1;x>=0;--x)A.insertBefore(Qt(L[x],!0),Jt(e))}}return Y(e),!0}return e instanceof Ke&&!hn(e)||(a==="noscript"||a==="noembed"||a==="noframes")&&O(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y(e),!0):(Z&&e.nodeType===3&&(n=e.textContent,U([Le,Re,ke],A=>{n=W(n,A," ")}),e.textContent!==n&&(q(c.removed,{element:e.cloneNode()}),e.textContent=n)),B("afterSanitizeElements",e,null),!1)},Tt=function(e,n,a){if(rt&&(n==="id"||n==="name")&&(a in E||a in fn))return!1;if(!(Ne&&!Me[n]&&O(an,n))){if(!(nt&&O(sn,n))){if(!S[n]||Me[n]){if(!(At(e)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,e)||w.tagNameCheck instanceof Function&&w.tagNameCheck(e))&&(w.attributeNameCheck instanceof RegExp&&O(w.attributeNameCheck,n)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(n))||n==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))))return!1}else if(!Ie[n]){if(!O(Je,W(a,Qe,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Dt(a,"data:")===0&&lt[e])){if(!(ot&&!O(ln,W(a,Qe,"")))){if(a)return!1}}}}}}return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){B("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};let A=n.length;for(;A--;){const L=n[A],{name:R,namespaceURI:x,value:j}=L,le=C(R);let D=R==="value"?j:Ot(j);if(a.attrName=le,a.attrValue=D,a.keepAttr=!0,a.forceKeepAttr=void 0,B("uponSanitizeAttribute",e,a),D=a.attrValue,a.forceKeepAttr||(He(R,e),!a.keepAttr))continue;if(!it&&O(/\/>/i,D)){He(R,e);continue}Z&&U([Le,Re,ke],vt=>{D=W(D,vt," ")});const wt=C(e.nodeName);if(Tt(wt,le,D)){if(at&&(le==="id"||le==="name")&&(He(R,e),D=cn+D),M&&typeof me=="object"&&typeof me.getAttributeType=="function"&&!x)switch(me.getAttributeType(wt,le)){case"TrustedHTML":{D=M.createHTML(D);break}case"TrustedScriptURL":{D=M.createScriptURL(D);break}}try{x?e.setAttributeNS(x,R,D):e.setAttribute(R,D),ce(c.removed)}catch{}}}B("afterSanitizeAttributes",e,null)},bn=function d(e){let n=null;const a=bt(e);for(B("beforeSanitizeShadowDOM",e,null);n=a.nextNode();)B("uponSanitizeShadowNode",n,null),!Et(n)&&(n.content instanceof H&&d(n.content),_t(n));B("afterSanitizeShadowDOM",e,null)};return c.sanitize=function(d){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,a=null,A=null,L=null;if(Pe=!d,Pe&&(d="<!-->"),typeof d!="string"&&!yt(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw oe("dirty is not a string, aborting")}else throw oe("toString is not a function");if(!c.isSupported)return d;if(xe||ze(e),c.removed=[],typeof d=="string"&&(ae=!1),ae){if(d.nodeName){const j=C(d.nodeName);if(!v[j]||re[j])throw oe("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof we)n=gt("<!---->"),a=n.ownerDocument.importNode(d,!0),a.nodeType===1&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a);else{if(!K&&!Z&&!$&&d.indexOf("<")===-1)return M&&he?M.createHTML(d):d;if(n=gt(d),!n)return K?null:he?ie:""}n&&De&&Y(n.firstChild);const R=bt(ae?d:n);for(;A=R.nextNode();)Et(A)||(A.content instanceof H&&bn(A.content),_t(A));if(ae)return d;if(K){if(pe)for(L=nn.call(n.ownerDocument);n.firstChild;)L.appendChild(n.firstChild);else L=n;return(S.shadowroot||S.shadowrootmode)&&(L=rn.call(g,L,!0)),L}let x=$?n.outerHTML:n.innerHTML;return $&&v["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&O(Xe,n.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+n.ownerDocument.doctype.name+`>
2
- `+x),Z&&U([Le,Re,ke],j=>{x=W(x,j," ")}),M&&he?M.createHTML(x):x},c.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ze(d),xe=!0},c.clearConfig=function(){te=null,xe=!1},c.isValidAttribute=function(d,e,n){te||ze({});const a=C(d),A=C(e);return Tt(a,A,n)},c.addHook=function(d,e){typeof e=="function"&&(z[d]=z[d]||[],q(z[d],e))},c.removeHook=function(d){if(z[d])return ce(z[d])},c.removeHooks=function(d){z[d]&&(z[d]=[])},c.removeAllHooks=function(){z={}},c}var Xt=Ze();return Xt})})(kt);const Be=kt.exports,Dn=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}",On=Dn;Be.addHook("afterSanitizeAttributes",function(t){"target"in t&&(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"))});const Mt=class{constructor(t){m.registerInstance(this,t),this.htmlElement=document.createElement("html"),this.setBody=o=>{var p;this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(r=>{r.remove()}),(this.message?y.detectIfMessageIsHTML(this.message):y.detectHTMLOrPlainText(o))||(o=`<html><body>${y.parsePlainTextToHTML(o)}</body></html>`),this.htmlElement.innerHTML=o,this.detectDarkMode&&xn(this.htmlElement),this.htmlElement.querySelectorAll("link").forEach(r=>{if(console.debug(`[nylas-view-email] Hoisting link: ${r.getAttribute("href")}`),r.getAttribute("rel")==="stylesheet"&&r.getAttribute("href")){const f=r.getAttribute("href");if(f){const i=new URL(f,window.location.href);(i.protocol==="https:"||i.protocol==="http:")&&this.hoistedFontURLs.set(i.href,i.href)}}}),this.htmlElement.querySelectorAll("style").forEach(r=>{r.innerHTML.split(`
3
- `).forEach(f=>{const i=f.match(/@import url\((.*)\)/);if(i){const l=new URL(i[1],window.location.href);(l.protocol==="https:"||l.protocol==="http:")&&this.hoistedFontURLs.set(l.href,l.href)}}),r.innerHTML=r.innerHTML.replace("body",":host"),this.styles.push(r),r.remove()}),this.htmlElement.querySelectorAll("a").forEach(r=>{r.setAttribute("target","_blank")});const s=this.htmlElement.querySelector(".gmail_quote");if(s){const r=document.createElement("button");r.classList.add("nylas-view-email-toggle-button"),r.setAttribute("aria-label","Show quoted text"),r.innerText="...",(p=s.parentElement)==null||p.insertBefore(r,s)}this.sanitizedBody=Be.sanitize(this.htmlElement.innerHTML),this.hoistedFontURLs.forEach((r,f)=>{const i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),i.classList.add("nylas-view-email-font"),document.head.appendChild(i)}),this.state="ready"},this.handleMobileSize=()=>{var u,s,p,r;const o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(o<=768){const f=(u=this.viewEmailElement)==null?void 0:u.getBoundingClientRect();if(f&&this.viewEmailElement&&this.parent&&f.width>o){const i=this.parent,l=i==null?void 0:i.getBoundingClientRect();y.debug("Parent width:",l==null?void 0:l.width,"Parent height:",l==null?void 0:l.height),y.debug("Parent client width:",i.clientWidth,"Parent client height:",i.clientHeight);const T=l.width/f.width,_=l.height/f.height,N=Math.min(T,_);y.debug("Scale:",N),this.viewEmailElement.style.setProperty("transform",`scale(${N})`),this.viewEmailElement.style.setProperty("transform-origin","top left"),this.viewEmailElement.style.setProperty("height",`${f.height*N}px`)}}else(s=this.viewEmailElement)==null||s.style.removeProperty("transform"),(p=this.viewEmailElement)==null||p.style.removeProperty("transform-origin"),(r=this.viewEmailElement)==null||r.style.removeProperty("height")},this.message=void 0,this.parent=void 0,this.attachments=[],this.detectDarkMode=!0,this.state="loading",this.sanitizedBody="",this.styles=[],this.viewEmailElement=void 0,this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){y.debug("[nylas-view-email] Component disconnected"),this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(t=>{t.remove()})}async componentWillLoad(){var t;y.debug("[nylas-view-email] component loaded"),this.setBody(((t=this.message)==null?void 0:t.body)??"")}async componentDidLoad(){y.debug("[nylas-view-thread] Component did load"),this.handleMobileSize()}async messageChanged(){var t;y.debug("[nylas-view-thread] Message changed",{message:this.message}),this.setBody(((t=this.message)==null?void 0:t.body)??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){var o;const t=(o=this.viewEmailElement)==null?void 0:o.querySelectorAll(".nylas-view-email-toggle-button");t&&t.forEach(u=>{u.addEventListener("click",()=>{var p;const s=(p=this.viewEmailElement)==null?void 0:p.querySelector(".gmail_quote");s&&s.classList.toggle("show")})})}render(){return console.debug("[nylas-view-email] render",{hoistedFontURLs:this.hoistedFontURLs}),m.h(m.Host,{key:"4fe5de7068b18d3566e049d2b068e2a568e8d849"},this.state==="loading"&&m.h("div",null,"Loading..."),this.state==="ready"&&m.h(m.Fragment,null,this.styles.map(t=>m.h("style",null,Be.sanitize(t.innerHTML))),m.h("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:t=>this.viewEmailElement=t})))}get host(){return m.getElement(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};Mt.style=On;const In=".sc-reply-all-icon-h{display:flex}",Pn=In,Nt=class{constructor(t){m.registerInstance(this,t),this.width="15",this.height="15"}render(){return m.h("svg",{key:"b8ecda42e9fee4ee178dba36bf798a6a0404424d",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},m.h("path",{key:"94ea534065e92c1e70cbe5d29b3f2afc2c1597a5",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};Nt.style=Pn;const Un=".sc-reply-icon-h{display:flex}",zn=Un,xt=class{constructor(t){m.registerInstance(this,t),this.width="15",this.height="15"}render(){return m.h("svg",{key:"7bd2f7db7c28d9eacd86fea8287078d3a5572a64",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},m.h("path",{key:"c9ed6c5cb89c0f3c7a9417ae4875b2c9dd6b60ce",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};xt.style=zn;exports.forward_icon=Ct;exports.nylas_composer=Lt;exports.nylas_summarize_message_button=We;exports.nylas_view_email=Mt;exports.reply_all_icon=Nt;exports.reply_icon=xt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-7a55dc33.cjs"),y=require("./utils-c00bdc3c-94b9c3b6.cjs"),yn=require("./register-component-dc659dc3-f58bf25b.cjs"),En=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");require("react");require("react-dom");const Tn=".sc-forward-icon-h{display:flex}",An=Tn,Ct=class{constructor(t){f.registerInstance(this,t),this.width="15",this.height="15"}render(){return f.h("svg",{key:"a858bd82169ace274a3c8cc1e214cd976e47e113",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},f.h("path",{key:"963f33f0803edfb6e8dfdbd287cee4917da7df01",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};Ct.style=An;const _n=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}',wn=_n,Lt=class{constructor(t){f.registerInstance(this,t),this.close=f.createEvent(this,"close",7),this.send=f.createEvent(this,"send",7),this.closeComposer=o=>{this.close.emit(o)},this.sendComposer=o=>{var s;if(!this.editorEl){y.debug("no editor element");return}const u=this.editorEl.querySelector(".message-body");if(!u){y.debug("no message body");return}this.message&&(this.send.emit({message:this.message,replyBody:((s=u.querySelector(".message-body"))==null?void 0:s.innerHTML)||""}),this.close.emit(o),this.editorEl.innerHTML="")},this.message=void 0,this.viewEmailElement=void 0}connectedCallback(){}disconnectedCallback(){this.editorEl&&(this.editorEl.innerHTML="")}componentWillLoad(){}async componentDidLoad(){if(this.message&&this.watchBody(this.message),!this.editorEl){y.debug("[connectedCallback] no editor element");return}if(!this.toolbarEl){y.debug("[connectedCallback] no toolbar element");return}const t=this.editorEl,o=this.toolbarEl;t.addEventListener("mouseup",u=>{var W;const s=(W=this.host.shadowRoot)==null?void 0:W.getSelection();if(!s){y.debug("no selection");return}const p=s.getRangeAt(0),r=s.toString();if(!r){o.style.display="none";return}const m=t.querySelector(".message-body");if(!m){y.debug("no message body");return}const l=p.commonAncestorContainer.parentElement;if(!l)return;const T=m.getBoundingClientRect();y.debug("messageBodyRect",{messageBodyRect:T});const _=l.getBoundingClientRect();y.debug("foundRect",{foundRect:_});const ce=(l.childNodes[0].textContent||"").indexOf(r),q=window.getComputedStyle(l).fontSize,X=parseInt(q.replace("px",""),10),ne=_.top-T.top-o.clientHeight,ye=ce*(1/X)*100;o.style.top=`${ne}px`,o.style.left=`${ye}px`,o.style.display="block"})}watchBody(t){var r;if(!this.editorEl){y.debug("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach(m=>m.remove());const o=document.createElement("div");o.classList.add("message-body");const u=document.createElement("p");u.innerHTML="&nbsp;",o.appendChild(u);const s=document.createElement("br");o.appendChild(s);const p=document.createElement("div");if(p.classList.add("reply-text"),p.innerText=`On ${new Date(t.date*1e3).toLocaleDateString(void 0,{dateStyle:"full"})} <${(r=t.from)==null?void 0:r.map(m=>m.name||m.email).join(", ")}> wrote:`,o.appendChild(p),t.body){const m=document.createElement("html");m.innerHTML=t.body;const i=document.createElement("blockquote");i.classList.add("collapsed"),i.classList.add("gmail_quote"),i.innerHTML=m.innerHTML,o.appendChild(i),y.debug("replyContainer",{replyContainer:i})}this.editorEl.appendChild(o),this.editorEl.querySelectorAll("blockquote.collapsed").forEach(m=>{m.addEventListener("click",function(i){i.preventDefault();const l=i.target;l.classList.remove("collapsed"),l.classList.add("expanded")},{once:!0})}),this.editorEl.focus()}render(){return f.h(f.Host,{key:"89cdb2c6c606698704a06507ddbe301a37134ca4"},f.h("sp-theme",{key:"4946560c2ab8518e5172e506caf36fa98fbc3912",scale:"medium",color:"dark"},f.h("div",{key:"b21a8843aaebb1fd4169ce2b849fb801bce46df4",class:"editor",contentEditable:!0,ref:t=>this.editorEl=t},f.h("div",{key:"830a97d7947b65c0312630184d539d4f8c7a48eb",class:"toolbar",ref:t=>this.toolbarEl=t,contentEditable:!1},f.h("sp-button",{key:"2fb11d997b13e4ec6e700155e3001d30f52bb217",quiet:!0,onClick:()=>document.execCommand("bold")},f.h("div",{key:"5c4fd64a8a3ccb94f36675047c05a662a1846426",slot:"icon"},f.h("bold-icon",{key:"033043849fddd392bc078dbb2fd843f6701c0501"})),f.h("div",{key:"585b08407297a97e3214d716505331f0889ea68f",slot:"label"},"Bold")),f.h("sp-button",{key:"b01e3c9c40fbe11122ca7be4b5120ba19262e1d5",quiet:!0,onClick:()=>document.execCommand("underline")},f.h("div",{key:"e407e888cb414fc4e5b15e9d21349038c7871f83",slot:"icon"},f.h("underline-icon",{key:"838cf6c3b7b42708b5ed6e5c53072cda29043f40"})),f.h("div",{key:"c662e1cefa352cb8910050a77e5b0a2e18de6bed",slot:"label"},"Underline")),f.h("sp-button",{key:"7e39fdbbdaeafabf1de93f42758f3b499c70206b",quiet:!0,onClick:()=>document.execCommand("italic")},f.h("div",{key:"8d7c7be8cf3959726b7541ed64e4e41995461258",slot:"icon"},f.h("italic-icon",{key:"ae07a6648728e3f9720dfdc3e3f91e8e4cbf86d9"})),f.h("div",{key:"fc3fc026d47610df27752ec8a310db99e280014c",slot:"label"},"Italic")))),f.h("div",{key:"9d4abb27a5d5a6b2c884da58191ca8f014e9ab43",class:"buttons"},f.h("sp-button",{key:"43f2b6d9a4a6d5513eb6fd52fb8f68f416077b37",onClick:this.sendComposer,class:"send"},"Send"),f.h("sp-button",{key:"fbae8e0490814b13347e3cc09bfd922ff5fceb43",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return f.getElement(this)}static get watchers(){return{message:["watchBody"]}}};Lt.style=wn;const vn=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}",Sn=vn;var Cn=function(t,o,u,s){var p=arguments.length,r=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,u):s,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,o,u,s);else for(var i=t.length-1;i>=0;i--)(m=t[i])&&(r=(p<3?m(r):p>3?m(o,u,r):m(o,u))||r);return p>3&&r&&Object.defineProperty(o,u,r),r},Fe=function(t,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,o)};const We=class{constructor(t){f.registerInstance(this,t),this.summarize=f.createEvent(this,"summarize",7),this.abortController=new AbortController,this.onClick=async o=>{var u,s;o.preventDefault(),o.stopPropagation(),this.state==="stopped"?this.message&&(this.abortController=new AbortController,this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState}).defaultPrevented||(y.debug("[nylas-summarize-message-button] Default event not prevented, summarizing message"),this.audioRef&&(await this.audioRef.play().then(()=>{var r;return(r=this.audioRef)==null?void 0:r.pause()}).catch(r=>console.error("Error playing audio:",r)),await this.audioRef.play().catch(r=>console.error("Error playing audio:",r))))):this.state==="playing"?((u=this.abortController)==null||u.abort(),(s=this.audioRef)==null||s.pause()):this.state="stopped"},this.message=void 0,this.state="stopped",this.playAudio=this.playAudio.bind(this),this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){y.debug("[nylas-summarize-message-button] Component will load")}async componentDidLoad(){y.debug("[nylas-summarize-message-button] Component did load")}async updateState(t){this.state=t}async playAudio(t){if(!this.audioRef){this.state="stopped";return}if(!t){this.state="stopped";return}const o=this.audioRef;if(!("MediaSource"in window)){const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=[];await this.readChunk(l,T);const _=new Blob(T,{type:"audio/mpeg"}),N=URL.createObjectURL(_);o.src=N;return}const u=new MediaSource;let s,p=!1;o.src=URL.createObjectURL(u),u.addEventListener("sourceopen",r);async function r(){s=u.addSourceBuffer("audio/mpeg"),s.addEventListener("updateend",m);const i=await t;if(i==null)throw new Error("ReadableStream not yet supported in this browser.");const l=i.getReader(),T=()=>{l.read().then(({done:_,value:N})=>{if(_){p=!0;return}s.updating||s.appendBuffer(N),T()}).catch(_=>{console.error("Error while fetching and appending chunks:",_)})};T(),o.paused&&o.play().catch(_=>console.error("Error playing audio:",_))}function m(){if(p){u.endOfStream(),u.removeEventListener("sourceopen",r),u.removeEventListener("sourceclose",()=>{y.debug("[nylas-summarize-message-button] Source closed")}),s.removeEventListener("updateend",m);return}}}async readChunk(t,o){return t.read().then(({done:u,value:s})=>u?o:(o.push(s),this.readChunk(t,o)))}render(){return f.h(f.Host,{key:"b14f3bab7ebd190d54a66a3e00704f9e4b147a8f"},f.h("sp-theme",{key:"3a5b0782c84bbc7dba7b15306d608b885b5a6edc",scale:"medium",color:"dark"},f.h("sp-button",{key:"d63121e6f80bd09f1e7ca35e1176aa3a070517b3",label:"Summarize email","icon-only":!0,onClickCapture:this.onClick,class:{"summarize-button":!0,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&f.h("play-icon",null),this.state==="loading"&&f.h("loading-icon",null),this.state==="playing"&&f.h("stop-icon",null)),f.h("audio",{key:"954be0517a3b7328149830b2058d073ae9da591d",ref:t=>this.audioRef=t,autoPlay:!0,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped",y.debug("[nylas-summarize-message-button] Audio ended")}})))}};Cn([yn.RegisterComponent({name:"nylas-summarize-message-button",eventToProps:{summarize:async(t,o)=>{const{playAudio:u,updateState:s,abortController:p,message:r}=t.detail,m=y.htmlToPlainText(r.body||"");await s("loading");try{const i=await o.messages.summarizeText(m),l=o.messages.textToSpeech(i,p);await u(l)}catch(i){await s("stopped"),console.error("Error summarizing message:",i)}}},fireRegisterEvent:!0}),Fe("design:type",Function),Fe("design:paramtypes",[]),Fe("design:returntype",void 0)],We.prototype,"render",null);We.style=Sn;function P(t){return!window.matchMedia("(prefers-color-scheme: dark)").matches||!t?t:t==="transparent"?"color":t.startsWith("#")?Ln(t):t.startsWith("rgb")?Rt(t):t.startsWith("hsl")?Rn(t):kn(t)?Mn(t):t}function Ln(t){t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const o=(255-parseInt(t.slice(1,3),16)).toString(16).padStart(2,"0"),u=(255-parseInt(t.slice(3,5),16)).toString(16).padStart(2,"0"),s=(255-parseInt(t.slice(5,7),16)).toString(16).padStart(2,"0");return`#${o}${u}${s}`}function Rt(t){var r;const o=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`rgb(${255-u}, ${255-s}, ${255-p})`}function Rn(t){var r;const o=(r=t.match(/\d+\.?\d*/g))==null?void 0:r.map(Number);if(!o)return t;const[u,s,p]=o;return`hsl(${u}, ${s}%, ${100-p}%)`}function kn(t){return/^[a-z]+$/i.test(t)}function Mn(t){return Rt(Nn(t))}function Nn(t){return t.toLowerCase()==="red"?"rgb(255, 0, 0)":"rgb(0, 0, 0)"}function St(t){if(t instanceof HTMLStyleElement){let o=t.textContent;if(o){o=o.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const u=o.matchAll(/border-color:\s*([^;]+)/g);if(u)for(const i of u){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}const s=o.matchAll(/border:\s*([^;]+)/g);if(s)for(const i of s){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const p=o.matchAll(/background-color:\s*([^;]+)/g);if(p)for(const i of p){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T))),y.debug("backgroundColor",{fullMatch:l,replace:l.replace(T,P(T)),color:T,invertColor:P(T)})}const r=o.matchAll(/background:\s*([^;]+)/g);if(r)for(const i of r){const l=i[0].trim(),T=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),[_,N,U]=i[1].split(" ");o=o.replaceAll(T,l.replace(U,P(U)))}const m=o.matchAll(/color:\s*([^;]+)/g);if(m)for(const i of m){const[l,T]=i,_=l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");o=o.replaceAll(_,l.replace(T,P(T)))}t.textContent=o}}if(t instanceof HTMLElement){const o=window.getComputedStyle(t),u=o.color||t.style.color,s=o.backgroundColor||t.style.backgroundColor,p=o.borderColor||t.style.borderColor;u&&!s?t.style.color="":u&&s?(t.style.color=P(u),t.style.backgroundColor=P(s),y.debug("element",t),y.debug("computedStyle.color",u),y.debug("computedStyle.backgroundColor",s),y.debug("invertColor(color)",P(u)),y.debug("invertColor(backgroundColor)",P(s))):!u&&s&&(t.style.backgroundColor=""),p&&(y.debug("borderColor",p),t.style.borderColor=P(p)),t.hasAttribute("bgcolor")&&t.removeAttribute("bgcolor")}}function xn(t){St(t),t.querySelectorAll("*").forEach(u=>St(u))}var kt={exports:{}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(t,o){(function(u,s){t.exports=s()})(En.commonjsGlobal,function(){const{entries:u,setPrototypeOf:s,isFrozen:p,getPrototypeOf:r,getOwnPropertyDescriptor:m}=Object;let{freeze:i,seal:l,create:T}=Object,{apply:_,construct:N}=typeof Reflect<"u"&&Reflect;i||(i=function(c){return c}),l||(l=function(c){return c}),_||(_=function(c,E,g){return c.apply(E,g)}),N||(N=function(c,E){return new c(...E)});const U=I(Array.prototype.forEach),ce=I(Array.prototype.pop),q=I(Array.prototype.push),X=I(String.prototype.toLowerCase),ne=I(String.prototype.toString),ye=I(String.prototype.match),W=I(String.prototype.replace),Dt=I(String.prototype.indexOf),Ot=I(String.prototype.trim),O=I(RegExp.prototype.test),oe=It(TypeError);function I(b){return function(c){for(var E=arguments.length,g=new Array(E>1?E-1:0),k=1;k<E;k++)g[k-1]=arguments[k];return _(b,c,g)}}function It(b){return function(){for(var c=arguments.length,E=new Array(c),g=0;g<c;g++)E[g]=arguments[g];return N(b,E)}}function h(b,c){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X;s&&s(b,null);let g=c.length;for(;g--;){let k=c[g];if(typeof k=="string"){const H=E(k);H!==k&&(p(c)||(c[g]=H),k=H)}b[k]=!0}return b}function Pt(b){for(let c=0;c<b.length;c++)m(b,c)===void 0&&(b[c]=null);return b}function G(b){const c=T(null);for(const[E,g]of u(b))m(b,E)!==void 0&&(Array.isArray(g)?c[E]=Pt(g):g&&typeof g=="object"&&g.constructor===Object?c[E]=G(g):c[E]=g);return c}function de(b,c){for(;b!==null;){const g=m(b,c);if(g){if(g.get)return I(g.get);if(typeof g.value=="function")return I(g.value)}b=r(b)}function E(g){return console.warn("fallback value for",g),null}return E}const qe=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ee=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Te=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ut=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ae=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zt=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ge=i(["#text"]),$e=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),_e=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ye=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ue=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ht=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ft=l(/<%[\w\W]*|[\w\W]*%>/gm),Bt=l(/\${[\w\W]*}/gm),Wt=l(/^data-[\-\w.\u00B7-\uFFFF]/),qt=l(/^aria-[\-\w]+$/),je=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gt=l(/^(?:\w+script|data):/i),$t=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xe=l(/^html$/i);var Ve=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ht,ERB_EXPR:Ft,TMPLIT_EXPR:Bt,DATA_ATTR:Wt,ARIA_ATTR:qt,IS_ALLOWED_URI:je,IS_SCRIPT_OR_DATA:Gt,ATTR_WHITESPACE:$t,DOCTYPE_NAME:Xe});const Yt=function(){return typeof window>"u"?null:window},jt=function(c,E){if(typeof c!="object"||typeof c.createPolicy!="function")return null;let g=null;const k="data-tt-policy-suffix";E&&E.hasAttribute(k)&&(g=E.getAttribute(k));const H="dompurify"+(g?"#"+g:"");try{return c.createPolicy(H,{createHTML(V){return V},createScriptURL(V){return V}})}catch{return console.warn("TrustedTypes policy "+H+" could not be created."),null}};function Ze(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yt();const c=d=>Ze(d);if(c.version="3.0.8",c.removed=[],!b||!b.document||b.document.nodeType!==9)return c.isSupported=!1,c;let{document:E}=b;const g=E,k=g.currentScript,{DocumentFragment:H,HTMLTemplateElement:V,Node:we,Element:Ke,NodeFilter:ve,NamedNodeMap:Vt=b.NamedNodeMap||b.MozNamedAttrMap,HTMLFormElement:Zt,DOMParser:Kt,trustedTypes:fe}=b,me=Ke.prototype,Qt=de(me,"cloneNode"),Jt=de(me,"nextSibling"),en=de(me,"childNodes"),Se=de(me,"parentNode");if(typeof V=="function"){const d=E.createElement("template");d.content&&d.content.ownerDocument&&(E=d.content.ownerDocument)}let M,ie="";const{implementation:Ce,createNodeIterator:tn,createDocumentFragment:nn,getElementsByTagName:on}=E,{importNode:rn}=g;let z={};c.isSupported=typeof u=="function"&&typeof Se=="function"&&Ce&&Ce.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Le,ERB_EXPR:Re,TMPLIT_EXPR:ke,DATA_ATTR:an,ARIA_ATTR:sn,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:Qe}=Ve;let{IS_ALLOWED_URI:Je}=Ve,v=null;const et=h({},[...qe,...Ee,...Te,...Ae,...Ge]);let S=null;const tt=h({},[...$e,..._e,...Ye,...ue]);let w=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,Me=null,nt=!0,Ne=!0,ot=!1,it=!0,Z=!1,$=!1,xe=!1,De=!1,K=!1,pe=!1,he=!1,rt=!0,at=!1;const cn="user-content-";let Oe=!0,ae=!1,Q={},J=null;const st=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let lt=null;const ct=h({},["audio","video","img","source","image","track"]);let Ie=null;const dt=h({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let ee=F,Pe=!1,Ue=null;const dn=h({},[ge,be,F],ne);let se=null;const un=["application/xhtml+xml","text/html"],fn="text/html";let C=null,te=null;const mn=E.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},ze=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(te&&te===e)){if((!e||typeof e!="object")&&(e={}),e=G(e),se=un.indexOf(e.PARSER_MEDIA_TYPE)===-1?fn:e.PARSER_MEDIA_TYPE,C=se==="application/xhtml+xml"?ne:X,v="ALLOWED_TAGS"in e?h({},e.ALLOWED_TAGS,C):et,S="ALLOWED_ATTR"in e?h({},e.ALLOWED_ATTR,C):tt,Ue="ALLOWED_NAMESPACES"in e?h({},e.ALLOWED_NAMESPACES,ne):dn,Ie="ADD_URI_SAFE_ATTR"in e?h(G(dt),e.ADD_URI_SAFE_ATTR,C):dt,lt="ADD_DATA_URI_TAGS"in e?h(G(ct),e.ADD_DATA_URI_TAGS,C):ct,J="FORBID_CONTENTS"in e?h({},e.FORBID_CONTENTS,C):st,re="FORBID_TAGS"in e?h({},e.FORBID_TAGS,C):{},Me="FORBID_ATTR"in e?h({},e.FORBID_ATTR,C):{},Q="USE_PROFILES"in e?e.USE_PROFILES:!1,nt=e.ALLOW_ARIA_ATTR!==!1,Ne=e.ALLOW_DATA_ATTR!==!1,ot=e.ALLOW_UNKNOWN_PROTOCOLS||!1,it=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,K=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,he=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,rt=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,Oe=e.KEEP_CONTENT!==!1,ae=e.IN_PLACE||!1,Je=e.ALLOWED_URI_REGEXP||je,ee=e.NAMESPACE||F,w=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Ne=!1),pe&&(K=!0),Q&&(v=h({},Ge),S=[],Q.html===!0&&(h(v,qe),h(S,$e)),Q.svg===!0&&(h(v,Ee),h(S,_e),h(S,ue)),Q.svgFilters===!0&&(h(v,Te),h(S,_e),h(S,ue)),Q.mathMl===!0&&(h(v,Ae),h(S,Ye),h(S,ue))),e.ADD_TAGS&&(v===et&&(v=G(v)),h(v,e.ADD_TAGS,C)),e.ADD_ATTR&&(S===tt&&(S=G(S)),h(S,e.ADD_ATTR,C)),e.ADD_URI_SAFE_ATTR&&h(Ie,e.ADD_URI_SAFE_ATTR,C),e.FORBID_CONTENTS&&(J===st&&(J=G(J)),h(J,e.FORBID_CONTENTS,C)),Oe&&(v["#text"]=!0),$&&h(v,["html","head","body"]),v.table&&(h(v,["tbody"]),delete re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=e.TRUSTED_TYPES_POLICY,ie=M.createHTML("")}else M===void 0&&(M=jt(fe,k)),M!==null&&typeof ie=="string"&&(ie=M.createHTML(""));i&&i(e),te=e}},ft=h({},["mi","mo","mn","ms","mtext"]),mt=h({},["foreignobject","desc","title","annotation-xml"]),pn=h({},["title","style","font","a","script"]),pt=h({},[...Ee,...Te,...Ut]),ht=h({},[...Ae,...zt]),hn=function(e){let n=Se(e);(!n||!n.tagName)&&(n={namespaceURI:ee,tagName:"template"});const a=X(e.tagName),A=X(n.tagName);return Ue[e.namespaceURI]?e.namespaceURI===be?n.namespaceURI===F?a==="svg":n.namespaceURI===ge?a==="svg"&&(A==="annotation-xml"||ft[A]):!!pt[a]:e.namespaceURI===ge?n.namespaceURI===F?a==="math":n.namespaceURI===be?a==="math"&&mt[A]:!!ht[a]:e.namespaceURI===F?n.namespaceURI===be&&!mt[A]||n.namespaceURI===ge&&!ft[A]?!1:!ht[a]&&(pn[a]||!pt[a]):!!(se==="application/xhtml+xml"&&Ue[e.namespaceURI]):!1},Y=function(e){q(c.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},He=function(e,n){try{q(c.removed,{attribute:n.getAttributeNode(e),from:n})}catch{q(c.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is"&&!S[e])if(K||pe)try{Y(n)}catch{}else try{n.setAttribute(e,"")}catch{}},gt=function(e){let n=null,a=null;if(De)e="<remove></remove>"+e;else{const R=ye(e,/^[\r\n\t ]+/);a=R&&R[0]}se==="application/xhtml+xml"&&ee===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const A=M?M.createHTML(e):e;if(ee===F)try{n=new Kt().parseFromString(A,se)}catch{}if(!n||!n.documentElement){n=Ce.createDocument(ee,"template",null);try{n.documentElement.innerHTML=Pe?ie:A}catch{}}const L=n.body||n.documentElement;return e&&a&&L.insertBefore(E.createTextNode(a),L.childNodes[0]||null),ee===F?on.call(n,$?"html":"body")[0]:$?n.documentElement:L},bt=function(e){return tn.call(e.ownerDocument||e,e,ve.SHOW_ELEMENT|ve.SHOW_COMMENT|ve.SHOW_TEXT,null)},gn=function(e){return e instanceof Zt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Vt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},yt=function(e){return typeof we=="function"&&e instanceof we},B=function(e,n,a){z[e]&&U(z[e],A=>{A.call(c,n,a,te)})},Et=function(e){let n=null;if(B("beforeSanitizeElements",e,null),gn(e))return Y(e),!0;const a=C(e.nodeName);if(B("uponSanitizeElement",e,{tagName:a,allowedTags:v}),e.hasChildNodes()&&!yt(e.firstElementChild)&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent))return Y(e),!0;if(!v[a]||re[a]){if(!re[a]&&At(a)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a)))return!1;if(Oe&&!J[a]){const A=Se(e)||e.parentNode,L=en(e)||e.childNodes;if(L&&A){const R=L.length;for(let x=R-1;x>=0;--x)A.insertBefore(Qt(L[x],!0),Jt(e))}}return Y(e),!0}return e instanceof Ke&&!hn(e)||(a==="noscript"||a==="noembed"||a==="noframes")&&O(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y(e),!0):(Z&&e.nodeType===3&&(n=e.textContent,U([Le,Re,ke],A=>{n=W(n,A," ")}),e.textContent!==n&&(q(c.removed,{element:e.cloneNode()}),e.textContent=n)),B("afterSanitizeElements",e,null),!1)},Tt=function(e,n,a){if(rt&&(n==="id"||n==="name")&&(a in E||a in mn))return!1;if(!(Ne&&!Me[n]&&O(an,n))){if(!(nt&&O(sn,n))){if(!S[n]||Me[n]){if(!(At(e)&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,e)||w.tagNameCheck instanceof Function&&w.tagNameCheck(e))&&(w.attributeNameCheck instanceof RegExp&&O(w.attributeNameCheck,n)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(n))||n==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&O(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))))return!1}else if(!Ie[n]){if(!O(Je,W(a,Qe,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Dt(a,"data:")===0&&lt[e])){if(!(ot&&!O(ln,W(a,Qe,"")))){if(a)return!1}}}}}}return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){B("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};let A=n.length;for(;A--;){const L=n[A],{name:R,namespaceURI:x,value:j}=L,le=C(R);let D=R==="value"?j:Ot(j);if(a.attrName=le,a.attrValue=D,a.keepAttr=!0,a.forceKeepAttr=void 0,B("uponSanitizeAttribute",e,a),D=a.attrValue,a.forceKeepAttr||(He(R,e),!a.keepAttr))continue;if(!it&&O(/\/>/i,D)){He(R,e);continue}Z&&U([Le,Re,ke],vt=>{D=W(D,vt," ")});const wt=C(e.nodeName);if(Tt(wt,le,D)){if(at&&(le==="id"||le==="name")&&(He(R,e),D=cn+D),M&&typeof fe=="object"&&typeof fe.getAttributeType=="function"&&!x)switch(fe.getAttributeType(wt,le)){case"TrustedHTML":{D=M.createHTML(D);break}case"TrustedScriptURL":{D=M.createScriptURL(D);break}}try{x?e.setAttributeNS(x,R,D):e.setAttribute(R,D),ce(c.removed)}catch{}}}B("afterSanitizeAttributes",e,null)},bn=function d(e){let n=null;const a=bt(e);for(B("beforeSanitizeShadowDOM",e,null);n=a.nextNode();)B("uponSanitizeShadowNode",n,null),!Et(n)&&(n.content instanceof H&&d(n.content),_t(n));B("afterSanitizeShadowDOM",e,null)};return c.sanitize=function(d){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,a=null,A=null,L=null;if(Pe=!d,Pe&&(d="<!-->"),typeof d!="string"&&!yt(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw oe("dirty is not a string, aborting")}else throw oe("toString is not a function");if(!c.isSupported)return d;if(xe||ze(e),c.removed=[],typeof d=="string"&&(ae=!1),ae){if(d.nodeName){const j=C(d.nodeName);if(!v[j]||re[j])throw oe("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof we)n=gt("<!---->"),a=n.ownerDocument.importNode(d,!0),a.nodeType===1&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a);else{if(!K&&!Z&&!$&&d.indexOf("<")===-1)return M&&he?M.createHTML(d):d;if(n=gt(d),!n)return K?null:he?ie:""}n&&De&&Y(n.firstChild);const R=bt(ae?d:n);for(;A=R.nextNode();)Et(A)||(A.content instanceof H&&bn(A.content),_t(A));if(ae)return d;if(K){if(pe)for(L=nn.call(n.ownerDocument);n.firstChild;)L.appendChild(n.firstChild);else L=n;return(S.shadowroot||S.shadowrootmode)&&(L=rn.call(g,L,!0)),L}let x=$?n.outerHTML:n.innerHTML;return $&&v["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&O(Xe,n.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+n.ownerDocument.doctype.name+`>
2
+ `+x),Z&&U([Le,Re,ke],j=>{x=W(x,j," ")}),M&&he?M.createHTML(x):x},c.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ze(d),xe=!0},c.clearConfig=function(){te=null,xe=!1},c.isValidAttribute=function(d,e,n){te||ze({});const a=C(d),A=C(e);return Tt(a,A,n)},c.addHook=function(d,e){typeof e=="function"&&(z[d]=z[d]||[],q(z[d],e))},c.removeHook=function(d){if(z[d])return ce(z[d])},c.removeHooks=function(d){z[d]&&(z[d]=[])},c.removeAllHooks=function(){z={}},c}var Xt=Ze();return Xt})})(kt);const Be=kt.exports,Dn=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}",On=Dn;Be.addHook("afterSanitizeAttributes",function(t){"target"in t&&(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"))});const Mt=class{constructor(t){f.registerInstance(this,t),this.htmlElement=document.createElement("html"),this.setBody=o=>{var p;this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(r=>{r.remove()}),(this.message?y.detectIfMessageIsHTML(this.message):y.detectHTMLOrPlainText(o))||(o=`<html><body>${y.parsePlainTextToHTML(o)}</body></html>`),this.htmlElement.innerHTML=o,this.detectDarkMode&&xn(this.htmlElement),this.htmlElement.querySelectorAll("link").forEach(r=>{if(console.debug(`[nylas-view-email] Hoisting link: ${r.getAttribute("href")}`),r.getAttribute("rel")==="stylesheet"&&r.getAttribute("href")){const m=r.getAttribute("href");if(m){const i=new URL(m,window.location.href);(i.protocol==="https:"||i.protocol==="http:")&&this.hoistedFontURLs.set(i.href,i.href)}}}),this.htmlElement.querySelectorAll("style").forEach(r=>{r.innerHTML.split(`
3
+ `).forEach(m=>{const i=m.match(/@import url\((.*)\)/);if(i){const l=new URL(i[1],window.location.href);(l.protocol==="https:"||l.protocol==="http:")&&this.hoistedFontURLs.set(l.href,l.href)}}),r.innerHTML=r.innerHTML.replace("body",":host"),this.styles.push(r),r.remove()}),this.htmlElement.querySelectorAll("a").forEach(r=>{r.setAttribute("target","_blank")});const s=this.htmlElement.querySelector(".gmail_quote");if(s){const r=document.createElement("button");r.classList.add("nylas-view-email-toggle-button"),r.setAttribute("aria-label","Show quoted text"),r.innerText="...",(p=s.parentElement)==null||p.insertBefore(r,s)}this.sanitizedBody=Be.sanitize(this.htmlElement.innerHTML),this.hoistedFontURLs.forEach((r,m)=>{const i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),i.classList.add("nylas-view-email-font"),document.head.appendChild(i)}),this.state="ready"},this.handleMobileSize=()=>{var u,s,p,r;const o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(o<=768){const m=(u=this.viewEmailElement)==null?void 0:u.getBoundingClientRect();if(m&&this.viewEmailElement&&this.parent&&m.width>o){const i=this.parent,l=i==null?void 0:i.getBoundingClientRect();y.debug("Parent width:",l==null?void 0:l.width,"Parent height:",l==null?void 0:l.height),y.debug("Parent client width:",i.clientWidth,"Parent client height:",i.clientHeight);const T=l.width/m.width,_=l.height/m.height,N=Math.min(T,_);y.debug("Scale:",N),this.viewEmailElement.style.setProperty("transform",`scale(${N})`),this.viewEmailElement.style.setProperty("transform-origin","top left"),this.viewEmailElement.style.setProperty("height",`${m.height*N}px`)}}else(s=this.viewEmailElement)==null||s.style.removeProperty("transform"),(p=this.viewEmailElement)==null||p.style.removeProperty("transform-origin"),(r=this.viewEmailElement)==null||r.style.removeProperty("height")},this.message=void 0,this.parent=void 0,this.attachments=[],this.detectDarkMode=!0,this.state="loading",this.sanitizedBody="",this.styles=[],this.viewEmailElement=void 0,this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){y.debug("[nylas-view-email] Component disconnected"),this.state="loading",this.styles=[],this.hoistedFontURLs=new Map,this.sanitizedBody="",document.querySelectorAll(".nylas-view-email-font").forEach(t=>{t.remove()})}async componentWillLoad(){var t;y.debug("[nylas-view-email] component loaded"),this.setBody(((t=this.message)==null?void 0:t.body)??"")}async componentDidLoad(){y.debug("[nylas-view-thread] Component did load"),this.handleMobileSize()}async messageChanged(){var t;y.debug("[nylas-view-thread] Message changed",{message:this.message}),this.setBody(((t=this.message)==null?void 0:t.body)??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){var o;const t=(o=this.viewEmailElement)==null?void 0:o.querySelectorAll(".nylas-view-email-toggle-button");t&&t.forEach(u=>{u.addEventListener("click",()=>{var p;const s=(p=this.viewEmailElement)==null?void 0:p.querySelector(".gmail_quote");s&&s.classList.toggle("show")})})}render(){return console.debug("[nylas-view-email] render",{hoistedFontURLs:this.hoistedFontURLs}),f.h(f.Host,{key:"5209aa3727b4c8013cec3ee0a33afdb38e9925d9"},this.state==="loading"&&f.h("div",null,"Loading..."),this.state==="ready"&&f.h(f.Fragment,null,this.styles.map(t=>f.h("style",null,Be.sanitize(t.innerHTML))),f.h("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:t=>this.viewEmailElement=t})))}get host(){return f.getElement(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};Mt.style=On;const In=".sc-reply-all-icon-h{display:flex}",Pn=In,Nt=class{constructor(t){f.registerInstance(this,t),this.width="15",this.height="15"}render(){return f.h("svg",{key:"cf3a910b7232018b6579cfe31a868e3ba54f30b0",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},f.h("path",{key:"1db5bb9aa170d0a00c5939cdd7bfe7b878124c2c",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};Nt.style=Pn;const Un=".sc-reply-icon-h{display:flex}",zn=Un,xt=class{constructor(t){f.registerInstance(this,t),this.width="15",this.height="15"}render(){return f.h("svg",{key:"a353055eb9122f1dae36fbf49a557c431fd8580a",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},f.h("path",{key:"97ac62efd50d229e10b45fc2a47f3c8c5a9b6e5d",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};xt.style=zn;exports.forward_icon=Ct;exports.nylas_composer=Lt;exports.nylas_summarize_message_button=We;exports.nylas_view_email=Mt;exports.reply_all_icon=Nt;exports.reply_icon=xt;