@epam/ai-dial-share 1.2.0-dev.15 → 1.2.0-dev.153

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.
package/index.js CHANGED
@@ -1,146 +1,210 @@
1
- import { buildCssVars as e, mergeClasses as t, useCodeCopy as n } from "@epam/ai-dial-chat-shared";
2
- import r, { forwardRef as i, memo as a, useEffect as o, useRef as s, useState as c } from "react";
3
- import { DIAL_ICON_SIZE as l, DIAL_KIT_ICON_STROKE as u, Dropdown as d, GhostButton as f, GhostIconButton as p, Input as m, MenuItem as h, MenuItemMark as g, Skeleton as _, SkeletonVariant as v } from "@epam/ai-dial-ui-kit";
4
- import { IconCheck as y, IconChevronDown as b, IconCopy as x, IconLink as S, IconQrcode as C, IconWorld as w } from "@tabler/icons-react";
5
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
1
+ import { buildCssVars as e, copyToClipboard as t, mergeClasses as n, triggerBlobDownload as r, useCodeCopy as i } from "@epam/ai-dial-chat-shared";
2
+ import a, { forwardRef as o, memo as s, useEffect as c, useRef as l, useState as u } from "react";
3
+ import { DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, Dropdown as p, GhostButton as m, GhostIconButton as h, Input as g, MenuItemMark as _, Skeleton as v, SkeletonVariant as y } from "@epam/ai-dial-ui-kit";
4
+ import { IconCheck as b, IconChevronDown as x, IconCopy as S, IconDownload as C, IconLink as w, IconQrcode as T, IconWorld as E } from "@tabler/icons-react";
5
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
6
6
  //#region \0rolldown/runtime.js
