@gatewaze/admin-embed 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +42 -0
  2. package/dist/AiSkillsPicker-dbFhcanE.js +373 -0
  3. package/dist/ContentAccessPage-D0HRqPFc.js +264 -0
  4. package/dist/DataTable-fe6yRVpF.js +1984 -0
  5. package/dist/DetailPageHeader-D_v7924k.js +69 -0
  6. package/dist/EditionEmail-CyhC8232.js +8382 -0
  7. package/dist/GuideContent-DBXKCu7r.js +7580 -0
  8. package/dist/HostMediaTab-BsIBEQ1v.js +440 -0
  9. package/dist/InboxPage-C8ivCKdx.js +1112 -0
  10. package/dist/NewsletterCanvasEditor--B06apn3.js +11453 -0
  11. package/dist/NewsletterSetupWizard-BqV6-fa5.js +347 -0
  12. package/dist/NewsletterSignup-DRVZIpOs.js +224 -0
  13. package/dist/Page-D3u8IZ2a.js +14 -0
  14. package/dist/Toaster-Cde0i6IA.js +18 -0
  15. package/dist/Tooltip-CqxUlW1d.js +746 -0
  16. package/dist/_collectionSlug_-B3UN6M-Q.js +308 -0
  17. package/dist/_collection_-Qz4k_Qjl.js +139 -0
  18. package/dist/_edition_-DQXwkI_-.js +301 -0
  19. package/dist/_id_-CtT7rT9f.js +257 -0
  20. package/dist/_id_-CzScE4Qn.js +1197 -0
  21. package/dist/_virtual_gatewaze-modules-BeloWlOa.js +991 -0
  22. package/dist/admin-B0Mmrh_O.js +1239 -0
  23. package/dist/admin-CcfoK6vD.js +17 -0
  24. package/dist/admin-embed.js +21844 -0
  25. package/dist/admin.css +2 -0
  26. package/dist/block-editor-vXBShAue.js +226 -0
  27. package/dist/brand-DklYwIeA.js +11 -0
  28. package/dist/brick-editor-CmBitMMK.js +225 -0
  29. package/dist/broadcastService-CBqXNt_N.js +190 -0
  30. package/dist/classnames-uWIYaD6z.js +44 -0
  31. package/dist/contentAccessService-Cs7tdAo-.js +59 -0
  32. package/dist/context-jzuubYRz.js +5 -0
  33. package/dist/createSafeContext-P1pK0sAN.js +17 -0
  34. package/dist/detail-B8SVFJJr.js +26285 -0
  35. package/dist/detail-uFBxRbLF.js +2966 -0
  36. package/dist/dist-DTrOExw8.js +38806 -0
  37. package/dist/edition-slug-CARO24Bs.js +7 -0
  38. package/dist/export-edition-html-C_hdXQu5.js +18893 -0
  39. package/dist/floating-ui.dom-Cyv879E9.js +987 -0
  40. package/dist/hooks-C377EXJG.js +2974 -0
  41. package/dist/img/mlops-logo.png +0 -0
  42. package/dist/img/mlops-logo2.png +0 -0
  43. package/dist/index.d.ts +105 -0
  44. package/dist/jsx-runtime-CjozyJt-.js +180 -0
  45. package/dist/lib-CylJmhlJ.js +828 -0
  46. package/dist/list-C0cz0aQz.js +451 -0
  47. package/dist/list-CIVgIGsU.js +166 -0
  48. package/dist/logo/mlops-alt.png +0 -0
  49. package/dist/logo/mlops-logo.png +0 -0
  50. package/dist/new-r4KWpqa6.js +80 -0
  51. package/dist/outline-DwDYhYcF.js +6538 -0
  52. package/dist/pages-Ersfxcz7.js +216 -0
  53. package/dist/preview/12627f.jpg +0 -0
  54. package/dist/preview/af009d.jpg +0 -0
  55. package/dist/public-api-LD11kMxh.js +238 -0
  56. package/dist/react-DB2tPNit.js +933 -0
  57. package/dist/react-dom-giQNVXng.js +267 -0
  58. package/dist/registry-4XrV9iNG.js +7 -0
  59. package/dist/render-BtUWfMUt.js +59634 -0
  60. package/dist/resolvePeopleByEmail-hivX2l07.js +828 -0
  61. package/dist/runtime-config.js +10 -0
  62. package/dist/sends-BkPO6PG2.js +182 -0
  63. package/dist/server.browser-Pj3QUa7k.js +15227 -0
  64. package/dist/shim-BCerG8nb.js +6681 -0
  65. package/dist/sonnerHostBridge-CXuCMM3R.js +665 -0
  66. package/dist/src-BWDAOzZO.js +799 -0
  67. package/dist/starter-templates-CFs-QUdF.js +3077 -0
  68. package/dist/storage-VDSvnkvR.js +39 -0
  69. package/dist/templateParser-BQ2IsJ6c.js +49 -0
  70. package/dist/templates-rjQjWsRr.js +253 -0
  71. package/dist/theme/gatewaze/android-icon-144x144.png +0 -0
  72. package/dist/theme/gatewaze/android-icon-192x192.png +0 -0
  73. package/dist/theme/gatewaze/android-icon-36x36.png +0 -0
  74. package/dist/theme/gatewaze/android-icon-48x48.png +0 -0
  75. package/dist/theme/gatewaze/android-icon-72x72.png +0 -0
  76. package/dist/theme/gatewaze/android-icon-96x96.png +0 -0
  77. package/dist/theme/gatewaze/favicon-144x144.png +0 -0
  78. package/dist/theme/gatewaze/favicon-16x16.png +0 -0
  79. package/dist/theme/gatewaze/favicon-192x192.png +0 -0
  80. package/dist/theme/gatewaze/favicon-32x32.png +0 -0
  81. package/dist/theme/gatewaze/favicon-96x96.png +0 -0
  82. package/dist/theme/gatewaze/favicon.ico +0 -0
  83. package/dist/theme/gatewaze/gatewaze-icon-512.png +0 -0
  84. package/dist/theme/gatewaze/gatewaze-logo-black.svg +24 -0
  85. package/dist/theme/gatewaze/gatewaze-logo-white.svg +20 -0
  86. package/dist/theme/gatewaze/gatewaze-poweredby-black.svg +25 -0
  87. package/dist/theme/gatewaze/gatewaze-poweredby-white.svg +25 -0
  88. package/dist/theme/gatewaze/logo_black.svg +24 -0
  89. package/dist/theme/gatewaze/logo_white.svg +20 -0
  90. package/dist/theme-D6odw5nx.js +586 -0
  91. package/dist/ui-DRIo9Krs.js +9747 -0
  92. package/dist/upload-DMNfZ6FX.js +505 -0
  93. package/dist/useModuleFeature-DgsFIUpv.js +8 -0
  94. package/dist/utils-BcVvIjaY.js +36 -0
  95. package/dist/with-selector-B8eSdVx_.js +100 -0
  96. package/package.json +33 -0
