@sylphx/sdk 0.5.0 → 0.8.0-rc.1
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/README.md +38 -0
- package/dist/health/index.js +521 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/index.mjs +485 -0
- package/dist/health/index.mjs.map +1 -0
- package/dist/index.d.cts +3313 -20506
- package/dist/index.d.ts +3313 -20506
- package/dist/index.js +8401 -1698
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8110 -1456
- package/dist/index.mjs.map +1 -1
- package/dist/nextjs/index.d.cts +24 -5697
- package/dist/nextjs/index.d.ts +24 -5697
- package/dist/nextjs/index.js +24 -25
- package/dist/nextjs/index.js.map +1 -1
- package/dist/nextjs/index.mjs +24 -25
- package/dist/nextjs/index.mjs.map +1 -1
- package/dist/react/index.d.cts +404 -6088
- package/dist/react/index.d.ts +404 -6088
- package/dist/react/index.js +1131 -618
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +1198 -684
- package/dist/react/index.mjs.map +1 -1
- package/dist/server/index.d.cts +116 -19551
- package/dist/server/index.d.ts +116 -19551
- package/dist/server/index.js +130 -63
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +130 -53
- package/dist/server/index.mjs.map +1 -1
- package/dist/web-analytics.js +0 -3
- package/dist/web-analytics.js.map +1 -1
- package/dist/web-analytics.mjs +0 -3
- package/dist/web-analytics.mjs.map +1 -1
- package/package.json +13 -6
package/dist/react/index.js
CHANGED
|
@@ -7730,22 +7730,22 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
|
7730
7730
|
var Accordion = (0, import_react4.forwardRef)(
|
|
7731
7731
|
({
|
|
7732
7732
|
className,
|
|
7733
|
-
type = "single",
|
|
7733
|
+
type: _type = "single",
|
|
7734
7734
|
value,
|
|
7735
7735
|
defaultValue,
|
|
7736
7736
|
onValueChange,
|
|
7737
7737
|
disabled: disabled2,
|
|
7738
|
-
orientation = "vertical",
|
|
7738
|
+
orientation: _orientation = "vertical",
|
|
7739
7739
|
children
|
|
7740
7740
|
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
7741
7741
|
index_parts_exports.Root,
|
|
7742
7742
|
{
|
|
7743
7743
|
ref,
|
|
7744
|
-
value,
|
|
7745
|
-
defaultValue,
|
|
7746
|
-
onValueChange,
|
|
7747
|
-
disabled: disabled2,
|
|
7748
|
-
className,
|
|
7744
|
+
...value !== void 0 && { value },
|
|
7745
|
+
...defaultValue !== void 0 && { defaultValue },
|
|
7746
|
+
...onValueChange !== void 0 && { onValueChange },
|
|
7747
|
+
...disabled2 !== void 0 && { disabled: disabled2 },
|
|
7748
|
+
...className !== void 0 && { className },
|
|
7749
7749
|
children
|
|
7750
7750
|
}
|
|
7751
7751
|
)
|
|
@@ -7757,7 +7757,7 @@ var AccordionItem3 = (0, import_react4.forwardRef)(
|
|
|
7757
7757
|
{
|
|
7758
7758
|
ref,
|
|
7759
7759
|
value,
|
|
7760
|
-
disabled: disabled2,
|
|
7760
|
+
...disabled2 !== void 0 && { disabled: disabled2 },
|
|
7761
7761
|
className: cn("border-b", className),
|
|
7762
7762
|
children
|
|
7763
7763
|
}
|
|
@@ -15303,7 +15303,14 @@ function buttonVariants({
|
|
|
15303
15303
|
var Button = (0, import_react7.forwardRef)(
|
|
15304
15304
|
({ className, variant = "default", size: size4 = "default", asChild = false, ...props }, ref) => {
|
|
15305
15305
|
const Comp = asChild ? Slot : "button";
|
|
15306
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15307
|
+
Comp,
|
|
15308
|
+
{
|
|
15309
|
+
ref,
|
|
15310
|
+
className: buttonVariants({ variant, size: size4, ...className !== void 0 && { className } }),
|
|
15311
|
+
...props
|
|
15312
|
+
}
|
|
15313
|
+
);
|
|
15307
15314
|
}
|
|
15308
15315
|
);
|
|
15309
15316
|
Button.displayName = "Button";
|
|
@@ -15315,8 +15322,8 @@ var AlertDialogTrigger = (0, import_react8.forwardRef)(
|
|
|
15315
15322
|
index_parts_exports2.Trigger,
|
|
15316
15323
|
{
|
|
15317
15324
|
ref,
|
|
15318
|
-
className,
|
|
15319
|
-
|
|
15325
|
+
...className !== void 0 && { className },
|
|
15326
|
+
...asChild ? { render: children } : {},
|
|
15320
15327
|
children: asChild ? void 0 : children
|
|
15321
15328
|
}
|
|
15322
15329
|
)
|
|
@@ -15467,6 +15474,7 @@ var AvatarFallback = (0, import_react10.forwardRef)(
|
|
|
15467
15474
|
const timer = setTimeout(() => setCanRender(true), delayMs);
|
|
15468
15475
|
return () => clearTimeout(timer);
|
|
15469
15476
|
}
|
|
15477
|
+
return void 0;
|
|
15470
15478
|
}, [delayMs]);
|
|
15471
15479
|
if (status === "loaded" || !canRender) {
|
|
15472
15480
|
return null;
|
|
@@ -15530,8 +15538,6 @@ var BreadcrumbPage = (0, import_react11.forwardRef)(
|
|
|
15530
15538
|
"span",
|
|
15531
15539
|
{
|
|
15532
15540
|
ref,
|
|
15533
|
-
role: "link",
|
|
15534
|
-
"aria-disabled": "true",
|
|
15535
15541
|
"aria-current": "page",
|
|
15536
15542
|
className: cn("font-medium text-foreground", className),
|
|
15537
15543
|
...props
|
|
@@ -25857,6 +25863,7 @@ var ChallengeModal = (0, import_react41.forwardRef)(
|
|
|
25857
25863
|
const timer = setTimeout(reset, 200);
|
|
25858
25864
|
return () => clearTimeout(timer);
|
|
25859
25865
|
}
|
|
25866
|
+
return void 0;
|
|
25860
25867
|
}, [open, reset]);
|
|
25861
25868
|
(0, import_react41.useEffect)(() => {
|
|
25862
25869
|
if (requirement) {
|
|
@@ -25877,6 +25884,7 @@ var ChallengeModal = (0, import_react41.forwardRef)(
|
|
|
25877
25884
|
const timer = setTimeout(() => setCountdown(countdown - 1), 1e3);
|
|
25878
25885
|
return () => clearTimeout(timer);
|
|
25879
25886
|
}
|
|
25887
|
+
return void 0;
|
|
25880
25888
|
}, [countdown]);
|
|
25881
25889
|
const handleSendCode = async () => {
|
|
25882
25890
|
setLoading(true);
|
|
@@ -25962,7 +25970,7 @@ var ChallengeModal = (0, import_react41.forwardRef)(
|
|
|
25962
25970
|
}
|
|
25963
25971
|
)
|
|
25964
25972
|
] }),
|
|
25965
|
-
step === "identity" ?
|
|
25973
|
+
step === "identity" ? hasMultipleIdentityMethods ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
25966
25974
|
Tabs,
|
|
25967
25975
|
{
|
|
25968
25976
|
value: identityMethod,
|
|
@@ -26033,7 +26041,7 @@ var ChallengeModal = (0, import_react41.forwardRef)(
|
|
|
26033
26041
|
error: error2 ?? void 0,
|
|
26034
26042
|
autoFocus: true
|
|
26035
26043
|
}
|
|
26036
|
-
)
|
|
26044
|
+
) : hasMultipleMfaMethods ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
26037
26045
|
Tabs,
|
|
26038
26046
|
{
|
|
26039
26047
|
value: mfaMethod,
|
|
@@ -26096,7 +26104,7 @@ var ChallengeModal = (0, import_react41.forwardRef)(
|
|
|
26096
26104
|
error: error2 ?? void 0,
|
|
26097
26105
|
autoFocus: true
|
|
26098
26106
|
}
|
|
26099
|
-
)
|
|
26107
|
+
)
|
|
26100
26108
|
] }),
|
|
26101
26109
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DialogFooter, { children: [
|
|
26102
26110
|
step === "mfa" && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Button, { variant: "outline", onClick: () => setStep("identity"), disabled: loading, children: [
|
|
@@ -33992,7 +34000,7 @@ var SelectScrollDownButton = (0, import_react49.forwardRef)(
|
|
|
33992
34000
|
);
|
|
33993
34001
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
33994
34002
|
var SelectContent = (0, import_react49.forwardRef)(
|
|
33995
|
-
({ className, children, position = "popper", side = "bottom", sideOffset = 4 }, ref) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(index_parts_exports8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(index_parts_exports8.Positioner, { side, sideOffset, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
34003
|
+
({ className, children, position: _position = "popper", side = "bottom", sideOffset = 4 }, ref) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(index_parts_exports8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(index_parts_exports8.Positioner, { side, sideOffset, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
33996
34004
|
index_parts_exports8.Popup,
|
|
33997
34005
|
{
|
|
33998
34006
|
ref,
|
|
@@ -34396,6 +34404,7 @@ function TextEditor({
|
|
|
34396
34404
|
}, successDuration);
|
|
34397
34405
|
return () => clearTimeout(timer);
|
|
34398
34406
|
}
|
|
34407
|
+
return void 0;
|
|
34399
34408
|
}, [state]);
|
|
34400
34409
|
const startEditing = (0, import_react52.useCallback)(() => {
|
|
34401
34410
|
if (disabled2 || state !== "idle") return;
|
|
@@ -34511,11 +34520,12 @@ function TextEditor({
|
|
|
34511
34520
|
)
|
|
34512
34521
|
] });
|
|
34513
34522
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
34514
|
-
"
|
|
34523
|
+
"fieldset",
|
|
34515
34524
|
{
|
|
34516
34525
|
ref: containerRef,
|
|
34526
|
+
"aria-label": label,
|
|
34517
34527
|
className: cn(
|
|
34518
|
-
"group relative inline-flex items-center gap-1.5",
|
|
34528
|
+
"group relative inline-flex items-center gap-1.5 border-0 p-0 m-0 min-w-0",
|
|
34519
34529
|
disabled2 && "opacity-60 cursor-not-allowed",
|
|
34520
34530
|
className
|
|
34521
34531
|
),
|
|
@@ -34679,6 +34689,7 @@ function SwitchEditor({ value, onSave, validate, disabled: disabled2, className,
|
|
|
34679
34689
|
}, successDuration);
|
|
34680
34690
|
return () => clearTimeout(timer);
|
|
34681
34691
|
}
|
|
34692
|
+
return void 0;
|
|
34682
34693
|
}, [state]);
|
|
34683
34694
|
const handleSwitchChange = (0, import_react52.useCallback)(
|
|
34684
34695
|
async (checked) => {
|
|
@@ -34745,11 +34756,12 @@ function SwitchEditor({ value, onSave, validate, disabled: disabled2, className,
|
|
|
34745
34756
|
)
|
|
34746
34757
|
] });
|
|
34747
34758
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
34748
|
-
"
|
|
34759
|
+
"fieldset",
|
|
34749
34760
|
{
|
|
34750
34761
|
ref: containerRef,
|
|
34762
|
+
"aria-label": label,
|
|
34751
34763
|
className: cn(
|
|
34752
|
-
"inline-flex items-center gap-2",
|
|
34764
|
+
"inline-flex items-center gap-2 border-0 p-0 m-0 min-w-0",
|
|
34753
34765
|
disabled2 && "opacity-60 cursor-not-allowed",
|
|
34754
34766
|
className
|
|
34755
34767
|
),
|
|
@@ -34799,6 +34811,7 @@ function SelectEditor({
|
|
|
34799
34811
|
}, successDuration);
|
|
34800
34812
|
return () => clearTimeout(timer);
|
|
34801
34813
|
}
|
|
34814
|
+
return void 0;
|
|
34802
34815
|
}, [state]);
|
|
34803
34816
|
const handleSelectChange = (0, import_react52.useCallback)(
|
|
34804
34817
|
async (newValue) => {
|
|
@@ -34868,11 +34881,12 @@ function SelectEditor({
|
|
|
34868
34881
|
)
|
|
34869
34882
|
] });
|
|
34870
34883
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
34871
|
-
"
|
|
34884
|
+
"fieldset",
|
|
34872
34885
|
{
|
|
34873
34886
|
ref: containerRef,
|
|
34887
|
+
"aria-label": label,
|
|
34874
34888
|
className: cn(
|
|
34875
|
-
"inline-flex items-center gap-2",
|
|
34889
|
+
"inline-flex items-center gap-2 border-0 p-0 m-0 min-w-0",
|
|
34876
34890
|
disabled2 && "opacity-60 cursor-not-allowed",
|
|
34877
34891
|
className
|
|
34878
34892
|
),
|
|
@@ -41815,8 +41829,8 @@ var TooltipTrigger3 = (0, import_react65.forwardRef)(
|
|
|
41815
41829
|
index_parts_exports16.Trigger,
|
|
41816
41830
|
{
|
|
41817
41831
|
ref,
|
|
41818
|
-
className,
|
|
41819
|
-
|
|
41832
|
+
...className !== void 0 ? { className } : {},
|
|
41833
|
+
...asChild ? { render: children } : {},
|
|
41820
41834
|
children: asChild ? void 0 : children
|
|
41821
41835
|
}
|
|
41822
41836
|
)
|
|
@@ -43148,7 +43162,7 @@ function createConfigFromComponents(input) {
|
|
|
43148
43162
|
const credentialType = match[1];
|
|
43149
43163
|
const env = match[2];
|
|
43150
43164
|
const slug = resolvedSlug.trim().toLowerCase();
|
|
43151
|
-
const domain = input.domain?.trim() || "sylphx.com";
|
|
43165
|
+
const domain = input.domain?.trim() || "api.sylphx.com";
|
|
43152
43166
|
const baseUrl = `https://${slug}.${domain}/v1`;
|
|
43153
43167
|
return freezeConfig({
|
|
43154
43168
|
credential: trimmedCred,
|
|
@@ -43859,6 +43873,11 @@ function injectGlobalStyles() {
|
|
|
43859
43873
|
outline: 2px solid var(--sylphx-ring);
|
|
43860
43874
|
outline-offset: 2px;
|
|
43861
43875
|
}
|
|
43876
|
+
|
|
43877
|
+
.sylphx-upload-hover:hover .sylphx-upload-hover__overlay,
|
|
43878
|
+
.sylphx-upload-hover:focus-within .sylphx-upload-hover__overlay {
|
|
43879
|
+
opacity: 1 !important;
|
|
43880
|
+
}
|
|
43862
43881
|
`;
|
|
43863
43882
|
document.head.appendChild(style);
|
|
43864
43883
|
stylesInjected = true;
|
|
@@ -44079,6 +44098,8 @@ function ToolIcon() {
|
|
|
44079
44098
|
fill: "none",
|
|
44080
44099
|
stroke: "currentColor",
|
|
44081
44100
|
strokeWidth: "2",
|
|
44101
|
+
"aria-hidden": "true",
|
|
44102
|
+
focusable: "false",
|
|
44082
44103
|
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" })
|
|
44083
44104
|
}
|
|
44084
44105
|
);
|
|
@@ -44093,6 +44114,8 @@ function CopyIcon() {
|
|
|
44093
44114
|
fill: "none",
|
|
44094
44115
|
stroke: "currentColor",
|
|
44095
44116
|
strokeWidth: "2",
|
|
44117
|
+
"aria-hidden": "true",
|
|
44118
|
+
focusable: "false",
|
|
44096
44119
|
children: [
|
|
44097
44120
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
44098
44121
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
@@ -44101,7 +44124,20 @@ function CopyIcon() {
|
|
|
44101
44124
|
);
|
|
44102
44125
|
}
|
|
44103
44126
|
function CheckIcon() {
|
|
44104
|
-
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
44127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
44128
|
+
"svg",
|
|
44129
|
+
{
|
|
44130
|
+
width: "16",
|
|
44131
|
+
height: "16",
|
|
44132
|
+
viewBox: "0 0 24 24",
|
|
44133
|
+
fill: "none",
|
|
44134
|
+
stroke: "#22c55e",
|
|
44135
|
+
strokeWidth: "2",
|
|
44136
|
+
"aria-hidden": "true",
|
|
44137
|
+
focusable: "false",
|
|
44138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
44139
|
+
}
|
|
44140
|
+
);
|
|
44105
44141
|
}
|
|
44106
44142
|
function BookIcon() {
|
|
44107
44143
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
@@ -44113,6 +44149,8 @@ function BookIcon() {
|
|
|
44113
44149
|
fill: "none",
|
|
44114
44150
|
stroke: "currentColor",
|
|
44115
44151
|
strokeWidth: "2",
|
|
44152
|
+
"aria-hidden": "true",
|
|
44153
|
+
focusable: "false",
|
|
44116
44154
|
children: [
|
|
44117
44155
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("path", { d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20" }),
|
|
44118
44156
|
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("path", { d: "M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" })
|
|
@@ -44121,11 +44159,24 @@ function BookIcon() {
|
|
|
44121
44159
|
);
|
|
44122
44160
|
}
|
|
44123
44161
|
function AlertIcon({ color: color2 }) {
|
|
44124
|
-
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
44125
|
-
|
|
44126
|
-
|
|
44127
|
-
|
|
44128
|
-
|
|
44162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
44163
|
+
"svg",
|
|
44164
|
+
{
|
|
44165
|
+
width: "24",
|
|
44166
|
+
height: "24",
|
|
44167
|
+
viewBox: "0 0 24 24",
|
|
44168
|
+
fill: "none",
|
|
44169
|
+
stroke: color2,
|
|
44170
|
+
strokeWidth: "2",
|
|
44171
|
+
"aria-hidden": "true",
|
|
44172
|
+
focusable: "false",
|
|
44173
|
+
children: [
|
|
44174
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
44175
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
44176
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
44177
|
+
]
|
|
44178
|
+
}
|
|
44179
|
+
);
|
|
44129
44180
|
}
|
|
44130
44181
|
var styles = {
|
|
44131
44182
|
// Development card styles
|
|
@@ -44644,9 +44695,9 @@ function useOrganization() {
|
|
|
44644
44695
|
const [isLoading, setIsLoading] = (0, import_react76.useState)(true);
|
|
44645
44696
|
const [error2, setError] = (0, import_react76.useState)(null);
|
|
44646
44697
|
const channelRef = (0, import_react76.useRef)(null);
|
|
44647
|
-
const config2 = platform3?.
|
|
44698
|
+
const config2 = platform3?.slug ? createConfig({
|
|
44648
44699
|
secretKey: platform3.appId,
|
|
44649
|
-
|
|
44700
|
+
slug: platform3.slug
|
|
44650
44701
|
}) : null;
|
|
44651
44702
|
const getStoredOrgSlug = (0, import_react76.useCallback)(() => {
|
|
44652
44703
|
if (typeof window === "undefined") return null;
|
|
@@ -45765,6 +45816,8 @@ function CheckIcon3({ size: size4 = 24 }) {
|
|
|
45765
45816
|
strokeLinecap: "round",
|
|
45766
45817
|
strokeLinejoin: "round",
|
|
45767
45818
|
style: { flexShrink: 0 },
|
|
45819
|
+
"aria-hidden": "true",
|
|
45820
|
+
focusable: "false",
|
|
45768
45821
|
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("path", { d: "M20 6 9 17l-5-5" })
|
|
45769
45822
|
}
|
|
45770
45823
|
);
|
|
@@ -45971,14 +46024,17 @@ function Modal({
|
|
|
45971
46024
|
cursor: "pointer",
|
|
45972
46025
|
transition: "color 0.15s ease-in-out, background-color 0.15s ease-in-out"
|
|
45973
46026
|
};
|
|
45974
|
-
const modal = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
46027
|
+
const modal = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
45975
46028
|
"div",
|
|
45976
46029
|
{
|
|
45977
|
-
|
|
45978
|
-
|
|
45979
|
-
|
|
45980
|
-
|
|
45981
|
-
|
|
46030
|
+
style: backdropStyle,
|
|
46031
|
+
onClick: handleBackdropClick,
|
|
46032
|
+
onKeyDown: (e2) => {
|
|
46033
|
+
if (closeOnEscape && e2.key === "Escape") onClose();
|
|
46034
|
+
},
|
|
46035
|
+
role: "dialog",
|
|
46036
|
+
"aria-modal": "true",
|
|
46037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { ref: modalRef, style: mergeStyles(contentStyle), className, children: [
|
|
45982
46038
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
45983
46039
|
"button",
|
|
45984
46040
|
{
|
|
@@ -45998,9 +46054,9 @@ function Modal({
|
|
|
45998
46054
|
}
|
|
45999
46055
|
),
|
|
46000
46056
|
children
|
|
46001
|
-
]
|
|
46057
|
+
] })
|
|
46002
46058
|
}
|
|
46003
|
-
)
|
|
46059
|
+
);
|
|
46004
46060
|
return (0, import_react_dom6.createPortal)(modal, document.body);
|
|
46005
46061
|
}
|
|
46006
46062
|
function CloseIcon() {
|
|
@@ -46014,6 +46070,8 @@ function CloseIcon() {
|
|
|
46014
46070
|
stroke: "currentColor",
|
|
46015
46071
|
strokeWidth: "2",
|
|
46016
46072
|
strokeLinecap: "round",
|
|
46073
|
+
"aria-hidden": "true",
|
|
46074
|
+
focusable: "false",
|
|
46017
46075
|
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("path", { d: "M4 4L12 12M12 4L4 12" })
|
|
46018
46076
|
}
|
|
46019
46077
|
);
|
|
@@ -46054,6 +46112,7 @@ function ForgotPassword({
|
|
|
46054
46112
|
const { forgotPassword } = useSafeAuth();
|
|
46055
46113
|
const { isSignedIn, isLoaded } = useSafeUser();
|
|
46056
46114
|
const styles2 = baseStyles(theme);
|
|
46115
|
+
const emailId = (0, import_react82.useId)();
|
|
46057
46116
|
const [modalOpen, setModalOpen] = (0, import_react82.useState)(false);
|
|
46058
46117
|
const [email, setEmail] = (0, import_react82.useState)("");
|
|
46059
46118
|
const [error2, setError] = (0, import_react82.useState)(null);
|
|
@@ -46063,12 +46122,6 @@ function ForgotPassword({
|
|
|
46063
46122
|
(0, import_react82.useEffect)(() => {
|
|
46064
46123
|
injectGlobalStyles();
|
|
46065
46124
|
}, []);
|
|
46066
|
-
if (!isReady) {
|
|
46067
|
-
return renderError();
|
|
46068
|
-
}
|
|
46069
|
-
if (isLoaded && isSignedIn) {
|
|
46070
|
-
return null;
|
|
46071
|
-
}
|
|
46072
46125
|
const handleSubmit = (0, import_react82.useCallback)(
|
|
46073
46126
|
async (e2) => {
|
|
46074
46127
|
e2.preventDefault();
|
|
@@ -46096,6 +46149,12 @@ function ForgotPassword({
|
|
|
46096
46149
|
},
|
|
46097
46150
|
[email, forgotPassword, afterSubmitUrl, onSuccess, onError]
|
|
46098
46151
|
);
|
|
46152
|
+
if (!isReady) {
|
|
46153
|
+
return renderError();
|
|
46154
|
+
}
|
|
46155
|
+
if (isLoaded && isSignedIn) {
|
|
46156
|
+
return null;
|
|
46157
|
+
}
|
|
46099
46158
|
const renderForm = () => {
|
|
46100
46159
|
if (isSubmitted) {
|
|
46101
46160
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { style: styles2.textCenter, children: [
|
|
@@ -46126,10 +46185,11 @@ function ForgotPassword({
|
|
|
46126
46185
|
}
|
|
46127
46186
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("form", { onSubmit: handleSubmit, children: [
|
|
46128
46187
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { style: styles2.formGroup, children: [
|
|
46129
|
-
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("label", { style: styles2.label, children: "Email address" }),
|
|
46188
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("label", { htmlFor: emailId, style: styles2.label, children: "Email address" }),
|
|
46130
46189
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
46131
46190
|
"input",
|
|
46132
46191
|
{
|
|
46192
|
+
id: emailId,
|
|
46133
46193
|
type: "email",
|
|
46134
46194
|
value: email,
|
|
46135
46195
|
onChange: (e2) => {
|
|
@@ -46226,6 +46286,8 @@ function MailIcon({ color: color2 }) {
|
|
|
46226
46286
|
strokeWidth: "2",
|
|
46227
46287
|
strokeLinecap: "round",
|
|
46228
46288
|
strokeLinejoin: "round",
|
|
46289
|
+
"aria-hidden": "true",
|
|
46290
|
+
focusable: "false",
|
|
46229
46291
|
children: [
|
|
46230
46292
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }),
|
|
46231
46293
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })
|
|
@@ -46285,6 +46347,8 @@ function InviteMemberInner({
|
|
|
46285
46347
|
}) {
|
|
46286
46348
|
const { organization, inviteMember, hasPermission: hasPermission2 } = useOrganization();
|
|
46287
46349
|
const styles2 = baseStyles(theme);
|
|
46350
|
+
const emailId = (0, import_react83.useId)();
|
|
46351
|
+
const roleGroupId = (0, import_react83.useId)();
|
|
46288
46352
|
const [email, setEmail] = (0, import_react83.useState)("");
|
|
46289
46353
|
const [role, setRole] = (0, import_react83.useState)(defaultRole);
|
|
46290
46354
|
const [isLoading, setIsLoading] = (0, import_react83.useState)(false);
|
|
@@ -46349,10 +46413,11 @@ function InviteMemberInner({
|
|
|
46349
46413
|
}
|
|
46350
46414
|
const formContent = /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("form", { onSubmit: handleSubmit, children: [
|
|
46351
46415
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { style: styles2.formGroup, children: [
|
|
46352
|
-
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("label", { style: styles2.label, children: "Email address" }),
|
|
46416
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("label", { htmlFor: emailId, style: styles2.label, children: "Email address" }),
|
|
46353
46417
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
46354
46418
|
"input",
|
|
46355
46419
|
{
|
|
46420
|
+
id: emailId,
|
|
46356
46421
|
type: "email",
|
|
46357
46422
|
value: email,
|
|
46358
46423
|
onChange: (e2) => {
|
|
@@ -46374,10 +46439,12 @@ function InviteMemberInner({
|
|
|
46374
46439
|
)
|
|
46375
46440
|
] }),
|
|
46376
46441
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { style: styles2.formGroup, children: [
|
|
46377
|
-
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("
|
|
46442
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { id: roleGroupId, style: styles2.label, children: "Role" }),
|
|
46378
46443
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
46379
46444
|
"div",
|
|
46380
46445
|
{
|
|
46446
|
+
role: "radiogroup",
|
|
46447
|
+
"aria-labelledby": roleGroupId,
|
|
46381
46448
|
style: {
|
|
46382
46449
|
display: "flex",
|
|
46383
46450
|
flexDirection: "column",
|
|
@@ -46498,14 +46565,19 @@ function InviteMemberInner({
|
|
|
46498
46565
|
if (asModal) {
|
|
46499
46566
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
|
|
46500
46567
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
46501
|
-
"
|
|
46568
|
+
"button",
|
|
46502
46569
|
{
|
|
46570
|
+
type: "button",
|
|
46571
|
+
"aria-label": "Close dialog",
|
|
46503
46572
|
style: {
|
|
46504
46573
|
position: "fixed",
|
|
46505
46574
|
inset: 0,
|
|
46506
46575
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
46507
46576
|
zIndex: 99,
|
|
46508
|
-
animation: "sylphx-fade-in 0.15s ease-out"
|
|
46577
|
+
animation: "sylphx-fade-in 0.15s ease-out",
|
|
46578
|
+
border: "none",
|
|
46579
|
+
padding: 0,
|
|
46580
|
+
cursor: "pointer"
|
|
46509
46581
|
},
|
|
46510
46582
|
onClick: onClose
|
|
46511
46583
|
}
|
|
@@ -46581,6 +46653,8 @@ function CheckIcon4({ color: color2, size: size4 = 24 }) {
|
|
|
46581
46653
|
strokeLinecap: "round",
|
|
46582
46654
|
strokeLinejoin: "round",
|
|
46583
46655
|
style: { flexShrink: 0 },
|
|
46656
|
+
"aria-hidden": "true",
|
|
46657
|
+
focusable: "false",
|
|
46584
46658
|
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "M20 6 9 17l-5-5" })
|
|
46585
46659
|
}
|
|
46586
46660
|
);
|
|
@@ -46598,6 +46672,8 @@ function SendIcon({ size: size4 = 24 }) {
|
|
|
46598
46672
|
strokeLinecap: "round",
|
|
46599
46673
|
strokeLinejoin: "round",
|
|
46600
46674
|
style: { flexShrink: 0 },
|
|
46675
|
+
"aria-hidden": "true",
|
|
46676
|
+
focusable: "false",
|
|
46601
46677
|
children: [
|
|
46602
46678
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }),
|
|
46603
46679
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "m21.854 2.147-10.94 10.939" })
|
|
@@ -46618,6 +46694,8 @@ function XIcon({ size: size4 = 24 }) {
|
|
|
46618
46694
|
strokeLinecap: "round",
|
|
46619
46695
|
strokeLinejoin: "round",
|
|
46620
46696
|
style: { flexShrink: 0 },
|
|
46697
|
+
"aria-hidden": "true",
|
|
46698
|
+
focusable: "false",
|
|
46621
46699
|
children: [
|
|
46622
46700
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "M18 6 6 18" }),
|
|
46623
46701
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "m6 6 12 12" })
|
|
@@ -46856,16 +46934,13 @@ function MembersListInner({
|
|
|
46856
46934
|
},
|
|
46857
46935
|
children: [
|
|
46858
46936
|
visibleMembers.map((member) => /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { style: memberItemStyles, children: [
|
|
46859
|
-
member.image ? (
|
|
46860
|
-
|
|
46861
|
-
|
|
46862
|
-
|
|
46863
|
-
|
|
46864
|
-
|
|
46865
|
-
|
|
46866
|
-
style: { ...avatarStyles, objectFit: "cover" }
|
|
46867
|
-
}
|
|
46868
|
-
)
|
|
46937
|
+
member.image ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
46938
|
+
"img",
|
|
46939
|
+
{
|
|
46940
|
+
src: member.image,
|
|
46941
|
+
alt: member.name || member.email,
|
|
46942
|
+
style: { ...avatarStyles, objectFit: "cover" }
|
|
46943
|
+
}
|
|
46869
46944
|
) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { style: avatarStyles, children: (member.name || member.email).charAt(0).toUpperCase() }),
|
|
46870
46945
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
46871
46946
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
@@ -47700,12 +47775,27 @@ function ChevronIcon() {
|
|
|
47700
47775
|
fill: "none",
|
|
47701
47776
|
stroke: "currentColor",
|
|
47702
47777
|
strokeWidth: "2",
|
|
47778
|
+
"aria-hidden": "true",
|
|
47779
|
+
focusable: "false",
|
|
47703
47780
|
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
47704
47781
|
}
|
|
47705
47782
|
);
|
|
47706
47783
|
}
|
|
47707
47784
|
function CheckIcon5({ color: color2, size: size4 = 24 }) {
|
|
47708
|
-
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
47785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
47786
|
+
"svg",
|
|
47787
|
+
{
|
|
47788
|
+
width: size4,
|
|
47789
|
+
height: size4,
|
|
47790
|
+
viewBox: "0 0 24 24",
|
|
47791
|
+
fill: "none",
|
|
47792
|
+
stroke: color2,
|
|
47793
|
+
strokeWidth: "2",
|
|
47794
|
+
"aria-hidden": "true",
|
|
47795
|
+
focusable: "false",
|
|
47796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("path", { d: "M20 6 9 17l-5-5" })
|
|
47797
|
+
}
|
|
47798
|
+
);
|
|
47709
47799
|
}
|
|
47710
47800
|
function PlusIcon2() {
|
|
47711
47801
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
@@ -47717,15 +47807,30 @@ function PlusIcon2() {
|
|
|
47717
47807
|
fill: "none",
|
|
47718
47808
|
stroke: "currentColor",
|
|
47719
47809
|
strokeWidth: "2",
|
|
47810
|
+
"aria-hidden": "true",
|
|
47811
|
+
focusable: "false",
|
|
47720
47812
|
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("path", { d: "M12 5v14M5 12h14" })
|
|
47721
47813
|
}
|
|
47722
47814
|
);
|
|
47723
47815
|
}
|
|
47724
47816
|
function SettingsIcon2({ color: color2 }) {
|
|
47725
|
-
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
47726
|
-
|
|
47727
|
-
|
|
47728
|
-
|
|
47817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
47818
|
+
"svg",
|
|
47819
|
+
{
|
|
47820
|
+
width: "18",
|
|
47821
|
+
height: "18",
|
|
47822
|
+
viewBox: "0 0 24 24",
|
|
47823
|
+
fill: "none",
|
|
47824
|
+
stroke: color2,
|
|
47825
|
+
strokeWidth: "2",
|
|
47826
|
+
"aria-hidden": "true",
|
|
47827
|
+
focusable: "false",
|
|
47828
|
+
children: [
|
|
47829
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
|
|
47830
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
47831
|
+
]
|
|
47832
|
+
}
|
|
47833
|
+
);
|
|
47729
47834
|
}
|
|
47730
47835
|
|
|
47731
47836
|
// src/react/components/pricing-table.tsx
|
|
@@ -47747,7 +47852,9 @@ function PricingTableInner({
|
|
|
47747
47852
|
}) {
|
|
47748
47853
|
const { plans, plansLoading, plansError, subscription, isPremium, createCheckout, refresh } = useBilling();
|
|
47749
47854
|
const styles2 = baseStyles(theme);
|
|
47750
|
-
const [interval,
|
|
47855
|
+
const [interval, setSelectedInterval] = (0, import_react86.useState)(
|
|
47856
|
+
defaultInterval
|
|
47857
|
+
);
|
|
47751
47858
|
const [loadingPlan, setLoadingPlan] = (0, import_react86.useState)(null);
|
|
47752
47859
|
(0, import_react86.useEffect)(() => {
|
|
47753
47860
|
injectGlobalStyles();
|
|
@@ -47896,7 +48003,7 @@ function PricingTableInner({
|
|
|
47896
48003
|
"button",
|
|
47897
48004
|
{
|
|
47898
48005
|
type: "button",
|
|
47899
|
-
onClick: () =>
|
|
48006
|
+
onClick: () => setSelectedInterval("monthly"),
|
|
47900
48007
|
style: mergeStyles(styles2.tab, interval === "monthly" ? styles2.tabActive : {}),
|
|
47901
48008
|
children: "Monthly"
|
|
47902
48009
|
}
|
|
@@ -47905,7 +48012,7 @@ function PricingTableInner({
|
|
|
47905
48012
|
"button",
|
|
47906
48013
|
{
|
|
47907
48014
|
type: "button",
|
|
47908
|
-
onClick: () =>
|
|
48015
|
+
onClick: () => setSelectedInterval("annual"),
|
|
47909
48016
|
style: mergeStyles(styles2.tab, interval === "annual" ? styles2.tabActive : {}),
|
|
47910
48017
|
children: [
|
|
47911
48018
|
"Annual",
|
|
@@ -48165,6 +48272,8 @@ function ResetPassword({
|
|
|
48165
48272
|
const { resetPassword } = useSafeAuth();
|
|
48166
48273
|
const { isSignedIn, isLoaded } = useSafeUser();
|
|
48167
48274
|
const styles2 = baseStyles(theme);
|
|
48275
|
+
const passwordId = (0, import_react87.useId)();
|
|
48276
|
+
const confirmPasswordId = (0, import_react87.useId)();
|
|
48168
48277
|
const [password, setPassword] = (0, import_react87.useState)("");
|
|
48169
48278
|
const [confirmPassword, setConfirmPassword] = (0, import_react87.useState)("");
|
|
48170
48279
|
const [error2, setError] = (0, import_react87.useState)(null);
|
|
@@ -48174,31 +48283,6 @@ function ResetPassword({
|
|
|
48174
48283
|
(0, import_react87.useEffect)(() => {
|
|
48175
48284
|
injectGlobalStyles();
|
|
48176
48285
|
}, []);
|
|
48177
|
-
if (!isReady) {
|
|
48178
|
-
return renderError();
|
|
48179
|
-
}
|
|
48180
|
-
if (isLoaded && isSignedIn) {
|
|
48181
|
-
if (typeof window !== "undefined") {
|
|
48182
|
-
safeRedirect(afterResetUrl, { fallback: "/sign-in" });
|
|
48183
|
-
}
|
|
48184
|
-
return null;
|
|
48185
|
-
}
|
|
48186
|
-
if (!token) {
|
|
48187
|
-
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { style: showCard ? styles2.card : {}, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: styles2.container, children: [
|
|
48188
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: mergeStyles(styles2.cardHeader, styles2.textCenter), children: [
|
|
48189
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("h2", { style: styles2.cardTitle, children: "Invalid reset link" }),
|
|
48190
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { style: styles2.cardDescription, children: "This password reset link is invalid or has expired." })
|
|
48191
|
-
] }),
|
|
48192
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { style: styles2.cardContent, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
48193
|
-
"a",
|
|
48194
|
-
{
|
|
48195
|
-
href: signInUrl,
|
|
48196
|
-
style: mergeStyles(styles2.button, styles2.buttonPrimary, styles2.buttonFullWidth),
|
|
48197
|
-
children: "Back to sign in"
|
|
48198
|
-
}
|
|
48199
|
-
) })
|
|
48200
|
-
] }) });
|
|
48201
|
-
}
|
|
48202
48286
|
const handleSubmit = (0, import_react87.useCallback)(
|
|
48203
48287
|
async (e2) => {
|
|
48204
48288
|
e2.preventDefault();
|
|
@@ -48211,6 +48295,10 @@ function ResetPassword({
|
|
|
48211
48295
|
setError("Password must be at least 12 characters");
|
|
48212
48296
|
return;
|
|
48213
48297
|
}
|
|
48298
|
+
if (!token) {
|
|
48299
|
+
setError("Missing reset token");
|
|
48300
|
+
return;
|
|
48301
|
+
}
|
|
48214
48302
|
setIsLoading(true);
|
|
48215
48303
|
try {
|
|
48216
48304
|
if (!resetPassword) {
|
|
@@ -48234,6 +48322,31 @@ function ResetPassword({
|
|
|
48234
48322
|
},
|
|
48235
48323
|
[token, password, confirmPassword, resetPassword, afterResetUrl, onSuccess, onError]
|
|
48236
48324
|
);
|
|
48325
|
+
if (!isReady) {
|
|
48326
|
+
return renderError();
|
|
48327
|
+
}
|
|
48328
|
+
if (isLoaded && isSignedIn) {
|
|
48329
|
+
if (typeof window !== "undefined") {
|
|
48330
|
+
safeRedirect(afterResetUrl, { fallback: "/sign-in" });
|
|
48331
|
+
}
|
|
48332
|
+
return null;
|
|
48333
|
+
}
|
|
48334
|
+
if (!token) {
|
|
48335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { style: showCard ? styles2.card : {}, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: styles2.container, children: [
|
|
48336
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: mergeStyles(styles2.cardHeader, styles2.textCenter), children: [
|
|
48337
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("h2", { style: styles2.cardTitle, children: "Invalid reset link" }),
|
|
48338
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { style: styles2.cardDescription, children: "This password reset link is invalid or has expired." })
|
|
48339
|
+
] }),
|
|
48340
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { style: styles2.cardContent, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
48341
|
+
"a",
|
|
48342
|
+
{
|
|
48343
|
+
href: signInUrl,
|
|
48344
|
+
style: mergeStyles(styles2.button, styles2.buttonPrimary, styles2.buttonFullWidth),
|
|
48345
|
+
children: "Back to sign in"
|
|
48346
|
+
}
|
|
48347
|
+
) })
|
|
48348
|
+
] }) });
|
|
48349
|
+
}
|
|
48237
48350
|
const renderForm = () => {
|
|
48238
48351
|
if (isSuccess) {
|
|
48239
48352
|
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: styles2.textCenter, children: [
|
|
@@ -48256,10 +48369,11 @@ function ResetPassword({
|
|
|
48256
48369
|
}
|
|
48257
48370
|
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("form", { onSubmit: handleSubmit, children: [
|
|
48258
48371
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: styles2.formGroup, children: [
|
|
48259
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("label", { style: styles2.label, children: "New password" }),
|
|
48372
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("label", { htmlFor: passwordId, style: styles2.label, children: "New password" }),
|
|
48260
48373
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
48261
48374
|
"input",
|
|
48262
48375
|
{
|
|
48376
|
+
id: passwordId,
|
|
48263
48377
|
type: "password",
|
|
48264
48378
|
value: password,
|
|
48265
48379
|
onChange: (e2) => {
|
|
@@ -48283,10 +48397,11 @@ function ResetPassword({
|
|
|
48283
48397
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { style: mergeStyles(styles2.textXs, styles2.textMuted, styles2.mt1), children: "Must be at least 12 characters" })
|
|
48284
48398
|
] }),
|
|
48285
48399
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: styles2.formGroup, children: [
|
|
48286
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("label", { style: styles2.label, children: "Confirm password" }),
|
|
48400
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("label", { htmlFor: confirmPasswordId, style: styles2.label, children: "Confirm password" }),
|
|
48287
48401
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
48288
48402
|
"input",
|
|
48289
48403
|
{
|
|
48404
|
+
id: confirmPasswordId,
|
|
48290
48405
|
type: "password",
|
|
48291
48406
|
value: confirmPassword,
|
|
48292
48407
|
onChange: (e2) => {
|
|
@@ -48352,6 +48467,8 @@ function CheckIcon7({ color: color2 }) {
|
|
|
48352
48467
|
strokeWidth: "2",
|
|
48353
48468
|
strokeLinecap: "round",
|
|
48354
48469
|
strokeLinejoin: "round",
|
|
48470
|
+
"aria-hidden": "true",
|
|
48471
|
+
focusable: "false",
|
|
48355
48472
|
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("path", { d: "M20 6 9 17l-5-5" })
|
|
48356
48473
|
}
|
|
48357
48474
|
);
|
|
@@ -48799,13 +48916,11 @@ function SignInFormInner({
|
|
|
48799
48916
|
isLoading,
|
|
48800
48917
|
loadingProvider,
|
|
48801
48918
|
error: error2,
|
|
48802
|
-
pendingTwoFactor,
|
|
48803
48919
|
handlePasswordSubmit,
|
|
48804
48920
|
handleOAuthSignIn,
|
|
48805
48921
|
handleMagicLinkRequest,
|
|
48806
48922
|
handleOtpRequest,
|
|
48807
|
-
handleOtpVerify
|
|
48808
|
-
handleTwoFactorVerify
|
|
48923
|
+
handleOtpVerify
|
|
48809
48924
|
} = useSignInForm({
|
|
48810
48925
|
methods,
|
|
48811
48926
|
providers,
|
|
@@ -51039,47 +51154,59 @@ function useConsentCheck(options) {
|
|
|
51039
51154
|
}
|
|
51040
51155
|
var noopAsync2 = async () => {
|
|
51041
51156
|
};
|
|
51157
|
+
var NOOP_CONSENT_CTX = {
|
|
51158
|
+
anonymousId: null,
|
|
51159
|
+
userId: null,
|
|
51160
|
+
getConsentTypes: async () => [],
|
|
51161
|
+
getUserConsents: async () => [],
|
|
51162
|
+
setConsents: async () => ({ success: true, consents: [] }),
|
|
51163
|
+
acceptAll: async () => ({ success: true, consents: [] }),
|
|
51164
|
+
declineOptional: async () => ({ success: true, consents: [] }),
|
|
51165
|
+
checkConsent: async () => false,
|
|
51166
|
+
getHistory: async () => ({ entries: [], nextCursor: null, hasMore: false }),
|
|
51167
|
+
initialConsentTypes: []
|
|
51168
|
+
};
|
|
51169
|
+
var SAFE_CONSENT_DEFAULTS = {
|
|
51170
|
+
types: [],
|
|
51171
|
+
consents: {},
|
|
51172
|
+
isLoading: false,
|
|
51173
|
+
error: null,
|
|
51174
|
+
showBanner: false,
|
|
51175
|
+
hasConsented: false,
|
|
51176
|
+
hasConsent: () => false,
|
|
51177
|
+
setConsent: () => {
|
|
51178
|
+
},
|
|
51179
|
+
setConsents: () => {
|
|
51180
|
+
},
|
|
51181
|
+
acceptAll: noopAsync2,
|
|
51182
|
+
declineOptional: noopAsync2,
|
|
51183
|
+
saveConsents: noopAsync2,
|
|
51184
|
+
openPreferences: () => {
|
|
51185
|
+
},
|
|
51186
|
+
closeBanner: () => {
|
|
51187
|
+
},
|
|
51188
|
+
grantConsent: noopAsync2,
|
|
51189
|
+
revokeConsent: noopAsync2,
|
|
51190
|
+
isConfigured: false
|
|
51191
|
+
};
|
|
51042
51192
|
function useSafeConsent() {
|
|
51043
51193
|
const ctx = (0, import_react98.useContext)(ConsentContext);
|
|
51044
|
-
|
|
51045
|
-
return {
|
|
51046
|
-
types: [],
|
|
51047
|
-
consents: {},
|
|
51048
|
-
isLoading: false,
|
|
51049
|
-
error: null,
|
|
51050
|
-
showBanner: false,
|
|
51051
|
-
hasConsented: false,
|
|
51052
|
-
hasConsent: () => false,
|
|
51053
|
-
setConsent: () => {
|
|
51054
|
-
},
|
|
51055
|
-
setConsents: () => {
|
|
51056
|
-
},
|
|
51057
|
-
acceptAll: noopAsync2,
|
|
51058
|
-
declineOptional: noopAsync2,
|
|
51059
|
-
saveConsents: noopAsync2,
|
|
51060
|
-
openPreferences: () => {
|
|
51061
|
-
},
|
|
51062
|
-
closeBanner: () => {
|
|
51063
|
-
},
|
|
51064
|
-
grantConsent: noopAsync2,
|
|
51065
|
-
revokeConsent: noopAsync2,
|
|
51066
|
-
isConfigured: false
|
|
51067
|
-
};
|
|
51068
|
-
}
|
|
51194
|
+
const effectiveCtx = ctx ?? NOOP_CONSENT_CTX;
|
|
51069
51195
|
const queryClient = (0, import_react_query3.useQueryClient)();
|
|
51070
51196
|
const [localConsents, setLocalConsentsState] = (0, import_react98.useState)({});
|
|
51071
51197
|
const [showBanner, setShowBanner] = (0, import_react98.useState)(false);
|
|
51072
51198
|
const [initialized2, setInitialized] = (0, import_react98.useState)(false);
|
|
51073
51199
|
const typesQuery = (0, import_react_query3.useQuery)({
|
|
51074
|
-
queryKey: ["sylphx", "consent", "types"],
|
|
51075
|
-
queryFn: () =>
|
|
51200
|
+
queryKey: ["sylphx", "consent", "types", ctx ? "live" : "noop"],
|
|
51201
|
+
queryFn: () => effectiveCtx.getConsentTypes(),
|
|
51076
51202
|
staleTime: STALE_TIME_STABLE_MS,
|
|
51077
|
-
initialData:
|
|
51203
|
+
initialData: effectiveCtx.initialConsentTypes,
|
|
51204
|
+
enabled: !!ctx
|
|
51078
51205
|
});
|
|
51079
51206
|
const userConsentsQuery = (0, import_react_query3.useQuery)({
|
|
51080
|
-
queryKey: ["sylphx", "consent", "user"],
|
|
51207
|
+
queryKey: ["sylphx", "consent", "user", ctx ? "live" : "noop"],
|
|
51081
51208
|
queryFn: async () => {
|
|
51082
|
-
const consentsResponse = await
|
|
51209
|
+
const consentsResponse = await effectiveCtx.getUserConsents();
|
|
51083
51210
|
const consentsMap = {};
|
|
51084
51211
|
let hasExplicitChoice = false;
|
|
51085
51212
|
for (const consent of consentsResponse) {
|
|
@@ -51092,9 +51219,11 @@ function useSafeConsent() {
|
|
|
51092
51219
|
},
|
|
51093
51220
|
staleTime: STALE_TIME_STABLE_MS,
|
|
51094
51221
|
// Return empty object for unauthenticated users (explicit retry: false)
|
|
51095
|
-
retry: false
|
|
51222
|
+
retry: false,
|
|
51223
|
+
enabled: !!ctx
|
|
51096
51224
|
});
|
|
51097
51225
|
(0, import_react98.useEffect)(() => {
|
|
51226
|
+
if (!ctx) return;
|
|
51098
51227
|
if (!typesQuery.isLoading && !userConsentsQuery.isLoading && !initialized2) {
|
|
51099
51228
|
const data = userConsentsQuery.data;
|
|
51100
51229
|
const serverConsents = data?.consents ?? {};
|
|
@@ -51103,10 +51232,10 @@ function useSafeConsent() {
|
|
|
51103
51232
|
setShowBanner(!hasExplicitChoice);
|
|
51104
51233
|
setInitialized(true);
|
|
51105
51234
|
}
|
|
51106
|
-
}, [typesQuery.isLoading, userConsentsQuery.isLoading, userConsentsQuery.data, initialized2]);
|
|
51235
|
+
}, [ctx, typesQuery.isLoading, userConsentsQuery.isLoading, userConsentsQuery.data, initialized2]);
|
|
51107
51236
|
const saveConsentsMutation = (0, import_react_query3.useMutation)({
|
|
51108
51237
|
mutationFn: async (consentList) => {
|
|
51109
|
-
await
|
|
51238
|
+
await effectiveCtx.setConsents(consentList);
|
|
51110
51239
|
return consentList;
|
|
51111
51240
|
},
|
|
51112
51241
|
onSuccess: (consentList) => {
|
|
@@ -51114,7 +51243,7 @@ function useSafeConsent() {
|
|
|
51114
51243
|
for (const consent of consentList) {
|
|
51115
51244
|
consentsMap[consent.slug] = consent.granted;
|
|
51116
51245
|
}
|
|
51117
|
-
queryClient.setQueryData(["sylphx", "consent", "user"], {
|
|
51246
|
+
queryClient.setQueryData(["sylphx", "consent", "user", "live"], {
|
|
51118
51247
|
consents: consentsMap,
|
|
51119
51248
|
hasExplicitChoice: true
|
|
51120
51249
|
});
|
|
@@ -51124,7 +51253,7 @@ function useSafeConsent() {
|
|
|
51124
51253
|
});
|
|
51125
51254
|
const acceptAllMutation = (0, import_react_query3.useMutation)({
|
|
51126
51255
|
mutationFn: async () => {
|
|
51127
|
-
await
|
|
51256
|
+
await effectiveCtx.acceptAll();
|
|
51128
51257
|
},
|
|
51129
51258
|
onSuccess: () => {
|
|
51130
51259
|
const types2 = typesQuery.data ?? [];
|
|
@@ -51132,7 +51261,7 @@ function useSafeConsent() {
|
|
|
51132
51261
|
for (const type of types2) {
|
|
51133
51262
|
allConsents[type.slug] = true;
|
|
51134
51263
|
}
|
|
51135
|
-
queryClient.setQueryData(["sylphx", "consent", "user"], {
|
|
51264
|
+
queryClient.setQueryData(["sylphx", "consent", "user", "live"], {
|
|
51136
51265
|
consents: allConsents,
|
|
51137
51266
|
hasExplicitChoice: true
|
|
51138
51267
|
});
|
|
@@ -51142,7 +51271,7 @@ function useSafeConsent() {
|
|
|
51142
51271
|
});
|
|
51143
51272
|
const declineOptionalMutation = (0, import_react_query3.useMutation)({
|
|
51144
51273
|
mutationFn: async () => {
|
|
51145
|
-
await
|
|
51274
|
+
await effectiveCtx.declineOptional();
|
|
51146
51275
|
},
|
|
51147
51276
|
onSuccess: () => {
|
|
51148
51277
|
const types2 = typesQuery.data ?? [];
|
|
@@ -51150,7 +51279,7 @@ function useSafeConsent() {
|
|
|
51150
51279
|
for (const type of types2) {
|
|
51151
51280
|
requiredConsents[type.slug] = type.required;
|
|
51152
51281
|
}
|
|
51153
|
-
queryClient.setQueryData(["sylphx", "consent", "user"], {
|
|
51282
|
+
queryClient.setQueryData(["sylphx", "consent", "user", "live"], {
|
|
51154
51283
|
consents: requiredConsents,
|
|
51155
51284
|
hasExplicitChoice: true
|
|
51156
51285
|
});
|
|
@@ -51232,6 +51361,7 @@ function useSafeConsent() {
|
|
|
51232
51361
|
},
|
|
51233
51362
|
[types, consents, saveConsentsMutation]
|
|
51234
51363
|
);
|
|
51364
|
+
if (!ctx) return SAFE_CONSENT_DEFAULTS;
|
|
51235
51365
|
return {
|
|
51236
51366
|
types,
|
|
51237
51367
|
consents,
|
|
@@ -51417,12 +51547,15 @@ function ConsentScript({
|
|
|
51417
51547
|
});
|
|
51418
51548
|
const scriptIdRef = (0, import_react99.useRef)(providedId ?? generateScriptId(src));
|
|
51419
51549
|
const loadedRef = (0, import_react99.useRef)(false);
|
|
51420
|
-
const attributes =
|
|
51421
|
-
|
|
51422
|
-
|
|
51423
|
-
|
|
51424
|
-
|
|
51425
|
-
|
|
51550
|
+
const attributes = (0, import_react99.useMemo)(
|
|
51551
|
+
() => ({
|
|
51552
|
+
async: asyncAttr,
|
|
51553
|
+
defer,
|
|
51554
|
+
nonce,
|
|
51555
|
+
...dataAttributes
|
|
51556
|
+
}),
|
|
51557
|
+
[asyncAttr, defer, nonce, dataAttributes]
|
|
51558
|
+
);
|
|
51426
51559
|
(0, import_react99.useEffect)(() => {
|
|
51427
51560
|
if (loadedRef.current) return;
|
|
51428
51561
|
if (isLoading) return;
|
|
@@ -51535,13 +51668,14 @@ function FacebookPixel({ pixelId, onLoad, autoPageView = true }) {
|
|
|
51535
51668
|
const loadedRef = (0, import_react99.useRef)(false);
|
|
51536
51669
|
(0, import_react99.useEffect)(() => {
|
|
51537
51670
|
if (loadedRef.current || isLoading || !hasConsent) return;
|
|
51538
|
-
const n2 =
|
|
51671
|
+
const n2 = ((...args) => {
|
|
51539
51672
|
if (n2.callMethod) {
|
|
51540
51673
|
n2.callMethod.apply(n2, args);
|
|
51541
51674
|
} else {
|
|
51542
51675
|
n2.queue.push(args);
|
|
51543
51676
|
}
|
|
51544
51677
|
});
|
|
51678
|
+
window.fbq = n2;
|
|
51545
51679
|
if (!window._fbq) window._fbq = n2;
|
|
51546
51680
|
n2.push = n2;
|
|
51547
51681
|
n2.loaded = true;
|
|
@@ -51568,8 +51702,8 @@ function Hotjar({ siteId, version: version2 = 6, onLoad }) {
|
|
|
51568
51702
|
(0, import_react99.useEffect)(() => {
|
|
51569
51703
|
if (loadedRef.current || isLoading || !hasConsent) return;
|
|
51570
51704
|
window.hj = window.hj || ((...args) => {
|
|
51571
|
-
;
|
|
51572
|
-
|
|
51705
|
+
window.hj.q = window.hj.q || [];
|
|
51706
|
+
window.hj.q.push(args);
|
|
51573
51707
|
});
|
|
51574
51708
|
window._hjSettings = { hjid: siteId, hjsv: version2 };
|
|
51575
51709
|
const script3 = document.createElement("script");
|
|
@@ -52034,32 +52168,19 @@ var stubUnlockAchievement = async () => ({
|
|
|
52034
52168
|
var stubIncrementProgress = async () => defaultUserAchievement;
|
|
52035
52169
|
function useSafeStreak(streakId, options) {
|
|
52036
52170
|
const ctx = useEngagementContextSafe();
|
|
52037
|
-
if (!ctx) {
|
|
52038
|
-
return {
|
|
52039
|
-
state: null,
|
|
52040
|
-
isLoading: false,
|
|
52041
|
-
error: null,
|
|
52042
|
-
current: 0,
|
|
52043
|
-
longest: 0,
|
|
52044
|
-
canRecover: false,
|
|
52045
|
-
timeRemainingMs: null,
|
|
52046
|
-
userTimezone: null,
|
|
52047
|
-
recordActivity: stubRecordActivity,
|
|
52048
|
-
recover: stubRecover,
|
|
52049
|
-
refresh: noopAsyncVoid,
|
|
52050
|
-
isConfigured: false
|
|
52051
|
-
};
|
|
52052
|
-
}
|
|
52053
52171
|
const { defaults, userTimezone } = options ?? {};
|
|
52054
52172
|
const streakQuery = (0, import_react_query4.useQuery)({
|
|
52055
|
-
queryKey: ["sylphx", ctx
|
|
52056
|
-
queryFn: () =>
|
|
52057
|
-
|
|
52173
|
+
queryKey: ["sylphx", ctx?.appId ?? "__noop__", "streak", streakId, userTimezone],
|
|
52174
|
+
queryFn: () => {
|
|
52175
|
+
if (!ctx) throw new Error("useSafeStreak called without provider");
|
|
52176
|
+
return ctx.getStreak(streakId, defaults, userTimezone);
|
|
52177
|
+
},
|
|
52178
|
+
enabled: !!ctx && !!ctx.user,
|
|
52058
52179
|
staleTime: STALE_TIME_FREQUENT_MS
|
|
52059
52180
|
});
|
|
52060
|
-
const state = streakQuery.data ?? null;
|
|
52061
52181
|
const recordActivity = (0, import_react101.useCallback)(
|
|
52062
52182
|
async (metadata) => {
|
|
52183
|
+
if (!ctx) return stubRecordActivity();
|
|
52063
52184
|
const result = await ctx.recordStreakActivity(streakId, metadata, defaults, userTimezone);
|
|
52064
52185
|
ctx.queryClient.setQueryData(
|
|
52065
52186
|
["sylphx", ctx.appId, "streak", streakId, userTimezone],
|
|
@@ -52070,6 +52191,7 @@ function useSafeStreak(streakId, options) {
|
|
|
52070
52191
|
[ctx, streakId, defaults, userTimezone]
|
|
52071
52192
|
);
|
|
52072
52193
|
const recover = (0, import_react101.useCallback)(async () => {
|
|
52194
|
+
if (!ctx) return stubRecover();
|
|
52073
52195
|
const result = await ctx.recoverStreak(streakId, userTimezone);
|
|
52074
52196
|
if (result.success) {
|
|
52075
52197
|
ctx.queryClient.setQueryData(
|
|
@@ -52080,10 +52202,28 @@ function useSafeStreak(streakId, options) {
|
|
|
52080
52202
|
return result;
|
|
52081
52203
|
}, [ctx, streakId, userTimezone]);
|
|
52082
52204
|
const refresh = (0, import_react101.useCallback)(async () => {
|
|
52205
|
+
if (!ctx) return;
|
|
52083
52206
|
await ctx.queryClient.invalidateQueries({
|
|
52084
52207
|
queryKey: ["sylphx", ctx.appId, "streak", streakId]
|
|
52085
52208
|
});
|
|
52086
52209
|
}, [ctx, streakId]);
|
|
52210
|
+
if (!ctx) {
|
|
52211
|
+
return {
|
|
52212
|
+
state: null,
|
|
52213
|
+
isLoading: false,
|
|
52214
|
+
error: null,
|
|
52215
|
+
current: 0,
|
|
52216
|
+
longest: 0,
|
|
52217
|
+
canRecover: false,
|
|
52218
|
+
timeRemainingMs: null,
|
|
52219
|
+
userTimezone: null,
|
|
52220
|
+
recordActivity: stubRecordActivity,
|
|
52221
|
+
recover: stubRecover,
|
|
52222
|
+
refresh: noopAsyncVoid,
|
|
52223
|
+
isConfigured: false
|
|
52224
|
+
};
|
|
52225
|
+
}
|
|
52226
|
+
const state = streakQuery.data ?? null;
|
|
52087
52227
|
return {
|
|
52088
52228
|
state,
|
|
52089
52229
|
isLoading: streakQuery.isLoading,
|
|
@@ -52101,28 +52241,19 @@ function useSafeStreak(streakId, options) {
|
|
|
52101
52241
|
}
|
|
52102
52242
|
function useSafeLeaderboard(leaderboardId, options, defaults) {
|
|
52103
52243
|
const ctx = useEngagementContextSafe();
|
|
52104
|
-
if (!ctx) {
|
|
52105
|
-
return {
|
|
52106
|
-
data: null,
|
|
52107
|
-
isLoading: false,
|
|
52108
|
-
error: null,
|
|
52109
|
-
entries: [],
|
|
52110
|
-
currentUserEntry: null,
|
|
52111
|
-
totalParticipants: 0,
|
|
52112
|
-
submitScore: stubSubmitScore,
|
|
52113
|
-
refresh: noopAsyncVoid,
|
|
52114
|
-
isConfigured: false
|
|
52115
|
-
};
|
|
52116
|
-
}
|
|
52117
52244
|
const optionsKey = JSON.stringify(options ?? {});
|
|
52118
52245
|
const leaderboardQuery = (0, import_react_query4.useQuery)({
|
|
52119
|
-
queryKey: ["sylphx", ctx
|
|
52120
|
-
queryFn: () =>
|
|
52246
|
+
queryKey: ["sylphx", ctx?.appId ?? "__noop__", "leaderboard", leaderboardId, optionsKey],
|
|
52247
|
+
queryFn: () => {
|
|
52248
|
+
if (!ctx) throw new Error("useSafeLeaderboard called without provider");
|
|
52249
|
+
return ctx.getLeaderboard(leaderboardId, options);
|
|
52250
|
+
},
|
|
52251
|
+
enabled: !!ctx,
|
|
52121
52252
|
staleTime: STALE_TIME_MODERATE_MS
|
|
52122
52253
|
});
|
|
52123
|
-
const data = leaderboardQuery.data ?? null;
|
|
52124
52254
|
const submitScore = (0, import_react101.useCallback)(
|
|
52125
52255
|
async (value, metadata) => {
|
|
52256
|
+
if (!ctx) return stubSubmitScore();
|
|
52126
52257
|
const result = await ctx.submitScore(leaderboardId, value, metadata, defaults);
|
|
52127
52258
|
void ctx.queryClient.invalidateQueries({
|
|
52128
52259
|
queryKey: ["sylphx", ctx.appId, "leaderboard", leaderboardId]
|
|
@@ -52132,10 +52263,25 @@ function useSafeLeaderboard(leaderboardId, options, defaults) {
|
|
|
52132
52263
|
[ctx, leaderboardId, defaults]
|
|
52133
52264
|
);
|
|
52134
52265
|
const refresh = (0, import_react101.useCallback)(async () => {
|
|
52266
|
+
if (!ctx) return;
|
|
52135
52267
|
await ctx.queryClient.invalidateQueries({
|
|
52136
52268
|
queryKey: ["sylphx", ctx.appId, "leaderboard", leaderboardId]
|
|
52137
52269
|
});
|
|
52138
52270
|
}, [ctx, leaderboardId]);
|
|
52271
|
+
if (!ctx) {
|
|
52272
|
+
return {
|
|
52273
|
+
data: null,
|
|
52274
|
+
isLoading: false,
|
|
52275
|
+
error: null,
|
|
52276
|
+
entries: [],
|
|
52277
|
+
currentUserEntry: null,
|
|
52278
|
+
totalParticipants: 0,
|
|
52279
|
+
submitScore: stubSubmitScore,
|
|
52280
|
+
refresh: noopAsyncVoid,
|
|
52281
|
+
isConfigured: false
|
|
52282
|
+
};
|
|
52283
|
+
}
|
|
52284
|
+
const data = leaderboardQuery.data ?? null;
|
|
52139
52285
|
return {
|
|
52140
52286
|
data,
|
|
52141
52287
|
isLoading: leaderboardQuery.isLoading,
|
|
@@ -52151,27 +52297,13 @@ function useSafeLeaderboard(leaderboardId, options, defaults) {
|
|
|
52151
52297
|
function useSafeAchievements() {
|
|
52152
52298
|
const ctx = useEngagementContextSafe();
|
|
52153
52299
|
const [recentUnlock, setRecentUnlock] = (0, import_react101.useState)(null);
|
|
52154
|
-
if (!ctx) {
|
|
52155
|
-
return {
|
|
52156
|
-
achievements: [],
|
|
52157
|
-
isLoading: false,
|
|
52158
|
-
error: null,
|
|
52159
|
-
unlocked: [],
|
|
52160
|
-
locked: [],
|
|
52161
|
-
getAchievement: () => null,
|
|
52162
|
-
unlock: stubUnlockAchievement,
|
|
52163
|
-
incrementProgress: stubIncrementProgress,
|
|
52164
|
-
refresh: noopAsyncVoid,
|
|
52165
|
-
recentUnlock: null,
|
|
52166
|
-
dismissRecentUnlock: () => {
|
|
52167
|
-
},
|
|
52168
|
-
isConfigured: false
|
|
52169
|
-
};
|
|
52170
|
-
}
|
|
52171
52300
|
const achievementsQuery = (0, import_react_query4.useQuery)({
|
|
52172
|
-
queryKey: ["sylphx", ctx
|
|
52173
|
-
queryFn: () =>
|
|
52174
|
-
|
|
52301
|
+
queryKey: ["sylphx", ctx?.appId ?? "__noop__", "achievements"],
|
|
52302
|
+
queryFn: () => {
|
|
52303
|
+
if (!ctx) throw new Error("useSafeAchievements called without provider");
|
|
52304
|
+
return ctx.getAchievements();
|
|
52305
|
+
},
|
|
52306
|
+
enabled: !!ctx && !!ctx.user,
|
|
52175
52307
|
staleTime: STALE_TIME_STABLE_MS
|
|
52176
52308
|
});
|
|
52177
52309
|
const achievements = achievementsQuery.data ?? [];
|
|
@@ -52185,6 +52317,7 @@ function useSafeAchievements() {
|
|
|
52185
52317
|
);
|
|
52186
52318
|
const unlock = (0, import_react101.useCallback)(
|
|
52187
52319
|
async (achievementId, defaults) => {
|
|
52320
|
+
if (!ctx) return stubUnlockAchievement();
|
|
52188
52321
|
const result = await ctx.unlockAchievement(achievementId, defaults);
|
|
52189
52322
|
if (result.isNew) {
|
|
52190
52323
|
setRecentUnlock(result);
|
|
@@ -52198,6 +52331,7 @@ function useSafeAchievements() {
|
|
|
52198
52331
|
);
|
|
52199
52332
|
const incrementProgress = (0, import_react101.useCallback)(
|
|
52200
52333
|
async (achievementId, amount, defaults) => {
|
|
52334
|
+
if (!ctx) return stubIncrementProgress();
|
|
52201
52335
|
const result = await ctx.incrementAchievementProgress(achievementId, amount, defaults);
|
|
52202
52336
|
void ctx.queryClient.invalidateQueries({
|
|
52203
52337
|
queryKey: ["sylphx", ctx.appId, "achievements"]
|
|
@@ -52207,6 +52341,7 @@ function useSafeAchievements() {
|
|
|
52207
52341
|
[ctx]
|
|
52208
52342
|
);
|
|
52209
52343
|
const refresh = (0, import_react101.useCallback)(async () => {
|
|
52344
|
+
if (!ctx) return;
|
|
52210
52345
|
await ctx.queryClient.invalidateQueries({
|
|
52211
52346
|
queryKey: ["sylphx", ctx.appId, "achievements"]
|
|
52212
52347
|
});
|
|
@@ -52214,6 +52349,23 @@ function useSafeAchievements() {
|
|
|
52214
52349
|
const dismissRecentUnlock = (0, import_react101.useCallback)(() => {
|
|
52215
52350
|
setRecentUnlock(null);
|
|
52216
52351
|
}, []);
|
|
52352
|
+
if (!ctx) {
|
|
52353
|
+
return {
|
|
52354
|
+
achievements: [],
|
|
52355
|
+
isLoading: false,
|
|
52356
|
+
error: null,
|
|
52357
|
+
unlocked: [],
|
|
52358
|
+
locked: [],
|
|
52359
|
+
getAchievement: () => null,
|
|
52360
|
+
unlock: stubUnlockAchievement,
|
|
52361
|
+
incrementProgress: stubIncrementProgress,
|
|
52362
|
+
refresh: noopAsyncVoid,
|
|
52363
|
+
recentUnlock: null,
|
|
52364
|
+
dismissRecentUnlock: () => {
|
|
52365
|
+
},
|
|
52366
|
+
isConfigured: false
|
|
52367
|
+
};
|
|
52368
|
+
}
|
|
52217
52369
|
return {
|
|
52218
52370
|
achievements,
|
|
52219
52371
|
isLoading: achievementsQuery.isLoading,
|
|
@@ -52302,7 +52454,9 @@ function FeatureFlagProvider({
|
|
|
52302
52454
|
const flags = (0, import_react102.useMemo)(() => {
|
|
52303
52455
|
const map = /* @__PURE__ */ new Map();
|
|
52304
52456
|
const flagList = flagsQuery.data ?? cachedInitialFlags;
|
|
52305
|
-
flagList.forEach((flag) =>
|
|
52457
|
+
flagList.forEach((flag) => {
|
|
52458
|
+
map.set(flag.key, flag);
|
|
52459
|
+
});
|
|
52306
52460
|
return map;
|
|
52307
52461
|
}, [flagsQuery.data, cachedInitialFlags]);
|
|
52308
52462
|
const getFlag = (0, import_react102.useCallback)(
|
|
@@ -54107,7 +54261,11 @@ function createRestApi(config2) {
|
|
|
54107
54261
|
}
|
|
54108
54262
|
async function get(path, query) {
|
|
54109
54263
|
const url = new URL(`${baseUrl}${path}`);
|
|
54110
|
-
if (query)
|
|
54264
|
+
if (query) {
|
|
54265
|
+
Object.entries(query).forEach(([k2, v2]) => {
|
|
54266
|
+
if (v2) url.searchParams.set(k2, v2);
|
|
54267
|
+
});
|
|
54268
|
+
}
|
|
54111
54269
|
const res = await fetchWithAuth(url.toString(), "GET");
|
|
54112
54270
|
return handleResponse(res);
|
|
54113
54271
|
}
|
|
@@ -54576,7 +54734,7 @@ function SylphxProviderInner({
|
|
|
54576
54734
|
if (wasAnonymous && isNowAuthenticated && authState.user && anonymousId && resolvedRef) {
|
|
54577
54735
|
const config3 = createConfig({
|
|
54578
54736
|
secretKey: appId,
|
|
54579
|
-
|
|
54737
|
+
slug: resolvedRef
|
|
54580
54738
|
});
|
|
54581
54739
|
linkAnonymousConsents(config3, {
|
|
54582
54740
|
userId: authState.user.id,
|
|
@@ -54593,7 +54751,7 @@ function SylphxProviderInner({
|
|
|
54593
54751
|
anonymousId,
|
|
54594
54752
|
appId,
|
|
54595
54753
|
authState.user,
|
|
54596
|
-
|
|
54754
|
+
resolvedRef
|
|
54597
54755
|
]);
|
|
54598
54756
|
const api = (0, import_react109.useMemo)(
|
|
54599
54757
|
() => createRestApi({
|
|
@@ -54956,7 +55114,7 @@ function SylphxProviderInner({
|
|
|
54956
55114
|
}, [authState.isSignedIn, authPrefix]);
|
|
54957
55115
|
const resetPassword = (0, import_react109.useCallback)(
|
|
54958
55116
|
async (options) => {
|
|
54959
|
-
const response = await fetch(`${platformUrl}/
|
|
55117
|
+
const response = await fetch(`${platformUrl}/v1/auth/reset-password`, {
|
|
54960
55118
|
method: "POST",
|
|
54961
55119
|
headers: { "Content-Type": "application/json" },
|
|
54962
55120
|
body: JSON.stringify({
|
|
@@ -54974,7 +55132,7 @@ function SylphxProviderInner({
|
|
|
54974
55132
|
);
|
|
54975
55133
|
const verifyEmail = (0, import_react109.useCallback)(
|
|
54976
55134
|
async (options) => {
|
|
54977
|
-
const response = await fetch(`${platformUrl}/
|
|
55135
|
+
const response = await fetch(`${platformUrl}/v1/auth/verify-email`, {
|
|
54978
55136
|
method: "POST",
|
|
54979
55137
|
headers: { "Content-Type": "application/json" },
|
|
54980
55138
|
body: JSON.stringify({
|
|
@@ -54991,7 +55149,7 @@ function SylphxProviderInner({
|
|
|
54991
55149
|
);
|
|
54992
55150
|
const resendVerificationEmail = (0, import_react109.useCallback)(
|
|
54993
55151
|
async (options) => {
|
|
54994
|
-
const response = await fetch(`${platformUrl}/
|
|
55152
|
+
const response = await fetch(`${platformUrl}/v1/auth/resend-verification`, {
|
|
54995
55153
|
method: "POST",
|
|
54996
55154
|
headers: { "Content-Type": "application/json" },
|
|
54997
55155
|
body: JSON.stringify({
|
|
@@ -55008,7 +55166,7 @@ function SylphxProviderInner({
|
|
|
55008
55166
|
);
|
|
55009
55167
|
const forgotPassword = (0, import_react109.useCallback)(
|
|
55010
55168
|
async (options) => {
|
|
55011
|
-
const response = await fetch(`${platformUrl}/
|
|
55169
|
+
const response = await fetch(`${platformUrl}/v1/auth/forgot-password`, {
|
|
55012
55170
|
method: "POST",
|
|
55013
55171
|
headers: { "Content-Type": "application/json" },
|
|
55014
55172
|
body: JSON.stringify({
|
|
@@ -55896,7 +56054,7 @@ function SylphxProviderInner({
|
|
|
55896
56054
|
});
|
|
55897
56055
|
},
|
|
55898
56056
|
verifyEmail: async (token) => {
|
|
55899
|
-
const response = await fetch(`${platformUrl}/
|
|
56057
|
+
const response = await fetch(`${platformUrl}/v1/auth/verify-email`, {
|
|
55900
56058
|
method: "POST",
|
|
55901
56059
|
headers: { "Content-Type": "application/json" },
|
|
55902
56060
|
body: JSON.stringify({ token, client_id: appId || "" })
|
|
@@ -55926,8 +56084,8 @@ function SylphxProviderInner({
|
|
|
55926
56084
|
},
|
|
55927
56085
|
getOAuthProviders: async () => {
|
|
55928
56086
|
if (!appId) return { providers: [] };
|
|
55929
|
-
const response = await fetch(`${platformUrl}/
|
|
55930
|
-
headers: { "
|
|
56087
|
+
const response = await fetch(`${platformUrl}/v1/auth/oauth-providers`, {
|
|
56088
|
+
headers: { "x-app-secret": appId }
|
|
55931
56089
|
});
|
|
55932
56090
|
if (!response.ok) {
|
|
55933
56091
|
return { providers: [] };
|
|
@@ -56215,6 +56373,7 @@ function SylphxProviderInner({
|
|
|
56215
56373
|
() => ({
|
|
56216
56374
|
appId,
|
|
56217
56375
|
platformUrl,
|
|
56376
|
+
slug: resolvedRef,
|
|
56218
56377
|
ref: resolvedRef,
|
|
56219
56378
|
anonymousId,
|
|
56220
56379
|
queryClient,
|
|
@@ -56348,7 +56507,7 @@ function SylphxProviderInner({
|
|
|
56348
56507
|
getAchievements,
|
|
56349
56508
|
unlockAchievement,
|
|
56350
56509
|
incrementAchievementProgress,
|
|
56351
|
-
|
|
56510
|
+
resolvedRef
|
|
56352
56511
|
]
|
|
56353
56512
|
);
|
|
56354
56513
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AuthContext.Provider, { value: authValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SdkAuthContext.Provider, { value: sdkAuthValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(UserContext.Provider, { value: userValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SecurityContext.Provider, { value: securityValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(PlatformContext.Provider, { value: platformValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(StorageContext.Provider, { value: storageValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AIContext.Provider, { value: aiValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TasksContext.Provider, { value: tasksValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(MonitoringContext.Provider, { value: monitoringValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ConsentContext.Provider, { value: consentValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DatabaseContext.Provider, { value: databaseValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(EmailContext.Provider, { value: emailValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(NewsletterContext.Provider, { value: newsletterValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(WebhooksContext.Provider, { value: webhooksValue, children }) }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
@@ -56388,16 +56547,16 @@ function useSdkConfig() {
|
|
|
56388
56547
|
const platform3 = (0, import_react110.useContext)(PlatformContext);
|
|
56389
56548
|
const auth = (0, import_react110.useContext)(AuthContext);
|
|
56390
56549
|
return (0, import_react110.useMemo)(() => {
|
|
56391
|
-
if (!platform3?.
|
|
56550
|
+
if (!platform3?.slug) return null;
|
|
56392
56551
|
let config2 = createConfig({
|
|
56393
56552
|
secretKey: platform3.appId,
|
|
56394
|
-
|
|
56553
|
+
slug: platform3.slug
|
|
56395
56554
|
});
|
|
56396
56555
|
if (auth?.accessToken) {
|
|
56397
56556
|
config2 = withToken(config2, auth.accessToken);
|
|
56398
56557
|
}
|
|
56399
56558
|
return config2;
|
|
56400
|
-
}, [platform3?.
|
|
56559
|
+
}, [platform3?.slug, platform3?.appId, auth?.accessToken]);
|
|
56401
56560
|
}
|
|
56402
56561
|
var rbacKeys = {
|
|
56403
56562
|
all: ["rbac"],
|
|
@@ -57006,6 +57165,8 @@ function AccountSectionInner({
|
|
|
57006
57165
|
const userContext = useUserContext();
|
|
57007
57166
|
const securityContext = useSecurityContext();
|
|
57008
57167
|
const styles2 = baseStyles(theme);
|
|
57168
|
+
const newEmailId = (0, import_react114.useId)();
|
|
57169
|
+
const emailPasswordId = (0, import_react114.useId)();
|
|
57009
57170
|
const [error2, setError] = (0, import_react114.useState)(null);
|
|
57010
57171
|
const [success, setSuccess] = (0, import_react114.useState)(null);
|
|
57011
57172
|
const [showEmailChangeForm, setShowEmailChangeForm] = (0, import_react114.useState)(false);
|
|
@@ -57182,10 +57343,11 @@ function AccountSectionInner({
|
|
|
57182
57343
|
},
|
|
57183
57344
|
children: [
|
|
57184
57345
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { style: styles2.formGroup, children: [
|
|
57185
|
-
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("label", { style: styles2.label, children: "New Email Address" }),
|
|
57346
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("label", { htmlFor: newEmailId, style: styles2.label, children: "New Email Address" }),
|
|
57186
57347
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
57187
57348
|
"input",
|
|
57188
57349
|
{
|
|
57350
|
+
id: newEmailId,
|
|
57189
57351
|
type: "email",
|
|
57190
57352
|
value: newEmail,
|
|
57191
57353
|
onChange: (e2) => setNewEmail(e2.target.value),
|
|
@@ -57196,10 +57358,11 @@ function AccountSectionInner({
|
|
|
57196
57358
|
)
|
|
57197
57359
|
] }),
|
|
57198
57360
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { style: styles2.formGroup, children: [
|
|
57199
|
-
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("label", { style: styles2.label, children: "Current Password" }),
|
|
57361
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("label", { htmlFor: emailPasswordId, style: styles2.label, children: "Current Password" }),
|
|
57200
57362
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
57201
57363
|
"input",
|
|
57202
57364
|
{
|
|
57365
|
+
id: emailPasswordId,
|
|
57203
57366
|
type: "password",
|
|
57204
57367
|
value: emailPassword,
|
|
57205
57368
|
onChange: (e2) => setEmailPassword(e2.target.value),
|
|
@@ -57558,6 +57721,8 @@ function DownloadIcon({ size: size4 = 24 }) {
|
|
|
57558
57721
|
strokeWidth: "2",
|
|
57559
57722
|
strokeLinecap: "round",
|
|
57560
57723
|
strokeLinejoin: "round",
|
|
57724
|
+
"aria-hidden": "true",
|
|
57725
|
+
focusable: "false",
|
|
57561
57726
|
children: [
|
|
57562
57727
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
57563
57728
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("polyline", { points: "7 10 12 15 17 10" }),
|
|
@@ -57578,6 +57743,8 @@ function TrashIcon2({ size: size4 = 24 }) {
|
|
|
57578
57743
|
strokeWidth: "2",
|
|
57579
57744
|
strokeLinecap: "round",
|
|
57580
57745
|
strokeLinejoin: "round",
|
|
57746
|
+
"aria-hidden": "true",
|
|
57747
|
+
focusable: "false",
|
|
57581
57748
|
children: [
|
|
57582
57749
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("polyline", { points: "3 6 5 6 21 6" }),
|
|
57583
57750
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
@@ -57597,6 +57764,8 @@ function ShieldIcon({ size: size4 = 24, color: color2 = "currentColor" }) {
|
|
|
57597
57764
|
strokeWidth: "2",
|
|
57598
57765
|
strokeLinecap: "round",
|
|
57599
57766
|
strokeLinejoin: "round",
|
|
57767
|
+
"aria-hidden": "true",
|
|
57768
|
+
focusable: "false",
|
|
57600
57769
|
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
|
|
57601
57770
|
}
|
|
57602
57771
|
);
|
|
@@ -57696,15 +57865,22 @@ function EventViewer({
|
|
|
57696
57865
|
]
|
|
57697
57866
|
}
|
|
57698
57867
|
) : filteredEvents.map((event2, i2) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
57699
|
-
"
|
|
57868
|
+
"button",
|
|
57700
57869
|
{
|
|
57870
|
+
type: "button",
|
|
57701
57871
|
onClick: () => {
|
|
57702
57872
|
setExpandedId(expandedId === event2.id ? null : event2.id);
|
|
57703
57873
|
onEventClick?.(event2);
|
|
57704
57874
|
},
|
|
57875
|
+
"aria-expanded": expandedId === event2.id,
|
|
57705
57876
|
style: {
|
|
57706
57877
|
...eventItemStyle,
|
|
57707
|
-
borderBottom: i2 === filteredEvents.length - 1 ? "none" : eventItemStyle.borderBottom
|
|
57878
|
+
borderBottom: i2 === filteredEvents.length - 1 ? "none" : eventItemStyle.borderBottom,
|
|
57879
|
+
textAlign: "left",
|
|
57880
|
+
font: "inherit",
|
|
57881
|
+
color: "inherit",
|
|
57882
|
+
width: "100%",
|
|
57883
|
+
cursor: "pointer"
|
|
57708
57884
|
},
|
|
57709
57885
|
children: [
|
|
57710
57886
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
@@ -58129,6 +58305,8 @@ function EventIcon({ color: color2, size: size4 = 20 }) {
|
|
|
58129
58305
|
strokeWidth: "2",
|
|
58130
58306
|
strokeLinecap: "round",
|
|
58131
58307
|
strokeLinejoin: "round",
|
|
58308
|
+
"aria-hidden": "true",
|
|
58309
|
+
focusable: "false",
|
|
58132
58310
|
children: [
|
|
58133
58311
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
58134
58312
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("polyline", { points: "12 6 12 12 16 14" })
|
|
@@ -58148,6 +58326,8 @@ function UsersIcon({ color: color2 }) {
|
|
|
58148
58326
|
strokeWidth: "2",
|
|
58149
58327
|
strokeLinecap: "round",
|
|
58150
58328
|
strokeLinejoin: "round",
|
|
58329
|
+
"aria-hidden": "true",
|
|
58330
|
+
focusable: "false",
|
|
58151
58331
|
children: [
|
|
58152
58332
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
58153
58333
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
|
|
@@ -58169,6 +58349,8 @@ function PageviewsIcon({ color: color2 }) {
|
|
|
58169
58349
|
strokeWidth: "2",
|
|
58170
58350
|
strokeLinecap: "round",
|
|
58171
58351
|
strokeLinejoin: "round",
|
|
58352
|
+
"aria-hidden": "true",
|
|
58353
|
+
focusable: "false",
|
|
58172
58354
|
children: [
|
|
58173
58355
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
58174
58356
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
@@ -58188,6 +58370,8 @@ function SessionsIcon({ color: color2 }) {
|
|
|
58188
58370
|
strokeWidth: "2",
|
|
58189
58371
|
strokeLinecap: "round",
|
|
58190
58372
|
strokeLinejoin: "round",
|
|
58373
|
+
"aria-hidden": "true",
|
|
58374
|
+
focusable: "false",
|
|
58191
58375
|
children: [
|
|
58192
58376
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
58193
58377
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("line", { x1: "9", y1: "3", x2: "9", y2: "21" })
|
|
@@ -58207,6 +58391,8 @@ function RevenueIcon({ color: color2 }) {
|
|
|
58207
58391
|
strokeWidth: "2",
|
|
58208
58392
|
strokeLinecap: "round",
|
|
58209
58393
|
strokeLinejoin: "round",
|
|
58394
|
+
"aria-hidden": "true",
|
|
58395
|
+
focusable: "false",
|
|
58210
58396
|
children: [
|
|
58211
58397
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("line", { x1: "12", y1: "1", x2: "12", y2: "23" }),
|
|
58212
58398
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" })
|
|
@@ -58226,6 +58412,8 @@ function ChartIcon({ color: color2 }) {
|
|
|
58226
58412
|
strokeWidth: "2",
|
|
58227
58413
|
strokeLinecap: "round",
|
|
58228
58414
|
strokeLinejoin: "round",
|
|
58415
|
+
"aria-hidden": "true",
|
|
58416
|
+
focusable: "false",
|
|
58229
58417
|
children: [
|
|
58230
58418
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("line", { x1: "18", y1: "20", x2: "18", y2: "10" }),
|
|
58231
58419
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("line", { x1: "12", y1: "20", x2: "12", y2: "4" }),
|
|
@@ -58259,6 +58447,8 @@ function APIKeyManager({
|
|
|
58259
58447
|
emptyMessage = "No API keys created",
|
|
58260
58448
|
showEnvironment = true
|
|
58261
58449
|
}) {
|
|
58450
|
+
const keyNameId = (0, import_react116.useId)();
|
|
58451
|
+
const expirationId = (0, import_react116.useId)();
|
|
58262
58452
|
const [showCreate, setShowCreate] = (0, import_react116.useState)(false);
|
|
58263
58453
|
const [name, setName] = (0, import_react116.useState)("");
|
|
58264
58454
|
const [selectedScopes, setSelectedScopes] = (0, import_react116.useState)([]);
|
|
@@ -58508,6 +58698,7 @@ function APIKeyManager({
|
|
|
58508
58698
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
58509
58699
|
"label",
|
|
58510
58700
|
{
|
|
58701
|
+
htmlFor: keyNameId,
|
|
58511
58702
|
style: {
|
|
58512
58703
|
display: "block",
|
|
58513
58704
|
marginBottom: "0.5rem",
|
|
@@ -58520,6 +58711,7 @@ function APIKeyManager({
|
|
|
58520
58711
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
58521
58712
|
"input",
|
|
58522
58713
|
{
|
|
58714
|
+
id: keyNameId,
|
|
58523
58715
|
type: "text",
|
|
58524
58716
|
value: name,
|
|
58525
58717
|
onChange: (e2) => setName(e2.target.value),
|
|
@@ -58540,15 +58732,16 @@ function APIKeyManager({
|
|
|
58540
58732
|
}
|
|
58541
58733
|
)
|
|
58542
58734
|
] }),
|
|
58543
|
-
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("
|
|
58735
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("fieldset", { style: { marginBottom: "1rem", border: "none", padding: 0, margin: 0 }, children: [
|
|
58544
58736
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
58545
|
-
"
|
|
58737
|
+
"legend",
|
|
58546
58738
|
{
|
|
58547
58739
|
style: {
|
|
58548
58740
|
display: "block",
|
|
58549
58741
|
marginBottom: "0.5rem",
|
|
58550
58742
|
fontWeight: 500,
|
|
58551
|
-
fontSize: theme.fontSizeSm
|
|
58743
|
+
fontSize: theme.fontSizeSm,
|
|
58744
|
+
padding: 0
|
|
58552
58745
|
},
|
|
58553
58746
|
children: "Scopes"
|
|
58554
58747
|
}
|
|
@@ -58587,6 +58780,7 @@ function APIKeyManager({
|
|
|
58587
58780
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
58588
58781
|
"label",
|
|
58589
58782
|
{
|
|
58783
|
+
htmlFor: expirationId,
|
|
58590
58784
|
style: {
|
|
58591
58785
|
display: "block",
|
|
58592
58786
|
marginBottom: "0.5rem",
|
|
@@ -58599,6 +58793,7 @@ function APIKeyManager({
|
|
|
58599
58793
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
58600
58794
|
"select",
|
|
58601
58795
|
{
|
|
58796
|
+
id: expirationId,
|
|
58602
58797
|
value: expiresIn ?? "",
|
|
58603
58798
|
onChange: (e2) => setExpiresIn(e2.target.value ? Number.parseInt(e2.target.value, 10) : void 0),
|
|
58604
58799
|
style: inputStyle,
|
|
@@ -58801,6 +58996,8 @@ function KeyIcon({ color: color2, size: size4 = 24 }) {
|
|
|
58801
58996
|
strokeWidth: "2",
|
|
58802
58997
|
strokeLinecap: "round",
|
|
58803
58998
|
strokeLinejoin: "round",
|
|
58999
|
+
"aria-hidden": "true",
|
|
59000
|
+
focusable: "false",
|
|
58804
59001
|
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("path", { d: "M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4" })
|
|
58805
59002
|
}
|
|
58806
59003
|
);
|
|
@@ -58818,6 +59015,8 @@ function PlusIcon3({ color: color2 }) {
|
|
|
58818
59015
|
strokeLinecap: "round",
|
|
58819
59016
|
strokeLinejoin: "round",
|
|
58820
59017
|
style: { marginRight: "0.25rem" },
|
|
59018
|
+
"aria-hidden": "true",
|
|
59019
|
+
focusable: "false",
|
|
58821
59020
|
children: [
|
|
58822
59021
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
58823
59022
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
@@ -58837,6 +59036,8 @@ function CheckIcon10({ color: color2 }) {
|
|
|
58837
59036
|
strokeWidth: "2",
|
|
58838
59037
|
strokeLinecap: "round",
|
|
58839
59038
|
strokeLinejoin: "round",
|
|
59039
|
+
"aria-hidden": "true",
|
|
59040
|
+
focusable: "false",
|
|
58840
59041
|
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
58841
59042
|
}
|
|
58842
59043
|
);
|
|
@@ -59400,6 +59601,8 @@ function InvoiceIcon({ color: color2, size: size4 = 24 }) {
|
|
|
59400
59601
|
strokeWidth: "2",
|
|
59401
59602
|
strokeLinecap: "round",
|
|
59402
59603
|
strokeLinejoin: "round",
|
|
59604
|
+
"aria-hidden": "true",
|
|
59605
|
+
focusable: "false",
|
|
59403
59606
|
children: [
|
|
59404
59607
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
59405
59608
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("polyline", { points: "14 2 14 8 20 8" }),
|
|
@@ -59422,6 +59625,8 @@ function DownloadIcon2({ color: color2 }) {
|
|
|
59422
59625
|
strokeWidth: "2",
|
|
59423
59626
|
strokeLinecap: "round",
|
|
59424
59627
|
strokeLinejoin: "round",
|
|
59628
|
+
"aria-hidden": "true",
|
|
59629
|
+
focusable: "false",
|
|
59425
59630
|
children: [
|
|
59426
59631
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
59427
59632
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("polyline", { points: "7 10 12 15 17 10" }),
|
|
@@ -59442,6 +59647,8 @@ function CreditCardIcon({ color: color2, size: size4 = 24 }) {
|
|
|
59442
59647
|
strokeWidth: "2",
|
|
59443
59648
|
strokeLinecap: "round",
|
|
59444
59649
|
strokeLinejoin: "round",
|
|
59650
|
+
"aria-hidden": "true",
|
|
59651
|
+
focusable: "false",
|
|
59445
59652
|
children: [
|
|
59446
59653
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
|
|
59447
59654
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
|
|
@@ -59462,6 +59669,8 @@ function PlusIcon4({ color: color2 }) {
|
|
|
59462
59669
|
strokeLinecap: "round",
|
|
59463
59670
|
strokeLinejoin: "round",
|
|
59464
59671
|
style: { marginRight: "0.25rem" },
|
|
59672
|
+
"aria-hidden": "true",
|
|
59673
|
+
focusable: "false",
|
|
59465
59674
|
children: [
|
|
59466
59675
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
59467
59676
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
@@ -60362,6 +60571,8 @@ function ChatIcon({ color: color2, size: size4 = 20 }) {
|
|
|
60362
60571
|
strokeWidth: "2",
|
|
60363
60572
|
strokeLinecap: "round",
|
|
60364
60573
|
strokeLinejoin: "round",
|
|
60574
|
+
"aria-hidden": "true",
|
|
60575
|
+
focusable: "false",
|
|
60365
60576
|
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
60366
60577
|
}
|
|
60367
60578
|
);
|
|
@@ -60378,6 +60589,8 @@ function SendIcon2({ color: color2 }) {
|
|
|
60378
60589
|
strokeWidth: "2",
|
|
60379
60590
|
strokeLinecap: "round",
|
|
60380
60591
|
strokeLinejoin: "round",
|
|
60592
|
+
"aria-hidden": "true",
|
|
60593
|
+
focusable: "false",
|
|
60381
60594
|
children: [
|
|
60382
60595
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("line", { x1: "22", y1: "2", x2: "11", y2: "13" }),
|
|
60383
60596
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })
|
|
@@ -60438,7 +60651,6 @@ function ConsentPreferences({
|
|
|
60438
60651
|
acceptAll,
|
|
60439
60652
|
declineOptional,
|
|
60440
60653
|
saveConsents,
|
|
60441
|
-
isLoading,
|
|
60442
60654
|
hasConsented
|
|
60443
60655
|
} = useConsent();
|
|
60444
60656
|
const [isSaving, setIsSaving] = (0, import_react120.useState)(false);
|
|
@@ -60863,6 +61075,8 @@ function CheckIcon12({ color: color2 }) {
|
|
|
60863
61075
|
strokeLinecap: "round",
|
|
60864
61076
|
strokeLinejoin: "round",
|
|
60865
61077
|
style: { marginRight: "0.5rem" },
|
|
61078
|
+
"aria-hidden": "true",
|
|
61079
|
+
focusable: "false",
|
|
60866
61080
|
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
60867
61081
|
}
|
|
60868
61082
|
);
|
|
@@ -60895,7 +61109,6 @@ function CookieBanner({
|
|
|
60895
61109
|
declineOptional,
|
|
60896
61110
|
setConsent,
|
|
60897
61111
|
saveConsents,
|
|
60898
|
-
closeBanner,
|
|
60899
61112
|
isLoading
|
|
60900
61113
|
} = useConsent();
|
|
60901
61114
|
const [showCustomize, setShowCustomize] = (0, import_react121.useState)(false);
|
|
@@ -61257,6 +61470,8 @@ function CloseIcon2() {
|
|
|
61257
61470
|
fill: "none",
|
|
61258
61471
|
stroke: "currentColor",
|
|
61259
61472
|
strokeWidth: "2",
|
|
61473
|
+
"aria-hidden": "true",
|
|
61474
|
+
focusable: "false",
|
|
61260
61475
|
children: [
|
|
61261
61476
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
61262
61477
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
@@ -61668,11 +61883,24 @@ function FeedbackWidget({
|
|
|
61668
61883
|
] }) });
|
|
61669
61884
|
}
|
|
61670
61885
|
function ErrorIcon({ color: color2 }) {
|
|
61671
|
-
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
61672
|
-
|
|
61673
|
-
|
|
61674
|
-
|
|
61675
|
-
|
|
61886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
61887
|
+
"svg",
|
|
61888
|
+
{
|
|
61889
|
+
width: "32",
|
|
61890
|
+
height: "32",
|
|
61891
|
+
viewBox: "0 0 24 24",
|
|
61892
|
+
fill: "none",
|
|
61893
|
+
stroke: color2,
|
|
61894
|
+
strokeWidth: "2",
|
|
61895
|
+
"aria-hidden": "true",
|
|
61896
|
+
focusable: "false",
|
|
61897
|
+
children: [
|
|
61898
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
61899
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
61900
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
61901
|
+
]
|
|
61902
|
+
}
|
|
61903
|
+
);
|
|
61676
61904
|
}
|
|
61677
61905
|
function FeedbackIcon() {
|
|
61678
61906
|
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
@@ -61685,6 +61913,8 @@ function FeedbackIcon() {
|
|
|
61685
61913
|
stroke: "currentColor",
|
|
61686
61914
|
strokeWidth: "2",
|
|
61687
61915
|
style: { marginRight: "0.5rem" },
|
|
61916
|
+
"aria-hidden": "true",
|
|
61917
|
+
focusable: "false",
|
|
61688
61918
|
children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("path", { d: "M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z" })
|
|
61689
61919
|
}
|
|
61690
61920
|
);
|
|
@@ -61699,6 +61929,8 @@ function CloseIcon3() {
|
|
|
61699
61929
|
fill: "none",
|
|
61700
61930
|
stroke: "currentColor",
|
|
61701
61931
|
strokeWidth: "2",
|
|
61932
|
+
"aria-hidden": "true",
|
|
61933
|
+
focusable: "false",
|
|
61702
61934
|
children: [
|
|
61703
61935
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
61704
61936
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
@@ -61707,10 +61939,23 @@ function CloseIcon3() {
|
|
|
61707
61939
|
);
|
|
61708
61940
|
}
|
|
61709
61941
|
function CheckCircleIcon({ color: color2 }) {
|
|
61710
|
-
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
61711
|
-
|
|
61712
|
-
|
|
61713
|
-
|
|
61942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
61943
|
+
"svg",
|
|
61944
|
+
{
|
|
61945
|
+
width: "48",
|
|
61946
|
+
height: "48",
|
|
61947
|
+
viewBox: "0 0 24 24",
|
|
61948
|
+
fill: "none",
|
|
61949
|
+
stroke: color2,
|
|
61950
|
+
strokeWidth: "2",
|
|
61951
|
+
"aria-hidden": "true",
|
|
61952
|
+
focusable: "false",
|
|
61953
|
+
children: [
|
|
61954
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("path", { d: "M22 11.08V12a10 10 0 11-5.93-9.14" }),
|
|
61955
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
61956
|
+
]
|
|
61957
|
+
}
|
|
61958
|
+
);
|
|
61714
61959
|
}
|
|
61715
61960
|
|
|
61716
61961
|
// src/react/ui/feature-gate.tsx
|
|
@@ -61987,6 +62232,8 @@ function FlagIcon() {
|
|
|
61987
62232
|
fill: "none",
|
|
61988
62233
|
stroke: "currentColor",
|
|
61989
62234
|
strokeWidth: "2",
|
|
62235
|
+
"aria-hidden": "true",
|
|
62236
|
+
focusable: "false",
|
|
61990
62237
|
children: [
|
|
61991
62238
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("path", { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }),
|
|
61992
62239
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
|
|
@@ -62004,6 +62251,8 @@ function CloseIcon4() {
|
|
|
62004
62251
|
fill: "none",
|
|
62005
62252
|
stroke: "currentColor",
|
|
62006
62253
|
strokeWidth: "2",
|
|
62254
|
+
"aria-hidden": "true",
|
|
62255
|
+
focusable: "false",
|
|
62007
62256
|
children: [
|
|
62008
62257
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
62009
62258
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
@@ -62115,13 +62364,22 @@ function FileUploadInner({
|
|
|
62115
62364
|
const acceptString = accept?.join(",");
|
|
62116
62365
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className, style: { fontFamily: theme.fontFamily }, children: [
|
|
62117
62366
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62118
|
-
"
|
|
62367
|
+
"button",
|
|
62119
62368
|
{
|
|
62369
|
+
type: "button",
|
|
62120
62370
|
onDrop: handleDrop,
|
|
62121
62371
|
onDragOver: handleDragOver,
|
|
62122
62372
|
onDragLeave: handleDragLeave,
|
|
62123
62373
|
onClick: handleClick,
|
|
62124
|
-
|
|
62374
|
+
disabled: disabled2 || isUploading,
|
|
62375
|
+
"aria-label": "Upload files",
|
|
62376
|
+
style: {
|
|
62377
|
+
...dropZoneStyle,
|
|
62378
|
+
textAlign: "center",
|
|
62379
|
+
font: "inherit",
|
|
62380
|
+
color: "inherit",
|
|
62381
|
+
width: "100%"
|
|
62382
|
+
},
|
|
62125
62383
|
children: [
|
|
62126
62384
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62127
62385
|
"input",
|
|
@@ -62298,7 +62556,7 @@ function ImageUploaderInner({
|
|
|
62298
62556
|
transition: "all 0.2s ease"
|
|
62299
62557
|
};
|
|
62300
62558
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className, style: { fontFamily: theme.fontFamily }, children: [
|
|
62301
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { style: containerStyle,
|
|
62559
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { style: containerStyle, children: [
|
|
62302
62560
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62303
62561
|
"input",
|
|
62304
62562
|
{
|
|
@@ -62310,21 +62568,7 @@ function ImageUploaderInner({
|
|
|
62310
62568
|
disabled: disabled2
|
|
62311
62569
|
}
|
|
62312
62570
|
),
|
|
62313
|
-
|
|
62314
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { style: styles2.spinner }),
|
|
62315
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62316
|
-
"p",
|
|
62317
|
-
{
|
|
62318
|
-
style: mergeStyles(styles2.textSm, styles2.textMuted, {
|
|
62319
|
-
marginTop: "0.5rem"
|
|
62320
|
-
}),
|
|
62321
|
-
children: [
|
|
62322
|
-
progress2,
|
|
62323
|
-
"%"
|
|
62324
|
-
]
|
|
62325
|
-
}
|
|
62326
|
-
)
|
|
62327
|
-
] }) : previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
62571
|
+
previewUrl && !isUploading ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { style: innerStyle, className: "sylphx-upload-hover", children: [
|
|
62328
62572
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62329
62573
|
"img",
|
|
62330
62574
|
{
|
|
@@ -62342,6 +62586,7 @@ function ImageUploaderInner({
|
|
|
62342
62586
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62343
62587
|
"div",
|
|
62344
62588
|
{
|
|
62589
|
+
className: "sylphx-upload-hover__overlay",
|
|
62345
62590
|
style: {
|
|
62346
62591
|
position: "absolute",
|
|
62347
62592
|
inset: 0,
|
|
@@ -62352,8 +62597,6 @@ function ImageUploaderInner({
|
|
|
62352
62597
|
opacity: 0,
|
|
62353
62598
|
transition: "opacity 0.2s ease"
|
|
62354
62599
|
},
|
|
62355
|
-
onMouseEnter: (e2) => e2.currentTarget.style.opacity = "1",
|
|
62356
|
-
onMouseLeave: (e2) => e2.currentTarget.style.opacity = "0",
|
|
62357
62600
|
children: [
|
|
62358
62601
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62359
62602
|
"button",
|
|
@@ -62366,22 +62609,59 @@ function ImageUploaderInner({
|
|
|
62366
62609
|
children: "Remove"
|
|
62367
62610
|
}
|
|
62368
62611
|
),
|
|
62369
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62612
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62613
|
+
"button",
|
|
62614
|
+
{
|
|
62615
|
+
type: "button",
|
|
62616
|
+
onClick: handleClick,
|
|
62617
|
+
style: mergeStyles(styles2.button, styles2.buttonPrimary),
|
|
62618
|
+
children: "Replace"
|
|
62619
|
+
}
|
|
62620
|
+
)
|
|
62370
62621
|
]
|
|
62371
62622
|
}
|
|
62372
62623
|
)
|
|
62373
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime140.
|
|
62374
|
-
|
|
62375
|
-
|
|
62376
|
-
"
|
|
62377
|
-
|
|
62378
|
-
|
|
62379
|
-
|
|
62380
|
-
|
|
62381
|
-
|
|
62382
|
-
|
|
62383
|
-
|
|
62384
|
-
|
|
62624
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62625
|
+
"button",
|
|
62626
|
+
{
|
|
62627
|
+
type: "button",
|
|
62628
|
+
onClick: handleClick,
|
|
62629
|
+
disabled: disabled2 || isUploading,
|
|
62630
|
+
"aria-label": "Upload image",
|
|
62631
|
+
style: {
|
|
62632
|
+
...innerStyle,
|
|
62633
|
+
font: "inherit",
|
|
62634
|
+
color: "inherit",
|
|
62635
|
+
cursor: disabled2 || isUploading ? "not-allowed" : "pointer"
|
|
62636
|
+
},
|
|
62637
|
+
children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { style: { textAlign: "center" }, children: [
|
|
62638
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { style: styles2.spinner }),
|
|
62639
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62640
|
+
"p",
|
|
62641
|
+
{
|
|
62642
|
+
style: mergeStyles(styles2.textSm, styles2.textMuted, {
|
|
62643
|
+
marginTop: "0.5rem"
|
|
62644
|
+
}),
|
|
62645
|
+
children: [
|
|
62646
|
+
progress2,
|
|
62647
|
+
"%"
|
|
62648
|
+
]
|
|
62649
|
+
}
|
|
62650
|
+
)
|
|
62651
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { style: { textAlign: "center" }, children: [
|
|
62652
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ImageIcon, { color: theme.colorMutedForeground }),
|
|
62653
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62654
|
+
"p",
|
|
62655
|
+
{
|
|
62656
|
+
style: mergeStyles(styles2.textSm, styles2.textMuted, {
|
|
62657
|
+
marginTop: "0.5rem"
|
|
62658
|
+
}),
|
|
62659
|
+
children: placeholder
|
|
62660
|
+
}
|
|
62661
|
+
)
|
|
62662
|
+
] })
|
|
62663
|
+
}
|
|
62664
|
+
)
|
|
62385
62665
|
] }),
|
|
62386
62666
|
error2 && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62387
62667
|
"div",
|
|
@@ -62472,50 +62752,66 @@ function AvatarUploadInner({
|
|
|
62472
62752
|
fontWeight: 600
|
|
62473
62753
|
};
|
|
62474
62754
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className, style: { fontFamily: theme.fontFamily }, children: [
|
|
62475
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62476
|
-
|
|
62477
|
-
|
|
62478
|
-
|
|
62479
|
-
|
|
62480
|
-
|
|
62481
|
-
|
|
62482
|
-
|
|
62483
|
-
|
|
62484
|
-
|
|
62485
|
-
|
|
62486
|
-
|
|
62487
|
-
|
|
62488
|
-
|
|
62489
|
-
|
|
62490
|
-
|
|
62491
|
-
|
|
62492
|
-
|
|
62493
|
-
|
|
62494
|
-
|
|
62495
|
-
|
|
62496
|
-
|
|
62497
|
-
|
|
62498
|
-
|
|
62499
|
-
|
|
62500
|
-
|
|
62501
|
-
|
|
62502
|
-
style: {
|
|
62503
|
-
|
|
62504
|
-
|
|
62505
|
-
|
|
62506
|
-
|
|
62507
|
-
|
|
62508
|
-
|
|
62509
|
-
|
|
62510
|
-
|
|
62511
|
-
|
|
62512
|
-
|
|
62513
|
-
|
|
62514
|
-
|
|
62515
|
-
|
|
62516
|
-
|
|
62517
|
-
|
|
62518
|
-
|
|
62755
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62756
|
+
"button",
|
|
62757
|
+
{
|
|
62758
|
+
type: "button",
|
|
62759
|
+
onClick: handleClick,
|
|
62760
|
+
disabled: disabled2 || isUploading,
|
|
62761
|
+
"aria-label": "Upload avatar",
|
|
62762
|
+
className: "sylphx-upload-hover",
|
|
62763
|
+
style: {
|
|
62764
|
+
...containerStyle,
|
|
62765
|
+
border: "none",
|
|
62766
|
+
padding: 0,
|
|
62767
|
+
background: "transparent",
|
|
62768
|
+
cursor: disabled2 || isUploading ? "not-allowed" : "pointer"
|
|
62769
|
+
},
|
|
62770
|
+
children: [
|
|
62771
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62772
|
+
"input",
|
|
62773
|
+
{
|
|
62774
|
+
ref: inputRef,
|
|
62775
|
+
type: "file",
|
|
62776
|
+
accept: "image/*",
|
|
62777
|
+
onChange: handleInputChange,
|
|
62778
|
+
style: { display: "none" },
|
|
62779
|
+
disabled: disabled2
|
|
62780
|
+
}
|
|
62781
|
+
),
|
|
62782
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { style: innerStyle, children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { style: styles2.spinner }) : previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62783
|
+
"img",
|
|
62784
|
+
{
|
|
62785
|
+
src: previewUrl,
|
|
62786
|
+
alt: "Avatar",
|
|
62787
|
+
style: {
|
|
62788
|
+
width: "100%",
|
|
62789
|
+
height: "100%",
|
|
62790
|
+
objectFit: "cover"
|
|
62791
|
+
}
|
|
62792
|
+
}
|
|
62793
|
+
) : initials ? initials : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(UserIcon, { color: theme.colorMutedForeground, size: size4 * 0.4 }) }),
|
|
62794
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62795
|
+
"div",
|
|
62796
|
+
{
|
|
62797
|
+
className: "sylphx-upload-hover__overlay",
|
|
62798
|
+
style: {
|
|
62799
|
+
position: "absolute",
|
|
62800
|
+
inset: 0,
|
|
62801
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
62802
|
+
display: "flex",
|
|
62803
|
+
alignItems: "center",
|
|
62804
|
+
justifyContent: "center",
|
|
62805
|
+
opacity: 0,
|
|
62806
|
+
transition: "opacity 0.2s ease",
|
|
62807
|
+
borderRadius: "50%"
|
|
62808
|
+
},
|
|
62809
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CameraIcon, { color: "#fff" })
|
|
62810
|
+
}
|
|
62811
|
+
)
|
|
62812
|
+
]
|
|
62813
|
+
}
|
|
62814
|
+
),
|
|
62519
62815
|
uploadError && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
62520
62816
|
"p",
|
|
62521
62817
|
{
|
|
@@ -62560,18 +62856,44 @@ function formatFileSize(bytes) {
|
|
|
62560
62856
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
62561
62857
|
}
|
|
62562
62858
|
function UploadIcon({ color: color2 }) {
|
|
62563
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62564
|
-
|
|
62565
|
-
|
|
62566
|
-
|
|
62567
|
-
|
|
62859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62860
|
+
"svg",
|
|
62861
|
+
{
|
|
62862
|
+
width: "40",
|
|
62863
|
+
height: "40",
|
|
62864
|
+
viewBox: "0 0 24 24",
|
|
62865
|
+
fill: "none",
|
|
62866
|
+
stroke: color2,
|
|
62867
|
+
strokeWidth: "1.5",
|
|
62868
|
+
"aria-hidden": "true",
|
|
62869
|
+
focusable: "false",
|
|
62870
|
+
children: [
|
|
62871
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4" }),
|
|
62872
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("polyline", { points: "17 8 12 3 7 8" }),
|
|
62873
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
|
|
62874
|
+
]
|
|
62875
|
+
}
|
|
62876
|
+
);
|
|
62568
62877
|
}
|
|
62569
62878
|
function ImageIcon({ color: color2 }) {
|
|
62570
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62571
|
-
|
|
62572
|
-
|
|
62573
|
-
|
|
62574
|
-
|
|
62879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62880
|
+
"svg",
|
|
62881
|
+
{
|
|
62882
|
+
width: "40",
|
|
62883
|
+
height: "40",
|
|
62884
|
+
viewBox: "0 0 24 24",
|
|
62885
|
+
fill: "none",
|
|
62886
|
+
stroke: color2,
|
|
62887
|
+
strokeWidth: "1.5",
|
|
62888
|
+
"aria-hidden": "true",
|
|
62889
|
+
focusable: "false",
|
|
62890
|
+
children: [
|
|
62891
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
62892
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
62893
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("polyline", { points: "21 15 16 10 5 21" })
|
|
62894
|
+
]
|
|
62895
|
+
}
|
|
62896
|
+
);
|
|
62575
62897
|
}
|
|
62576
62898
|
function UserIcon({ color: color2, size: size4 = 24 }) {
|
|
62577
62899
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
@@ -62583,6 +62905,8 @@ function UserIcon({ color: color2, size: size4 = 24 }) {
|
|
|
62583
62905
|
fill: "none",
|
|
62584
62906
|
stroke: color2,
|
|
62585
62907
|
strokeWidth: "1.5",
|
|
62908
|
+
"aria-hidden": "true",
|
|
62909
|
+
focusable: "false",
|
|
62586
62910
|
children: [
|
|
62587
62911
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("path", { d: "M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2" }),
|
|
62588
62912
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("circle", { cx: "12", cy: "7", r: "4" })
|
|
@@ -62591,10 +62915,23 @@ function UserIcon({ color: color2, size: size4 = 24 }) {
|
|
|
62591
62915
|
);
|
|
62592
62916
|
}
|
|
62593
62917
|
function CameraIcon({ color: color2 }) {
|
|
62594
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62595
|
-
|
|
62596
|
-
|
|
62597
|
-
|
|
62918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
62919
|
+
"svg",
|
|
62920
|
+
{
|
|
62921
|
+
width: "24",
|
|
62922
|
+
height: "24",
|
|
62923
|
+
viewBox: "0 0 24 24",
|
|
62924
|
+
fill: "none",
|
|
62925
|
+
stroke: color2,
|
|
62926
|
+
strokeWidth: "2",
|
|
62927
|
+
"aria-hidden": "true",
|
|
62928
|
+
focusable: "false",
|
|
62929
|
+
children: [
|
|
62930
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("path", { d: "M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z" }),
|
|
62931
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("circle", { cx: "12", cy: "13", r: "4" })
|
|
62932
|
+
]
|
|
62933
|
+
}
|
|
62934
|
+
);
|
|
62598
62935
|
}
|
|
62599
62936
|
function CloseIcon5() {
|
|
62600
62937
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
@@ -62606,6 +62943,8 @@ function CloseIcon5() {
|
|
|
62606
62943
|
fill: "none",
|
|
62607
62944
|
stroke: "currentColor",
|
|
62608
62945
|
strokeWidth: "2",
|
|
62946
|
+
"aria-hidden": "true",
|
|
62947
|
+
focusable: "false",
|
|
62609
62948
|
children: [
|
|
62610
62949
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
62611
62950
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
@@ -63687,7 +64026,10 @@ function ModelSelector({
|
|
|
63687
64026
|
justifyContent: "space-between",
|
|
63688
64027
|
cursor: disabled2 ? "not-allowed" : "pointer",
|
|
63689
64028
|
opacity: disabled2 ? 0.5 : 1,
|
|
63690
|
-
padding: compact ? "0.5rem 0.75rem" : "0.75rem 1rem"
|
|
64029
|
+
padding: compact ? "0.5rem 0.75rem" : "0.75rem 1rem",
|
|
64030
|
+
textAlign: "left",
|
|
64031
|
+
font: "inherit",
|
|
64032
|
+
color: "inherit"
|
|
63691
64033
|
});
|
|
63692
64034
|
const dropdownStyles = {
|
|
63693
64035
|
position: "absolute",
|
|
@@ -63740,18 +64082,14 @@ function ModelSelector({
|
|
|
63740
64082
|
});
|
|
63741
64083
|
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { ref: containerRef, style: containerStyles, className, children: [
|
|
63742
64084
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
63743
|
-
"
|
|
64085
|
+
"button",
|
|
63744
64086
|
{
|
|
64087
|
+
type: "button",
|
|
63745
64088
|
style: triggerStyles,
|
|
63746
64089
|
onClick: () => !disabled2 && setIsOpen(!isOpen),
|
|
63747
|
-
|
|
63748
|
-
|
|
63749
|
-
|
|
63750
|
-
if (e2.key === "Enter" || e2.key === " ") {
|
|
63751
|
-
e2.preventDefault();
|
|
63752
|
-
if (!disabled2) setIsOpen(!isOpen);
|
|
63753
|
-
}
|
|
63754
|
-
},
|
|
64090
|
+
disabled: disabled2,
|
|
64091
|
+
"aria-haspopup": "listbox",
|
|
64092
|
+
"aria-expanded": isOpen,
|
|
63755
64093
|
children: [
|
|
63756
64094
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
63757
64095
|
"div",
|
|
@@ -63799,7 +64137,7 @@ function ModelSelector({
|
|
|
63799
64137
|
style: searchInputStyles
|
|
63800
64138
|
}
|
|
63801
64139
|
),
|
|
63802
|
-
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { style: listStyles, onScroll: handleScroll, children: [
|
|
64140
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { role: "listbox", style: listStyles, onScroll: handleScroll, children: [
|
|
63803
64141
|
error2 && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
63804
64142
|
"div",
|
|
63805
64143
|
{
|
|
@@ -63819,9 +64157,19 @@ function ModelSelector({
|
|
|
63819
64157
|
}
|
|
63820
64158
|
),
|
|
63821
64159
|
models.map((model) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
63822
|
-
"
|
|
64160
|
+
"button",
|
|
63823
64161
|
{
|
|
63824
|
-
|
|
64162
|
+
type: "button",
|
|
64163
|
+
role: "option",
|
|
64164
|
+
"aria-selected": model.id === value,
|
|
64165
|
+
style: {
|
|
64166
|
+
...itemStyles(model.id === value),
|
|
64167
|
+
textAlign: "left",
|
|
64168
|
+
font: "inherit",
|
|
64169
|
+
color: "inherit",
|
|
64170
|
+
width: "100%",
|
|
64171
|
+
cursor: "pointer"
|
|
64172
|
+
},
|
|
63825
64173
|
onClick: () => handleSelect(model),
|
|
63826
64174
|
onMouseEnter: (e2) => {
|
|
63827
64175
|
if (model.id !== value) {
|
|
@@ -63928,6 +64276,8 @@ function ChevronIcon2({ direction }) {
|
|
|
63928
64276
|
strokeLinecap: "round",
|
|
63929
64277
|
strokeLinejoin: "round",
|
|
63930
64278
|
style: { transform: direction === "up" ? "rotate(180deg)" : void 0 },
|
|
64279
|
+
"aria-hidden": "true",
|
|
64280
|
+
focusable: "false",
|
|
63931
64281
|
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
63932
64282
|
}
|
|
63933
64283
|
);
|
|
@@ -63984,12 +64334,26 @@ function ModelCard({
|
|
|
63984
64334
|
textTransform: "uppercase",
|
|
63985
64335
|
letterSpacing: "0.05em"
|
|
63986
64336
|
});
|
|
64337
|
+
const CardTag = onSelect ? "button" : "div";
|
|
64338
|
+
const cardInteractiveProps = onSelect ? {
|
|
64339
|
+
type: "button",
|
|
64340
|
+
onClick: onSelect,
|
|
64341
|
+
"aria-pressed": selected
|
|
64342
|
+
} : {};
|
|
63987
64343
|
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
63988
|
-
|
|
64344
|
+
CardTag,
|
|
63989
64345
|
{
|
|
63990
|
-
|
|
64346
|
+
...cardInteractiveProps,
|
|
64347
|
+
style: {
|
|
64348
|
+
...cardStyles,
|
|
64349
|
+
...onSelect ? {
|
|
64350
|
+
textAlign: "left",
|
|
64351
|
+
font: "inherit",
|
|
64352
|
+
color: "inherit",
|
|
64353
|
+
width: "100%"
|
|
64354
|
+
} : {}
|
|
64355
|
+
},
|
|
63991
64356
|
className,
|
|
63992
|
-
onClick: onSelect,
|
|
63993
64357
|
onMouseEnter: (e2) => {
|
|
63994
64358
|
if (onSelect && !selected) {
|
|
63995
64359
|
e2.currentTarget.style.borderColor = theme.colorPrimary;
|
|
@@ -64216,6 +64580,7 @@ function ModelGrid({
|
|
|
64216
64580
|
}
|
|
64217
64581
|
|
|
64218
64582
|
// src/react/ui/newsletter-form.tsx
|
|
64583
|
+
var import_contract = require("@sylphx/contract");
|
|
64219
64584
|
var import_react128 = require("react");
|
|
64220
64585
|
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
64221
64586
|
function NewsletterForm({
|
|
@@ -64264,7 +64629,7 @@ function NewsletterForm({
|
|
|
64264
64629
|
const handleSubmit = async (e2) => {
|
|
64265
64630
|
e2.preventDefault();
|
|
64266
64631
|
setLocalError(null);
|
|
64267
|
-
if (!email ||
|
|
64632
|
+
if (!email || !import_contract.EMAIL_REGEX.test(email)) {
|
|
64268
64633
|
setLocalError("Please enter a valid email address");
|
|
64269
64634
|
return;
|
|
64270
64635
|
}
|
|
@@ -64294,6 +64659,8 @@ function NewsletterForm({
|
|
|
64294
64659
|
fill: "none",
|
|
64295
64660
|
stroke: "currentColor",
|
|
64296
64661
|
strokeWidth: "2",
|
|
64662
|
+
"aria-hidden": "true",
|
|
64663
|
+
focusable: "false",
|
|
64297
64664
|
children: [
|
|
64298
64665
|
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
64299
64666
|
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
@@ -64683,6 +65050,8 @@ function BellOffIcon({ size: size4 = 24 }) {
|
|
|
64683
65050
|
strokeLinecap: "round",
|
|
64684
65051
|
strokeLinejoin: "round",
|
|
64685
65052
|
style: { flexShrink: 0 },
|
|
65053
|
+
"aria-hidden": "true",
|
|
65054
|
+
focusable: "false",
|
|
64686
65055
|
children: [
|
|
64687
65056
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" }),
|
|
64688
65057
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("path", { d: "M18.63 13A17.89 17.89 0 0 1 18 8" }),
|
|
@@ -64714,6 +65083,9 @@ function OrganizationProfileInner({
|
|
|
64714
65083
|
const hookResult = useOrganization();
|
|
64715
65084
|
const org = propOrg ?? hookResult.organization;
|
|
64716
65085
|
const members = hookResult.members;
|
|
65086
|
+
const nameId = (0, import_react130.useId)();
|
|
65087
|
+
const slugId = (0, import_react130.useId)();
|
|
65088
|
+
const deleteConfirmId = (0, import_react130.useId)();
|
|
64717
65089
|
const [name, setName] = (0, import_react130.useState)(org?.name ?? "");
|
|
64718
65090
|
const [slug, setSlug] = (0, import_react130.useState)(org?.slug ?? "");
|
|
64719
65091
|
const [isSaving, setIsSaving] = (0, import_react130.useState)(false);
|
|
@@ -64815,6 +65187,7 @@ function OrganizationProfileInner({
|
|
|
64815
65187
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
64816
65188
|
"label",
|
|
64817
65189
|
{
|
|
65190
|
+
htmlFor: nameId,
|
|
64818
65191
|
style: {
|
|
64819
65192
|
display: "block",
|
|
64820
65193
|
marginBottom: "0.5rem",
|
|
@@ -64827,6 +65200,7 @@ function OrganizationProfileInner({
|
|
|
64827
65200
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
64828
65201
|
"input",
|
|
64829
65202
|
{
|
|
65203
|
+
id: nameId,
|
|
64830
65204
|
type: "text",
|
|
64831
65205
|
value: name,
|
|
64832
65206
|
onChange: (e2) => setName(e2.target.value),
|
|
@@ -64840,6 +65214,7 @@ function OrganizationProfileInner({
|
|
|
64840
65214
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
64841
65215
|
"label",
|
|
64842
65216
|
{
|
|
65217
|
+
htmlFor: slugId,
|
|
64843
65218
|
style: {
|
|
64844
65219
|
display: "block",
|
|
64845
65220
|
marginBottom: "0.5rem",
|
|
@@ -64852,6 +65227,7 @@ function OrganizationProfileInner({
|
|
|
64852
65227
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
64853
65228
|
"input",
|
|
64854
65229
|
{
|
|
65230
|
+
id: slugId,
|
|
64855
65231
|
type: "text",
|
|
64856
65232
|
value: slug,
|
|
64857
65233
|
onChange: (e2) => setSlug(e2.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "")),
|
|
@@ -65030,6 +65406,7 @@ function OrganizationProfileInner({
|
|
|
65030
65406
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
65031
65407
|
"label",
|
|
65032
65408
|
{
|
|
65409
|
+
htmlFor: deleteConfirmId,
|
|
65033
65410
|
style: {
|
|
65034
65411
|
display: "block",
|
|
65035
65412
|
marginBottom: "0.5rem",
|
|
@@ -65045,6 +65422,7 @@ function OrganizationProfileInner({
|
|
|
65045
65422
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
65046
65423
|
"input",
|
|
65047
65424
|
{
|
|
65425
|
+
id: deleteConfirmId,
|
|
65048
65426
|
type: "text",
|
|
65049
65427
|
value: deleteConfirm,
|
|
65050
65428
|
onChange: (e2) => setDeleteConfirm(e2.target.value),
|
|
@@ -65079,6 +65457,8 @@ function CreateOrganization({
|
|
|
65079
65457
|
onCancel,
|
|
65080
65458
|
showCancel = true
|
|
65081
65459
|
}) {
|
|
65460
|
+
const createNameId = (0, import_react130.useId)();
|
|
65461
|
+
const createSlugId = (0, import_react130.useId)();
|
|
65082
65462
|
const [name, setName] = (0, import_react130.useState)("");
|
|
65083
65463
|
const [slug, setSlug] = (0, import_react130.useState)("");
|
|
65084
65464
|
const [isCreating, setIsCreating] = (0, import_react130.useState)(false);
|
|
@@ -65161,6 +65541,7 @@ function CreateOrganization({
|
|
|
65161
65541
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
65162
65542
|
"label",
|
|
65163
65543
|
{
|
|
65544
|
+
htmlFor: createNameId,
|
|
65164
65545
|
style: {
|
|
65165
65546
|
display: "block",
|
|
65166
65547
|
marginBottom: "0.5rem",
|
|
@@ -65173,6 +65554,7 @@ function CreateOrganization({
|
|
|
65173
65554
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
65174
65555
|
"input",
|
|
65175
65556
|
{
|
|
65557
|
+
id: createNameId,
|
|
65176
65558
|
type: "text",
|
|
65177
65559
|
value: name,
|
|
65178
65560
|
onChange: (e2) => setName(e2.target.value),
|
|
@@ -65186,6 +65568,7 @@ function CreateOrganization({
|
|
|
65186
65568
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
65187
65569
|
"label",
|
|
65188
65570
|
{
|
|
65571
|
+
htmlFor: createSlugId,
|
|
65189
65572
|
style: {
|
|
65190
65573
|
display: "block",
|
|
65191
65574
|
marginBottom: "0.5rem",
|
|
@@ -65198,6 +65581,7 @@ function CreateOrganization({
|
|
|
65198
65581
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
65199
65582
|
"input",
|
|
65200
65583
|
{
|
|
65584
|
+
id: createSlugId,
|
|
65201
65585
|
type: "text",
|
|
65202
65586
|
value: slug,
|
|
65203
65587
|
onChange: (e2) => setSlug(e2.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "")),
|
|
@@ -65298,16 +65682,15 @@ function OrganizationList({
|
|
|
65298
65682
|
}
|
|
65299
65683
|
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
65300
65684
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: organizations.map((org) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
65301
|
-
"
|
|
65685
|
+
"button",
|
|
65302
65686
|
{
|
|
65687
|
+
type: "button",
|
|
65303
65688
|
onClick: () => onSelect?.(org),
|
|
65304
|
-
style:
|
|
65305
|
-
|
|
65306
|
-
|
|
65307
|
-
|
|
65308
|
-
|
|
65309
|
-
onSelect?.(org);
|
|
65310
|
-
}
|
|
65689
|
+
style: {
|
|
65690
|
+
...itemStyle(org.id === selectedId),
|
|
65691
|
+
textAlign: "left",
|
|
65692
|
+
font: "inherit",
|
|
65693
|
+
color: "inherit"
|
|
65311
65694
|
},
|
|
65312
65695
|
children: [
|
|
65313
65696
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
@@ -65378,6 +65761,8 @@ function OrgIcon({ color: color2, size: size4 = 24 }) {
|
|
|
65378
65761
|
strokeWidth: "2",
|
|
65379
65762
|
strokeLinecap: "round",
|
|
65380
65763
|
strokeLinejoin: "round",
|
|
65764
|
+
"aria-hidden": "true",
|
|
65765
|
+
focusable: "false",
|
|
65381
65766
|
children: [
|
|
65382
65767
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
65383
65768
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
|
|
@@ -65399,6 +65784,8 @@ function CheckIcon13({ color: color2 }) {
|
|
|
65399
65784
|
strokeWidth: "2",
|
|
65400
65785
|
strokeLinecap: "round",
|
|
65401
65786
|
strokeLinejoin: "round",
|
|
65787
|
+
"aria-hidden": "true",
|
|
65788
|
+
focusable: "false",
|
|
65402
65789
|
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
65403
65790
|
}
|
|
65404
65791
|
);
|
|
@@ -65416,6 +65803,8 @@ function PlusIcon5({ color: color2 }) {
|
|
|
65416
65803
|
strokeLinecap: "round",
|
|
65417
65804
|
strokeLinejoin: "round",
|
|
65418
65805
|
style: { marginRight: "0.25rem" },
|
|
65806
|
+
"aria-hidden": "true",
|
|
65807
|
+
focusable: "false",
|
|
65419
65808
|
children: [
|
|
65420
65809
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
65421
65810
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
@@ -65664,8 +66053,12 @@ function NotificationBell({
|
|
|
65664
66053
|
onClick,
|
|
65665
66054
|
style: buttonStyle,
|
|
65666
66055
|
className,
|
|
65667
|
-
onMouseEnter: (e2) =>
|
|
65668
|
-
|
|
66056
|
+
onMouseEnter: (e2) => {
|
|
66057
|
+
e2.currentTarget.style.backgroundColor = theme.colorMuted;
|
|
66058
|
+
},
|
|
66059
|
+
onMouseLeave: (e2) => {
|
|
66060
|
+
e2.currentTarget.style.backgroundColor = "transparent";
|
|
66061
|
+
},
|
|
65669
66062
|
children: [
|
|
65670
66063
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(BellIcon, { color: color2 || theme.colorForeground, size: s2.icon }),
|
|
65671
66064
|
count > 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { style: badgeStyle, children: showDot ? null : displayCount })
|
|
@@ -65783,12 +66176,12 @@ function NotificationItem({
|
|
|
65783
66176
|
const styles2 = baseStyles(theme);
|
|
65784
66177
|
const [showActions, setShowActions] = (0, import_react131.useState)(false);
|
|
65785
66178
|
const itemStyle = {
|
|
66179
|
+
position: "relative",
|
|
65786
66180
|
display: "flex",
|
|
65787
66181
|
alignItems: "flex-start",
|
|
65788
66182
|
gap: "0.75rem",
|
|
65789
66183
|
padding: "0.75rem 1rem",
|
|
65790
66184
|
borderBottom: `1px solid ${theme.colorBorder}`,
|
|
65791
|
-
cursor: "pointer",
|
|
65792
66185
|
transition: "background-color 0.15s ease",
|
|
65793
66186
|
backgroundColor: notification.read ? "transparent" : `${theme.colorPrimary}08`
|
|
65794
66187
|
};
|
|
@@ -65805,141 +66198,167 @@ function NotificationItem({
|
|
|
65805
66198
|
if (days < 7) return `${days}d ago`;
|
|
65806
66199
|
return d2.toLocaleDateString();
|
|
65807
66200
|
};
|
|
65808
|
-
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
65809
|
-
|
|
65810
|
-
|
|
65811
|
-
|
|
65812
|
-
|
|
65813
|
-
|
|
65814
|
-
|
|
65815
|
-
setShowActions(true)
|
|
65816
|
-
|
|
65817
|
-
|
|
65818
|
-
|
|
65819
|
-
|
|
65820
|
-
|
|
65821
|
-
|
|
66201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "sylphx-notification-item", style: itemStyle, children: [
|
|
66202
|
+
onClick && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66203
|
+
"button",
|
|
66204
|
+
{
|
|
66205
|
+
type: "button",
|
|
66206
|
+
onClick,
|
|
66207
|
+
"aria-label": notification.title,
|
|
66208
|
+
onMouseEnter: () => setShowActions(true),
|
|
66209
|
+
onMouseLeave: () => setShowActions(false),
|
|
66210
|
+
onFocus: () => setShowActions(true),
|
|
66211
|
+
onBlur: () => setShowActions(false),
|
|
66212
|
+
style: {
|
|
66213
|
+
position: "absolute",
|
|
66214
|
+
inset: 0,
|
|
66215
|
+
background: "transparent",
|
|
66216
|
+
border: "none",
|
|
66217
|
+
padding: 0,
|
|
66218
|
+
cursor: "pointer",
|
|
66219
|
+
zIndex: 1
|
|
66220
|
+
}
|
|
66221
|
+
}
|
|
66222
|
+
),
|
|
66223
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66224
|
+
"div",
|
|
66225
|
+
{
|
|
66226
|
+
style: {
|
|
66227
|
+
width: "40px",
|
|
66228
|
+
height: "40px",
|
|
66229
|
+
borderRadius: "50%",
|
|
66230
|
+
backgroundColor: theme.colorMuted,
|
|
66231
|
+
display: "flex",
|
|
66232
|
+
alignItems: "center",
|
|
66233
|
+
justifyContent: "center",
|
|
66234
|
+
flexShrink: 0,
|
|
66235
|
+
overflow: "hidden"
|
|
66236
|
+
},
|
|
66237
|
+
children: notification.icon ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66238
|
+
"img",
|
|
66239
|
+
{
|
|
66240
|
+
src: notification.icon,
|
|
66241
|
+
alt: "",
|
|
66242
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
66243
|
+
}
|
|
66244
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(BellIcon, { color: theme.colorMutedForeground, size: 20 })
|
|
66245
|
+
}
|
|
66246
|
+
),
|
|
66247
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
66248
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
65822
66249
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
65823
|
-
"
|
|
66250
|
+
"span",
|
|
65824
66251
|
{
|
|
65825
66252
|
style: {
|
|
65826
|
-
|
|
65827
|
-
|
|
65828
|
-
|
|
65829
|
-
|
|
65830
|
-
|
|
65831
|
-
alignItems: "center",
|
|
65832
|
-
justifyContent: "center",
|
|
65833
|
-
flexShrink: 0,
|
|
65834
|
-
overflow: "hidden"
|
|
66253
|
+
fontWeight: notification.read ? 400 : 600,
|
|
66254
|
+
fontSize: theme.fontSizeSm,
|
|
66255
|
+
overflow: "hidden",
|
|
66256
|
+
textOverflow: "ellipsis",
|
|
66257
|
+
whiteSpace: "nowrap"
|
|
65835
66258
|
},
|
|
65836
|
-
children: notification.
|
|
65837
|
-
"img",
|
|
65838
|
-
{
|
|
65839
|
-
src: notification.icon,
|
|
65840
|
-
alt: "",
|
|
65841
|
-
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
65842
|
-
}
|
|
65843
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(BellIcon, { color: theme.colorMutedForeground, size: 20 })
|
|
66259
|
+
children: notification.title
|
|
65844
66260
|
}
|
|
65845
66261
|
),
|
|
65846
|
-
/* @__PURE__ */ (0, import_jsx_runtime146.
|
|
65847
|
-
|
|
65848
|
-
|
|
65849
|
-
|
|
65850
|
-
|
|
65851
|
-
|
|
65852
|
-
|
|
65853
|
-
|
|
65854
|
-
|
|
65855
|
-
|
|
65856
|
-
|
|
65857
|
-
|
|
65858
|
-
|
|
65859
|
-
|
|
65860
|
-
|
|
65861
|
-
|
|
65862
|
-
|
|
65863
|
-
|
|
65864
|
-
|
|
65865
|
-
|
|
65866
|
-
|
|
65867
|
-
|
|
65868
|
-
|
|
65869
|
-
|
|
65870
|
-
|
|
65871
|
-
|
|
65872
|
-
|
|
65873
|
-
|
|
65874
|
-
|
|
65875
|
-
|
|
66262
|
+
!notification.read && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66263
|
+
"span",
|
|
66264
|
+
{
|
|
66265
|
+
style: {
|
|
66266
|
+
width: "8px",
|
|
66267
|
+
height: "8px",
|
|
66268
|
+
borderRadius: "50%",
|
|
66269
|
+
backgroundColor: theme.colorPrimary,
|
|
66270
|
+
flexShrink: 0
|
|
66271
|
+
}
|
|
66272
|
+
}
|
|
66273
|
+
)
|
|
66274
|
+
] }),
|
|
66275
|
+
notification.body && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66276
|
+
"p",
|
|
66277
|
+
{
|
|
66278
|
+
style: {
|
|
66279
|
+
margin: "0.25rem 0 0",
|
|
66280
|
+
fontSize: theme.fontSizeXs,
|
|
66281
|
+
color: theme.colorMutedForeground,
|
|
66282
|
+
overflow: "hidden",
|
|
66283
|
+
textOverflow: "ellipsis",
|
|
66284
|
+
whiteSpace: "nowrap"
|
|
66285
|
+
},
|
|
66286
|
+
children: notification.body
|
|
66287
|
+
}
|
|
66288
|
+
),
|
|
66289
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66290
|
+
"p",
|
|
66291
|
+
{
|
|
66292
|
+
style: {
|
|
66293
|
+
margin: "0.25rem 0 0",
|
|
66294
|
+
fontSize: theme.fontSizeXs,
|
|
66295
|
+
color: theme.colorMutedForeground
|
|
66296
|
+
},
|
|
66297
|
+
children: formatTime(notification.createdAt)
|
|
66298
|
+
}
|
|
66299
|
+
)
|
|
66300
|
+
] }),
|
|
66301
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
66302
|
+
"div",
|
|
66303
|
+
{
|
|
66304
|
+
style: {
|
|
66305
|
+
display: "flex",
|
|
66306
|
+
gap: "0.25rem",
|
|
66307
|
+
flexShrink: 0,
|
|
66308
|
+
position: "relative",
|
|
66309
|
+
zIndex: 2
|
|
66310
|
+
},
|
|
66311
|
+
role: "toolbar",
|
|
66312
|
+
"aria-label": "Notification actions",
|
|
66313
|
+
children: [
|
|
66314
|
+
!notification.read && onMarkAsRead && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66315
|
+
"button",
|
|
65876
66316
|
{
|
|
65877
|
-
|
|
65878
|
-
|
|
65879
|
-
|
|
65880
|
-
|
|
65881
|
-
|
|
65882
|
-
|
|
65883
|
-
|
|
65884
|
-
},
|
|
65885
|
-
children: notification.body
|
|
66317
|
+
type: "button",
|
|
66318
|
+
onClick: onMarkAsRead,
|
|
66319
|
+
style: mergeStyles(styles2.button, styles2.buttonGhost, {
|
|
66320
|
+
padding: "0.25rem"
|
|
66321
|
+
}),
|
|
66322
|
+
title: "Mark as read",
|
|
66323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CheckIcon14, { color: theme.colorMutedForeground })
|
|
65886
66324
|
}
|
|
65887
66325
|
),
|
|
65888
|
-
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
65889
|
-
"
|
|
66326
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66327
|
+
"button",
|
|
65890
66328
|
{
|
|
65891
|
-
|
|
65892
|
-
|
|
65893
|
-
|
|
65894
|
-
|
|
65895
|
-
},
|
|
65896
|
-
|
|
66329
|
+
type: "button",
|
|
66330
|
+
onClick: onDelete,
|
|
66331
|
+
style: mergeStyles(styles2.button, styles2.buttonGhost, {
|
|
66332
|
+
padding: "0.25rem"
|
|
66333
|
+
}),
|
|
66334
|
+
title: "Delete",
|
|
66335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TrashIcon3, { color: theme.colorMutedForeground })
|
|
65897
66336
|
}
|
|
65898
66337
|
)
|
|
65899
|
-
]
|
|
65900
|
-
|
|
65901
|
-
|
|
65902
|
-
|
|
65903
|
-
|
|
65904
|
-
|
|
65905
|
-
|
|
65906
|
-
|
|
65907
|
-
|
|
65908
|
-
|
|
65909
|
-
|
|
65910
|
-
|
|
65911
|
-
|
|
65912
|
-
|
|
65913
|
-
|
|
65914
|
-
|
|
65915
|
-
|
|
65916
|
-
|
|
65917
|
-
|
|
65918
|
-
|
|
65919
|
-
"button",
|
|
65920
|
-
{
|
|
65921
|
-
type: "button",
|
|
65922
|
-
onClick: onDelete,
|
|
65923
|
-
style: mergeStyles(styles2.button, styles2.buttonGhost, {
|
|
65924
|
-
padding: "0.25rem"
|
|
65925
|
-
}),
|
|
65926
|
-
title: "Delete",
|
|
65927
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TrashIcon3, { color: theme.colorMutedForeground })
|
|
65928
|
-
}
|
|
65929
|
-
)
|
|
65930
|
-
]
|
|
65931
|
-
}
|
|
65932
|
-
)
|
|
66338
|
+
]
|
|
66339
|
+
}
|
|
66340
|
+
)
|
|
66341
|
+
] });
|
|
66342
|
+
}
|
|
66343
|
+
function BellIcon({ color: color2, size: size4 = 24 }) {
|
|
66344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
66345
|
+
"svg",
|
|
66346
|
+
{
|
|
66347
|
+
width: size4,
|
|
66348
|
+
height: size4,
|
|
66349
|
+
viewBox: "0 0 24 24",
|
|
66350
|
+
fill: "none",
|
|
66351
|
+
stroke: color2,
|
|
66352
|
+
strokeWidth: "2",
|
|
66353
|
+
"aria-hidden": "true",
|
|
66354
|
+
focusable: "false",
|
|
66355
|
+
children: [
|
|
66356
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }),
|
|
66357
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M13.73 21a2 2 0 01-3.46 0" })
|
|
65933
66358
|
]
|
|
65934
66359
|
}
|
|
65935
66360
|
);
|
|
65936
66361
|
}
|
|
65937
|
-
function BellIcon({ color: color2, size: size4 = 24 }) {
|
|
65938
|
-
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("svg", { width: size4, height: size4, viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
|
|
65939
|
-
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }),
|
|
65940
|
-
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M13.73 21a2 2 0 01-3.46 0" })
|
|
65941
|
-
] });
|
|
65942
|
-
}
|
|
65943
66362
|
function BellOffIcon2({ color: color2, size: size4 = 40 }) {
|
|
65944
66363
|
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
65945
66364
|
"svg",
|
|
@@ -65950,6 +66369,8 @@ function BellOffIcon2({ color: color2, size: size4 = 40 }) {
|
|
|
65950
66369
|
fill: "none",
|
|
65951
66370
|
stroke: color2,
|
|
65952
66371
|
strokeWidth: "1.5",
|
|
66372
|
+
"aria-hidden": "true",
|
|
66373
|
+
focusable: "false",
|
|
65953
66374
|
children: [
|
|
65954
66375
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M8.56 2.9A7 7 0 0119 9v4m-2 4H2s3-2 3-9a4.67 4.67 0 01.3-1.7" }),
|
|
65955
66376
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M13.73 21a2 2 0 01-3.46 0" }),
|
|
@@ -65959,13 +66380,39 @@ function BellOffIcon2({ color: color2, size: size4 = 40 }) {
|
|
|
65959
66380
|
);
|
|
65960
66381
|
}
|
|
65961
66382
|
function CheckIcon14({ color: color2 }) {
|
|
65962
|
-
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
66384
|
+
"svg",
|
|
66385
|
+
{
|
|
66386
|
+
width: "16",
|
|
66387
|
+
height: "16",
|
|
66388
|
+
viewBox: "0 0 24 24",
|
|
66389
|
+
fill: "none",
|
|
66390
|
+
stroke: color2,
|
|
66391
|
+
strokeWidth: "2",
|
|
66392
|
+
"aria-hidden": "true",
|
|
66393
|
+
focusable: "false",
|
|
66394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
66395
|
+
}
|
|
66396
|
+
);
|
|
65963
66397
|
}
|
|
65964
66398
|
function TrashIcon3({ color: color2 }) {
|
|
65965
|
-
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
65966
|
-
|
|
65967
|
-
|
|
65968
|
-
|
|
66399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
66400
|
+
"svg",
|
|
66401
|
+
{
|
|
66402
|
+
width: "16",
|
|
66403
|
+
height: "16",
|
|
66404
|
+
viewBox: "0 0 24 24",
|
|
66405
|
+
fill: "none",
|
|
66406
|
+
stroke: color2,
|
|
66407
|
+
strokeWidth: "2",
|
|
66408
|
+
"aria-hidden": "true",
|
|
66409
|
+
focusable: "false",
|
|
66410
|
+
children: [
|
|
66411
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("polyline", { points: "3 6 5 6 21 6" }),
|
|
66412
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("path", { d: "M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2" })
|
|
66413
|
+
]
|
|
66414
|
+
}
|
|
66415
|
+
);
|
|
65969
66416
|
}
|
|
65970
66417
|
|
|
65971
66418
|
// src/react/ui/referral-card.tsx
|
|
@@ -65997,6 +66444,7 @@ function ReferralCardInner({
|
|
|
65997
66444
|
regenerateCode
|
|
65998
66445
|
} = useReferral();
|
|
65999
66446
|
const styles2 = baseStyles(theme);
|
|
66447
|
+
const linkId = (0, import_react132.useId)();
|
|
66000
66448
|
const [copied, setCopied] = (0, import_react132.useState)(null);
|
|
66001
66449
|
const [isRegenerating, setIsRegenerating] = (0, import_react132.useState)(false);
|
|
66002
66450
|
const [error2, setError] = (0, import_react132.useState)(null);
|
|
@@ -66091,11 +66539,12 @@ function ReferralCardInner({
|
|
|
66091
66539
|
] }),
|
|
66092
66540
|
(error2 || referralError) && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { style: mergeStyles(styles2.alert, styles2.alertError, styles2.mb4), children: error2 || referralError?.message }),
|
|
66093
66541
|
link && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { style: { marginBottom: "1.5rem" }, children: [
|
|
66094
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("label", { style: styles2.label, children: "Your Referral Link" }),
|
|
66542
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("label", { htmlFor: linkId, style: styles2.label, children: "Your Referral Link" }),
|
|
66095
66543
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { style: mergeStyles(styles2.flexRow, { gap: "0.5rem" }), children: [
|
|
66096
66544
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
66097
66545
|
"input",
|
|
66098
66546
|
{
|
|
66547
|
+
id: linkId,
|
|
66099
66548
|
type: "text",
|
|
66100
66549
|
value: link,
|
|
66101
66550
|
readOnly: true,
|
|
@@ -66126,8 +66575,8 @@ function ReferralCardInner({
|
|
|
66126
66575
|
)
|
|
66127
66576
|
] })
|
|
66128
66577
|
] }),
|
|
66129
|
-
code && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("
|
|
66130
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("
|
|
66578
|
+
code && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("fieldset", { style: { marginBottom: "1.5rem", border: "none", padding: 0, margin: 0 }, children: [
|
|
66579
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("legend", { style: mergeStyles(styles2.label, { padding: 0 }), children: "Your Referral Code" }),
|
|
66131
66580
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { style: mergeStyles(styles2.flexRow, { gap: "0.5rem" }), children: [
|
|
66132
66581
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
66133
66582
|
"div",
|
|
@@ -66240,8 +66689,8 @@ function ReferralCardInner({
|
|
|
66240
66689
|
]
|
|
66241
66690
|
}
|
|
66242
66691
|
) }),
|
|
66243
|
-
showShare && link && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("
|
|
66244
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("
|
|
66692
|
+
showShare && link && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("fieldset", { style: { border: "none", padding: 0, margin: 0 }, children: [
|
|
66693
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("legend", { style: mergeStyles(styles2.label, { padding: 0 }), children: "Share via" }),
|
|
66245
66694
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
66246
66695
|
"div",
|
|
66247
66696
|
{
|
|
@@ -66310,6 +66759,8 @@ function CopyIcon2({ size: size4 = 24 }) {
|
|
|
66310
66759
|
strokeWidth: "2",
|
|
66311
66760
|
strokeLinecap: "round",
|
|
66312
66761
|
strokeLinejoin: "round",
|
|
66762
|
+
"aria-hidden": "true",
|
|
66763
|
+
focusable: "false",
|
|
66313
66764
|
children: [
|
|
66314
66765
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
66315
66766
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
@@ -66329,6 +66780,8 @@ function CheckIcon15({ size: size4 = 24 }) {
|
|
|
66329
66780
|
strokeWidth: "2",
|
|
66330
66781
|
strokeLinecap: "round",
|
|
66331
66782
|
strokeLinejoin: "round",
|
|
66783
|
+
"aria-hidden": "true",
|
|
66784
|
+
focusable: "false",
|
|
66332
66785
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
66333
66786
|
}
|
|
66334
66787
|
);
|
|
@@ -66345,6 +66798,8 @@ function RefreshIcon2({ size: size4 = 24 }) {
|
|
|
66345
66798
|
strokeWidth: "2",
|
|
66346
66799
|
strokeLinecap: "round",
|
|
66347
66800
|
strokeLinejoin: "round",
|
|
66801
|
+
"aria-hidden": "true",
|
|
66802
|
+
focusable: "false",
|
|
66348
66803
|
children: [
|
|
66349
66804
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
66350
66805
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M21 3v5h-5" }),
|
|
@@ -66366,6 +66821,8 @@ function GiftIcon({ color: color2 }) {
|
|
|
66366
66821
|
strokeWidth: "2",
|
|
66367
66822
|
strokeLinecap: "round",
|
|
66368
66823
|
strokeLinejoin: "round",
|
|
66824
|
+
"aria-hidden": "true",
|
|
66825
|
+
focusable: "false",
|
|
66369
66826
|
children: [
|
|
66370
66827
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("polyline", { points: "20 12 20 22 4 22 4 12" }),
|
|
66371
66828
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("rect", { x: "2", y: "7", width: "20", height: "5" }),
|
|
@@ -66377,10 +66834,32 @@ function GiftIcon({ color: color2 }) {
|
|
|
66377
66834
|
);
|
|
66378
66835
|
}
|
|
66379
66836
|
function TwitterIcon2({ size: size4 = 24 }) {
|
|
66380
|
-
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
66837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
66838
|
+
"svg",
|
|
66839
|
+
{
|
|
66840
|
+
width: size4,
|
|
66841
|
+
height: size4,
|
|
66842
|
+
viewBox: "0 0 24 24",
|
|
66843
|
+
fill: "currentColor",
|
|
66844
|
+
"aria-hidden": "true",
|
|
66845
|
+
focusable: "false",
|
|
66846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
|
|
66847
|
+
}
|
|
66848
|
+
);
|
|
66381
66849
|
}
|
|
66382
66850
|
function LinkedInIcon2({ size: size4 = 24 }) {
|
|
66383
|
-
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
66851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
66852
|
+
"svg",
|
|
66853
|
+
{
|
|
66854
|
+
width: size4,
|
|
66855
|
+
height: size4,
|
|
66856
|
+
viewBox: "0 0 24 24",
|
|
66857
|
+
fill: "currentColor",
|
|
66858
|
+
"aria-hidden": "true",
|
|
66859
|
+
focusable: "false",
|
|
66860
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
|
|
66861
|
+
}
|
|
66862
|
+
);
|
|
66384
66863
|
}
|
|
66385
66864
|
function EmailIcon({ size: size4 = 24 }) {
|
|
66386
66865
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
@@ -66394,6 +66873,8 @@ function EmailIcon({ size: size4 = 24 }) {
|
|
|
66394
66873
|
strokeWidth: "2",
|
|
66395
66874
|
strokeLinecap: "round",
|
|
66396
66875
|
strokeLinejoin: "round",
|
|
66876
|
+
"aria-hidden": "true",
|
|
66877
|
+
focusable: "false",
|
|
66397
66878
|
children: [
|
|
66398
66879
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
|
|
66399
66880
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("polyline", { points: "22,6 12,13 2,6" })
|
|
@@ -66421,6 +66902,10 @@ function SecuritySettings({
|
|
|
66421
66902
|
const securityContext = useSecurityContext();
|
|
66422
66903
|
const queryClient = (0, import_react_query12.useQueryClient)();
|
|
66423
66904
|
const styles2 = baseStyles(theme);
|
|
66905
|
+
const verifyCodeId = (0, import_react133.useId)();
|
|
66906
|
+
const currentPasswordId = (0, import_react133.useId)();
|
|
66907
|
+
const newPasswordId = (0, import_react133.useId)();
|
|
66908
|
+
const confirmPasswordId = (0, import_react133.useId)();
|
|
66424
66909
|
const [error2, setError] = (0, import_react133.useState)(null);
|
|
66425
66910
|
const [success, setSuccess] = (0, import_react133.useState)(null);
|
|
66426
66911
|
const [showSetup2FA, setShowSetup2FA] = (0, import_react133.useState)(false);
|
|
@@ -66776,10 +67261,11 @@ function SecuritySettings({
|
|
|
66776
67261
|
] }),
|
|
66777
67262
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("form", { onSubmit: handleEnable2FA, children: [
|
|
66778
67263
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { style: styles2.formGroup, children: [
|
|
66779
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { style: styles2.label, children: "Verification Code" }),
|
|
67264
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { htmlFor: verifyCodeId, style: styles2.label, children: "Verification Code" }),
|
|
66780
67265
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
66781
67266
|
"input",
|
|
66782
67267
|
{
|
|
67268
|
+
id: verifyCodeId,
|
|
66783
67269
|
type: "text",
|
|
66784
67270
|
value: verifyCode,
|
|
66785
67271
|
onChange: (e2) => setVerifyCode(e2.target.value.replace(/\D/g, "").slice(0, 6)),
|
|
@@ -66863,10 +67349,11 @@ function SecuritySettings({
|
|
|
66863
67349
|
},
|
|
66864
67350
|
children: [
|
|
66865
67351
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { style: styles2.formGroup, children: [
|
|
66866
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { style: styles2.label, children: "Current Password" }),
|
|
67352
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { htmlFor: currentPasswordId, style: styles2.label, children: "Current Password" }),
|
|
66867
67353
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
66868
67354
|
"input",
|
|
66869
67355
|
{
|
|
67356
|
+
id: currentPasswordId,
|
|
66870
67357
|
type: "password",
|
|
66871
67358
|
value: currentPassword,
|
|
66872
67359
|
onChange: (e2) => setCurrentPassword(e2.target.value),
|
|
@@ -66876,10 +67363,11 @@ function SecuritySettings({
|
|
|
66876
67363
|
)
|
|
66877
67364
|
] }),
|
|
66878
67365
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { style: styles2.formGroup, children: [
|
|
66879
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { style: styles2.label, children: "New Password" }),
|
|
67366
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { htmlFor: newPasswordId, style: styles2.label, children: "New Password" }),
|
|
66880
67367
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
66881
67368
|
"input",
|
|
66882
67369
|
{
|
|
67370
|
+
id: newPasswordId,
|
|
66883
67371
|
type: "password",
|
|
66884
67372
|
value: newPassword,
|
|
66885
67373
|
onChange: (e2) => setNewPassword(e2.target.value),
|
|
@@ -66890,10 +67378,11 @@ function SecuritySettings({
|
|
|
66890
67378
|
)
|
|
66891
67379
|
] }),
|
|
66892
67380
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { style: styles2.formGroup, children: [
|
|
66893
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { style: styles2.label, children: "Confirm New Password" }),
|
|
67381
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { htmlFor: confirmPasswordId, style: styles2.label, children: "Confirm New Password" }),
|
|
66894
67382
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
66895
67383
|
"input",
|
|
66896
67384
|
{
|
|
67385
|
+
id: confirmPasswordId,
|
|
66897
67386
|
type: "password",
|
|
66898
67387
|
value: confirmPassword,
|
|
66899
67388
|
onChange: (e2) => setConfirmPassword(e2.target.value),
|
|
@@ -67128,6 +67617,8 @@ function ShieldIcon2({ size: size4 = 24 }) {
|
|
|
67128
67617
|
strokeWidth: "2",
|
|
67129
67618
|
strokeLinecap: "round",
|
|
67130
67619
|
strokeLinejoin: "round",
|
|
67620
|
+
"aria-hidden": "true",
|
|
67621
|
+
focusable: "false",
|
|
67131
67622
|
children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
|
|
67132
67623
|
}
|
|
67133
67624
|
);
|
|
@@ -67146,6 +67637,8 @@ function DeviceIcon({ device, theme }) {
|
|
|
67146
67637
|
strokeWidth: "2",
|
|
67147
67638
|
strokeLinecap: "round",
|
|
67148
67639
|
strokeLinejoin: "round",
|
|
67640
|
+
"aria-hidden": "true",
|
|
67641
|
+
focusable: "false",
|
|
67149
67642
|
children: [
|
|
67150
67643
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2", ry: "2" }),
|
|
67151
67644
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("line", { x1: "12", y1: "18", x2: "12.01", y2: "18" })
|
|
@@ -67164,6 +67657,8 @@ function DeviceIcon({ device, theme }) {
|
|
|
67164
67657
|
strokeWidth: "2",
|
|
67165
67658
|
strokeLinecap: "round",
|
|
67166
67659
|
strokeLinejoin: "round",
|
|
67660
|
+
"aria-hidden": "true",
|
|
67661
|
+
focusable: "false",
|
|
67167
67662
|
children: [
|
|
67168
67663
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }),
|
|
67169
67664
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
@@ -67440,6 +67935,7 @@ function UnsubscribeConfirm({
|
|
|
67440
67935
|
}) {
|
|
67441
67936
|
const { unsubscribe, subscribe } = useNewsletter();
|
|
67442
67937
|
const styles2 = baseStyles(theme);
|
|
67938
|
+
const reasonId = (0, import_react135.useId)();
|
|
67443
67939
|
const [status, setStatus] = (0, import_react135.useState)(() => token ? "pending" : "missing_token");
|
|
67444
67940
|
const [selectedReason, setSelectedReason] = (0, import_react135.useState)("");
|
|
67445
67941
|
const [error2, setError] = (0, import_react135.useState)(null);
|
|
@@ -67498,6 +67994,8 @@ function UnsubscribeConfirm({
|
|
|
67498
67994
|
fill: "none",
|
|
67499
67995
|
stroke: "currentColor",
|
|
67500
67996
|
strokeWidth: "2",
|
|
67997
|
+
"aria-hidden": "true",
|
|
67998
|
+
focusable: "false",
|
|
67501
67999
|
children: [
|
|
67502
68000
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
67503
68001
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
@@ -67532,6 +68030,7 @@ function UnsubscribeConfirm({
|
|
|
67532
68030
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
67533
68031
|
"label",
|
|
67534
68032
|
{
|
|
68033
|
+
htmlFor: reasonId,
|
|
67535
68034
|
style: mergeStyles(styles2.label, {
|
|
67536
68035
|
marginBottom: "0.5rem",
|
|
67537
68036
|
display: "block"
|
|
@@ -67542,6 +68041,7 @@ function UnsubscribeConfirm({
|
|
|
67542
68041
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
|
|
67543
68042
|
"select",
|
|
67544
68043
|
{
|
|
68044
|
+
id: reasonId,
|
|
67545
68045
|
value: selectedReason,
|
|
67546
68046
|
onChange: (e2) => setSelectedReason(e2.target.value),
|
|
67547
68047
|
style: styles2.input,
|
|
@@ -67590,6 +68090,8 @@ function UnsubscribeConfirm({
|
|
|
67590
68090
|
fill: "none",
|
|
67591
68091
|
stroke: "currentColor",
|
|
67592
68092
|
strokeWidth: "2",
|
|
68093
|
+
"aria-hidden": "true",
|
|
68094
|
+
focusable: "false",
|
|
67593
68095
|
children: [
|
|
67594
68096
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
67595
68097
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
@@ -67646,6 +68148,8 @@ function UnsubscribeConfirm({
|
|
|
67646
68148
|
fill: "none",
|
|
67647
68149
|
stroke: "currentColor",
|
|
67648
68150
|
strokeWidth: "2",
|
|
68151
|
+
"aria-hidden": "true",
|
|
68152
|
+
focusable: "false",
|
|
67649
68153
|
children: [
|
|
67650
68154
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
67651
68155
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
@@ -67687,6 +68191,8 @@ function UnsubscribeConfirm({
|
|
|
67687
68191
|
fill: "none",
|
|
67688
68192
|
stroke: "currentColor",
|
|
67689
68193
|
strokeWidth: "2",
|
|
68194
|
+
"aria-hidden": "true",
|
|
68195
|
+
focusable: "false",
|
|
67690
68196
|
children: [
|
|
67691
68197
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
67692
68198
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
@@ -67728,6 +68234,8 @@ function UnsubscribeConfirm({
|
|
|
67728
68234
|
fill: "none",
|
|
67729
68235
|
stroke: "currentColor",
|
|
67730
68236
|
strokeWidth: "2",
|
|
68237
|
+
"aria-hidden": "true",
|
|
68238
|
+
focusable: "false",
|
|
67731
68239
|
children: [
|
|
67732
68240
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
67733
68241
|
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
@@ -67808,8 +68316,10 @@ function UserProfileInner({
|
|
|
67808
68316
|
}) {
|
|
67809
68317
|
const { user, isLoading: isUserLoading, refresh: refreshUser } = useUser();
|
|
67810
68318
|
const userContext = useUserContext();
|
|
67811
|
-
const { uploadAvatar, isUploading: isUploadingAvatar
|
|
68319
|
+
const { uploadAvatar, isUploading: isUploadingAvatar } = useStorage();
|
|
67812
68320
|
const styles2 = baseStyles(theme);
|
|
68321
|
+
const nameId = (0, import_react136.useId)();
|
|
68322
|
+
const emailId = (0, import_react136.useId)();
|
|
67813
68323
|
const [activeSection, setActiveSection] = (0, import_react136.useState)(sections[0]);
|
|
67814
68324
|
const [form, setForm] = (0, import_react136.useState)({ name: "", image: "" });
|
|
67815
68325
|
const [error2, setError] = (0, import_react136.useState)(null);
|
|
@@ -67914,17 +68424,19 @@ function UserProfileInner({
|
|
|
67914
68424
|
transition: "opacity 0.15s ease-in-out"
|
|
67915
68425
|
};
|
|
67916
68426
|
return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
67917
|
-
"
|
|
68427
|
+
"button",
|
|
67918
68428
|
{
|
|
67919
|
-
|
|
68429
|
+
type: "button",
|
|
67920
68430
|
onClick: () => fileInputRef.current?.click(),
|
|
67921
|
-
|
|
67922
|
-
|
|
67923
|
-
|
|
67924
|
-
|
|
67925
|
-
|
|
67926
|
-
|
|
67927
|
-
|
|
68431
|
+
"aria-label": "Upload avatar",
|
|
68432
|
+
className: "sylphx-upload-hover",
|
|
68433
|
+
style: {
|
|
68434
|
+
...avatarStyle,
|
|
68435
|
+
border: "none",
|
|
68436
|
+
padding: 0,
|
|
68437
|
+
cursor: "pointer",
|
|
68438
|
+
font: "inherit",
|
|
68439
|
+
color: "inherit"
|
|
67928
68440
|
},
|
|
67929
68441
|
children: [
|
|
67930
68442
|
form.image ? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
@@ -67935,7 +68447,7 @@ function UserProfileInner({
|
|
|
67935
68447
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
67936
68448
|
}
|
|
67937
68449
|
) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { style: { fontSize: "2rem", color: theme.colorMutedForeground }, children: form.name?.charAt(0)?.toUpperCase() || "?" }),
|
|
67938
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "
|
|
68450
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "sylphx-upload-hover__overlay", style: overlayStyle, children: isUploadingAvatar ? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { style: mergeStyles(styles2.spinner, { color: "#fff" }) }) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(CameraIcon2, { color: "#fff" }) }),
|
|
67939
68451
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
67940
68452
|
"input",
|
|
67941
68453
|
{
|
|
@@ -67975,10 +68487,11 @@ function UserProfileInner({
|
|
|
67975
68487
|
const renderProfileSection = () => /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("form", { onSubmit: handleProfileUpdate, children: [
|
|
67976
68488
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { style: mergeStyles(styles2.flexCenter, styles2.mb6), children: renderAvatar() }),
|
|
67977
68489
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { style: styles2.formGroup, children: [
|
|
67978
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("label", { style: styles2.label, children: "Name" }),
|
|
68490
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("label", { htmlFor: nameId, style: styles2.label, children: "Name" }),
|
|
67979
68491
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
67980
68492
|
"input",
|
|
67981
68493
|
{
|
|
68494
|
+
id: nameId,
|
|
67982
68495
|
type: "text",
|
|
67983
68496
|
value: form.name,
|
|
67984
68497
|
onChange: (e2) => setForm((prev) => ({ ...prev, name: e2.target.value })),
|
|
@@ -67989,10 +68502,11 @@ function UserProfileInner({
|
|
|
67989
68502
|
)
|
|
67990
68503
|
] }),
|
|
67991
68504
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { style: styles2.formGroup, children: [
|
|
67992
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("label", { style: styles2.label, children: "Email" }),
|
|
68505
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("label", { htmlFor: emailId, style: styles2.label, children: "Email" }),
|
|
67993
68506
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
67994
68507
|
"input",
|
|
67995
68508
|
{
|
|
68509
|
+
id: emailId,
|
|
67996
68510
|
type: "email",
|
|
67997
68511
|
value: user?.email || "",
|
|
67998
68512
|
disabled: true,
|
|
@@ -68131,6 +68645,8 @@ function CameraIcon2({ color: color2 }) {
|
|
|
68131
68645
|
strokeWidth: "2",
|
|
68132
68646
|
strokeLinecap: "round",
|
|
68133
68647
|
strokeLinejoin: "round",
|
|
68648
|
+
"aria-hidden": "true",
|
|
68649
|
+
focusable: "false",
|
|
68134
68650
|
children: [
|
|
68135
68651
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("path", { d: "M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z" }),
|
|
68136
68652
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("circle", { cx: "12", cy: "13", r: "3" })
|
|
@@ -68149,6 +68665,8 @@ function CloseIcon6({ color: color2 }) {
|
|
|
68149
68665
|
stroke: color2,
|
|
68150
68666
|
strokeWidth: "2",
|
|
68151
68667
|
strokeLinecap: "round",
|
|
68668
|
+
"aria-hidden": "true",
|
|
68669
|
+
focusable: "false",
|
|
68152
68670
|
children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("path", { d: "M4 4L12 12M12 4L4 12" })
|
|
68153
68671
|
}
|
|
68154
68672
|
);
|
|
@@ -68181,6 +68699,7 @@ function WebhookManager({
|
|
|
68181
68699
|
isLoading = false,
|
|
68182
68700
|
emptyMessage = "No webhooks configured"
|
|
68183
68701
|
}) {
|
|
68702
|
+
const urlId = (0, import_react137.useId)();
|
|
68184
68703
|
const [showCreate, setShowCreate] = (0, import_react137.useState)(false);
|
|
68185
68704
|
const [url, setUrl] = (0, import_react137.useState)("");
|
|
68186
68705
|
const [selectedEvents, setSelectedEvents] = (0, import_react137.useState)([]);
|
|
@@ -68324,6 +68843,7 @@ function WebhookManager({
|
|
|
68324
68843
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
68325
68844
|
"label",
|
|
68326
68845
|
{
|
|
68846
|
+
htmlFor: urlId,
|
|
68327
68847
|
style: {
|
|
68328
68848
|
display: "block",
|
|
68329
68849
|
marginBottom: "0.5rem",
|
|
@@ -68336,6 +68856,7 @@ function WebhookManager({
|
|
|
68336
68856
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
68337
68857
|
"input",
|
|
68338
68858
|
{
|
|
68859
|
+
id: urlId,
|
|
68339
68860
|
type: "url",
|
|
68340
68861
|
value: url,
|
|
68341
68862
|
onChange: (e2) => setUrl(e2.target.value),
|
|
@@ -68345,15 +68866,16 @@ function WebhookManager({
|
|
|
68345
68866
|
}
|
|
68346
68867
|
)
|
|
68347
68868
|
] }),
|
|
68348
|
-
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("
|
|
68869
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("fieldset", { style: { marginBottom: "1.5rem", border: "none", padding: 0, margin: 0 }, children: [
|
|
68349
68870
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
68350
|
-
"
|
|
68871
|
+
"legend",
|
|
68351
68872
|
{
|
|
68352
68873
|
style: {
|
|
68353
68874
|
display: "block",
|
|
68354
68875
|
marginBottom: "0.5rem",
|
|
68355
68876
|
fontWeight: 500,
|
|
68356
|
-
fontSize: theme.fontSizeSm
|
|
68877
|
+
fontSize: theme.fontSizeSm,
|
|
68878
|
+
padding: 0
|
|
68357
68879
|
},
|
|
68358
68880
|
children: "Events to listen for *"
|
|
68359
68881
|
}
|
|
@@ -68614,12 +69136,24 @@ function WebhookDeliveryLog({
|
|
|
68614
69136
|
children: emptyMessage
|
|
68615
69137
|
}
|
|
68616
69138
|
) : displayedDeliveries.map((delivery, i2) => /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
|
|
68617
|
-
"
|
|
69139
|
+
"button",
|
|
68618
69140
|
{
|
|
69141
|
+
type: "button",
|
|
69142
|
+
"aria-expanded": expandedId === delivery.id,
|
|
68619
69143
|
style: {
|
|
68620
69144
|
padding: "0.75rem 1rem",
|
|
68621
69145
|
borderBottom: i2 === displayedDeliveries.length - 1 ? "none" : `1px solid ${theme.colorBorder}`,
|
|
68622
|
-
cursor: "pointer"
|
|
69146
|
+
cursor: "pointer",
|
|
69147
|
+
textAlign: "left",
|
|
69148
|
+
font: "inherit",
|
|
69149
|
+
color: "inherit",
|
|
69150
|
+
width: "100%",
|
|
69151
|
+
background: "transparent",
|
|
69152
|
+
border: "none",
|
|
69153
|
+
borderBottomStyle: "solid",
|
|
69154
|
+
borderBottomWidth: i2 === displayedDeliveries.length - 1 ? 0 : 1,
|
|
69155
|
+
borderBottomColor: theme.colorBorder,
|
|
69156
|
+
display: "block"
|
|
68623
69157
|
},
|
|
68624
69158
|
onClick: () => setExpandedId(expandedId === delivery.id ? null : delivery.id),
|
|
68625
69159
|
children: [
|
|
@@ -68769,6 +69303,8 @@ function WebhookIcon({ color: color2, size: size4 = 24 }) {
|
|
|
68769
69303
|
strokeWidth: "2",
|
|
68770
69304
|
strokeLinecap: "round",
|
|
68771
69305
|
strokeLinejoin: "round",
|
|
69306
|
+
"aria-hidden": "true",
|
|
69307
|
+
focusable: "false",
|
|
68772
69308
|
children: [
|
|
68773
69309
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("path", { d: "M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2" }),
|
|
68774
69310
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("path", { d: "m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06" }),
|
|
@@ -68790,6 +69326,8 @@ function PlusIcon6({ color: color2 }) {
|
|
|
68790
69326
|
strokeLinecap: "round",
|
|
68791
69327
|
strokeLinejoin: "round",
|
|
68792
69328
|
style: { marginRight: "0.25rem" },
|
|
69329
|
+
"aria-hidden": "true",
|
|
69330
|
+
focusable: "false",
|
|
68793
69331
|
children: [
|
|
68794
69332
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
68795
69333
|
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
@@ -69881,7 +70419,7 @@ var ErrorTracker = class {
|
|
|
69881
70419
|
const isInApp = !filename?.includes("node_modules") && !filename?.includes("vendor");
|
|
69882
70420
|
let absPath = filename;
|
|
69883
70421
|
if (urlPrefix && filename && !filename.startsWith("http")) {
|
|
69884
|
-
absPath = urlPrefix.replace(/\/$/, "")
|
|
70422
|
+
absPath = `${urlPrefix.replace(/\/$/, "")}/${filename.replace(/^\.?\//, "")}`;
|
|
69885
70423
|
}
|
|
69886
70424
|
const debugId = debugIds?.[filename ?? ""];
|
|
69887
70425
|
frames.push({
|
|
@@ -74334,7 +74872,6 @@ function toWebVitalMetric(metric) {
|
|
|
74334
74872
|
async function reportMetric(metric) {
|
|
74335
74873
|
metrics2[metric.name] = metric;
|
|
74336
74874
|
if (config.debug) {
|
|
74337
|
-
console.log(`[Web Vitals] ${metric.name}: ${metric.value.toFixed(2)} (${metric.rating})`);
|
|
74338
74875
|
}
|
|
74339
74876
|
config.onReport(metric);
|
|
74340
74877
|
if (config.reportUrl && config.reportingMode === "immediate") {
|
|
@@ -74394,7 +74931,6 @@ function initWebVitals(userConfig = {}) {
|
|
|
74394
74931
|
const samplingRate = userConfig.samplingRate ?? DEFAULT_WEB_VITALS_CONFIG.samplingRate;
|
|
74395
74932
|
if (Math.random() > samplingRate) {
|
|
74396
74933
|
if (userConfig.debug) {
|
|
74397
|
-
console.log("[Web Vitals] Sampling skipped this page view");
|
|
74398
74934
|
}
|
|
74399
74935
|
return;
|
|
74400
74936
|
}
|
|
@@ -74417,7 +74953,6 @@ function initWebVitals(userConfig = {}) {
|
|
|
74417
74953
|
});
|
|
74418
74954
|
}
|
|
74419
74955
|
if (config.debug) {
|
|
74420
|
-
console.log("[Web Vitals] Initialized");
|
|
74421
74956
|
}
|
|
74422
74957
|
}
|
|
74423
74958
|
function getWebVitalsReport() {
|
|
@@ -74934,9 +75469,10 @@ function murmurHash3(key, seed = 0) {
|
|
|
74934
75469
|
}
|
|
74935
75470
|
k1 = 0;
|
|
74936
75471
|
switch (remainder) {
|
|
75472
|
+
// biome-ignore lint/suspicious/noFallthroughSwitchClause: MurmurHash3 tail mixing requires intentional fallthrough
|
|
74937
75473
|
case 3:
|
|
74938
75474
|
k1 ^= (key.charCodeAt(i2 + 2) & 255) << 16;
|
|
74939
|
-
// fallthrough
|
|
75475
|
+
// biome-ignore lint/suspicious/noFallthroughSwitchClause: MurmurHash3 tail mixing requires intentional fallthrough
|
|
74940
75476
|
case 2:
|
|
74941
75477
|
k1 ^= (key.charCodeAt(i2 + 1) & 255) << 8;
|
|
74942
75478
|
// fallthrough
|
|
@@ -75499,7 +76035,6 @@ var LocalEvaluator = class {
|
|
|
75499
76035
|
}
|
|
75500
76036
|
debug(message, data) {
|
|
75501
76037
|
if (this.config.debug) {
|
|
75502
|
-
console.log(`[FeatureFlags] ${message}`, data ?? "");
|
|
75503
76038
|
}
|
|
75504
76039
|
}
|
|
75505
76040
|
/**
|
|
@@ -75714,7 +76249,6 @@ var ExperimentManager = class {
|
|
|
75714
76249
|
}
|
|
75715
76250
|
debug(message, data) {
|
|
75716
76251
|
if (this.config.debug) {
|
|
75717
|
-
console.log(`[Experiments] ${message}`, data ?? "");
|
|
75718
76252
|
}
|
|
75719
76253
|
}
|
|
75720
76254
|
};
|
|
@@ -76008,7 +76542,6 @@ var FlagStream = class {
|
|
|
76008
76542
|
// ==========================================
|
|
76009
76543
|
debug(message, data) {
|
|
76010
76544
|
if (this.options.debug) {
|
|
76011
|
-
console.log(`[FlagStream] ${message}`, data ?? "");
|
|
76012
76545
|
}
|
|
76013
76546
|
}
|
|
76014
76547
|
};
|
|
@@ -77148,9 +77681,6 @@ var mixpanelHandler = {
|
|
|
77148
77681
|
const { token, debug } = config2;
|
|
77149
77682
|
((f2, b2) => {
|
|
77150
77683
|
if (!b2) return;
|
|
77151
|
-
let _e;
|
|
77152
|
-
let g2;
|
|
77153
|
-
let a2;
|
|
77154
77684
|
const c2 = {};
|
|
77155
77685
|
c2._i = [];
|
|
77156
77686
|
c2.init = (e2, f3) => {
|
|
@@ -77163,15 +77693,16 @@ var mixpanelHandler = {
|
|
|
77163
77693
|
c2._i[0]?.[2]?.identify?.(...args);
|
|
77164
77694
|
};
|
|
77165
77695
|
c2.people = {
|
|
77696
|
+
// biome-ignore lint/suspicious/noExplicitAny: Mixpanel SDK vendor snippet — matches Mixpanel's own typings
|
|
77166
77697
|
set: (...args) => {
|
|
77167
77698
|
c2._i[0]?.[2]?.people?.set?.(...args);
|
|
77168
77699
|
}
|
|
77169
77700
|
};
|
|
77170
|
-
a2 = b2.createElement("script");
|
|
77701
|
+
const a2 = b2.createElement("script");
|
|
77171
77702
|
a2.type = "text/javascript";
|
|
77172
77703
|
a2.async = true;
|
|
77173
77704
|
a2.src = "https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";
|
|
77174
|
-
g2 = b2.getElementsByTagName("script")[0];
|
|
77705
|
+
const g2 = b2.getElementsByTagName("script")[0];
|
|
77175
77706
|
g2.parentNode?.insertBefore(a2, g2);
|
|
77176
77707
|
f2.mixpanel = c2;
|
|
77177
77708
|
})(window, document);
|
|
@@ -77226,7 +77757,8 @@ var segmentHandler = {
|
|
|
77226
77757
|
"setAnonymousId",
|
|
77227
77758
|
"addDestinationMiddleware"
|
|
77228
77759
|
];
|
|
77229
|
-
analytics.factory =
|
|
77760
|
+
analytics.factory = // biome-ignore lint/suspicious/noExplicitAny: Segment SDK vendor snippet — returns a stub function that matches any Segment analytics method signature
|
|
77761
|
+
(e2) => (...args) => {
|
|
77230
77762
|
args.unshift(e2);
|
|
77231
77763
|
analytics.push(args);
|
|
77232
77764
|
return analytics;
|
|
@@ -77296,6 +77828,7 @@ var posthogHandler = {
|
|
|
77296
77828
|
})(n2);
|
|
77297
77829
|
}
|
|
77298
77830
|
o2.people = {
|
|
77831
|
+
// biome-ignore lint/suspicious/noExplicitAny: PostHog SDK vendor snippet — matches PostHog's own typings
|
|
77299
77832
|
set: (...args) => {
|
|
77300
77833
|
o2.__load_queue.push(["people.set", args]);
|
|
77301
77834
|
}
|
|
@@ -77493,7 +78026,7 @@ function createDestinationRouter(config2) {
|
|
|
77493
78026
|
} else {
|
|
77494
78027
|
handlers[dest.type].page(name || document.title, properties, dest.config);
|
|
77495
78028
|
}
|
|
77496
|
-
if (debug) console.log(`[Router]
|
|
78029
|
+
if (debug) console.log(`[Router] Paged to ${dest.type}`);
|
|
77497
78030
|
} catch (error2) {
|
|
77498
78031
|
console.error(`[Router] Failed to page to ${dest.type}:`, error2);
|
|
77499
78032
|
}
|
|
@@ -78503,7 +79036,6 @@ var AnalyticsTracker = class {
|
|
|
78503
79036
|
}
|
|
78504
79037
|
debug(message, data) {
|
|
78505
79038
|
if (this.config.debug) {
|
|
78506
|
-
console.log(`[Analytics] ${message}`, data ?? "");
|
|
78507
79039
|
}
|
|
78508
79040
|
}
|
|
78509
79041
|
};
|
|
@@ -78565,94 +79097,71 @@ function AnalyticsProvider({
|
|
|
78565
79097
|
}
|
|
78566
79098
|
function useAnalyticsHook() {
|
|
78567
79099
|
const ctx = (0, import_react143.useContext)(AnalyticsContext);
|
|
78568
|
-
const
|
|
78569
|
-
|
|
78570
|
-
const
|
|
78571
|
-
|
|
78572
|
-
|
|
78573
|
-
|
|
78574
|
-
|
|
78575
|
-
|
|
78576
|
-
const
|
|
78577
|
-
|
|
78578
|
-
|
|
78579
|
-
|
|
78580
|
-
|
|
78581
|
-
|
|
78582
|
-
const
|
|
78583
|
-
|
|
78584
|
-
|
|
78585
|
-
const
|
|
78586
|
-
|
|
78587
|
-
|
|
78588
|
-
|
|
78589
|
-
|
|
78590
|
-
|
|
78591
|
-
|
|
78592
|
-
|
|
78593
|
-
setUserPropertiesOnce
|
|
78594
|
-
|
|
78595
|
-
|
|
78596
|
-
|
|
78597
|
-
|
|
78598
|
-
|
|
78599
|
-
|
|
78600
|
-
}
|
|
78601
|
-
|
|
78602
|
-
|
|
79100
|
+
const tracker = ctx?.tracker ?? null;
|
|
79101
|
+
const isReady = ctx?.isReady ?? false;
|
|
79102
|
+
const track = (0, import_react143.useCallback)(
|
|
79103
|
+
(eventName, properties) => {
|
|
79104
|
+
tracker?.track(eventName, properties);
|
|
79105
|
+
},
|
|
79106
|
+
[tracker]
|
|
79107
|
+
);
|
|
79108
|
+
const identify = (0, import_react143.useCallback)(
|
|
79109
|
+
(userId, properties) => {
|
|
79110
|
+
tracker?.identify(userId, properties);
|
|
79111
|
+
},
|
|
79112
|
+
[tracker]
|
|
79113
|
+
);
|
|
79114
|
+
const reset = (0, import_react143.useCallback)(() => {
|
|
79115
|
+
tracker?.reset();
|
|
79116
|
+
}, [tracker]);
|
|
79117
|
+
const setUserProperties = (0, import_react143.useCallback)(
|
|
79118
|
+
(properties) => {
|
|
79119
|
+
tracker?.setUserProperties(properties);
|
|
79120
|
+
},
|
|
79121
|
+
[tracker]
|
|
79122
|
+
);
|
|
79123
|
+
const setUserPropertiesOnce = (0, import_react143.useCallback)(
|
|
79124
|
+
(properties) => {
|
|
79125
|
+
tracker?.setUserPropertiesOnce(properties);
|
|
79126
|
+
},
|
|
79127
|
+
[tracker]
|
|
79128
|
+
);
|
|
79129
|
+
const incrementUserProperty = (0, import_react143.useCallback)(
|
|
79130
|
+
(property, value) => {
|
|
79131
|
+
tracker?.incrementUserProperty(property, value);
|
|
79132
|
+
},
|
|
79133
|
+
[tracker]
|
|
79134
|
+
);
|
|
79135
|
+
const group = (0, import_react143.useCallback)(
|
|
79136
|
+
(groupType, groupKey, properties) => {
|
|
79137
|
+
tracker?.group(groupType, groupKey, properties);
|
|
79138
|
+
},
|
|
79139
|
+
[tracker]
|
|
79140
|
+
);
|
|
79141
|
+
const register = (0, import_react143.useCallback)(
|
|
79142
|
+
(properties) => {
|
|
79143
|
+
tracker?.register(properties);
|
|
79144
|
+
},
|
|
79145
|
+
[tracker]
|
|
79146
|
+
);
|
|
79147
|
+
const getDistinctId = (0, import_react143.useCallback)(() => {
|
|
79148
|
+
return tracker?.getDistinctId() ?? null;
|
|
79149
|
+
}, [tracker]);
|
|
79150
|
+
const flush = (0, import_react143.useCallback)(async () => {
|
|
79151
|
+
await tracker?.flush();
|
|
79152
|
+
}, [tracker]);
|
|
78603
79153
|
return {
|
|
78604
|
-
track
|
|
78605
|
-
|
|
78606
|
-
|
|
78607
|
-
|
|
78608
|
-
|
|
78609
|
-
|
|
78610
|
-
|
|
78611
|
-
|
|
78612
|
-
|
|
78613
|
-
},
|
|
78614
|
-
[tracker]
|
|
78615
|
-
),
|
|
78616
|
-
reset: (0, import_react143.useCallback)(() => {
|
|
78617
|
-
tracker.reset();
|
|
78618
|
-
}, [tracker]),
|
|
78619
|
-
setUserProperties: (0, import_react143.useCallback)(
|
|
78620
|
-
(properties) => {
|
|
78621
|
-
tracker.setUserProperties(properties);
|
|
78622
|
-
},
|
|
78623
|
-
[tracker]
|
|
78624
|
-
),
|
|
78625
|
-
setUserPropertiesOnce: (0, import_react143.useCallback)(
|
|
78626
|
-
(properties) => {
|
|
78627
|
-
tracker.setUserPropertiesOnce(properties);
|
|
78628
|
-
},
|
|
78629
|
-
[tracker]
|
|
78630
|
-
),
|
|
78631
|
-
incrementUserProperty: (0, import_react143.useCallback)(
|
|
78632
|
-
(property, value) => {
|
|
78633
|
-
tracker.incrementUserProperty(property, value);
|
|
78634
|
-
},
|
|
78635
|
-
[tracker]
|
|
78636
|
-
),
|
|
78637
|
-
group: (0, import_react143.useCallback)(
|
|
78638
|
-
(groupType, groupKey, properties) => {
|
|
78639
|
-
tracker.group(groupType, groupKey, properties);
|
|
78640
|
-
},
|
|
78641
|
-
[tracker]
|
|
78642
|
-
),
|
|
78643
|
-
register: (0, import_react143.useCallback)(
|
|
78644
|
-
(properties) => {
|
|
78645
|
-
tracker.register(properties);
|
|
78646
|
-
},
|
|
78647
|
-
[tracker]
|
|
78648
|
-
),
|
|
78649
|
-
getDistinctId: (0, import_react143.useCallback)(() => {
|
|
78650
|
-
return tracker.getDistinctId();
|
|
78651
|
-
}, [tracker]),
|
|
79154
|
+
track,
|
|
79155
|
+
identify,
|
|
79156
|
+
reset,
|
|
79157
|
+
setUserProperties,
|
|
79158
|
+
setUserPropertiesOnce,
|
|
79159
|
+
incrementUserProperty,
|
|
79160
|
+
group,
|
|
79161
|
+
register,
|
|
79162
|
+
getDistinctId,
|
|
78652
79163
|
isReady,
|
|
78653
|
-
flush
|
|
78654
|
-
await tracker.flush();
|
|
78655
|
-
}, [tracker])
|
|
79164
|
+
flush
|
|
78656
79165
|
};
|
|
78657
79166
|
}
|
|
78658
79167
|
function usePageView(pageName, properties) {
|
|
@@ -79953,7 +80462,6 @@ function useRealtime(channel, options = {}) {
|
|
|
79953
80462
|
function useRealtimeChannels(channels, options = {}) {
|
|
79954
80463
|
const {
|
|
79955
80464
|
events,
|
|
79956
|
-
history: history2,
|
|
79957
80465
|
onConnect,
|
|
79958
80466
|
onMessage,
|
|
79959
80467
|
onReconnect,
|
|
@@ -80031,7 +80539,9 @@ function useRealtimeChannels(channels, options = {}) {
|
|
|
80031
80539
|
channels.forEach(connectChannel);
|
|
80032
80540
|
}, [channels, connectChannel]);
|
|
80033
80541
|
const disconnect = (0, import_react146.useCallback)(() => {
|
|
80034
|
-
Object.values(eventSourcesRef.current).forEach((es) =>
|
|
80542
|
+
Object.values(eventSourcesRef.current).forEach((es) => {
|
|
80543
|
+
es.close();
|
|
80544
|
+
});
|
|
80035
80545
|
eventSourcesRef.current = {};
|
|
80036
80546
|
setStatuses({});
|
|
80037
80547
|
}, []);
|
|
@@ -80560,7 +81070,6 @@ var WebAnalyticsTracker = class {
|
|
|
80560
81070
|
this._hookHistoryApi();
|
|
80561
81071
|
}
|
|
80562
81072
|
if (this.options.debug) {
|
|
80563
|
-
console.log("[WebAnalytics] Initialized", this.options);
|
|
80564
81073
|
}
|
|
80565
81074
|
}
|
|
80566
81075
|
/**
|
|
@@ -80582,7 +81091,6 @@ var WebAnalyticsTracker = class {
|
|
|
80582
81091
|
timestamp: Date.now()
|
|
80583
81092
|
};
|
|
80584
81093
|
if (this.options.debug) {
|
|
80585
|
-
console.log("[WebAnalytics] Page view:", payload);
|
|
80586
81094
|
}
|
|
80587
81095
|
this._send(`${SDK_API_PATH}/analytics/pageview`, payload);
|
|
80588
81096
|
}
|
|
@@ -80598,7 +81106,6 @@ var WebAnalyticsTracker = class {
|
|
|
80598
81106
|
sessionId: getOrCreateSessionId()
|
|
80599
81107
|
};
|
|
80600
81108
|
if (this.options.debug) {
|
|
80601
|
-
console.log("[WebAnalytics] Identify:", payload);
|
|
80602
81109
|
}
|
|
80603
81110
|
this._send(`${SDK_API_PATH}/analytics/identify`, payload);
|
|
80604
81111
|
}
|
|
@@ -80741,9 +81248,15 @@ function sendVital(url, appKey, payload) {
|
|
|
80741
81248
|
headers,
|
|
80742
81249
|
body: data,
|
|
80743
81250
|
keepalive: true
|
|
80744
|
-
}).catch(() => {
|
|
81251
|
+
}).catch((err) => {
|
|
81252
|
+
if (typeof console !== "undefined" && console.debug) {
|
|
81253
|
+
console.debug("[sylphx:speed-insights] vitals beacon failed", err);
|
|
81254
|
+
}
|
|
80745
81255
|
});
|
|
80746
|
-
} catch {
|
|
81256
|
+
} catch (err) {
|
|
81257
|
+
if (typeof console !== "undefined" && console.debug) {
|
|
81258
|
+
console.debug("[sylphx:speed-insights] beacon setup failed", err);
|
|
81259
|
+
}
|
|
80747
81260
|
}
|
|
80748
81261
|
}
|
|
80749
81262
|
function SpeedInsights({
|