7
- var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescriptor, j = Object.getOwnPropertyNames, M = Object.getPrototypeOf, N = Object.prototype.hasOwnProperty, P = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), F = (e, t, n, r) => {
8
- if (t && typeof t == "object" || typeof t == "function") for (var i = j(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !N.call(e, s) && s !== n && k(e, s, {
7
+ var A = Object.create, j = Object.defineProperty, M = Object.getOwnPropertyDescriptor, N = Object.getOwnPropertyNames, P = Object.getPrototypeOf, F = Object.prototype.hasOwnProperty, I = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), L = (e, t, n, r) => {
8
+ if (t && typeof t == "object" || typeof t == "function") for (var i = N(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !F.call(e, s) && s !== n && j(e, s, {
9
9
  get: ((e) => t[e]).bind(null, s),
10
- enumerable: !(r = A(t, s)) || r.enumerable
10
+ enumerable: !(r = M(t, s)) || r.enumerable
11
11
  });
12
12
  return e;
13
- }, ee = (e, t, n) => (n = e == null ? {} : O(M(e)), F(t || !e || !e.__esModule ? k(n, "default", {
13
+ }, ee = (e, t, n) => (n = e == null ? {} : A(P(e)), L(t || !e || !e.__esModule ? j(n, "default", {
14
14
  value: e,
15
15
  enumerable: !0
16
- }) : n, e)), I = /* @__PURE__ */ function(e) {
16
+ }) : n, e)), te = { popover: "dial-share-popover" }, R = /* @__PURE__ */ function(e) {
17
17
  return e.View = "view", e.Edit = "edit", e;
18
- }({}), L = /* @__PURE__ */ function(e) {
18
+ }({}), z = /* @__PURE__ */ function(e) {
19
19
  return e.Link = "link", e.Qr = "qr", e;
20
- }({}), te = "button:not(:disabled), input:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ne = (e) => Array.from(e?.querySelectorAll(te) ?? []), re = (e) => {
21
- let [t] = ne(e);
20
+ }({}), ne = "button:not(:disabled), input:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", re = (e) => Array.from(e?.querySelectorAll(ne) ?? []), ie = (e) => {
21
+ let [t] = re(e);
22
22
  (t ?? e)?.focus();
23
- }, R = {
23
+ }, B = {
24
24
  skeletonColor: "var(--shp-skeleton-color, var(--bg-layer-sunken, #eef1f7))",
25
- accessTriggerBtn: "_accessTriggerBtn_1ryi2_1",
26
- accessTriggerBtnOpen: "_accessTriggerBtnOpen_1ryi2_17",
27
- accessTriggerLabel: "_accessTriggerLabel_1ryi2_21",
28
- title: "_title_1ryi2_25",
29
- linkIconBadge: "_linkIconBadge_1ryi2_29",
30
- anyoneWithLinkTitle: "_anyoneWithLinkTitle_1ryi2_34",
31
- anyoneWithLinkSubtitle: "_anyoneWithLinkSubtitle_1ryi2_38",
32
- accessTriggerChevron: "_accessTriggerChevron_1ryi2_42",
33
- accessMenuItemLabel: "_accessMenuItemLabel_1ryi2_55",
34
- linkRow: "_linkRow_1ryi2_59",
35
- errorText: "_errorText_1ryi2_66",
36
- note: "_note_1ryi2_70",
37
- divider: "_divider_1ryi2_74"
38
- }, ie = ({ anyoneWithLinkTitle: e, anyoneWithLinkSubtitle: n, access: r, canEditAccess: i, accessViewLabel: a, accessEditLabel: o, accessAriaLabel: s, isOpen: c, onOpenChange: f, onAccessChange: p, onMenuKeyDown: m, triggerRef: _, menuRef: v, titleClassName: y = "dial-small-semi-text", subtitleClassName: x = "dial-small-text", accessTriggerLabelClassName: S = "dial-small-semi-text", accessMenuItemLabelClassName: C = "dial-small-text" }) => {
39
- let T = [{
40
- value: I.View,
25
+ accessTriggerBtn: "_accessTriggerBtn_11e4z_2",
26
+ accessTriggerBtnOpen: "_accessTriggerBtnOpen_11e4z_18",
27
+ accessTriggerLabel: "_accessTriggerLabel_11e4z_22",
28
+ title: "_title_11e4z_26",
29
+ linkIconBadge: "_linkIconBadge_11e4z_30",
30
+ anyoneWithLinkTitle: "_anyoneWithLinkTitle_11e4z_35",
31
+ anyoneWithLinkSubtitle: "_anyoneWithLinkSubtitle_11e4z_39",
32
+ accessTriggerChevron: "_accessTriggerChevron_11e4z_43",
33
+ accessMenuItem: "_accessMenuItem_11e4z_58",
34
+ linkRow: "_linkRow_11e4z_62",
35
+ errorText: "_errorText_11e4z_69",
36
+ note: "_note_11e4z_73",
37
+ divider: "_divider_11e4z_77"
38
+ }, ae = ({ anyoneWithLinkTitle: e, anyoneWithLinkSubtitle: t, access: r, canEditAccess: i, accessViewLabel: a, accessEditLabel: o, accessAriaLabel: s, isOpen: c, onOpenChange: l, onAccessChange: u, menuStyle: m, triggerRef: h, titleClassName: g = "dial-small-semi-text", subtitleClassName: v = "dial-small-text", accessTriggerLabelClassName: y = "dial-small-semi-text" }) => {
39
+ let b = r.includes(R.Edit) ? R.Edit : R.View, S = [{
40
+ key: R.View,
41
41
  label: a
42
42
  }, {
43
- value: I.Edit,
43
+ key: R.Edit,
44
44
  label: o
45
- }], O = r.includes(I.Edit) ? I.Edit : I.View;
46
- return /* @__PURE__ */ D("div", {
45
+ }].map((e) => ({
46
+ ...e,
47
+ mark: _.Check,
48
+ checked: e.key === b,
49
+ className: B.accessMenuItem
50
+ }));
51
+ return /* @__PURE__ */ k("div", {
47
52
  className: "flex items-center gap-2.5",
48
53
  children: [
49
- /* @__PURE__ */ E("span", {
50
- className: t("flex size-8 shrink-0 items-center justify-center rounded-full", R.linkIconBadge),
51
- children: /* @__PURE__ */ E(w, {
52
- size: l.MD,
54
+ /* @__PURE__ */ O("span", {
55
+ className: n("flex size-8 shrink-0 items-center justify-center rounded-full", B.linkIconBadge),
56
+ children: /* @__PURE__ */ O(E, {
57
+ size: d.MD,
53
58
  "aria-hidden": !0,
54
- stroke: u
59
+ stroke: f
55
60
  })
56
61
  }),
57
- /* @__PURE__ */ D("div", {
62
+ /* @__PURE__ */ k("div", {
58
63
  className: "min-w-0 flex-1",
59
- children: [/* @__PURE__ */ E("p", {
60
- className: t(y, "truncate", R.anyoneWithLinkTitle),
64
+ children: [/* @__PURE__ */ O("p", {
65
+ className: n(g, "truncate", B.anyoneWithLinkTitle),
61
66
  children: e
62
- }), /* @__PURE__ */ E("p", {
63
- className: t(x, R.anyoneWithLinkSubtitle),
64
- children: n
67
+ }), /* @__PURE__ */ O("p", {
68
+ className: n(v, B.anyoneWithLinkSubtitle),
69
+ children: t
65
70
  })]
66
71
  }),
67
- i ? /* @__PURE__ */ E(d, {
72
+ i ? /* @__PURE__ */ O(p, {
68
73
  matchReferenceWidth: !1,
69
74
  placement: "bottom-end",
70
75
  open: c,
71
- onOpenChange: f,
72
- renderOverlay: () => /* @__PURE__ */ E("div", {
73
- ref: v,
74
- role: "menu",
75
- "aria-label": s,
76
- tabIndex: -1,
77
- className: "min-w-[160px]",
78
- onKeyDown: m,
79
- children: T.map((e) => {
80
- let n = O === e.value;
81
- return /* @__PURE__ */ E(h, {
82
- role: "menuitemradio",
83
- "aria-checked": n,
84
- mark: g.Check,
85
- selected: n,
86
- label: e.label,
87
- labelClassName: t(C, R.accessMenuItemLabel),
88
- onClick: () => {
89
- p(e.value === I.Edit ? [I.View, I.Edit] : [I.View]), f(!1);
90
- }
91
- }, e.value);
92
- })
93
- }),
94
- children: /* @__PURE__ */ D("button", {
95
- ref: _,
76
+ onOpenChange: l,
77
+ items: S,
78
+ listClassName: "min-w-[160px]",
79
+ listStyle: m,
80
+ onItemClick: ({ key: e }) => {
81
+ u(e === R.Edit ? [R.View, R.Edit] : [R.View]);
82
+ },
83
+ children: /* @__PURE__ */ k("button", {
84
+ ref: h,
96
85
  type: "button",
97
86
  "aria-haspopup": "menu",
98
87
  "aria-expanded": c,
99
- className: t("flex h-10 shrink-0 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-full border px-3 outline-none", R.accessTriggerBtn, c && R.accessTriggerBtnOpen),
100
- children: [/* @__PURE__ */ E("span", {
101
- className: t(R.accessTriggerLabel, S),
102
- children: T.find((e) => e.value === O)?.label
103
- }), /* @__PURE__ */ E(b, {
104
- size: l.MD,
105
- stroke: u,
106
- className: t("shrink-0 transition-transform duration-150 rtl:scale-x-[-1]", R.accessTriggerChevron, c && "rotate-180"),
88
+ className: n("flex h-10 shrink-0 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-full border px-3 outline-none", B.accessTriggerBtn, c && B.accessTriggerBtnOpen),
89
+ children: [/* @__PURE__ */ O("span", {
90
+ className: n(B.accessTriggerLabel, y),
91
+ children: b === R.Edit ? o : a
92
+ }), /* @__PURE__ */ O(x, {
93
+ size: d.MD,
94
+ stroke: f,
95
+ className: n("shrink-0 transition-transform duration-150 rtl:scale-x-[-1]", B.accessTriggerChevron, c && "rotate-180"),
107
96
  "aria-hidden": !0
108
97
  })]
109
98
  })
110
- }) : /* @__PURE__ */ E("span", {
99
+ }) : /* @__PURE__ */ O("span", {
111
100
  "aria-label": s,
112
- className: t("flex h-10 shrink-0 items-center whitespace-nowrap rounded-full px-3", R.accessTriggerBtn),
113
- children: /* @__PURE__ */ E("span", {
114
- className: t(R.accessTriggerLabel, S),
101
+ className: n("flex h-10 shrink-0 items-center whitespace-nowrap rounded-full px-3", B.accessTriggerBtn),
102
+ children: /* @__PURE__ */ O("span", {
103
+ className: n(B.accessTriggerLabel, y),
115
104
  children: a
116
105
  })
117
106
  })
118
107
  ]
119
108
  });
120
- }, ae = ({ url: e, linkAriaLabel: n, isCopied: r, copyButtonLabel: i, copiedButtonLabel: a, onCopy: o }) => /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D("div", {
121
- className: t("flex items-center gap-3 rounded-full px-4 py-2", R.linkRow),
122
- children: [/* @__PURE__ */ E(m, {
109
+ }, oe = ({ url: e, linkAriaLabel: t, isCopied: r, copyButtonLabel: i, copiedButtonLabel: a, onCopy: o }) => /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("div", {
110
+ className: n("flex items-center gap-3 rounded-full px-4 py-2", B.linkRow),
111
+ children: [/* @__PURE__ */ O(g, {
123
112
  readOnly: !0,
124
113
  value: e,
125
- "aria-label": n,
114
+ "aria-label": t,
126
115
  containerClassName: "min-w-0 flex-1",
127
116
  wrapperClassName: "border-0 bg-transparent px-0 outline-none"
128
- }), /* @__PURE__ */ E(p, {
129
- icon: E(r ? y : x, {
130
- size: l.LG,
117
+ }), /* @__PURE__ */ O(h, {
118
+ icon: O(r ? b : S, {
119
+ size: d.LG,
131
120
  "aria-hidden": !0,
132
- stroke: u
121
+ stroke: f
133
122
  }),
134
123
  "aria-label": r ? a : i,
135
124
  tooltipProps: { tooltip: r ? a : i },
136
125
  onClick: o
137
126
  })]
138
- }), /* @__PURE__ */ E("span", {
127
+ }), /* @__PURE__ */ O("span", {
139
128
  role: "status",
140
129
  "aria-live": "polite",
141
130
  className: "sr-only",
142
131
  children: r ? a : ""
143
- })] }), oe = /* @__PURE__ */ P(((e) => {
132
+ })] }), se = 512, ce = 32, le = "http://www.w3.org/2000/svg", ue = "#000000", de = "#ffffff", V = (e, t) => {
133
+ let n = e.cloneNode(!0);
134
+ return n.setAttribute("xmlns", le), n.setAttribute("width", String(t)), n.setAttribute("height", String(t)), n.removeAttribute("class"), n.removeAttribute("style"), n.removeAttribute("aria-hidden"), n.querySelectorAll("path").forEach((e) => {
135
+ e.getAttribute("fill") === "currentColor" && e.setAttribute("fill", ue);
136
+ }), new XMLSerializer().serializeToString(n);
137
+ }, fe = (e) => new Promise((t, n) => {
138
+ let r = new Image();
139
+ r.onload = () => t(r), r.onerror = () => n(/* @__PURE__ */ Error("Failed to load the QR code SVG.")), r.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`;
140
+ }), pe = async (e, { size: t = se, margin: n = ce } = {}) => {
141
+ let r = t - n * 2, i = await fe(V(e, r)), a = document.createElement("canvas");
142
+ a.width = t, a.height = t;
143
+ let o = a.getContext("2d");
144
+ if (o == null) throw Error("Canvas 2D context is not available.");
145
+ return o.fillStyle = de, o.fillRect(0, 0, t, t), o.drawImage(i, n, n, r, r), new Promise((e, t) => {
146
+ a.toBlob((n) => {
147
+ if (n == null) {
148
+ t(/* @__PURE__ */ Error("Failed to encode the QR code as PNG."));
149
+ return;
150
+ }
151
+ e(n);
152
+ }, "image/png");
153
+ });
154
+ }, me = () => typeof navigator < "u" && typeof navigator.clipboard?.write == "function" && typeof ClipboardItem < "u", he = (e) => {
155
+ let t = pe(e);
156
+ return t.catch(() => void 0), navigator.clipboard.write([new ClipboardItem({ "image/png": t })]);
157
+ }, ge = 2e3, _e = ({ url: e, getSvg: n, copyLabel: i, copiedLabel: a, downloadLabel: o, downloadFileName: s }) => {
158
+ let [p, h] = u(!1), g = l(null);
159
+ c(() => () => {
160
+ g.current != null && clearTimeout(g.current);
161
+ }, []);
162
+ let _ = () => {
163
+ g.current != null && clearTimeout(g.current), h(!0), g.current = setTimeout(() => h(!1), ge);
164
+ }, v = async () => {
165
+ let e = n();
166
+ if (e == null || !me()) return !1;
167
+ try {
168
+ return await he(e), !0;
169
+ } catch {
170
+ return !1;
171
+ }
172
+ }, y = async () => {
173
+ try {
174
+ (await v() || await t(e)) && _();
175
+ } catch {}
176
+ }, x = async () => {
177
+ let e = n();
178
+ if (e != null) try {
179
+ r(await pe(e), s);
180
+ } catch {}
181
+ };
182
+ return /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("div", {
183
+ className: "flex items-center justify-center gap-4 self-center",
184
+ children: [/* @__PURE__ */ O(m, {
185
+ label: p ? a : i,
186
+ iconBefore: O(p ? b : S, {
187
+ size: d.SM,
188
+ "aria-hidden": !0,
189
+ stroke: f
190
+ }),
191
+ onClick: () => void y()
192
+ }), /* @__PURE__ */ O(m, {
193
+ label: o,
194
+ iconBefore: /* @__PURE__ */ O(C, {
195
+ size: d.SM,
196
+ "aria-hidden": !0,
197
+ stroke: f
198
+ }),
199
+ onClick: () => void x()
200
+ })]
201
+ }), /* @__PURE__ */ O("span", {
202
+ role: "status",
203
+ "aria-live": "polite",
204
+ className: "sr-only",
205
+ children: p ? a : ""
206
+ })] });
207
+ }, ve = /* @__PURE__ */ I(((e) => {
144
208
  var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
145
209
  function b(e) {
146
210
  if (typeof e == "object" && e) {
@@ -196,7 +260,7 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
196
260
  }, e.isValidElementType = function(e) {
197
261
  return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
198
262
  }, e.typeOf = b;
199
- })), z = /* @__PURE__ */ P(((e) => {
263
+ })), ye = /* @__PURE__ */ I(((e) => {
200
264
  process.env.NODE_ENV !== "production" && (function() {
201
265
  var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
202
266
  function b(e) {
@@ -231,50 +295,50 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
231
295
  }
232
296
  }
233
297
  var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
234
- function ee(e) {
235
- return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), I(e) || x(e) === l;
236
- }
237
298
  function I(e) {
238
- return x(e) === u;
299
+ return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), L(e) || x(e) === l;
239
300
  }
240
301
  function L(e) {
302
+ return x(e) === u;
303
+ }
304
+ function ee(e) {
241
305
  return x(e) === c;
242
306
  }
243
307
  function te(e) {
244
308
  return x(e) === s;
245
309
  }
246
- function ne(e) {
310
+ function R(e) {
247
311
  return typeof e == "object" && !!e && e.$$typeof === n;
248
312
  }
249
- function re(e) {
313
+ function z(e) {
250
314
  return x(e) === d;
251
315
  }
252
- function R(e) {
316
+ function ne(e) {
253
317
  return x(e) === i;
254
318
  }
255
- function ie(e) {
319
+ function re(e) {
256
320
  return x(e) === h;
257
321
  }
258
- function ae(e) {
322
+ function ie(e) {
259
323
  return x(e) === m;
260
324
  }
261
- function oe(e) {
325
+ function B(e) {
262
326
  return x(e) === r;
263
327
  }
264
- function z(e) {
328
+ function ae(e) {
265
329
  return x(e) === o;
266
330
  }
267
- function B(e) {
331
+ function oe(e) {
268
332
  return x(e) === a;
269
333
  }
270
- function V(e) {
334
+ function se(e) {
271
335
  return x(e) === f;
272
336
  }
273
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = ee, e.isConcurrentMode = I, e.isContextConsumer = L, e.isContextProvider = te, e.isElement = ne, e.isForwardRef = re, e.isFragment = R, e.isLazy = ie, e.isMemo = ae, e.isPortal = oe, e.isProfiler = z, e.isStrictMode = B, e.isSuspense = V, e.isValidElementType = b, e.typeOf = x;
337
+ e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = ee, e.isContextProvider = te, e.isElement = R, e.isForwardRef = z, e.isFragment = ne, e.isLazy = re, e.isMemo = ie, e.isPortal = B, e.isProfiler = ae, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
274
338
  })();
275
- })), B = /* @__PURE__ */ P(((e, t) => {
276
- process.env.NODE_ENV === "production" ? t.exports = oe() : t.exports = z();
277
- })), V = /* @__PURE__ */ P(((e, t) => {
339
+ })), H = /* @__PURE__ */ I(((e, t) => {
340
+ process.env.NODE_ENV === "production" ? t.exports = ve() : t.exports = ye();
341
+ })), U = /* @__PURE__ */ I(((e, t) => {
278
342
  var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
279
343
  function a(e) {
280
344
  if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
@@ -307,14 +371,14 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
307
371
  }
308
372
  return s;
309
373
  };
310
- })), H = /* @__PURE__ */ P(((e, t) => {
374
+ })), W = /* @__PURE__ */ I(((e, t) => {
311
375
  t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
312
- })), U = /* @__PURE__ */ P(((e, t) => {
376
+ })), be = /* @__PURE__ */ I(((e, t) => {
313
377
  t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
314
- })), W = /* @__PURE__ */ P(((e, t) => {
378
+ })), xe = /* @__PURE__ */ I(((e, t) => {
315
379
  var n = function() {};
316
380
  if (process.env.NODE_ENV !== "production") {
317
- var r = H(), i = {}, a = U();
381
+ var r = W(), i = {}, a = be();
318
382
  n = function(e) {
319
383
  var t = "Warning: " + e;
320
384
  typeof console < "u" && console.error(t);
@@ -347,8 +411,8 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
347
411
  o.resetWarningCache = function() {
348
412
  process.env.NODE_ENV !== "production" && (i = {});
349
413
  }, t.exports = o;
350
- })), se = /* @__PURE__ */ P(((e, t) => {
351
- var n = B(), r = V(), i = H(), a = U(), o = W(), s = function() {};
414
+ })), Se = /* @__PURE__ */ I(((e, t) => {
415
+ var n = H(), r = U(), i = W(), a = be(), o = xe(), s = function() {};
352
416
  process.env.NODE_ENV !== "production" && (s = function(e) {
353
417
  var t = "Warning: " + e;
354
418
  typeof console < "u" && console.error(t);
@@ -606,8 +670,8 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
606
670
  }
607
671
  return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
608
672
  };
609
- })), ce = /* @__PURE__ */ P(((e, t) => {
610
- var n = H();
673
+ })), Ce = /* @__PURE__ */ I(((e, t) => {
674
+ var n = W();
611
675
  function r() {}
612
676
  function i() {}
613
677
  i.resetWarningCache = r, t.exports = function() {
@@ -646,11 +710,11 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
646
710
  };
647
711
  return a.PropTypes = a, a;
648
712
  };
649
- })), G = /* @__PURE__ */ ee((/* @__PURE__ */ P(((e, t) => {
713
+ })), G = /* @__PURE__ */ ee((/* @__PURE__ */ I(((e, t) => {
650
714
  if (process.env.NODE_ENV !== "production") {
651
- var n = B();
652
- t.exports = se()(n.isElement, !0);
653
- } else t.exports = ce()();
715
+ var n = H();
716
+ t.exports = Se()(n.isElement, !0);
717
+ } else t.exports = Ce()();
654
718
  })))(), 1), K = function(e, t) {
655
719
  let n = e, r = J[t], i = null, a = 0, o = null, s = [], c = {}, l = function(e, t) {
656
720
  a = n * 4 + 17, i = function(e) {
@@ -734,7 +798,7 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
734
798
  for (let e = 0; e < i; e += 1) for (let n = 0; n < t.length; n += 1) e < o[n].length && (c[l] = o[n][e], l += 1);
735
799
  return c;
736
800
  }, v = function(e, t, n) {
737
- let r = le.getRSBlocks(e, t), i = ue();
801
+ let r = we.getRSBlocks(e, t), i = Te();
738
802
  for (let t = 0; t < n.length; t += 1) {
739
803
  let r = n[t];
740
804
  i.put(r.getMode(), 4), i.put(r.getLength(), X.getLengthInBits(r.getMode(), e)), r.write(i);
@@ -751,16 +815,16 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
751
815
  let n = null;
752
816
  switch (t) {
753
817
  case "Numeric":
754
- n = de(e);
818
+ n = Ee(e);
755
819
  break;
756
820
  case "Alphanumeric":
757
- n = fe(e);
821
+ n = De(e);
758
822
  break;
759
823
  case "Byte":
760
- n = pe(e);
824
+ n = Oe(e);
761
825
  break;
762
826
  case "Kanji":
763
- n = me(e);
827
+ n = ke(e);
764
828
  break;
765
829
  default: throw "mode:" + t;
766
830
  }
@@ -774,7 +838,7 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
774
838
  if (n < 1) {
775
839
  let e = 1;
776
840
  for (; e < 40; e++) {
777
- let t = le.getRSBlocks(e, r), n = ue();
841
+ let t = we.getRSBlocks(e, r), n = Te();
778
842
  for (let t = 0; t < s.length; t++) {
779
843
  let r = s[t];
780
844
  n.put(r.getMode(), 4), n.put(r.getLength(), X.getLengthInBits(r.getMode(), e)), r.write(n);
@@ -805,7 +869,7 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
805
869
  }, c.createDataURL = function(e, t) {
806
870
  e ||= 2, t = t === void 0 ? e * 4 : t;
807
871
  let n = c.getModuleCount() * e + t * 2, r = t, i = n - t;
808
- return ye(n, n, function(t, n) {
872
+ return Pe(n, n, function(t, n) {
809
873
  if (r <= t && t < i && r <= n && n < i) {
810
874
  let i = Math.floor((t - r) / e), a = Math.floor((n - r) / e);
811
875
  return +!c.isDark(a, i);
@@ -882,7 +946,7 @@ K.stringToBytes = function(e) {
882
946
  return t;
883
947
  }, K.createStringToBytes = function(e, t) {
884
948
  let n = function() {
885
- let n = _e(e), r = function() {
949
+ let n = Me(e), r = function() {
886
950
  let e = n.read();
887
951
  if (e == -1) throw "eof";
888
952
  return e;
@@ -1298,7 +1362,7 @@ var q = {
1298
1362
  for (let r = 0; r < e.getLength(); r += 1) n[r] ^= Z.gexp(Z.glog(e.getAt(r)) + t);
1299
1363
  return Q(n, 0).mod(e);
1300
1364
  }, r;
1301
- }, le = function() {
1365
+ }, we = function() {
1302
1366
  let e = [
1303
1367
  [
1304
1368
  1,
@@ -2506,7 +2570,7 @@ var q = {
2506
2570
  }
2507
2571
  return o;
2508
2572
  }, n;
2509
- }(), ue = function() {
2573
+ }(), Te = function() {
2510
2574
  let e = [], t = 0, n = {};
2511
2575
  return n.getBuffer = function() {
2512
2576
  return e;
@@ -2520,7 +2584,7 @@ var q = {
2520
2584
  let r = Math.floor(t / 8);
2521
2585
  e.length <= r && e.push(0), n && (e[r] |= 128 >>> t % 8), t += 1;
2522
2586
  }, n;
2523
- }, de = function(e) {
2587
+ }, Ee = function(e) {
2524
2588
  let t = q.MODE_NUMBER, n = e, r = {};
2525
2589
  r.getMode = function() {
2526
2590
  return t;
@@ -2540,7 +2604,7 @@ var q = {
2540
2604
  throw "illegal char :" + e;
2541
2605
  };
2542
2606
  return r;
2543
- }, fe = function(e) {
2607
+ }, De = function(e) {
2544
2608
  let t = q.MODE_ALPHA_NUM, n = e, r = {};
2545
2609
  r.getMode = function() {
2546
2610
  return t;
@@ -2568,7 +2632,7 @@ var q = {
2568
2632
  }
2569
2633
  };
2570
2634
  return r;
2571
- }, pe = function(e) {
2635
+ }, Oe = function(e) {
2572
2636
  let t = q.MODE_8BIT_BYTE, n = K.stringToBytes(e), r = {};
2573
2637
  return r.getMode = function() {
2574
2638
  return t;
@@ -2577,7 +2641,7 @@ var q = {
2577
2641
  }, r.write = function(e) {
2578
2642
  for (let t = 0; t < n.length; t += 1) e.put(n[t], 8);
2579
2643
  }, r;
2580
- }, me = function(e) {
2644
+ }, ke = function(e) {
2581
2645
  let t = q.MODE_KANJI, n = K.stringToBytes;
2582
2646
  (function(e, t) {
2583
2647
  let r = n(e);
@@ -2599,7 +2663,7 @@ var q = {
2599
2663
  }
2600
2664
  if (n < t.length) throw "illegal char at " + (n + 1);
2601
2665
  }, i;
2602
- }, he = function() {
2666
+ }, Ae = function() {
2603
2667
  let e = [], t = {};
2604
2668
  return t.writeByte = function(t) {
2605
2669
  e.push(t & 255);
@@ -2618,7 +2682,7 @@ var q = {
2618
2682
  for (let n = 0; n < e.length; n += 1) n > 0 && (t += ","), t += e[n];
2619
2683
  return t += "]", t;
2620
2684
  }, t;
2621
- }, ge = function() {
2685
+ }, je = function() {
2622
2686
  let e = 0, t = 0, n = 0, r = "", i = {}, a = function(e) {
2623
2687
  r += String.fromCharCode(o(e & 63));
2624
2688
  }, o = function(e) {
@@ -2640,7 +2704,7 @@ var q = {
2640
2704
  }, i.toString = function() {
2641
2705
  return r;
2642
2706
  }, i;
2643
- }, _e = function(e) {
2707
+ }, Me = function(e) {
2644
2708
  let t = e, n = 0, r = 0, i = 0, a = {};
2645
2709
  a.read = function() {
2646
2710
  for (; i < 8;) {
@@ -2664,7 +2728,7 @@ var q = {
2664
2728
  throw "c:" + e;
2665
2729
  };
2666
2730
  return a;
2667
- }, ve = function(e, t) {
2731
+ }, Ne = function(e, t) {
2668
2732
  let n = e, r = t, i = Array(e * t), a = {};
2669
2733
  a.setPixel = function(e, t, r) {
2670
2734
  i[t * n + e] = r;
@@ -2689,7 +2753,7 @@ var q = {
2689
2753
  let t = 1 << e, n = (1 << e) + 1, r = e + 1, a = c();
2690
2754
  for (let e = 0; e < t; e += 1) a.add(String.fromCharCode(e));
2691
2755
  a.add(String.fromCharCode(t)), a.add(String.fromCharCode(n));
2692
- let s = he(), l = o(s);
2756
+ let s = Ae(), l = o(s);
2693
2757
  l.write(t, r);
2694
2758
  let u = 0, d = String.fromCharCode(i[u]);
2695
2759
  for (u += 1; u < i.length;) {
@@ -2711,12 +2775,12 @@ var q = {
2711
2775
  }, n;
2712
2776
  };
2713
2777
  return a;
2714
- }, ye = function(e, t, n) {
2715
- let r = ve(e, t);
2778
+ }, Pe = function(e, t, n) {
2779
+ let r = Ne(e, t);
2716
2780
  for (let i = 0; i < t; i += 1) for (let t = 0; t < e; t += 1) r.setPixel(t, i, n(t, i));
2717
- let i = he();
2781
+ let i = Ae();
2718
2782
  r.write(i);
2719
- let a = ge(), o = i.toByteArray();
2783
+ let a = je(), o = i.toByteArray();
2720
2784
  for (let e = 0; e < o.length; e += 1) a.writeByte(o[e]);
2721
2785
  return a.flush(), "data:image/gif;base64," + a;
2722
2786
  };
@@ -2732,16 +2796,16 @@ function $() {
2732
2796
  return e;
2733
2797
  }, $.apply(null, arguments);
2734
2798
  }
2735
- function be(e, t) {
2799
+ function Fe(e, t) {
2736
2800
  if (e == null) return {};
2737
- var n, r, i = xe(e, t);
2801
+ var n, r, i = Ie(e, t);
2738
2802
  if (Object.getOwnPropertySymbols) {
2739
2803
  var a = Object.getOwnPropertySymbols(e);
2740
2804
  for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
2741
2805
  }
2742
2806
  return i;
2743
2807
  }
2744
- function xe(e, t) {
2808
+ function Ie(e, t) {
2745
2809
  if (e == null) return {};
2746
2810
  var n = {};
2747
2811
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -2750,7 +2814,7 @@ function xe(e, t) {
2750
2814
  }
2751
2815
  return n;
2752
2816
  }
2753
- var Se = [
2817
+ var Le = [
2754
2818
  "bgColor",
2755
2819
  "bgD",
2756
2820
  "fgD",
@@ -2759,7 +2823,7 @@ var Se = [
2759
2823
  "title",
2760
2824
  "viewBoxSize",
2761
2825
  "xmlns"
2762
- ], Ce = {
2826
+ ], Re = {
2763
2827
  bgColor: G.default.oneOfType([G.default.object, G.default.string]).isRequired,
2764
2828
  bgD: G.default.string.isRequired,
2765
2829
  fgColor: G.default.oneOfType([G.default.object, G.default.string]).isRequired,
@@ -2768,24 +2832,24 @@ var Se = [
2768
2832
  title: G.default.string,
2769
2833
  viewBoxSize: G.default.number.isRequired,
2770
2834
  xmlns: G.default.string
2771
- }, we = /*#__PURE__*/ i(function(e, t) {
2772
- var n = e.bgColor, i = e.bgD, a = e.fgD, o = e.fgColor, s = e.size, c = e.title, l = e.viewBoxSize, u = e.xmlns, d = u === void 0 ? "http://www.w3.org/2000/svg" : u, f = be(e, Se);
2773
- return /*#__PURE__*/ r.createElement("svg", $({}, f, {
2835
+ }, ze = /*#__PURE__*/ o(function(e, t) {
2836
+ var n = e.bgColor, r = e.bgD, i = e.fgD, o = e.fgColor, s = e.size, c = e.title, l = e.viewBoxSize, u = e.xmlns, d = u === void 0 ? "http://www.w3.org/2000/svg" : u, f = Fe(e, Le);
2837
+ return /*#__PURE__*/ a.createElement("svg", $({}, f, {
2774
2838
  height: s,
2775
2839
  ref: t,
2776
2840
  viewBox: `0 0 ${l} ${l}`,
2777
2841
  width: s,
2778
2842
  xmlns: d
2779
- }), c ? /*#__PURE__*/ r.createElement("title", null, c) : null, /*#__PURE__*/ r.createElement("path", {
2780
- d: i,
2843
+ }), c ? /*#__PURE__*/ a.createElement("title", null, c) : null, /*#__PURE__*/ a.createElement("path", {
2844
+ d: r,
2781
2845
  fill: n
2782
- }), /*#__PURE__*/ r.createElement("path", {
2783
- d: a,
2846
+ }), /*#__PURE__*/ a.createElement("path", {
2847
+ d: i,
2784
2848
  fill: o
2785
2849
  }));
2786
2850
  });
2787
- we.displayName = "QRCodeSvg", we.propTypes = Ce;
2788
- var Te = [
2851
+ ze.displayName = "QRCodeSvg", ze.propTypes = Re;
2852
+ var Be = [
2789
2853
  "bgColor",
2790
2854
  "fgColor",
2791
2855
  "level",
@@ -2795,22 +2859,22 @@ var Te = [
2795
2859
  K.stringToBytes = function(e) {
2796
2860
  return Array.from(new TextEncoder().encode(e));
2797
2861
  };
2798
- var Ee = {
2862
+ var Ve = {
2799
2863
  bgColor: G.default.oneOfType([G.default.object, G.default.string]),
2800
2864
  fgColor: G.default.oneOfType([G.default.object, G.default.string]),
2801
2865
  level: G.default.string,
2802
2866
  size: G.default.number,
2803
2867
  value: G.default.string.isRequired
2804
- }, De = /*#__PURE__*/ i(function(e, t) {
2805
- var n = e.bgColor, i = n === void 0 ? "#FFFFFF" : n, a = e.fgColor, o = a === void 0 ? "#000000" : a, s = e.level, c = s === void 0 ? "L" : s, l = e.size, u = l === void 0 ? 256 : l, d = e.value, f = be(e, Te), p = K(0, c);
2868
+ }, He = /*#__PURE__*/ o(function(e, t) {
2869
+ var n = e.bgColor, r = n === void 0 ? "#FFFFFF" : n, i = e.fgColor, o = i === void 0 ? "#000000" : i, s = e.level, c = s === void 0 ? "L" : s, l = e.size, u = l === void 0 ? 256 : l, d = e.value, f = Fe(e, Be), p = K(0, c);
2806
2870
  p.addData(d), p.make();
2807
2871
  var m = p.getModuleCount(), h = Array.from({ length: m }, function(e, t) {
2808
2872
  return Array.from({ length: m }, function(e, n) {
2809
2873
  return p.isDark(t, n);
2810
2874
  });
2811
2875
  });
2812
- return /*#__PURE__*/ r.createElement(we, $({}, f, {
2813
- bgColor: i,
2876
+ return /*#__PURE__*/ a.createElement(ze, $({}, f, {
2877
+ bgColor: r,
2814
2878
  bgD: h.map(function(e, t) {
2815
2879
  return e.map(function(e, n) {
2816
2880
  return e ? "" : `M ${n} ${t} l 1 0 0 1 -1 0 Z`;
@@ -2827,124 +2891,125 @@ var Ee = {
2827
2891
  viewBoxSize: m
2828
2892
  }));
2829
2893
  });
2830
- De.displayName = "QRCode", De.propTypes = Ee;
2831
- var Oe = {
2894
+ He.displayName = "QRCode", He.propTypes = Ve;
2895
+ var Ue = {
2832
2896
  container: "_container_hzzl6_1",
2833
2897
  qrColor: "_qrColor_hzzl6_6"
2834
- }, ke = ({ value: n, labels: r, styles: i }) => {
2835
- let { colors: a } = i ?? {}, o = e({
2836
- "--qr-border": a?.borderColor,
2837
- "--qr-bg": a?.backgroundColor,
2838
- "--qr-color": a?.fillColor
2898
+ }, We = He, Ge = ({ value: t, labels: r, styles: i, svgRef: a }) => {
2899
+ let { colors: o } = i ?? {}, s = e({
2900
+ "--qr-border": o?.borderColor,
2901
+ "--qr-bg": o?.backgroundColor,
2902
+ "--qr-color": o?.fillColor
2839
2903
  });
2840
- return /* @__PURE__ */ E("div", {
2904
+ return /* @__PURE__ */ O("div", {
2841
2905
  role: "img",
2842
2906
  "aria-label": r.ariaLabel,
2843
- style: o,
2844
- className: t("flex size-40 items-center justify-center self-center rounded-lg border p-3", Oe.container),
2845
- children: /* @__PURE__ */ E(De, {
2846
- value: n,
2907
+ style: s,
2908
+ className: n("flex size-40 items-center justify-center self-center rounded-lg border p-3", Ue.container),
2909
+ children: /* @__PURE__ */ O(We, {
2910
+ ref: a,
2911
+ value: t,
2847
2912
  size: 128,
2848
2913
  bgColor: "transparent",
2849
2914
  fgColor: "currentColor",
2850
2915
  "aria-hidden": !0,
2851
- className: t("size-full", Oe.qrColor)
2916
+ className: n("size-full", Ue.qrColor)
2852
2917
  })
2853
2918
  });
2854
- }, Ae = ({ ariaLabel: e, skeletonColor: t = R.skeletonColor }) => /* @__PURE__ */ D("div", {
2919
+ }, Ke = ({ ariaLabel: e, skeletonColor: t = B.skeletonColor }) => /* @__PURE__ */ k("div", {
2855
2920
  role: "status",
2856
2921
  "aria-label": e,
2857
2922
  className: "flex flex-col gap-3",
2858
2923
  children: [
2859
- /* @__PURE__ */ D("div", {
2924
+ /* @__PURE__ */ k("div", {
2860
2925
  "aria-hidden": !0,
2861
2926
  className: "flex items-center gap-2.5",
2862
2927
  children: [
2863
- /* @__PURE__ */ E(_, {
2864
- variant: v.Circular,
2928
+ /* @__PURE__ */ O(v, {
2929
+ variant: y.Circular,
2865
2930
  width: 32,
2866
2931
  height: 32,
2867
2932
  color: t
2868
2933
  }),
2869
- /* @__PURE__ */ D("div", {
2934
+ /* @__PURE__ */ k("div", {
2870
2935
  className: "flex min-w-0 flex-1 flex-col gap-1.5",
2871
- children: [/* @__PURE__ */ E(_, {
2872
- variant: v.Text,
2936
+ children: [/* @__PURE__ */ O(v, {
2937
+ variant: y.Text,
2873
2938
  width: "70%",
2874
2939
  height: 16,
2875
2940
  color: t
2876
- }), /* @__PURE__ */ E(_, {
2877
- variant: v.Text,
2941
+ }), /* @__PURE__ */ O(v, {
2942
+ variant: y.Text,
2878
2943
  width: "45%",
2879
2944
  height: 12,
2880
2945
  color: t
2881
2946
  })]
2882
2947
  }),
2883
- /* @__PURE__ */ E(_, {
2884
- variant: v.Rectangular,
2948
+ /* @__PURE__ */ O(v, {
2949
+ variant: y.Rectangular,
2885
2950
  width: 92,
2886
2951
  height: 30,
2887
2952
  color: t
2888
2953
  })
2889
2954
  ]
2890
2955
  }),
2891
- /* @__PURE__ */ D("div", {
2956
+ /* @__PURE__ */ k("div", {
2892
2957
  "aria-hidden": !0,
2893
2958
  className: "flex flex-col gap-1.5",
2894
- children: [/* @__PURE__ */ E(_, {
2895
- variant: v.Text,
2959
+ children: [/* @__PURE__ */ O(v, {
2960
+ variant: y.Text,
2896
2961
  width: "100%",
2897
2962
  height: 12,
2898
2963
  color: t
2899
- }), /* @__PURE__ */ E(_, {
2900
- variant: v.Text,
2964
+ }), /* @__PURE__ */ O(v, {
2965
+ variant: y.Text,
2901
2966
  width: "60%",
2902
2967
  height: 12,
2903
2968
  color: t
2904
2969
  })]
2905
2970
  }),
2906
- /* @__PURE__ */ E(_, {
2971
+ /* @__PURE__ */ O(v, {
2907
2972
  "aria-hidden": !0,
2908
- variant: v.Rectangular,
2973
+ variant: y.Rectangular,
2909
2974
  width: "100%",
2910
2975
  height: 40,
2911
2976
  color: t
2912
2977
  }),
2913
- /* @__PURE__ */ E(_, {
2978
+ /* @__PURE__ */ O(v, {
2914
2979
  "aria-hidden": !0,
2915
- variant: v.Text,
2980
+ variant: y.Text,
2916
2981
  width: "50%",
2917
2982
  height: 12,
2918
2983
  color: t
2919
2984
  })
2920
2985
  ]
2921
- }), je = "share-popover-qr-button", Me = "share-popover-back-button", Ne = ({ title: e, view: n, qrButtonLabel: r, linkLabel: i, onViewChange: a, titleClassName: o = "dial-h3-text" }) => /* @__PURE__ */ D("div", {
2986
+ }), qe = "share-popover-qr-button", Je = "share-popover-back-button", Ye = ({ title: e, view: t, qrButtonLabel: r, linkLabel: i, onViewChange: a, titleClassName: o = "dial-h3-text" }) => /* @__PURE__ */ k("div", {
2922
2987
  className: "flex items-center gap-2",
2923
- children: [/* @__PURE__ */ E("span", {
2924
- className: t(o, R.title),
2988
+ children: [/* @__PURE__ */ O("span", {
2989
+ className: n(o, B.title),
2925
2990
  children: e
2926
- }), n === L.Link ? /* @__PURE__ */ E(f, {
2927
- id: je,
2991
+ }), t === z.Link ? /* @__PURE__ */ O(m, {
2992
+ id: qe,
2928
2993
  label: r,
2929
- iconBefore: /* @__PURE__ */ E(C, {
2930
- size: l.SM,
2994
+ iconBefore: /* @__PURE__ */ O(T, {
2995
+ size: d.SM,
2931
2996
  "aria-hidden": !0,
2932
- stroke: u
2997
+ stroke: f
2933
2998
  }),
2934
2999
  className: "ms-auto",
2935
- onClick: () => a(L.Qr)
2936
- }) : /* @__PURE__ */ E(f, {
2937
- id: Me,
3000
+ onClick: () => a(z.Qr)
3001
+ }) : /* @__PURE__ */ O(m, {
3002
+ id: Je,
2938
3003
  label: i,
2939
- iconBefore: /* @__PURE__ */ E(S, {
2940
- size: l.SM,
3004
+ iconBefore: /* @__PURE__ */ O(w, {
3005
+ size: d.SM,
2941
3006
  "aria-hidden": !0,
2942
- stroke: u
3007
+ stroke: f
2943
3008
  }),
2944
3009
  className: "ms-auto",
2945
- onClick: () => a(L.Link)
3010
+ onClick: () => a(z.Link)
2946
3011
  })]
2947
- }), Pe = a(({ url: r, isLoading: i, error: a, access: l, canEditAccess: u, onAccessChange: d, onClose: f, labels: p, className: m, styles: h }) => {
3012
+ }), Xe = s(({ url: t, isLoading: r, error: a, access: o, canEditAccess: s, onAccessChange: d, onClose: f, labels: p, className: m, styles: h }) => {
2948
3013
  let g = h?.colors, _ = h?.typography, v = e({
2949
3014
  "--shp-access-trigger-bg": g?.accessTriggerBackground,
2950
3015
  "--shp-access-trigger-border": g?.accessTriggerBorder,
@@ -2957,131 +3022,128 @@ var Oe = {
2957
3022
  "--shp-anyone-title": g?.anyoneTitle,
2958
3023
  "--shp-anyone-subtitle": g?.anyoneSubtitle,
2959
3024
  "--shp-access-chevron": g?.accessChevron,
2960
- "--shp-menu-item-label": g?.menuItemLabel,
2961
3025
  "--shp-link-row-bg": g?.linkRowBackground,
2962
3026
  "--shp-link-text": g?.linkText,
2963
3027
  "--shp-error-text": g?.errorText,
2964
3028
  "--shp-note-text": g?.noteText,
2965
3029
  "--shp-divider": g?.divider,
2966
3030
  "--shp-skeleton-color": g?.skeletonColor
2967
- }), { title: y = "Share", qrButtonLabel: b = "QR", linkLabel: x = "Link", anyoneWithLinkTitle: S = "Anyone with the link", anyoneWithLinkSubtitle: C = "in your organization", accessAriaLabel: w = "Link access level", accessViewLabel: O = "Can view", accessEditLabel: k = "Can edit", visibilityNote: A = "This deployment and its updates will be visible to users with the link.", visibilityNoteEdit: j = "Anyone with the link will be able to view and edit this deployment.", copyButtonLabel: M = "Copy", copiedButtonLabel: N = "Copied", linkAriaLabel: P = "Share link", expiryNote: F, qrCodeAriaLabel: ee = "QR code for the share link", loadingLabel: te = "Creating share link…", errorTitle: oe = "Couldn’t create the share link. Please try again.", nestedItemsNote: z } = p ?? {}, [B, V] = c(L.Link), { isCopied: H, copy: U } = n(r ?? ""), [W, se] = c(!1), ce = s(null), G = s(null), K = (e) => {
2968
- se(e), e || ce.current?.focus();
2969
- };
2970
- o(() => {
2971
- W && G.current?.querySelector("[aria-checked=\"true\"]")?.focus();
2972
- }, [W]);
2973
- let q = s(null);
2974
- o(() => {
2975
- re(q.current);
3031
+ }), y = e({ "--shp-menu-item-label": g?.menuItemLabel }), { title: b = "Share", qrButtonLabel: x = "QR", linkLabel: S = "Link", anyoneWithLinkTitle: C = "Anyone with the link", anyoneWithLinkSubtitle: w = "in your organization", accessAriaLabel: T = "Link access level", accessViewLabel: E = "Can view", accessEditLabel: A = "Can edit", visibilityNote: j = "This deployment and its updates will be visible to users with the link.", visibilityNoteEdit: M = "Anyone with the link will be able to view and edit this deployment.", copyButtonLabel: N = "Copy", copiedButtonLabel: P = "Copied", linkAriaLabel: F = "Share link", expiryNote: I, qrCodeAriaLabel: L = "QR code for the share link", qrCopyButtonLabel: ee = "Copy", qrCopiedButtonLabel: ne = "Copied", qrDownloadButtonLabel: se = "Download", qrDownloadFileName: ce = "share-qr-code.png", loadingLabel: le = "Creating share link…", errorTitle: ue = "Couldn’t create the share link. Please try again.", nestedItemsNote: de } = p ?? {}, [V, fe] = u(z.Link), { isCopied: pe, copy: me } = i(t ?? ""), he = l(null), [ge, ve] = u(!1), ye = l(null), H = (e) => {
3032
+ ve(e), e || ye.current?.focus();
3033
+ }, U = l(null);
3034
+ c(() => {
3035
+ ie(U.current);
2976
3036
  let e = setTimeout(() => {
2977
- q.current?.contains(document.activeElement) || re(q.current);
3037
+ U.current?.contains(document.activeElement) || ie(U.current);
2978
3038
  }, 0);
2979
3039
  return () => clearTimeout(e);
2980
3040
  }, []);
2981
- let J = s(!0);
2982
- o(() => {
2983
- if (J.current) {
2984
- J.current = !1;
3041
+ let W = l(!0);
3042
+ c(() => {
3043
+ if (W.current) {
3044
+ W.current = !1;
2985
3045
  return;
2986
3046
  }
2987
- let e = B === L.Qr ? Me : je;
3047
+ let e = V === z.Qr ? Je : qe;
2988
3048
  document.getElementById(e)?.focus();
2989
- }, [B]);
2990
- let Y = (e) => {
2991
- let t = W ? Array.from(G.current?.querySelectorAll("[role=\"menuitemradio\"]") ?? []) : ne(q.current);
2992
- if (t.length === 0) return;
3049
+ }, [V]);
3050
+ let be = (e) => {
3051
+ let t = e.target.closest("[role=\"menu\"]"), n = t ? Array.from(t.querySelectorAll("[role=\"menuitemradio\"]")) : re(U.current);
3052
+ if (n.length === 0) return;
2993
3053
  e.preventDefault();
2994
- let n = t.indexOf(document.activeElement), r = e.shiftKey ? -1 : 1;
2995
- t[n === -1 ? 0 : (n + r + t.length) % t.length]?.focus();
3054
+ let r = n.indexOf(document.activeElement), i = e.shiftKey ? -1 : 1;
3055
+ n[r === -1 ? 0 : (r + i + n.length) % n.length]?.focus();
2996
3056
  };
2997
- return /* @__PURE__ */ D("div", {
2998
- ref: q,
3057
+ return /* @__PURE__ */ k("div", {
3058
+ ref: U,
2999
3059
  role: "dialog",
3000
- "aria-label": y,
3060
+ "aria-label": b,
3001
3061
  tabIndex: -1,
3002
3062
  style: v,
3003
- className: t("flex w-96 flex-col gap-3 rounded-xl bg-layer-raised px-6 pb-6 pt-4 shadow-lg outline-none", m),
3063
+ className: n("flex w-96 flex-col gap-3 rounded-xl bg-layer-raised px-6 pb-6 pt-4 shadow-lg outline-none", m, te.popover),
3004
3064
  onKeyDownCapture: (e) => {
3005
3065
  if (e.key === "Tab") {
3006
- Y(e);
3066
+ be(e);
3007
3067
  return;
3008
3068
  }
3009
3069
  if (e.key === "Escape") {
3010
- if (e.stopPropagation(), W) {
3011
- e.preventDefault(), K(!1);
3070
+ if (e.stopPropagation(), ge) {
3071
+ e.preventDefault(), H(!1);
3012
3072
  return;
3013
3073
  }
3014
- B === L.Qr ? (e.preventDefault(), V(L.Link)) : f();
3074
+ V === z.Qr ? (e.preventDefault(), fe(z.Link)) : f();
3015
3075
  }
3016
3076
  },
3017
3077
  children: [
3018
- /* @__PURE__ */ E(Ne, {
3019
- title: y,
3020
- view: B,
3021
- qrButtonLabel: b,
3022
- linkLabel: x,
3023
- onViewChange: V
3078
+ /* @__PURE__ */ O(Ye, {
3079
+ title: b,
3080
+ view: V,
3081
+ qrButtonLabel: x,
3082
+ linkLabel: S,
3083
+ onViewChange: fe
3024
3084
  }),
3025
- /* @__PURE__ */ E("div", { className: t("-mt-1.5 h-px w-full", R.divider) }),
3026
- i && /* @__PURE__ */ E(Ae, {
3027
- ariaLabel: te,
3085
+ /* @__PURE__ */ O("div", { className: n("-mt-1.5 h-px w-full", B.divider) }),
3086
+ r && /* @__PURE__ */ O(Ke, {
3087
+ ariaLabel: le,
3028
3088
  skeletonColor: g?.skeletonColor
3029
3089
  }),
3030
- !i && a != null && /* @__PURE__ */ E("p", {
3090
+ !r && a != null && /* @__PURE__ */ O("p", {
3031
3091
  role: "alert",
3032
- className: t(_?.errorClassName ?? "dial-tiny-text", "py-6 text-center", R.errorText),
3033
- children: oe
3092
+ className: n(_?.errorClassName ?? "dial-tiny-text", "py-6 text-center", B.errorText),
3093
+ children: ue
3034
3094
  }),
3035
- !i && a == null && r != null && /* @__PURE__ */ D(T, { children: [
3036
- /* @__PURE__ */ E(ie, {
3037
- anyoneWithLinkTitle: S,
3038
- anyoneWithLinkSubtitle: C,
3039
- access: l,
3040
- canEditAccess: u,
3041
- accessViewLabel: O,
3042
- accessEditLabel: k,
3043
- accessAriaLabel: w,
3044
- isOpen: W,
3045
- onOpenChange: K,
3095
+ !r && a == null && t != null && /* @__PURE__ */ k(D, { children: [
3096
+ /* @__PURE__ */ O(ae, {
3097
+ anyoneWithLinkTitle: C,
3098
+ anyoneWithLinkSubtitle: w,
3099
+ access: o,
3100
+ canEditAccess: s,
3101
+ accessViewLabel: E,
3102
+ accessEditLabel: A,
3103
+ accessAriaLabel: T,
3104
+ isOpen: ge,
3105
+ onOpenChange: H,
3046
3106
  onAccessChange: d,
3047
- onMenuKeyDown: (e) => {
3048
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
3049
- e.preventDefault();
3050
- let t = Array.from(G.current?.querySelectorAll("[role=\"menuitemradio\"]") ?? []);
3051
- t.length !== 0 && t[(t.indexOf(document.activeElement) + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus();
3052
- },
3053
- triggerRef: ce,
3054
- menuRef: G,
3107
+ menuStyle: y,
3108
+ triggerRef: ye,
3055
3109
  titleClassName: _?.anyoneTitleClassName,
3056
3110
  subtitleClassName: _?.anyoneSubtitleClassName,
3057
3111
  accessTriggerLabelClassName: _?.accessTriggerLabelClassName
3058
3112
  }),
3059
- /* @__PURE__ */ E("p", {
3060
- className: t(_?.noteClassName ?? "dial-tiny-text", R.note),
3061
- children: u && l.includes(I.Edit) ? j : A
3113
+ /* @__PURE__ */ O("p", {
3114
+ className: n(_?.noteClassName ?? "dial-tiny-text", B.note),
3115
+ children: s && o.includes(R.Edit) ? M : j
3062
3116
  }),
3063
- z != null && /* @__PURE__ */ E("p", {
3064
- className: t(_?.nestedItemsNoteClassName ?? "dial-tiny-semi-text", R.note),
3065
- children: z
3117
+ de != null && /* @__PURE__ */ O("p", {
3118
+ className: n(_?.nestedItemsNoteClassName ?? "dial-tiny-semi-text", B.note),
3119
+ children: de
3066
3120
  }),
3067
- B === L.Qr ? /* @__PURE__ */ E(ke, {
3068
- value: r,
3069
- labels: { ariaLabel: ee }
3070
- }) : /* @__PURE__ */ E(ae, {
3071
- url: r,
3072
- linkAriaLabel: P,
3073
- isCopied: H,
3074
- copyButtonLabel: M,
3075
- copiedButtonLabel: N,
3076
- onCopy: U
3121
+ V === z.Qr ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(Ge, {
3122
+ value: t,
3123
+ labels: { ariaLabel: L },
3124
+ svgRef: he
3125
+ }), /* @__PURE__ */ O(_e, {
3126
+ url: t,
3127
+ getSvg: () => he.current,
3128
+ copyLabel: ee,
3129
+ copiedLabel: ne,
3130
+ downloadLabel: se,
3131
+ downloadFileName: ce
3132
+ })] }) : /* @__PURE__ */ O(oe, {
3133
+ url: t,
3134
+ linkAriaLabel: F,
3135
+ isCopied: pe,
3136
+ copyButtonLabel: N,
3137
+ copiedButtonLabel: P,
3138
+ onCopy: me
3077
3139
  }),
3078
- F != null && /* @__PURE__ */ E("p", {
3079
- className: t(_?.noteClassName ?? "dial-tiny-text", R.note),
3080
- children: F
3140
+ I != null && /* @__PURE__ */ O("p", {
3141
+ className: n(_?.noteClassName ?? "dial-tiny-text", B.note),
3142
+ children: I
3081
3143
  })
3082
3144
  ] })
3083
3145
  ]
3084
3146
  });
3085
3147
  });
3086
3148
  //#endregion
3087
- export { ke as QrCode, I as ShareLinkAccess, Pe as SharePopover, L as SharePopoverView };
3149
+ export { Ge as QrCode, te as SHARE_CLASS, R as ShareLinkAccess, Xe as SharePopover, z as SharePopoverView };