@planningcenter/topbar 12.4.1 → 12.5.0-qa-988.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.
- package/dist/topbar.css +773 -34
- package/dist/topbar.css.map +1 -1
- package/dist/topbar.js +2009 -284
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +2008 -284
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +2008 -284
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +2009 -286
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +6 -3
package/dist/topbar.module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Link, Button, Popover, PopoverTrigger, PopoverContent, Modal } from '@planningcenter/tapestry';
|
|
1
|
+
import { Link, Button, Popover, PopoverTrigger, PopoverContent, Flex, Select, IconButton, Modal } from '@planningcenter/tapestry';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useState, useEffect, useMemo, useLayoutEffect, useContext, createContext, useCallback, useRef } from 'react';
|
|
4
4
|
import pcoUrl$1, { pcoUrl as pcoUrl$2, pcoApiUrl } from '@planningcenter/url';
|
|
@@ -6,18 +6,20 @@ import * as general from '@planningcenter/icons/paths/general';
|
|
|
6
6
|
import Jolt from '@planningcenter/jolt-client';
|
|
7
7
|
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
8
8
|
import 'react/jsx-runtime';
|
|
9
|
+
import * as toolbar from '@planningcenter/icons/paths/toolbar';
|
|
10
|
+
import datetimeFmt from '@planningcenter/datetime-fmt';
|
|
11
|
+
import pluralize from 'pluralize';
|
|
12
|
+
import * as logomarks from '@planningcenter/icons/paths/logomark';
|
|
9
13
|
import { ThemeProvider, Divider, Button as Button$1, StackView as StackView$2, Text, Icon as Icon$1, designSystem, Box, Heading, GridView, Avatar as Avatar$1, Link as Link$1, HeadingUppercase, List, Combobox, Logo, Dropdown, Spinner, Badge } from '@planningcenter/tapestry-react';
|
|
10
14
|
import { components, UiExtensionFirstPartyComponent, UiExtensionDataContext } from '@planningcenter/add-ons';
|
|
11
15
|
import * as churchCenter from '@planningcenter/icons/paths/church-center';
|
|
12
16
|
import * as people from '@planningcenter/icons/paths/people';
|
|
13
|
-
import * as toolbar from '@planningcenter/icons/paths/toolbar';
|
|
14
17
|
import { InlineWidget } from 'react-calendly';
|
|
15
18
|
import algoliasearch from 'algoliasearch';
|
|
16
19
|
import { useSearchBox, useHits, InstantSearch, Configure } from 'react-instantsearch-core';
|
|
17
20
|
import { TransitionGroup, Transition } from 'react-transition-group';
|
|
18
|
-
import datetimeFmt from '@planningcenter/datetime-fmt';
|
|
19
21
|
|
|
20
|
-
var styles$
|
|
22
|
+
var styles$u = {"accessibility-toolbar":"accessibility-toolbar-jgjUG"};
|
|
21
23
|
|
|
22
24
|
const AccessibilityToolbar = ({
|
|
23
25
|
children
|
|
@@ -29,7 +31,7 @@ const AccessibilityToolbar = ({
|
|
|
29
31
|
(_a = document.getElementById("main-content")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
30
32
|
};
|
|
31
33
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
32
|
-
className: styles$
|
|
34
|
+
className: styles$u["accessibility-toolbar"]
|
|
33
35
|
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
34
36
|
href: "#main-content",
|
|
35
37
|
kind: "primary",
|
|
@@ -348,11 +350,11 @@ const X = ({
|
|
|
348
350
|
fill: fill
|
|
349
351
|
})));
|
|
350
352
|
|
|
351
|
-
var styles$
|
|
353
|
+
var styles$t = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement--promo":"announcement--promo-FarUk","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU","dismiss--promo":"dismiss--promo-7zvO4"};
|
|
352
354
|
|
|
353
355
|
function AnnouncementIcon() {
|
|
354
356
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
355
|
-
className: styles$
|
|
357
|
+
className: styles$t["announcement-icon"],
|
|
356
358
|
width: "16",
|
|
357
359
|
height: "16",
|
|
358
360
|
viewBox: "0 0 16 16",
|
|
@@ -477,7 +479,7 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React__default.Compo
|
|
|
477
479
|
} = this.props;
|
|
478
480
|
const isPromo = variant === "promo";
|
|
479
481
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
480
|
-
className: classnames(styles$
|
|
482
|
+
className: classnames(styles$t["announcement"], styles$t[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
|
|
481
483
|
"data-announcement-variant": variant !== null && variant !== void 0 ? variant : "platform",
|
|
482
484
|
style: isPromo ? {
|
|
483
485
|
backgroundImage: promoBackgroundUrl,
|
|
@@ -486,7 +488,7 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React__default.Compo
|
|
|
486
488
|
backgroundSize: "cover"
|
|
487
489
|
} : undefined
|
|
488
490
|
}, !isPromo && /*#__PURE__*/React__default.createElement(AnnouncementIcon, null), /*#__PURE__*/React__default.createElement("div", {
|
|
489
|
-
className: styles$
|
|
491
|
+
className: styles$t["announcement-content"],
|
|
490
492
|
style: style,
|
|
491
493
|
...platformProps
|
|
492
494
|
}));
|
|
@@ -535,7 +537,7 @@ function StyledDismissButton$1({
|
|
|
535
537
|
const isPromo = variant === "promo";
|
|
536
538
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
537
539
|
type: "button",
|
|
538
|
-
className: classnames(styles$
|
|
540
|
+
className: classnames(styles$t.dismiss, isPromo && styles$t["dismiss--promo"]),
|
|
539
541
|
...props
|
|
540
542
|
}, /*#__PURE__*/React__default.createElement(X, {
|
|
541
543
|
fill: isPromo ? "currentColor" : "white",
|
|
@@ -615,9 +617,9 @@ class StyledAnnouncement extends React__default.Component {
|
|
|
615
617
|
...platformProps
|
|
616
618
|
} = this.props;
|
|
617
619
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
618
|
-
className: styles$
|
|
620
|
+
className: styles$t["announcement"]
|
|
619
621
|
}, /*#__PURE__*/React__default.createElement(AnnouncementIcon, null), /*#__PURE__*/React__default.createElement("div", {
|
|
620
|
-
className: styles$
|
|
622
|
+
className: styles$t["announcement-content"],
|
|
621
623
|
style: style,
|
|
622
624
|
...platformProps
|
|
623
625
|
}));
|
|
@@ -628,7 +630,7 @@ function StyledDismissButton({
|
|
|
628
630
|
}) {
|
|
629
631
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
630
632
|
type: "button",
|
|
631
|
-
className: styles$
|
|
633
|
+
className: styles$t.dismiss,
|
|
632
634
|
...props
|
|
633
635
|
}, /*#__PURE__*/React__default.createElement(X, {
|
|
634
636
|
fill: "white",
|
|
@@ -1750,7 +1752,7 @@ function MonoAppIcon({
|
|
|
1750
1752
|
})) : (/*#__PURE__*/React__default.createElement("div", null, "appName not supported")));
|
|
1751
1753
|
}
|
|
1752
1754
|
|
|
1753
|
-
var styles$
|
|
1755
|
+
var styles$s = {"name":"name-UNqbW"};
|
|
1754
1756
|
|
|
1755
1757
|
const AppRow = ({
|
|
1756
1758
|
appName,
|
|
@@ -1758,25 +1760,23 @@ const AppRow = ({
|
|
|
1758
1760
|
iconSize = 24
|
|
1759
1761
|
}) => {
|
|
1760
1762
|
if (appName === "Accounts") {
|
|
1761
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(
|
|
1762
|
-
className: styles$k["icon-slot"]
|
|
1763
|
-
}, /*#__PURE__*/React__default.createElement(MonoAppIcon, {
|
|
1763
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MonoAppIcon, {
|
|
1764
1764
|
appName: "Accounts",
|
|
1765
1765
|
colors: colors,
|
|
1766
1766
|
size: iconSize
|
|
1767
|
-
})
|
|
1768
|
-
className: styles$
|
|
1767
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
1768
|
+
className: styles$s.name
|
|
1769
1769
|
}, "Account settings"));
|
|
1770
1770
|
}
|
|
1771
1771
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ColorAppIcon, {
|
|
1772
1772
|
appName: appName.replace(/[\s-]/, ""),
|
|
1773
1773
|
size: iconSize
|
|
1774
1774
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
1775
|
-
className: styles$
|
|
1775
|
+
className: styles$s.name
|
|
1776
1776
|
}, appName));
|
|
1777
1777
|
};
|
|
1778
1778
|
|
|
1779
|
-
var styles$
|
|
1779
|
+
var styles$r = {"button":"button-XMbeQ","label":"label-884of","chevron":"chevron-RRg9k"};
|
|
1780
1780
|
|
|
1781
1781
|
const AppsButton = /*#__PURE__*/React__default.forwardRef(({
|
|
1782
1782
|
appName,
|
|
@@ -1788,27 +1788,27 @@ const AppsButton = /*#__PURE__*/React__default.forwardRef(({
|
|
|
1788
1788
|
...restProps,
|
|
1789
1789
|
ref: ref,
|
|
1790
1790
|
"aria-label": `App switcher: ${appName}`,
|
|
1791
|
-
className: styles$
|
|
1791
|
+
className: styles$r.button,
|
|
1792
1792
|
kind: "neutral-inline",
|
|
1793
1793
|
label: /*#__PURE__*/React__default.createElement("span", {
|
|
1794
|
-
className: styles$
|
|
1794
|
+
className: styles$r.label
|
|
1795
1795
|
}, isAccounts ? "Account settings" : appName),
|
|
1796
1796
|
prefix: isAccounts ? (/*#__PURE__*/React__default.createElement(MonoAppIcon, {
|
|
1797
1797
|
appName: "Accounts",
|
|
1798
1798
|
colors: colors,
|
|
1799
|
-
size:
|
|
1799
|
+
size: 24
|
|
1800
1800
|
})) : (/*#__PURE__*/React__default.createElement(ColorAppIcon, {
|
|
1801
1801
|
appName: appName.replace(/[\s-]/, ""),
|
|
1802
|
-
size:
|
|
1802
|
+
size: 24
|
|
1803
1803
|
})),
|
|
1804
1804
|
suffix: /*#__PURE__*/React__default.createElement(DisclosureChevronIcon, {
|
|
1805
|
-
className: `${styles$
|
|
1805
|
+
className: `${styles$r.chevron} symbol`
|
|
1806
1806
|
})
|
|
1807
1807
|
});
|
|
1808
1808
|
});
|
|
1809
1809
|
AppsButton.displayName = "AppsButton";
|
|
1810
1810
|
|
|
1811
|
-
var styles$
|
|
1811
|
+
var styles$q = {"nav":"nav-y-6ML","popover-content":"popover-content-jOAAY","list":"list-jUxvp","link":"link-LMp2h","current":"current-4U4VL","accounts-item":"accounts-item-erJW0","accounts-link":"accounts-link-4jwPW"};
|
|
1812
1812
|
|
|
1813
1813
|
const AppsMenu = ({
|
|
1814
1814
|
appName,
|
|
@@ -1829,8 +1829,8 @@ const AppsMenu = ({
|
|
|
1829
1829
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
1830
1830
|
"aria-current": isCurrent ? "page" : undefined,
|
|
1831
1831
|
"aria-label": name,
|
|
1832
|
-
className: classnames(styles$
|
|
1833
|
-
[styles$
|
|
1832
|
+
className: classnames(styles$q.link, {
|
|
1833
|
+
[styles$q.current]: isCurrent
|
|
1834
1834
|
}),
|
|
1835
1835
|
"data-pendo": `app-switcher--change-app--${name}`,
|
|
1836
1836
|
"data-turbolinks": false,
|
|
@@ -1846,22 +1846,22 @@ const AppsMenu = ({
|
|
|
1846
1846
|
colors: colors
|
|
1847
1847
|
})), /*#__PURE__*/React__default.createElement(PopoverContent, {
|
|
1848
1848
|
"aria-label": "Switch app",
|
|
1849
|
-
className: styles$
|
|
1849
|
+
className: styles$q["popover-content"],
|
|
1850
1850
|
placement: "bottom start"
|
|
1851
1851
|
}, /*#__PURE__*/React__default.createElement("nav", {
|
|
1852
|
-
className: styles$
|
|
1852
|
+
className: styles$q.nav,
|
|
1853
1853
|
"data-pendo": "app-switcher"
|
|
1854
1854
|
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
1855
|
-
className: styles$
|
|
1855
|
+
className: styles$q.list,
|
|
1856
1856
|
role: "list"
|
|
1857
1857
|
}, homeProduct && renderProductLink(homeProduct.name), restProducts.map(({
|
|
1858
1858
|
name
|
|
1859
1859
|
}) => renderProductLink(name)), accountsProduct && (/*#__PURE__*/React__default.createElement("li", {
|
|
1860
|
-
className: styles$
|
|
1860
|
+
className: styles$q["accounts-item"]
|
|
1861
1861
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
1862
1862
|
"aria-current": appName === accountsProduct.name ? "page" : undefined,
|
|
1863
1863
|
"aria-label": "Account settings",
|
|
1864
|
-
className: classnames(styles$
|
|
1864
|
+
className: classnames(styles$q.link, styles$q["accounts-link"]),
|
|
1865
1865
|
"data-pendo": "app-switcher--change-app--Accounts",
|
|
1866
1866
|
"data-turbolinks": false,
|
|
1867
1867
|
href: pcoUrl$1(env)("accounts") + getAppsSwitchProductPath(accountsProduct.name)
|
|
@@ -2069,7 +2069,7 @@ function MonoAppName({
|
|
|
2069
2069
|
})) : (/*#__PURE__*/React__default.createElement("div", null, "appName not supported"));
|
|
2070
2070
|
}
|
|
2071
2071
|
|
|
2072
|
-
var styles$
|
|
2072
|
+
var styles$p = {"unbutton":"unbutton-lEbTR"};
|
|
2073
2073
|
|
|
2074
2074
|
function Unbutton({
|
|
2075
2075
|
className,
|
|
@@ -2078,7 +2078,7 @@ function Unbutton({
|
|
|
2078
2078
|
...nativeProps
|
|
2079
2079
|
}) {
|
|
2080
2080
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
2081
|
-
className: classnames(styles$
|
|
2081
|
+
className: classnames(styles$p.unbutton, className),
|
|
2082
2082
|
style: {
|
|
2083
2083
|
...style
|
|
2084
2084
|
},
|
|
@@ -2087,7 +2087,7 @@ function Unbutton({
|
|
|
2087
2087
|
});
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
|
-
var styles$
|
|
2090
|
+
var styles$o = {"button":"button-wsipc","button-accounts":"button-accounts-zQmBM","chevron":"chevron-obyBF","is-expanded":"is-expanded-PoCQ9"};
|
|
2091
2091
|
|
|
2092
2092
|
const LegacyAppsButton = ({
|
|
2093
2093
|
appName,
|
|
@@ -2102,8 +2102,8 @@ const LegacyAppsButton = ({
|
|
|
2102
2102
|
"aria-haspopup": "true",
|
|
2103
2103
|
"aria-label": `App switcher: ${appName}`,
|
|
2104
2104
|
onClick: onClick,
|
|
2105
|
-
className: classnames(styles$
|
|
2106
|
-
[styles$
|
|
2105
|
+
className: classnames(styles$o.button, {
|
|
2106
|
+
[styles$o["is-expanded"]]: expanded
|
|
2107
2107
|
}),
|
|
2108
2108
|
type: "button",
|
|
2109
2109
|
style: style,
|
|
@@ -2112,7 +2112,7 @@ const LegacyAppsButton = ({
|
|
|
2112
2112
|
appName: "Accounts",
|
|
2113
2113
|
colors: colors
|
|
2114
2114
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2115
|
-
className: styles$
|
|
2115
|
+
className: styles$o["button-accounts"]
|
|
2116
2116
|
}, "Account settings"))) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ColorAppIcon, {
|
|
2117
2117
|
appName: appName.replace(/[\s-]/, "")
|
|
2118
2118
|
}), /*#__PURE__*/React__default.createElement(MonoAppName, {
|
|
@@ -2120,7 +2120,7 @@ const LegacyAppsButton = ({
|
|
|
2120
2120
|
key: "mono-app-name",
|
|
2121
2121
|
size: 24
|
|
2122
2122
|
}))), /*#__PURE__*/React__default.createElement(DisclosureChevronIcon, {
|
|
2123
|
-
className: styles$
|
|
2123
|
+
className: styles$o.chevron,
|
|
2124
2124
|
key: "disclosure-chevron-icon"
|
|
2125
2125
|
}));
|
|
2126
2126
|
};
|
|
@@ -2253,7 +2253,7 @@ class Outsider extends React__default.Component {
|
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
2255
2255
|
|
|
2256
|
-
var styles$
|
|
2256
|
+
var styles$n = {"popup-root":"popup-root-SeL5u","popup":"popup-nQXYW","is-visible":"is-visible-3DAUP"};
|
|
2257
2257
|
|
|
2258
2258
|
const Popup = ({
|
|
2259
2259
|
className,
|
|
@@ -2261,8 +2261,8 @@ const Popup = ({
|
|
|
2261
2261
|
isVisible,
|
|
2262
2262
|
...nativeProps
|
|
2263
2263
|
}) => (/*#__PURE__*/React__default.createElement(C, {
|
|
2264
|
-
className: classnames(styles$
|
|
2265
|
-
[styles$
|
|
2264
|
+
className: classnames(styles$n.popup, {
|
|
2265
|
+
[styles$n["is-visible"]]: isVisible
|
|
2266
2266
|
}, className),
|
|
2267
2267
|
...nativeProps
|
|
2268
2268
|
}));
|
|
@@ -2270,11 +2270,11 @@ const Popup = ({
|
|
|
2270
2270
|
const PopupRoot = ({
|
|
2271
2271
|
...nativeProps
|
|
2272
2272
|
}) => (/*#__PURE__*/React__default.createElement("div", {
|
|
2273
|
-
className: styles$
|
|
2273
|
+
className: styles$n["popup-root"],
|
|
2274
2274
|
...nativeProps
|
|
2275
2275
|
}));
|
|
2276
2276
|
|
|
2277
|
-
var styles$
|
|
2277
|
+
var styles$m = {"popup":"popup-bVhSa"};
|
|
2278
2278
|
|
|
2279
2279
|
const LegacyAppsMenu = ({
|
|
2280
2280
|
appName,
|
|
@@ -2312,7 +2312,7 @@ const LegacyAppsMenu = ({
|
|
|
2312
2312
|
cleanup: !visible,
|
|
2313
2313
|
component: Outsider,
|
|
2314
2314
|
onOutsideClick: toggle,
|
|
2315
|
-
className: styles$
|
|
2315
|
+
className: styles$m.popup,
|
|
2316
2316
|
isVisible: visible
|
|
2317
2317
|
}, /*#__PURE__*/React__default.createElement("menu", {
|
|
2318
2318
|
ref: menuRef,
|
|
@@ -3222,37 +3222,140 @@ const useUpdateStore = () => useCallback(updates => {
|
|
|
3222
3222
|
});
|
|
3223
3223
|
}, []);
|
|
3224
3224
|
|
|
3225
|
+
const collections = {
|
|
3226
|
+
general,
|
|
3227
|
+
toolbar
|
|
3228
|
+
};
|
|
3229
|
+
const paths = collections;
|
|
3230
|
+
function Icon({
|
|
3231
|
+
name,
|
|
3232
|
+
size = 16,
|
|
3233
|
+
style,
|
|
3234
|
+
theme,
|
|
3235
|
+
title,
|
|
3236
|
+
...props
|
|
3237
|
+
}) {
|
|
3238
|
+
const [collection, symbol] = name.split(".");
|
|
3239
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
3240
|
+
"aria-hidden": title ? undefined : true,
|
|
3241
|
+
fill: "currentColor",
|
|
3242
|
+
height: size,
|
|
3243
|
+
role: title ? "img" : undefined,
|
|
3244
|
+
style: {
|
|
3245
|
+
color: theme && `var(${theme})`,
|
|
3246
|
+
flexShrink: 0,
|
|
3247
|
+
...style
|
|
3248
|
+
},
|
|
3249
|
+
viewBox: "0 0 16 16",
|
|
3250
|
+
width: size,
|
|
3251
|
+
...props
|
|
3252
|
+
}, title && /*#__PURE__*/React__default.createElement("title", null, title), /*#__PURE__*/React__default.createElement("path", {
|
|
3253
|
+
d: paths[collection][symbol]
|
|
3254
|
+
}));
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
const SEARCHABLE_PRODUCTS = [{
|
|
3258
|
+
appName: "Calendar",
|
|
3259
|
+
slug: "calendar"
|
|
3260
|
+
}, {
|
|
3261
|
+
appName: "Check-Ins",
|
|
3262
|
+
slug: "check-ins"
|
|
3263
|
+
}, {
|
|
3264
|
+
appName: "Giving",
|
|
3265
|
+
slug: "giving"
|
|
3266
|
+
}, {
|
|
3267
|
+
appName: "Groups",
|
|
3268
|
+
slug: "groups"
|
|
3269
|
+
}, {
|
|
3270
|
+
appName: "People",
|
|
3271
|
+
slug: "people"
|
|
3272
|
+
}, {
|
|
3273
|
+
appName: "Publishing",
|
|
3274
|
+
slug: "publishing"
|
|
3275
|
+
}, {
|
|
3276
|
+
appName: "Registrations",
|
|
3277
|
+
slug: "registrations"
|
|
3278
|
+
}, {
|
|
3279
|
+
appName: "Services",
|
|
3280
|
+
slug: "services"
|
|
3281
|
+
}];
|
|
3282
|
+
const KEYBOARD_SHORTCUTS = {
|
|
3283
|
+
copyLink: {
|
|
3284
|
+
key: "c",
|
|
3285
|
+
label: "Copy link",
|
|
3286
|
+
modifierKey: true
|
|
3287
|
+
},
|
|
3288
|
+
openInNewTab: {
|
|
3289
|
+
label: "Open in new tab"},
|
|
3290
|
+
openSearch: {
|
|
3291
|
+
key: "k",
|
|
3292
|
+
label: "Open search",
|
|
3293
|
+
modifierKey: true
|
|
3294
|
+
},
|
|
3295
|
+
select: {
|
|
3296
|
+
label: "Select",
|
|
3297
|
+
modifierKey: false,
|
|
3298
|
+
next: "ArrowDown",
|
|
3299
|
+
previous: "ArrowUp"
|
|
3300
|
+
}
|
|
3301
|
+
};
|
|
3302
|
+
|
|
3225
3303
|
const isMac = () => /Mac|iPhone|iPad|iPod/.test(navigator.platform);
|
|
3226
3304
|
const hasCommandKey = event => isMac() ? event.metaKey : event.ctrlKey;
|
|
3227
|
-
const
|
|
3228
|
-
const isSearchShortcut = event =>
|
|
3305
|
+
const matchesShortcut = (shortcut, event) => event.key.toLowerCase() === shortcut.key && !event.altKey && !event.shiftKey && hasCommandKey(event) === shortcut.modifierKey;
|
|
3306
|
+
const isSearchShortcut = event => matchesShortcut(KEYBOARD_SHORTCUTS.openSearch, event);
|
|
3229
3307
|
// Products opened their own search with `/` before this one replaced it.
|
|
3230
3308
|
const isLegacySearchShortcut = event => event.key === "/" && !event.altKey && !event.ctrlKey && !event.metaKey && !isTypingIn(event.target);
|
|
3231
|
-
const isCopyShortcut = event =>
|
|
3309
|
+
const isCopyShortcut = event => matchesShortcut(KEYBOARD_SHORTCUTS.copyLink, event);
|
|
3232
3310
|
const isTypingIn = target => target instanceof Element && target.closest('input, select, textarea, [contenteditable]:not([contenteditable="false"])') !== null;
|
|
3233
3311
|
const isTypingKey = event => event.key.length === 1 && event.key !== " " && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
3234
3312
|
const verticalStep = key => ({
|
|
3235
|
-
|
|
3236
|
-
|
|
3313
|
+
[KEYBOARD_SHORTCUTS.select.next]: 1,
|
|
3314
|
+
[KEYBOARD_SHORTCUTS.select.previous]: -1
|
|
3237
3315
|
})[key];
|
|
3238
3316
|
const horizontalStep = key => ({
|
|
3239
3317
|
ArrowLeft: -1,
|
|
3240
3318
|
ArrowRight: 1
|
|
3241
3319
|
})[key];
|
|
3242
3320
|
|
|
3321
|
+
var styles$l = {"searchButton":"searchButton-fYa5-"};
|
|
3322
|
+
|
|
3243
3323
|
function SearchButton({
|
|
3324
|
+
mobile = false,
|
|
3244
3325
|
onClick
|
|
3245
3326
|
}) {
|
|
3246
3327
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
3247
|
-
"aria-keyshortcuts": `${isMac() ? "Meta
|
|
3328
|
+
"aria-keyshortcuts": mobile ? undefined : `${isMac() ? "Meta" : "Control"}+${KEYBOARD_SHORTCUTS.openSearch.key.toUpperCase()} /`,
|
|
3248
3329
|
"aria-label": "Search",
|
|
3330
|
+
className: styles$l.searchButton,
|
|
3331
|
+
"data-search-button": true,
|
|
3249
3332
|
onClick: onClick,
|
|
3250
3333
|
type: "button"
|
|
3251
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
3252
|
-
|
|
3334
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
3335
|
+
name: "general.search",
|
|
3336
|
+
size: mobile ? 18 : 14
|
|
3253
3337
|
}));
|
|
3254
3338
|
}
|
|
3255
3339
|
|
|
3340
|
+
// With the search's own debounce, about 1.4 seconds after the last keystroke,
|
|
3341
|
+
// as in GOV.UK's accessible-autocomplete.
|
|
3342
|
+
const ANNOUNCEMENT_DELAY_MS = 1100;
|
|
3343
|
+
// Screen readers echo typing themselves, as each person has set them to, so
|
|
3344
|
+
// the message waits until typing settles instead of talking over it. Waiting
|
|
3345
|
+
// also lets VoiceOver finish what focus had to say, since it often skips a
|
|
3346
|
+
// change made as focus moves, as when a tab with cached results is selected,
|
|
3347
|
+
// and only the tab someone stops on when arrowing through them is announced.
|
|
3348
|
+
// The region empties at once, so a message that comes back is read again.
|
|
3349
|
+
function useAnnouncement(message) {
|
|
3350
|
+
const [announcement, setAnnouncement] = React__default.useState(null);
|
|
3351
|
+
React__default.useEffect(() => {
|
|
3352
|
+
setAnnouncement(null);
|
|
3353
|
+
const timeout = setTimeout(() => setAnnouncement(message), ANNOUNCEMENT_DELAY_MS);
|
|
3354
|
+
return () => clearTimeout(timeout);
|
|
3355
|
+
}, [message]);
|
|
3356
|
+
return announcement;
|
|
3357
|
+
}
|
|
3358
|
+
|
|
3256
3359
|
// useId isn't available on React 17, which our peer range still supports.
|
|
3257
3360
|
let instanceCount$1 = 0;
|
|
3258
3361
|
function useInstanceId(prefix) {
|
|
@@ -3522,7 +3625,7 @@ const store = createStore(getAllPcoMeta());
|
|
|
3522
3625
|
const recentlyVisitableMetadataStore = createStore({
|
|
3523
3626
|
metadata: getRecentlyVisitableMetadata()
|
|
3524
3627
|
});
|
|
3525
|
-
function sync() {
|
|
3628
|
+
function sync$1() {
|
|
3526
3629
|
const nextState = getAllPcoMeta();
|
|
3527
3630
|
if (!shallowCompare(store.getState(), nextState)) store.setState(nextState);
|
|
3528
3631
|
const metadata = getRecentlyVisitableMetadata();
|
|
@@ -3532,7 +3635,7 @@ function sync() {
|
|
|
3532
3635
|
});
|
|
3533
3636
|
}
|
|
3534
3637
|
}
|
|
3535
|
-
const observer = new MutationObserver(sync);
|
|
3638
|
+
const observer = new MutationObserver(sync$1);
|
|
3536
3639
|
let hasTriggeredObserve = false;
|
|
3537
3640
|
function observe() {
|
|
3538
3641
|
if (hasTriggeredObserve) return;
|
|
@@ -3543,7 +3646,7 @@ function observe() {
|
|
|
3543
3646
|
// never mutate afterward, so the observer alone would never catch them.
|
|
3544
3647
|
// Re-read once now, since observe() is only called once a consumer is
|
|
3545
3648
|
// actually mounting, which is always after the document has fully parsed.
|
|
3546
|
-
sync();
|
|
3649
|
+
sync$1();
|
|
3547
3650
|
observer.observe(document.head, {
|
|
3548
3651
|
attributes: true,
|
|
3549
3652
|
childList: true,
|
|
@@ -3559,21 +3662,19 @@ function useRecentlyVisitableMetadata() {
|
|
|
3559
3662
|
return useSyncExternalStore(recentlyVisitableMetadataStore.subscribe, () => recentlyVisitableMetadataStore.getState().metadata);
|
|
3560
3663
|
}
|
|
3561
3664
|
|
|
3562
|
-
// Entries match the ones home-mobile stores, so one list can sync across web
|
|
3563
|
-
// and mobile.
|
|
3564
|
-
const ENTRY_VERSION = 3;
|
|
3565
3665
|
const MAX_ENTRIES = 50;
|
|
3666
|
+
const MAX_ENTRY_BYTES = 1024;
|
|
3566
3667
|
const MAX_TEXT_LENGTH = 200;
|
|
3567
|
-
const PRODUCTS = ["accounts", "calendar", "check-ins", "giving", "groups", "home", "login", "people", "publishing", "registrations", "services"];
|
|
3668
|
+
const PRODUCTS$1 = ["accounts", "calendar", "check-ins", "giving", "groups", "home", "login", "people", "publishing", "registrations", "services"];
|
|
3568
3669
|
// Login has no pages worth returning to.
|
|
3569
|
-
const APPS = PRODUCTS.filter(product => product !== "login");
|
|
3670
|
+
const APPS = PRODUCTS$1.filter(product => product !== "login");
|
|
3570
3671
|
function isId(value) {
|
|
3571
3672
|
return value !== "" && Array.from(value).every(character => character >= "0" && character <= "9");
|
|
3572
3673
|
}
|
|
3573
3674
|
// A PCRL looks like `<product>/v2/<resource_type>/<id>`.
|
|
3574
3675
|
function isPcrl(value) {
|
|
3575
3676
|
const segments = value.split("/");
|
|
3576
|
-
return segments.length === 4 && PRODUCTS.some(product => product === segments[0]) && isId(segments[3]);
|
|
3677
|
+
return segments.length === 4 && PRODUCTS$1.some(product => product === segments[0]) && isId(segments[3]);
|
|
3577
3678
|
}
|
|
3578
3679
|
function isApp(value) {
|
|
3579
3680
|
return APPS.some(app => app === value);
|
|
@@ -3609,8 +3710,8 @@ function entryKey(entry) {
|
|
|
3609
3710
|
return `page:${entry.app}:${entry.path.split("?")[0]}`;
|
|
3610
3711
|
}
|
|
3611
3712
|
}
|
|
3612
|
-
function
|
|
3613
|
-
if (!isRecord(value) ||
|
|
3713
|
+
function hasEntryShape(value) {
|
|
3714
|
+
if (!isRecord(value) || typeof value.visitedAt !== "string") {
|
|
3614
3715
|
return false;
|
|
3615
3716
|
} else if (value.type === "resource") {
|
|
3616
3717
|
return typeof value.pcrl === "string" && isPcrl(value.pcrl);
|
|
@@ -3620,15 +3721,38 @@ function isEntry(value) {
|
|
|
3620
3721
|
return false;
|
|
3621
3722
|
}
|
|
3622
3723
|
}
|
|
3724
|
+
function utf8Length(value) {
|
|
3725
|
+
return Array.from(value).reduce((length, character) => {
|
|
3726
|
+
var _a;
|
|
3727
|
+
const codePoint = (_a = character.codePointAt(0)) !== null && _a !== void 0 ? _a : 0;
|
|
3728
|
+
if (codePoint < 0x80) {
|
|
3729
|
+
return length + 1;
|
|
3730
|
+
} else if (codePoint < 0x800) {
|
|
3731
|
+
return length + 2;
|
|
3732
|
+
} else if (codePoint < 0x10000) {
|
|
3733
|
+
return length + 3;
|
|
3734
|
+
} else {
|
|
3735
|
+
return length + 4;
|
|
3736
|
+
}
|
|
3737
|
+
}, 0);
|
|
3738
|
+
}
|
|
3739
|
+
function excessBytes(entry) {
|
|
3740
|
+
return utf8Length(JSON.stringify(entry)) - MAX_ENTRY_BYTES;
|
|
3741
|
+
}
|
|
3742
|
+
// user-store-sync rejects a whole write over one entry above its size limit,
|
|
3743
|
+
// so an entry that can't fit isn't one this list can hold.
|
|
3744
|
+
function isEntry(value) {
|
|
3745
|
+
return hasEntryShape(value) && excessBytes(value) <= 0;
|
|
3746
|
+
}
|
|
3623
3747
|
// Cuts on code points so a surrogate pair is never split.
|
|
3624
3748
|
function clampText(value) {
|
|
3625
3749
|
return Array.from(value).slice(0, MAX_TEXT_LENGTH).join("");
|
|
3626
3750
|
}
|
|
3627
|
-
function
|
|
3751
|
+
function metadataFrom({
|
|
3628
3752
|
details,
|
|
3629
3753
|
type
|
|
3630
3754
|
}) {
|
|
3631
|
-
|
|
3755
|
+
const metadata = {
|
|
3632
3756
|
...(details && {
|
|
3633
3757
|
details: clampText(details)
|
|
3634
3758
|
}),
|
|
@@ -3636,39 +3760,124 @@ function clampMetadata({
|
|
|
3636
3760
|
type: clampText(type)
|
|
3637
3761
|
})
|
|
3638
3762
|
};
|
|
3763
|
+
return Object.keys(metadata).length > 0 ? {
|
|
3764
|
+
metadata
|
|
3765
|
+
} : {};
|
|
3766
|
+
}
|
|
3767
|
+
function pageEntry({
|
|
3768
|
+
app,
|
|
3769
|
+
path,
|
|
3770
|
+
visitedAt
|
|
3771
|
+
}, {
|
|
3772
|
+
details,
|
|
3773
|
+
title,
|
|
3774
|
+
type
|
|
3775
|
+
}) {
|
|
3776
|
+
return {
|
|
3777
|
+
app,
|
|
3778
|
+
...metadataFrom({
|
|
3779
|
+
details,
|
|
3780
|
+
type
|
|
3781
|
+
}),
|
|
3782
|
+
path,
|
|
3783
|
+
title: clampText(title),
|
|
3784
|
+
type: "page",
|
|
3785
|
+
visitedAt
|
|
3786
|
+
};
|
|
3787
|
+
}
|
|
3788
|
+
function texts(entry) {
|
|
3789
|
+
var _a, _b, _c, _d;
|
|
3790
|
+
return {
|
|
3791
|
+
details: (_b = (_a = entry.metadata) === null || _a === void 0 ? void 0 : _a.details) !== null && _b !== void 0 ? _b : "",
|
|
3792
|
+
title: entry.title,
|
|
3793
|
+
type: (_d = (_c = entry.metadata) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : ""
|
|
3794
|
+
};
|
|
3795
|
+
}
|
|
3796
|
+
function jsonBytes(value) {
|
|
3797
|
+
return utf8Length(JSON.stringify(value)) - 2;
|
|
3798
|
+
}
|
|
3799
|
+
function longestText(entry) {
|
|
3800
|
+
return Object.entries(texts(entry)).reduce((longest, candidate) => jsonBytes(candidate[1]) > jsonBytes(longest[1]) ? candidate : longest);
|
|
3639
3801
|
}
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3802
|
+
// Takes whole characters off the end until at least `excess` bytes are gone,
|
|
3803
|
+
// so a surrogate pair is never split.
|
|
3804
|
+
function shortenBy(value, excess, minLength) {
|
|
3805
|
+
var _a;
|
|
3806
|
+
const characters = Array.from(value);
|
|
3807
|
+
let removed = 0;
|
|
3808
|
+
while (characters.length > minLength && removed < excess) {
|
|
3809
|
+
removed += jsonBytes((_a = characters.pop()) !== null && _a !== void 0 ? _a : "");
|
|
3810
|
+
}
|
|
3811
|
+
return characters.join("");
|
|
3812
|
+
}
|
|
3813
|
+
// Trims the longest text field by the overflow, repeating until the entry
|
|
3814
|
+
// fits or the title is down to one character.
|
|
3815
|
+
function trimTexts(entry) {
|
|
3816
|
+
const excess = excessBytes(entry);
|
|
3817
|
+
const [field, value] = longestText(entry);
|
|
3818
|
+
const shortened = shortenBy(value, excess, field === "title" ? 1 : 0);
|
|
3819
|
+
if (excess <= 0 || shortened === value) {
|
|
3820
|
+
return entry;
|
|
3643
3821
|
} else {
|
|
3644
|
-
return {
|
|
3645
|
-
...
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3822
|
+
return trimTexts(pageEntry(entry, {
|
|
3823
|
+
...texts(entry),
|
|
3824
|
+
[field]: shortened
|
|
3825
|
+
}));
|
|
3826
|
+
}
|
|
3827
|
+
}
|
|
3828
|
+
// The query string is the first thing to go, since it's not part of the
|
|
3829
|
+
// page's identity; what's left is trimmed to fit under the service's limit.
|
|
3830
|
+
function fitPage(entry) {
|
|
3831
|
+
if (excessBytes(entry) <= 0) {
|
|
3832
|
+
return entry;
|
|
3833
|
+
} else {
|
|
3834
|
+
return trimTexts({
|
|
3835
|
+
...entry,
|
|
3836
|
+
path: entry.path.split("?")[0]
|
|
3837
|
+
});
|
|
3651
3838
|
}
|
|
3652
3839
|
}
|
|
3653
3840
|
function toEntry(visit, visitedAt) {
|
|
3654
|
-
|
|
3655
|
-
...
|
|
3656
|
-
version: ENTRY_VERSION,
|
|
3841
|
+
const entry = {
|
|
3842
|
+
...visit,
|
|
3657
3843
|
visitedAt: visitedAt.toISOString()
|
|
3658
3844
|
};
|
|
3845
|
+
if (entry.type === "resource") {
|
|
3846
|
+
return entry;
|
|
3847
|
+
} else {
|
|
3848
|
+
return fitPage(pageEntry(entry, {
|
|
3849
|
+
...texts(entry),
|
|
3850
|
+
title: entry.title.trim()
|
|
3851
|
+
}));
|
|
3852
|
+
}
|
|
3853
|
+
}
|
|
3854
|
+
// user-store-sync rejects a whole write over one field it doesn't know, so
|
|
3855
|
+
// anything else an entry carries (like the version older entries stored) is
|
|
3856
|
+
// dropped on the way in.
|
|
3857
|
+
function withKnownFields(entry) {
|
|
3858
|
+
if (entry.type === "resource") {
|
|
3859
|
+
return {
|
|
3860
|
+
pcrl: entry.pcrl,
|
|
3861
|
+
type: entry.type,
|
|
3862
|
+
visitedAt: entry.visitedAt
|
|
3863
|
+
};
|
|
3864
|
+
} else {
|
|
3865
|
+
return pageEntry(entry, texts(entry));
|
|
3866
|
+
}
|
|
3659
3867
|
}
|
|
3660
3868
|
// Recents are disposable: anything unexpected reads as an empty list (or, for
|
|
3661
3869
|
// a single bad entry, a list without it) rather than throwing.
|
|
3870
|
+
function entriesFrom(value) {
|
|
3871
|
+
if (Array.isArray(value)) {
|
|
3872
|
+
return value.filter(isEntry).map(withKnownFields);
|
|
3873
|
+
} else {
|
|
3874
|
+
return [];
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3662
3877
|
function parseRecentlyVisited(value) {
|
|
3663
|
-
let parsed = null;
|
|
3664
3878
|
try {
|
|
3665
|
-
|
|
3879
|
+
return entriesFrom(JSON.parse(value !== null && value !== void 0 ? value : "null"));
|
|
3666
3880
|
} catch {
|
|
3667
|
-
parsed = null;
|
|
3668
|
-
}
|
|
3669
|
-
if (Array.isArray(parsed)) {
|
|
3670
|
-
return parsed.filter(isEntry);
|
|
3671
|
-
} else {
|
|
3672
3881
|
return [];
|
|
3673
3882
|
}
|
|
3674
3883
|
}
|
|
@@ -3676,6 +3885,39 @@ function addVisit(entries, entry) {
|
|
|
3676
3885
|
const key = entryKey(entry);
|
|
3677
3886
|
return [entry, ...entries.filter(existing => entryKey(existing) !== key)].slice(0, MAX_ENTRIES);
|
|
3678
3887
|
}
|
|
3888
|
+
// The service may write timestamps with fewer fractional digits than
|
|
3889
|
+
// toISOString, so they're compared as times rather than strings.
|
|
3890
|
+
function visitTime(entry) {
|
|
3891
|
+
return isRecord(entry) && typeof entry.visitedAt === "string" ? Date.parse(entry.visitedAt) || 0 : 0;
|
|
3892
|
+
}
|
|
3893
|
+
function newestFirst(entries) {
|
|
3894
|
+
const seen = new Set();
|
|
3895
|
+
return entries.sort((a, b) => visitTime(b) - visitTime(a)).filter(entry => {
|
|
3896
|
+
if (isEntry(entry)) {
|
|
3897
|
+
const key = entryKey(entry);
|
|
3898
|
+
const isFirst = !seen.has(key);
|
|
3899
|
+
seen.add(key);
|
|
3900
|
+
return isFirst;
|
|
3901
|
+
} else {
|
|
3902
|
+
return true;
|
|
3903
|
+
}
|
|
3904
|
+
}).slice(0, MAX_ENTRIES);
|
|
3905
|
+
}
|
|
3906
|
+
// One list from several, newest visit first wherever it was recorded.
|
|
3907
|
+
function mergeEntries(...lists) {
|
|
3908
|
+
return newestFirst(lists.flat());
|
|
3909
|
+
}
|
|
3910
|
+
// Products pin different topbar versions, so the shared list can hold entries
|
|
3911
|
+
// this build doesn't recognize (a newer app or type). They're kept, as stored,
|
|
3912
|
+
// in what's written back, so an older topbar never erases a newer client's
|
|
3913
|
+
// visits. Recognized entries lose unknown fields, as on any read, since one
|
|
3914
|
+
// unknown field would get every write rejected.
|
|
3915
|
+
function mergeStored(stored, local) {
|
|
3916
|
+
return newestFirst([...(Array.isArray(stored) ? stored : []).map(entry => isEntry(entry) ? withKnownFields(entry) : entry), ...local]);
|
|
3917
|
+
}
|
|
3918
|
+
function isSameList(a, b) {
|
|
3919
|
+
return a.length === b.length && a.every((entry, index) => entryKey(entry) === entryKey(b[index]) && visitTime(entry) === visitTime(b[index]));
|
|
3920
|
+
}
|
|
3679
3921
|
|
|
3680
3922
|
// The app whose URL, in this environment, has the current page's host.
|
|
3681
3923
|
// Reversing pcoUrl handles every environment @planningcenter/url knows about,
|
|
@@ -3786,9 +4028,195 @@ function useCurrentPersonId() {
|
|
|
3786
4028
|
return userId == null ? undefined : String(userId);
|
|
3787
4029
|
}
|
|
3788
4030
|
|
|
3789
|
-
//
|
|
3790
|
-
//
|
|
3791
|
-
|
|
4031
|
+
// Tokens last 15 minutes. Refreshing a minute early keeps one from expiring
|
|
4032
|
+
// between reading a token and the service checking it.
|
|
4033
|
+
const REFRESH_MARGIN_MS = 60000;
|
|
4034
|
+
// A failed mint (a CSRF 422, a 5xx, a body that isn't a token) isn't retried
|
|
4035
|
+
// on every visit and panel open; the product is left alone for a while.
|
|
4036
|
+
const MINT_BACKOFF_MS = 5 * 60000;
|
|
4037
|
+
const MAX_ATTEMPTS = 3;
|
|
4038
|
+
// A product without the endpoint answers 404 for the rest of the session, so
|
|
4039
|
+
// it's asked once per tab rather than on every page.
|
|
4040
|
+
const UNAVAILABLE_UNTIL_KEY = "topbar.user_store_sync.unavailable_until";
|
|
4041
|
+
const END_OF_SESSION = Number.MAX_SAFE_INTEGER;
|
|
4042
|
+
// Per person, so switching connected people never writes one person's visits
|
|
4043
|
+
// with another's token.
|
|
4044
|
+
function tokenKey(personId) {
|
|
4045
|
+
return `topbar.user_store_sync.token.${personId}`;
|
|
4046
|
+
}
|
|
4047
|
+
function readSession(key) {
|
|
4048
|
+
try {
|
|
4049
|
+
return sessionStorage.getItem(key);
|
|
4050
|
+
} catch {
|
|
4051
|
+
return null;
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
function writeSession(key, value) {
|
|
4055
|
+
try {
|
|
4056
|
+
sessionStorage.setItem(key, value);
|
|
4057
|
+
} catch {
|
|
4058
|
+
// Without sessionStorage the next request just mints again.
|
|
4059
|
+
}
|
|
4060
|
+
}
|
|
4061
|
+
function isUserStoreSyncUnavailable() {
|
|
4062
|
+
return Number(readSession(UNAVAILABLE_UNTIL_KEY)) > Date.now();
|
|
4063
|
+
}
|
|
4064
|
+
function markUnavailable(until) {
|
|
4065
|
+
writeSession(UNAVAILABLE_UNTIL_KEY, String(until));
|
|
4066
|
+
}
|
|
4067
|
+
function isToken(value) {
|
|
4068
|
+
return isRecord(value) && typeof value.token === "string" && typeof value.url === "string" && Number.isFinite(value.expiresAt) && typeof value.readOnly === "boolean";
|
|
4069
|
+
}
|
|
4070
|
+
function cachedToken(personId) {
|
|
4071
|
+
var _a;
|
|
4072
|
+
try {
|
|
4073
|
+
const token = JSON.parse((_a = readSession(tokenKey(personId))) !== null && _a !== void 0 ? _a : "null");
|
|
4074
|
+
if (isToken(token) && token.expiresAt - REFRESH_MARGIN_MS > Date.now()) {
|
|
4075
|
+
return token;
|
|
4076
|
+
} else {
|
|
4077
|
+
return null;
|
|
4078
|
+
}
|
|
4079
|
+
} catch {
|
|
4080
|
+
return null;
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
function tokenFrom(json) {
|
|
4084
|
+
if (isRecord(json)) {
|
|
4085
|
+
const token = {
|
|
4086
|
+
expiresAt: typeof json.expires_at === "string" ? Date.parse(json.expires_at) : NaN,
|
|
4087
|
+
readOnly: json.read_only === true,
|
|
4088
|
+
token: json.token,
|
|
4089
|
+
url: json.url
|
|
4090
|
+
};
|
|
4091
|
+
return isToken(token) ? token : null;
|
|
4092
|
+
} else {
|
|
4093
|
+
return null;
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4096
|
+
// The JWT's subject is the person's account center id, the same id the
|
|
4097
|
+
// product gives the topbar as `userId`.
|
|
4098
|
+
function subject(token) {
|
|
4099
|
+
var _a;
|
|
4100
|
+
try {
|
|
4101
|
+
const payload = ((_a = token.split(".")[1]) !== null && _a !== void 0 ? _a : "").split("-").join("+").split("_").join("/");
|
|
4102
|
+
const claims = JSON.parse(atob(payload));
|
|
4103
|
+
return isRecord(claims) ? claims.sub : undefined;
|
|
4104
|
+
} catch {
|
|
4105
|
+
return undefined;
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4108
|
+
async function mintToken(personId) {
|
|
4109
|
+
const {
|
|
4110
|
+
json,
|
|
4111
|
+
ok,
|
|
4112
|
+
response
|
|
4113
|
+
} = await apiRequest(railsCsrfFetch, `${window.location.origin}/user_store_sync/token`, {
|
|
4114
|
+
method: "POST"
|
|
4115
|
+
});
|
|
4116
|
+
const minted = ok ? tokenFrom(json) : null;
|
|
4117
|
+
// The product mints for whoever the session belongs to now. In a tab left
|
|
4118
|
+
// open after switching to another connected person, that isn't the person
|
|
4119
|
+
// this page rendered for, and syncing with their token would write this
|
|
4120
|
+
// person's visits into their list. The endpoint is working, so there's
|
|
4121
|
+
// nothing to back off from; the next page load picks up the new person.
|
|
4122
|
+
const token = minted && subject(minted.token) === personId ? minted : null;
|
|
4123
|
+
if (token) {
|
|
4124
|
+
writeSession(tokenKey(personId), JSON.stringify(token));
|
|
4125
|
+
} else if ((response === null || response === void 0 ? void 0 : response.status) === 404) {
|
|
4126
|
+
markUnavailable(END_OF_SESSION);
|
|
4127
|
+
} else if (!minted) {
|
|
4128
|
+
markUnavailable(Date.now() + MINT_BACKOFF_MS);
|
|
4129
|
+
}
|
|
4130
|
+
return token;
|
|
4131
|
+
}
|
|
4132
|
+
function hasReadOnlyToken(personId) {
|
|
4133
|
+
var _a;
|
|
4134
|
+
return ((_a = cachedToken(personId)) === null || _a === void 0 ? void 0 : _a.readOnly) === true;
|
|
4135
|
+
}
|
|
4136
|
+
async function request(personId, key, init = {}, isRetry = false) {
|
|
4137
|
+
var _a;
|
|
4138
|
+
const token = isRetry ? await mintToken(personId) : (_a = cachedToken(personId)) !== null && _a !== void 0 ? _a : await mintToken(personId);
|
|
4139
|
+
if (token) {
|
|
4140
|
+
const response = await fetch(`${token.url}/v1/data/${key}`, {
|
|
4141
|
+
...init,
|
|
4142
|
+
headers: {
|
|
4143
|
+
...init.headers,
|
|
4144
|
+
Authorization: `Bearer ${token.token}`
|
|
4145
|
+
}
|
|
4146
|
+
});
|
|
4147
|
+
if (response.status === 401 && !isRetry) {
|
|
4148
|
+
return request(personId, key, init, true);
|
|
4149
|
+
} else {
|
|
4150
|
+
return {
|
|
4151
|
+
response,
|
|
4152
|
+
token
|
|
4153
|
+
};
|
|
4154
|
+
}
|
|
4155
|
+
} else {
|
|
4156
|
+
return null;
|
|
4157
|
+
}
|
|
4158
|
+
}
|
|
4159
|
+
// The service answers version 0 for a person with nothing stored yet, and
|
|
4160
|
+
// takes `If-Match: "0"` for the first write. Without a version at all, the
|
|
4161
|
+
// write goes unconditioned.
|
|
4162
|
+
function ifMatch(version) {
|
|
4163
|
+
return typeof version === "number" ? {
|
|
4164
|
+
"If-Match": `"${version}"`
|
|
4165
|
+
} : {};
|
|
4166
|
+
}
|
|
4167
|
+
// Applies `change` to the stored value and writes the result, rereading and
|
|
4168
|
+
// retrying when another tab or device wrote in between. `change` returns null
|
|
4169
|
+
// when there's nothing to write. A read-only token (staff impersonating
|
|
4170
|
+
// someone) only reads, so nothing is written into the person's history.
|
|
4171
|
+
// Resolves to the value now stored, with whether the token was read-only, or
|
|
4172
|
+
// null when the service couldn't be reached.
|
|
4173
|
+
async function updateStoredValue(personId, key, change, attemptsLeft = MAX_ATTEMPTS) {
|
|
4174
|
+
const read = await request(personId, key);
|
|
4175
|
+
if (read === null || read === void 0 ? void 0 : read.response.ok) {
|
|
4176
|
+
const {
|
|
4177
|
+
value,
|
|
4178
|
+
version
|
|
4179
|
+
} = await read.response.json();
|
|
4180
|
+
const {
|
|
4181
|
+
readOnly
|
|
4182
|
+
} = read.token;
|
|
4183
|
+
const next = readOnly ? null : change(value);
|
|
4184
|
+
if (next === null) {
|
|
4185
|
+
return {
|
|
4186
|
+
readOnly,
|
|
4187
|
+
value: Array.isArray(value) ? value : []
|
|
4188
|
+
};
|
|
4189
|
+
} else {
|
|
4190
|
+
const write = await request(personId, key, {
|
|
4191
|
+
body: JSON.stringify({
|
|
4192
|
+
value: next
|
|
4193
|
+
}),
|
|
4194
|
+
headers: {
|
|
4195
|
+
"Content-Type": "application/json",
|
|
4196
|
+
...ifMatch(version)
|
|
4197
|
+
},
|
|
4198
|
+
method: "PUT"
|
|
4199
|
+
});
|
|
4200
|
+
if (write === null || write === void 0 ? void 0 : write.response.ok) {
|
|
4201
|
+
return {
|
|
4202
|
+
readOnly,
|
|
4203
|
+
value: next
|
|
4204
|
+
};
|
|
4205
|
+
} else if ((write === null || write === void 0 ? void 0 : write.response.status) === 409 && attemptsLeft > 1) {
|
|
4206
|
+
return updateStoredValue(personId, key, change, attemptsLeft - 1);
|
|
4207
|
+
} else {
|
|
4208
|
+
return null;
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
} else {
|
|
4212
|
+
return null;
|
|
4213
|
+
}
|
|
4214
|
+
}
|
|
4215
|
+
|
|
4216
|
+
// Each product keeps its own copy in localStorage, and user-store-sync joins
|
|
4217
|
+
// the copies up across products and devices wherever the product can mint a
|
|
4218
|
+
// token for it.
|
|
4219
|
+
const SYNC_KEY = "recently_viewed";
|
|
3792
4220
|
function storageKey({
|
|
3793
4221
|
env,
|
|
3794
4222
|
personId
|
|
@@ -3807,17 +4235,65 @@ function readRecentlyVisited(scope) {
|
|
|
3807
4235
|
return [];
|
|
3808
4236
|
}
|
|
3809
4237
|
}
|
|
4238
|
+
function writeRecentlyVisited(scope, entries) {
|
|
4239
|
+
try {
|
|
4240
|
+
localStorage.setItem(storageKey(scope), JSON.stringify(entries));
|
|
4241
|
+
changes.setState({
|
|
4242
|
+
version: changes.getState().version + 1
|
|
4243
|
+
});
|
|
4244
|
+
} catch {
|
|
4245
|
+
// Storage can be full or blocked; recents are disposable.
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
async function syncOnce(scope) {
|
|
4249
|
+
try {
|
|
4250
|
+
const synced = await updateStoredValue(scope.personId, SYNC_KEY, stored => {
|
|
4251
|
+
const shared = entriesFrom(stored);
|
|
4252
|
+
const local = readRecentlyVisited(scope);
|
|
4253
|
+
return isSameList(mergeEntries(shared, local), shared) ? null : mergeStored(stored, local);
|
|
4254
|
+
});
|
|
4255
|
+
if (synced) {
|
|
4256
|
+
const shared = entriesFrom(synced.value);
|
|
4257
|
+
writeRecentlyVisited(scope, synced.readOnly ? shared : mergeEntries(shared, readRecentlyVisited(scope)));
|
|
4258
|
+
}
|
|
4259
|
+
} catch {
|
|
4260
|
+
// The service is best-effort; the local copy stands on its own.
|
|
4261
|
+
}
|
|
4262
|
+
}
|
|
4263
|
+
const syncing = new Map();
|
|
4264
|
+
const syncAgain = new Set();
|
|
4265
|
+
// One sync per list at a time. A visit recorded while one runs schedules a
|
|
4266
|
+
// single follow-up, so it still reaches the service; anything else asking
|
|
4267
|
+
// mid-sync just waits for the one running.
|
|
4268
|
+
function sync(scope, followUp) {
|
|
4269
|
+
const key = storageKey(scope);
|
|
4270
|
+
const running = syncing.get(key);
|
|
4271
|
+
if (isUserStoreSyncUnavailable()) {
|
|
4272
|
+
return Promise.resolve();
|
|
4273
|
+
} else if (running) {
|
|
4274
|
+
if (followUp) syncAgain.add(key);
|
|
4275
|
+
return running;
|
|
4276
|
+
} else {
|
|
4277
|
+
const run = syncOnce(scope).then(() => {
|
|
4278
|
+
syncing.delete(key);
|
|
4279
|
+
return syncAgain.delete(key) ? sync(scope, false) : undefined;
|
|
4280
|
+
});
|
|
4281
|
+
syncing.set(key, run);
|
|
4282
|
+
return run;
|
|
4283
|
+
}
|
|
4284
|
+
}
|
|
4285
|
+
function syncRecentlyVisited(scope) {
|
|
4286
|
+
return sync(scope, false);
|
|
4287
|
+
}
|
|
4288
|
+
// Staff impersonating someone get a read-only token, and their visits stay out
|
|
4289
|
+
// of that person's list. Until the token is minted the visit is kept, and the
|
|
4290
|
+
// sync that mints it replaces the local list with the synced one, so recording
|
|
4291
|
+
// never waits on the network.
|
|
3810
4292
|
function recordVisit(visit, scope) {
|
|
3811
4293
|
const entry = toEntry(visit, new Date());
|
|
3812
|
-
if (isEntry(entry)) {
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
changes.setState({
|
|
3816
|
-
version: changes.getState().version + 1
|
|
3817
|
-
});
|
|
3818
|
-
} catch {
|
|
3819
|
-
// Storage can be full or blocked; recents are disposable.
|
|
3820
|
-
}
|
|
4294
|
+
if (isEntry(entry) && !hasReadOnlyToken(scope.personId)) {
|
|
4295
|
+
writeRecentlyVisited(scope, addVisit(readRecentlyVisited(scope), entry));
|
|
4296
|
+
sync(scope, true);
|
|
3821
4297
|
}
|
|
3822
4298
|
}
|
|
3823
4299
|
function useRecentlyVisited({
|
|
@@ -3825,6 +4301,14 @@ function useRecentlyVisited({
|
|
|
3825
4301
|
personId
|
|
3826
4302
|
}) {
|
|
3827
4303
|
const version = useSyncExternalStore(changes.subscribe, () => changes.getState().version);
|
|
4304
|
+
useEffect(() => {
|
|
4305
|
+
if (personId) {
|
|
4306
|
+
syncRecentlyVisited({
|
|
4307
|
+
env,
|
|
4308
|
+
personId
|
|
4309
|
+
});
|
|
4310
|
+
}
|
|
4311
|
+
}, [env, personId]);
|
|
3828
4312
|
// `version` isn't read, but listing it re-reads storage after each visit.
|
|
3829
4313
|
return useMemo(() => personId ? readRecentlyVisited({
|
|
3830
4314
|
env,
|
|
@@ -3972,7 +4456,13 @@ function hasSelectedText(element) {
|
|
|
3972
4456
|
return selectedInField || ((_b = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : "") !== "";
|
|
3973
4457
|
}
|
|
3974
4458
|
|
|
3975
|
-
|
|
4459
|
+
// eslint-disable-next-line sort-keys-fix/sort-keys-fix
|
|
4460
|
+
const COPIED_TIMING = {
|
|
4461
|
+
enter: 240,
|
|
4462
|
+
active: 1000,
|
|
4463
|
+
exit: 240
|
|
4464
|
+
};
|
|
4465
|
+
const COPIED_FEEDBACK_MS = COPIED_TIMING.enter + COPIED_TIMING.active + COPIED_TIMING.exit;
|
|
3976
4466
|
// `copiedUrl` stays set briefly after a copy so the UI can confirm it.
|
|
3977
4467
|
function useCopyLink() {
|
|
3978
4468
|
const [copiedUrl, setCopiedUrl] = React__default.useState(null);
|
|
@@ -3993,25 +4483,46 @@ function useCopyLink() {
|
|
|
3993
4483
|
};
|
|
3994
4484
|
}
|
|
3995
4485
|
|
|
4486
|
+
function indexOf(highlight, items, list) {
|
|
4487
|
+
const pinnedIndex = items.findIndex(({
|
|
4488
|
+
key
|
|
4489
|
+
}) => key === highlight.key);
|
|
4490
|
+
if (highlight.list !== list) {
|
|
4491
|
+
return 0;
|
|
4492
|
+
} else if (pinnedIndex >= 0) {
|
|
4493
|
+
return pinnedIndex;
|
|
4494
|
+
} else {
|
|
4495
|
+
return highlight.index;
|
|
4496
|
+
}
|
|
4497
|
+
}
|
|
3996
4498
|
// Remembering which list the index belongs to puts the highlight back on the
|
|
3997
4499
|
// first item whenever a new list replaces it, without an effect to reset it.
|
|
3998
|
-
// A list that grows
|
|
3999
|
-
|
|
4500
|
+
// A list that grows, fills in, or reorders under the same `list` keeps its
|
|
4501
|
+
// highlight on the same item, found again by key.
|
|
4502
|
+
// Disabled, nothing is highlighted and the keys and pointer leave it alone.
|
|
4503
|
+
function useResultNavigation(items, list, enabled = true) {
|
|
4000
4504
|
const [highlight, setHighlight] = React__default.useState({
|
|
4001
4505
|
index: 0,
|
|
4002
4506
|
list
|
|
4003
4507
|
});
|
|
4004
|
-
const highlightedIndex = highlight
|
|
4005
|
-
const highlighted = items[highlightedIndex];
|
|
4508
|
+
const highlightedIndex = indexOf(highlight, items, list);
|
|
4509
|
+
const highlighted = enabled ? items[highlightedIndex] : undefined;
|
|
4006
4510
|
const {
|
|
4007
4511
|
copiedUrl,
|
|
4008
4512
|
copy
|
|
4009
4513
|
} = useCopyLink();
|
|
4010
|
-
const highlightIndex = React__default.useCallback(index =>
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4514
|
+
const highlightIndex = React__default.useCallback(index => {
|
|
4515
|
+
var _a;
|
|
4516
|
+
if (!enabled) return;
|
|
4517
|
+
const key = (_a = items[index]) === null || _a === void 0 ? void 0 : _a.key;
|
|
4518
|
+
setHighlight(current => current.list === list && current.index === index && current.key === key ? current : {
|
|
4519
|
+
index,
|
|
4520
|
+
key,
|
|
4521
|
+
list
|
|
4522
|
+
});
|
|
4523
|
+
}, [enabled, items, list]);
|
|
4014
4524
|
const handleKeyDown = event => {
|
|
4525
|
+
if (!enabled) return;
|
|
4015
4526
|
const step = verticalStep(event.key);
|
|
4016
4527
|
if (step && items.length > 0) {
|
|
4017
4528
|
event.preventDefault();
|
|
@@ -4035,41 +4546,89 @@ function useResultNavigation(items, list) {
|
|
|
4035
4546
|
};
|
|
4036
4547
|
}
|
|
4037
4548
|
|
|
4038
|
-
|
|
4549
|
+
var styles$k = {"modal":"modal-NR3TO","visuallyHidden":"visuallyHidden-C28ju","panel":"panel-HlF7S"};
|
|
4550
|
+
|
|
4551
|
+
const FALLBACK_SLUGS = ["people", "services"];
|
|
4552
|
+
function defaultProduct(products, appName) {
|
|
4553
|
+
var _a;
|
|
4554
|
+
const current = products.find(product => product.appName === appName);
|
|
4555
|
+
const fallback = FALLBACK_SLUGS.map(slug => products.find(product => product.slug === slug)).find(Boolean);
|
|
4556
|
+
return (_a = current !== null && current !== void 0 ? current : fallback) !== null && _a !== void 0 ? _a : products[0];
|
|
4557
|
+
}
|
|
4558
|
+
|
|
4559
|
+
function groupSections(groups = [], timeZone) {
|
|
4039
4560
|
return groups.map(({
|
|
4040
4561
|
results,
|
|
4041
4562
|
type
|
|
4042
4563
|
}) => ({
|
|
4043
4564
|
heading: type,
|
|
4044
|
-
items: results.map(resultItem),
|
|
4565
|
+
items: results.map(result => resultItem(result, timeZone)),
|
|
4045
4566
|
key: type
|
|
4046
4567
|
}));
|
|
4047
4568
|
}
|
|
4048
4569
|
function resultItem({
|
|
4049
4570
|
attributes,
|
|
4050
4571
|
id
|
|
4051
|
-
}) {
|
|
4572
|
+
}, timeZone) {
|
|
4052
4573
|
return {
|
|
4574
|
+
category: attributes.category,
|
|
4575
|
+
imageUrl: attributes.image_url,
|
|
4053
4576
|
key: id,
|
|
4054
|
-
|
|
4577
|
+
product: attributes.product,
|
|
4578
|
+
subtitle: summarize(attributes, timeZone),
|
|
4055
4579
|
title: attributes.title,
|
|
4056
4580
|
url: attributes.url
|
|
4057
4581
|
};
|
|
4058
4582
|
}
|
|
4059
|
-
function visitItem(visit) {
|
|
4583
|
+
function visitItem(visit, timeZone) {
|
|
4060
4584
|
return {
|
|
4061
4585
|
key: entryKey(visit.entry),
|
|
4062
|
-
...describeVisit(visit)
|
|
4586
|
+
...describeVisit(visit, timeZone)
|
|
4063
4587
|
};
|
|
4064
4588
|
}
|
|
4065
|
-
|
|
4066
|
-
|
|
4589
|
+
const joinParts = (...parts) => parts.filter(Boolean).join(" · ");
|
|
4590
|
+
// Matches home-mobile's search subtitles, so a result reads the same in both.
|
|
4591
|
+
function summarize({
|
|
4592
|
+
category,
|
|
4593
|
+
metadata
|
|
4594
|
+
}, timeZone) {
|
|
4595
|
+
const text = key => {
|
|
4596
|
+
const value = metadata === null || metadata === void 0 ? void 0 : metadata[key];
|
|
4597
|
+
return typeof value === "string" ? value : "";
|
|
4598
|
+
};
|
|
4599
|
+
if (category === "profile") {
|
|
4600
|
+
return joinParts(text("phone"), text("email"));
|
|
4601
|
+
} else if (category === "event") {
|
|
4602
|
+
return eventTime(text("starts_at"), text("ends_at"), {
|
|
4603
|
+
recurring: (metadata === null || metadata === void 0 ? void 0 : metadata.recurring) === true,
|
|
4604
|
+
timeZone
|
|
4605
|
+
});
|
|
4606
|
+
} else {
|
|
4607
|
+
return text("details");
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
// "Oct 25, 9–10:30am", in the organization's time zone like the rest
|
|
4611
|
+
// of Planning Center.
|
|
4612
|
+
function eventTime(startsAt, endsAt, {
|
|
4613
|
+
recurring,
|
|
4614
|
+
timeZone
|
|
4615
|
+
}) {
|
|
4616
|
+
if (startsAt === "") {
|
|
4617
|
+
return "";
|
|
4618
|
+
} else {
|
|
4619
|
+
const time = datetimeFmt.datetime(startsAt, endsAt || null, {
|
|
4620
|
+
style: "abbreviated",
|
|
4621
|
+
...(timeZone && {
|
|
4622
|
+
timeZone
|
|
4623
|
+
})
|
|
4624
|
+
});
|
|
4625
|
+
return recurring ? joinParts(time, "Repeating") : time;
|
|
4626
|
+
}
|
|
4067
4627
|
}
|
|
4068
4628
|
// Unlike search results, recents come from every product, so each one names
|
|
4069
|
-
// its product
|
|
4070
|
-
function describeVisit(visit) {
|
|
4629
|
+
// its type. The row's product icon says which product it came from.
|
|
4630
|
+
function describeVisit(visit, timeZone) {
|
|
4071
4631
|
var _a, _b;
|
|
4072
|
-
const subtitle = (...parts) => parts.filter(Boolean).join(" · ");
|
|
4073
4632
|
if (visit.status === "page") {
|
|
4074
4633
|
const {
|
|
4075
4634
|
app,
|
|
@@ -4077,65 +4636,313 @@ function describeVisit(visit) {
|
|
|
4077
4636
|
title
|
|
4078
4637
|
} = visit.entry;
|
|
4079
4638
|
return {
|
|
4080
|
-
|
|
4639
|
+
category: "generic",
|
|
4640
|
+
imageUrl: null,
|
|
4641
|
+
product: app,
|
|
4642
|
+
subtitle: joinParts(capitalize((_a = metadata === null || metadata === void 0 ? void 0 : metadata.type) !== null && _a !== void 0 ? _a : ""), (_b = metadata === null || metadata === void 0 ? void 0 : metadata.details) !== null && _b !== void 0 ? _b : ""),
|
|
4081
4643
|
title,
|
|
4082
4644
|
url: visit.url
|
|
4083
4645
|
};
|
|
4084
4646
|
} else {
|
|
4085
4647
|
const {
|
|
4086
|
-
|
|
4648
|
+
attributes
|
|
4649
|
+
} = visit.result;
|
|
4650
|
+
const {
|
|
4651
|
+
category,
|
|
4652
|
+
image_url,
|
|
4087
4653
|
product,
|
|
4088
4654
|
title,
|
|
4089
4655
|
type
|
|
4090
|
-
} =
|
|
4656
|
+
} = attributes;
|
|
4657
|
+
// Profiles and events say what they are with a phone number or a date.
|
|
4658
|
+
const kind = category === "generic" ? capitalize(pluralize.singular(type)) : "";
|
|
4091
4659
|
return {
|
|
4092
|
-
|
|
4660
|
+
category,
|
|
4661
|
+
imageUrl: image_url,
|
|
4662
|
+
product,
|
|
4663
|
+
subtitle: joinParts(kind, summarize(attributes, timeZone)),
|
|
4093
4664
|
title,
|
|
4094
4665
|
url: visit.url
|
|
4095
4666
|
};
|
|
4096
4667
|
}
|
|
4097
4668
|
}
|
|
4098
|
-
// check-ins → Check-Ins
|
|
4099
|
-
function productName(slug) {
|
|
4100
|
-
return slug.split("-").map(capitalize).join("-");
|
|
4101
|
-
}
|
|
4102
4669
|
function capitalize(word) {
|
|
4103
4670
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
4104
4671
|
}
|
|
4105
4672
|
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
}
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4673
|
+
var styles$j = {"container":"container-YDdM1","hint":"hint-017Rd","keycap":"keycap-ENJM2","labels":"labels-GHPqL","copied":"copied-DUFa1"};
|
|
4674
|
+
|
|
4675
|
+
const SYMBOLS = {
|
|
4676
|
+
command: {
|
|
4677
|
+
label: "⌘",
|
|
4678
|
+
paths: ["M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10"]
|
|
4679
|
+
},
|
|
4680
|
+
down: {
|
|
4681
|
+
label: "↓",
|
|
4682
|
+
paths: ["M12 6l0 12", "M16 14l-4 4", "M8 14l4 4"]
|
|
4683
|
+
},
|
|
4684
|
+
return: {
|
|
4685
|
+
label: "↵",
|
|
4686
|
+
paths: ["M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4"]
|
|
4687
|
+
},
|
|
4688
|
+
up: {
|
|
4689
|
+
label: "↑",
|
|
4690
|
+
paths: ["M12 6l0 12", "M16 10l-4 -4", "M8 10l4 -4"]
|
|
4119
4691
|
}
|
|
4692
|
+
};
|
|
4693
|
+
function Keycap(props) {
|
|
4694
|
+
return /*#__PURE__*/React__default.createElement("kbd", {
|
|
4695
|
+
className: styles$j.keycap
|
|
4696
|
+
}, "symbol" in props ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("svg", {
|
|
4697
|
+
"aria-hidden": true,
|
|
4698
|
+
fill: "none",
|
|
4699
|
+
stroke: "currentColor",
|
|
4700
|
+
strokeLinecap: "round",
|
|
4701
|
+
strokeLinejoin: "round",
|
|
4702
|
+
viewBox: "0 0 24 24"
|
|
4703
|
+
}, SYMBOLS[props.symbol].paths.map(d => (/*#__PURE__*/React__default.createElement("path", {
|
|
4704
|
+
d: d,
|
|
4705
|
+
key: d
|
|
4706
|
+
})))), /*#__PURE__*/React__default.createElement("span", {
|
|
4707
|
+
className: styles$k.visuallyHidden
|
|
4708
|
+
}, SYMBOLS[props.symbol].label))) : props.label);
|
|
4709
|
+
}
|
|
4710
|
+
function CommandKey() {
|
|
4711
|
+
return isMac() ? /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4712
|
+
symbol: "command"
|
|
4713
|
+
}) : /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4714
|
+
label: "Ctrl"
|
|
4715
|
+
});
|
|
4120
4716
|
}
|
|
4121
|
-
function
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4717
|
+
function EnterKey() {
|
|
4718
|
+
return isMac() ? /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4719
|
+
symbol: "return"
|
|
4720
|
+
}) : /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4721
|
+
label: "Enter"
|
|
4722
|
+
});
|
|
4126
4723
|
}
|
|
4127
|
-
|
|
4724
|
+
const {
|
|
4725
|
+
copyLink,
|
|
4726
|
+
openInNewTab,
|
|
4727
|
+
openSearch,
|
|
4728
|
+
select
|
|
4729
|
+
} = KEYBOARD_SHORTCUTS;
|
|
4128
4730
|
function KeyboardHints({
|
|
4129
4731
|
copied
|
|
4130
4732
|
}) {
|
|
4131
|
-
|
|
4132
|
-
|
|
4733
|
+
return /*#__PURE__*/React__default.createElement("ul", {
|
|
4734
|
+
"aria-label": "Keyboard shortcuts",
|
|
4735
|
+
className: styles$j.container,
|
|
4736
|
+
"data-platform": isMac() ? "mac" : "pc"
|
|
4737
|
+
}, /*#__PURE__*/React__default.createElement("li", {
|
|
4738
|
+
className: styles$j.hint
|
|
4739
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
4740
|
+
gap: 0.5
|
|
4741
|
+
}, select.modifierKey, /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4742
|
+
symbol: "up"
|
|
4743
|
+
}), /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4744
|
+
symbol: "down"
|
|
4745
|
+
})), select.label), /*#__PURE__*/React__default.createElement("li", {
|
|
4746
|
+
className: styles$j.hint
|
|
4747
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
4748
|
+
gap: 0.5
|
|
4749
|
+
}, /*#__PURE__*/React__default.createElement(CommandKey, null), /*#__PURE__*/React__default.createElement(EnterKey, null)), openInNewTab.label), /*#__PURE__*/React__default.createElement("li", {
|
|
4750
|
+
className: classnames(styles$j.hint, copied && styles$j.copied),
|
|
4751
|
+
style: {
|
|
4752
|
+
"--copied-active": `${COPIED_TIMING.active}ms`,
|
|
4753
|
+
"--copied-enter": `${COPIED_TIMING.enter}ms`,
|
|
4754
|
+
"--copied-exit": `${COPIED_TIMING.exit}ms`
|
|
4755
|
+
}
|
|
4756
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
4757
|
+
gap: 0.5
|
|
4758
|
+
}, /*#__PURE__*/React__default.createElement(CommandKey, null), /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4759
|
+
label: copyLink.key.toUpperCase()
|
|
4760
|
+
})), /*#__PURE__*/React__default.createElement("span", {
|
|
4761
|
+
className: styles$j.labels
|
|
4762
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4763
|
+
"aria-hidden": copied
|
|
4764
|
+
}, copyLink.label), /*#__PURE__*/React__default.createElement("span", {
|
|
4133
4765
|
role: "status"
|
|
4134
|
-
}, copied
|
|
4766
|
+
}, copied && "Copied!"))), /*#__PURE__*/React__default.createElement("li", {
|
|
4767
|
+
className: styles$j.hint
|
|
4768
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
4769
|
+
gap: 0.5
|
|
4770
|
+
}, /*#__PURE__*/React__default.createElement(CommandKey, null), /*#__PURE__*/React__default.createElement(Keycap, {
|
|
4771
|
+
label: openSearch.key.toUpperCase()
|
|
4772
|
+
})), openSearch.label));
|
|
4773
|
+
}
|
|
4774
|
+
|
|
4775
|
+
var styles$i = {"icon":"icon-XKLvN","squircle":"squircle-JCHr6"};
|
|
4776
|
+
|
|
4777
|
+
const PRODUCTS = {
|
|
4778
|
+
accounts: {
|
|
4779
|
+
gradient: "--t-fill-color-product-accounts-gradient-brand",
|
|
4780
|
+
path: logomarks.accounts
|
|
4781
|
+
},
|
|
4782
|
+
api: {
|
|
4783
|
+
gradient: "--t-fill-color-product-api-gradient-brand",
|
|
4784
|
+
path: logomarks.api
|
|
4785
|
+
},
|
|
4786
|
+
calendar: {
|
|
4787
|
+
gradient: "--t-fill-color-product-calendar-gradient-brand",
|
|
4788
|
+
path: logomarks.calendar
|
|
4789
|
+
},
|
|
4790
|
+
"check-ins": {
|
|
4791
|
+
gradient: "--t-fill-color-product-checkins-gradient-brand",
|
|
4792
|
+
path: logomarks.checkIns
|
|
4793
|
+
},
|
|
4794
|
+
"church-center": {
|
|
4795
|
+
gradient: "--t-fill-color-product-cc-gradient-brand",
|
|
4796
|
+
path: logomarks.churchCenter
|
|
4797
|
+
},
|
|
4798
|
+
giving: {
|
|
4799
|
+
gradient: "--t-fill-color-product-giving-gradient-brand",
|
|
4800
|
+
path: logomarks.giving
|
|
4801
|
+
},
|
|
4802
|
+
groups: {
|
|
4803
|
+
gradient: "--t-fill-color-product-groups-gradient-brand",
|
|
4804
|
+
path: logomarks.groups
|
|
4805
|
+
},
|
|
4806
|
+
home: {
|
|
4807
|
+
gradient: "--t-fill-color-product-home-gradient-brand",
|
|
4808
|
+
path: logomarks.home
|
|
4809
|
+
},
|
|
4810
|
+
"music-stand": {
|
|
4811
|
+
gradient: "--t-fill-color-product-musicstand-gradient-brand",
|
|
4812
|
+
path: logomarks.musicStand
|
|
4813
|
+
},
|
|
4814
|
+
people: {
|
|
4815
|
+
gradient: "--t-fill-color-product-people-gradient-brand",
|
|
4816
|
+
path: logomarks.people
|
|
4817
|
+
},
|
|
4818
|
+
publishing: {
|
|
4819
|
+
gradient: "--t-fill-color-product-publishing-gradient-brand",
|
|
4820
|
+
path: logomarks.publishing
|
|
4821
|
+
},
|
|
4822
|
+
registrations: {
|
|
4823
|
+
gradient: "--t-fill-color-product-registrations-gradient-brand",
|
|
4824
|
+
path: logomarks.registrations
|
|
4825
|
+
},
|
|
4826
|
+
services: {
|
|
4827
|
+
gradient: "--t-fill-color-product-services-gradient-brand",
|
|
4828
|
+
path: logomarks.services
|
|
4829
|
+
}
|
|
4830
|
+
};
|
|
4831
|
+
const isProductIconSlug = slug => Object.prototype.hasOwnProperty.call(PRODUCTS, slug);
|
|
4832
|
+
const maskFor = path => `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="${path}"/></svg>`)}")`;
|
|
4833
|
+
function ProductIcon({
|
|
4834
|
+
size = 16,
|
|
4835
|
+
slug
|
|
4836
|
+
}) {
|
|
4837
|
+
const {
|
|
4838
|
+
gradient,
|
|
4839
|
+
path
|
|
4840
|
+
} = PRODUCTS[slug];
|
|
4841
|
+
const mask = maskFor(path);
|
|
4842
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
4843
|
+
"aria-hidden": true,
|
|
4844
|
+
className: styles$i.icon,
|
|
4845
|
+
style: {
|
|
4846
|
+
height: size,
|
|
4847
|
+
width: size
|
|
4848
|
+
}
|
|
4849
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4850
|
+
className: styles$i.squircle,
|
|
4851
|
+
style: {
|
|
4852
|
+
WebkitMaskImage: mask,
|
|
4853
|
+
background: `var(${gradient})`,
|
|
4854
|
+
maskImage: mask
|
|
4855
|
+
}
|
|
4856
|
+
}));
|
|
4857
|
+
}
|
|
4858
|
+
|
|
4859
|
+
var styles$h = {"picker":"picker-iuzzj","option":"option--7LXg"};
|
|
4860
|
+
|
|
4861
|
+
// Phones have no room for a tab per product, so they pick from a dropdown.
|
|
4862
|
+
// Complex mode renders each option's logomark, in the list and the trigger.
|
|
4863
|
+
function ProductSelect({
|
|
4864
|
+
children,
|
|
4865
|
+
onSelect,
|
|
4866
|
+
products,
|
|
4867
|
+
selected
|
|
4868
|
+
}) {
|
|
4869
|
+
const options = products.map(({
|
|
4870
|
+
appName,
|
|
4871
|
+
slug
|
|
4872
|
+
}) => ({
|
|
4873
|
+
label: (/*#__PURE__*/React__default.createElement("span", {
|
|
4874
|
+
className: styles$h.option
|
|
4875
|
+
}, /*#__PURE__*/React__default.createElement(ProductIcon, {
|
|
4876
|
+
slug: slug
|
|
4877
|
+
}), appName)),
|
|
4878
|
+
textValue: appName,
|
|
4879
|
+
value: slug
|
|
4880
|
+
}));
|
|
4881
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
4882
|
+
className: styles$h.picker
|
|
4883
|
+
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
4884
|
+
"aria-label": "Product",
|
|
4885
|
+
complex: true,
|
|
4886
|
+
onChange: event => onSelect(event.target.value),
|
|
4887
|
+
options: options,
|
|
4888
|
+
value: selected.slug
|
|
4889
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
4890
|
+
className: styles$k.panel
|
|
4891
|
+
}, children));
|
|
4892
|
+
}
|
|
4893
|
+
|
|
4894
|
+
// Browsers match :focus-visible on every focused text field, keyboard or not,
|
|
4895
|
+
// since typing follows either way. So this remembers what last moved focus,
|
|
4896
|
+
// shared by every field and listened for once, in the capture phase so it's
|
|
4897
|
+
// known before focus moves.
|
|
4898
|
+
let lastInteraction = "pointer";
|
|
4899
|
+
let listening = false;
|
|
4900
|
+
function listen() {
|
|
4901
|
+
if (listening) return;
|
|
4902
|
+
listening = true;
|
|
4903
|
+
document.addEventListener("keydown", event => {
|
|
4904
|
+
// Shortcuts like ⌘C don't move focus.
|
|
4905
|
+
if (!event.metaKey && !event.ctrlKey && !event.altKey) {
|
|
4906
|
+
lastInteraction = "keyboard";
|
|
4907
|
+
}
|
|
4908
|
+
}, true);
|
|
4909
|
+
document.addEventListener("pointerdown", () => {
|
|
4910
|
+
lastInteraction = "pointer";
|
|
4911
|
+
}, true);
|
|
4912
|
+
}
|
|
4913
|
+
/**
|
|
4914
|
+
* Whether a field was focused from the keyboard, as by Tab, rather than by a
|
|
4915
|
+
* click or tap. Spread `focusProps` onto the field, and style it by
|
|
4916
|
+
* `data-focus-visible`.
|
|
4917
|
+
*/
|
|
4918
|
+
function useKeyboardFocus({
|
|
4919
|
+
onBlur,
|
|
4920
|
+
onFocus
|
|
4921
|
+
} = {}) {
|
|
4922
|
+
const [focusVisible, setFocusVisible] = React__default.useState(false);
|
|
4923
|
+
React__default.useEffect(listen, []);
|
|
4924
|
+
return {
|
|
4925
|
+
focusProps: {
|
|
4926
|
+
"data-focus-visible": focusVisible || undefined,
|
|
4927
|
+
onBlur: event => {
|
|
4928
|
+
setFocusVisible(false);
|
|
4929
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
4930
|
+
},
|
|
4931
|
+
onFocus: event => {
|
|
4932
|
+
const keyboard = lastInteraction === "keyboard";
|
|
4933
|
+
setFocusVisible(keyboard);
|
|
4934
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event, keyboard);
|
|
4935
|
+
}
|
|
4936
|
+
},
|
|
4937
|
+
focusVisible
|
|
4938
|
+
};
|
|
4135
4939
|
}
|
|
4136
4940
|
|
|
4137
|
-
var styles$
|
|
4941
|
+
var styles$g = {"tablist":"tablist-7ASvc","tab":"tab-dz8ki"};
|
|
4138
4942
|
|
|
4943
|
+
// With this many tabs or more, only the selected tab shows its name, so they
|
|
4944
|
+
// all fit. Fewer always fit with their names.
|
|
4945
|
+
const ICON_ONLY_TAB_COUNT = 5;
|
|
4139
4946
|
function ProductTabs({
|
|
4140
4947
|
children,
|
|
4141
4948
|
onKeyDown,
|
|
@@ -4146,6 +4953,7 @@ function ProductTabs({
|
|
|
4146
4953
|
const id = useInstanceId("product-tabs");
|
|
4147
4954
|
const tabId = slug => `${id}-tab-${slug}`;
|
|
4148
4955
|
const tabRefs = React__default.useRef(new Map());
|
|
4956
|
+
const showAllNames = products.length < ICON_ONLY_TAB_COUNT;
|
|
4149
4957
|
const handleKeyDown = event => {
|
|
4150
4958
|
var _a;
|
|
4151
4959
|
const offset = horizontalStep(event.key);
|
|
@@ -4160,13 +4968,13 @@ function ProductTabs({
|
|
|
4160
4968
|
}
|
|
4161
4969
|
};
|
|
4162
4970
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
4163
|
-
"aria-label": "
|
|
4971
|
+
"aria-label": "Search in",
|
|
4972
|
+
className: styles$g.tablist,
|
|
4164
4973
|
onKeyDown: handleKeyDown,
|
|
4165
4974
|
role: "tablist"
|
|
4166
|
-
}, products.map(product => (/*#__PURE__*/React__default.createElement(
|
|
4975
|
+
}, products.map(product => (/*#__PURE__*/React__default.createElement(Tab, {
|
|
4167
4976
|
"aria-controls": `${id}-panel`,
|
|
4168
4977
|
"aria-selected": product === selected,
|
|
4169
|
-
className: styles$d.tab,
|
|
4170
4978
|
id: tabId(product.slug),
|
|
4171
4979
|
key: product.slug,
|
|
4172
4980
|
onClick: () => onSelect(product.slug),
|
|
@@ -4177,15 +4985,392 @@ function ProductTabs({
|
|
|
4177
4985
|
tabRefs.current.delete(product.slug);
|
|
4178
4986
|
}
|
|
4179
4987
|
},
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
}, product.appName
|
|
4988
|
+
tabIndex: product === selected ? 0 : -1
|
|
4989
|
+
}, /*#__PURE__*/React__default.createElement(ProductIcon, {
|
|
4990
|
+
slug: product.slug
|
|
4991
|
+
}), showAllNames || product === selected ? product.appName : (/*#__PURE__*/React__default.createElement("span", {
|
|
4992
|
+
className: styles$k.visuallyHidden
|
|
4993
|
+
}, product.appName)))))), /*#__PURE__*/React__default.createElement("div", {
|
|
4184
4994
|
"aria-labelledby": tabId(selected.slug),
|
|
4995
|
+
className: styles$k.panel,
|
|
4185
4996
|
id: `${id}-panel`,
|
|
4186
4997
|
role: "tabpanel"
|
|
4187
4998
|
}, children));
|
|
4188
4999
|
}
|
|
5000
|
+
// The modal's focus scope moves focus here by script when Tab is pressed, and
|
|
5001
|
+
// Safari doesn't match :focus-visible on focus moved by script. So the tab
|
|
5002
|
+
// remembers whether the keyboard brought focus, and the ring keys off that.
|
|
5003
|
+
const Tab = /*#__PURE__*/React__default.forwardRef(function Tab(props, ref) {
|
|
5004
|
+
const {
|
|
5005
|
+
focusProps
|
|
5006
|
+
} = useKeyboardFocus();
|
|
5007
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
5008
|
+
className: styles$g.tab,
|
|
5009
|
+
ref: ref,
|
|
5010
|
+
role: "tab",
|
|
5011
|
+
type: "button",
|
|
5012
|
+
...props,
|
|
5013
|
+
...focusProps
|
|
5014
|
+
});
|
|
5015
|
+
});
|
|
5016
|
+
|
|
5017
|
+
function BlankStateRecentlyVisited(props) {
|
|
5018
|
+
const id = useInstanceId("blank-state-initial");
|
|
5019
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
5020
|
+
viewBox: "0 0 197 174",
|
|
5021
|
+
fill: "none",
|
|
5022
|
+
"aria-hidden": "true",
|
|
5023
|
+
focusable: "false",
|
|
5024
|
+
...props
|
|
5025
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5026
|
+
d: "M139.863 32.119c10.938 10.028 21.777 20.154 32.912 30.084 8.376 7.373 21.975 15.828 23.157 28.02.592 6.095-2.167 11.993-5.321 17.204-24.635 40.8-81.098 67.148-127.412 48.862-30.646-12.093-76.172-47.387-59.716-85.041 15.865-36.377 64.84-55.056 83.957-57.71 21.876-4.621 34.883 2.457 52.423 18.58Z",
|
|
5027
|
+
fill: "currentColor"
|
|
5028
|
+
}), /*#__PURE__*/React__default.createElement("g", {
|
|
5029
|
+
clipPath: `url(#${id}-a)`
|
|
5030
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5031
|
+
d: "M115.885 109.31c-.478-.686-.01-1.845 1.046-2.589s2.3-.791 2.778-.105c.478.686.009 1.845-1.047 2.589-1.056.744-2.299.791-2.777.105Z",
|
|
5032
|
+
fill: "#333"
|
|
5033
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5034
|
+
d: "M123.403 113.599c-3.456 0-6.259-2.817-6.259-6.293 0-3.475 2.803-6.293 6.259-6.293 3.457 0 6.259 2.818 6.259 6.293 0 3.476-2.802 6.293-6.259 6.293Z",
|
|
5035
|
+
fill: "#333"
|
|
5036
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5037
|
+
d: "M118.853 100.968a2.85 2.85 0 0 0 2.832-2.484 2.89 2.89 0 0 0-.071-1.115c-2.638-9.955-9.668-9.687-9.964-9.665l.311 5.716h-.104c.119 0 2.853.134 4.254 5.421a2.874 2.874 0 0 0 1.013 1.53 2.846 2.846 0 0 0 1.729.597Z",
|
|
5038
|
+
fill: "#4D4D4D"
|
|
5039
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5040
|
+
d: "M114.96 100.503c-.462-5.894 2.796-10.96 7.279-11.315 4.482-.356 8.491 4.134 8.953 10.027.462 5.894-2.796 10.96-7.279 11.315-4.482.356-8.491-4.134-8.953-10.027Z",
|
|
5041
|
+
fill: "#F2F2F2"
|
|
5042
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5043
|
+
d: "M125.964 107.738c-4.48.354-8.489-4.135-8.953-10.026a12.893 12.893 0 0 1 1.223-6.707c-2.249 2.046-3.591 5.59-3.283 9.505.463 5.895 4.469 10.384 8.953 10.027 2.594-.205 4.765-1.986 6.055-4.591a6.682 6.682 0 0 1-3.995 1.792Z",
|
|
5044
|
+
fill: "#E6E6E6"
|
|
5045
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5046
|
+
d: "M115.885 109.31c-.478-.686-.01-1.845 1.046-2.589s2.3-.791 2.778-.105c.478.686.009 1.845-1.047 2.589-1.056.744-2.299.791-2.777.105Z",
|
|
5047
|
+
fill: "#333"
|
|
5048
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5049
|
+
d: "M123.403 113.599c-3.456 0-6.259-2.817-6.259-6.293 0-3.475 2.803-6.293 6.259-6.293 3.457 0 6.259 2.818 6.259 6.293 0 3.476-2.802 6.293-6.259 6.293Z",
|
|
5050
|
+
fill: "#333"
|
|
5051
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5052
|
+
d: "M118.853 100.968a2.85 2.85 0 0 0 2.832-2.484 2.89 2.89 0 0 0-.071-1.115c-2.638-9.955-9.668-9.687-9.964-9.665l.311 5.716h-.104c.119 0 2.853.134 4.254 5.421a2.874 2.874 0 0 0 1.013 1.53 2.846 2.846 0 0 0 1.729.597Z",
|
|
5053
|
+
fill: "#4D4D4D"
|
|
5054
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5055
|
+
d: "M114.96 100.503c-.462-5.894 2.796-10.96 7.279-11.315 4.482-.356 8.491 4.134 8.953 10.027.462 5.894-2.796 10.96-7.279 11.315-4.482.356-8.491-4.134-8.953-10.027Z",
|
|
5056
|
+
fill: "#F2F2F2"
|
|
5057
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5058
|
+
d: "M125.964 107.738c-4.48.354-8.489-4.135-8.953-10.026a12.893 12.893 0 0 1 1.223-6.707c-2.249 2.046-3.591 5.59-3.283 9.505.463 5.895 4.469 10.384 8.953 10.027 2.594-.205 4.765-1.986 6.055-4.591a6.682 6.682 0 0 1-3.995 1.792Z",
|
|
5059
|
+
fill: "#E6E6E6"
|
|
5060
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5061
|
+
d: "M89.317 121.331a2.836 2.836 0 0 1-1.92-.752 2.869 2.869 0 0 1-.911-1.857c-.534-5.726 3.527-13.808 3.99-14.713a2.849 2.849 0 0 1 1.666-1.413 2.835 2.835 0 0 1 2.172.185 2.86 2.86 0 0 1 1.405 1.675 2.876 2.876 0 0 1-.184 2.183c-1.46 2.843-3.669 8.492-3.383 11.551a2.868 2.868 0 0 1-1.504 2.797 2.84 2.84 0 0 1-1.064.318 1.378 1.378 0 0 1-.267.026Z",
|
|
5062
|
+
fill: "#4D4D4D"
|
|
5063
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5064
|
+
d: "M92.155 112.314c3.308 0 5.989-2.696 5.989-6.021 0-3.326-2.681-6.021-5.989-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
|
|
5065
|
+
fill: "gray"
|
|
5066
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5067
|
+
d: "M80.597 128.771h11.769v3.726a1.118 1.118 0 0 1-1.112 1.118H78.57a1.118 1.118 0 0 1-1.112-1.118v-.566c0-.841.332-1.648.924-2.242a3.144 3.144 0 0 1 2.23-.929l-.015.011Z",
|
|
5068
|
+
fill: "#333"
|
|
5069
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5070
|
+
d: "M89.572 132.084s8.075.119 6.3-8.268c-1.775-8.387-12.188-15.351-15.234-6.066-3.046 9.285-1.386 15.232 8.934 14.334Z",
|
|
5071
|
+
fill: "#F2F2F2"
|
|
5072
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5073
|
+
d: "M106.67 121.334h-.27a2.84 2.84 0 0 1-1.925-1.025 2.872 2.872 0 0 1-.639-2.093c.285-3.059-1.92-8.708-3.38-11.551a2.873 2.873 0 0 1 1.296-3.721 2.832 2.832 0 0 1 2.102-.199 2.848 2.848 0 0 1 1.66 1.312c.463.906 4.521 8.991 3.988 14.714a2.874 2.874 0 0 1-.926 1.828 2.832 2.832 0 0 1-1.906.735Z",
|
|
5074
|
+
fill: "#4D4D4D"
|
|
5075
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5076
|
+
d: "M103.835 112.314c3.307 0 5.988-2.696 5.988-6.021 0-3.326-2.681-6.021-5.988-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
|
|
5077
|
+
fill: "gray"
|
|
5078
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5079
|
+
d: "m117.408 133.652-12.674-.002c-.295 0-.577-.118-.786-.328a1.121 1.121 0 0 1-.325-.79v-3.726l11.773.002c.837 0 1.639.334 2.23.929s.923 1.401.923 2.242v.567a1.116 1.116 0 0 1-1.141 1.106Z",
|
|
5080
|
+
fill: "#333"
|
|
5081
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5082
|
+
d: "M106.414 132.084s-8.075.119-6.318-8.268c1.756-8.387 12.195-15.343 15.237-6.062 3.043 9.281 1.405 15.235-8.919 14.33Z",
|
|
5083
|
+
fill: "#F2F2F2"
|
|
5084
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5085
|
+
d: "M109.107 94.58a2.305 2.305 0 0 0 2.191 2.412 2.302 2.302 0 0 0 2.399-2.202l.333-7.33a2.306 2.306 0 0 0-2.191-2.412 2.303 2.303 0 0 0-2.4 2.203l-.332 7.328Z",
|
|
5086
|
+
fill: "gray"
|
|
5087
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5088
|
+
d: "M80.968 109.31c.478-.686.01-1.845-1.047-2.589-1.056-.744-2.3-.791-2.777-.105-.478.686-.01 1.845 1.046 2.589s2.3.791 2.778.105Z",
|
|
5089
|
+
fill: "#333"
|
|
5090
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5091
|
+
d: "M73.448 113.599c3.457 0 6.26-2.817 6.26-6.293 0-3.475-2.803-6.293-6.26-6.293-3.456 0-6.258 2.818-6.258 6.293 0 3.476 2.802 6.293 6.258 6.293Z",
|
|
5092
|
+
fill: "#333"
|
|
5093
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5094
|
+
d: "M78 100.968a2.853 2.853 0 0 1-2.832-2.484 2.876 2.876 0 0 1 .07-1.115c2.639-9.955 9.669-9.687 9.965-9.665l-.311 5.716h.104c-.12 0-2.854.134-4.255 5.421a2.87 2.87 0 0 1-1.013 1.53 2.845 2.845 0 0 1-1.729.597Z",
|
|
5095
|
+
fill: "#4D4D4D"
|
|
5096
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5097
|
+
d: "M87.37 88.17a2.305 2.305 0 0 0-2.19-2.413 2.302 2.302 0 0 0-2.4 2.202l-.332 7.329a2.305 2.305 0 0 0 2.19 2.413 2.302 2.302 0 0 0 2.4-2.203l.332-7.328Z",
|
|
5098
|
+
fill: "gray"
|
|
5099
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5100
|
+
d: "M81.893 100.503c.462-5.894-2.797-10.96-7.28-11.315-4.482-.356-8.49 4.134-8.953 10.027-.462 5.894 2.797 10.96 7.28 11.315 4.482.356 8.49-4.134 8.953-10.027Z",
|
|
5101
|
+
fill: "#F2F2F2"
|
|
5102
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5103
|
+
d: "M70.888 107.738c4.48.354 8.49-4.135 8.953-10.026a12.89 12.89 0 0 0-1.223-6.707c2.25 2.046 3.591 5.59 3.284 9.505-.464 5.895-4.47 10.384-8.953 10.027-2.594-.205-4.766-1.986-6.055-4.591a6.682 6.682 0 0 0 3.994 1.792Z",
|
|
5104
|
+
fill: "#E6E6E6"
|
|
5105
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5106
|
+
d: "M112.717 94.105c-.511-9.095-7.459-11.703-15.82-11.226-8.36.477-14.97 3.856-14.451 12.951.518 9.095 7.707 16.081 16.067 15.605 8.36-.477 14.719-8.231 14.204-17.33Z",
|
|
5107
|
+
fill: "#F2F2F2"
|
|
5108
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5109
|
+
d: "M112.565 92.656c-1.056 7.496-6.799 13.413-14.059 13.812-7.852.451-14.67-5.686-15.897-13.965a14.571 14.571 0 0 0-.17 3.327c.51 9.095 7.704 16.081 16.067 15.605 8.364-.477 14.723-8.235 14.211-17.33a16.83 16.83 0 0 0-.152-1.45Z",
|
|
5110
|
+
fill: "#E6E6E6"
|
|
5111
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5112
|
+
d: "M103.546 90.353H91.61a.62.62 0 0 0-.619.623v1.762a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.762a.62.62 0 0 0-.619-.623Zm0 5.187H91.61a.62.62 0 0 0-.619.622v1.762a.62.62 0 0 0 .62.623h11.935a.62.62 0 0 0 .619-.623v-1.762a.62.62 0 0 0-.619-.622Zm-.004 5.19H91.606a.62.62 0 0 0-.619.622v1.763a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.763a.62.62 0 0 0-.619-.622Z",
|
|
5113
|
+
fill: "#3690EA"
|
|
5114
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5115
|
+
d: "M89.317 121.331a2.836 2.836 0 0 1-1.92-.752 2.869 2.869 0 0 1-.911-1.857c-.534-5.726 3.527-13.808 3.99-14.713a2.849 2.849 0 0 1 1.666-1.413 2.835 2.835 0 0 1 2.172.185 2.86 2.86 0 0 1 1.405 1.675 2.876 2.876 0 0 1-.184 2.183c-1.46 2.843-3.669 8.492-3.383 11.551a2.868 2.868 0 0 1-1.504 2.797 2.84 2.84 0 0 1-1.064.318 1.378 1.378 0 0 1-.267.026Z",
|
|
5116
|
+
fill: "#4D4D4D"
|
|
5117
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5118
|
+
d: "M92.155 112.314c3.308 0 5.989-2.696 5.989-6.021 0-3.326-2.681-6.021-5.989-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
|
|
5119
|
+
fill: "gray"
|
|
5120
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5121
|
+
d: "M80.597 128.771h11.769v3.726a1.118 1.118 0 0 1-1.112 1.118H78.57a1.118 1.118 0 0 1-1.112-1.118v-.566c0-.841.332-1.648.924-2.242a3.144 3.144 0 0 1 2.23-.929l-.015.011Z",
|
|
5122
|
+
fill: "#333"
|
|
5123
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5124
|
+
d: "M89.572 132.084s8.075.119 6.3-8.268c-1.775-8.387-12.188-15.351-15.234-6.066-3.046 9.285-1.386 15.232 8.934 14.334Z",
|
|
5125
|
+
fill: "#F2F2F2"
|
|
5126
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5127
|
+
d: "M106.67 121.334h-.27a2.84 2.84 0 0 1-1.925-1.025 2.872 2.872 0 0 1-.639-2.093c.285-3.059-1.92-8.708-3.38-11.551a2.873 2.873 0 0 1 1.296-3.721 2.832 2.832 0 0 1 2.102-.199 2.848 2.848 0 0 1 1.66 1.312c.463.906 4.521 8.991 3.988 14.714a2.874 2.874 0 0 1-.926 1.828 2.832 2.832 0 0 1-1.906.735Z",
|
|
5128
|
+
fill: "#4D4D4D"
|
|
5129
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5130
|
+
d: "M103.835 112.314c3.307 0 5.988-2.696 5.988-6.021 0-3.326-2.681-6.021-5.988-6.021-3.307 0-5.988 2.695-5.988 6.021 0 3.325 2.681 6.021 5.988 6.021Z",
|
|
5131
|
+
fill: "gray"
|
|
5132
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5133
|
+
d: "m117.408 133.652-12.674-.002c-.295 0-.577-.118-.786-.328a1.121 1.121 0 0 1-.325-.79v-3.726l11.773.002c.837 0 1.639.334 2.23.929s.923 1.401.923 2.242v.567a1.116 1.116 0 0 1-1.141 1.106Z",
|
|
5134
|
+
fill: "#333"
|
|
5135
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5136
|
+
d: "M106.414 132.084s-8.075.119-6.318-8.268c1.756-8.387 12.195-15.343 15.237-6.062 3.043 9.281 1.405 15.235-8.919 14.33Z",
|
|
5137
|
+
fill: "#F2F2F2"
|
|
5138
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5139
|
+
d: "M109.107 94.58a2.305 2.305 0 0 0 2.191 2.412 2.302 2.302 0 0 0 2.399-2.202l.333-7.33a2.306 2.306 0 0 0-2.191-2.412 2.303 2.303 0 0 0-2.4 2.203l-.332 7.328Z",
|
|
5140
|
+
fill: "gray"
|
|
5141
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5142
|
+
d: "M80.968 109.31c.478-.686.01-1.845-1.047-2.589-1.056-.744-2.3-.791-2.777-.105-.478.686-.01 1.845 1.046 2.589s2.3.791 2.778.105Z",
|
|
5143
|
+
fill: "#333"
|
|
5144
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5145
|
+
d: "M73.448 113.599c3.457 0 6.26-2.817 6.26-6.293 0-3.475-2.803-6.293-6.26-6.293-3.456 0-6.258 2.818-6.258 6.293 0 3.476 2.802 6.293 6.258 6.293Z",
|
|
5146
|
+
fill: "#333"
|
|
5147
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5148
|
+
d: "M78 100.968a2.853 2.853 0 0 1-2.832-2.484 2.876 2.876 0 0 1 .07-1.115c2.639-9.955 9.669-9.687 9.965-9.665l-.311 5.716h.104c-.12 0-2.854.134-4.255 5.421a2.87 2.87 0 0 1-1.013 1.53 2.845 2.845 0 0 1-1.729.597Z",
|
|
5149
|
+
fill: "#4D4D4D"
|
|
5150
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5151
|
+
d: "M87.37 88.17a2.305 2.305 0 0 0-2.19-2.413 2.302 2.302 0 0 0-2.4 2.202l-.332 7.329a2.305 2.305 0 0 0 2.19 2.413 2.302 2.302 0 0 0 2.4-2.203l.332-7.328Z",
|
|
5152
|
+
fill: "gray"
|
|
5153
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5154
|
+
d: "M81.893 100.503c.462-5.894-2.797-10.96-7.28-11.315-4.482-.356-8.49 4.134-8.953 10.027-.462 5.894 2.797 10.96 7.28 11.315 4.482.356 8.49-4.134 8.953-10.027Z",
|
|
5155
|
+
fill: "#F2F2F2"
|
|
5156
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5157
|
+
d: "M70.888 107.738c4.48.354 8.49-4.135 8.953-10.026a12.89 12.89 0 0 0-1.223-6.707c2.25 2.046 3.591 5.59 3.284 9.505-.464 5.895-4.47 10.384-8.953 10.027-2.594-.205-4.766-1.986-6.055-4.591a6.682 6.682 0 0 0 3.994 1.792Z",
|
|
5158
|
+
fill: "#E6E6E6"
|
|
5159
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5160
|
+
d: "M112.717 94.105c-.511-9.095-7.459-11.703-15.82-11.226-8.36.477-14.97 3.856-14.451 12.951.518 9.095 7.707 16.081 16.067 15.605 8.36-.477 14.719-8.231 14.204-17.33Z",
|
|
5161
|
+
fill: "#F2F2F2"
|
|
5162
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5163
|
+
d: "M112.565 92.656c-1.056 7.496-6.799 13.413-14.059 13.812-7.852.451-14.67-5.686-15.897-13.965a14.571 14.571 0 0 0-.17 3.327c.51 9.095 7.704 16.081 16.067 15.605 8.364-.477 14.723-8.235 14.211-17.33a16.83 16.83 0 0 0-.152-1.45Z",
|
|
5164
|
+
fill: "#E6E6E6"
|
|
5165
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5166
|
+
d: "M94.626 78.445c-.114-.488 6.548-.927 5.815.246v.775c0 .746.033 1.49.033 2.258s.037 1.595.044 2.392c.278.593-6.473.935-5.817-.115v-.67c-.015-1.63-.06-3.257-.075-4.886Z",
|
|
5167
|
+
fill: "#999"
|
|
5168
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5169
|
+
d: "M103.546 90.353H91.61a.62.62 0 0 0-.619.623v1.762a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.762a.62.62 0 0 0-.619-.623Zm0 5.187H91.61a.62.62 0 0 0-.619.622v1.762a.62.62 0 0 0 .62.623h11.935a.62.62 0 0 0 .619-.623v-1.762a.62.62 0 0 0-.619-.622Zm-.004 5.19H91.606a.62.62 0 0 0-.619.622v1.763a.62.62 0 0 0 .62.622h11.935a.62.62 0 0 0 .619-.622v-1.763a.62.62 0 0 0-.619-.622ZM55.773 64.004c4.349 0 7.874-5.285 7.874-11.804s-3.525-11.804-7.874-11.804-7.875 5.285-7.875 11.804c0 6.52 3.526 11.804 7.875 11.804Zm84.17.015c4.349 0 7.874-5.285 7.874-11.804 0-6.52-3.525-11.804-7.874-11.804s-7.875 5.285-7.875 11.804 3.526 11.804 7.875 11.804Z",
|
|
5170
|
+
fill: "#3690EA"
|
|
5171
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5172
|
+
d: "M97.962 29.036c7.273 0 13.17-2.224 13.17-4.967 0-2.743-5.897-4.966-13.17-4.966-7.274 0-13.17 2.223-13.17 4.966 0 2.743 5.896 4.967 13.17 4.967Z",
|
|
5173
|
+
fill: "#B3B3B3"
|
|
5174
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5175
|
+
d: "M97.962 16.55c4.545 0 8.23-3.705 8.23-8.275S102.507 0 97.962 0c-4.546 0-8.23 3.705-8.23 8.275s3.684 8.275 8.23 8.275Z",
|
|
5176
|
+
fill: "#3690EA"
|
|
5177
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5178
|
+
d: "M141.607 59.283V45.147a19.038 19.038 0 0 0-3.687-11.301 18.872 18.872 0 0 0-9.653-6.874c-8.838-2.69-19.203-4.24-30.29-4.244-11.088-.004-21.452 1.546-30.29 4.233a18.871 18.871 0 0 0-9.668 6.866 19.041 19.041 0 0 0-3.699 11.305v14.132a19.03 19.03 0 0 0 3.685 11.303 18.86 18.86 0 0 0 9.656 6.872c8.841 2.694 19.206 4.244 30.29 4.244 11.083 0 21.452-1.542 30.294-4.233a18.858 18.858 0 0 0 9.666-6.863 19.028 19.028 0 0 0 3.696-11.304Z",
|
|
5179
|
+
fill: "#F2F2F2"
|
|
5180
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5181
|
+
d: "M97.954 75.051c-10.068 0-19.88-1.371-28.381-3.957a12.353 12.353 0 0 1-6.262-4.485 12.463 12.463 0 0 1-2.41-7.34V45.131c.006-2.642.85-5.214 2.411-7.34a12.345 12.345 0 0 1 6.264-4.482c8.501-2.586 18.317-3.95 28.382-3.95 10.065 0 19.877 1.371 28.382 3.96a12.35 12.35 0 0 1 6.262 4.486 12.46 12.46 0 0 1 2.409 7.34V59.28a12.453 12.453 0 0 1-2.41 7.341 12.343 12.343 0 0 1-6.265 4.482c-8.486 2.585-18.317 3.949-28.382 3.949Z",
|
|
5182
|
+
fill: "#E6E6E6"
|
|
5183
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5184
|
+
d: "M100.863 15.992h-5.81v1.293h5.81v-1.293Z",
|
|
5185
|
+
fill: "#F2F2F2"
|
|
5186
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5187
|
+
d: "M76.472 66.05c4.327 0 7.834-6.2 7.834-13.846 0-7.647-3.507-13.846-7.834-13.846-4.326 0-7.833 6.2-7.833 13.846s3.507 13.845 7.833 13.845Z",
|
|
5188
|
+
fill: "#1A1A1A"
|
|
5189
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5190
|
+
d: "M77.844 52.766c1.743 0 3.157-2.088 3.157-4.664 0-2.577-1.414-4.665-3.157-4.665-1.744 0-3.157 2.088-3.157 4.665 0 2.576 1.413 4.664 3.157 4.664Z",
|
|
5191
|
+
fill: "#fff"
|
|
5192
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5193
|
+
d: "M118.662 66.057c4.326 0 7.834-6.2 7.834-13.846s-3.508-13.845-7.834-13.845c-4.327 0-7.834 6.199-7.834 13.845 0 7.647 3.507 13.846 7.834 13.846Z",
|
|
5194
|
+
fill: "#1A1A1A"
|
|
5195
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5196
|
+
d: "M120.032 52.774c1.744 0 3.157-2.089 3.157-4.665s-1.413-4.665-3.157-4.665c-1.743 0-3.157 2.089-3.157 4.665s1.414 4.665 3.157 4.665Z",
|
|
5197
|
+
fill: "#fff"
|
|
5198
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5199
|
+
d: "M92.674 63.11a10.286 10.286 0 0 0 7.949 1.095 13.2 13.2 0 0 0 2.623-1.118.738.738 0 0 1 1.035.639.748.748 0 0 1-.119.453c-2.224 2.82-6.474 3.625-9.672 2.12a7.284 7.284 0 0 1-2.75-2.12.748.748 0 0 1 .465-1.139.738.738 0 0 1 .469.054v.015Z",
|
|
5200
|
+
fill: "#999"
|
|
5201
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5202
|
+
d: "M55.773 64.004c4.349 0 7.874-5.285 7.874-11.804s-3.525-11.804-7.874-11.804-7.875 5.285-7.875 11.804c0 6.52 3.526 11.804 7.875 11.804Zm84.17.015c4.349 0 7.874-5.285 7.874-11.804 0-6.52-3.525-11.804-7.874-11.804s-7.875 5.285-7.875 11.804 3.526 11.804 7.875 11.804Z",
|
|
5203
|
+
fill: "#3690EA"
|
|
5204
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5205
|
+
d: "M95.008 14.315c-.115-.488 6.548-.932 5.815.246v.771c0 .745.033 1.51.037 2.262.003.752.033 1.594.04 2.392.282.592-6.474.935-5.818-.116v-.67c-.014-1.629-.055-3.257-.074-4.885Z",
|
|
5206
|
+
fill: "#F2F2F2"
|
|
5207
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5208
|
+
d: "M97.962 29.036c7.273 0 13.17-2.224 13.17-4.967 0-2.743-5.897-4.966-13.17-4.966-7.274 0-13.17 2.223-13.17 4.966 0 2.743 5.896 4.967 13.17 4.967Z",
|
|
5209
|
+
fill: "#B3B3B3"
|
|
5210
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5211
|
+
d: "M97.962 16.55c4.545 0 8.23-3.705 8.23-8.275S102.507 0 97.962 0c-4.546 0-8.23 3.705-8.23 8.275s3.684 8.275 8.23 8.275Z",
|
|
5212
|
+
fill: "#3690EA"
|
|
5213
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5214
|
+
d: "M141.607 59.283V45.147a19.038 19.038 0 0 0-3.687-11.301 18.872 18.872 0 0 0-9.653-6.874c-8.838-2.69-19.203-4.24-30.29-4.244-11.088-.004-21.452 1.546-30.29 4.233a18.871 18.871 0 0 0-9.668 6.866 19.041 19.041 0 0 0-3.699 11.305v14.132a19.03 19.03 0 0 0 3.685 11.303 18.86 18.86 0 0 0 9.656 6.872c8.841 2.694 19.206 4.244 30.29 4.244 11.083 0 21.452-1.542 30.294-4.233a18.858 18.858 0 0 0 9.666-6.863 19.028 19.028 0 0 0 3.696-11.304Z",
|
|
5215
|
+
fill: "#F2F2F2"
|
|
5216
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5217
|
+
d: "M97.954 75.051c-10.068 0-19.88-1.371-28.381-3.957a12.353 12.353 0 0 1-6.262-4.485 12.463 12.463 0 0 1-2.41-7.34V45.131c.006-2.642.85-5.214 2.411-7.34a12.345 12.345 0 0 1 6.264-4.482c8.501-2.586 18.317-3.95 28.382-3.95 10.065 0 19.877 1.371 28.382 3.96a12.35 12.35 0 0 1 6.262 4.486 12.46 12.46 0 0 1 2.409 7.34V59.28a12.453 12.453 0 0 1-2.41 7.341 12.343 12.343 0 0 1-6.265 4.482c-8.486 2.585-18.317 3.949-28.382 3.949Zm2.909-59.059h-5.81v1.293h5.81v-1.293Z",
|
|
5218
|
+
fill: "#E6E6E6"
|
|
5219
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5220
|
+
d: "M76.472 66.05c4.327 0 7.834-6.2 7.834-13.846 0-7.647-3.507-13.846-7.834-13.846-4.326 0-7.833 6.2-7.833 13.846s3.507 13.845 7.833 13.845Z",
|
|
5221
|
+
fill: "#1A1A1A"
|
|
5222
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5223
|
+
d: "M77.844 52.766c1.743 0 3.157-2.088 3.157-4.664 0-2.577-1.414-4.665-3.157-4.665-1.744 0-3.157 2.088-3.157 4.665 0 2.576 1.413 4.664 3.157 4.664Z",
|
|
5224
|
+
fill: "#fff"
|
|
5225
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5226
|
+
d: "M118.662 66.057c4.326 0 7.834-6.2 7.834-13.846s-3.508-13.845-7.834-13.845c-4.327 0-7.834 6.199-7.834 13.845 0 7.647 3.507 13.846 7.834 13.846Z",
|
|
5227
|
+
fill: "#1A1A1A"
|
|
5228
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5229
|
+
d: "M120.032 52.774c1.744 0 3.157-2.089 3.157-4.665s-1.413-4.665-3.157-4.665c-1.743 0-3.157 2.089-3.157 4.665s1.414 4.665 3.157 4.665Z",
|
|
5230
|
+
fill: "#fff"
|
|
5231
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5232
|
+
d: "M92.674 63.11a10.286 10.286 0 0 0 7.949 1.095 13.2 13.2 0 0 0 2.623-1.118.738.738 0 0 1 1.035.639.748.748 0 0 1-.119.453c-2.224 2.82-6.474 3.625-9.672 2.12a7.284 7.284 0 0 1-2.75-2.12.748.748 0 0 1 .465-1.139.738.738 0 0 1 .469.054v.015Z",
|
|
5233
|
+
fill: "#999"
|
|
5234
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5235
|
+
d: "M101.117 9.562a3.035 3.035 0 0 0 3.027-3.043 3.035 3.035 0 0 0-3.027-3.043A3.035 3.035 0 0 0 98.09 6.52a3.035 3.035 0 0 0 3.027 3.043ZM51.578 54.84c.801 0 1.45-1.64 1.45-3.66 0-2.023-.649-3.662-1.45-3.662-.802 0-1.451 1.64-1.451 3.661 0 2.022.65 3.66 1.45 3.66Zm93.429 0c.802 0 1.451-1.64 1.451-3.66 0-2.023-.649-3.662-1.451-3.662-.801 0-1.45 1.64-1.45 3.661 0 2.022.649 3.66 1.45 3.66Z",
|
|
5236
|
+
fill: "#4BAAF7"
|
|
5237
|
+
}), /*#__PURE__*/React__default.createElement("g", {
|
|
5238
|
+
clipPath: `url(#${id}-b)`
|
|
5239
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5240
|
+
d: "M52.39 160.841h-2.919a1.774 1.774 0 0 1-1.766-1.782v-7.334h9.035l-2.677 7.911a1.766 1.766 0 0 1-1.671 1.206l-.001-.001Zm91.774 0h2.919c.977 0 1.767-.799 1.767-1.782v-7.334h-9.036l2.677 7.911a1.767 1.767 0 0 0 1.672 1.206l.001-.001Z",
|
|
5241
|
+
fill: "#6D4932"
|
|
5242
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5243
|
+
d: "M163.181 108.015H33.375c-2.37 0-4.291 1.479-4.291 3.305v2.216c0 1.825 1.921 3.305 4.29 3.305h129.807c2.369 0 4.29-1.48 4.29-3.305v-2.216c0-1.826-1.921-3.305-4.29-3.305Z",
|
|
5244
|
+
fill: "#A87B5D"
|
|
5245
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5246
|
+
d: "M38.282 116.841h119.992v33.16c0 1.648-1.554 2.985-3.469 2.985H41.752c-1.915 0-3.468-1.337-3.468-2.985v-33.16h-.002Z",
|
|
5247
|
+
fill: "#916A50"
|
|
5248
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5249
|
+
opacity: ".3",
|
|
5250
|
+
d: "M131.002 109.794h-97.18a.996.996 0 0 0-.992 1.001c0 .552.444 1 .992 1h97.18a.996.996 0 0 0 .991-1 .996.996 0 0 0-.991-1.001Zm30.849 0h-24.24a.996.996 0 0 0-.992 1.001c0 .552.444 1 .992 1h24.24a.996.996 0 0 0 .992-1 .996.996 0 0 0-.992-1.001Z",
|
|
5251
|
+
fill: "#D4B097"
|
|
5252
|
+
})), /*#__PURE__*/React__default.createElement("g", {
|
|
5253
|
+
clipPath: `url(#${id}-c)`
|
|
5254
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5255
|
+
d: "M151.367 97.536h2.894c1.6 0 2.895 1.307 2.895 2.913a2.906 2.906 0 0 1-2.895 2.914h-2.894v-5.827Z",
|
|
5256
|
+
strokeWidth: "6",
|
|
5257
|
+
strokeMiterlimit: "10",
|
|
5258
|
+
stroke: `url(#${id}-d)`
|
|
5259
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5260
|
+
d: "M135.876 93.304h17.017a.6.6 0 0 1 .597.602v10.166c0 1.942-1.566 3.522-3.499 3.522h-11.214c-1.933 0-3.499-1.58-3.499-3.522V93.906a.6.6 0 0 1 .598-.602Z",
|
|
5261
|
+
fill: `url(#${id}-e)`
|
|
5262
|
+
})), /*#__PURE__*/React__default.createElement("path", {
|
|
5263
|
+
d: "m37.492 78.174 38.863-6.725a3.453 3.453 0 0 1 3.455 3.45v30.087H34.04V81.623a3.452 3.452 0 0 1 3.452-3.45Z",
|
|
5264
|
+
fill: `url(#${id}-f)`
|
|
5265
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5266
|
+
d: "M34.1 108.015v-3.363h57.697v3.363H34.1Z",
|
|
5267
|
+
fill: `url(#${id}-g)`
|
|
5268
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5269
|
+
d: "M79.673 108.015v-3.363h12.124v3.363H79.673Z",
|
|
5270
|
+
fill: `url(#${id}-h)`
|
|
5271
|
+
})), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
5272
|
+
id: `${id}-d`,
|
|
5273
|
+
x1: "150.254",
|
|
5274
|
+
y1: "100.449",
|
|
5275
|
+
x2: "158.273",
|
|
5276
|
+
y2: "100.449",
|
|
5277
|
+
gradientUnits: "userSpaceOnUse"
|
|
5278
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
5279
|
+
stopColor: "#FEFEFE"
|
|
5280
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
5281
|
+
offset: "1",
|
|
5282
|
+
stopColor: "#fff"
|
|
5283
|
+
})), /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
5284
|
+
id: `${id}-e`,
|
|
5285
|
+
x1: "132.629",
|
|
5286
|
+
y1: "100.449",
|
|
5287
|
+
x2: "155.32",
|
|
5288
|
+
y2: "100.449",
|
|
5289
|
+
gradientUnits: "userSpaceOnUse"
|
|
5290
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
5291
|
+
stopColor: "#FEFEFE"
|
|
5292
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
5293
|
+
offset: "1",
|
|
5294
|
+
stopColor: "#F3F3F3"
|
|
5295
|
+
})), /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
5296
|
+
id: `${id}-f`,
|
|
5297
|
+
x1: "56.925",
|
|
5298
|
+
y1: "45.291",
|
|
5299
|
+
x2: "56.925",
|
|
5300
|
+
y2: "93.076",
|
|
5301
|
+
gradientUnits: "userSpaceOnUse"
|
|
5302
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
5303
|
+
stopColor: "#FEFEFE"
|
|
5304
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
5305
|
+
offset: "1",
|
|
5306
|
+
stopColor: "#D1D6E7"
|
|
5307
|
+
})), /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
5308
|
+
id: `${id}-g`,
|
|
5309
|
+
x1: "62.684",
|
|
5310
|
+
y1: "108.015",
|
|
5311
|
+
x2: "62.684",
|
|
5312
|
+
y2: "104.85",
|
|
5313
|
+
gradientUnits: "userSpaceOnUse"
|
|
5314
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
5315
|
+
stopColor: "#D2D6E8"
|
|
5316
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
5317
|
+
offset: ".726",
|
|
5318
|
+
stopColor: "#D1D6E7"
|
|
5319
|
+
})), /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
5320
|
+
id: `${id}-h`,
|
|
5321
|
+
x1: "85.68",
|
|
5322
|
+
y1: "108.015",
|
|
5323
|
+
x2: "85.68",
|
|
5324
|
+
y2: "104.85",
|
|
5325
|
+
gradientUnits: "userSpaceOnUse"
|
|
5326
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
5327
|
+
stopColor: "#D8DDF1"
|
|
5328
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
5329
|
+
offset: ".726",
|
|
5330
|
+
stopColor: "#E2E6F6"
|
|
5331
|
+
})), /*#__PURE__*/React__default.createElement("clipPath", {
|
|
5332
|
+
id: `${id}-a`
|
|
5333
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5334
|
+
fill: "#fff",
|
|
5335
|
+
transform: "translate(12.006)",
|
|
5336
|
+
d: "M0 0h172v174H0z"
|
|
5337
|
+
})), /*#__PURE__*/React__default.createElement("clipPath", {
|
|
5338
|
+
id: `${id}-b`
|
|
5339
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5340
|
+
fill: "#fff",
|
|
5341
|
+
transform: "translate(29.084 105.073)",
|
|
5342
|
+
d: "M0 0h138.387v68.927H0z"
|
|
5343
|
+
})), /*#__PURE__*/React__default.createElement("clipPath", {
|
|
5344
|
+
id: `${id}-c`
|
|
5345
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5346
|
+
fill: "#fff",
|
|
5347
|
+
transform: "translate(135.278 93.304)",
|
|
5348
|
+
d: "M0 0h22.995v14.29H0z"
|
|
5349
|
+
}))));
|
|
5350
|
+
}
|
|
5351
|
+
|
|
5352
|
+
var styles$f = {"blank_state":"blank_state-wMOWN","image":"image-uy0Fd"};
|
|
5353
|
+
|
|
5354
|
+
function BlankState$1({
|
|
5355
|
+
image,
|
|
5356
|
+
role,
|
|
5357
|
+
subtitle,
|
|
5358
|
+
title
|
|
5359
|
+
}) {
|
|
5360
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
5361
|
+
role: role,
|
|
5362
|
+
className: styles$f.blank_state,
|
|
5363
|
+
direction: "column",
|
|
5364
|
+
align: "center",
|
|
5365
|
+
gap: 3
|
|
5366
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
5367
|
+
className: styles$f.image
|
|
5368
|
+
}, image), /*#__PURE__*/React__default.createElement(Flex, {
|
|
5369
|
+
direction: "column",
|
|
5370
|
+
align: "center",
|
|
5371
|
+
gap: 1
|
|
5372
|
+
}, /*#__PURE__*/React__default.createElement("h2", null, title), /*#__PURE__*/React__default.createElement("p", null, subtitle)));
|
|
5373
|
+
}
|
|
4189
5374
|
|
|
4190
5375
|
function EndOfResultsObserver({
|
|
4191
5376
|
onVisible
|
|
@@ -4205,39 +5390,119 @@ function EndOfResultsObserver({
|
|
|
4205
5390
|
|
|
4206
5391
|
const resultId = (listboxId, index) => `${listboxId}-result-${index}`;
|
|
4207
5392
|
|
|
4208
|
-
var styles$
|
|
5393
|
+
var styles$e = {"result":"result-Thq2C","title":"title-KYUEn","subtitle":"subtitle-R2haq","image":"image-KVDor","avatar":"avatar-6Gh62","photo":"photo-FZR3Q","badge":"badge-trUKt"};
|
|
4209
5394
|
|
|
4210
5395
|
function SearchResult({
|
|
5396
|
+
category,
|
|
5397
|
+
describedBy,
|
|
5398
|
+
headingAbove,
|
|
4211
5399
|
highlighted,
|
|
4212
5400
|
id,
|
|
5401
|
+
imageUrl,
|
|
4213
5402
|
onHighlight,
|
|
5403
|
+
onOpen,
|
|
5404
|
+
product,
|
|
4214
5405
|
subtitle,
|
|
4215
5406
|
title,
|
|
4216
5407
|
url
|
|
4217
5408
|
}) {
|
|
4218
5409
|
const ref = React__default.useRef(null);
|
|
5410
|
+
// A hovered result is already under the pointer, and scrolling it clear of
|
|
5411
|
+
// the panel's scroll padding would slide the list out from under the mouse.
|
|
5412
|
+
const highlightedByPointer = React__default.useRef(false);
|
|
4219
5413
|
React__default.useEffect(() => {
|
|
4220
|
-
var _a;
|
|
4221
|
-
if (highlighted)
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
5414
|
+
var _a, _b;
|
|
5415
|
+
if (!highlighted) return;
|
|
5416
|
+
if (highlightedByPointer.current) {
|
|
5417
|
+
highlightedByPointer.current = false;
|
|
5418
|
+
} else {
|
|
5419
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
5420
|
+
block: "nearest"
|
|
5421
|
+
});
|
|
5422
|
+
// Scrolling up to a section's first result leaves its heading cut off
|
|
5423
|
+
// above it, so bring that in too. Scrolling down, it's already in view.
|
|
5424
|
+
if (headingAbove) {
|
|
5425
|
+
(_b = document.getElementById(headingAbove)) === null || _b === void 0 ? void 0 : _b.scrollIntoView({
|
|
5426
|
+
block: "nearest"
|
|
5427
|
+
});
|
|
5428
|
+
}
|
|
5429
|
+
}
|
|
5430
|
+
}, [headingAbove, highlighted]);
|
|
5431
|
+
const highlightFromPointer = () => {
|
|
5432
|
+
if (highlighted) return;
|
|
5433
|
+
highlightedByPointer.current = true;
|
|
5434
|
+
onHighlight();
|
|
5435
|
+
};
|
|
5436
|
+
// Closes search before the page goes, so coming back to it doesn't find
|
|
5437
|
+
// search still open. Clicks that open a new tab or window leave it open.
|
|
5438
|
+
const openFromClick = event => {
|
|
5439
|
+
if (event.button !== 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
5440
|
+
onOpen();
|
|
5441
|
+
};
|
|
4225
5442
|
// Focus stays in the search input, which points at the highlighted result
|
|
4226
5443
|
// with aria-activedescendant, so results are kept out of the tab order.
|
|
4227
5444
|
// Mouse move rather than enter: arrowing scrolls results under a resting
|
|
4228
5445
|
// pointer, and that shouldn't steal the highlight.
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
5446
|
+
// Results open with a full page load, like Enter does, rather than through
|
|
5447
|
+
// the product's router. Their URLs can go through server redirects, like
|
|
5448
|
+
// People's staff URLs, that Turbo would follow with fetch or prefetch on
|
|
5449
|
+
// hover, and they should open the same way in every product.
|
|
5450
|
+
return (
|
|
5451
|
+
/*#__PURE__*/
|
|
5452
|
+
// Named by the title alone, so screen readers say "Ada Lovelace" rather
|
|
5453
|
+
// than the whole row. The section and subtitle are read after a pause.
|
|
5454
|
+
React__default.createElement("a", {
|
|
5455
|
+
"aria-describedby": [describedBy, subtitle && `${id}-subtitle`].filter(Boolean).join(" ") || undefined,
|
|
5456
|
+
"aria-labelledby": title ? `${id}-title` : undefined,
|
|
5457
|
+
"aria-selected": highlighted,
|
|
5458
|
+
className: styles$e.result,
|
|
5459
|
+
"data-turbo": "false",
|
|
5460
|
+
href: url,
|
|
5461
|
+
id: id,
|
|
5462
|
+
onClick: openFromClick,
|
|
5463
|
+
onMouseMove: highlightFromPointer,
|
|
5464
|
+
ref: ref,
|
|
5465
|
+
role: "option",
|
|
5466
|
+
tabIndex: -1
|
|
5467
|
+
}, /*#__PURE__*/React__default.createElement(ResultImage, {
|
|
5468
|
+
category: category,
|
|
5469
|
+
imageUrl: imageUrl,
|
|
5470
|
+
product: product
|
|
5471
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
5472
|
+
className: styles$e.title,
|
|
5473
|
+
id: `${id}-title`
|
|
5474
|
+
}, title), /*#__PURE__*/React__default.createElement("span", {
|
|
5475
|
+
className: styles$e.subtitle,
|
|
5476
|
+
id: `${id}-subtitle`
|
|
5477
|
+
}, subtitle))
|
|
5478
|
+
);
|
|
5479
|
+
}
|
|
5480
|
+
// A person's photo or the result's own image, badged with its product, or
|
|
5481
|
+
// just the product's logomark when there's no image.
|
|
5482
|
+
function ResultImage({
|
|
5483
|
+
category,
|
|
5484
|
+
imageUrl,
|
|
5485
|
+
product
|
|
5486
|
+
}) {
|
|
5487
|
+
const icon = size => isProductIconSlug(product) ? (/*#__PURE__*/React__default.createElement(ProductIcon, {
|
|
5488
|
+
size: size,
|
|
5489
|
+
slug: product
|
|
5490
|
+
})) : null;
|
|
5491
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
5492
|
+
"aria-hidden": true,
|
|
5493
|
+
className: styles$e.image
|
|
5494
|
+
}, imageUrl ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("img", {
|
|
5495
|
+
alt: "",
|
|
5496
|
+
className: category === "profile" ? styles$e.avatar : styles$e.photo,
|
|
5497
|
+
loading: "lazy",
|
|
5498
|
+
src: imageUrl
|
|
5499
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
5500
|
+
className: styles$e.badge
|
|
5501
|
+
}, icon(16)))) : icon("100%"));
|
|
4239
5502
|
}
|
|
4240
5503
|
|
|
5504
|
+
var styles$d = {"heading":"heading-LioUF","group":"group-cKChg"};
|
|
5505
|
+
|
|
4241
5506
|
// Sections with a heading render as labelled groups; ones without render
|
|
4242
5507
|
// their items straight into the listbox. Indexes run across every section.
|
|
4243
5508
|
function ResultListbox({
|
|
@@ -4247,16 +5512,27 @@ function ResultListbox({
|
|
|
4247
5512
|
label,
|
|
4248
5513
|
labelledBy,
|
|
4249
5514
|
onHighlight,
|
|
5515
|
+
onOpen,
|
|
4250
5516
|
sections
|
|
4251
5517
|
}) {
|
|
4252
5518
|
let index = 0;
|
|
4253
|
-
|
|
5519
|
+
// With aria-activedescendant, screen readers don't reliably announce the
|
|
5520
|
+
// group a highlighted option is in, so each option names its heading too.
|
|
5521
|
+
const renderItem = (item, indexInSection, headingId) => {
|
|
4254
5522
|
const itemIndex = index++;
|
|
5523
|
+
// Sections without a heading of their own sit under the listbox's label.
|
|
5524
|
+
const headingAbove = indexInSection > 0 ? undefined : headingId !== null && headingId !== void 0 ? headingId : itemIndex === 0 ? labelledBy : undefined;
|
|
4255
5525
|
return /*#__PURE__*/React__default.createElement(SearchResult, {
|
|
5526
|
+
category: item.category,
|
|
5527
|
+
describedBy: headingId,
|
|
5528
|
+
headingAbove: headingAbove,
|
|
4256
5529
|
highlighted: itemIndex === highlightedIndex,
|
|
4257
5530
|
id: resultId(id, itemIndex),
|
|
5531
|
+
imageUrl: item.imageUrl,
|
|
4258
5532
|
key: item.key,
|
|
4259
5533
|
onHighlight: () => onHighlight(itemIndex),
|
|
5534
|
+
onOpen: onOpen,
|
|
5535
|
+
product: item.product,
|
|
4260
5536
|
subtitle: item.subtitle,
|
|
4261
5537
|
title: item.title,
|
|
4262
5538
|
url: item.url
|
|
@@ -4272,16 +5548,18 @@ function ResultListbox({
|
|
|
4272
5548
|
if (section.heading === undefined) {
|
|
4273
5549
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
4274
5550
|
key: section.key
|
|
4275
|
-
}, section.items.map(renderItem));
|
|
5551
|
+
}, section.items.map((item, itemIndex) => renderItem(item, itemIndex)));
|
|
4276
5552
|
}
|
|
4277
5553
|
const headingId = `${id}-group-${sectionIndex}`;
|
|
4278
5554
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4279
5555
|
"aria-labelledby": headingId,
|
|
5556
|
+
className: styles$d.group,
|
|
4280
5557
|
key: section.key,
|
|
4281
5558
|
role: "group"
|
|
4282
5559
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5560
|
+
className: styles$d.heading,
|
|
4283
5561
|
id: headingId
|
|
4284
|
-
}, section.heading), section.items.map(renderItem));
|
|
5562
|
+
}, section.heading), section.items.map((item, itemIndex) => renderItem(item, itemIndex, headingId)));
|
|
4285
5563
|
}));
|
|
4286
5564
|
}
|
|
4287
5565
|
|
|
@@ -4295,9 +5573,14 @@ function RecentlyVisited({
|
|
|
4295
5573
|
}) {
|
|
4296
5574
|
const headingId = `${navigation.id}-heading`;
|
|
4297
5575
|
if (items.length === 0 && !hasMore && !loading) {
|
|
4298
|
-
return /*#__PURE__*/React__default.createElement(
|
|
5576
|
+
return /*#__PURE__*/React__default.createElement(BlankState$1, {
|
|
5577
|
+
image: /*#__PURE__*/React__default.createElement(BlankStateRecentlyVisited, null),
|
|
5578
|
+
subtitle: "Pages you visit will show up here.",
|
|
5579
|
+
title: "Recently visited"
|
|
5580
|
+
});
|
|
4299
5581
|
} else {
|
|
4300
5582
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
5583
|
+
className: styles$d.heading,
|
|
4301
5584
|
id: headingId
|
|
4302
5585
|
}, "Recently visited"), /*#__PURE__*/React__default.createElement(ResultListbox, {
|
|
4303
5586
|
labelledBy: headingId,
|
|
@@ -4313,6 +5596,8 @@ function RecentlyVisited({
|
|
|
4313
5596
|
}
|
|
4314
5597
|
}
|
|
4315
5598
|
|
|
5599
|
+
var styles$c = {"row":"row-5P7UQ","header":"header-sXEyG","closeButton":"closeButton-rPJJV","input":"input-YQkTC","clearButton":"clearButton-9Yh9w"};
|
|
5600
|
+
|
|
4316
5601
|
// A combobox: focus stays here while aria-activedescendant points screen
|
|
4317
5602
|
// readers at the highlighted result in the listbox it controls.
|
|
4318
5603
|
function SearchInput({
|
|
@@ -4321,29 +5606,441 @@ function SearchInput({
|
|
|
4321
5606
|
inputRef,
|
|
4322
5607
|
listboxId,
|
|
4323
5608
|
onChange,
|
|
5609
|
+
onClose,
|
|
4324
5610
|
onFocus,
|
|
4325
5611
|
onKeyDown,
|
|
4326
5612
|
value
|
|
4327
5613
|
}) {
|
|
4328
|
-
|
|
5614
|
+
const {
|
|
5615
|
+
focusProps
|
|
5616
|
+
} = useKeyboardFocus({
|
|
5617
|
+
onFocus: (event, keyboard) => {
|
|
5618
|
+
// Tabbing in selects the whole term, which the next keystroke would
|
|
5619
|
+
// replace. Put the cursor after it instead, to keep typing. The
|
|
5620
|
+
// browser selects after the focus event, so this waits a frame and
|
|
5621
|
+
// only undoes that select-all: typing on the tabs moves focus here by
|
|
5622
|
+
// script, which keeps the cursor, and the keystroke may already be in.
|
|
5623
|
+
if (keyboard) {
|
|
5624
|
+
const input = event.currentTarget;
|
|
5625
|
+
requestAnimationFrame(() => {
|
|
5626
|
+
const length = input.value.length;
|
|
5627
|
+
const selectedAll = length > 0 && input.selectionStart === 0 && input.selectionEnd === length;
|
|
5628
|
+
if (document.activeElement !== input || !selectedAll) return;
|
|
5629
|
+
input.setSelectionRange(length, length);
|
|
5630
|
+
});
|
|
5631
|
+
}
|
|
5632
|
+
onFocus();
|
|
5633
|
+
}
|
|
5634
|
+
});
|
|
5635
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5636
|
+
className: styles$c.row
|
|
5637
|
+
}, /*#__PURE__*/React__default.createElement("label", {
|
|
5638
|
+
className: styles$c.header,
|
|
5639
|
+
id: "topbar_product_search_label"
|
|
5640
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
5641
|
+
name: "general.search",
|
|
5642
|
+
size: 20,
|
|
5643
|
+
theme: "--t-icon-color-dim"
|
|
5644
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
4329
5645
|
"aria-activedescendant": highlightedIndex === null ? undefined : resultId(listboxId, highlightedIndex),
|
|
4330
5646
|
"aria-autocomplete": "list",
|
|
4331
5647
|
"aria-controls": expanded ? listboxId : undefined,
|
|
4332
5648
|
"aria-expanded": expanded,
|
|
4333
5649
|
"aria-label": "Search",
|
|
4334
5650
|
autoFocus: true,
|
|
5651
|
+
className: styles$c.input,
|
|
5652
|
+
id: "product_search",
|
|
4335
5653
|
onChange: event => onChange(event.target.value),
|
|
4336
|
-
onFocus: onFocus,
|
|
4337
5654
|
onKeyDown: onKeyDown,
|
|
4338
5655
|
placeholder: "Search",
|
|
4339
5656
|
ref: inputRef,
|
|
4340
5657
|
role: "combobox",
|
|
4341
5658
|
type: "search",
|
|
4342
|
-
value: value
|
|
4343
|
-
|
|
5659
|
+
value: value,
|
|
5660
|
+
...focusProps
|
|
5661
|
+
}), !onClose && value !== "" && (/*#__PURE__*/React__default.createElement("button", {
|
|
5662
|
+
"aria-label": "Clear search",
|
|
5663
|
+
className: styles$c.clearButton,
|
|
5664
|
+
onClick: () => {
|
|
5665
|
+
var _a;
|
|
5666
|
+
onChange("");
|
|
5667
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5668
|
+
},
|
|
5669
|
+
tabIndex: -1,
|
|
5670
|
+
type: "button"
|
|
5671
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
5672
|
+
"aria-hidden": true,
|
|
5673
|
+
viewBox: "0 0 20 20"
|
|
5674
|
+
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
5675
|
+
cx: "10",
|
|
5676
|
+
cy: "10",
|
|
5677
|
+
r: "10"
|
|
5678
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5679
|
+
d: "M6.5 6.5l7 7m0 -7l-7 7"
|
|
5680
|
+
}))))), onClose && (/*#__PURE__*/React__default.createElement(IconButton, {
|
|
5681
|
+
"aria-label": "Close search",
|
|
5682
|
+
className: styles$c.closeButton,
|
|
5683
|
+
icon: /*#__PURE__*/React__default.createElement(Icon, {
|
|
5684
|
+
name: "general.x",
|
|
5685
|
+
theme: "--t-icon-color-dim"
|
|
5686
|
+
}),
|
|
5687
|
+
kind: "ghost",
|
|
5688
|
+
onClick: onClose,
|
|
5689
|
+
size: "md"
|
|
5690
|
+
})));
|
|
4344
5691
|
}
|
|
4345
5692
|
|
|
4346
|
-
|
|
5693
|
+
function BlankStateError(props) {
|
|
5694
|
+
const id = useInstanceId("blank-state-error");
|
|
5695
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
5696
|
+
viewBox: "0 0 197 158",
|
|
5697
|
+
fill: "none",
|
|
5698
|
+
"aria-hidden": "true",
|
|
5699
|
+
focusable: "false",
|
|
5700
|
+
...props
|
|
5701
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5702
|
+
d: "M139.863 26.119c10.938 10.028 21.777 20.154 32.912 30.084 8.376 7.373 21.975 15.828 23.157 28.02.592 6.095-2.167 11.993-5.321 17.204-24.635 40.8-81.098 67.148-127.412 48.862-30.646-12.093-76.172-47.387-59.716-85.041C19.348 28.87 68.323 10.192 87.44 7.538c21.876-4.621 34.883 2.457 52.423 18.58Z",
|
|
5703
|
+
fill: "currentColor"
|
|
5704
|
+
}), /*#__PURE__*/React__default.createElement("g", {
|
|
5705
|
+
clipPath: `url(#${id}-a)`
|
|
5706
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5707
|
+
d: "M76.296 111.268c-2.63 0-5.95-.883-9.822-3.622a3.39 3.39 0 0 1-1.375-2.212 3.375 3.375 0 0 1 .603-2.529 3.44 3.44 0 0 1 4.777-.767c5.305 3.786 7.949 1.838 8.056 1.767a1.23 1.23 0 0 0-.094.08l4.62 5.004a10.434 10.434 0 0 1-6.765 2.279Z",
|
|
5708
|
+
fill: "#4D4D4D"
|
|
5709
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5710
|
+
d: "M83.313 102.999a2.751 2.751 0 0 0-2.882-2.611 2.747 2.747 0 0 0-2.63 2.86l.399 8.688a2.751 2.751 0 0 0 2.882 2.611 2.746 2.746 0 0 0 2.63-2.86l-.399-8.688Z",
|
|
5711
|
+
fill: "gray"
|
|
5712
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5713
|
+
d: "M119.428 111.268a10.438 10.438 0 0 1-6.751-2.292l4.619-5.005a1.387 1.387 0 0 0-.093-.079c.106.084 2.75 2.032 8.055-1.767a3.439 3.439 0 0 1 4.777.766 3.378 3.378 0 0 1-.772 4.742c-3.885 2.774-7.205 3.635-9.835 3.635Z",
|
|
5714
|
+
fill: "#4D4D4D"
|
|
5715
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5716
|
+
d: "M101.658 18.962H94.68v1.533h6.978v-1.533Z",
|
|
5717
|
+
fill: "#F2F2F2"
|
|
5718
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5719
|
+
d: "M91.823 74.82a12.502 12.502 0 0 0 9.546 1.299 16.005 16.005 0 0 0 3.151-1.326.894.894 0 0 1 1.035.24.882.882 0 0 1 .064 1.053c-2.67 3.345-7.775 4.294-11.62 2.514a8.803 8.803 0 0 1-3.302-2.513.879.879 0 0 1 .561-1.353.887.887 0 0 1 .565.068v.017Z",
|
|
5720
|
+
fill: "#999"
|
|
5721
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5722
|
+
d: "M88.236 143.397a3.433 3.433 0 0 1-2.304-.891 3.383 3.383 0 0 1-1.096-2.201c-.636-6.788 4.237-16.369 4.798-17.442a3.41 3.41 0 0 1 2-1.643 3.442 3.442 0 0 1 2.586.227 3.398 3.398 0 0 1 1.68 1.965 3.368 3.368 0 0 1-.196 2.569c-1.75 3.37-4.402 10.066-4.059 13.693a3.38 3.38 0 0 1-.773 2.479 3.43 3.43 0 0 1-2.31 1.213l-.326.031Z",
|
|
5723
|
+
fill: "#4D4D4D"
|
|
5724
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5725
|
+
d: "M91.645 132.708c3.972 0 7.192-3.195 7.192-7.138 0-3.942-3.22-7.137-7.192-7.137s-7.191 3.195-7.191 7.137c0 3.943 3.22 7.138 7.191 7.138Z",
|
|
5726
|
+
fill: "gray"
|
|
5727
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5728
|
+
d: "M77.765 152.218h14.134v4.417c0 .351-.141.689-.391.937-.25.249-.59.388-.944.388H75.33a1.34 1.34 0 0 1-.945-.388 1.32 1.32 0 0 1-.39-.937v-.671c0-.997.398-1.953 1.109-2.658a3.801 3.801 0 0 1 2.678-1.101l-.018.013Z",
|
|
5729
|
+
fill: "#333"
|
|
5730
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5731
|
+
d: "M88.548 156.141s9.697.141 7.592-9.797c-2.105-9.939-14.641-18.198-18.295-7.191-3.654 11.007-1.695 18.056 10.703 16.988Z",
|
|
5732
|
+
fill: "#F2F2F2"
|
|
5733
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5734
|
+
d: "M109.077 143.402h-.325a3.427 3.427 0 0 1-2.313-1.216 3.38 3.38 0 0 1-.771-2.481c.342-3.627-2.305-10.323-4.054-13.693a3.371 3.371 0 0 1-.11-2.514c.29-.821.887-1.5 1.666-1.897a3.44 3.44 0 0 1 2.525-.236 3.413 3.413 0 0 1 1.993 1.555c.556 1.069 5.429 10.654 4.789 17.443a3.383 3.383 0 0 1-1.113 2.167 3.426 3.426 0 0 1-2.287.872Z",
|
|
5735
|
+
fill: "#4D4D4D"
|
|
5736
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5737
|
+
d: "M105.672 132.708c3.972 0 7.192-3.195 7.192-7.138 0-3.942-3.22-7.137-7.192-7.137s-7.191 3.195-7.191 7.137c0 3.943 3.219 7.138 7.191 7.138Z",
|
|
5738
|
+
fill: "gray"
|
|
5739
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5740
|
+
d: "m121.972 158.007-15.22-.003c-.354 0-.693-.139-.943-.388a1.317 1.317 0 0 1-.391-.937v-4.417l14.139.003c1.004 0 1.967.396 2.678 1.101a3.745 3.745 0 0 1 1.108 2.658v.671c0 .352-.141.689-.391.937-.25.249-.59.388-.944.388l-.036-.013Z",
|
|
5741
|
+
fill: "#333"
|
|
5742
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5743
|
+
d: "M108.769 156.145s-9.701.137-7.587-9.801c2.114-9.939 14.645-18.19 18.295-7.187 3.649 11.003 1.682 18.061-10.708 16.988Z",
|
|
5744
|
+
fill: "#F2F2F2"
|
|
5745
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5746
|
+
d: "M112.002 111.683c-.07 1.51 1.108 2.791 2.63 2.86a2.75 2.75 0 0 0 2.882-2.611l.399-8.688a2.746 2.746 0 0 0-2.63-2.86 2.75 2.75 0 0 0-2.882 2.611l-.399 8.688Z",
|
|
5747
|
+
fill: "gray"
|
|
5748
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5749
|
+
d: "M47.508 75.88c5.223 0 9.457-6.265 9.457-13.994 0-7.728-4.234-13.993-9.457-13.993-5.223 0-9.457 6.265-9.457 13.993 0 7.729 4.234 13.993 9.457 13.993Zm101.082.017c5.223 0 9.457-6.265 9.457-13.993 0-7.728-4.234-13.993-9.457-13.993-5.223 0-9.457 6.265-9.457 13.993 0 7.728 4.234 13.993 9.457 13.993Z",
|
|
5750
|
+
fill: "#3690EA"
|
|
5751
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5752
|
+
d: "M94.622 16.97c-.133-.574 7.868-1.1 6.987.296 0 .305 0 .61.022.914 0 .884.04 1.767.04 2.681 0 .915.041 1.886.054 2.832.334.706-7.78 1.113-6.991-.133v-.795c-.036-1.935-.09-3.86-.112-5.795Z",
|
|
5753
|
+
fill: "#F2F2F2"
|
|
5754
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5755
|
+
d: "M98.174 34.426c8.734 0 15.816-2.636 15.816-5.888s-7.082-5.888-15.816-5.888c-8.736 0-15.817 2.637-15.817 5.888 0 3.252 7.082 5.888 15.817 5.888Z",
|
|
5756
|
+
fill: "#B3B3B3"
|
|
5757
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5758
|
+
d: "M98.174 19.625c5.458 0 9.883-4.393 9.883-9.81 0-5.418-4.425-9.81-9.883-9.81-5.46 0-9.884 4.392-9.884 9.81s4.425 9.81 9.883 9.81Z",
|
|
5759
|
+
fill: "#3690EA"
|
|
5760
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5761
|
+
d: "M116.339 111.123c-.614-10.782-8.958-13.874-19.002-13.309-10.044.566-17.979 4.567-17.356 15.354.623 10.786 9.252 19.063 19.296 18.498 10.044-.565 17.676-9.761 17.062-20.543Z",
|
|
5762
|
+
fill: "#F2F2F2"
|
|
5763
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5764
|
+
d: "M116.139 109.4c-1.268 8.891-8.171 15.901-16.884 16.378-9.43.53-17.623-6.74-19.096-16.559a17.615 17.615 0 0 0-.205 3.949c.619 10.781 9.257 19.063 19.297 18.498 10.039-.566 17.685-9.762 17.07-20.544a11.69 11.69 0 0 0-.182-1.722Z",
|
|
5765
|
+
fill: "#E6E6E6"
|
|
5766
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5767
|
+
d: "M94.609 92.558c-.134-.579 7.868-1.1 6.987.291v.915c0 .883.035 1.789.04 2.68.004.893.04 1.891.053 2.837.334.702-7.779 1.108-6.991-.137v-.796c-.013-1.93-.067-3.86-.089-5.79Z",
|
|
5768
|
+
fill: "#999"
|
|
5769
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5770
|
+
d: "M150.588 70.279V53.525a22.366 22.366 0 0 0-4.425-13.4 22.645 22.645 0 0 0-11.596-8.146c-10.613-3.19-23.061-5.027-36.376-5.031-13.315-.004-25.762 1.833-36.38 5.018a22.654 22.654 0 0 0-11.609 8.14 22.374 22.374 0 0 0-4.438 13.401v16.754a22.375 22.375 0 0 0 4.435 13.403 22.654 22.654 0 0 0 11.607 8.143c10.614 3.19 23.061 5.026 36.376 5.031 13.315.004 25.763-1.833 36.376-5.018a22.658 22.658 0 0 0 11.598-8.144 22.377 22.377 0 0 0 4.432-13.397Z",
|
|
5771
|
+
fill: "#F2F2F2"
|
|
5772
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5773
|
+
d: "M98.16 88.976c-12.087 0-23.87-1.626-34.08-4.695a14.817 14.817 0 0 1-7.522-5.316 14.635 14.635 0 0 1-2.891-8.704V53.507a14.64 14.64 0 0 1 2.89-8.698 14.82 14.82 0 0 1 7.514-5.317c10.21-3.065 21.993-4.682 34.085-4.682 12.091 0 23.871 1.626 34.079 4.696a14.817 14.817 0 0 1 7.523 5.315 14.635 14.635 0 0 1 2.891 8.704V70.28a14.635 14.635 0 0 1-2.897 8.703 14.824 14.824 0 0 1-7.525 5.312c-10.191 3.047-21.976 4.682-34.067 4.682Zm3.498-70.014H94.68v1.533h6.978v-1.533Z",
|
|
5774
|
+
fill: "#E6E6E6"
|
|
5775
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5776
|
+
d: "M72.367 78.304c5.195 0 9.407-7.348 9.407-16.413 0-9.065-4.212-16.414-9.407-16.414-5.196 0-9.408 7.349-9.408 16.414 0 9.065 4.212 16.413 9.408 16.413Z",
|
|
5777
|
+
fill: "#1A1A1A"
|
|
5778
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5779
|
+
d: "M74.013 62.558c2.094 0 3.792-2.476 3.792-5.53 0-3.054-1.698-5.53-3.792-5.53s-3.791 2.476-3.791 5.53c0 3.054 1.697 5.53 3.791 5.53Z",
|
|
5780
|
+
fill: "#fff"
|
|
5781
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5782
|
+
d: "M123.032 78.313c5.196 0 9.408-7.349 9.408-16.413 0-9.065-4.212-16.414-9.408-16.414-5.195 0-9.407 7.349-9.407 16.414 0 9.065 4.212 16.413 9.407 16.413Z",
|
|
5783
|
+
fill: "#1A1A1A"
|
|
5784
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5785
|
+
d: "M124.679 62.567c2.094 0 3.792-2.476 3.792-5.53 0-3.054-1.698-5.53-3.792-5.53s-3.792 2.476-3.792 5.53c0 3.054 1.698 5.53 3.792 5.53Z",
|
|
5786
|
+
fill: "#fff"
|
|
5787
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5788
|
+
d: "M105.325 106.675H90.991a.74.74 0 0 0-.743.737v2.089a.74.74 0 0 0 .743.738h14.334a.74.74 0 0 0 .743-.738v-2.089a.74.74 0 0 0-.743-.737Zm0 6.148H90.991a.74.74 0 0 0-.743.738v2.089a.74.74 0 0 0 .743.738h14.334c.41 0 .743-.331.743-.738v-2.089a.74.74 0 0 0-.743-.738Zm-.004 6.153H90.987a.74.74 0 0 0-.744.737v2.09a.74.74 0 0 0 .744.737h14.334a.74.74 0 0 0 .743-.737v-2.09a.74.74 0 0 0-.743-.737Z",
|
|
5789
|
+
fill: "#3690EA"
|
|
5790
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5791
|
+
d: "M140.653 109.023c5.67-4.178 7.656-11.053 4.438-15.356-3.219-4.303-10.424-4.405-16.094-.227-5.67 4.177-7.656 11.052-4.438 15.356 3.219 4.303 10.424 4.405 16.094.227Z",
|
|
5792
|
+
fill: "#F2F2F2"
|
|
5793
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5794
|
+
d: "M144.211 97.717c-3.217-4.302-10.422-4.417-16.092-.23a15.277 15.277 0 0 0-5.087 6.339c.067-3.613 2.194-7.58 5.964-10.358 5.669-4.174 12.874-4.073 16.092.23 1.86 2.486 1.976 5.83.649 9.019a7.943 7.943 0 0 0-1.526-5Z",
|
|
5795
|
+
fill: "#E6E6E6"
|
|
5796
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5797
|
+
d: "M141.051 91.524c.966-1.66.874-3.508-.205-4.126-1.08-.618-2.737.226-3.703 1.887-.966 1.66-.874 3.508.205 4.126 1.079.619 2.737-.226 3.703-1.887Z",
|
|
5798
|
+
fill: "#333"
|
|
5799
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5800
|
+
d: "M142.711 103.49c4.151 0 7.517-3.34 7.517-7.46s-3.366-7.46-7.517-7.46-7.516 3.34-7.516 7.46 3.365 7.46 7.516 7.46Z",
|
|
5801
|
+
fill: "#333"
|
|
5802
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5803
|
+
d: "M70.234 108.894c3.219-4.303 1.232-11.178-4.437-15.356-5.67-4.178-12.875-4.076-16.094.227-3.219 4.303-1.232 11.179 4.438 15.356 5.67 4.178 12.875 4.076 16.093-.227Z",
|
|
5804
|
+
fill: "#F2F2F2"
|
|
5805
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5806
|
+
d: "M50.574 97.717c3.218-4.302 10.422-4.417 16.092-.23a15.273 15.273 0 0 1 5.087 6.339c-.067-3.613-2.194-7.58-5.964-10.358-5.67-4.174-12.874-4.073-16.092.23-1.86 2.486-1.971 5.83-.65 9.019a7.945 7.945 0 0 1 1.527-5Z",
|
|
5807
|
+
fill: "#E6E6E6"
|
|
5808
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5809
|
+
d: "M57.434 93.41c1.08-.618 1.171-2.466.206-4.126-.966-1.66-2.624-2.506-3.703-1.887-1.08.618-1.171 2.466-.205 4.126.965 1.66 2.623 2.506 3.702 1.887Z",
|
|
5810
|
+
fill: "#333"
|
|
5811
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5812
|
+
d: "M52.074 103.49c4.151 0 7.516-3.34 7.516-7.46s-3.365-7.46-7.516-7.46-7.517 3.34-7.517 7.46 3.366 7.46 7.517 7.46Z",
|
|
5813
|
+
fill: "#333"
|
|
5814
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5815
|
+
d: "M98.485 83.08c1.523-.183 2.609-1.544 2.426-3.041-.183-1.497-1.565-2.561-3.088-2.378-1.522.183-2.608 1.544-2.425 3.041.182 1.497 1.565 2.561 3.087 2.378Z",
|
|
5816
|
+
fill: "#1A1A1A"
|
|
5817
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5818
|
+
d: "M101.729 11.17c1.733 0 3.138-1.394 3.138-3.113 0-1.72-1.405-3.114-3.138-3.114-1.733 0-3.137 1.394-3.137 3.114s1.404 3.114 3.137 3.114Zm52.37 52.753c.829 0 1.5-1.677 1.5-3.746s-.671-3.746-1.5-3.746c-.828 0-1.499 1.677-1.499 3.746s.671 3.746 1.499 3.746Zm-111.549 0c.829 0 1.5-1.677 1.5-3.746s-.671-3.746-1.5-3.746c-.828 0-1.5 1.677-1.5 3.746s.672 3.746 1.5 3.746Z",
|
|
5819
|
+
fill: "#4BAAF7"
|
|
5820
|
+
})), /*#__PURE__*/React__default.createElement("mask", {
|
|
5821
|
+
id: `${id}-b`,
|
|
5822
|
+
style: {
|
|
5823
|
+
maskType: "alpha"
|
|
5824
|
+
},
|
|
5825
|
+
maskUnits: "userSpaceOnUse",
|
|
5826
|
+
x: "0",
|
|
5827
|
+
y: "6",
|
|
5828
|
+
width: "197",
|
|
5829
|
+
height: "151"
|
|
5830
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5831
|
+
d: "M139.863 26.12c10.938 10.028 21.777 20.154 32.912 30.084 8.376 7.373 21.975 15.828 23.157 28.02.592 6.095-2.167 11.993-5.321 17.204-24.635 40.8-81.098 67.148-127.412 48.862-30.646-12.093-76.172-47.387-59.716-85.041 15.865-36.377 64.84-55.056 83.957-57.71 21.876-4.621 34.883 2.457 52.423 18.58Z",
|
|
5832
|
+
fill: "#CEE1FF",
|
|
5833
|
+
fillOpacity: ".8"
|
|
5834
|
+
})), /*#__PURE__*/React__default.createElement("g", {
|
|
5835
|
+
mask: `url(#${id}-b)`
|
|
5836
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5837
|
+
d: "m59.006 101 8 4m-4 1-4-5h6",
|
|
5838
|
+
stroke: "#FFD463"
|
|
5839
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5840
|
+
d: "M60.006 100.999c-14.02-9.35-30.69-13.01-50-11S-26.916 103.01-38.276 115",
|
|
5841
|
+
strokeWidth: "2",
|
|
5842
|
+
stroke: "#fff"
|
|
5843
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5844
|
+
d: "m125.304 89-8.08 3.84m1.68-3.77 6.4-.07-3.7 4.72",
|
|
5845
|
+
stroke: "#FFD463"
|
|
5846
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5847
|
+
d: "M123.724 89.5c26.45-8.66 23 40.5 47 42.5 22.399 1.867 36.5-31.001 63 12",
|
|
5848
|
+
strokeWidth: "2",
|
|
5849
|
+
stroke: "#fff"
|
|
5850
|
+
})), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("clipPath", {
|
|
5851
|
+
id: `${id}-a`
|
|
5852
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5853
|
+
fill: "#fff",
|
|
5854
|
+
transform: "translate(38.051)",
|
|
5855
|
+
d: "M0 0h120v158H0z"
|
|
5856
|
+
}))));
|
|
5857
|
+
}
|
|
5858
|
+
|
|
5859
|
+
function BlankStateNoResults(props) {
|
|
5860
|
+
const id = useInstanceId("blank-state-no-results");
|
|
5861
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
5862
|
+
viewBox: "0 0 197 152",
|
|
5863
|
+
fill: "none",
|
|
5864
|
+
"aria-hidden": "true",
|
|
5865
|
+
focusable: "false",
|
|
5866
|
+
...props
|
|
5867
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5868
|
+
d: "M139.863 19.971C150.801 30 161.64 40.126 172.775 50.055c8.376 7.374 21.975 15.829 23.157 28.02.592 6.095-2.167 11.994-5.321 17.205-24.635 40.8-81.098 67.148-127.412 48.862C32.553 132.049-12.973 96.754 3.483 59.1 19.348 22.724 68.323 4.044 87.44 1.39c21.876-4.62 34.883 2.458 52.423 18.581Z",
|
|
5869
|
+
fill: "currentColor"
|
|
5870
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5871
|
+
d: "M94.382 27.326c4.859 0 8.797-3.932 8.797-8.783 0-4.85-3.938-8.783-8.797-8.783-4.858 0-8.796 3.933-8.796 8.783 0 4.851 3.938 8.783 8.796 8.783Z",
|
|
5872
|
+
fill: "#3690EA"
|
|
5873
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5874
|
+
d: "M97.481 19.861a3.22 3.22 0 0 0 3.222-3.217 3.22 3.22 0 0 0-3.222-3.217 3.22 3.22 0 0 0-3.222 3.217 3.22 3.22 0 0 0 3.222 3.217Z",
|
|
5875
|
+
fill: "#4BAAF7"
|
|
5876
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5877
|
+
d: "M97.564 26.688h-6.248v3.565h6.248v-3.565Z",
|
|
5878
|
+
fill: "#F2F2F2"
|
|
5879
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5880
|
+
d: "M49.297 77.706c4.649 0 8.417-5.61 8.417-12.53 0-6.921-3.768-12.531-8.417-12.531s-8.417 5.61-8.417 12.53c0 6.92 3.768 12.531 8.417 12.531Zm89.958 0c4.649 0 8.417-5.61 8.417-12.53 0-6.921-3.768-12.531-8.417-12.531s-8.417 5.61-8.417 12.53c0 6.92 3.768 12.531 8.417 12.531Z",
|
|
5881
|
+
fill: "#3690EA"
|
|
5882
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5883
|
+
d: "M94.379 40.574c7.774 0 14.076-2.36 14.076-5.271 0-2.912-6.302-5.272-14.076-5.272-7.774 0-14.076 2.36-14.076 5.272 0 2.911 6.302 5.271 14.076 5.271Z",
|
|
5884
|
+
fill: "#B3B3B3"
|
|
5885
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5886
|
+
d: "M141.036 72.671V57.672a20.118 20.118 0 0 0-3.949-12 20.166 20.166 0 0 0-10.333-7.29c-9.448-2.852-20.529-4.497-32.379-4.497-11.849 0-22.926 1.645-32.374 4.497a20.167 20.167 0 0 0-10.331 7.29 20.117 20.117 0 0 0-3.95 12v15a20.112 20.112 0 0 0 3.949 12A20.163 20.163 0 0 0 62 91.962c9.448 2.856 20.53 4.496 32.375 4.496 11.844 0 22.93-1.64 32.378-4.496a20.153 20.153 0 0 0 10.333-7.289 20.107 20.107 0 0 0 3.949-12.002Z",
|
|
5887
|
+
fill: "#F2F2F2"
|
|
5888
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5889
|
+
d: "M94.387 89.422c-10.76 0-21.248-1.448-30.348-4.193a13.19 13.19 0 0 1-6.698-4.759 13.159 13.159 0 0 1-2.576-7.794v-15a13.163 13.163 0 0 1 2.577-7.793 13.196 13.196 0 0 1 6.697-4.76c9.082-2.744 19.574-4.193 30.348-4.193 10.773 0 21.248 1.449 30.348 4.194a13.2 13.2 0 0 1 6.701 4.757 13.17 13.17 0 0 1 2.582 7.795v15a13.164 13.164 0 0 1-2.577 7.794 13.195 13.195 0 0 1-6.697 4.759c-9.109 2.727-19.597 4.193-30.357 4.193Z",
|
|
5890
|
+
fill: "#E6E6E6"
|
|
5891
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5892
|
+
d: "M71.426 79.868c4.624 0 8.373-6.58 8.373-14.696s-3.749-14.696-8.373-14.696c-4.624 0-8.372 6.58-8.372 14.696 0 8.117 3.748 14.697 8.372 14.697Z",
|
|
5893
|
+
fill: "#1A1A1A"
|
|
5894
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5895
|
+
d: "M72.894 65.765c1.863 0 3.373-2.217 3.373-4.95 0-2.735-1.51-4.952-3.373-4.952-1.864 0-3.375 2.217-3.375 4.951 0 2.734 1.511 4.95 3.374 4.95Z",
|
|
5896
|
+
fill: "#fff"
|
|
5897
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5898
|
+
d: "M116.517 79.868c4.624 0 8.373-6.58 8.373-14.696s-3.749-14.696-8.373-14.696c-4.624 0-8.372 6.58-8.372 14.696 0 8.117 3.748 14.697 8.372 14.697Z",
|
|
5899
|
+
fill: "#1A1A1A"
|
|
5900
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5901
|
+
d: "M117.981 65.765c1.864 0 3.374-2.217 3.374-4.95 0-2.735-1.51-4.952-3.374-4.952-1.863 0-3.374 2.217-3.374 4.951 0 2.734 1.511 4.95 3.374 4.95Z",
|
|
5902
|
+
fill: "#fff"
|
|
5903
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5904
|
+
d: "M100.012 80.196a14.156 14.156 0 0 0-2.785-1.159 10.598 10.598 0 0 0-5.713 0 14.09 14.09 0 0 0-2.78 1.159h-.027a.773.773 0 0 1-.973-1.159 8.74 8.74 0 0 1 6.639-3.049 8.754 8.754 0 0 1 6.638 3.05.773.773 0 0 1-.977 1.158h-.022Z",
|
|
5905
|
+
fill: "#999"
|
|
5906
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5907
|
+
d: "M44.788 67.69c.853 0 1.545-1.731 1.545-3.867 0-2.137-.692-3.868-1.545-3.868-.852 0-1.544 1.731-1.544 3.867 0 2.137.691 3.868 1.544 3.868Zm99.38 0c.853 0 1.544-1.731 1.544-3.867 0-2.137-.691-3.868-1.544-3.868-.853 0-1.544 1.731-1.544 3.867 0 2.137.691 3.868 1.544 3.868Z",
|
|
5908
|
+
fill: "#4BAAF7"
|
|
5909
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5910
|
+
d: "M79.596 106.857s-13.835 0-13.835-18.752",
|
|
5911
|
+
strokeWidth: "13.63",
|
|
5912
|
+
strokeMiterlimit: "10",
|
|
5913
|
+
strokeLinecap: "round",
|
|
5914
|
+
stroke: "#4D4D4D"
|
|
5915
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5916
|
+
d: "M79.295 99.708h-.004a2.453 2.453 0 0 0-2.34 2.56l.353 7.781a2.453 2.453 0 0 0 2.564 2.337h.004a2.452 2.452 0 0 0 2.34-2.559l-.353-7.782a2.453 2.453 0 0 0-2.564-2.337Z",
|
|
5917
|
+
fill: "gray"
|
|
5918
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5919
|
+
d: "M109.137 104.385s3.851 3.681 10.947-1.181",
|
|
5920
|
+
strokeWidth: "13.63",
|
|
5921
|
+
strokeMiterlimit: "10",
|
|
5922
|
+
strokeLinecap: "round",
|
|
5923
|
+
stroke: "#4D4D4D"
|
|
5924
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5925
|
+
d: "m107.907 112.125.004.001a2.455 2.455 0 0 0 2.859-1.966l1.414-7.661a2.451 2.451 0 0 0-1.97-2.854h-.004a2.455 2.455 0 0 0-2.859 1.965l-1.413 7.661a2.45 2.45 0 0 0 1.969 2.854Z",
|
|
5926
|
+
fill: "gray"
|
|
5927
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5928
|
+
d: "M89.494 121.176s-4.44 8.569-3.936 13.934",
|
|
5929
|
+
strokeWidth: "13.63",
|
|
5930
|
+
strokeMiterlimit: "10",
|
|
5931
|
+
strokeLinecap: "round",
|
|
5932
|
+
stroke: "#4D4D4D"
|
|
5933
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5934
|
+
d: "M88.59 128.571c3.535 0 6.4-2.861 6.4-6.39a6.395 6.395 0 0 0-6.4-6.39 6.395 6.395 0 0 0-6.4 6.39 6.395 6.395 0 0 0 6.4 6.39Z",
|
|
5935
|
+
fill: "gray"
|
|
5936
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5937
|
+
d: "M76.233 146.043h12.585v3.966a1.205 1.205 0 0 1-1.205 1.204H74.068a1.205 1.205 0 0 1-1.205-1.204v-.601a3.367 3.367 0 0 1 .989-2.378 3.38 3.38 0 0 1 2.38-.987Z",
|
|
5938
|
+
fill: "#333"
|
|
5939
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5940
|
+
d: "M85.808 149.557s8.631.125 6.752-8.774c-1.878-8.899-13-16.291-16.263-6.434-3.262 9.857-1.499 16.166 9.511 15.208Z",
|
|
5941
|
+
fill: "#F2F2F2"
|
|
5942
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5943
|
+
d: "M100.159 121.176s4.463 8.569 3.937 13.934",
|
|
5944
|
+
strokeWidth: "13.63",
|
|
5945
|
+
strokeMiterlimit: "10",
|
|
5946
|
+
strokeLinecap: "round",
|
|
5947
|
+
stroke: "#4D4D4D"
|
|
5948
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5949
|
+
d: "M101.064 128.571c3.534 0 6.4-2.861 6.4-6.39 0-3.529-2.866-6.39-6.4-6.39a6.395 6.395 0 0 0-6.4 6.39 6.395 6.395 0 0 0 6.4 6.39Z",
|
|
5950
|
+
fill: "gray"
|
|
5951
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5952
|
+
d: "M115.584 151.216h-13.545a1.206 1.206 0 0 1-1.205-1.203v-3.98h12.586a3.37 3.37 0 0 1 3.374 3.369v.602a1.21 1.21 0 0 1-.745 1.121 1.23 1.23 0 0 1-.465.091Z",
|
|
5953
|
+
fill: "#333"
|
|
5954
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5955
|
+
d: "M103.838 149.557s-8.632.125-6.757-8.774c1.874-8.899 13.036-16.291 16.285-6.434 3.249 9.857 1.5 16.166-9.528 15.208Zm6.725-40.315c-.549-9.652-7.975-12.415-16.91-11.907-8.935.508-16.004 4.091-15.455 13.748.549 9.656 8.243 17.067 17.178 16.559 8.935-.508 15.736-8.743 15.187-18.4Z",
|
|
5956
|
+
fill: "#F2F2F2"
|
|
5957
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5958
|
+
d: "M110.402 107.707c-1.129 7.958-7.271 14.228-15.027 14.665-8.39.477-15.683-6.034-16.995-14.821a15.77 15.77 0 0 0-.183 3.533c.549 9.652 8.239 17.067 17.178 16.559 8.939-.508 15.736-8.742 15.174-18.399a14.03 14.03 0 0 0-.147-1.537Z",
|
|
5959
|
+
fill: "#E6E6E6"
|
|
5960
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5961
|
+
d: "M100.76 105.262H88a.66.66 0 0 0-.66.66v1.871c0 .365.296.66.66.66h12.76a.66.66 0 0 0 .66-.66v-1.871a.66.66 0 0 0-.66-.66Zm0 5.512H88a.66.66 0 0 0-.66.66v1.871c0 .364.296.66.66.66h12.76a.66.66 0 0 0 .66-.66v-1.871a.66.66 0 0 0-.66-.66Zm0 5.505H88a.66.66 0 0 0-.66.66v1.871c0 .364.296.66.66.66h12.76a.66.66 0 0 0 .66-.66v-1.871a.66.66 0 0 0-.66-.66Z",
|
|
5962
|
+
fill: "#3690EA"
|
|
5963
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5964
|
+
d: "M133.43 107.146c5.688-4.463 7.529-11.6 4.111-15.943-3.417-4.343-10.799-4.245-16.487.218-5.688 4.463-7.529 11.601-4.111 15.943 3.417 4.343 10.799 4.245 16.487-.218Z",
|
|
5965
|
+
fill: "#F2F2F2"
|
|
5966
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5967
|
+
d: "M136.74 95.34c-3.418-4.344-10.8-4.246-16.486.22a15.744 15.744 0 0 0-5.034 6.683c-.031-3.725 2.035-7.87 5.802-10.837 5.69-4.456 13.072-4.559 16.491-.218 1.972 2.508 2.182 5.953.919 9.273a8.246 8.246 0 0 0-1.692-5.12Z",
|
|
5968
|
+
fill: "#E6E6E6"
|
|
5969
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5970
|
+
d: "M127.405 89.78c1.87.546 3.824.751 5.766.605v0a16.153 16.153 0 0 0 9.056-3.631",
|
|
5971
|
+
strokeWidth: "13.63",
|
|
5972
|
+
strokeMiterlimit: "10",
|
|
5973
|
+
strokeLinecap: "round",
|
|
5974
|
+
stroke: "#333"
|
|
5975
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5976
|
+
d: "M79.875 85.766c2.25-7.476-.567-14.93-6.293-16.649-5.727-1.718-12.194 2.949-14.444 10.425-2.251 7.476.567 14.93 6.293 16.648 5.727 1.719 12.194-2.948 14.444-10.424Z",
|
|
5977
|
+
fill: "#F2F2F2"
|
|
5978
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5979
|
+
d: "M69.713 71.558c5.726 1.72 8.542 9.175 6.293 16.652a16.978 16.978 0 0 1-4.74 7.687c3.767-1.435 7.141-5.151 8.627-10.12 2.232-7.477-.567-14.932-6.293-16.648-3.311-.993-6.863.152-9.706 2.736 1.85-.75 3.9-.858 5.82-.307Z",
|
|
5980
|
+
fill: "#E6E6E6"
|
|
5981
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5982
|
+
d: "M77.006 68.04a6.195 6.195 0 0 1-4.269-1.866 6.176 6.176 0 0 1 0-8.623 6.195 6.195 0 0 1 4.27-1.867",
|
|
5983
|
+
strokeWidth: "13.63",
|
|
5984
|
+
strokeMiterlimit: "10",
|
|
5985
|
+
strokeLinecap: "round",
|
|
5986
|
+
stroke: "#333"
|
|
5987
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5988
|
+
d: "M81.567 54.262c-.103.03-.205.07-.303.106l-.304.112-.303.111-.3.112-.303.111c-.103.031-.2.071-.303.111-.103.04-.201.072-.304.108l-.299.11-.303.112-.304.112c-.102.03-.2.071-.303.111l-.3.107-.303.111-.303.112-.304.111c-.098.031-.2.072-.299.112-.098.04-.205.07-.303.111-.099.04-.201.071-.304.107l-.299.111-.303.112a5.63 5.63 0 0 0-3.824 4.578 5.62 5.62 0 0 0 1.101 4.178 5.578 5.578 0 0 0 2.754 1.956l.303.112.304.111.308.112.303.11.304.112.303.112.304.111.303.112.308.111.304.111.303.112.304.111c.102.036.2.076.303.107l.308.116c.098.036.2.076.303.107.103.031.201.08.304.111.103.031.2.08.303.112.103.03.201.08.304.111.103.031.2.08.303.111.103.032.206.08.308.112a8.12 8.12 0 0 0 10.027-3.863 8.087 8.087 0 0 0-2.619-10.407 8.117 8.117 0 0 0-7.479-.88v.004Z",
|
|
5989
|
+
fill: "#2278D6"
|
|
5990
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5991
|
+
d: "M97.105 47.237c-.192.062-.389.138-.58.21-.193.07-.393.142-.585.213-.192.072-.389.138-.585.214-.196.076-.388.138-.58.214-.192.076-.393.138-.585.214-.192.076-.388.138-.584.214-.197.076-.389.138-.585.214-.197.075-.388.138-.58.214-.192.075-.389.138-.585.213-.196.076-.388.139-.585.21-.196.071-.388.143-.58.214-.192.071-.392.138-.584.214-.192.075-.389.138-.585.214-.196.075-.388.138-.585.213-.196.076-.388.139-.58.214-.192.076-.393.139-.585.214-.191.076-.388.138-.584.214-.197.076-.389.138-.585.214-.196.076-.388.134-.58.21-.192.075-.388.138-.585.213a10.762 10.762 0 0 0-3.146 1.65 10.844 10.844 0 0 0-1.674 15.763 10.879 10.879 0 0 0 4.883 3.233c.196.075.388.151.589.213.2.063.388.152.585.214.196.063.392.152.589.219.196.067.388.147.584.214l.59.213c.196.076.388.152.589.214.2.063.388.152.584.214.197.063.388.152.59.214.2.063.388.152.584.219.196.066.388.147.59.213.2.067.387.148.584.214.196.067.388.147.589.214.2.067.388.152.584.214.197.063.393.152.59.214.196.062.388.151.584.218l.59.214c.196.072.388.147.584.214.196.067.393.147.59.214.196.067.387.151.588.214.201.062.388.151.585.214a15.669 15.669 0 0 0 14.439-1.806 15.624 15.624 0 0 0 6.706-12.895 15.597 15.597 0 0 0-1.829-7.256 15.659 15.659 0 0 0-19.454-7.244Z",
|
|
5992
|
+
fill: "#3690EA"
|
|
5993
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5994
|
+
d: "M119.065 37.388a25.93 25.93 0 0 0-.978.356c-.326.125-.651.232-.977.357-.326.125-.652.232-.978.356-.325.125-.651.232-.977.361-.326.13-.652.232-.977.357-.326.125-.652.232-.978.356-.326.125-.656.232-.977.357-.322.125-.656.232-.978.36-.321.13-.651.228-.977.357-.326.13-.656.232-.977.357-.322.124-.656.231-.978.356-.321.125-.656.232-.977.357-.321.125-.656.231-.977.36-.322.13-.657.228-.978.357-.321.13-.656.232-.977.357-.322.124-.656.231-.978.356-.321.125-.656.232-.982.361-.325.13-.651.227-.977.357-.326.129-.651.227-.973.356-.321.13-.656.232-.982.357a18.217 18.217 0 0 0-7.281 4.523A18.158 18.158 0 0 0 90.716 72.8a18.097 18.097 0 0 0 8.926 6.314c.326.13.651.254.986.361.335.107.652.254.982.361.33.107.652.25.986.36.335.112.647.25.982.357.335.107.652.254.982.361.33.107.652.25.986.361.335.112.652.25.982.357.33.107.652.254.986.36.335.108.648.25.982.362.335.111.652.25.982.356.33.107.652.254.986.361.335.107.652.25.982.361.331.111.652.25.982.357.33.106.656.253.986.36.331.107.652.254.982.361.331.107.652.25.987.361.334.112.651.25.981.357.331.107.652.254.987.36.334.108.647.25.982.362.334.111.651.25.981.356a26.26 26.26 0 0 0 24.2-3.02 26.2 26.2 0 0 0 8.29-9.42 26.147 26.147 0 0 0-.114-24.35 26.194 26.194 0 0 0-8.377-9.343 26.244 26.244 0 0 0-24.226-2.795l-.022.009Z",
|
|
5995
|
+
fill: "#50B0FF"
|
|
5996
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
5997
|
+
d: "M128.994 80.692a18.926 18.926 0 0 1-11.736-4.091 18.853 18.853 0 0 1-5.352-22.825 18.889 18.889 0 0 1 8.696-8.867 18.93 18.93 0 0 1 22.967 4.864 18.856 18.856 0 0 1 .514 23.437 18.738 18.738 0 0 1-6.655 5.529 18.772 18.772 0 0 1-8.434 1.953Z",
|
|
5998
|
+
fill: "#D6DEE5"
|
|
5999
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
6000
|
+
d: "M129.021 45.14a16.719 16.719 0 0 1 10.373 3.604 16.67 16.67 0 0 1 5.887 9.258 16.65 16.65 0 0 1-1.144 10.906 16.687 16.687 0 0 1-7.681 7.838 16.724 16.724 0 0 1-10.896 1.38 16.704 16.704 0 0 1-9.398-5.675 16.657 16.657 0 0 1-.449-20.708 16.64 16.64 0 0 1 13.322-6.604h-.014Zm.014-4.417a21.143 21.143 0 0 0-13.684 5.01 21.066 21.066 0 0 0-4.43 26.958 21.12 21.12 0 0 0 11.363 9.113 21.153 21.153 0 0 0 14.569-.404 21.113 21.113 0 0 0 10.84-9.728 21.063 21.063 0 0 0 1.948-14.422 21.086 21.086 0 0 0-7.869-12.249 20.973 20.973 0 0 0-12.737-4.278Z",
|
|
6001
|
+
fill: "#1B64CE"
|
|
6002
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
6003
|
+
d: "M131.495 67.397c4.287 0 7.762-3.47 7.762-7.749 0-4.28-3.475-7.75-7.762-7.75-4.286 0-7.761 3.47-7.761 7.75 0 4.28 3.475 7.75 7.761 7.75Z",
|
|
6004
|
+
fill: "#fff"
|
|
6005
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
6006
|
+
d: "M137.039 56.638a3.996 3.996 0 0 0 3.999-3.993 3.996 3.996 0 0 0-3.999-3.992 3.996 3.996 0 0 0-3.999 3.992 3.996 3.996 0 0 0 3.999 3.993Z",
|
|
6007
|
+
fill: "#fff"
|
|
6008
|
+
}), /*#__PURE__*/React__default.createElement("mask", {
|
|
6009
|
+
id: `${id}-a`,
|
|
6010
|
+
style: {
|
|
6011
|
+
maskType: "alpha"
|
|
6012
|
+
},
|
|
6013
|
+
maskUnits: "userSpaceOnUse",
|
|
6014
|
+
x: "90",
|
|
6015
|
+
y: "96",
|
|
6016
|
+
width: "9",
|
|
6017
|
+
height: "4"
|
|
6018
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
6019
|
+
d: "M94.651 96.461c-1.785 0-3.26-.038-3.78-.038v2.897h7.14v-2.897c-.371 0-1.574.038-3.36.038Z",
|
|
6020
|
+
fill: "#000"
|
|
6021
|
+
})), /*#__PURE__*/React__default.createElement("g", {
|
|
6022
|
+
mask: `url(#${id}-a)`
|
|
6023
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
6024
|
+
d: "M94.51 95.545c-1.732.049-3.124.25-3.124.494v2.617c0 .245 1.392.446 3.124.495 1.731.049 3.124-.138 3.124-.384v-2.839c0-.245-1.393-.432-3.124-.383Z",
|
|
6025
|
+
fill: "#999"
|
|
6026
|
+
})));
|
|
6027
|
+
}
|
|
6028
|
+
|
|
6029
|
+
var styles$b = {"spinner":"spinner-b5tlz"};
|
|
6030
|
+
|
|
6031
|
+
function LoadingSpinner({
|
|
6032
|
+
size = 48,
|
|
6033
|
+
trackWidth = 6
|
|
6034
|
+
}) {
|
|
6035
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
6036
|
+
"aria-hidden": "true",
|
|
6037
|
+
className: styles$b.spinner,
|
|
6038
|
+
style: {
|
|
6039
|
+
"--spinner-size": `${size}px`,
|
|
6040
|
+
"--spinner-track-width": `${trackWidth}px`
|
|
6041
|
+
}
|
|
6042
|
+
});
|
|
6043
|
+
}
|
|
4347
6044
|
|
|
4348
6045
|
function SearchResults({
|
|
4349
6046
|
label,
|
|
@@ -4364,18 +6061,36 @@ function SearchResults({
|
|
|
4364
6061
|
...navigation
|
|
4365
6062
|
});
|
|
4366
6063
|
}
|
|
4367
|
-
return /*#__PURE__*/React__default.createElement(
|
|
4368
|
-
role: "status"
|
|
4369
|
-
|
|
6064
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
6065
|
+
role: "status",
|
|
6066
|
+
justify: "center",
|
|
6067
|
+
align: "center",
|
|
6068
|
+
gap: 2,
|
|
6069
|
+
direction: "column",
|
|
6070
|
+
style: {
|
|
6071
|
+
color: "var(--t-text-color-placeholder)",
|
|
6072
|
+
fontSize: "var(--t-font-size-md)",
|
|
6073
|
+
marginTop: 48
|
|
6074
|
+
}
|
|
6075
|
+
}, /*#__PURE__*/React__default.createElement(LoadingSpinner, {
|
|
6076
|
+
size: 40,
|
|
6077
|
+
trackWidth: 5
|
|
6078
|
+
}), "Searching\u2026");
|
|
4370
6079
|
case "error":
|
|
4371
|
-
return /*#__PURE__*/React__default.createElement(
|
|
4372
|
-
|
|
4373
|
-
|
|
6080
|
+
return /*#__PURE__*/React__default.createElement(BlankState$1, {
|
|
6081
|
+
image: /*#__PURE__*/React__default.createElement(BlankStateError, null),
|
|
6082
|
+
role: "alert",
|
|
6083
|
+
subtitle: "Try again in a moment.",
|
|
6084
|
+
title: "Search isn\u2019t working right now"
|
|
6085
|
+
});
|
|
4374
6086
|
case "done":
|
|
4375
6087
|
if (sections.length === 0) {
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
6088
|
+
// The panel's result count announces this, so it isn't read twice.
|
|
6089
|
+
return /*#__PURE__*/React__default.createElement(BlankState$1, {
|
|
6090
|
+
image: /*#__PURE__*/React__default.createElement(BlankStateNoResults, null),
|
|
6091
|
+
subtitle: "Clear search and try again.",
|
|
6092
|
+
title: `No results for “${term.trim()}”`
|
|
6093
|
+
});
|
|
4379
6094
|
}
|
|
4380
6095
|
return /*#__PURE__*/React__default.createElement(ResultListbox, {
|
|
4381
6096
|
busy: false,
|
|
@@ -4390,31 +6105,43 @@ function SearchResults({
|
|
|
4390
6105
|
// stays put as more recents load and as their lookups answer.
|
|
4391
6106
|
const RECENTS = "recents";
|
|
4392
6107
|
function SearchPanel({
|
|
6108
|
+
appName,
|
|
6109
|
+
mobile = false,
|
|
4393
6110
|
env,
|
|
6111
|
+
onClose,
|
|
6112
|
+
onOpenResult,
|
|
4394
6113
|
products
|
|
4395
6114
|
}) {
|
|
4396
6115
|
var _a, _b;
|
|
4397
6116
|
const listboxId = useInstanceId("product-search-results");
|
|
4398
6117
|
const [term, setTerm] = React__default.useState("");
|
|
4399
|
-
const [selectedSlug, setSelectedSlug] = React__default.useState(() =>
|
|
6118
|
+
const [selectedSlug, setSelectedSlug] = React__default.useState(() => defaultProduct(products, appName).slug);
|
|
4400
6119
|
const product = (_a = products.find(({
|
|
4401
6120
|
slug
|
|
4402
6121
|
}) => slug === selectedSlug)) !== null && _a !== void 0 ? _a : products[0];
|
|
4403
6122
|
const hasTerm = term.trim() !== "";
|
|
4404
6123
|
const search = useProductSearch(product.slug, term);
|
|
4405
6124
|
const groups = "groups" in search ? search.groups : undefined;
|
|
4406
|
-
const
|
|
6125
|
+
const {
|
|
6126
|
+
organizationTimeZone
|
|
6127
|
+
} = useStore();
|
|
6128
|
+
const sections = React__default.useMemo(() => groupSections(groups, organizationTimeZone), [groups, organizationTimeZone]);
|
|
4407
6129
|
const {
|
|
4408
6130
|
visits,
|
|
4409
6131
|
...recents
|
|
4410
6132
|
} = useRecentVisits(env);
|
|
4411
|
-
const recentItems = visits.map(visitItem);
|
|
6133
|
+
const recentItems = visits.map(visit => visitItem(visit, organizationTimeZone));
|
|
4412
6134
|
const items = hasTerm ? sections.flatMap(section => section.items) : recentItems;
|
|
4413
|
-
|
|
6135
|
+
// Phones open results by tapping them, with no highlight to arrow through.
|
|
6136
|
+
// A narrow window with a keyboard and mouse keeps both, as does the desktop
|
|
6137
|
+
// layout on a touch device, whose keyboard hints still advertise them.
|
|
6138
|
+
const touchOnly = useMediaQuery("(hover: none) and (pointer: coarse)");
|
|
6139
|
+
const navigation = useResultNavigation(items, hasTerm ? sections : RECENTS, !(mobile && touchOnly));
|
|
4414
6140
|
const {
|
|
4415
6141
|
highlightedIndex
|
|
4416
6142
|
} = navigation;
|
|
4417
6143
|
const inputRef = React__default.useRef(null);
|
|
6144
|
+
const resultCount = useAnnouncement(hasTerm && search.status === "done" ? `${items.length === 0 ? "No results" : `${items.length} ${items.length === 1 ? "result" : "results"}`} for “${term.trim()}” in ${product.appName}` : null);
|
|
4418
6145
|
const [announceHighlight, setAnnounceHighlight] = React__default.useState(false);
|
|
4419
6146
|
// The tabs keep focus while arrowing through results, but only the focused
|
|
4420
6147
|
// input can point screen readers at the highlight, so from the tabs it's
|
|
@@ -4430,41 +6157,50 @@ function SearchPanel({
|
|
|
4430
6157
|
navigation.handleKeyDown(event);
|
|
4431
6158
|
}
|
|
4432
6159
|
};
|
|
4433
|
-
React__default.
|
|
4434
|
-
|
|
4435
|
-
|
|
6160
|
+
const results = hasTerm ? (/*#__PURE__*/React__default.createElement(SearchResults, {
|
|
6161
|
+
highlightedIndex: highlightedIndex,
|
|
6162
|
+
id: listboxId,
|
|
6163
|
+
label: `Results from Planning Center ${product.appName}`,
|
|
6164
|
+
onHighlight: navigation.highlightIndex,
|
|
6165
|
+
onOpen: onOpenResult,
|
|
6166
|
+
sections: sections,
|
|
6167
|
+
status: search.status,
|
|
6168
|
+
term: term
|
|
6169
|
+
})) : (/*#__PURE__*/React__default.createElement(RecentlyVisited, {
|
|
6170
|
+
highlightedIndex: highlightedIndex,
|
|
6171
|
+
id: listboxId,
|
|
6172
|
+
items: recentItems,
|
|
6173
|
+
onHighlight: navigation.highlightIndex,
|
|
6174
|
+
onOpen: onOpenResult,
|
|
6175
|
+
...recents
|
|
6176
|
+
}));
|
|
4436
6177
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SearchInput, {
|
|
4437
6178
|
expanded: items.length > 0,
|
|
4438
6179
|
highlightedIndex: highlightedIndex,
|
|
4439
6180
|
inputRef: inputRef,
|
|
4440
6181
|
listboxId: listboxId,
|
|
4441
6182
|
onChange: setTerm,
|
|
6183
|
+
onClose: onClose,
|
|
4442
6184
|
onFocus: () => setAnnounceHighlight(false),
|
|
4443
6185
|
onKeyDown: navigation.handleKeyDown,
|
|
4444
6186
|
value: term
|
|
4445
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
6187
|
+
}), mobile ? (/*#__PURE__*/React__default.createElement(ProductSelect, {
|
|
6188
|
+
onSelect: setSelectedSlug,
|
|
6189
|
+
products: products,
|
|
6190
|
+
selected: product
|
|
6191
|
+
}, results)) : (/*#__PURE__*/React__default.createElement(ProductTabs, {
|
|
4446
6192
|
onKeyDown: handleTabsKeyDown,
|
|
4447
6193
|
onSelect: setSelectedSlug,
|
|
4448
6194
|
products: products,
|
|
4449
6195
|
selected: product
|
|
4450
|
-
},
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
onHighlight: navigation.highlightIndex,
|
|
4455
|
-
sections: sections,
|
|
4456
|
-
status: search.status,
|
|
4457
|
-
term: term
|
|
4458
|
-
})) : (/*#__PURE__*/React__default.createElement(RecentlyVisited, {
|
|
4459
|
-
highlightedIndex: highlightedIndex,
|
|
4460
|
-
id: listboxId,
|
|
4461
|
-
items: recentItems,
|
|
4462
|
-
onHighlight: navigation.highlightIndex,
|
|
4463
|
-
...recents
|
|
4464
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
6196
|
+
}, results)), /*#__PURE__*/React__default.createElement("div", {
|
|
6197
|
+
"aria-live": "polite",
|
|
6198
|
+
className: styles$k.visuallyHidden
|
|
6199
|
+
}, announceHighlight ? (_b = navigation.highlighted) === null || _b === void 0 ? void 0 : _b.title : null), /*#__PURE__*/React__default.createElement("div", {
|
|
4465
6200
|
"aria-live": "polite",
|
|
4466
|
-
className: styles$
|
|
4467
|
-
|
|
6201
|
+
className: styles$k.visuallyHidden,
|
|
6202
|
+
"data-testid": "result-count"
|
|
6203
|
+
}, resultCount), mobile ? null : /*#__PURE__*/React__default.createElement(KeyboardHints, {
|
|
4468
6204
|
copied: navigation.copied
|
|
4469
6205
|
}));
|
|
4470
6206
|
}
|
|
@@ -4535,32 +6271,6 @@ function useSearchShortcut(enabled, open, setOpen) {
|
|
|
4535
6271
|
}, [enabled, open, setOpen]);
|
|
4536
6272
|
}
|
|
4537
6273
|
|
|
4538
|
-
const SEARCHABLE_PRODUCTS = [{
|
|
4539
|
-
appName: "Calendar",
|
|
4540
|
-
slug: "calendar"
|
|
4541
|
-
}, {
|
|
4542
|
-
appName: "Check-Ins",
|
|
4543
|
-
slug: "check-ins"
|
|
4544
|
-
}, {
|
|
4545
|
-
appName: "Giving",
|
|
4546
|
-
slug: "giving"
|
|
4547
|
-
}, {
|
|
4548
|
-
appName: "Groups",
|
|
4549
|
-
slug: "groups"
|
|
4550
|
-
}, {
|
|
4551
|
-
appName: "People",
|
|
4552
|
-
slug: "people"
|
|
4553
|
-
}, {
|
|
4554
|
-
appName: "Publishing",
|
|
4555
|
-
slug: "publishing"
|
|
4556
|
-
}, {
|
|
4557
|
-
appName: "Registrations",
|
|
4558
|
-
slug: "registrations"
|
|
4559
|
-
}, {
|
|
4560
|
-
appName: "Services",
|
|
4561
|
-
slug: "services"
|
|
4562
|
-
}];
|
|
4563
|
-
|
|
4564
6274
|
const PERMISSION_CHECKS = {
|
|
4565
6275
|
"check-ins": () => fetchMe("check-ins", "permission").then(({
|
|
4566
6276
|
permission
|
|
@@ -4665,24 +6375,60 @@ function inSwitcherOrder(apps) {
|
|
|
4665
6375
|
return groupApps(apps).restProducts.flatMap(app => SEARCHABLE_PRODUCTS.filter(product => product.appName === app.name));
|
|
4666
6376
|
}
|
|
4667
6377
|
|
|
6378
|
+
/**
|
|
6379
|
+
* Writes the height of the visible part of the page to the parent of `ref`'s
|
|
6380
|
+
* element as `--visual-viewport-height`. It shrinks when an on-screen keyboard
|
|
6381
|
+
* opens; `100dvh` doesn't, since mobile Safari draws the keyboard over it.
|
|
6382
|
+
*/
|
|
6383
|
+
function useVisualViewportHeight(ref, enabled) {
|
|
6384
|
+
React__default.useEffect(() => {
|
|
6385
|
+
var _a;
|
|
6386
|
+
const viewport = window.visualViewport;
|
|
6387
|
+
const parent = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
6388
|
+
if (!enabled || !viewport || !parent) return undefined;
|
|
6389
|
+
const update = () => parent.style.setProperty("--visual-viewport-height", `${viewport.height}px`);
|
|
6390
|
+
update();
|
|
6391
|
+
viewport.addEventListener("resize", update);
|
|
6392
|
+
return () => {
|
|
6393
|
+
viewport.removeEventListener("resize", update);
|
|
6394
|
+
parent.style.removeProperty("--visual-viewport-height");
|
|
6395
|
+
};
|
|
6396
|
+
}, [enabled, ref]);
|
|
6397
|
+
}
|
|
6398
|
+
|
|
4668
6399
|
function ProductSearch({
|
|
6400
|
+
appName,
|
|
4669
6401
|
apps,
|
|
6402
|
+
mobile = false,
|
|
4670
6403
|
env
|
|
4671
6404
|
}) {
|
|
4672
6405
|
const searchable = useSearchableProducts(apps);
|
|
4673
6406
|
const [open, setOpen] = React__default.useState(false);
|
|
6407
|
+
const modalRef = React__default.useRef(null);
|
|
6408
|
+
// Sizes Tapestry's modal frame, the dialog's parent, to fit above the keyboard.
|
|
6409
|
+
useVisualViewportHeight(modalRef, mobile && open);
|
|
4674
6410
|
const available = searchable.status === "done" && searchable.products.length > 0;
|
|
4675
6411
|
useSearchShortcut(available, open, setOpen);
|
|
4676
6412
|
if (!available) return null;
|
|
4677
6413
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SearchButton, {
|
|
6414
|
+
mobile: mobile,
|
|
4678
6415
|
onClick: () => setOpen(true)
|
|
4679
6416
|
}), /*#__PURE__*/React__default.createElement(Modal, {
|
|
4680
6417
|
"aria-label": "Search",
|
|
6418
|
+
className: styles$k.modal,
|
|
4681
6419
|
dismissible: true,
|
|
6420
|
+
id: "product_search_modal",
|
|
4682
6421
|
onClose: () => setOpen(false),
|
|
4683
|
-
open: open
|
|
6422
|
+
open: open,
|
|
6423
|
+
ref: modalRef,
|
|
6424
|
+
size: "lg"
|
|
4684
6425
|
}, /*#__PURE__*/React__default.createElement(SearchPanel, {
|
|
6426
|
+
appName: appName,
|
|
6427
|
+
mobile: mobile,
|
|
4685
6428
|
env: env,
|
|
6429
|
+
// Phones have no Esc, so mobile search gets a close button.
|
|
6430
|
+
onClose: mobile ? () => setOpen(false) : undefined,
|
|
6431
|
+
onOpenResult: () => setOpen(false),
|
|
4686
6432
|
products: searchable.products
|
|
4687
6433
|
})));
|
|
4688
6434
|
}
|
|
@@ -4976,6 +6722,7 @@ const NotSmallTopbar = ({
|
|
|
4976
6722
|
margin: "auto"
|
|
4977
6723
|
}
|
|
4978
6724
|
}), !notificationsEnabled && notifications(), productSearchEnabled ? (/*#__PURE__*/React__default.createElement(ProductSearch, {
|
|
6725
|
+
appName: props.appName,
|
|
4979
6726
|
apps: props.apps,
|
|
4980
6727
|
env: props.env
|
|
4981
6728
|
})) : search({
|
|
@@ -32890,7 +34637,7 @@ ClientStorage.defaultProps = {
|
|
|
32890
34637
|
method: "localStorage"
|
|
32891
34638
|
};
|
|
32892
34639
|
|
|
32893
|
-
var styles$6 = {"appmenu-button":"appmenu-button-b0UvT","appmenu-layer":"appmenu-layer-0IQpN","appmenu-container":"appmenu-container-gackd","appmenu-scroll":"appmenu-scroll-mPSx0","appmenu-list":"appmenu-list-h7clX","appmenu-list-a":"appmenu-list-a-rGIQN","appmenu-list-a--top":"appmenu-list-a--top-RT-2F","appmenu-list-a--bottom":"appmenu-list-a--bottom-YDeBC","appmenu-close-button":"appmenu-close-button-vv9bV","current-route":"current-route-wpJgz","is-active":"is-active-wy8Bg","routes":"routes-Nmt1S","route":"route-kkknQ","profile-button":"profile-button-a2WO2"};
|
|
34640
|
+
var styles$6 = {"appmenu-button":"appmenu-button-b0UvT","appmenu-layer":"appmenu-layer-0IQpN","appmenu-container":"appmenu-container-gackd","appmenu-scroll":"appmenu-scroll-mPSx0","appmenu-list":"appmenu-list-h7clX","appmenu-list-a":"appmenu-list-a-rGIQN","appmenu-list-a--top":"appmenu-list-a--top-RT-2F","appmenu-list-a--bottom":"appmenu-list-a--bottom-YDeBC","appmenu-close-button":"appmenu-close-button-vv9bV","current-route":"current-route-wpJgz","actions":"actions-INQ7-","is-active":"is-active-wy8Bg","routes":"routes-Nmt1S","route":"route-kkknQ","profile-button":"profile-button-a2WO2"};
|
|
32894
34641
|
|
|
32895
34642
|
function AccountSettingsLink({
|
|
32896
34643
|
env
|
|
@@ -33110,7 +34857,14 @@ const SmallTopbar = ({
|
|
|
33110
34857
|
setProductSwitcherVisible(false);
|
|
33111
34858
|
setRoutesMenuVisible(visible => !visible);
|
|
33112
34859
|
} : null
|
|
33113
|
-
}, /*#__PURE__*/React__default.createElement(CurrentRouteComponent, null, capitalize$1(currentRouteText)), props.routes.length > 0 && /*#__PURE__*/React__default.createElement(DisclosureChevronIcon, null)), /*#__PURE__*/React__default.createElement("
|
|
34860
|
+
}, /*#__PURE__*/React__default.createElement(CurrentRouteComponent, null, capitalize$1(currentRouteText)), props.routes.length > 0 && /*#__PURE__*/React__default.createElement(DisclosureChevronIcon, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
34861
|
+
className: styles$6["actions"]
|
|
34862
|
+
}, productSearchEnabled && (/*#__PURE__*/React__default.createElement(ProductSearch, {
|
|
34863
|
+
appName: props.appName,
|
|
34864
|
+
apps: props.apps,
|
|
34865
|
+
mobile: true,
|
|
34866
|
+
env: props.env
|
|
34867
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
33114
34868
|
type: "button",
|
|
33115
34869
|
className: styles$6["profile-button"],
|
|
33116
34870
|
onClick: () => {
|
|
@@ -33121,7 +34875,7 @@ const SmallTopbar = ({
|
|
|
33121
34875
|
}, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
33122
34876
|
env: props.env,
|
|
33123
34877
|
url: props.userAvatarPath
|
|
33124
|
-
})));
|
|
34878
|
+
}))));
|
|
33125
34879
|
};
|
|
33126
34880
|
const SmallRoute = ({
|
|
33127
34881
|
active,
|
|
@@ -33611,38 +35365,6 @@ const SwitchView = ({
|
|
|
33611
35365
|
}));
|
|
33612
35366
|
};
|
|
33613
35367
|
|
|
33614
|
-
const collections = {
|
|
33615
|
-
general,
|
|
33616
|
-
toolbar
|
|
33617
|
-
};
|
|
33618
|
-
const paths = collections;
|
|
33619
|
-
function Icon({
|
|
33620
|
-
name,
|
|
33621
|
-
size = 16,
|
|
33622
|
-
style,
|
|
33623
|
-
theme,
|
|
33624
|
-
title,
|
|
33625
|
-
...props
|
|
33626
|
-
}) {
|
|
33627
|
-
const [collection, symbol] = name.split(".");
|
|
33628
|
-
return /*#__PURE__*/React__default.createElement("svg", {
|
|
33629
|
-
"aria-hidden": title ? undefined : true,
|
|
33630
|
-
fill: "currentColor",
|
|
33631
|
-
height: size,
|
|
33632
|
-
role: title ? "img" : undefined,
|
|
33633
|
-
style: {
|
|
33634
|
-
color: theme && `var(${theme})`,
|
|
33635
|
-
flexShrink: 0,
|
|
33636
|
-
...style
|
|
33637
|
-
},
|
|
33638
|
-
viewBox: "0 0 16 16",
|
|
33639
|
-
width: size,
|
|
33640
|
-
...props
|
|
33641
|
-
}, title && /*#__PURE__*/React__default.createElement("title", null, title), /*#__PURE__*/React__default.createElement("path", {
|
|
33642
|
-
d: paths[collection][symbol]
|
|
33643
|
-
}));
|
|
33644
|
-
}
|
|
33645
|
-
|
|
33646
35368
|
var styles$3 = {"color-mode-switcher":"color-mode-switcher-JpczO","color-mode-switcher-label":"color-mode-switcher-label-3jPM2","color-mode-switcher-modes":"color-mode-switcher-modes-u-bic"};
|
|
33647
35369
|
|
|
33648
35370
|
const COLOR_MODES = [{
|
|
@@ -35130,13 +36852,15 @@ const useNotifications = ({
|
|
|
35130
36852
|
return notification.data;
|
|
35131
36853
|
}
|
|
35132
36854
|
};
|
|
35133
|
-
const updateStateFromJoltMessage = React__default.useCallback(message => {
|
|
36855
|
+
const updateStateFromJoltMessage = React__default.useCallback(async message => {
|
|
35134
36856
|
try {
|
|
35135
36857
|
const joltMessageNotificationDataPayload = extractPayloadFromJoltMessage(message);
|
|
35136
|
-
fetchNotification(joltMessageNotificationDataPayload.data.id)
|
|
35137
|
-
|
|
35138
|
-
|
|
35139
|
-
}
|
|
36858
|
+
const resp = await fetchNotification(joltMessageNotificationDataPayload.data.id);
|
|
36859
|
+
if (!(resp === null || resp === void 0 ? void 0 : resp.data)) {
|
|
36860
|
+
return;
|
|
36861
|
+
}
|
|
36862
|
+
const notification = buildNotificationFromApiResponse(resp.data, resp);
|
|
36863
|
+
setNotifications(notifications => [...notifications.filter(candidate => candidate.id !== notification.id), notification]);
|
|
35140
36864
|
} catch (exception) {
|
|
35141
36865
|
console.error("topbar encountered error when updating state from jolt message", exception);
|
|
35142
36866
|
}
|