@netlify/spark-ui 1.0.3-alpha.1 → 1.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 (47) hide show
  1. package/dist/assets/SearchLink.css +1 -1
  2. package/dist/assets/SearchModal.css +1 -1
  3. package/dist/chunks/compat.module.DT16W4Wr.js +175 -0
  4. package/dist/chunks/hooks.module.CNV9mxng.js +138 -0
  5. package/dist/chunks/{useTimeout.DYuvQwFN.js → useTimeout.DOkYFG64.js} +1 -1
  6. package/dist/components/index.d.ts +0 -1
  7. package/dist/components/preact/Modal/Modal.js +1 -1
  8. package/dist/components/preact/SearchModal/components/SearchInput.d.ts +0 -2
  9. package/dist/components/preact/SearchModal/components/SearchInput.js +2 -2
  10. package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.js +1 -1
  11. package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +51 -81
  12. package/dist/components/preact/SearchModal/components/SearchToggle/SearchToggle.js +1 -1
  13. package/dist/components/preact/SearchModal/components/SearchWindow.d.ts +1 -1
  14. package/dist/components/preact/SearchModal/components/SearchWindow.js +34 -39
  15. package/dist/components/preact/SearchModal/hooks/useKeyboardNav.js +6 -6
  16. package/dist/components/preact/SearchModal/hooks/useSearch.js +2 -2
  17. package/dist/components/preact/SearchModal/hooks/useSearchHotkeys.js +1 -1
  18. package/dist/components/preact/SearchModal/hooks/useSearchLogger.js +1 -1
  19. package/dist/components/preact/SearchModal/hooks/useSearchParams.js +1 -1
  20. package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +1 -1
  21. package/dist/components/preact/SearchModal/types/search.types.d.ts +0 -3
  22. package/dist/components/preact/index.d.ts +0 -1
  23. package/dist/components/preact/index.js +5 -7
  24. package/package.json +2 -4
  25. package/packages/components/Blockquote.astro +103 -0
  26. package/packages/components/index.ts +0 -1
  27. package/packages/components/preact/SearchModal/components/SearchInput.tsx +7 -9
  28. package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +1 -6
  29. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +11 -67
  30. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +30 -67
  31. package/packages/components/preact/SearchModal/components/SearchWindow.tsx +16 -27
  32. package/packages/components/preact/SearchModal/hooks/useKeyboardNav.ts +2 -2
  33. package/packages/components/preact/SearchModal/types/search.types.tsx +1 -2
  34. package/packages/components/preact/index.ts +0 -1
  35. package/packages/styles/tokens.css +4 -4
  36. package/dist/assets/AskNetlify.css +0 -1
  37. package/dist/assets/Orb.css +0 -1
  38. package/dist/chunks/compat.module.BjTzMHXJ.js +0 -296
  39. package/dist/chunks/hooks.module.DeYLzLnU.js +0 -177
  40. package/dist/components/preact/AskNetlify/AskNetlify.d.ts +0 -2
  41. package/dist/components/preact/AskNetlify/AskNetlify.js +0 -5292
  42. package/dist/components/preact/Orb/Orb.d.ts +0 -2
  43. package/dist/components/preact/Orb/Orb.js +0 -5
  44. package/packages/components/preact/AskNetlify/AskNetlify.css +0 -162
  45. package/packages/components/preact/AskNetlify/AskNetlify.tsx +0 -123
  46. package/packages/components/preact/Orb/Orb.css +0 -94
  47. package/packages/components/preact/Orb/Orb.tsx +0 -7
@@ -14,26 +14,21 @@ import {
14
14
  useSearchToggles,
15
15
  useSearchLogger,
16
16
  } from '../../hooks';
17
- import { useTimeout } from '@utils/useTimeout';
18
-
19
- import AskNetlify from '../../../../preact/AskNetlify/AskNetlify';
20
17
 
21
18
  import './SearchModal.css';
22
19
 
23
20
  interface Props {
24
21
  children: ComponentChildren;
25
22
  className?: string;
26
- debug?: boolean;
23
+ debug?: boolean
27
24
  }
28
25
 
