highsoft-ui 1.0.96 → 1.0.97

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.
@@ -1,19 +1,19 @@
1
- import { jsx as e, jsxs as c, Fragment as F } from "react/jsx-runtime";
2
- import { useRef as R, useState as E, useEffect as T } from "react";
3
- import { a as M, b as Y, J, c as X, z as Z } from "../../utils-BKDJp1i0.js";
4
- import { A as ee } from "../../Announcement03-obPaH4LK.js";
5
- import { _ as f } from "../../extends-hS2Bh-Yp.js";
6
- import { S as I, a as H } from "../../index-ClA5awl_.js";
7
- import { X as te } from "../../XClose-CCu1vrNS.js";
8
- import { c as _ } from "../../clsx-OuTLNxxd.js";
9
- import { Button as u } from "../Button/index.js";
10
- import { Container as D } from "../Container/index.js";
11
- import { Logo as O } from "../Logo/index.js";
12
- import { NewTag as ne } from "../NewTag/index.js";
13
- import { Notification as oe } from "../Notification/index.js";
14
- import { PrefPanel as P } from "../PrefPanel/index.js";
15
- var re = function(n) {
16
- return /* @__PURE__ */ e("svg", f({
1
+ import { jsx as e, jsxs as i, Fragment as ne } from "react/jsx-runtime";
2
+ import { useRef as U, useState as P, useEffect as W } from "react";
3
+ import { a as T, b as A, J as oe, c as re, z as se } from "../../utils-BKDJp1i0.js";
4
+ import { A as ie } from "../../Announcement03-obPaH4LK.js";
5
+ import { _ as p } from "../../extends-hS2Bh-Yp.js";
6
+ import { X as ce } from "../../XClose-CCu1vrNS.js";
7
+ import { c as x } from "../../clsx-OuTLNxxd.js";
8
+ import { Button as m } from "../Button/index.js";
9
+ import { Container as G } from "../Container/index.js";
10
+ import { Logo as j } from "../Logo/index.js";
11
+ import { NewTag as ae } from "../NewTag/index.js";
12
+ import { Notification as le } from "../Notification/index.js";
13
+ import { Search as $ } from "../Search/index.js";
14
+ import { PrefPanel as R } from "../PrefPanel/index.js";
15
+ var he = function(n) {
16
+ return /* @__PURE__ */ e("svg", p({
17
17
  xmlns: "http://www.w3.org/2000/svg",
18
18
  width: 24,
19
19
  height: 24,
@@ -28,8 +28,8 @@ var re = function(n) {
28
28
  d: "M6 11v4m12-6v4m-1-9c2.4487 0 3.7731.3748 4.4321.6654.0878.0388.1317.0581.2583.179.0759.0724.2145.285.2501.3837.0595.1646.0595.2546.0595.4346v10.7484c0 .9088 0 1.3632-.1363 1.5968-.1386.2375-.2723.348-.5318.4393-.255.0897-.7699-.0092-1.7997-.2071A13.45 13.45 0 0 0 17 18c-3 0-6 2-10 2-2.4487 0-3.7731-.3748-4.4321-.6654-.0878-.0388-.1317-.0581-.2583-.179-.076-.0724-.2145-.285-.2501-.3837C2 18.6073 2 18.5173 2 18.3373V7.5889c0-.9088 0-1.3632.1363-1.5968.1386-.2375.2723-.348.5318-.4393.255-.0898.77.0092 1.7997.207A13.44 13.44 0 0 0 7 6c3 0 6-2 10-2m-2.5 8c0 1.3807-1.1193 2.5-2.5 2.5S9.5 13.3807 9.5 12s1.1193-2.5 2.5-2.5 2.5 1.1193 2.5 2.5"
29
29
  })
30
30
  }));
31
- }, se = function(n) {
32
- return /* @__PURE__ */ e("svg", f({
31
+ }, de = function(n) {
32
+ return /* @__PURE__ */ e("svg", p({
33
33
  xmlns: "http://www.w3.org/2000/svg",
34
34
  width: 24,
35
35
  height: 24,
@@ -44,8 +44,24 @@ var re = function(n) {
44
44
  d: "M11 3H7.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.2798 3 6.1198 3 7.8v8.4c0 1.6802 0 2.5202.327 3.162a3 3 0 0 0 1.311 1.311C5.2798 21 6.1198 21 7.8 21h8.4c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.7202 21 17.8802 21 16.2V13m-9-5h4v4m-.5-8.5V2m3.9393 2.5607L20.5 3.5m.0103 5h1.5M3 13.3471c.652.1007 1.3199.1529 2 .1529 4.3864 0 8.2653-2.1724 10.6197-5.5"
45
45
  })
46
46
  }));
47
- }, ie = function(n) {
48
- return /* @__PURE__ */ e("svg", f({
47
+ }, F = function(n) {
48
+ return /* @__PURE__ */ e("svg", p({
49
+ xmlns: "http://www.w3.org/2000/svg",
50
+ width: 24,
51
+ height: 24,
52
+ fill: "none",
53
+ viewBox: "0 0 24 24"
54
+ }, n, {
55
+ children: /* @__PURE__ */ e("path", {
56
+ stroke: "currentColor",
57
+ strokeLinecap: "round",
58
+ strokeLinejoin: "round",
59
+ strokeWidth: 2,
60
+ d: "M13 5c0 1.1046-2.4624 2-5.5 2S2 6.1046 2 5m11 0c0-1.1046-2.4624-2-5.5-2S2 3.8954 2 5m11 0v1.5M2 5v12c0 1.1046 2.4624 2 5.5 2m0-8q-.2528 0-.5-.0082C4.1967 10.9 2 10.0433 2 9m5.5 6C4.4624 15 2 14.1046 2 13m20-1.5c0 1.1046-2.4624 2-5.5 2s-5.5-.8954-5.5-2m11 0c0-1.1046-2.4624-2-5.5-2s-5.5.8954-5.5 2m11 0V19c0 1.1046-2.4624 2-5.5 2s-5.5-.8954-5.5-2v-7.5m11 3.75c0 1.1046-2.4624 2-5.5 2s-5.5-.8954-5.5-2"
61
+ })
62
+ }));
63
+ }, me = function(n) {
64
+ return /* @__PURE__ */ e("svg", p({
49
65
  xmlns: "http://www.w3.org/2000/svg",
50
66
  width: 24,
51
67
  height: 24,
@@ -60,8 +76,8 @@ var re = function(n) {
60
76
  d: "M14 2.2695v4.1306c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.7599 8 15.0399 8 15.6 8h4.1305M16 13H8m8 4H8m2-8H8m6-7H8.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.2798 4 5.1198 4 6.8v10.4c0 1.6802 0 2.5202.327 3.162a3 3 0 0 0 1.311 1.311C6.2798 22 7.1198 22 8.8 22h6.4c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.7202 20 18.8802 20 17.2V8z"
61
77
  })
62
78
  }));
63
- }, ce = function(n) {
64
- return /* @__PURE__ */ e("svg", f({
79
+ }, ue = function(n) {
80
+ return /* @__PURE__ */ e("svg", p({
65
81
  xmlns: "http://www.w3.org/2000/svg",
66
82
  width: 24,
67
83
  height: 24,
@@ -76,8 +92,8 @@ var re = function(n) {
76
92
  d: "M3 12h12M3 6h18M3 18h18"
77
93
  })
78
94
  }));
79
- }, ae = function(n) {
80
- return /* @__PURE__ */ e("svg", f({
95
+ }, pe = function(n) {
96
+ return /* @__PURE__ */ e("svg", p({
81
97
  xmlns: "http://www.w3.org/2000/svg",
82
98
  width: 24,
83
99
  height: 24,
@@ -92,8 +108,8 @@ var re = function(n) {
92
108
  d: "M10 8.0022a2.2485 2.2485 0 0 1 2.501-1.4698 2.248 2.248 0 0 1 1.8682 2.2193c0 1.4989-2.2483 2.2483-2.2483 2.2483m.029 3h.01M7 18v2.3355c0 .5329 0 .7993.1092.9361a.5.5 0 0 0 .3913.1881c.1751-.0002.3832-.1666.7993-.4995l2.3854-1.9084c.4873-.3898.731-.5847 1.0023-.7233a3 3 0 0 1 .7617-.2672C12.7477 18 13.0597 18 13.6837 18H16.2c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 15.7202 21 14.8802 21 13.2V7.8c0-1.6802 0-2.5202-.327-3.162a3 3 0 0 0-1.311-1.311C18.7202 3 17.8802 3 16.2 3H7.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.2798 3 6.1198 3 7.8V14c0 .93 0 1.395.1022 1.7765a3 3 0 0 0 2.1213 2.1213C5.605 18 6.07 18 7 18"
93
109
  })
94
110
  }));
95
- }, le = function(n) {
96
- return /* @__PURE__ */ e("svg", f({
111
+ }, we = function(n) {
112
+ return /* @__PURE__ */ e("svg", p({
97
113
  xmlns: "http://www.w3.org/2000/svg",
98
114
  width: 24,
99
115
  height: 24,
@@ -108,8 +124,8 @@ var re = function(n) {
108
124
  d: "M12 16v5m6 0-3.9514-3.2928c-.7288-.6074-1.0932-.911-1.4999-1.0271a2 2 0 0 0-1.0974 0c-.4067.1161-.7711.4197-1.4999 1.0271L6 21m2-10v1m4-3v3m4-5v5m6-9H2m1 0h18v8.2c0 1.6802 0 2.5202-.327 3.162a3 3 0 0 1-1.311 1.311C18.7202 16 17.8802 16 16.2 16H7.8c-1.6802 0-2.5202 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 13.7202 3 12.8802 3 11.2z"
109
125
  })
110
126
  }));
111
- }, W = function(n) {
112
- return /* @__PURE__ */ e("svg", f({
127
+ }, D = function(n) {
128
+ return /* @__PURE__ */ e("svg", p({
113
129
  xmlns: "http://www.w3.org/2000/svg",
114
130
  width: 24,
115
131
  height: 24,
@@ -124,8 +140,8 @@ var re = function(n) {
124
140
  d: "M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.7342 4.5089c-.282.7332-.423 1.0998-.6423 1.4082a3 3 0 0 1-.7064.7064c-.3084.2193-.675.3603-1.4082.6423L4 12l4.5089 1.7342c.7332.282 1.0998.423 1.4082.6423.2733.1943.5121.4331.7064.7064.2193.3084.3603.675.6423 1.4082L13 21l1.7342-4.5089c.282-.7332.423-1.0998.6423-1.4082a3 3 0 0 1 .7064-.7064c.3084-.2193.675-.3603 1.4082-.6423L22 12l-4.5089-1.7342c-.7332-.282-1.0998-.423-1.4082-.6423a3 3 0 0 1-.7064-.7064c-.2193-.3084-.3603-.675-.6423-1.4082z"
125
141
  })
126
142
  }));
127
- }, $ = function(n) {
128
- return /* @__PURE__ */ e("svg", f({
143
+ }, V = function(n) {
144
+ return /* @__PURE__ */ e("svg", p({
129
145
  xmlns: "http://www.w3.org/2000/svg",
130
146
  width: 24,
131
147
  height: 24,
@@ -141,141 +157,143 @@ var re = function(n) {
141
157
  })
142
158
  }));
143
159
  };
144
- const he = "m_QBtq_buttons", de = "m_QBtq_container", me = "m_QBtq_gpt", ue = "m_QBtq_header", pe = "m_QBtq_icon", we = "m_QBtq_icons", fe = "m_QBtq_links", ge = "m_QBtq_logo", ve = "m_QBtq_main", Ce = "m_QBtq_menu", ke = "m_QBtq_mobile", _e = "m_QBtq_mobileOverlay", xe = "m_QBtq_open", be = "m_QBtq_outer", Be = "m_QBtq_selectableIcon", Ne = "m_QBtq_selected", ye = "m_QBtq_selectedIcon", Se = "m_QBtq_skip", qe = "m_QBtq_sub", Me = "m_QBtq_subContainer", Te = "m_QBtq_subTitle", o = {
145
- buttons: he,
146
- container: de,
147
- gpt: me,
148
- header: ue,
149
- icon: pe,
150
- icons: we,
151
- links: fe,
152
- logo: ge,
153
- main: ve,
154
- menu: Ce,
155
- mobile: ke,
156
- mobileOverlay: _e,
157
- open: xe,
158
- outer: be,
159
- selectableIcon: Be,
160
- selected: Ne,
161
- selectedIcon: ye,
162
- skip: Se,
163
- sub: qe,
164
- subContainer: Me,
165
- subTitle: Te
166
- }, G = "notifications", V = "theme", Qe = 365 * 20, Le = (t) => /^\d{1,3}(?:\.\d{1,3}){3}$/.test(t), Ee = () => {
160
+ const fe = "m_QBtq_buttons", ge = "m_QBtq_container", ve = "m_QBtq_content", ke = "m_QBtq_cta", Ce = "m_QBtq_gpt", _e = "m_QBtq_header", xe = "m_QBtq_icon", be = "m_QBtq_icons", Be = "m_QBtq_links", Ne = "m_QBtq_logo", ye = "m_QBtq_main", qe = "m_QBtq_menu", Se = "m_QBtq_mobile", Me = "m_QBtq_mobileOverlay", Qe = "m_QBtq_open", Te = "m_QBtq_outer", Ee = "m_QBtq_selectableIcon", He = "m_QBtq_selected", Le = "m_QBtq_selectedIcon", Ie = "m_QBtq_skip", Oe = "m_QBtq_sub", Pe = "m_QBtq_subContainer", We = "m_QBtq_subTitle", o = {
161
+ buttons: fe,
162
+ container: ge,
163
+ content: ve,
164
+ cta: ke,
165
+ gpt: Ce,
166
+ header: _e,
167
+ icon: xe,
168
+ icons: be,
169
+ links: Be,
170
+ logo: Ne,
171
+ main: ye,
172
+ menu: qe,
173
+ mobile: Se,
174
+ mobileOverlay: Me,
175
+ open: Qe,
176
+ outer: Te,
177
+ selectableIcon: Ee,
178
+ selected: He,
179
+ selectedIcon: Le,
180
+ skip: Ie,
181
+ sub: Oe,
182
+ subContainer: Pe,
183
+ subTitle: We
184
+ }, Y = "notifications", J = "theme", Ae = 365 * 20, je = (t) => /^\d{1,3}(?:\.\d{1,3}){3}$/.test(t), $e = () => {
167
185
  if (typeof window > "u") return;
168
186
  const t = window.location.hostname;
169
- if (!t || t === "localhost" || Le(t))
187
+ if (!t || t === "localhost" || je(t))
170
188
  return;
171
- const n = t.replace(/^www\./, ""), h = n.split(".");
172
- return h.length <= 2 ? `.${n}` : `.${h.slice(-2).join(".")}`;
173
- }, j = () => {
189
+ const n = t.replace(/^www\./, ""), l = n.split(".");
190
+ return l.length <= 2 ? `.${n}` : `.${l.slice(-2).join(".")}`;
191
+ }, z = () => {
174
192
  if (typeof document > "u") return null;
175
- const t = document.cookie.split("; ").find((n) => n.startsWith(`${G}=`));
193
+ const t = document.cookie.split("; ").find((n) => n.startsWith(`${Y}=`));
176
194
  if (!t) return null;
177
195
  try {
178
196
  return JSON.parse(decodeURIComponent(t.split("=")[1]));
179
197
  } catch {
180
198
  return null;
181
199
  }
182
- }, Ie = () => {
200
+ }, Re = () => {
183
201
  if (typeof document > "u") return null;
184
- const t = document.cookie.split("; ").find((n) => n.startsWith(`${V}=`));
202
+ const t = document.cookie.split("; ").find((n) => n.startsWith(`${J}=`));
185
203
  if (!t) return null;
186
204
  try {
187
205
  return decodeURIComponent(t.split("=")[1]);
188
206
  } catch {
189
207
  return null;
190
208
  }
191
- }, z = (t, n) => {
209
+ }, X = (t, n) => {
192
210
  if (typeof document > "u") return;
193
- const h = new Date(
194
- Date.now() + Qe * 24 * 60 * 60 * 1e3
195
- ).toUTCString(), s = Ee(), a = [
211
+ const l = new Date(
212
+ Date.now() + Ae * 24 * 60 * 60 * 1e3
213
+ ).toUTCString(), s = $e(), a = [
196
214
  `${t}=${encodeURIComponent(n)}`,
197
215
  "path=/",
198
216
  "SameSite=Lax",
199
- `expires=${h}`
217
+ `expires=${l}`
200
218
  ];
201
219
  s && a.push(`domain=${s}`), document.cookie = a.join("; ");
202
- }, A = [
220
+ }, K = [
203
221
  {
204
222
  title: "Products",
205
223
  url: "https://www.highcharts.com/products/",
206
- icon: /* @__PURE__ */ e(se, {})
224
+ icon: /* @__PURE__ */ e(de, {})
207
225
  },
208
226
  {
209
227
  title: "Demos",
210
228
  url: "https://www.highcharts.com/demo",
211
- icon: /* @__PURE__ */ e(le, {})
229
+ icon: /* @__PURE__ */ e(we, {})
212
230
  },
213
231
  {
214
232
  title: "Support",
215
233
  url: "https://www.highcharts.com/support/",
216
- icon: /* @__PURE__ */ e(ae, {})
234
+ icon: /* @__PURE__ */ e(pe, {})
217
235
  },
218
236
  {
219
237
  title: "Resources",
220
238
  url: "https://www.highcharts.com/resources/",
221
- icon: /* @__PURE__ */ e(ie, {})
239
+ icon: /* @__PURE__ */ e(me, {})
222
240
  },
223
241
  {
224
242
  title: "Pricing",
225
243
  url: "https://shop.highcharts.com/",
226
- icon: /* @__PURE__ */ e(re, {})
244
+ icon: /* @__PURE__ */ e(he, {})
227
245
  },
228
246
  {
229
247
  title: "Blog",
230
248
  url: "https://www.highcharts.com/blog/home/",
231
- icon: /* @__PURE__ */ e(ee, {})
249
+ icon: /* @__PURE__ */ e(ie, {})
232
250
  }
233
251
  ];
234
- function m(t, n) {
252
+ function d(t, n) {
235
253
  return n ? t.replace(n, "") : t;
236
254
  }
237
- function He({
255
+ function Fe({
238
256
  items: t,
239
257
  link: n = "a",
240
- host: h = "https://www.highcharts.com",
258
+ host: l = "https://www.highcharts.com",
241
259
  pathname: s
242
260
  }) {
243
- const a = X();
244
- return /* @__PURE__ */ e("div", { className: _(o.sub, o.outer), children: /* @__PURE__ */ e(D, { className: o.subContainer, as: "ul", children: t.map(
261
+ const a = re();
262
+ return /* @__PURE__ */ e("div", { className: x(o.sub, o.outer), children: /* @__PURE__ */ e(G, { className: o.subContainer, as: "ul", children: t.map(
245
263
  ({
246
- title: y,
247
- url: v,
248
- prefixMatch: x,
249
- icon: S,
250
- selectedIcon: b,
251
- tag: g,
264
+ title: S,
265
+ url: f,
266
+ prefixMatch: b,
267
+ icon: B,
268
+ selectedIcon: N,
269
+ tag: y,
252
270
  tagVariant: w = "success"
253
- }, q) => {
254
- const p = s || typeof window < "u" && window.location.pathname, C = typeof window < "u" && window.location.origin || "http://example.com", k = new URL(v, C), B = p && (!!s || a) && k.origin === C && (x ? p.startsWith(k.pathname) : k.pathname === p);
255
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
271
+ }, M) => {
272
+ const u = s || typeof window < "u" && window.location.pathname, g = typeof window < "u" && window.location.origin || "http://example.com", v = new URL(f, g), q = u && (!!s || a) && v.origin === g && (b ? u.startsWith(v.pathname) : v.pathname === u);
273
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
256
274
  n,
257
275
  {
258
- href: m(v, h),
259
- className: _({
260
- [o.selectableIcon]: b,
261
- [o.selected]: B
276
+ href: d(f, l),
277
+ className: x({
278
+ [o.selectableIcon]: N,
279
+ [o.selected]: q
262
280
  }),
263
281
  children: [
264
- /* @__PURE__ */ c("span", { className: o.icons, children: [
265
- /* @__PURE__ */ e("span", { className: o.selectedIcon, children: b }),
266
- /* @__PURE__ */ e("span", { className: o.icon, children: S })
282
+ /* @__PURE__ */ i("span", { className: o.icons, children: [
283
+ /* @__PURE__ */ e("span", { className: o.selectedIcon, children: N }),
284
+ /* @__PURE__ */ e("span", { className: o.icon, children: B })
267
285
  ] }),
268
- /* @__PURE__ */ c("span", { className: o.subTitle, children: [
269
- y,
270
- g && /* @__PURE__ */ e(ne, { variant: w, icon: !1 })
286
+ /* @__PURE__ */ i("span", { className: o.subTitle, children: [
287
+ S,
288
+ y && /* @__PURE__ */ e(ae, { variant: w, icon: !1 })
271
289
  ] })
272
290
  ]
273
291
  }
274
- ) }, q);
292
+ ) }, M);
275
293
  }
276
294
  ) }) });
277
295
  }
278
- const Oe = [
296
+ const De = [
279
297
  {
280
298
  id: "whats-new",
281
299
  content: [
@@ -300,276 +318,286 @@ const Oe = [
300
318
  ]
301
319
  }
302
320
  ];
303
- function Pe() {
304
- const { theme: t, setTheme: n } = Z(), h = R(!1);
305
- return T(() => {
306
- if (h.current) return;
307
- const s = Ie();
321
+ function Ve() {
322
+ const { theme: t, setTheme: n } = se(), l = U(!1);
323
+ return W(() => {
324
+ if (l.current) return;
325
+ const s = Re();
308
326
  if (s && s !== t) {
309
- n(s), h.current = !0;
327
+ n(s), l.current = !0;
310
328
  return;
311
329
  }
312
- h.current = !0;
313
- }, [n, t]), T(() => {
314
- t && z(V, t);
330
+ l.current = !0;
331
+ }, [n, t]), W(() => {
332
+ t && X(J, t);
315
333
  }, [t]), null;
316
334
  }
317
- function Xe({
335
+ function it({
318
336
  subItems: t,
319
337
  children: n,
320
- notifications: h = Oe,
338
+ notifications: l = De,
321
339
  // TODO: Fetch these from the internets
322
340
  link: s = "a",
323
341
  host: a = "https://www.highcharts.com",
324
- pathname: y,
325
- cssVariable: v
342
+ pathname: S,
343
+ cssVariable: f
326
344
  }) {
327
- const x = M("(max-width: 374px)"), S = M("(max-width: 849px)"), b = M("(min-width: 850px) and (max-width: 999px)"), g = R(null), [w, q] = E(!1), [p, C] = E([]);
328
- T(() => {
329
- let r = window.scrollY;
330
- const i = 82 + p.length * 48 + (t?.length ? 72 : 0), d = -(82 + p.length * 48);
331
- let l = d, N = l;
332
- g.current && (g.current.style.top = `${l}px`), v && document.documentElement.style.setProperty(
333
- "--header-bottom",
334
- `${i + l}px`
335
- );
336
- const Q = () => {
337
- const L = window.scrollY, U = L - r;
338
- l -= U, l < d ? l = d : l > 0 && (l = 0), g.current && l !== N && (g.current.style.top = `${l}px`, v && document.documentElement.style.setProperty(
345
+ const b = T("(max-width: 374px)"), B = T("(max-width: 849px)"), N = T("(max-width: 1300px)"), y = U(null), [w, M] = P(!1), [u, g] = P([]);
346
+ A(() => {
347
+ const r = y.current;
348
+ if (!r) return;
349
+ const c = 48, h = 82, C = t?.length ? 72 : 0, Q = h + u.length * c + C, ee = -(h + u.length * c);
350
+ let E = window.scrollY, k = 0, H = null, _ = null;
351
+ const L = () => {
352
+ _ = null, !(!r || H === k) && (r.style.transform = `translate3d(0, ${k}px, 0)`, f && document.documentElement.style.setProperty(
339
353
  "--header-bottom",
340
- `${i + l}px`
341
- )), r = L, N = l;
354
+ `${Q + k}px`
355
+ ), H = k);
342
356
  };
343
- return window.addEventListener("scroll", Q), () => window.removeEventListener("scroll", Q);
344
- }, [v, p.length]), Y(() => {
345
- if (!h.length) return;
346
- const r = j();
347
- C(
348
- r ? h.filter(
349
- (i) => !i.id || !r.closed.includes(i.id)
350
- ) : h
357
+ L();
358
+ const I = () => {
359
+ const O = window.scrollY, te = O - E;
360
+ E = O, k = Math.min(0, Math.max(ee, k - te)), _ === null && (_ = window.requestAnimationFrame(L));
361
+ };
362
+ return window.addEventListener("scroll", I, { passive: !0 }), () => {
363
+ window.removeEventListener("scroll", I), _ !== null && cancelAnimationFrame(_), r.style.transform = "", f && document.documentElement.style.removeProperty("--header-bottom");
364
+ };
365
+ }, [f, u.length, t?.length]), A(() => {
366
+ if (!l.length) return;
367
+ const r = z();
368
+ g(
369
+ r ? l.filter(
370
+ (c) => !c.id || !r.closed.includes(c.id)
371
+ ) : l
351
372
  );
352
- }, [a, h]);
353
- const k = (r) => {
373
+ }, [a, l]);
374
+ const v = (r) => {
354
375
  if (r.preventDefault(), !(r.nativeEvent instanceof KeyboardEvent) || r.nativeEvent.code === "Enter" || r.nativeEvent.code === "Space") {
355
- const i = document.querySelector("main");
356
- i && (i.scrollIntoView(), i.getAttribute("tabindex") !== "-1" && i.setAttribute("tabindex", "-1"), i.focus());
376
+ const c = document.querySelector("main");
377
+ c && (c.scrollIntoView(), c.getAttribute("tabindex") !== "-1" && c.setAttribute("tabindex", "-1"), c.focus());
357
378
  }
358
- }, B = () => {
359
- q(!w);
360
- }, K = (r) => {
361
- if (C(p.filter((d) => !d.id || d.id !== r)), !r) return;
362
- const i = j() ?? {
379
+ }, q = () => {
380
+ M(!w);
381
+ }, Z = (r) => {
382
+ if (g(u.filter((h) => !h.id || h.id !== r)), !r) return;
383
+ const c = z() ?? {
363
384
  closed: []
364
385
  };
365
- i.closed.includes(r) || z(
366
- G,
386
+ c.closed.includes(r) || X(
387
+ Y,
367
388
  JSON.stringify({
368
- closed: [...i.closed, r]
389
+ closed: [...c.closed, r]
369
390
  })
370
391
  );
371
392
  };
372
- return /* @__PURE__ */ c(J, { children: [
373
- /* @__PURE__ */ e(Pe, {}),
374
- /* @__PURE__ */ c("header", { className: o.header, ref: g, children: [
375
- p?.map(({ id: r, content: i, variant: d, closable: l }, N) => /* @__PURE__ */ e(
376
- oe,
377
- {
378
- id: r,
379
- content: i,
380
- variant: d,
381
- closable: l,
382
- onClose: () => K(r)
383
- },
384
- N
385
- )),
386
- /* @__PURE__ */ e("div", { className: _(o.main, o.outer), children: /* @__PURE__ */ c(D, { as: "nav", className: o.container, children: [
387
- /* @__PURE__ */ e(
388
- u,
393
+ return /* @__PURE__ */ i(oe, { children: [
394
+ /* @__PURE__ */ e(Ve, {}),
395
+ /* @__PURE__ */ i("header", { className: o.header, children: [
396
+ /* @__PURE__ */ i("div", { className: o.content, ref: y, children: [
397
+ u?.map(({ id: r, content: c, variant: h, closable: C }, Q) => /* @__PURE__ */ e(
398
+ le,
389
399
  {
390
- as: "a",
391
- className: o.skip,
392
- size: 500,
393
- tabIndex: "0",
394
- onClick: k,
395
- onKeyPress: k,
396
- children: "Skip to content"
397
- }
398
- ),
399
- /* @__PURE__ */ e(
400
- s,
401
- {
402
- className: o.logo,
403
- href: m("https://www.highcharts.com/", a),
404
- children: /* @__PURE__ */ e(O, { showText: !b && !x })
405
- }
406
- ),
407
- /* @__PURE__ */ e("ul", { className: o.links, children: A.map(({ title: r, url: i }, d) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
408
- u,
409
- {
410
- variant: "plain",
411
- size: 300,
412
- as: s,
413
- href: m(i, a),
414
- children: r
415
- }
416
- ) }, d)) }),
417
- /* @__PURE__ */ c("div", { className: o.buttons, children: [
418
- /* @__PURE__ */ c(
419
- u,
400
+ id: r,
401
+ content: c,
402
+ variant: h,
403
+ closable: C,
404
+ onClose: () => Z(r)
405
+ },
406
+ Q
407
+ )),
408
+ /* @__PURE__ */ e("div", { className: x(o.main, o.outer), children: /* @__PURE__ */ i(G, { as: "nav", className: o.container, children: [
409
+ /* @__PURE__ */ e(
410
+ m,
420
411
  {
421
- variant: "transparent",
422
- as: s,
423
- href: m(
424
- "https://www.highcharts.com/chat/gpt/",
425
- a
426
- ),
427
- children: [
428
- /* @__PURE__ */ e("span", { className: o.gpt, children: "Highcharts GPT" }),
429
- /* @__PURE__ */ e(W, {})
430
- ]
412
+ as: "a",
413
+ className: o.skip,
414
+ size: 500,
415
+ tabIndex: "0",
416
+ onClick: v,
417
+ onKeyPress: v,
418
+ children: "Skip to content"
431
419
  }
432
420
  ),
433
- /* @__PURE__ */ e(I, {}),
434
- /* @__PURE__ */ e(P, {}),
435
421
  /* @__PURE__ */ e(
436
- u,
422
+ s,
437
423
  {
438
- variant: "brand",
439
- as: s,
440
- href: m("https://shop.highcharts.com/", a),
441
- "aria-label": "Login",
442
- children: /* @__PURE__ */ e(H, {})
424
+ className: o.logo,
425
+ href: d("https://www.highcharts.com/", a),
426
+ children: /* @__PURE__ */ e(j, { showText: !N || B && !b })
443
427
  }
444
428
  ),
445
- /* @__PURE__ */ c(
446
- u,
429
+ /* @__PURE__ */ e("ul", { className: o.links, children: K.map(({ title: r, url: c }, h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
430
+ m,
447
431
  {
448
- variant: "success",
432
+ variant: "plain",
433
+ size: 300,
449
434
  as: s,
450
- href: m(
451
- "https://www.highcharts.com/download/",
452
- a
453
- ),
454
- children: [
455
- /* @__PURE__ */ e($, {}),
456
- "Get started"
457
- ]
435
+ href: d(c, a),
436
+ children: r
458
437
  }
459
- ),
460
- /* @__PURE__ */ c(
461
- u,
462
- {
463
- variant: w ? "white" : "transparent",
464
- className: o.menu,
465
- onClick: B,
466
- children: [
467
- w ? "Close" : "Menu",
468
- w ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ e(ce, {})
469
- ]
470
- }
471
- )
472
- ] })
473
- ] }) }),
474
- !!t?.length && /* @__PURE__ */ e(
475
- He,
476
- {
477
- items: t,
478
- link: s,
479
- host: a,
480
- pathname: y
481
- }
482
- ),
483
- n,
484
- S && /* @__PURE__ */ c(F, { children: [
438
+ ) }, h)) }),
439
+ /* @__PURE__ */ i("div", { className: o.buttons, children: [
440
+ /* @__PURE__ */ i(
441
+ m,
442
+ {
443
+ variant: "transparent",
444
+ as: s,
445
+ href: d(
446
+ "https://www.highcharts.com/chat/gpt/",
447
+ a
448
+ ),
449
+ children: [
450
+ /* @__PURE__ */ e("span", { className: o.gpt, children: "Highcharts GPT" }),
451
+ /* @__PURE__ */ e(D, {})
452
+ ]
453
+ }
454
+ ),
455
+ /* @__PURE__ */ e($, {}),
456
+ /* @__PURE__ */ e(R, {}),
457
+ /* @__PURE__ */ i(
458
+ m,
459
+ {
460
+ className: o.cta,
461
+ variant: "brand",
462
+ as: s,
463
+ href: d("https://shop.highcharts.com/", a),
464
+ "aria-label": "Buy Now",
465
+ children: [
466
+ /* @__PURE__ */ e(F, {}),
467
+ "Buy Now"
468
+ ]
469
+ }
470
+ ),
471
+ /* @__PURE__ */ i(
472
+ m,
473
+ {
474
+ className: o.cta,
475
+ variant: "success",
476
+ as: s,
477
+ href: d(
478
+ "https://www.highcharts.com/download/",
479
+ a
480
+ ),
481
+ children: [
482
+ /* @__PURE__ */ e(V, {}),
483
+ "Try for Free"
484
+ ]
485
+ }
486
+ ),
487
+ /* @__PURE__ */ i(
488
+ m,
489
+ {
490
+ variant: w ? "white" : "transparent",
491
+ className: o.menu,
492
+ onClick: q,
493
+ children: [
494
+ w ? "Close" : "Menu",
495
+ w ? /* @__PURE__ */ e(ce, {}) : /* @__PURE__ */ e(ue, {})
496
+ ]
497
+ }
498
+ )
499
+ ] })
500
+ ] }) }),
501
+ !!t?.length && /* @__PURE__ */ e(
502
+ Fe,
503
+ {
504
+ items: t,
505
+ link: s,
506
+ host: a,
507
+ pathname: S
508
+ }
509
+ ),
510
+ n
511
+ ] }),
512
+ B && /* @__PURE__ */ i(ne, { children: [
485
513
  /* @__PURE__ */ e(
486
514
  "div",
487
515
  {
488
- className: _(o.mobileOverlay, { [o.open]: w }),
489
- onClick: B
516
+ className: x(o.mobileOverlay, { [o.open]: w }),
517
+ onClick: q
490
518
  }
491
519
  ),
492
- /* @__PURE__ */ c(
520
+ /* @__PURE__ */ i(
493
521
  "nav",
494
522
  {
495
- className: _(o.mobile, {
523
+ className: x(o.mobile, {
496
524
  [o.open]: w
497
525
  }),
498
526
  children: [
499
- /* @__PURE__ */ c("div", { className: o.container, children: [
527
+ /* @__PURE__ */ i("div", { className: o.container, children: [
500
528
  /* @__PURE__ */ e(
501
529
  s,
502
530
  {
503
531
  className: o.logo,
504
- href: m("https://www.highcharts.com/", a),
505
- children: /* @__PURE__ */ e(O, { showText: !x })
532
+ href: d("https://www.highcharts.com/", a),
533
+ children: /* @__PURE__ */ e(j, { showText: !b })
506
534
  }
507
535
  ),
508
- /* @__PURE__ */ c("div", { className: o.buttons, children: [
509
- /* @__PURE__ */ c(
510
- u,
536
+ /* @__PURE__ */ i("div", { className: o.buttons, children: [
537
+ /* @__PURE__ */ i(
538
+ m,
511
539
  {
512
540
  variant: "transparent",
513
541
  as: s,
514
- href: m(
542
+ href: d(
515
543
  "https://www.highcharts.com/chat/gpt/",
516
544
  a
517
545
  ),
518
546
  children: [
519
547
  /* @__PURE__ */ e("span", { className: o.gpt, children: "Highcharts GPT" }),
520
- /* @__PURE__ */ e(W, {})
548
+ /* @__PURE__ */ e(D, {})
521
549
  ]
522
550
  }
523
551
  ),
524
- /* @__PURE__ */ e(I, {}),
525
- /* @__PURE__ */ e(P, {})
552
+ /* @__PURE__ */ e($, {}),
553
+ /* @__PURE__ */ e(R, {})
526
554
  ] })
527
555
  ] }),
528
- /* @__PURE__ */ c("div", { className: o.buttons, children: [
529
- /* @__PURE__ */ c(
530
- u,
556
+ /* @__PURE__ */ i("div", { className: o.buttons, children: [
557
+ /* @__PURE__ */ i(
558
+ m,
531
559
  {
532
560
  variant: "brand",
533
561
  fullWidth: !0,
534
562
  as: s,
535
- href: m("https://shop.highcharts.com/", a),
563
+ href: d("https://shop.highcharts.com/", a),
536
564
  children: [
537
- /* @__PURE__ */ e(H, {}),
538
- "Login"
565
+ /* @__PURE__ */ e(F, {}),
566
+ "Buy Now"
539
567
  ]
540
568
  }
541
569
  ),
542
- /* @__PURE__ */ c(
543
- u,
570
+ /* @__PURE__ */ i(
571
+ m,
544
572
  {
545
573
  variant: "success",
546
574
  fullWidth: !0,
547
575
  as: s,
548
- href: m(
576
+ href: d(
549
577
  "https://www.highcharts.com/download/",
550
578
  a
551
579
  ),
552
580
  children: [
553
- /* @__PURE__ */ e($, {}),
554
- "Get started"
581
+ /* @__PURE__ */ e(V, {}),
582
+ "Try for Free"
555
583
  ]
556
584
  }
557
585
  )
558
586
  ] }),
559
- /* @__PURE__ */ e("ul", { className: o.links, children: A.map(({ title: r, url: i, icon: d }, l) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
560
- u,
587
+ /* @__PURE__ */ e("ul", { className: o.links, children: K.map(({ title: r, url: c, icon: h }, C) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
588
+ m,
561
589
  {
562
590
  variant: "plain",
563
591
  size: 500,
564
592
  fullWidth: !0,
565
593
  as: s,
566
- href: m(i, a),
594
+ href: d(c, a),
567
595
  children: [
568
- d,
596
+ h,
569
597
  r
570
598
  ]
571
599
  }
572
- ) }, l)) })
600
+ ) }, C)) })
573
601
  ]
574
602
  }
575
603
  )
@@ -578,6 +606,6 @@ function Xe({
578
606
  ] });
579
607
  }
580
608
  export {
581
- Xe as Header,
582
- He as SubHeader
609
+ it as Header,
610
+ Fe as SubHeader
583
611
  };