@@ -0,0 +1,665 @@
1
+ import { a as e, c as t, i as n, n as r, t as i } from "./react-DB2tPNit.js";
2
+ import { t as a } from "./react-dom-giQNVXng.js";
3
+ //#region ../../node_modules/.pnpm/sonner@2.0.7_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/sonner/dist/index.js
4
+ var o = /* @__PURE__ */ r(((e) => {
5
+ function t(e) {
6
+ if (!e || typeof document > "u") return;
7
+ let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
8
+ n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
9
+ }
10
+ Object.defineProperty(e, "__esModule", { value: !0 });
11
+ var n = i(), r = a();
12
+ function o(e) {
13
+ return e && e.__esModule ? e : { default: e };
14
+ }
15
+ var s = /*#__PURE__*/ o(n), c = /*#__PURE__*/ o(r), l = (e) => {
16
+ switch (e) {
17
+ case "success": return f;
18
+ case "info": return m;
19
+ case "warning": return p;
20
+ case "error": return h;
21
+ default: return null;
22
+ }
23
+ }, u = Array(12).fill(0), d = ({ visible: e, className: t }) => /*#__PURE__*/ s.default.createElement("div", {
24
+ className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
25
+ "data-visible": e
26
+ }, /*#__PURE__*/ s.default.createElement("div", { className: "sonner-spinner" }, u.map((e, t) => /*#__PURE__*/ s.default.createElement("div", {
27
+ className: "sonner-loading-bar",
28
+ key: `spinner-bar-${t}`
29
+ })))), f = /*#__PURE__*/ s.default.createElement("svg", {
30
+ xmlns: "http://www.w3.org/2000/svg",
31
+ viewBox: "0 0 20 20",
32
+ fill: "currentColor",
33
+ height: "20",
34
+ width: "20"
35
+ }, /*#__PURE__*/ s.default.createElement("path", {
36
+ fillRule: "evenodd",
37
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
38
+ clipRule: "evenodd"
39
+ })), p = /*#__PURE__*/ s.default.createElement("svg", {
40
+ xmlns: "http://www.w3.org/2000/svg",
41
+ viewBox: "0 0 24 24",
42
+ fill: "currentColor",
43
+ height: "20",
44
+ width: "20"
45
+ }, /*#__PURE__*/ s.default.createElement("path", {
46
+ fillRule: "evenodd",
47
+ d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
48
+ clipRule: "evenodd"
49
+ })), m = /*#__PURE__*/ s.default.createElement("svg", {
50
+ xmlns: "http://www.w3.org/2000/svg",
51
+ viewBox: "0 0 20 20",
52
+ fill: "currentColor",
53
+ height: "20",
54
+ width: "20"
55
+ }, /*#__PURE__*/ s.default.createElement("path", {
56
+ fillRule: "evenodd",
57
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
58
+ clipRule: "evenodd"
59
+ })), h = /*#__PURE__*/ s.default.createElement("svg", {
60
+ xmlns: "http://www.w3.org/2000/svg",
61
+ viewBox: "0 0 20 20",
62
+ fill: "currentColor",
63
+ height: "20",
64
+ width: "20"
65
+ }, /*#__PURE__*/ s.default.createElement("path", {
66
+ fillRule: "evenodd",
67
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
68
+ clipRule: "evenodd"
69
+ })), ee = /*#__PURE__*/ s.default.createElement("svg", {
70
+ xmlns: "http://www.w3.org/2000/svg",
71
+ width: "12",
72
+ height: "12",
73
+ viewBox: "0 0 24 24",
74
+ fill: "none",
75
+ stroke: "currentColor",
76
+ strokeWidth: "1.5",
77
+ strokeLinecap: "round",
78
+ strokeLinejoin: "round"
79
+ }, /*#__PURE__*/ s.default.createElement("line", {
80
+ x1: "18",
81
+ y1: "6",
82
+ x2: "6",
83
+ y2: "18"
84
+ }), /*#__PURE__*/ s.default.createElement("line", {
85
+ x1: "6",
86
+ y1: "6",
87
+ x2: "18",
88
+ y2: "18"
89
+ })), te = () => {
90
+ let [e, t] = s.default.useState(document.hidden);
91
+ return s.default.useEffect(() => {
92
+ let e = () => {
93
+ t(document.hidden);
94
+ };
95
+ return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
96
+ }, []), e;
97
+ }, g = 1, _ = new class {
98
+ constructor() {
99
+ this.subscribe = (e) => (this.subscribers.push(e), () => {
100
+ let t = this.subscribers.indexOf(e);
101
+ this.subscribers.splice(t, 1);
102
+ }), this.publish = (e) => {
103
+ this.subscribers.forEach((t) => t(e));
104
+ }, this.addToast = (e) => {
105
+ this.publish(e), this.toasts = [...this.toasts, e];
106
+ }, this.create = (e) => {
107
+ let { message: t, ...n } = e, r = typeof e?.id == "number" || e.id?.length > 0 ? e.id : g++, i = this.toasts.find((e) => e.id === r), a = e.dismissible === void 0 || e.dismissible;
108
+ return this.dismissedToasts.has(r) && this.dismissedToasts.delete(r), i ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
109
+ ...n,
110
+ ...e,
111
+ id: r,
112
+ title: t
113
+ }), {
114
+ ...n,
115
+ ...e,
116
+ id: r,
117
+ dismissible: a,
118
+ title: t
119
+ }) : n) : this.addToast({
120
+ title: t,
121
+ ...n,
122
+ dismissible: a,
123
+ id: r
124
+ }), r;
125
+ }, this.dismiss = (e) => (e ? (this.dismissedToasts.add(e), requestAnimationFrame(() => this.subscribers.forEach((t) => t({
126
+ id: e,
127
+ dismiss: !0
128
+ })))) : this.toasts.forEach((e) => {
129
+ this.subscribers.forEach((t) => t({
130
+ id: e.id,
131
+ dismiss: !0
132
+ }));
133
+ }), e), this.message = (e, t) => this.create({
134
+ ...t,
135
+ message: e
136
+ }), this.error = (e, t) => this.create({
137
+ ...t,
138
+ message: e,
139
+ type: "error"
140
+ }), this.success = (e, t) => this.create({
141
+ ...t,
142
+ type: "success",
143
+ message: e
144
+ }), this.info = (e, t) => this.create({
145
+ ...t,
146
+ type: "info",
147
+ message: e
148
+ }), this.warning = (e, t) => this.create({
149
+ ...t,
150
+ type: "warning",
151
+ message: e
152
+ }), this.loading = (e, t) => this.create({
153
+ ...t,
154
+ type: "loading",
155
+ message: e
156
+ }), this.promise = (e, t) => {
157
+ if (!t) return;
158
+ let n;
159
+ t.loading !== void 0 && (n = this.create({
160
+ ...t,
161
+ promise: e,
162
+ type: "loading",
163
+ message: t.loading,
164
+ description: typeof t.description == "function" ? void 0 : t.description
165
+ }));
166
+ let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
167
+ if (a = ["resolve", e], s.default.isValidElement(e)) i = !1, this.create({
168
+ id: n,
169
+ type: "default",
170
+ message: e
171
+ });
172
+ else if (y(e) && !e.ok) {
173
+ i = !1;
174
+ let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !s.default.isValidElement(r) ? r : { message: r };
175
+ this.create({
176
+ id: n,
177
+ type: "error",
178
+ description: a,
179
+ ...o
180
+ });
181
+ } else if (e instanceof Error) {
182
+ i = !1;
183
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !s.default.isValidElement(r) ? r : { message: r };
184
+ this.create({
185
+ id: n,
186
+ type: "error",
187
+ description: a,
188
+ ...o
189
+ });
190
+ } else if (t.success !== void 0) {
191
+ i = !1;
192
+ let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !s.default.isValidElement(r) ? r : { message: r };
193
+ this.create({
194
+ id: n,
195
+ type: "success",
196
+ description: a,
197
+ ...o
198
+ });
199
+ }
200
+ }).catch(async (e) => {
201
+ if (a = ["reject", e], t.error !== void 0) {
202
+ i = !1;
203
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !s.default.isValidElement(r) ? r : { message: r };
204
+ this.create({
205
+ id: n,
206
+ type: "error",
207
+ description: a,
208
+ ...o
209
+ });
210
+ }
211
+ }).finally(() => {
212
+ i && (this.dismiss(n), n = void 0), t.finally == null || t.finally.call(t);
213
+ }), c = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
214
+ return typeof n != "string" && typeof n != "number" ? { unwrap: c } : Object.assign(n, { unwrap: c });
215
+ }, this.custom = (e, t) => {
216
+ let n = t?.id || g++;
217
+ return this.create({
218
+ jsx: e(n),
219
+ id: n,
220
+ ...t
221
+ }), n;
222
+ }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
223
+ }
224
+ }(), v = (e, t) => {
225
+ let n = t?.id || g++;
226
+ return _.addToast({
227
+ title: e,
228
+ ...t,
229
+ id: n
230
+ }), n;
231
+ }, y = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", b = Object.assign(v, {
232
+ success: _.success,
233
+ info: _.info,
234
+ warning: _.warning,
235
+ error: _.error,
236
+ custom: _.custom,
237
+ message: _.message,
238
+ promise: _.promise,
239
+ dismiss: _.dismiss,
240
+ loading: _.loading
241
+ }, {
242
+ getHistory: () => _.toasts,
243
+ getToasts: () => _.getActiveToasts()
244
+ });
245
+ t("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
246
+ function x(e) {
247
+ return e.label !== void 0;
248
+ }
249
+ var ne = 3, S = "24px", C = "16px", w = 4e3, T = 356, E = 14, D = 45, O = 200;
250
+ function k(...e) {
251
+ return e.filter(Boolean).join(" ");
252
+ }
253
+ function re(e) {
254
+ let [t, n] = e.split("-"), r = [];
255
+ return t && r.push(t), n && r.push(n), r;
256
+ }
257
+ var A = (e) => {
258
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: c, index: u, toasts: f, expanded: p, removeToast: m, defaultRichColors: h, closeButton: g, style: _, cancelButtonStyle: v, actionButtonStyle: y, className: b = "", descriptionClassName: ne = "", duration: S, position: C, gap: T, expandByDefault: E, classNames: A, icons: j, closeButtonAriaLabel: ie = "Close toast" } = e, [M, N] = s.default.useState(null), [P, ae] = s.default.useState(null), [F, I] = s.default.useState(!1), [L, R] = s.default.useState(!1), [z, B] = s.default.useState(!1), [oe, se] = s.default.useState(!1), [ce, le] = s.default.useState(!1), [ue, V] = s.default.useState(0), [de, H] = s.default.useState(0), U = s.default.useRef(n.duration || S || w), fe = s.default.useRef(null), W = s.default.useRef(null), pe = u === 0, me = u + 1 <= o, G = n.type, K = n.dismissible !== !1, he = n.className || "", ge = n.descriptionClassName || "", q = s.default.useMemo(() => c.findIndex((e) => e.toastId === n.id) || 0, [c, n.id]), _e = s.default.useMemo(() => n.closeButton ?? g, [n.closeButton, g]), ve = s.default.useMemo(() => n.duration || S || w, [n.duration, S]), J = s.default.useRef(0), Y = s.default.useRef(0), X = s.default.useRef(0), Z = s.default.useRef(null), [ye, be] = C.split("-"), xe = s.default.useMemo(() => c.reduce((e, t, n) => n >= q ? e : e + t.height, 0), [c, q]), Se = te(), Ce = n.invert || t, Q = G === "loading";
259
+ Y.current = s.default.useMemo(() => q * T + xe, [q, xe]), s.default.useEffect(() => {
260
+ U.current = ve;
261
+ }, [ve]), s.default.useEffect(() => {
262
+ I(!0);
263
+ }, []), s.default.useEffect(() => {
264
+ let e = W.current;
265
+ if (e) {
266
+ let t = e.getBoundingClientRect().height;
267
+ return H(t), a((e) => [{
268
+ toastId: n.id,
269
+ height: t,
270
+ position: n.position
271
+ }, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
272
+ }
273
+ }, [a, n.id]), s.default.useLayoutEffect(() => {
274
+ if (!F) return;
275
+ let e = W.current, t = e.style.height;
276
+ e.style.height = "auto";
277
+ let r = e.getBoundingClientRect().height;
278
+ e.style.height = t, H(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
279
+ ...e,
280
+ height: r
281
+ } : e) : [{
282
+ toastId: n.id,
283
+ height: r,
284
+ position: n.position
285
+ }, ...e]);
286
+ }, [
287
+ F,
288
+ n.title,
289
+ n.description,
290
+ a,
291
+ n.id,
292
+ n.jsx,
293
+ n.action,
294
+ n.cancel
295
+ ]);
296
+ let $ = s.default.useCallback(() => {
297
+ R(!0), V(Y.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
298
+ m(n);
299
+ }, O);
300
+ }, [
301
+ n,
302
+ m,
303
+ a,
304
+ Y
305
+ ]);
306
+ s.default.useEffect(() => {
307
+ if (n.promise && G === "loading" || n.duration === Infinity || n.type === "loading") return;
308
+ let e;
309
+ return p || i || Se ? (() => {
310
+ if (X.current < J.current) {
311
+ let e = (/* @__PURE__ */ new Date()).getTime() - J.current;
312
+ U.current -= e;
313
+ }
314
+ X.current = (/* @__PURE__ */ new Date()).getTime();
315
+ })() : U.current !== Infinity && (J.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
316
+ n.onAutoClose == null || n.onAutoClose.call(n, n), $();
317
+ }, U.current)), () => clearTimeout(e);
318
+ }, [
319
+ p,
320
+ i,
321
+ n,
322
+ G,
323
+ Se,
324
+ $
325
+ ]), s.default.useEffect(() => {
326
+ n.delete && ($(), n.onDismiss == null || n.onDismiss.call(n, n));
327
+ }, [$, n.delete]);
328
+ function we() {
329
+ return j?.loading ? /*#__PURE__*/ s.default.createElement("div", {
330
+ className: k(A?.loader, n?.classNames?.loader, "sonner-loader"),
331
+ "data-visible": G === "loading"
332
+ }, j.loading) : /*#__PURE__*/ s.default.createElement(d, {
333
+ className: k(A?.loader, n?.classNames?.loader),
334
+ visible: G === "loading"
335
+ });
336
+ }
337
+ let Te = n.icon || j?.[G] || l(G);
338
+ return /*#__PURE__*/ s.default.createElement("li", {
339
+ tabIndex: 0,
340
+ ref: W,
341
+ className: k(b, he, A?.toast, n?.classNames?.toast, A?.default, A?.[G], n?.classNames?.[G]),
342
+ "data-sonner-toast": "",
343
+ "data-rich-colors": n.richColors ?? h,
344
+ "data-styled": !(n.jsx || n.unstyled || r),
345
+ "data-mounted": F,
346
+ "data-promise": !!n.promise,
347
+ "data-swiped": ce,
348
+ "data-removed": L,
349
+ "data-visible": me,
350
+ "data-y-position": ye,
351
+ "data-x-position": be,
352
+ "data-index": u,
353
+ "data-front": pe,
354
+ "data-swiping": z,
355
+ "data-dismissible": K,
356
+ "data-type": G,
357
+ "data-invert": Ce,
358
+ "data-swipe-out": oe,
359
+ "data-swipe-direction": P,
360
+ "data-expanded": !!(p || E && F),
361
+ "data-testid": n.testId,
362
+ style: {
363
+ "--index": u,
364
+ "--toasts-before": u,
365
+ "--z-index": f.length - u,
366
+ "--offset": `${L ? ue : Y.current}px`,
367
+ "--initial-height": E ? "auto" : `${de}px`,
368
+ ..._,
369
+ ...n.style
370
+ },
371
+ onDragEnd: () => {
372
+ B(!1), N(null), Z.current = null;
373
+ },
374
+ onPointerDown: (e) => {
375
+ e.button !== 2 && (Q || !K || (fe.current = /* @__PURE__ */ new Date(), V(Y.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (B(!0), Z.current = {
376
+ x: e.clientX,
377
+ y: e.clientY
378
+ })));
379
+ },
380
+ onPointerUp: () => {
381
+ if (oe || !K) return;
382
+ Z.current = null;
383
+ let e = Number(W.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(W.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - fe.current?.getTime(), i = M === "x" ? e : t, a = Math.abs(i) / r;
384
+ if (Math.abs(i) >= D || a > .11) {
385
+ V(Y.current), n.onDismiss == null || n.onDismiss.call(n, n), ae(M === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), se(!0);
386
+ return;
387
+ }
388
+ var o, s;
389
+ (o = W.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = W.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), le(!1), B(!1), N(null);
390
+ },
391
+ onPointerMove: (t) => {
392
+ var n, r;
393
+ if (!Z.current || !K || window.getSelection()?.toString().length > 0) return;
394
+ let i = t.clientY - Z.current.y, a = t.clientX - Z.current.x, o = e.swipeDirections ?? re(C);
395
+ !M && (Math.abs(a) > 1 || Math.abs(i) > 1) && N(Math.abs(a) > Math.abs(i) ? "x" : "y");
396
+ let s = {
397
+ x: 0,
398
+ y: 0
399
+ }, c = (e) => 1 / (1.5 + Math.abs(e) / 20);
400
+ if (M === "y") {
401
+ if (o.includes("top") || o.includes("bottom")) if (o.includes("top") && i < 0 || o.includes("bottom") && i > 0) s.y = i;
402
+ else {
403
+ let e = i * c(i);
404
+ s.y = Math.abs(e) < Math.abs(i) ? e : i;
405
+ }
406
+ } else if (M === "x" && (o.includes("left") || o.includes("right"))) if (o.includes("left") && a < 0 || o.includes("right") && a > 0) s.x = a;
407
+ else {
408
+ let e = a * c(a);
409
+ s.x = Math.abs(e) < Math.abs(a) ? e : a;
410
+ }
411
+ (Math.abs(s.x) > 0 || Math.abs(s.y) > 0) && le(!0), (n = W.current) == null || n.style.setProperty("--swipe-amount-x", `${s.x}px`), (r = W.current) == null || r.style.setProperty("--swipe-amount-y", `${s.y}px`);
412
+ }
413
+ }, _e && !n.jsx && G !== "loading" ? /*#__PURE__*/ s.default.createElement("button", {
414
+ "aria-label": ie,
415
+ "data-disabled": Q,
416
+ "data-close-button": !0,
417
+ onClick: Q || !K ? () => {} : () => {
418
+ $(), n.onDismiss == null || n.onDismiss.call(n, n);
419
+ },
420
+ className: k(A?.closeButton, n?.classNames?.closeButton)
421
+ }, j?.close ?? ee) : null, (G || n.icon || n.promise) && n.icon !== null && (j?.[G] !== null || n.icon) ? /*#__PURE__*/ s.default.createElement("div", {
422
+ "data-icon": "",
423
+ className: k(A?.icon, n?.classNames?.icon)
424
+ }, n.promise || n.type === "loading" && !n.icon ? n.icon || we() : null, n.type === "loading" ? null : Te) : null, /*#__PURE__*/ s.default.createElement("div", {
425
+ "data-content": "",
426
+ className: k(A?.content, n?.classNames?.content)
427
+ }, /*#__PURE__*/ s.default.createElement("div", {
428
+ "data-title": "",
429
+ className: k(A?.title, n?.classNames?.title)
430
+ }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ s.default.createElement("div", {
431
+ "data-description": "",
432
+ className: k(ne, ge, A?.description, n?.classNames?.description)
433
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ s.default.isValidElement(n.cancel) ? n.cancel : n.cancel && x(n.cancel) ? /*#__PURE__*/ s.default.createElement("button", {
434
+ "data-button": !0,
435
+ "data-cancel": !0,
436
+ style: n.cancelButtonStyle || v,
437
+ onClick: (e) => {
438
+ x(n.cancel) && K && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
439
+ },
440
+ className: k(A?.cancelButton, n?.classNames?.cancelButton)
441
+ }, n.cancel.label) : null, /*#__PURE__*/ s.default.isValidElement(n.action) ? n.action : n.action && x(n.action) ? /*#__PURE__*/ s.default.createElement("button", {
442
+ "data-button": !0,
443
+ "data-action": !0,
444
+ style: n.actionButtonStyle || y,
445
+ onClick: (e) => {
446
+ x(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && $());
447
+ },
448
+ className: k(A?.actionButton, n?.classNames?.actionButton)
449
+ }, n.action.label) : null);
450
+ };
451
+ function j() {
452
+ if (typeof window > "u" || typeof document > "u") return "ltr";
453
+ let e = document.documentElement.getAttribute("dir");
454
+ return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
455
+ }
456
+ function ie(e, t) {
457
+ let n = {};
458
+ return [e, t].forEach((e, t) => {
459
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? C : S;
460
+ function o(e) {
461
+ [
462
+ "top",
463
+ "right",
464
+ "bottom",
465
+ "left"
466
+ ].forEach((t) => {
467
+ n[`${i}-${t}`] = typeof e == "number" ? `${e}px` : e;
468
+ });
469
+ }
470
+ typeof e == "number" || typeof e == "string" ? o(e) : typeof e == "object" ? [
471
+ "top",
472
+ "right",
473
+ "bottom",
474
+ "left"
475
+ ].forEach((t) => {
476
+ e[t] === void 0 ? n[`${i}-${t}`] = a : n[`${i}-${t}`] = typeof e[t] == "number" ? `${e[t]}px` : e[t];
477
+ }) : o(a);
478
+ }), n;
479
+ }
480
+ e.Toaster = /* @__PURE__ */ s.default.forwardRef(function(e, t) {
481
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: l, className: u, offset: d, mobileOffset: f, theme: p = "light", richColors: m, duration: h, style: ee, visibleToasts: te = ne, toastOptions: g, dir: v = j(), gap: y = E, icons: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = s.default.useState([]), w = s.default.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), D = s.default.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [O, k] = s.default.useState([]), [re, M] = s.default.useState(!1), [N, P] = s.default.useState(!1), [ae, F] = s.default.useState(p === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : p), I = s.default.useRef(null), L = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), R = s.default.useRef(null), z = s.default.useRef(!1), B = s.default.useCallback((e) => {
482
+ C((t) => (t.find((t) => t.id === e.id)?.delete || _.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
483
+ }, []);
484
+ return s.default.useEffect(() => _.subscribe((e) => {
485
+ if (e.dismiss) {
486
+ requestAnimationFrame(() => {
487
+ C((t) => t.map((t) => t.id === e.id ? {
488
+ ...t,
489
+ delete: !0
490
+ } : t));
491
+ });
492
+ return;
493
+ }
494
+ setTimeout(() => {
495
+ c.default.flushSync(() => {
496
+ C((t) => {
497
+ let n = t.findIndex((t) => t.id === e.id);
498
+ return n === -1 ? [e, ...t] : [
499
+ ...t.slice(0, n),
500
+ {
501
+ ...t[n],
502
+ ...e
503
+ },
504
+ ...t.slice(n + 1)
505
+ ];
506
+ });
507
+ });
508
+ });
509
+ }), [S]), s.default.useEffect(() => {
510
+ if (p !== "system") {
511
+ F(p);
512
+ return;
513
+ }
514
+ if (p === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? F("dark") : F("light")), typeof window > "u") return;
515
+ let e = window.matchMedia("(prefers-color-scheme: dark)");
516
+ try {
517
+ e.addEventListener("change", ({ matches: e }) => {
518
+ F(e ? "dark" : "light");
519
+ });
520
+ } catch {
521
+ e.addListener(({ matches: e }) => {
522
+ try {
523
+ F(e ? "dark" : "light");
524
+ } catch (e) {
525
+ console.error(e);
526
+ }
527
+ });
528
+ }
529
+ }, [p]), s.default.useEffect(() => {
530
+ S.length <= 1 && M(!1);
531
+ }, [S]), s.default.useEffect(() => {
532
+ let e = (e) => {
533
+ if (a.every((t) => e[t] || e.code === t)) {
534
+ var t;
535
+ M(!0), (t = I.current) == null || t.focus();
536
+ }
537
+ e.code === "Escape" && (document.activeElement === I.current || I.current?.contains(document.activeElement)) && M(!1);
538
+ };
539
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
540
+ }, [a]), s.default.useEffect(() => {
541
+ if (I.current) return () => {
542
+ R.current && (R.current.focus({ preventScroll: !0 }), R.current = null, z.current = !1);
543
+ };
544
+ }, [I.current]), /*#__PURE__*/ s.default.createElement("section", {
545
+ ref: t,
546
+ "aria-label": `${x} ${L}`,
547
+ tabIndex: -1,
548
+ "aria-live": "polite",
549
+ "aria-relevant": "additions text",
550
+ "aria-atomic": "false",
551
+ suppressHydrationWarning: !0
552
+ }, D.map((t, n) => {
553
+ let [i, a] = t.split("-");
554
+ return w.length ? /*#__PURE__*/ s.default.createElement("ol", {
555
+ key: t,
556
+ dir: v === "auto" ? j() : v,
557
+ tabIndex: -1,
558
+ ref: I,
559
+ className: u,
560
+ "data-sonner-toaster": !0,
561
+ "data-sonner-theme": ae,
562
+ "data-y-position": i,
563
+ "data-x-position": a,
564
+ style: {
565
+ "--front-toast-height": `${O[0]?.height || 0}px`,
566
+ "--width": `${T}px`,
567
+ "--gap": `${y}px`,
568
+ ...ee,
569
+ ...ie(d, f)
570
+ },
571
+ onBlur: (e) => {
572
+ z.current && !e.currentTarget.contains(e.relatedTarget) && (z.current = !1, R.current &&= (R.current.focus({ preventScroll: !0 }), null));
573
+ },
574
+ onFocus: (e) => {
575
+ e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || z.current || (z.current = !0, R.current = e.relatedTarget);
576
+ },
577
+ onMouseEnter: () => M(!0),
578
+ onMouseMove: () => M(!0),
579
+ onMouseLeave: () => {
580
+ N || M(!1);
581
+ },
582
+ onDragEnd: () => M(!1),
583
+ onPointerDown: (e) => {
584
+ e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || P(!0);
585
+ },
586
+ onPointerUp: () => P(!1)
587
+ }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ s.default.createElement(A, {
588
+ key: n.id,
589
+ icons: b,
590
+ index: i,
591
+ toast: n,
592
+ defaultRichColors: m,
593
+ duration: g?.duration ?? h,
594
+ className: g?.className,
595
+ descriptionClassName: g?.descriptionClassName,
596
+ invert: r,
597
+ visibleToasts: te,
598
+ closeButton: g?.closeButton ?? l,
599
+ interacting: N,
600
+ position: t,
601
+ style: g?.style,
602
+ unstyled: g?.unstyled,
603
+ classNames: g?.classNames,
604
+ cancelButtonStyle: g?.cancelButtonStyle,
605
+ actionButtonStyle: g?.actionButtonStyle,
606
+ closeButtonAriaLabel: g?.closeButtonAriaLabel,
607
+ removeToast: B,
608
+ toasts: w.filter((e) => e.position == n.position),
609
+ heights: O.filter((e) => e.position == n.position),
610
+ setHeights: k,
611
+ expandByDefault: o,
612
+ gap: y,
613
+ expanded: re,
614
+ swipeDirections: e.swipeDirections
615
+ }))) : null;
616
+ }));
617
+ }), e.toast = b;
618
+ })), s = o(), c = null;
619
+ function l(e) {
620
+ c = e ?? null;
621
+ }
622
+ function u() {
623
+ return c;
624
+ }
625
+ //#endregion
626
+ //#region src/embed/sonnerHostBridge.tsx
627
+ var d = /* @__PURE__ */ n({ toast: () => h });
628
+ e(d, /* @__PURE__ */ t(o(), 1));
629
+ var f = 0;
630
+ function p(e, t, n) {
631
+ let r = u();
632
+ if (!r || typeof t != "string") return !1;
633
+ let i = n?.id ?? `gw-embed-toast-${f += 1}`;
634
+ return r({
635
+ level: e,
636
+ message: t,
637
+ description: typeof n?.description == "string" ? n.description : void 0,
638
+ id: String(i),
639
+ durationMs: typeof n?.duration == "number" ? n.duration : void 0
640
+ }), i;
641
+ }
642
+ function m(e, t) {
643
+ return p("info", e, t) || (0, s.toast)(e, t);
644
+ }
645
+ for (let [e, t] of Object.entries({
646
+ success: "success",
647
+ error: "error",
648
+ warning: "warning",
649
+ info: "info",
650
+ message: "info",
651
+ loading: "info"
652
+ })) m[e] = (n, r) => p(t, n, r) || s.toast[e](n, r);
653
+ for (let e of [
654
+ "custom",
655
+ "promise",
656
+ "dismiss",
657
+ "getHistory",
658
+ "getToasts"
659
+ ]) {
660
+ let t = s.toast[e];
661
+ typeof t == "function" && (m[e] = t.bind(s.toast));
662
+ }
663
+ var h = m;
664
+ //#endregion
665
+ export { h as n, l as r, d as t };