29
- function SearchModal(props: Props = { className: '', children: null, debug: false }) {
26
+ function SearchModal(props: Props = {className: '', children: null, debug: false }) {
30
27
  const [isPagefindLoaded, setIsPagefindLoaded] = useState(false);
31
- const [modalState, setModalState] = useState({ current: 'search' });
32
- const [askNetlifyQuery, setAskNetlifyQuery] = useState('');
33
28
 
34
29
  // Poll for the existence of window.pagefind.
35
30
  useEffect(() => {
36
- let intervalId: number;
31
+ let intervalId:number;
37
32
 
38
33
  const checkForPagefind = () => {
39
34
  if (window.pagefind) {
@@ -50,18 +45,19 @@ function SearchModal(props: Props = { className: '', children: null, debug: fals
50
45
  return () => clearInterval(intervalId);
51
46
  }, []);
52
47
 
48
+
53
49
  const { children, className, debug, ...rest } = props;
54
50
  const { state, actions } = useSearch();
55
-
56
51
  const [searchOpen, setSearchOpen] = useState(false);
52
+
57
53
  const openSearch = () => setSearchOpen(true);
58
54
  const closeSearch = () => setSearchOpen(false);
59
55
 
60
56
  const modalRef = useRef<HTMLDialogElement>(null);
61
57
  const containerRef = useClickOutside<HTMLDivElement>(closeSearch);
62
58
 
63
- useSearchLogger(state, debug);
64
- useSearchToggles(isPagefindLoaded, openSearch);
59
+ useSearchLogger(state, debug)
60
+ useSearchToggles(isPagefindLoaded, openSearch);
65
61
  useSearchParams(isPagefindLoaded, actions.setSearchTerm, openSearch);
66
62
  useSearchHotkeys(isPagefindLoaded, searchOpen, openSearch, closeSearch);
67
63
  useKeyboardNav(isPagefindLoaded, modalRef, searchOpen, closeSearch);
@@ -71,64 +67,31 @@ function SearchModal(props: Props = { className: '', children: null, debug: fals
71
67
  searchOpen ? modalRef.current.showModal() : modalRef.current.close();
72
68
  }, [searchOpen]);
73
69
 
74
- useEffect(() => {
75
- const input = modalRef.current?.querySelector('input');
76
-
77
- if (input) input.focus();
78
-
79
- if (modalState.current === 'ask') {
80
- setTimeout(() => {
81
- modalRef.current.classList.add('n-search-modal-ask');
82
- }, 150);
83
- } else if (modalState.current === 'search') {
84
- setTimeout(() => {
85
- modalRef.current.classList.remove('n-search-modal-ask');
86
- }, 150);
87
- }
88
- }, [modalState.current]);
89
-
90
70
  return (
91
- <Modal
92
- ref={modalRef}
93
- className={`n-search-modal ${className ? className : ''}`}
94
- data-state={modalState.current}
95
- {...rest}
96
- >
71
+ <Modal ref={modalRef} className={`n-search-modal ${className ? className : ''}`} {...rest}>
97
72
  <div ref={containerRef} className="n-search-container">
98
- {modalState.current === 'ask' && (
99
- <AskNetlify query={askNetlifyQuery} setModalState={setModalState} />
100
- )}
101
- {modalState.current === 'search' && (
102
- <>
103
- <SearchInput
104
- setSearchTerm={actions.setSearchTerm}
105
- setAskNetlifyQuery={setAskNetlifyQuery}
106
- initialValue={state.searchTerm}
107
- />
108
-
109
- <SearchWindow
110
- setModalState={setModalState}
111
- searchLoading={state.isLoading}
112
- searchTerm={state.searchTerm}
113
- results={state.results}
114
- >
115
- {children}
116
- </SearchWindow>
117
-
118
- <div className="n-search-footer">
119
- <p className="n-search-footer-tip">
120
- <KeyboardKey keyNames={['Esc']} />
121
- to closed
122
- </p>
123
- <p className="n-search-footer-tip">
124
- <KeyboardKey keyNames={['Tab']} />
125
- <span>or</span>
126
- <KeyboardKey keyNames={['↑', '↓']} />
127
- to navigate
128
- </p>
129
- </div>
130
- </>
131
- )}
73
+ <SearchInput setSearchTerm={actions.setSearchTerm} initialValue={state.searchTerm} />
74
+
75
+ <SearchWindow
76
+ searchLoading={state.isLoading}
77
+ searchTerm={state.searchTerm}
78
+ results={state.results}
79
+ >
80
+ {children}
81
+ </SearchWindow>
82
+
83
+ <div className="n-search-footer">
84
+ <p className="n-search-footer-tip">
85
+ <KeyboardKey keyNames={['Esc']} />
86
+ to close
87
+ </p>
88
+ <p className="n-search-footer-tip">
89
+ <KeyboardKey keyNames={['Tab']} />
90
+ <span>or</span>
91
+ <KeyboardKey keyNames={['↑', '↓']} />
92
+ to navigate
93
+ </p>
94
+ </div>
132
95
  </div>
133
96
  </Modal>
134
97
  );
@@ -4,8 +4,6 @@ import { useMemo } from 'preact/hooks';
4
4
  import SearchHeading from './SearchHeading/SearchHeading';
5
5
  import SearchLink from './SearchLink/SearchLink';
6
6
 
7
- import Icon from '@components/preact/Icon';
8
-
9
7
  /* --- Search Results Window (for active searches) --- */
10
8
  const SearchResults: FunctionComponent<SearchResultsProps> = ({
11
9
  searchLoading,
@@ -22,9 +20,9 @@ const SearchResults: FunctionComponent<SearchResultsProps> = ({
22
20
 
23
21
  if (!results || results.length === 0) {
24
22
  return (
25
- <SearchHeading>
26
- 0 results for <span className="n-search-term">{searchTerm}</span>
27
- </SearchHeading>
23
+ <SearchHeading>
24
+ 0 results for <span className="n-search-term">{searchTerm}</span>
25
+ </SearchHeading>
28
26
  );
29
27
  }
30
28
 
@@ -45,38 +43,29 @@ const SearchResults: FunctionComponent<SearchResultsProps> = ({
45
43
 
46
44
  /* --- Main Search Results Component --- */
47
45
  export default function SearchWindow({
48
- setModalState,
49
46
  searchLoading,
50
47
  searchTerm,
51
48
  results,
52
49
  children: DefaultWindow,
53
50
  }: SearchWindowProps) {
51
+ const askNetlify: SearchLinkProps = {
52
+ icon: 'sparkles',
53
+ label: 'Ask Netlify AI',
54
+ url: 'https://docs.netlify.com/ask-netlify/',
55
+ };
56
+
54
57
  return (
55
58
  <div className="n-search-window">
56
59
  <div className="search-links">
60
+ <SearchLink {...askNetlify} />
57
61
  {searchTerm && searchTerm.length > 1 ? (
58
- <SearchResults searchLoading={searchLoading} searchTerm={searchTerm} results={results} />
62
+ <SearchResults
63
+ searchLoading={searchLoading}
64
+ searchTerm={searchTerm}
65
+ results={results}
66
+ />
59
67
  ) : DefaultWindow ? (
60
- <>
61
- <button
62
- class="btn-ask-netlify n-search-link"
63
- onClick={() => {
64
- setModalState({ current: 'ask' });
65
- }}
66
- >
67
- <span className="n-search-link-icon">
68
- <Icon name={'netlify'} />
69
- </span>
70
- <div className="n-search-link-body">
71
- <p className="n-search-link-title">Ask Netlify AI</p>
72
- </div>
73
- <div className="n-search-link-icon">
74
- <Icon name="caretRight" />
75
- </div>
76
- </button>
77
-
78
- {DefaultWindow}
79
- </>
68
+ DefaultWindow
80
69
  ) : null}
81
70
  </div>
82
71
  </div>
@@ -21,7 +21,7 @@ export function useKeyboardNav(
21
21
  onClose: () => void
22
22
  ) {
23
23
  useEffect(() => {
24
- if (!isPagefindLoaded) return;
24
+ if (!isPagefindLoaded) return
25
25
  const handleKeydown = (e: KeyboardEvent) => {
26
26
  if (!isOpen) return;
27
27
 
@@ -35,7 +35,7 @@ export function useKeyboardNav(
35
35
  const container = containerRef.current;
36
36
  if (!container) return;
37
37
 
38
- const links = Array.from(container.querySelectorAll('.n-search-link'));
38
+ const links = Array.from(container.querySelectorAll('a'));
39
39
  const currentIndex = links.findIndex(link => link === document.activeElement);
40
40
  const nextIndex =
41
41
  e.key === 'ArrowDown'
@@ -10,7 +10,6 @@ export interface SearchLinkProps {
10
10
  }
11
11
 
12
12
  export interface SearchWindowProps {
13
- setModalState: (e: { current: string }) => void;
14
13
  searchLoading: boolean;
15
14
  searchTerm?: string;
16
15
  results?: SearchLinkProps[];
@@ -34,4 +33,4 @@ export interface SearchGTMObjectProps {
34
33
  resultUrl?: string;
35
34
  query?: string;
36
35
  debug_mode?: boolean;
37
- }
36
+ }
@@ -4,7 +4,6 @@ export { default as Icon } from './Icon';
4
4
  export { default as SearchLink } from './SearchModal/components/SearchLink/SearchLink';
5
5
  export { default as SearchHeading } from './SearchModal/components/SearchHeading/SearchHeading';
6
6
  export { default as SearchToggle } from './SearchModal/components/SearchToggle/SearchToggle';
7
- export { default as AskNetlify } from "./AskNetlify/AskNetlify"
8
7
  export { SearchModal } from './SearchModal';
9
8
 
10
9
  export { type IconName } from './Icon';
@@ -55,7 +55,7 @@
55
55
  --font-family-mono: "Martian Mono", ui-monospace, "Cascadia Code", "Source Code Pro", "Menlo", "Consolas", "DejaVu Sans Mono", monospace;
56
56
  --font-family-text: "Instrument Sans", system-ui, "Helvetica", sans-serif;
57
57
  --font-size-display-2xl: 4rem;
58
- --font-size-display-2xs: 1.125rem;
58
+ --font-size-display-2xs: 1.25rem;
59
59
  --font-size-display-3xl: 4.5rem;
60
60
  --font-size-display-4xl: 5rem;
61
61
  --font-size-display-lg: 3rem;
@@ -94,7 +94,7 @@
94
94
  --green-800: color(srgb 0.058823529411764705 0.2901960784313726 0.12941176470588237);
95
95
  --green-900: color(srgb 0.08235294117647059 0.16470588235294117 0.09803921568627451);
96
96
  --heading-text-color: var(--neutral-800);
97
- --line-height-heading: 1.2;
97
+ --line-height-heading: 1.25;
98
98
  --line-height-none: 1;
99
99
  --line-height-text: 1.5;
100
100
  --neutral-000: color(srgb 1 1 1);
@@ -314,7 +314,7 @@
314
314
  --color-success-text: var(--green-900);
315
315
  --color-text: var(--teal-000);
316
316
  --color-text-accent: var(--teal-600);
317
- --color-text-weak: var(--neutral-200);
317
+ --color-text-weak: var(--neutral-300);
318
318
  --color-text-weaker: var(--neutral-400);
319
319
  --color-warning-bg: var(--gold-200);
320
320
  --color-warning-border: var(--gold-400);
@@ -368,7 +368,7 @@
368
368
  --color-success-text: var(--green-900);
369
369
  --color-text: var(--teal-000);
370
370
  --color-text-accent: var(--teal-600);
371
- --color-text-weak: var(--neutral-200);
371
+ --color-text-weak: var(--neutral-300);
372
372
  --color-text-weaker: var(--neutral-400);
373
373
  --color-warning-bg: var(--gold-200);
374
374
  --color-warning-border: var(--gold-400);
@@ -1 +0,0 @@
1
- .chat-container{opacity:0;animation:appearContainer .35s ease-in-out forwards;animation-delay:.3s}@keyframes appearContainer{0%{opacity:0}to{opacity:1}}.conversation{height:calc(var(--n-search-container-height) + var(--n-search-footer-height));padding:var(--n-search-padding-inline);scroll-behavior:smooth;overflow-y:auto;display:grid;align-items:flex-end;gap:var(--space-s)}.message{display:grid;gap:var(--space-s)}.message-bubble{padding:1rem;background:var(--neutral-light-100);border-radius:var(--radius-l);width:fit-content;max-width:85%;font-size:var(--step-0)}.prose{font-size:var(--step--0)}.prose>*+*{margin-top:var(--flow-space, var(--space-xs))}.prose h1,.prose h2,.prose h3{font-size:var(--step-1)}.prose h4,.prose h5,.prose h6{font-size:var(--step-0)}.prose pre{background:var(--neutral-light-700);border-radius:var(--radius-m);max-width:100%;box-sizing:border-box}.prose code{overflow-x:scroll}.prose code[class*=language-],.prose pre[class*=language-]{display:block;padding:var(--space-s)}.user-message{margin-inline-start:auto;background:var(--blue-000)}.form-wrapper{display:flex;align-items:center;position:relative;height:var(--n-search-input-height)}.form-wrapper:after{content:"";display:block;width:100%;height:1px;background:var(--neutral-light-100);position:absolute;top:0;left:0}.form-input{border:none;outline:none;padding-inline:var(--n-search-padding-inline)}.form-submit{padding:.7rem;border-radius:var(--radius-pill);margin-inline-end:var(--space-2xs);border:none;background:var(--blue-600);color:var(--neutral-000);transition:filter .3s ease-out}.form-submit>svg{width:1rem;height:auto;aspect-ratio:1 / 1;border-radius:1.5px}.form-submit[disabled]{filter:saturate(0)}.button-back{width:fit-content;background:transparent;position:absolute;padding:.6rem 1rem;background:var(--color-bg);margin:1rem;border:2px solid var(--color-bg-3);border-radius:var(--radius-pill);font-size:var(--step--1);border:1px solid;cursor:pointer;border-color:var(--neutral-300);color:var(--neutral-800);border-width:.5px}.pulsing{display:block;width:1rem;height:1rem;clip-path:circle(40%);background:var(--blue-700);animation:pulsing 2.5s infinite ease-in-out}@keyframes pulsing{0%,to{transform:scale(.9)}50%{transform:scale(1.05)}}
@@ -1 +0,0 @@
1
- @property --angle{syntax: "<angle>"; inherits: false; initial-value: 0deg;}:root{--bg: oklch(12.9% .042 264.695);--c1: oklch(44.4% .177 26.899);--c2: oklch(85.2% .199 91.936);--c3: oklch(58.8% .158 241.966)}.orb{display:grid;grid-template-areas:"stack";inline-size:min(80vmin,100%);aspect-ratio:1;overflow:hidden;border-radius:50%}.orb:before,.orb:after{content:"";display:block;grid-area:stack;width:100%;height:100%;border-radius:50%;transform:translateZ(0)}.orb:before{background:conic-gradient(from calc(var(--angle) * 2) at 25% 70%,var(--c3),transparent 20% 80%,var(--c3)),conic-gradient(from calc(var(--angle) * 2) at 45% 75%,var(--c2),transparent 30% 60%,var(--c2)),conic-gradient(from calc(var(--angle) * -3) at 80% 20%,var(--c1),transparent 40% 60%,var(--c1)),conic-gradient(from calc(var(--angle) * 2) at 15% 5%,var(--c2),transparent 10% 90%,var(--c2)),conic-gradient(from calc(var(--angle) * 1) at 20% 80%,var(--c1),transparent 10% 90%,var(--c1)),conic-gradient(from calc(var(--angle) * -2) at 85% 10%,var(--c3),transparent 20% 80%,var(--c3));box-shadow:inset var(--bg) 0 0 5vmin 1vmin;filter:blur(3vmin) contrast(5);animation:rotate 20s linear infinite}.orb:after{--dot: 1.5px;background-image:radial-gradient(circle at center,var(--bg) var(--dot),transparent var(--dot));background-size:calc(var(--dot) * 2) calc(var(--dot) * 2);-webkit-mask-image:radial-gradient(black 25%,transparent 75%);mask-image:radial-gradient(black 25%,transparent 75%);-webkit-backdrop-filter:blur(8vmin) contrast(10);backdrop-filter:blur(8vmin) contrast(10);mix-blend-mode:overlay}@keyframes rotate{to{--angle: 360deg}}
@@ -1,296 +0,0 @@
1
- import { Component as p, options as l, createElement as f, Fragment as h, toChildArray as s, createRef as Q, createContext as X, cloneElement as ee, render as m, hydrate as te } from "preact";
2
- import { x as T, d as N, A as D, h as I, T as L, _ as y, F as M, g as V, y as S, P as F, q as W } from "./hooks.module.DeYLzLnU.js";
3
- function H(e, t) {
4
- for (var n in t) e[n] = t[n];
5
- return e;
6
- }
7
- function g(e, t) {
8
- for (var n in e) if (n !== "__source" && !(n in t)) return !0;
9
- for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
10
- return !1;
11
- }
12
- function B(e, t) {
13
- var n = t(), r = N({ t: { __: n, u: t } }), o = r[0].t, a = r[1];
14
- return y(function() {
15
- o.__ = n, o.u = t, C(o) && a({ t: o });
16
- }, [e, n, t]), S(function() {
17
- return C(o) && a({ t: o }), e(function() {
18
- C(o) && a({ t: o });
19
- });
20
- }, [e]), n;
21
- }
22
- function C(e) {
23
- var t, n, r = e.u, o = e.__;
24
- try {
25
- var a = r();
26
- return !((t = o) === (n = a) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
27
- } catch {
28
- return !0;
29
- }
30
- }
31
- function z(e) {
32
- e();
33
- }
34
- function j(e) {
35
- return e;
36
- }
37
- function q() {
38
- return [!1, z];
39
- }
40
- var Z = y;
41
- function E(e, t) {
42
- this.props = e, this.context = t;
43
- }
44
- function ne(e, t) {
45
- function n(o) {
46
- var a = this.props.ref, u = a == o.ref;
47
- return !u && a && (a.call ? a(null) : a.current = null), t ? !t(this.props, o) || !u : g(this.props, o);
48
- }
49
- function r(o) {
50
- return this.shouldComponentUpdate = n, f(e, o);
51
- }
52
- return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
53
- }
54
- (E.prototype = new p()).isPureReactComponent = !0, E.prototype.shouldComponentUpdate = function(e, t) {
55
- return g(this.props, e) || g(this.state, t);
56
- };
57
- var R = l.__b;
58
- l.__b = function(e) {
59
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), R && R(e);
60
- };
61
- var re = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
62
- function oe(e) {
63
- function t(n) {
64
- var r = H({}, n);
65
- return delete r.ref, e(r, n.ref || null);
66
- }
67
- return t.$$typeof = re, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
68
- }
69
- var k = function(e, t) {
70
- return e == null ? null : s(s(e).map(t));
71
- }, ue = { map: k, forEach: k, count: function(e) {
72
- return e ? s(e).length : 0;
73
- }, only: function(e) {
74
- var t = s(e);
75
- if (t.length !== 1) throw "Children.only";
76
- return t[0];
77
- }, toArray: s }, ae = l.__e;
78
- l.__e = function(e, t, n, r) {
79
- if (e.then) {
80
- for (var o, a = t; a = a.__; ) if ((o = a.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
81
- }
82
- ae(e, t, n, r);
83
- };
84
- var O = l.unmount;
85
- function Y(e, t, n) {
86
- return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
87
- typeof r.__c == "function" && r.__c();
88
- }), e.__c.__H = null), (e = H({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
89
- return Y(r, t, n);
90
- })), e;
91
- }
92
- function G(e, t, n) {
93
- return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
94
- return G(r, t, n);
95
- }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
96
- }
97
- function v() {
98
- this.__u = 0, this.o = null, this.__b = null;
99
- }
100
- function J(e) {
101
- var t = e.__.__c;
102
- return t && t.__a && t.__a(e);
103
- }
104
- function ie(e) {
105
- var t, n, r;
106
- function o(a) {
107
- if (t || (t = e()).then(function(u) {
108
- n = u.default || u;
109
- }, function(u) {
110
- r = u;
111
- }), r) throw r;
112
- if (!n) throw t;
113
- return f(n, a);
114
- }
115
- return o.displayName = "Lazy", o.__f = !0, o;
116
- }
117
- function d() {
118
- this.i = null, this.l = null;
119
- }
120
- l.unmount = function(e) {
121
- var t = e.__c;
122
- t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), O && O(e);
123
- }, (v.prototype = new p()).__c = function(e, t) {
124
- var n = t.__c, r = this;
125
- r.o == null && (r.o = []), r.o.push(n);
126
- var o = J(r.__v), a = !1, u = function() {
127
- a || (a = !0, n.__R = null, o ? o(_) : _());
128
- };
129
- n.__R = u;
130
- var _ = function() {
131
- if (!--r.__u) {
132
- if (r.state.__a) {
133
- var i = r.state.__a;
134
- r.__v.__k[0] = G(i, i.__c.__P, i.__c.__O);
135
- }
136
- var c;
137
- for (r.setState({ __a: r.__b = null }); c = r.o.pop(); ) c.forceUpdate();
138
- }
139
- };
140
- r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(u, u);
141
- }, v.prototype.componentWillUnmount = function() {
142
- this.o = [];
143
- }, v.prototype.render = function(e, t) {
144
- if (this.__b) {
145
- if (this.__v.__k) {
146
- var n = document.createElement("div"), r = this.__v.__k[0].__c;
147
- this.__v.__k[0] = Y(this.__b, n, r.__O = r.__P);
148
- }
149
- this.__b = null;
150
- }
151
- var o = t.__a && f(h, null, e.fallback);
152
- return o && (o.__u &= -33), [f(h, null, t.__a ? null : e.children), o];
153
- };
154
- var P = function(e, t, n) {
155
- if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n; ) {
156
- for (; n.length > 3; ) n.pop()();
157
- if (n[1] < n[0]) break;
158
- e.i = n = n[2];
159
- }
160
- };
161
- function le(e) {
162
- return this.getChildContext = function() {
163
- return e.context;
164
- }, e.children;
165
- }
166
- function _e(e) {
167
- var t = this, n = e.h;
168
- t.componentWillUnmount = function() {
169
- m(null, t.v), t.v = null, t.h = null;
170
- }, t.h && t.h !== n && t.componentWillUnmount(), t.v || (t.h = n, t.v = { nodeType: 1, parentNode: n, childNodes: [], contains: function() {
171
- return !0;
172
- }, appendChild: function(r) {
173
- this.childNodes.push(r), t.h.appendChild(r);
174
- }, insertBefore: function(r, o) {
175
- this.childNodes.push(r), t.h.insertBefore(r, o);
176
- }, removeChild: function(r) {
177
- this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.h.removeChild(r);
178
- } }), m(f(le, { context: t.context }, e.__v), t.v);
179
- }
180
- function ce(e, t) {
181
- var n = f(_e, { __v: e, h: t });
182
- return n.containerInfo = t, n;
183
- }
184
- (d.prototype = new p()).__a = function(e) {
185
- var t = this, n = J(t.__v), r = t.l.get(e);
186
- return r[0]++, function(o) {
187
- var a = function() {
188
- t.props.revealOrder ? (r.push(o), P(t, e, r)) : o();
189
- };
190
- n ? n(a) : a();
191
- };
192
- }, d.prototype.render = function(e) {
193
- this.i = null, this.l = /* @__PURE__ */ new Map();
194
- var t = s(e.children);
195
- e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
196
- for (var n = t.length; n--; ) this.l.set(t[n], this.i = [1, 0, this.i]);
197
- return e.children;
198
- }, d.prototype.componentDidUpdate = d.prototype.componentDidMount = function() {
199
- var e = this;
200
- this.l.forEach(function(t, n) {
201
- P(e, n, t);
202
- });
203
- };
204
- var K = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, se = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, fe = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, pe = /[A-Z0-9]/g, de = typeof document < "u", he = function(e) {
205
- return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
206
- };
207
- function ve(e, t, n) {
208
- return t.__k == null && (t.textContent = ""), m(e, t), typeof n == "function" && n(), e ? e.__c : null;
209
- }
210
- function me(e, t, n) {
211
- return te(e, t), typeof n == "function" && n(), e ? e.__c : null;
212
- }
213
- p.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
214
- Object.defineProperty(p.prototype, e, { configurable: !0, get: function() {
215
- return this["UNSAFE_" + e];
216
- }, set: function(t) {
217
- Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
218
- } });
219
- });
220
- var w = l.event;
221
- function ye() {
222
- }
223
- function be() {
224
- return this.cancelBubble;
225
- }
226
- function Ce() {
227
- return this.defaultPrevented;
228
- }
229
- l.event = function(e) {
230
- return w && (e = w(e)), e.persist = ye, e.isPropagationStopped = be, e.isDefaultPrevented = Ce, e.nativeEvent = e;
231
- };
232
- var x, ge = { enumerable: !1, configurable: !0, get: function() {
233
- return this.class;
234
- } }, U = l.vnode;
235
- l.vnode = function(e) {
236
- typeof e.type == "string" && function(t) {
237
- var n = t.props, r = t.type, o = {}, a = r.indexOf("-") === -1;
238
- for (var u in n) {
239
- var _ = n[u];
240
- if (!(u === "value" && "defaultValue" in n && _ == null || de && u === "children" && r === "noscript" || u === "class" || u === "className")) {
241
- var i = u.toLowerCase();
242
- u === "defaultValue" && "value" in n && n.value == null ? u = "value" : u === "download" && _ === !0 ? _ = "" : i === "translate" && _ === "no" ? _ = !1 : i[0] === "o" && i[1] === "n" ? i === "ondoubleclick" ? u = "ondblclick" : i !== "onchange" || r !== "input" && r !== "textarea" || he(n.type) ? i === "onfocus" ? u = "onfocusin" : i === "onblur" ? u = "onfocusout" : fe.test(u) && (u = i) : i = u = "oninput" : a && se.test(u) ? u = u.replace(pe, "-$&").toLowerCase() : _ === null && (_ = void 0), i === "oninput" && o[u = i] && (u = "oninputCapture"), o[u] = _;
243
- }
244
- }
245
- r == "select" && o.multiple && Array.isArray(o.value) && (o.value = s(n.children).forEach(function(c) {
246
- c.props.selected = o.value.indexOf(c.props.value) != -1;
247
- })), r == "select" && o.defaultValue != null && (o.value = s(n.children).forEach(function(c) {
248
- c.props.selected = o.multiple ? o.defaultValue.indexOf(c.props.value) != -1 : o.defaultValue == c.props.value;
249
- })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", ge)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
250
- }(e), e.$$typeof = K, U && U(e);
251
- };
252
- var $ = l.__r;
253
- l.__r = function(e) {
254
- $ && $(e), x = e.__c;
255
- };
256
- var A = l.diffed;
257
- l.diffed = function(e) {
258
- A && A(e);
259
- var t = e.props, n = e.__e;
260
- n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), x = null;
261
- };
262
- var Ee = { ReactCurrentDispatcher: { current: { readContext: function(e) {
263
- return x.__n[e.__c].props.value;
264
- }, useCallback: W, useContext: T, useDebugValue: F, useDeferredValue: j, useEffect: S, useId: V, useImperativeHandle: M, useInsertionEffect: Z, useLayoutEffect: y, useMemo: L, useReducer: I, useRef: D, useState: N, useSyncExternalStore: B, useTransition: q } } };
265
- function Ne(e) {
266
- return f.bind(null, e);
267
- }
268
- function b(e) {
269
- return !!e && e.$$typeof === K;
270
- }
271
- function Se(e) {
272
- return b(e) && e.type === h;
273
- }
274
- function xe(e) {
275
- return !!e && !!e.displayName && (typeof e.displayName == "string" || e.displayName instanceof String) && e.displayName.startsWith("Memo(");
276
- }
277
- function Re(e) {
278
- return b(e) ? ee.apply(null, arguments) : e;
279
- }
280
- function ke(e) {
281
- return !!e.__k && (m(null, e), !0);
282
- }
283
- function Oe(e) {
284
- return e && (e.base || e.nodeType === 1 && e) || null;
285
- }
286
- var Pe = function(e, t) {
287
- return e(t);
288
- }, we = function(e, t) {
289
- return e(t);
290
- }, Ue = h, $e = b, De = { useState: N, useId: V, useReducer: I, useEffect: S, useLayoutEffect: y, useInsertionEffect: Z, useTransition: q, useDeferredValue: j, useSyncExternalStore: B, startTransition: z, useRef: D, useImperativeHandle: M, useMemo: L, useCallback: W, useContext: T, useDebugValue: F, version: "18.3.1", Children: ue, render: ve, hydrate: me, unmountComponentAtNode: ke, createPortal: ce, createElement: f, createContext: X, createFactory: Ne, cloneElement: Re, createRef: Q, Fragment: h, isValidElement: b, isElement: $e, isFragment: Se, isMemo: xe, findDOMNode: Oe, Component: p, PureComponent: E, memo: ne, forwardRef: oe, flushSync: we, unstable_batchedUpdates: Pe, StrictMode: Ue, Suspense: v, SuspenseList: d, lazy: ie, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ee };
291
- export {
292
- B as C,
293
- oe as D,
294
- De as R,
295
- Re as _
296
- };