@rxdrag/website-studio 0.0.62 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{cssMode-93f05de2.js → cssMode-0c23a08a.js} +4 -4
  2. package/dist/{cssMode-93f05de2.js.map → cssMode-0c23a08a.js.map} +1 -1
  3. package/dist/{freemarker2-fd9b10d3.js → freemarker2-396cac18.js} +4 -4
  4. package/dist/{freemarker2-fd9b10d3.js.map → freemarker2-396cac18.js.map} +1 -1
  5. package/dist/{handlebars-f1ead386.js → handlebars-039139b0.js} +4 -4
  6. package/dist/{handlebars-f1ead386.js.map → handlebars-039139b0.js.map} +1 -1
  7. package/dist/{html-9d030721.js → html-8b21d5ed.js} +4 -4
  8. package/dist/{html-9d030721.js.map → html-8b21d5ed.js.map} +1 -1
  9. package/dist/{htmlMode-30d0de91.js → htmlMode-77196fd5.js} +4 -4
  10. package/dist/{htmlMode-30d0de91.js.map → htmlMode-77196fd5.js.map} +1 -1
  11. package/dist/{index-e4647972.js → index-3256baa8.js} +1109 -1917
  12. package/dist/{index-e4647972.js.map → index-3256baa8.js.map} +1 -1
  13. package/dist/index-e69a2bfd.js.map +1 -1
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.mjs +5 -9
  16. package/dist/{javascript-327c666e.js → javascript-8a7fcc5d.js} +5 -5
  17. package/dist/{javascript-327c666e.js.map → javascript-8a7fcc5d.js.map} +1 -1
  18. package/dist/{jsonMode-5c4ceeca.js → jsonMode-a8a7410a.js} +4 -4
  19. package/dist/{jsonMode-5c4ceeca.js.map → jsonMode-a8a7410a.js.map} +1 -1
  20. package/dist/{liquid-8243f0d7.js → liquid-1ae5e803.js} +4 -4
  21. package/dist/{liquid-8243f0d7.js.map → liquid-1ae5e803.js.map} +1 -1
  22. package/dist/{mdx-07e52606.js → mdx-a32b8d38.js} +4 -4
  23. package/dist/{mdx-07e52606.js.map → mdx-a32b8d38.js.map} +1 -1
  24. package/dist/{python-53510841.js → python-cfdc6bef.js} +4 -4
  25. package/dist/{python-53510841.js.map → python-cfdc6bef.js.map} +1 -1
  26. package/dist/{razor-58b7df65.js → razor-3d879fe0.js} +4 -4
  27. package/dist/{razor-58b7df65.js.map → razor-3d879fe0.js.map} +1 -1
  28. package/dist/{tsMode-9d793b1d.js → tsMode-b04b0224.js} +4 -4
  29. package/dist/{tsMode-9d793b1d.js.map → tsMode-b04b0224.js.map} +1 -1
  30. package/dist/{typescript-20c35b0b.js → typescript-dd1ac52a.js} +4 -4
  31. package/dist/{typescript-20c35b0b.js.map → typescript-dd1ac52a.js.map} +1 -1
  32. package/dist/{xml-3f468811.js → xml-bbfc39e4.js} +4 -4
  33. package/dist/{xml-3f468811.js.map → xml-bbfc39e4.js.map} +1 -1
  34. package/dist/{yaml-699fe7d2.js → yaml-125518c0.js} +4 -4
  35. package/dist/{yaml-699fe7d2.js.map → yaml-125518c0.js.map} +1 -1
  36. package/package.json +21 -21
  37. package/dist/generator/hooks/baseFiles.d.ts +0 -90
  38. package/dist/generator/hooks/bases/astro.config.mjs.d.ts +0 -1
  39. package/dist/generator/hooks/bases/createEnv.d.ts +0 -2
  40. package/dist/generator/hooks/bases/favicon.svg.d.ts +0 -1
  41. package/dist/generator/hooks/bases/package.json.d.ts +0 -1
  42. package/dist/generator/hooks/bases/src/base.css.d.ts +0 -2
  43. package/dist/generator/hooks/bases/src/layouts/Layout.astro.d.ts +0 -1
  44. package/dist/generator/hooks/bases/src/lib/lib.index.d.ts +0 -1
  45. package/dist/generator/hooks/bases/src/pages/api/ask-for-quote.ts.d.ts +0 -1
  46. package/dist/generator/hooks/bases/tailwind.config.mjs.d.ts +0 -1
  47. package/dist/generator/hooks/bases/tsconfig.json.d.ts +0 -1
  48. package/dist/generator/hooks/index.d.ts +0 -4
  49. package/dist/generator/hooks/useExportWebsite.d.ts +0 -4
  50. package/dist/generator/hooks/useGetComponentFiles.d.ts +0 -5
  51. package/dist/generator/hooks/useGetFiles.d.ts +0 -90
  52. package/dist/generator/hooks/useGetFrontComponents.d.ts +0 -2
  53. package/dist/generator/hooks/useGetPageFiles.d.ts +0 -13
  54. package/dist/generator/hooks/useGetPages.d.ts +0 -2
  55. package/dist/generator/index.d.ts +0 -1
@@ -6,28 +6,27 @@ var __publicField = (obj, key2, value) => {
6
6
  };
7
7
  var _a, _b, _c, _d, _e, _f, _g, _h, _i2, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$2, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa;
8
8
  import * as React from "react";
9
- import React__default, { createContext, useContext, useMemo, useCallback, useEffect, memo, useState, useRef, forwardRef as forwardRef$2, Component, useImperativeHandle, isValidElement, cloneElement } from "react";
10
- import { ThemeBranchFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, MediaQueryOptions, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeBranchQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, ThemeFields, WebsiteQueryOptions, WebsiteFields, PageAssciations, TaskQueryOptions, TaskFields, AppModule, TaskStatus, PageType, websiteToInput, TaskType, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeBranchEntityName, themeBranchToInputCascade, ThemeQueryOptions, ThemeCategoryFields, FrontComponentEntityName, pageToInputCascade, sectionTemplateToInput, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, TaskEntityName, ComponentCategoryEntityName, themeBranchToInput, frontComponentToInput, SectionTemplateEntityName, pageToInput, PageMetaQueryOptions, PageMetaFields, PageMetaAssciations, FrontComponentAssciations, componentCategoryToInput } from "@rxdrag/rxcms-models";
9
+ import React__default, { createContext, useContext, useMemo, useCallback, useEffect, memo, useState, useRef, forwardRef as forwardRef$1, Component, useImperativeHandle, isValidElement, cloneElement } from "react";
10
+ import { ThemeBranchFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, MediaQueryOptions, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeBranchQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, ThemeFields, WebsiteQueryOptions, WebsiteFields, PageAssciations, TaskQueryOptions, TaskFields, AppModule, TaskStatus, websiteToInput, TaskType, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeBranchEntityName, PageType, themeBranchToInputCascade, ThemeQueryOptions, ThemeCategoryFields, FrontComponentEntityName, pageToInputCascade, sectionTemplateToInput, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, TaskEntityName, ComponentCategoryEntityName, themeBranchToInput, frontComponentToInput, SectionTemplateEntityName, pageToInput, PageMetaQueryOptions, PageMetaFields, PageMetaAssciations, FrontComponentAssciations, componentCategoryToInput } from "@rxdrag/rxcms-models";
11
11
  import { GlobalLoading, EntityForm, SubmitButton, useListData, SearchInput, EntityPagination, useIsLoading, QueryListScope, EntitySelect, useRemoveRow, useEditRow, EntityEditModal, useSelectionsState, EntityTable, EntityListScope, NewButton, EntityRowScope, EntitySelectField, useNewRow } from "@rxdrag/rxcms-models-ui";
12
12
  import { useOneThemeBranch, usePageList, useTemplateCategoryList, useSectionTemplateList, useComponentCategoryList, useFrontComponentList, useOneThemeBranchById, useTaskList, useUpsertOneWebsite, useDeleteThemeBranchById, useUpsertOneThemeBranch, useLangList, useOneWebsiteSettings, useOneThemeConfig, useUpsertOneThemeConfig, useUpsertOneWebsiteSettings, useUpsertOnePage, useUpsertOneSectionTemplate, useUpsertOneFrontComponent, useDeletePageById } from "@rxdrag/rxcms-model-hooks";
13
13
  import { newPageMetaOptions, useWebsite, useCurrentLangId, ComponentType, MediaSingleSelectField, FullImageSelectField, useSiteId, useCurrentLang, TitleAndSlug, TitleViewField, DescriptionViewField, RxcmsMedias, SiteRoot, usePreviewUrl, LangSelect } from "@rxdrag/biz-components";
14
14
  import clsx$1 from "clsx";
15
- import { staticMaterials, useViewKey, AddablePlaceHolder, ENTIFY_SERVER_URL, ViewKeyProvider, ComponentTreeWidget, VariableProvider, setters, DEFUALT_DEVICE_MAP, DEFAULT_SMALLEST_DEVICE, MetaEdittingProvider, useVariables, useExecuteExpression, classListToClassName, expressionAndName, expressionTernaryName, expressionLoopName, slotContentName } from "@rxdrag/website-materials";
15
+ import { staticMaterials, useViewKey, AddablePlaceHolder, ViewKeyProvider, ComponentTreeWidget, VariableProvider, setters, DEFUALT_DEVICE_MAP, DEFAULT_SMALLEST_DEVICE, MetaEdittingProvider, useVariables, useExecuteExpression, classListToClassName, expressionAndName, expressionTernaryName, expressionLoopName, slotContentName } from "@rxdrag/website-materials";
16
16
  import { compileCode, AsyncFunction, transformSchemaToCode, compileAstroToReact, extractVariables, isExpression, parseExpressionValue, convertHtmlAttrToJsxAttr, transformCodeToSchema } from "@rxdrag/astro-compiler";
17
17
  import { PageLoader, PopoverController, ModalController, AnimateController, TabsController, NumberController, FlipController, CollapseController, AosController, DEFAULT_SAMLL, DEFAULT_MEDIUM, DEFAULT_LARGE, Icon as Icon$1 } from "@rxdrag/website-lib-core";
18
18
  import gsap$2 from "gsap";
19
- import { useLazyQueryEntityList, useLazyQueryOneEntity, emitEntityChange, useEntifyEndpoint, useEntifyToken, useCreateEntityClient } from "@rxdrag/entify-hooks";
20
- import JSZip from "jszip";
21
- import { useSave, CheckCircleIcon as CheckCircleIcon$1, CloseIcon, ModalBody, AddIcon as AddIcon$1, TaskStopIcon, AiStarIcon, ConfirmDialog, SettingsIcon, ModalFooter, FavouriteIcon, LightIcon, DarkIcon, EditIcon, TextInput, Drawer, ModalHeader, ModalClose, SearchIcon, ModalContent as ModalContent$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1, WarningIcon, PinIcon, ErrorBoundary, CloneIcon, RemoveIcon, MonacoEditor, RunningIcon, StyledTooltip, PlayIcon, getTheFile, MoreIcon, CodeSyncIcon, Logo, PagesIcon, WidgetIcon, SeoIcon, TextIcon, HeadingIcon, StarIcon, ImageIcon, VideoIcon, SplineIcon, CardIcon, TableIcon, GridIcon, BoxIcon, DividerIcon, SpacerIcon, SlotIcon, LinkIcon, BreadcrumbIcon, TabsIcon, PopoverIcon, ModalIcon, FormIcon, LeafNode, GroupNode, TreeView, DesignIcon, ResetIcon, ImportIcon, AstroIcon, AddFolderIcon, MediasIcon, LanguageIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon } from "@rxdrag/rxcms-common";
19
+ import { CheckCircleIcon as CheckCircleIcon$1, CloseIcon, ModalBody, AddIcon as AddIcon$1, TaskStopIcon, AiStarIcon, ConfirmDialog, SettingsIcon, ModalFooter, FavouriteIcon, LightIcon, DarkIcon, EditIcon, TextInput, Drawer, ModalHeader, ModalClose, SearchIcon, ModalContent as ModalContent$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1, WarningIcon, PinIcon, ErrorBoundary, CloneIcon, RemoveIcon, MonacoEditor, RunningIcon, StyledTooltip, PlayIcon, getTheFile, useSave, MoreIcon, CodeSyncIcon, Logo, PagesIcon, WidgetIcon, SeoIcon, TextIcon, HeadingIcon, StarIcon, ImageIcon, VideoIcon, SplineIcon, CardIcon, TableIcon, GridIcon, BoxIcon, DividerIcon, SpacerIcon, SlotIcon, LinkIcon, BreadcrumbIcon, TabsIcon, PopoverIcon, ModalIcon, FormIcon, LeafNode, GroupNode, TreeView, DesignIcon, ResetIcon, ImportIcon, AstroIcon, AddFolderIcon, MediasIcon, LanguageIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon } from "@rxdrag/rxcms-common";
22
20
  import { create as create$4 } from "zustand";
23
21
  import { Card, CardBody, Button as Button$2, CircularProgress, addToast, CardHeader, Select, SelectItem, Dropdown, DropdownTrigger, DropdownMenu as DropdownMenu$1, DropdownItem, Accordion, AccordionItem, Input, Tabs, Tab, Divider, cn, Checkbox, Chip, Skeleton, CardFooter, Image, useDisclosure, Modal as Modal$2, ModalContent as ModalContent$2, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, ModalFooter as ModalFooter$1, Tooltip, RadioGroup, Radio } from "@heroui/react";
24
22
  import { Icon } from "@iconify/react";
23
+ import { useLazyQueryOneEntity, emitEntityChange, useEntifyEndpoint, useEntifyToken, useCreateEntityClient } from "@rxdrag/entify-hooks";
25
24
  import { useTranslateTheme, TaskManager, useSubscribeTaskEvents, useTranslateBuiltinPage, useTranslateCustomizedPages, useTranlateComponents, useUploadDeploymentFile, WebsiteAddonContext } from "@rxdrag/website-addon";
26
25
  import { InputField, TextareaField, toField, ColorField, SwitchField, SelectField, PasswordField, Form, CheckboxField } from "@rxdrag/fieldy-heroui";
27
26
  import { ObjectField, useFormValue, useForm } from "@rxdrag/react-fieldy-pro";
28
27
  import "react-colorful";
29
28
  import { motion, AnimatePresence, LazyMotion, m } from "framer-motion";
30
- import ReactDOM, { createPortal } from "react-dom";
29
+ import ReactDOM, { createPortal, flushSync } from "react-dom";
31
30
  import { keys } from "lodash-es";
32
31
  import { DeployType, predefinedTypes, askForQuote } from "@rxdrag/code-templates";
33
32
  import { Designer, useDesignerEngine, useDocumentModified, useClearModified, useDocConfig, useDocumentCode, useViewMode, useGetDocSchemaTree, ViewMode, useRootNode, useActivedDocumentId, IFrameCanvasImpl, KeyboardDriver, DragDropDriver, DragOverDriver, MouseClickDriver, MouseMoveDriver, MouseOverOutDriver, CanvasResizeDriver, CanvasScrollDriver, MouseUpDriver, useDragStore, RelativePosition, AcceptType, useCurrentNode, useSelectedElementsRectsInIframe, useActivedElementRect, useActivedId, useTreeNode, useChangeNodeMeta, useNodeMeta, createNodeHandlerProps, useSelection, useBackup, useSetInsertTargetWithPosition, useComponentOperationStore, NodeRelativePosition, TabType, InsertMode, useGetNode, useNodeMove, useClone, useRemoveSelectedNodes, useSelectedNode, useSelectedParent, useSelectParent, MouseMoveEvent, useCodeModified, RXID_ATTR_NAME, useSchemaTree, useSetChildren, useSetDocConfig, useDeviceType, DeviceType, useHistory, useResourceNode, useCanAccept, useConfigModified, useCreateDocument, useRemoveDocument, ContainerImpl, DocumentRoot } from "@rxdrag/rxcraft";
@@ -38,7 +37,8 @@ import { cn as cn$1, Tabs as Tabs$1, TabsList, TabsTrigger, TabsContent, Button
38
37
  import { isObj, isStr } from "@rxdrag/shared";
39
38
  import { TextNodeName, CommentNodeName } from "@rxdrag/schema-pro";
40
39
  import { emit, EVENT_ENTITY_POSTED } from "@rxdrag/entify-lib";
41
- import { useExportWebsite as useExportWebsite$1, useGenerateWebsiteFiles, traverseFiles as traverseFiles$1 } from "@rxdrag/code-generator";
40
+ import JSZip from "jszip";
41
+ import { useExportWebsite, useGenerateWebsiteFiles, traverseFiles as traverseFiles$1 } from "@rxdrag/code-generator";
42
42
  const StudioContext = createContext({});
43
43
  function useAllFrontComponents() {
44
44
  var _a3;
@@ -3810,836 +3810,6 @@ function useFrontComponent(name) {
3810
3810
  const components = useAllComponents();
3811
3811
  return components == null ? void 0 : components.find((c) => c.name === name);
3812
3812
  }
3813
- function useGetFrontComponents() {
3814
- const query = useLazyQueryEntityList();
3815
- const getFrontCompoents = useCallback(
3816
- async (themeId) => {
3817
- return await query(
3818
- new FrontComponentQueryOptions(
3819
- [
3820
- FrontComponentFields.id,
3821
- FrontComponentFields.name,
3822
- FrontComponentFields.title,
3823
- FrontComponentFields.seqValue,
3824
- FrontComponentFields.updatedAt,
3825
- FrontComponentFields.code,
3826
- FrontComponentFields.propsSchema,
3827
- FrontComponentFields.propsTest,
3828
- FrontComponentFields.slots,
3829
- FrontComponentFields.droppable
3830
- ],
3831
- {
3832
- where: {
3833
- theme: {
3834
- id: {
3835
- _eq: themeId
3836
- }
3837
- }
3838
- },
3839
- orderBy: [
3840
- {
3841
- [FrontComponentFields.seqValue]: "asc"
3842
- },
3843
- {
3844
- [FrontComponentFields.createdAt]: "asc"
3845
- }
3846
- ]
3847
- }
3848
- ).category([ComponentCategoryFields.id, ComponentCategoryFields.name]).theme().setNoQuery(!themeId).toGqlOptions()
3849
- );
3850
- },
3851
- [query]
3852
- );
3853
- return getFrontCompoents;
3854
- }
3855
- function useGetPages() {
3856
- const query = useLazyQueryEntityList();
3857
- const getPages = useCallback(
3858
- async (themeId) => {
3859
- return await query(
3860
- new PageQueryOptions(
3861
- [
3862
- PageFields.id,
3863
- PageFields.title,
3864
- PageFields.createdAt,
3865
- PageFields.updatedAt,
3866
- PageFields.slug,
3867
- PageFields.code,
3868
- PageFields.pageType,
3869
- PageFields.dataSource
3870
- ],
3871
- {
3872
- where: {
3873
- [PageAssciations.theme]: {
3874
- id: { _eq: themeId }
3875
- }
3876
- },
3877
- orderBy: [
3878
- {
3879
- createdAt: "desc"
3880
- }
3881
- ]
3882
- }
3883
- ).meta(newPageMetaOptions()).setNoQuery(!themeId).toGqlOptions()
3884
- );
3885
- },
3886
- [query]
3887
- );
3888
- return getPages;
3889
- }
3890
- const packageCode = `{
3891
- "name": "astro-project",
3892
- "type": "module",
3893
- "version": "0.0.1",
3894
- "scripts": {
3895
- "dev": "astro dev",
3896
- "start": "astro dev",
3897
- "build": "astro build",
3898
- "preview": "astro preview",
3899
- "astro": "astro"
3900
- },
3901
- "dependencies": {
3902
- "@astrojs/react": "^4.2.0",
3903
- "@iconify/react": "^5.0.2",
3904
- "@rxdrag/website-lib": "^0.0.11",
3905
- "@rxdrag/website-lib-core": "^0.0.9",
3906
- "@rxdrag/slate-preview": "^1.2.55",
3907
- "@rxdrag/rxcms-models": "^0.3.46",
3908
- "astro": "^5.3.0",
3909
- "dayjs": "^1.11.7",
3910
- "gsap": "^3.12.7",
3911
- "react": "^19.1.0",
3912
- "react-dom": "^19.1.0"
3913
- },
3914
- "devDependencies": {
3915
- "@astrojs/node": "^9.1.3",
3916
- "@astrojs/tailwind": "^6.0.0",
3917
- "@astrojs/vercel": "^8.1.2",
3918
- "@tailwindcss/forms": "^0.5.7",
3919
- "@tailwindcss/typography": "^0.5.13",
3920
- "@types/react": "^18.2.20",
3921
- "@types/react-dom": "^19.1.0",
3922
- "tailwindcss": "^3.4.1"
3923
- }
3924
- }`;
3925
- const astroConfig = `import { defineConfig } from "astro/config";
3926
- import tailwind from "@astrojs/tailwind";
3927
- import react from "@astrojs/react";
3928
- import node from "@astrojs/node";
3929
-
3930
- export default defineConfig({
3931
- integrations: [tailwind(), react()],
3932
- output: "static", // 使用服务端渲染模式
3933
- adapter: node({
3934
- mode: "standalone", // 使用独立模式
3935
- }), // 使用 Node.js 适配器
3936
- });
3937
- `;
3938
- const tsconfigCode = `{
3939
- "extends": "astro/tsconfigs/strict",
3940
- "compilerOptions": {
3941
- "jsx": "react-jsx",
3942
- "jsxImportSource": "react"
3943
- },
3944
- "include": [".astro/types.d.ts", "**/*"],
3945
- "exclude": ["dist"]
3946
- }
3947
- `;
3948
- const createEnv = (theme) => {
3949
- var _a3, _b3;
3950
- return `PUBLIC_ENTIFY_SERVER_URL =${ENTIFY_SERVER_URL}
3951
- #测试服务器跟生产服务器
3952
- PUBLIC_WEBSITE_ID = ${(_a3 = theme == null ? void 0 : theme.website) == null ? void 0 : _a3.id}
3953
- #语言
3954
- PUBLIC_LANGUAGE = ${(_b3 = theme == null ? void 0 : theme.lang) == null ? void 0 : _b3.abbr}
3955
- #nodejs服务地址
3956
- #PUBLIC_WEBSITE_ID = 4299262263296
3957
- PUBLIC_ENTIFY_GUEST_TOKEN = "17bD#4!fG8^2wS*0z"
3958
- `;
3959
- };
3960
- const gitignoreCode = `# build output
3961
- dist/
3962
-
3963
- # generated types
3964
- .astro/
3965
-
3966
- # dependencies
3967
- node_modules/
3968
-
3969
- # logs
3970
- npm-debug.log*
3971
- yarn-debug.log*
3972
- yarn-error.log*
3973
- pnpm-debug.log*
3974
-
3975
- # environment variables
3976
- .env
3977
- .env.production
3978
-
3979
- # macOS-specific files
3980
- .DS_Store
3981
-
3982
- # jetbrains setting folder
3983
- .idea/
3984
-
3985
- `;
3986
- const faviconCode = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
3987
- <path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
3988
- <path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-3-.61v.61a3 3 0 0 0 6 0v-.61c-.94.4-1.95.61-3 .61Z"/>
3989
- <defs>
3990
- <linearGradient id="gradient" x1="18" x2="18" y1="28" y2="31" gradientUnits="userSpaceOnUse">
3991
- <stop stop-color="#FF1639"/>
3992
- <stop offset="1" stop-color="#FF1639" stop-opacity="0"/>
3993
- </linearGradient>
3994
- </defs>
3995
- </svg>`;
3996
- const createBaseCssCode = (theme) => {
3997
- var _a3;
3998
- return `@tailwind base;
3999
- @tailwind components;
4000
- @tailwind utilities;
4001
-
4002
- ${((_a3 = theme.styleConfig) == null ? void 0 : _a3.css) || ""}
4003
-
4004
- `;
4005
- };
4006
- const tailwindConfigCode = `import plugin from "tailwindcss/plugin";
4007
-
4008
- export default {
4009
- darkMode: "class", // 使用class策略来控制暗色模式
4010
- content: [
4011
- "./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}",
4012
- "node_modules/@rxdrag/website-lib/src/**/*.{js,ts,jsx,tsx}",
4013
- "node_modules/@rxdrag/website-lib-core/src/**/*.{js,ts,jsx,tsx}",
4014
- ],
4015
- theme: {
4016
- extend: {},
4017
- },
4018
- plugins: [
4019
- require("@tailwindcss/forms"),
4020
- require("@tailwindcss/typography"),
4021
- plugin(function ({ addVariant }) {
4022
- addVariant("scrolled", ".scrolled &");
4023
- addVariant("open", [".open&", ".open &"]);
4024
- addVariant("actived", [".actived&", ".actived &"]);
4025
- addVariant("disabled", [".disabled&", ".disabled &"]);
4026
- addVariant("selected", [".selected&", ".selected &"]);
4027
- }),
4028
- ],
4029
- };
4030
-
4031
- `;
4032
- const libCode = `import {
4033
- Entify,
4034
- type EnvVariables,
4035
- type IEntify,
4036
- } from "@rxdrag/website-lib-core";
4037
-
4038
- export function getEnvVariables(): EnvVariables {
4039
- return {
4040
- websiteId: ({}).PUBLIC_WEBSITE_ID,
4041
- entifyServerUrl: ({}).PUBLIC_ENTIFY_SERVER_URL,
4042
- entifyGuestToken: ({}).PUBLIC_ENTIFY_GUEST_TOKEN,
4043
- language: ({}).PUBLIC_LANGUAGE,
4044
- };
4045
- }
4046
-
4047
- export const rx = Entify.getInstance(getEnvVariables()) as IEntify;
4048
- `;
4049
- const layoutCode = `---
4050
- import "../style.css";
4051
- import { ClientRouter } from "astro:transitions";
4052
- ---
4053
-
4054
- <!doctype html>
4055
- <html lang="zh-CN">
4056
- <head>
4057
- <meta charset="UTF-8" />
4058
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4059
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
4060
- <meta name="generator" content={Astro.generator} />
4061
- <ClientRouter />
4062
- <slot name="meta" />
4063
- </head>
4064
- <body>
4065
- <slot />
4066
- </body>
4067
- </html>
4068
-
4069
- <style>
4070
- html,
4071
- body {
4072
- margin: 0;
4073
- width: 100%;
4074
- height: 100%;
4075
- }
4076
- </style>
4077
- `;
4078
- const askForQuoteCode = `import type { APIRoute } from "astro";
4079
- import type {
4080
- SpamFilterRule,
4081
- SpamFilterRuleBoolExp,
4082
- SpamFilterRuleDistinctExp,
4083
- SpamFilterRuleOrderBy,
4084
- } from "@rxdrag/rxcms-models";
4085
- import {
4086
- EnquiryAssciations,
4087
- EnquiryEntityName,
4088
- EnquiryFields,
4089
- SpamFilterRuleFields,
4090
- SpamFilterRuleQueryOptions,
4091
- } from "@rxdrag/rxcms-models";
4092
- import { getEnvVariables, rx } from "../../lib";
4093
- import {
4094
- queryWebSiteSettings,
4095
- sendEmail,
4096
- upsertEntity,
4097
- verifyEncryption,
4098
- type QuoteRequest,
4099
- } from "@rxdrag/website-lib-core";
4100
-
4101
- // 标记此页面为服务器渲染,而不是静态生成
4102
- export const prerender = false;
4103
-
4104
- export const POST: APIRoute = async ({ request }) => {
4105
- try {
4106
- const envVariables = getEnvVariables();
4107
-
4108
- // 从请求中获取JSON数据
4109
- let requestData: QuoteRequest;
4110
- try {
4111
- requestData = await request.json();
4112
- } catch (error) {
4113
- console.error("JSON parsing error:", error);
4114
- return new Response(
4115
- JSON.stringify({
4116
- success: false,
4117
- message: "Invalid request format",
4118
- }),
4119
- {
4120
- status: 400,
4121
- headers: {
4122
- "Content-Type": "application/json",
4123
- },
4124
- }
4125
- );
4126
- }
4127
-
4128
- // 验证蜜罐字段
4129
- if (requestData.phone) {
4130
- console.log("Honeypot triggered - spam submission detected");
4131
- // 悄悄失败,返回成功但不处理
4132
- return new Response(
4133
- JSON.stringify({
4134
- success: true,
4135
- message:
4136
- "Your enquiry has been submitted successfully, we will contact you soon",
4137
- }),
4138
- {
4139
- status: 200,
4140
- headers: {
4141
- "Content-Type": "application/json",
4142
- },
4143
- }
4144
- );
4145
- }
4146
-
4147
- // 创建实体对象 - 移除不在数据库模型中的字段
4148
- const { phone, encryptedField, ...entityData } = requestData;
4149
- const entity: Record<string, unknown> = { ...entityData };
4150
-
4151
- // 检查蜜罐字段
4152
- if (phone) {
4153
- // 蜜罐被触发,拒绝请求
4154
- return new Response(
4155
- JSON.stringify({
4156
- success: false,
4157
- message: "Form submission rejected",
4158
- }),
4159
- {
4160
- status: 400,
4161
- headers: {
4162
- "Content-Type": "application/json",
4163
- },
4164
- }
4165
- );
4166
- }
4167
-
4168
- // 验证加密字段
4169
- const isValid = verifyEncryption(
4170
- //加密盐
4171
- "yizhanfeinb",
4172
- encryptedField,
4173
- phone || "",
4174
- 30 // 30分钟有效期
4175
- );
4176
-
4177
- if (!isValid) {
4178
- // 加密验证失败,拒绝请求
4179
- return new Response(
4180
- JSON.stringify({
4181
- success: false,
4182
- message: "Invalid form submission",
4183
- }),
4184
- {
4185
- status: 400,
4186
- headers: {
4187
- "Content-Type": "application/json",
4188
- },
4189
- }
4190
- );
4191
- }
4192
-
4193
- // 获取请求头信息
4194
- const url =
4195
- request.headers.get("X-Request-URL") || request.headers.get("referer");
4196
- const ip =
4197
- request.headers.get("X-Forwarded-For") ||
4198
- request.headers.get("X-Real-IP");
4199
- const userAgent = request.headers.get("user-agent");
4200
-
4201
- // 设置额外字段
4202
- entity[EnquiryFields.formIp] = ip;
4203
- entity[EnquiryFields.fromUrl] = url;
4204
- entity[EnquiryFields.userAgent] = userAgent;
4205
- entity[EnquiryFields.read] = false;
4206
- entity[EnquiryFields.spam] = false;
4207
- entity[EnquiryAssciations.website] = {
4208
- sync: { id: envVariables.websiteId },
4209
- };
4210
-
4211
- // 验证必填字段
4212
- if (
4213
- !entity[EnquiryFields.name] ||
4214
- !entity[EnquiryFields.email] ||
4215
- !entity[EnquiryFields.message]
4216
- ) {
4217
- return new Response(
4218
- JSON.stringify({
4219
- success: false,
4220
- message: "Please fill in all required fields",
4221
- }),
4222
- {
4223
- status: 400,
4224
- headers: {
4225
- "Content-Type": "application/json",
4226
- },
4227
- }
4228
- );
4229
- }
4230
-
4231
- // 垃圾信息过滤
4232
- const spamRules = (
4233
- await rx.queryEntityList<
4234
- SpamFilterRule,
4235
- SpamFilterRuleBoolExp,
4236
- SpamFilterRuleOrderBy,
4237
- SpamFilterRuleDistinctExp
4238
- >(
4239
- new SpamFilterRuleQueryOptions([
4240
- SpamFilterRuleFields.emails,
4241
- SpamFilterRuleFields.ips,
4242
- SpamFilterRuleFields.keywords,
4243
- ])
4244
- )
4245
- )?.items as SpamFilterRule[] | undefined;
4246
-
4247
- for (const rule of spamRules || []) {
4248
- const email = (entity[EnquiryFields.email] as string)?.trim();
4249
- if (
4250
- !email ||
4251
- rule.emails
4252
- ?.replace(",", ",")
4253
- .split(",")
4254
- .map((em) => em.trim())
4255
- .includes(email) ||
4256
- (ip &&
4257
- rule.ips
4258
- ?.replace(",", ",")
4259
- .split(",")
4260
- .map((ipAddr) => ipAddr.trim())
4261
- .includes(ip)) ||
4262
- rule.keywords
4263
- ?.split(",")
4264
- .some(
4265
- (keyword: string) =>
4266
- keyword &&
4267
- (entity[EnquiryFields.message] as string).includes(keyword)
4268
- )
4269
- ) {
4270
- // 标记为垃圾信息并保存
4271
- await upsertEntity(
4272
- EnquiryEntityName,
4273
- { ...entity, spam: true, read: false },
4274
- envVariables
4275
- );
4276
-
4277
- // 返回404响应,模拟原始行为
4278
- return new Response(null, { status: 404 });
4279
- }
4280
- }
4281
-
4282
- // 保存询价信息
4283
- await upsertEntity(EnquiryEntityName, entity, envVariables);
4284
-
4285
- // 获取网站设置并发送邮件通知
4286
- const websettins = await queryWebSiteSettings(envVariables);
4287
- const name = entity?.[EnquiryFields.name] as string;
4288
-
4289
- if (websettins?.noticeEmail) {
4290
- const content = \`
4291
- Company: \${entity[EnquiryFields.company]}
4292
- Name: \${name}
4293
- Email: \${entity[EnquiryFields.email]}
4294
- Message: \${entity[EnquiryFields.message]}
4295
- IP: \${ip}
4296
- URL: \${url}
4297
- CTA: \${entity[EnquiryFields.fromCta]}
4298
- userAgent: \${userAgent}
4299
- \`;
4300
-
4301
- const employeeEmail = {
4302
- to: websettins?.noticeEmail,
4303
- subject: "New Enquiry Received",
4304
- message: content,
4305
- };
4306
-
4307
- await sendEmail(employeeEmail, envVariables);
4308
- }
4309
-
4310
- // 返回JSON响应
4311
- return new Response(
4312
- JSON.stringify({
4313
- success: true,
4314
- message:
4315
- "Your enquiry has been submitted successfully, we will contact you soon",
4316
- }),
4317
- {
4318
- status: 200,
4319
- headers: {
4320
- "Content-Type": "application/json",
4321
- },
4322
- }
4323
- );
4324
- } catch (error) {
4325
- console.error("Error processing enquiry request:", error);
4326
-
4327
- // 返回错误响应
4328
- return new Response(
4329
- JSON.stringify({
4330
- success: false,
4331
- message: "Submission failed, please try again later",
4332
- }),
4333
- {
4334
- status: 500,
4335
- headers: {
4336
- "Content-Type": "application/json",
4337
- },
4338
- }
4339
- );
4340
- }
4341
- };
4342
- `;
4343
- const createBaseFiles = (theme) => {
4344
- return {
4345
- "package.json": {
4346
- file: {
4347
- contents: packageCode
4348
- }
4349
- },
4350
- ".gitignore": {
4351
- file: {
4352
- contents: gitignoreCode
4353
- }
4354
- },
4355
- "astro.config.mjs": {
4356
- file: {
4357
- contents: astroConfig
4358
- }
4359
- },
4360
- "tsconfig.json": {
4361
- file: {
4362
- contents: tsconfigCode
4363
- }
4364
- },
4365
- ".env": {
4366
- file: {
4367
- contents: createEnv(theme)
4368
- }
4369
- },
4370
- "tailwind.config.mjs": {
4371
- file: {
4372
- contents: tailwindConfigCode
4373
- }
4374
- },
4375
- src: {
4376
- directory: {
4377
- layouts: {
4378
- directory: {
4379
- "Layout.astro": {
4380
- file: {
4381
- contents: layoutCode
4382
- }
4383
- }
4384
- }
4385
- },
4386
- pages: {
4387
- directory: {
4388
- api: {
4389
- directory: {
4390
- "ask-for-quote.ts": {
4391
- file: {
4392
- contents: askForQuoteCode
4393
- }
4394
- }
4395
- }
4396
- }
4397
- }
4398
- },
4399
- components: {
4400
- directory: {}
4401
- },
4402
- lib: {
4403
- directory: {
4404
- "index.ts": {
4405
- file: {
4406
- contents: libCode
4407
- }
4408
- }
4409
- }
4410
- },
4411
- "style.css": {
4412
- file: {
4413
- contents: createBaseCssCode(theme)
4414
- }
4415
- },
4416
- "env.d.ts": {
4417
- file: {
4418
- contents: `/// <reference types="astro/client" />`
4419
- }
4420
- }
4421
- }
4422
- },
4423
- public: {
4424
- directory: {
4425
- "favicon.svg": {
4426
- file: {
4427
- contents: faviconCode
4428
- }
4429
- }
4430
- }
4431
- }
4432
- };
4433
- };
4434
- const PAGE_TYPE_PATHS = {
4435
- [PageType.Home]: "index.astro",
4436
- [PageType.Page404]: "404.astro",
4437
- [PageType.PageError]: "500.astro",
4438
- [PageType.Thanks]: "thanks.astro",
4439
- [PageType.SearchList]: "search.astro",
4440
- [PageType.Post]: "posts/[slug].astro",
4441
- [PageType.PostList]: "posts/page/[page].astro",
4442
- [PageType.PostCategory]: "posts/categories/[slug]/[page].astro",
4443
- [PageType.Product]: "products/[slug].astro",
4444
- [PageType.ProductList]: "products/page/[page].astro",
4445
- [PageType.ProductCategory]: "products/categories/[slug]/[page].astro",
4446
- [PageType.Profile]: "profiles/[id].astro"
4447
- // 其他页面类型可以根据需要添加
4448
- };
4449
- const createFileEntry = (contents) => ({
4450
- file: { contents }
4451
- });
4452
- const createDirectoryEntry = (content = {}) => ({
4453
- directory: content
4454
- });
4455
- function useGetPageFiles() {
4456
- const getPages = useGetPages();
4457
- const getPageFiles = useCallback(
4458
- async (themeId) => {
4459
- var _a3;
4460
- const pages = (_a3 = await getPages(themeId)) == null ? void 0 : _a3.items;
4461
- const defaultHomeContent = `---
4462
- import Layout from '../layouts/Layout.astro';
4463
- ---
4464
-
4465
- <Layout>
4466
- <main class="p-4 max-w-screen-lg mx-auto">
4467
- <h1 class="text-3xl font-bold mb-4">欢迎访问</h1>
4468
- <p class="text-lg">没有找到首页...</p>
4469
- </main>
4470
- </Layout>
4471
- `;
4472
- const initialPageFiles = {
4473
- "index.astro": createFileEntry(defaultHomeContent)
4474
- };
4475
- const createNestedDir = (basePath, structure) => {
4476
- let current = structure;
4477
- for (const segment of basePath) {
4478
- if (!current[segment]) {
4479
- current[segment] = createDirectoryEntry();
4480
- }
4481
- current = current[segment].directory;
4482
- }
4483
- return current;
4484
- };
4485
- const createFileAtPath = (path, content, structure) => {
4486
- const segments = path.split("/");
4487
- const fileName = segments.pop() || "";
4488
- if (segments.length === 0) {
4489
- structure[fileName] = createFileEntry(content);
4490
- } else {
4491
- const dirContent = createNestedDir(segments, structure);
4492
- dirContent[fileName] = createFileEntry(content);
4493
- }
4494
- };
4495
- createNestedDir(["posts"], initialPageFiles);
4496
- createNestedDir(["posts", "categories"], initialPageFiles);
4497
- createNestedDir(["posts", "page"], initialPageFiles);
4498
- createNestedDir(["products"], initialPageFiles);
4499
- createNestedDir(["products", "categories"], initialPageFiles);
4500
- createNestedDir(["products", "page"], initialPageFiles);
4501
- createNestedDir(["profiles"], initialPageFiles);
4502
- createNestedDir(["api"], initialPageFiles);
4503
- const processedPaths = /* @__PURE__ */ new Set();
4504
- if (pages && pages.length > 0) {
4505
- pages.forEach((page) => {
4506
- const pageContent = page.code || "";
4507
- const pageType = page.pageType;
4508
- const path = PAGE_TYPE_PATHS[pageType];
4509
- if (path) {
4510
- createFileAtPath(path, pageContent, initialPageFiles);
4511
- processedPaths.add(path);
4512
- } else if (page.pageType === PageType.Customized && page.slug) {
4513
- const fileName = `${page.slug}.astro`;
4514
- initialPageFiles[fileName] = createFileEntry(pageContent);
4515
- processedPaths.add(fileName);
4516
- } else {
4517
- const fileName = "page.astro";
4518
- initialPageFiles[fileName] = createFileEntry(pageContent);
4519
- processedPaths.add(fileName);
4520
- }
4521
- });
4522
- }
4523
- return initialPageFiles;
4524
- },
4525
- [getPages]
4526
- );
4527
- return getPageFiles;
4528
- }
4529
- function useGetComponentFiles() {
4530
- const getComponents = useGetFrontComponents();
4531
- const getFiles = useCallback(
4532
- async (themeId) => {
4533
- var _a3;
4534
- const components = (_a3 = await getComponents(themeId)) == null ? void 0 : _a3.items;
4535
- const files = {};
4536
- if (components && components.length > 0) {
4537
- components.forEach((component) => {
4538
- if (component.name && component.code) {
4539
- files[`${component.name}.astro`] = {
4540
- file: {
4541
- contents: component.code
4542
- }
4543
- };
4544
- }
4545
- });
4546
- }
4547
- return files;
4548
- },
4549
- [getComponents]
4550
- );
4551
- return getFiles;
4552
- }
4553
- function useGetFiles() {
4554
- const getPageFiles = useGetPageFiles();
4555
- const getComponentFiles = useGetComponentFiles();
4556
- const getFiles = useCallback(
4557
- async (theme) => {
4558
- if (!(theme == null ? void 0 : theme.id)) {
4559
- console.error("theme is not defined");
4560
- return;
4561
- }
4562
- const pageFiles = await getPageFiles((theme == null ? void 0 : theme.id) || void 0);
4563
- const componentFiles = await getComponentFiles((theme == null ? void 0 : theme.id) || void 0);
4564
- const baseFiles = createBaseFiles(theme);
4565
- return {
4566
- ...baseFiles,
4567
- src: {
4568
- ...baseFiles.src,
4569
- directory: {
4570
- ...baseFiles.src.directory,
4571
- components: {
4572
- ...baseFiles.src.directory.components,
4573
- directory: {
4574
- ...baseFiles.src.directory.components.directory,
4575
- ...componentFiles
4576
- }
4577
- },
4578
- pages: {
4579
- ...baseFiles.src.directory.pages,
4580
- directory: {
4581
- ...baseFiles.src.directory.pages.directory,
4582
- ...pageFiles
4583
- }
4584
- }
4585
- }
4586
- }
4587
- };
4588
- },
4589
- [getComponentFiles, getPageFiles]
4590
- );
4591
- return getFiles;
4592
- }
4593
- function useExportWebsite() {
4594
- const [isExporting, setIsExporting] = useState(false);
4595
- const theme = useStudioTheme();
4596
- const save = useSave();
4597
- const getFiles = useGetFiles();
4598
- const addFilesToZip = useCallback(
4599
- (zip, files, currentPath = "") => {
4600
- for (const [name, content] of Object.entries(files)) {
4601
- const path = currentPath ? `${currentPath}/${name}` : name;
4602
- if (content.file && content.file.contents) {
4603
- zip.file(path, content.file.contents);
4604
- } else if (content.directory) {
4605
- const folder = zip.folder(path);
4606
- if (folder) {
4607
- addFilesToZip(folder, content.directory, "");
4608
- }
4609
- } else if (typeof content === "object" && content !== null) {
4610
- if (name === "src" || name === "public" || name === "components" || name === "pages") {
4611
- const folder = zip.folder(path);
4612
- if (folder) {
4613
- addFilesToZip(folder, content, "");
4614
- }
4615
- } else {
4616
- addFilesToZip(zip, content, path);
4617
- }
4618
- }
4619
- }
4620
- },
4621
- []
4622
- );
4623
- const exportWebsite = useCallback(async () => {
4624
- try {
4625
- if (theme == null ? void 0 : theme.id) {
4626
- setIsExporting(true);
4627
- const files = await getFiles(theme);
4628
- const zip = new JSZip();
4629
- addFilesToZip(zip, files);
4630
- const content = await zip.generateAsync({ type: "blob" });
4631
- const fileName = `website-${theme.name || theme.id}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}`;
4632
- save(fileName, content);
4633
- }
4634
- } catch (e) {
4635
- console.error(e);
4636
- throw e;
4637
- } finally {
4638
- setIsExporting(false);
4639
- }
4640
- }, [getFiles, save, theme, addFilesToZip]);
4641
- return { exportWebsite, isExporting };
4642
- }
4643
3813
  const defaultDesktopWidth = void 0;
4644
3814
  const defaultTabletWidth = 800;
4645
3815
  const defaultMobileWidth = 480;
@@ -6620,7 +5790,7 @@ function useModalPadding(open) {
6620
5790
  }
6621
5791
  }, [open]);
6622
5792
  }
6623
- const Modal = forwardRef$2((props, ref2) => {
5793
+ const Modal = forwardRef$1((props, ref2) => {
6624
5794
  const { isOpen, className, children, onClose, ...rest } = props;
6625
5795
  const openState = useState(false);
6626
5796
  const [open, setOpen] = openState;
@@ -6648,7 +5818,7 @@ const Modal = forwardRef$2((props, ref2) => {
6648
5818
  ) });
6649
5819
  });
6650
5820
  const defaultCloseButtonClassName = "rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2";
6651
- forwardRef$2((props, ref2) => {
5821
+ forwardRef$1((props, ref2) => {
6652
5822
  const { children, className, ...rest } = props;
6653
5823
  const [open, close] = useModalState();
6654
5824
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -6665,7 +5835,7 @@ forwardRef$2((props, ref2) => {
6665
5835
  }
6666
5836
  );
6667
5837
  });
6668
- const ModalContentInner = forwardRef$2(
5838
+ const ModalContentInner = forwardRef$1(
6669
5839
  (props, ref2) => {
6670
5840
  const {
6671
5841
  className,
@@ -6723,7 +5893,7 @@ const ModalContentInner = forwardRef$2(
6723
5893
  ) });
6724
5894
  }
6725
5895
  );
6726
- const ModalContent = forwardRef$2(
5896
+ const ModalContent = forwardRef$1(
6727
5897
  (props, ref2) => {
6728
5898
  return createPortal(
6729
5899
  /* @__PURE__ */ jsxRuntimeExports.jsx(ModalContentInner, { ref: ref2, ...props }),
@@ -6731,7 +5901,7 @@ const ModalContent = forwardRef$2(
6731
5901
  );
6732
5902
  }
6733
5903
  );
6734
- const ModalOverlayInner = forwardRef$2(
5904
+ const ModalOverlayInner = forwardRef$1(
6735
5905
  (props, ref2) => {
6736
5906
  const { className, closeable = true, ...rest } = props;
6737
5907
  const [open, close] = useModalState();
@@ -6761,7 +5931,7 @@ const ModalOverlayInner = forwardRef$2(
6761
5931
  ) });
6762
5932
  }
6763
5933
  );
6764
- const ModalOverlay = forwardRef$2(
5934
+ const ModalOverlay = forwardRef$1(
6765
5935
  (props, ref2) => {
6766
5936
  return createPortal(
6767
5937
  /* @__PURE__ */ jsxRuntimeExports.jsx(ModalOverlayInner, { ref: ref2, ...props }),
@@ -6780,7 +5950,7 @@ const AddIcon = (props) => {
6780
5950
  }
6781
5951
  );
6782
5952
  };
6783
- forwardRef$2(
5953
+ forwardRef$1(
6784
5954
  (props, ref2) => {
6785
5955
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6786
5956
  "svg",
@@ -6802,7 +5972,7 @@ forwardRef$2(
6802
5972
  );
6803
5973
  }
6804
5974
  );
6805
- const CheckCircleIcon = forwardRef$2((props, ref2) => {
5975
+ const CheckCircleIcon = forwardRef$1((props, ref2) => {
6806
5976
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ref: ref2, ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
6807
5977
  "path",
6808
5978
  {
@@ -6814,7 +5984,7 @@ const CheckCircleIcon = forwardRef$2((props, ref2) => {
6814
5984
  ) });
6815
5985
  });
6816
5986
  CheckCircleIcon.displayName = "CheckCircleIcon";
6817
- const ClockCircleOutlineIcon = forwardRef$2((props, ref2) => {
5987
+ const ClockCircleOutlineIcon = forwardRef$1((props, ref2) => {
6818
5988
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6819
5989
  "svg",
6820
5990
  {
@@ -6835,7 +6005,7 @@ const ClockCircleOutlineIcon = forwardRef$2((props, ref2) => {
6835
6005
  );
6836
6006
  });
6837
6007
  ClockCircleOutlineIcon.displayName = "ClockCircleOutlineIcon";
6838
- const CloseCircleIcon = forwardRef$2((props, ref2) => {
6008
+ const CloseCircleIcon = forwardRef$1((props, ref2) => {
6839
6009
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6840
6010
  "svg",
6841
6011
  {
@@ -6858,7 +6028,7 @@ const CloseCircleIcon = forwardRef$2((props, ref2) => {
6858
6028
  );
6859
6029
  });
6860
6030
  CloseCircleIcon.displayName = "CloseCircleIcon";
6861
- forwardRef$2((props, ref2) => {
6031
+ forwardRef$1((props, ref2) => {
6862
6032
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { ref: ref2, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
6863
6033
  "path",
6864
6034
  {
@@ -6867,7 +6037,7 @@ forwardRef$2((props, ref2) => {
6867
6037
  }
6868
6038
  ) });
6869
6039
  });
6870
- forwardRef$2(
6040
+ forwardRef$1(
6871
6041
  (props, ref2) => {
6872
6042
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6873
6043
  "svg",
@@ -6891,7 +6061,7 @@ forwardRef$2(
6891
6061
  );
6892
6062
  }
6893
6063
  );
6894
- forwardRef$2((props, ref2) => {
6064
+ forwardRef$1((props, ref2) => {
6895
6065
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { ref: ref2, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: 1.5, children: [
6896
6066
  /* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: 12, cy: 12, r: 6 }),
6897
6067
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -6903,7 +6073,7 @@ forwardRef$2((props, ref2) => {
6903
6073
  )
6904
6074
  ] }) });
6905
6075
  });
6906
- forwardRef$2((props, ref2) => {
6076
+ forwardRef$1((props, ref2) => {
6907
6077
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6908
6078
  "svg",
6909
6079
  {
@@ -6967,7 +6137,7 @@ React__default.forwardRef(
6967
6137
  ] });
6968
6138
  }
6969
6139
  );
6970
- const TreeItemShell = forwardRef$2((props, ref2) => {
6140
+ const TreeItemShell = forwardRef$1((props, ref2) => {
6971
6141
  const { selected, className, children, ...rest } = props;
6972
6142
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6973
6143
  "div",
@@ -23925,7 +23095,7 @@ var Event;
23925
23095
  return emitter.event;
23926
23096
  }
23927
23097
  Event2.buffer = buffer;
23928
- function chain(event, sythensize) {
23098
+ function chain2(event, sythensize) {
23929
23099
  const fn = (listener, thisArgs, disposables) => {
23930
23100
  const cs = sythensize(new ChainableSynthesis());
23931
23101
  return event(function(value) {
@@ -23937,7 +23107,7 @@ var Event;
23937
23107
  };
23938
23108
  return fn;
23939
23109
  }
23940
- Event2.chain = chain;
23110
+ Event2.chain = chain2;
23941
23111
  const HaltChainable = Symbol("HaltChainable");
23942
23112
  class ChainableSynthesis {
23943
23113
  constructor() {
@@ -136364,7 +135534,7 @@ registerLanguage({
136364
135534
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
136365
135535
  loader: () => {
136366
135536
  {
136367
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagAutoInterpolationDollar);
135537
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagAutoInterpolationDollar);
136368
135538
  }
136369
135539
  }
136370
135540
  });
@@ -136373,7 +135543,7 @@ registerLanguage({
136373
135543
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
136374
135544
  loader: () => {
136375
135545
  {
136376
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagAngleInterpolationDollar);
135546
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagAngleInterpolationDollar);
136377
135547
  }
136378
135548
  }
136379
135549
  });
@@ -136382,7 +135552,7 @@ registerLanguage({
136382
135552
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
136383
135553
  loader: () => {
136384
135554
  {
136385
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagBracketInterpolationDollar);
135555
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagBracketInterpolationDollar);
136386
135556
  }
136387
135557
  }
136388
135558
  });
@@ -136391,7 +135561,7 @@ registerLanguage({
136391
135561
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
136392
135562
  loader: () => {
136393
135563
  {
136394
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagAngleInterpolationBracket);
135564
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagAngleInterpolationBracket);
136395
135565
  }
136396
135566
  }
136397
135567
  });
@@ -136400,7 +135570,7 @@ registerLanguage({
136400
135570
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
136401
135571
  loader: () => {
136402
135572
  {
136403
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagBracketInterpolationBracket);
135573
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagBracketInterpolationBracket);
136404
135574
  }
136405
135575
  }
136406
135576
  });
@@ -136409,7 +135579,7 @@ registerLanguage({
136409
135579
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
136410
135580
  loader: () => {
136411
135581
  {
136412
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagAutoInterpolationDollar);
135582
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagAutoInterpolationDollar);
136413
135583
  }
136414
135584
  }
136415
135585
  });
@@ -136418,7 +135588,7 @@ registerLanguage({
136418
135588
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
136419
135589
  loader: () => {
136420
135590
  {
136421
- return import("./freemarker2-fd9b10d3.js").then((m2) => m2.TagAutoInterpolationBracket);
135591
+ return import("./freemarker2-396cac18.js").then((m2) => m2.TagAutoInterpolationBracket);
136422
135592
  }
136423
135593
  }
136424
135594
  });
@@ -136468,7 +135638,7 @@ registerLanguage({
136468
135638
  mimetypes: ["text/x-handlebars-template"],
136469
135639
  loader: () => {
136470
135640
  {
136471
- return import("./handlebars-f1ead386.js");
135641
+ return import("./handlebars-039139b0.js");
136472
135642
  }
136473
135643
  }
136474
135644
  });
@@ -136501,7 +135671,7 @@ registerLanguage({
136501
135671
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
136502
135672
  loader: () => {
136503
135673
  {
136504
- return import("./html-9d030721.js");
135674
+ return import("./html-8b21d5ed.js");
136505
135675
  }
136506
135676
  }
136507
135677
  });
@@ -136554,7 +135724,7 @@ registerLanguage({
136554
135724
  mimetypes: ["text/javascript"],
136555
135725
  loader: () => {
136556
135726
  {
136557
- return import("./javascript-327c666e.js");
135727
+ return import("./javascript-8a7fcc5d.js");
136558
135728
  }
136559
135729
  }
136560
135730
  });
@@ -136653,7 +135823,7 @@ registerLanguage({
136653
135823
  mimetypes: ["application/liquid"],
136654
135824
  loader: () => {
136655
135825
  {
136656
- return import("./liquid-8243f0d7.js");
135826
+ return import("./liquid-1ae5e803.js");
136657
135827
  }
136658
135828
  }
136659
135829
  });
@@ -136701,7 +135871,7 @@ registerLanguage({
136701
135871
  aliases: ["MDX", "mdx"],
136702
135872
  loader: () => {
136703
135873
  {
136704
- return import("./mdx-07e52606.js");
135874
+ return import("./mdx-a32b8d38.js");
136705
135875
  }
136706
135876
  }
136707
135877
  });
@@ -136960,7 +136130,7 @@ registerLanguage({
136960
136130
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
136961
136131
  loader: () => {
136962
136132
  {
136963
- return import("./python-53510841.js");
136133
+ return import("./python-cfdc6bef.js");
136964
136134
  }
136965
136135
  }
136966
136136
  });
@@ -137009,7 +136179,7 @@ registerLanguage({
137009
136179
  mimetypes: ["text/x-cshtml"],
137010
136180
  loader: () => {
137011
136181
  {
137012
- return import("./razor-58b7df65.js");
136182
+ return import("./razor-3d879fe0.js");
137013
136183
  }
137014
136184
  }
137015
136185
  });
@@ -137345,7 +136515,7 @@ registerLanguage({
137345
136515
  mimetypes: ["text/typescript"],
137346
136516
  loader: () => {
137347
136517
  {
137348
- return import("./typescript-20c35b0b.js");
136518
+ return import("./typescript-dd1ac52a.js");
137349
136519
  }
137350
136520
  }
137351
136521
  });
@@ -137429,7 +136599,7 @@ registerLanguage({
137429
136599
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
137430
136600
  loader: () => {
137431
136601
  {
137432
- return import("./xml-3f468811.js");
136602
+ return import("./xml-bbfc39e4.js");
137433
136603
  }
137434
136604
  }
137435
136605
  });
@@ -137446,7 +136616,7 @@ registerLanguage({
137446
136616
  mimetypes: ["application/x-yaml", "text/x-yaml"],
137447
136617
  loader: () => {
137448
136618
  {
137449
- return import("./yaml-699fe7d2.js");
136619
+ return import("./yaml-125518c0.js");
137450
136620
  }
137451
136621
  }
137452
136622
  });
@@ -137570,7 +136740,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
137570
136740
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
137571
136741
  function getMode$3() {
137572
136742
  {
137573
- return import("./cssMode-93f05de2.js");
136743
+ return import("./cssMode-0c23a08a.js");
137574
136744
  }
137575
136745
  }
137576
136746
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -137701,7 +136871,7 @@ monaco_editor_core_exports$2.languages.html = {
137701
136871
  };
137702
136872
  function getMode$2() {
137703
136873
  {
137704
- return import("./htmlMode-30d0de91.js");
136874
+ return import("./htmlMode-77196fd5.js");
137705
136875
  }
137706
136876
  }
137707
136877
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -137799,7 +136969,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
137799
136969
  monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
137800
136970
  function getMode$1() {
137801
136971
  {
137802
- return import("./jsonMode-5c4ceeca.js");
136972
+ return import("./jsonMode-a8a7410a.js");
137803
136973
  }
137804
136974
  }
137805
136975
  monaco_editor_core_exports$1.languages.register({
@@ -138075,7 +137245,7 @@ monaco_editor_core_exports.languages.typescript = {
138075
137245
  };
138076
137246
  function getMode() {
138077
137247
  {
138078
- return import("./tsMode-9d793b1d.js");
137248
+ return import("./tsMode-b04b0224.js");
138079
137249
  }
138080
137250
  }
138081
137251
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -195926,7 +195096,112 @@ tv({
195926
195096
  fullWidth: false
195927
195097
  }
195928
195098
  });
195929
- function createContext2$1(options = {}) {
195099
+ process.env.NODE_ENV !== "production";
195100
+ process.env.NODE_ENV === "test";
195101
+ var dataAttr = (condition) => condition ? "true" : void 0;
195102
+ function toVal(mix) {
195103
+ var k2, y2, str = "";
195104
+ if (typeof mix === "string" || typeof mix === "number") {
195105
+ str += mix;
195106
+ } else if (typeof mix === "object") {
195107
+ if (Array.isArray(mix)) {
195108
+ for (k2 = 0; k2 < mix.length; k2++) {
195109
+ if (mix[k2]) {
195110
+ if (y2 = toVal(mix[k2])) {
195111
+ str && (str += " ");
195112
+ str += y2;
195113
+ }
195114
+ }
195115
+ }
195116
+ } else {
195117
+ for (k2 in mix) {
195118
+ if (mix[k2]) {
195119
+ str && (str += " ");
195120
+ str += k2;
195121
+ }
195122
+ }
195123
+ }
195124
+ }
195125
+ return str;
195126
+ }
195127
+ function clsx(...args) {
195128
+ var i2 = 0, tmp, x2, str = "";
195129
+ while (i2 < args.length) {
195130
+ if (tmp = args[i2++]) {
195131
+ if (x2 = toVal(tmp)) {
195132
+ str && (str += " ");
195133
+ str += x2;
195134
+ }
195135
+ }
195136
+ }
195137
+ return str;
195138
+ }
195139
+ function getUniqueID(prefix) {
195140
+ return `${prefix}-${Math.floor(Math.random() * 1e6)}`;
195141
+ }
195142
+ function objectToDeps(obj) {
195143
+ if (!obj || typeof obj !== "object") {
195144
+ return "";
195145
+ }
195146
+ try {
195147
+ return JSON.stringify(obj);
195148
+ } catch {
195149
+ return "";
195150
+ }
195151
+ }
195152
+ function clamp(value, min, max) {
195153
+ return Math.min(Math.max(value, min), max);
195154
+ }
195155
+ function chain(...callbacks) {
195156
+ return (...args) => {
195157
+ for (let callback of callbacks) {
195158
+ if (typeof callback === "function") {
195159
+ callback(...args);
195160
+ }
195161
+ }
195162
+ };
195163
+ }
195164
+ var idsUpdaterMap = /* @__PURE__ */ new Map();
195165
+ function mergeIds(idA, idB) {
195166
+ if (idA === idB) {
195167
+ return idA;
195168
+ }
195169
+ let setIdsA = idsUpdaterMap.get(idA);
195170
+ if (setIdsA) {
195171
+ setIdsA.forEach((ref2) => ref2.current = idB);
195172
+ return idB;
195173
+ }
195174
+ let setIdsB = idsUpdaterMap.get(idB);
195175
+ if (setIdsB) {
195176
+ setIdsB.forEach((ref2) => ref2.current = idA);
195177
+ return idA;
195178
+ }
195179
+ return idB;
195180
+ }
195181
+ function mergeProps(...args) {
195182
+ let result = { ...args[0] };
195183
+ for (let i2 = 1; i2 < args.length; i2++) {
195184
+ let props = args[i2];
195185
+ for (let key2 in props) {
195186
+ let a2 = result[key2];
195187
+ let b = props[key2];
195188
+ if (typeof a2 === "function" && typeof b === "function" && // This is a lot faster than a regex.
195189
+ key2[0] === "o" && key2[1] === "n" && key2.charCodeAt(2) >= /* 'A' */
195190
+ 65 && key2.charCodeAt(2) <= /* 'Z' */
195191
+ 90) {
195192
+ result[key2] = chain(a2, b);
195193
+ } else if ((key2 === "className" || key2 === "UNSAFE_className") && typeof a2 === "string" && typeof b === "string") {
195194
+ result[key2] = clsx(a2, b);
195195
+ } else if (key2 === "id" && a2 && b) {
195196
+ result.id = mergeIds(a2, b);
195197
+ } else {
195198
+ result[key2] = b !== void 0 ? b : a2;
195199
+ }
195200
+ }
195201
+ }
195202
+ return result;
195203
+ }
195204
+ function createContext2(options = {}) {
195930
195205
  const {
195931
195206
  strict = true,
195932
195207
  errorMessage = "useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",
@@ -195947,7 +195222,231 @@ function createContext2$1(options = {}) {
195947
195222
  }
195948
195223
  return [Context3.Provider, useContext2, Context3];
195949
195224
  }
195950
- var [ProviderContext$1, useProviderContext$1] = createContext2$1({
195225
+ function useDOMRef(ref2) {
195226
+ const domRef = useRef(null);
195227
+ useImperativeHandle(ref2, () => domRef.current);
195228
+ return domRef;
195229
+ }
195230
+ var DOMPropNames = /* @__PURE__ */ new Set([
195231
+ "id",
195232
+ "type",
195233
+ "style",
195234
+ "title",
195235
+ "role",
195236
+ "tabIndex",
195237
+ "htmlFor",
195238
+ "width",
195239
+ "height",
195240
+ "abbr",
195241
+ "accept",
195242
+ "acceptCharset",
195243
+ "accessKey",
195244
+ "action",
195245
+ "allowFullScreen",
195246
+ "allowTransparency",
195247
+ "alt",
195248
+ "async",
195249
+ "autoComplete",
195250
+ "autoFocus",
195251
+ "autoPlay",
195252
+ "cellPadding",
195253
+ "cellSpacing",
195254
+ "challenge",
195255
+ "charset",
195256
+ "checked",
195257
+ "cite",
195258
+ "class",
195259
+ "className",
195260
+ "cols",
195261
+ "colSpan",
195262
+ "command",
195263
+ "content",
195264
+ "contentEditable",
195265
+ "contextMenu",
195266
+ "controls",
195267
+ "coords",
195268
+ "crossOrigin",
195269
+ "data",
195270
+ "dateTime",
195271
+ "default",
195272
+ "defer",
195273
+ "dir",
195274
+ "disabled",
195275
+ "download",
195276
+ "draggable",
195277
+ "dropzone",
195278
+ "encType",
195279
+ "enterKeyHint",
195280
+ "for",
195281
+ "form",
195282
+ "formAction",
195283
+ "formEncType",
195284
+ "formMethod",
195285
+ "formNoValidate",
195286
+ "formTarget",
195287
+ "frameBorder",
195288
+ "headers",
195289
+ "hidden",
195290
+ "high",
195291
+ "href",
195292
+ "hrefLang",
195293
+ "httpEquiv",
195294
+ "icon",
195295
+ "inputMode",
195296
+ "isMap",
195297
+ "itemId",
195298
+ "itemProp",
195299
+ "itemRef",
195300
+ "itemScope",
195301
+ "itemType",
195302
+ "kind",
195303
+ "label",
195304
+ "lang",
195305
+ "list",
195306
+ "loop",
195307
+ "manifest",
195308
+ "max",
195309
+ "maxLength",
195310
+ "media",
195311
+ "mediaGroup",
195312
+ "method",
195313
+ "min",
195314
+ "minLength",
195315
+ "multiple",
195316
+ "muted",
195317
+ "name",
195318
+ "noValidate",
195319
+ "open",
195320
+ "optimum",
195321
+ "pattern",
195322
+ "ping",
195323
+ "placeholder",
195324
+ "poster",
195325
+ "preload",
195326
+ "radioGroup",
195327
+ "referrerPolicy",
195328
+ "readOnly",
195329
+ "rel",
195330
+ "required",
195331
+ "rows",
195332
+ "rowSpan",
195333
+ "sandbox",
195334
+ "scope",
195335
+ "scoped",
195336
+ "scrolling",
195337
+ "seamless",
195338
+ "selected",
195339
+ "shape",
195340
+ "size",
195341
+ "sizes",
195342
+ "slot",
195343
+ "sortable",
195344
+ "span",
195345
+ "spellCheck",
195346
+ "src",
195347
+ "srcDoc",
195348
+ "srcSet",
195349
+ "start",
195350
+ "step",
195351
+ "target",
195352
+ "translate",
195353
+ "typeMustMatch",
195354
+ "useMap",
195355
+ "value",
195356
+ "wmode",
195357
+ "wrap"
195358
+ ]);
195359
+ var DOMEventNames = /* @__PURE__ */ new Set([
195360
+ "onCopy",
195361
+ "onCut",
195362
+ "onPaste",
195363
+ "onLoad",
195364
+ "onError",
195365
+ "onWheel",
195366
+ "onScroll",
195367
+ "onCompositionEnd",
195368
+ "onCompositionStart",
195369
+ "onCompositionUpdate",
195370
+ "onKeyDown",
195371
+ "onKeyPress",
195372
+ "onKeyUp",
195373
+ "onFocus",
195374
+ "onBlur",
195375
+ "onChange",
195376
+ "onInput",
195377
+ "onSubmit",
195378
+ "onClick",
195379
+ "onContextMenu",
195380
+ "onDoubleClick",
195381
+ "onDrag",
195382
+ "onDragEnd",
195383
+ "onDragEnter",
195384
+ "onDragExit",
195385
+ "onDragLeave",
195386
+ "onDragOver",
195387
+ "onDragStart",
195388
+ "onDrop",
195389
+ "onMouseDown",
195390
+ "onMouseEnter",
195391
+ "onMouseLeave",
195392
+ "onMouseMove",
195393
+ "onMouseOut",
195394
+ "onMouseOver",
195395
+ "onMouseUp",
195396
+ "onPointerDown",
195397
+ "onPointerEnter",
195398
+ "onPointerLeave",
195399
+ "onPointerUp",
195400
+ "onSelect",
195401
+ "onTouchCancel",
195402
+ "onTouchEnd",
195403
+ "onTouchMove",
195404
+ "onTouchStart",
195405
+ "onAnimationStart",
195406
+ "onAnimationEnd",
195407
+ "onAnimationIteration",
195408
+ "onTransitionEnd"
195409
+ ]);
195410
+ var propRe = /^(data-.*)$/;
195411
+ var ariaRe = /^(aria-.*)$/;
195412
+ var funcRe = /^(on[A-Z].*)$/;
195413
+ function filterDOMProps(props, opts = {}) {
195414
+ let {
195415
+ labelable = true,
195416
+ enabled = true,
195417
+ propNames,
195418
+ omitPropNames,
195419
+ omitEventNames,
195420
+ omitDataProps,
195421
+ omitEventProps
195422
+ } = opts;
195423
+ let filteredProps = {};
195424
+ if (!enabled) {
195425
+ return props;
195426
+ }
195427
+ for (const prop in props) {
195428
+ if (omitPropNames == null ? void 0 : omitPropNames.has(prop)) {
195429
+ continue;
195430
+ }
195431
+ if ((omitEventNames == null ? void 0 : omitEventNames.has(prop)) && funcRe.test(prop)) {
195432
+ continue;
195433
+ }
195434
+ if (funcRe.test(prop) && !DOMEventNames.has(prop)) {
195435
+ continue;
195436
+ }
195437
+ if (omitDataProps && propRe.test(prop)) {
195438
+ continue;
195439
+ }
195440
+ if (omitEventProps && funcRe.test(prop)) {
195441
+ continue;
195442
+ }
195443
+ if (Object.prototype.hasOwnProperty.call(props, prop) && (DOMPropNames.has(prop) || labelable && ariaRe.test(prop) || (propNames == null ? void 0 : propNames.has(prop)) || propRe.test(prop)) || funcRe.test(prop)) {
195444
+ filteredProps[prop] = props[prop];
195445
+ }
195446
+ }
195447
+ return filteredProps;
195448
+ }
195449
+ var [ProviderContext, useProviderContext] = createContext2({
195951
195450
  name: "ProviderContext",
195952
195451
  strict: false
195953
195452
  });
@@ -195979,7 +195478,7 @@ if (typeof FinalizationRegistry !== "undefined")
195979
195478
  new FinalizationRegistry((heldValue) => {
195980
195479
  $bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue);
195981
195480
  });
195982
- function $bdb11010cef70236$export$cd8c9cb68f842629$1(idA, idB) {
195481
+ function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
195983
195482
  if (idA === idB)
195984
195483
  return idA;
195985
195484
  let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA);
@@ -195994,7 +195493,7 @@ function $bdb11010cef70236$export$cd8c9cb68f842629$1(idA, idB) {
195994
195493
  }
195995
195494
  return idB;
195996
195495
  }
195997
- function $ff5963eb1fccf552$export$e08e3b67e392101e$1(...callbacks) {
195496
+ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
195998
195497
  return (...args) => {
195999
195498
  for (let callback of callbacks)
196000
195499
  if (typeof callback === "function")
@@ -196055,7 +195554,7 @@ function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
196055
195554
  }
196056
195555
  return event.target;
196057
195556
  }
196058
- function $3ef42575df84b30b$export$9d1611c77c2fe928$1(...args) {
195557
+ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
196059
195558
  let result = {
196060
195559
  ...args[0]
196061
195560
  };
@@ -196068,17 +195567,44 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928$1(...args) {
196068
195567
  key2[0] === "o" && key2[1] === "n" && key2.charCodeAt(2) >= /* 'A' */
196069
195568
  65 && key2.charCodeAt(2) <= /* 'Z' */
196070
195569
  90)
196071
- result[key2] = $ff5963eb1fccf552$export$e08e3b67e392101e$1(a2, b);
195570
+ result[key2] = $ff5963eb1fccf552$export$e08e3b67e392101e(a2, b);
196072
195571
  else if ((key2 === "className" || key2 === "UNSAFE_className") && typeof a2 === "string" && typeof b === "string")
196073
195572
  result[key2] = clsx$1(a2, b);
196074
195573
  else if (key2 === "id" && a2 && b)
196075
- result.id = $bdb11010cef70236$export$cd8c9cb68f842629$1(a2, b);
195574
+ result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a2, b);
196076
195575
  else
196077
195576
  result[key2] = b !== void 0 ? b : a2;
196078
195577
  }
196079
195578
  }
196080
195579
  return result;
196081
195580
  }
195581
+ const $65484d02dcb7eb3e$var$DOMPropNames = /* @__PURE__ */ new Set([
195582
+ "id"
195583
+ ]);
195584
+ const $65484d02dcb7eb3e$var$labelablePropNames = /* @__PURE__ */ new Set([
195585
+ "aria-label",
195586
+ "aria-labelledby",
195587
+ "aria-describedby",
195588
+ "aria-details"
195589
+ ]);
195590
+ const $65484d02dcb7eb3e$var$linkPropNames = /* @__PURE__ */ new Set([
195591
+ "href",
195592
+ "hrefLang",
195593
+ "target",
195594
+ "rel",
195595
+ "download",
195596
+ "ping",
195597
+ "referrerPolicy"
195598
+ ]);
195599
+ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
195600
+ function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
195601
+ let { labelable, isLink, propNames } = opts;
195602
+ let filteredProps = {};
195603
+ for (const prop in props)
195604
+ if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop)))
195605
+ filteredProps[prop] = props[prop];
195606
+ return filteredProps;
195607
+ }
196082
195608
  function $7215afc6de606d6b$export$de79e2c695e052f3(element2) {
196083
195609
  if ($7215afc6de606d6b$var$supportsPreventScroll())
196084
195610
  element2.focus({
@@ -196134,17 +195660,17 @@ function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
196134
195660
  element2.scrollLeft = scrollLeft;
196135
195661
  }
196136
195662
  }
196137
- function $c87311424ea30a05$var$testUserAgent$1(re2) {
195663
+ function $c87311424ea30a05$var$testUserAgent(re2) {
196138
195664
  var _window_navigator_userAgentData;
196139
195665
  if (typeof window === "undefined" || window.navigator == null)
196140
195666
  return false;
196141
195667
  return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand) => re2.test(brand.brand))) || re2.test(window.navigator.userAgent);
196142
195668
  }
196143
- function $c87311424ea30a05$var$testPlatform$1(re2) {
195669
+ function $c87311424ea30a05$var$testPlatform(re2) {
196144
195670
  var _window_navigator_userAgentData;
196145
195671
  return typeof window !== "undefined" && window.navigator != null ? re2.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
196146
195672
  }
196147
- function $c87311424ea30a05$var$cached$1(fn) {
195673
+ function $c87311424ea30a05$var$cached(fn) {
196148
195674
  if (process.env.NODE_ENV === "test")
196149
195675
  return fn;
196150
195676
  let res = null;
@@ -196154,44 +195680,44 @@ function $c87311424ea30a05$var$cached$1(fn) {
196154
195680
  return res;
196155
195681
  };
196156
195682
  }
196157
- const $c87311424ea30a05$export$9ac100e40613ea10$1 = $c87311424ea30a05$var$cached$1(function() {
196158
- return $c87311424ea30a05$var$testPlatform$1(/^Mac/i);
195683
+ const $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {
195684
+ return $c87311424ea30a05$var$testPlatform(/^Mac/i);
196159
195685
  });
196160
- const $c87311424ea30a05$export$186c6964ca17d99$1 = $c87311424ea30a05$var$cached$1(function() {
196161
- return $c87311424ea30a05$var$testPlatform$1(/^iPhone/i);
195686
+ const $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {
195687
+ return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
196162
195688
  });
196163
- const $c87311424ea30a05$export$7bef049ce92e4224$1 = $c87311424ea30a05$var$cached$1(function() {
196164
- return $c87311424ea30a05$var$testPlatform$1(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
196165
- $c87311424ea30a05$export$9ac100e40613ea10$1() && navigator.maxTouchPoints > 1;
195689
+ const $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {
195690
+ return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
195691
+ $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
196166
195692
  });
196167
- const $c87311424ea30a05$export$fedb369cb70207f1$1 = $c87311424ea30a05$var$cached$1(function() {
196168
- return $c87311424ea30a05$export$186c6964ca17d99$1() || $c87311424ea30a05$export$7bef049ce92e4224$1();
195693
+ const $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {
195694
+ return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
196169
195695
  });
196170
- $c87311424ea30a05$var$cached$1(function() {
196171
- return $c87311424ea30a05$export$9ac100e40613ea10$1() || $c87311424ea30a05$export$fedb369cb70207f1$1();
195696
+ $c87311424ea30a05$var$cached(function() {
195697
+ return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
196172
195698
  });
196173
- const $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached$1(function() {
196174
- return $c87311424ea30a05$var$testUserAgent$1(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
195699
+ const $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {
195700
+ return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
196175
195701
  });
196176
- const $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached$1(function() {
196177
- return $c87311424ea30a05$var$testUserAgent$1(/Chrome/i);
195702
+ const $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {
195703
+ return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
196178
195704
  });
196179
- const $c87311424ea30a05$export$a11b0059900ceec8$1 = $c87311424ea30a05$var$cached$1(function() {
196180
- return $c87311424ea30a05$var$testUserAgent$1(/Android/i);
195705
+ const $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {
195706
+ return $c87311424ea30a05$var$testUserAgent(/Android/i);
196181
195707
  });
196182
- const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached$1(function() {
196183
- return $c87311424ea30a05$var$testUserAgent$1(/Firefox/i);
195708
+ const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {
195709
+ return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
196184
195710
  });
196185
195711
  function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
196186
195712
  var _window_event_type, _window_event;
196187
195713
  let { metaKey, ctrlKey, altKey, shiftKey } = modifiers;
196188
195714
  if ($c87311424ea30a05$export$b7d78993b74f766d() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
196189
- if ($c87311424ea30a05$export$9ac100e40613ea10$1())
195715
+ if ($c87311424ea30a05$export$9ac100e40613ea10())
196190
195716
  metaKey = true;
196191
195717
  else
196192
195718
  ctrlKey = true;
196193
195719
  }
196194
- let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10$1() && !$c87311424ea30a05$export$7bef049ce92e4224$1() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
195720
+ let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
196195
195721
  keyIdentifier: "Enter",
196196
195722
  metaKey,
196197
195723
  ctrlKey,
@@ -196325,12 +195851,32 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref2) {
196325
195851
  function $6a7db85432448f7f$export$60278871457622de(event) {
196326
195852
  if (event.mozInputSource === 0 && event.isTrusted)
196327
195853
  return true;
196328
- if ($c87311424ea30a05$export$a11b0059900ceec8$1() && event.pointerType)
195854
+ if ($c87311424ea30a05$export$a11b0059900ceec8() && event.pointerType)
196329
195855
  return event.type === "click" && event.buttons === 1;
196330
195856
  return event.detail === 0 && !event.pointerType;
196331
195857
  }
196332
195858
  function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
196333
- return !$c87311424ea30a05$export$a11b0059900ceec8$1() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
195859
+ return !$c87311424ea30a05$export$a11b0059900ceec8() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
195860
+ }
195861
+ const $b4b717babfbb907b$var$focusableElements = [
195862
+ "input:not([disabled]):not([type=hidden])",
195863
+ "select:not([disabled])",
195864
+ "textarea:not([disabled])",
195865
+ "button:not([disabled])",
195866
+ "a[href]",
195867
+ "area[href]",
195868
+ "summary",
195869
+ "iframe",
195870
+ "object",
195871
+ "embed",
195872
+ "audio[controls]",
195873
+ "video[controls]",
195874
+ '[contenteditable]:not([contenteditable^="false"])'
195875
+ ];
195876
+ const $b4b717babfbb907b$var$FOCUSABLE_ELEMENT_SELECTOR = $b4b717babfbb907b$var$focusableElements.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
195877
+ $b4b717babfbb907b$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
195878
+ function $b4b717babfbb907b$export$4c063cf1350e6fed(element2) {
195879
+ return element2.matches($b4b717babfbb907b$var$FOCUSABLE_ELEMENT_SELECTOR);
196334
195880
  }
196335
195881
  function $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {
196336
195882
  let event = nativeEvent;
@@ -196410,854 +195956,64 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
196410
195956
  ]);
196411
195957
  }
196412
195958
  let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
196413
- function _class_apply_descriptor_get(receiver, descriptor) {
196414
- if (descriptor.get)
196415
- return descriptor.get.call(receiver);
196416
- return descriptor.value;
196417
- }
196418
- function _class_extract_field_descriptor(receiver, privateMap, action) {
196419
- if (!privateMap.has(receiver))
196420
- throw new TypeError("attempted to " + action + " private field on non-instance");
196421
- return privateMap.get(receiver);
196422
- }
196423
- function _class_private_field_get(receiver, privateMap) {
196424
- var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
196425
- return _class_apply_descriptor_get(receiver, descriptor);
196426
- }
196427
- function _class_apply_descriptor_set(receiver, descriptor, value) {
196428
- if (descriptor.set)
196429
- descriptor.set.call(receiver, value);
196430
- else {
196431
- if (!descriptor.writable) {
196432
- throw new TypeError("attempted to set read only private field");
196433
- }
196434
- descriptor.value = value;
196435
- }
196436
- }
196437
- function _class_private_field_set(receiver, privateMap, value) {
196438
- var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
196439
- _class_apply_descriptor_set(receiver, descriptor, value);
196440
- return value;
196441
- }
196442
- let $507fabe10e71c6fb$var$currentModality = null;
196443
- let $507fabe10e71c6fb$var$changeHandlers = /* @__PURE__ */ new Set();
196444
- let $507fabe10e71c6fb$export$d90243b58daecda7 = /* @__PURE__ */ new Map();
196445
- let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
196446
- let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
196447
- const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
196448
- Tab: true,
196449
- Escape: true
196450
- };
196451
- function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
196452
- for (let handler of $507fabe10e71c6fb$var$changeHandlers)
196453
- handler(modality, e);
196454
- }
196455
- function $507fabe10e71c6fb$var$isValidKey(e) {
196456
- return !(e.metaKey || !$c87311424ea30a05$export$9ac100e40613ea10$1() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
196457
- }
196458
- function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
196459
- $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196460
- if ($507fabe10e71c6fb$var$isValidKey(e)) {
196461
- $507fabe10e71c6fb$var$currentModality = "keyboard";
196462
- $507fabe10e71c6fb$var$triggerChangeHandlers("keyboard", e);
196463
- }
196464
- }
196465
- function $507fabe10e71c6fb$var$handlePointerEvent(e) {
196466
- $507fabe10e71c6fb$var$currentModality = "pointer";
196467
- if (e.type === "mousedown" || e.type === "pointerdown") {
196468
- $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196469
- $507fabe10e71c6fb$var$triggerChangeHandlers("pointer", e);
196470
- }
196471
- }
196472
- function $507fabe10e71c6fb$var$handleClickEvent(e) {
196473
- if ($6a7db85432448f7f$export$60278871457622de(e)) {
196474
- $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196475
- $507fabe10e71c6fb$var$currentModality = "virtual";
196476
- }
196477
- }
196478
- function $507fabe10e71c6fb$var$handleFocusEvent(e) {
196479
- if (e.target === window || e.target === document || $8a9cb279dc87e130$export$fda7da73ab5d4c48 || !e.isTrusted)
196480
- return;
196481
- if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
196482
- $507fabe10e71c6fb$var$currentModality = "virtual";
196483
- $507fabe10e71c6fb$var$triggerChangeHandlers("virtual", e);
196484
- }
196485
- $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
196486
- $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
196487
- }
196488
- function $507fabe10e71c6fb$var$handleWindowBlur() {
196489
- $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
196490
- $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;
196491
- }
196492
- function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element2) {
196493
- if (typeof window === "undefined" || typeof document === "undefined" || $507fabe10e71c6fb$export$d90243b58daecda7.get($431fbd86ca7dc216$export$f21a1ffae260145a(element2)))
195959
+ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
195960
+ while (target && !$b4b717babfbb907b$export$4c063cf1350e6fed(target))
195961
+ target = target.parentElement;
195962
+ let window2 = $431fbd86ca7dc216$export$f21a1ffae260145a(target);
195963
+ let activeElement = window2.document.activeElement;
195964
+ if (!activeElement || activeElement === target)
196494
195965
  return;
196495
- const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element2);
196496
- const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196497
- let focus = windowObject.HTMLElement.prototype.focus;
196498
- windowObject.HTMLElement.prototype.focus = function() {
196499
- $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196500
- focus.apply(this, arguments);
196501
- };
196502
- documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196503
- documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196504
- documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
196505
- windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
196506
- windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
196507
- if (typeof PointerEvent !== "undefined") {
196508
- documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196509
- documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196510
- documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196511
- } else if (process.env.NODE_ENV === "test") {
196512
- documentObject.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196513
- documentObject.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196514
- documentObject.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196515
- }
196516
- windowObject.addEventListener("beforeunload", () => {
196517
- $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element2);
196518
- }, {
196519
- once: true
196520
- });
196521
- $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
196522
- focus
196523
- });
196524
- }
196525
- const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element2, loadListener) => {
196526
- const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element2);
196527
- const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196528
- if (loadListener)
196529
- documentObject.removeEventListener("DOMContentLoaded", loadListener);
196530
- if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject))
196531
- return;
196532
- windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
196533
- documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196534
- documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196535
- documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
196536
- windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
196537
- windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
196538
- if (typeof PointerEvent !== "undefined") {
196539
- documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196540
- documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196541
- documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196542
- } else if (process.env.NODE_ENV === "test") {
196543
- documentObject.removeEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196544
- documentObject.removeEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196545
- documentObject.removeEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196546
- }
196547
- $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
196548
- };
196549
- function $507fabe10e71c6fb$export$2f1888112f558a7d(element2) {
196550
- const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196551
- let loadListener;
196552
- if (documentObject.readyState !== "loading")
196553
- $507fabe10e71c6fb$var$setupGlobalFocusEvents(element2);
196554
- else {
196555
- loadListener = () => {
196556
- $507fabe10e71c6fb$var$setupGlobalFocusEvents(element2);
196557
- };
196558
- documentObject.addEventListener("DOMContentLoaded", loadListener);
196559
- }
196560
- return () => $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element2, loadListener);
196561
- }
196562
- if (typeof document !== "undefined")
196563
- $507fabe10e71c6fb$export$2f1888112f558a7d();
196564
- function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
196565
- return $507fabe10e71c6fb$var$currentModality !== "pointer";
196566
- }
196567
- function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
196568
- return $507fabe10e71c6fb$var$currentModality;
196569
- }
196570
- const $507fabe10e71c6fb$var$nonTextInputTypes = /* @__PURE__ */ new Set([
196571
- "checkbox",
196572
- "radio",
196573
- "range",
196574
- "color",
196575
- "file",
196576
- "image",
196577
- "button",
196578
- "submit",
196579
- "reset"
196580
- ]);
196581
- function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
196582
- let document1 = $431fbd86ca7dc216$export$b204af158042fbac(e === null || e === void 0 ? void 0 : e.target);
196583
- const IHTMLInputElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
196584
- const IHTMLTextAreaElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
196585
- const IHTMLElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
196586
- const IKeyboardEvent = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
196587
- isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;
196588
- return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
196589
- }
196590
- function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
196591
- $507fabe10e71c6fb$var$setupGlobalFocusEvents();
196592
- useEffect(() => {
196593
- let handler = (modality, e) => {
196594
- if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e))
196595
- return;
196596
- fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
196597
- };
196598
- $507fabe10e71c6fb$var$changeHandlers.add(handler);
196599
- return () => {
196600
- $507fabe10e71c6fb$var$changeHandlers.delete(handler);
196601
- };
196602
- }, deps);
196603
- }
196604
- function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
196605
- let { isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props;
196606
- const onBlur = useCallback((e) => {
196607
- if (e.target === e.currentTarget) {
196608
- if (onBlurProp)
196609
- onBlurProp(e);
196610
- if (onFocusChange)
196611
- onFocusChange(false);
196612
- return true;
196613
- }
196614
- }, [
196615
- onBlurProp,
196616
- onFocusChange
196617
- ]);
196618
- const onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur);
196619
- const onFocus = useCallback((e) => {
196620
- const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(e.target);
196621
- const activeElement = ownerDocument ? $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) : $d4ee10de306f2510$export$cd4e5573fbe2b576();
196622
- if (e.target === e.currentTarget && activeElement === $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) {
196623
- if (onFocusProp)
196624
- onFocusProp(e);
196625
- if (onFocusChange)
196626
- onFocusChange(true);
196627
- onSyntheticFocus(e);
196628
- }
196629
- }, [
196630
- onFocusChange,
196631
- onFocusProp,
196632
- onSyntheticFocus
196633
- ]);
196634
- return {
196635
- focusProps: {
196636
- onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : void 0,
196637
- onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : void 0
196638
- }
196639
- };
196640
- }
196641
- function $93925083ecbb358c$export$48d1ea6320830260(handler) {
196642
- if (!handler)
196643
- return void 0;
196644
- let shouldStopPropagation = true;
196645
- return (e) => {
196646
- let event = {
196647
- ...e,
196648
- preventDefault() {
196649
- e.preventDefault();
196650
- },
196651
- isDefaultPrevented() {
196652
- return e.isDefaultPrevented();
196653
- },
196654
- stopPropagation() {
196655
- if (shouldStopPropagation && process.env.NODE_ENV !== "production")
196656
- console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
196657
- else
196658
- shouldStopPropagation = true;
196659
- },
196660
- continuePropagation() {
196661
- shouldStopPropagation = false;
196662
- },
196663
- isPropagationStopped() {
196664
- return shouldStopPropagation;
195966
+ $8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
195967
+ let isRefocusing = false;
195968
+ let onBlur = (e) => {
195969
+ if (e.target === activeElement || isRefocusing)
195970
+ e.stopImmediatePropagation();
195971
+ };
195972
+ let onFocusOut = (e) => {
195973
+ if (e.target === activeElement || isRefocusing) {
195974
+ e.stopImmediatePropagation();
195975
+ if (!target && !isRefocusing) {
195976
+ isRefocusing = true;
195977
+ $7215afc6de606d6b$export$de79e2c695e052f3(activeElement);
195978
+ cleanup();
196665
195979
  }
196666
- };
196667
- handler(event);
196668
- if (shouldStopPropagation)
196669
- e.stopPropagation();
196670
- };
196671
- }
196672
- function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
196673
- return {
196674
- keyboardProps: props.isDisabled ? {} : {
196675
- onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
196676
- onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
196677
195980
  }
196678
195981
  };
196679
- }
196680
- function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
196681
- let { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
196682
- let state = useRef({
196683
- isFocusWithin: false
196684
- });
196685
- let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
196686
- let onBlur = useCallback((e) => {
196687
- if (!e.currentTarget.contains(e.target))
196688
- return;
196689
- if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {
196690
- state.current.isFocusWithin = false;
196691
- removeAllGlobalListeners();
196692
- if (onBlurWithin)
196693
- onBlurWithin(e);
196694
- if (onFocusWithinChange)
196695
- onFocusWithinChange(false);
196696
- }
196697
- }, [
196698
- onBlurWithin,
196699
- onFocusWithinChange,
196700
- state,
196701
- removeAllGlobalListeners
196702
- ]);
196703
- let onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur);
196704
- let onFocus = useCallback((e) => {
196705
- if (!e.currentTarget.contains(e.target))
196706
- return;
196707
- const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(e.target);
196708
- const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
196709
- if (!state.current.isFocusWithin && activeElement === $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) {
196710
- if (onFocusWithin)
196711
- onFocusWithin(e);
196712
- if (onFocusWithinChange)
196713
- onFocusWithinChange(true);
196714
- state.current.isFocusWithin = true;
196715
- onSyntheticFocus(e);
196716
- let currentTarget = e.currentTarget;
196717
- addGlobalListener(ownerDocument, "focus", (e2) => {
196718
- if (state.current.isFocusWithin && !$d4ee10de306f2510$export$4282f70798064fe0(currentTarget, e2.target)) {
196719
- let nativeEvent = new ownerDocument.defaultView.FocusEvent("blur", {
196720
- relatedTarget: e2.target
196721
- });
196722
- $8a9cb279dc87e130$export$c2b7abe5d61ec696(nativeEvent, currentTarget);
196723
- let event = $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent);
196724
- onBlur(event);
196725
- }
196726
- }, {
196727
- capture: true
196728
- });
196729
- }
196730
- }, [
196731
- onFocusWithin,
196732
- onFocusWithinChange,
196733
- onSyntheticFocus,
196734
- addGlobalListener,
196735
- onBlur
196736
- ]);
196737
- if (isDisabled)
196738
- return {
196739
- focusWithinProps: {
196740
- // These cannot be null, that would conflict in mergeProps
196741
- onFocus: void 0,
196742
- onBlur: void 0
196743
- }
196744
- };
196745
- return {
196746
- focusWithinProps: {
196747
- onFocus,
196748
- onBlur
196749
- }
195982
+ let onFocus = (e) => {
195983
+ if (e.target === target || isRefocusing)
195984
+ e.stopImmediatePropagation();
196750
195985
  };
196751
- }
196752
- function forwardRef$1(component) {
196753
- return forwardRef$2(component);
196754
- }
196755
- function createContext2(options = {}) {
196756
- const {
196757
- strict = true,
196758
- errorMessage = "useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",
196759
- name
196760
- } = options;
196761
- const Context3 = React.createContext(void 0);
196762
- Context3.displayName = name;
196763
- function useContext2() {
196764
- var _a3;
196765
- const context = React.useContext(Context3);
196766
- if (!context && strict) {
196767
- const error = new Error(errorMessage);
196768
- error.name = "ContextError";
196769
- (_a3 = Error.captureStackTrace) == null ? void 0 : _a3.call(Error, error, useContext2);
196770
- throw error;
196771
- }
196772
- return context;
196773
- }
196774
- return [Context3.Provider, useContext2, Context3];
196775
- }
196776
- function useDOMRef(ref2) {
196777
- const domRef = useRef(null);
196778
- useImperativeHandle(ref2, () => domRef.current);
196779
- return domRef;
196780
- }
196781
- process.env.NODE_ENV !== "production";
196782
- process.env.NODE_ENV === "test";
196783
- var dataAttr = (condition) => condition ? "true" : void 0;
196784
- function toVal(mix) {
196785
- var k2, y2, str = "";
196786
- if (typeof mix === "string" || typeof mix === "number") {
196787
- str += mix;
196788
- } else if (typeof mix === "object") {
196789
- if (Array.isArray(mix)) {
196790
- for (k2 = 0; k2 < mix.length; k2++) {
196791
- if (mix[k2]) {
196792
- if (y2 = toVal(mix[k2])) {
196793
- str && (str += " ");
196794
- str += y2;
196795
- }
196796
- }
196797
- }
196798
- } else {
196799
- for (k2 in mix) {
196800
- if (mix[k2]) {
196801
- str && (str += " ");
196802
- str += k2;
196803
- }
196804
- }
196805
- }
196806
- }
196807
- return str;
196808
- }
196809
- function clsx(...args) {
196810
- var i2 = 0, tmp, x2, str = "";
196811
- while (i2 < args.length) {
196812
- if (tmp = args[i2++]) {
196813
- if (x2 = toVal(tmp)) {
196814
- str && (str += " ");
196815
- str += x2;
195986
+ let onFocusIn = (e) => {
195987
+ if (e.target === target || isRefocusing) {
195988
+ e.stopImmediatePropagation();
195989
+ if (!isRefocusing) {
195990
+ isRefocusing = true;
195991
+ $7215afc6de606d6b$export$de79e2c695e052f3(activeElement);
195992
+ cleanup();
196816
195993
  }
196817
195994
  }
196818
- }
196819
- return str;
196820
- }
196821
- function getUniqueID(prefix) {
196822
- return `${prefix}-${Math.floor(Math.random() * 1e6)}`;
196823
- }
196824
- function objectToDeps(obj) {
196825
- if (!obj || typeof obj !== "object") {
196826
- return "";
196827
- }
196828
- try {
196829
- return JSON.stringify(obj);
196830
- } catch (e) {
196831
- return "";
196832
- }
196833
- }
196834
- function clamp(value, min, max) {
196835
- return Math.min(Math.max(value, min), max);
196836
- }
196837
- var warningStack = {};
196838
- function warn(message, component, ...args) {
196839
- const tag = component ? ` [${component}]` : " ";
196840
- const log2 = `[Hero UI]${tag}: ${message}`;
196841
- if (typeof console === "undefined")
196842
- return;
196843
- if (warningStack[log2])
196844
- return;
196845
- warningStack[log2] = true;
196846
- if (process.env.NODE_ENV !== "production") {
196847
- return console.warn(log2, args);
196848
- }
196849
- }
196850
- var DOMPropNames = /* @__PURE__ */ new Set([
196851
- "id",
196852
- "type",
196853
- "style",
196854
- "title",
196855
- "role",
196856
- "tabIndex",
196857
- "htmlFor",
196858
- "width",
196859
- "height",
196860
- "abbr",
196861
- "accept",
196862
- "acceptCharset",
196863
- "accessKey",
196864
- "action",
196865
- "allowFullScreen",
196866
- "allowTransparency",
196867
- "alt",
196868
- "async",
196869
- "autoComplete",
196870
- "autoFocus",
196871
- "autoPlay",
196872
- "cellPadding",
196873
- "cellSpacing",
196874
- "challenge",
196875
- "charset",
196876
- "checked",
196877
- "cite",
196878
- "class",
196879
- "className",
196880
- "cols",
196881
- "colSpan",
196882
- "command",
196883
- "content",
196884
- "contentEditable",
196885
- "contextMenu",
196886
- "controls",
196887
- "coords",
196888
- "crossOrigin",
196889
- "data",
196890
- "dateTime",
196891
- "default",
196892
- "defer",
196893
- "dir",
196894
- "disabled",
196895
- "download",
196896
- "draggable",
196897
- "dropzone",
196898
- "encType",
196899
- "enterKeyHint",
196900
- "for",
196901
- "form",
196902
- "formAction",
196903
- "formEncType",
196904
- "formMethod",
196905
- "formNoValidate",
196906
- "formTarget",
196907
- "frameBorder",
196908
- "headers",
196909
- "hidden",
196910
- "high",
196911
- "href",
196912
- "hrefLang",
196913
- "httpEquiv",
196914
- "icon",
196915
- "inputMode",
196916
- "isMap",
196917
- "itemId",
196918
- "itemProp",
196919
- "itemRef",
196920
- "itemScope",
196921
- "itemType",
196922
- "kind",
196923
- "label",
196924
- "lang",
196925
- "list",
196926
- "loop",
196927
- "manifest",
196928
- "max",
196929
- "maxLength",
196930
- "media",
196931
- "mediaGroup",
196932
- "method",
196933
- "min",
196934
- "minLength",
196935
- "multiple",
196936
- "muted",
196937
- "name",
196938
- "noValidate",
196939
- "open",
196940
- "optimum",
196941
- "pattern",
196942
- "ping",
196943
- "placeholder",
196944
- "poster",
196945
- "preload",
196946
- "radioGroup",
196947
- "referrerPolicy",
196948
- "readOnly",
196949
- "rel",
196950
- "required",
196951
- "rows",
196952
- "rowSpan",
196953
- "sandbox",
196954
- "scope",
196955
- "scoped",
196956
- "scrolling",
196957
- "seamless",
196958
- "selected",
196959
- "shape",
196960
- "size",
196961
- "sizes",
196962
- "slot",
196963
- "sortable",
196964
- "span",
196965
- "spellCheck",
196966
- "src",
196967
- "srcDoc",
196968
- "srcSet",
196969
- "start",
196970
- "step",
196971
- "target",
196972
- "translate",
196973
- "typeMustMatch",
196974
- "useMap",
196975
- "value",
196976
- "wmode",
196977
- "wrap"
196978
- ]);
196979
- var DOMEventNames = /* @__PURE__ */ new Set([
196980
- "onCopy",
196981
- "onCut",
196982
- "onPaste",
196983
- "onLoad",
196984
- "onError",
196985
- "onWheel",
196986
- "onScroll",
196987
- "onCompositionEnd",
196988
- "onCompositionStart",
196989
- "onCompositionUpdate",
196990
- "onKeyDown",
196991
- "onKeyPress",
196992
- "onKeyUp",
196993
- "onFocus",
196994
- "onBlur",
196995
- "onChange",
196996
- "onInput",
196997
- "onSubmit",
196998
- "onClick",
196999
- "onContextMenu",
197000
- "onDoubleClick",
197001
- "onDrag",
197002
- "onDragEnd",
197003
- "onDragEnter",
197004
- "onDragExit",
197005
- "onDragLeave",
197006
- "onDragOver",
197007
- "onDragStart",
197008
- "onDrop",
197009
- "onMouseDown",
197010
- "onMouseEnter",
197011
- "onMouseLeave",
197012
- "onMouseMove",
197013
- "onMouseOut",
197014
- "onMouseOver",
197015
- "onMouseUp",
197016
- "onPointerDown",
197017
- "onPointerEnter",
197018
- "onPointerLeave",
197019
- "onPointerUp",
197020
- "onSelect",
197021
- "onTouchCancel",
197022
- "onTouchEnd",
197023
- "onTouchMove",
197024
- "onTouchStart",
197025
- "onAnimationStart",
197026
- "onAnimationEnd",
197027
- "onAnimationIteration",
197028
- "onTransitionEnd"
197029
- ]);
197030
- var propRe = /^(data-.*)$/;
197031
- var ariaRe = /^(aria-.*)$/;
197032
- var funcRe = /^(on[A-Z].*)$/;
197033
- function filterDOMProps(props, opts = {}) {
197034
- let {
197035
- labelable = true,
197036
- enabled = true,
197037
- propNames,
197038
- omitPropNames,
197039
- omitEventNames,
197040
- omitDataProps,
197041
- omitEventProps
197042
- } = opts;
197043
- let filteredProps = {};
197044
- if (!enabled) {
197045
- return props;
197046
- }
197047
- for (const prop in props) {
197048
- if (omitPropNames == null ? void 0 : omitPropNames.has(prop)) {
197049
- continue;
197050
- }
197051
- if ((omitEventNames == null ? void 0 : omitEventNames.has(prop)) && funcRe.test(prop)) {
197052
- continue;
197053
- }
197054
- if (funcRe.test(prop) && !DOMEventNames.has(prop)) {
197055
- continue;
197056
- }
197057
- if (omitDataProps && propRe.test(prop)) {
197058
- continue;
197059
- }
197060
- if (omitEventProps && funcRe.test(prop)) {
197061
- continue;
197062
- }
197063
- if (Object.prototype.hasOwnProperty.call(props, prop) && (DOMPropNames.has(prop) || labelable && ariaRe.test(prop) || (propNames == null ? void 0 : propNames.has(prop)) || propRe.test(prop)) || funcRe.test(prop)) {
197064
- filteredProps[prop] = props[prop];
197065
- }
197066
- }
197067
- return filteredProps;
197068
- }
197069
- var [ButtonGroupProvider, useButtonGroupContext] = createContext2({
197070
- name: "ButtonGroupContext",
197071
- strict: false
197072
- });
197073
- function $6a99195332edec8b$export$80f3e147d781571c(element2) {
197074
- const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(element2);
197075
- if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual") {
197076
- let lastFocusedElement = ownerDocument.activeElement;
197077
- $bbed8b41f857bcc0$export$24490316f764c430(() => {
197078
- if (ownerDocument.activeElement === lastFocusedElement && element2.isConnected)
197079
- $7215afc6de606d6b$export$de79e2c695e052f3(element2);
197080
- });
197081
- } else
197082
- $7215afc6de606d6b$export$de79e2c695e052f3(element2);
197083
- }
197084
- function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
197085
- let { autoFocus = false, isTextInput, within } = props;
197086
- let state = useRef({
197087
- isFocused: false,
197088
- isFocusVisible: autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27()
197089
- });
197090
- let [isFocused, setFocused] = useState(false);
197091
- let [isFocusVisibleState, setFocusVisible] = useState(() => state.current.isFocused && state.current.isFocusVisible);
197092
- let updateState2 = useCallback(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
197093
- let onFocusChange = useCallback((isFocused2) => {
197094
- state.current.isFocused = isFocused2;
197095
- setFocused(isFocused2);
197096
- updateState2();
197097
- }, [
197098
- updateState2
197099
- ]);
197100
- $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible) => {
197101
- state.current.isFocusVisible = isFocusVisible;
197102
- updateState2();
197103
- }, [], {
197104
- isTextInput
197105
- });
197106
- let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6({
197107
- isDisabled: within,
197108
- onFocusChange
197109
- });
197110
- let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
197111
- isDisabled: !within,
197112
- onFocusWithinChange: onFocusChange
197113
- });
197114
- return {
197115
- isFocused,
197116
- isFocusVisible: isFocusVisibleState,
197117
- focusProps: within ? focusWithinProps : focusProps
197118
- };
197119
- }
197120
- let $e6afbd83fe6ebbd2$var$FocusableContext = /* @__PURE__ */ React__default.createContext(null);
197121
- function $e6afbd83fe6ebbd2$var$useFocusableContext(ref2) {
197122
- let context = useContext($e6afbd83fe6ebbd2$var$FocusableContext) || {};
197123
- $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref2);
197124
- let { ref: _2, ...otherProps } = context;
197125
- return otherProps;
197126
- }
197127
- function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
197128
- let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
197129
- let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
197130
- let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928$1(focusProps, keyboardProps);
197131
- let domProps = $e6afbd83fe6ebbd2$var$useFocusableContext(domRef);
197132
- let interactionProps = props.isDisabled ? {} : domProps;
197133
- let autoFocusRef = useRef(props.autoFocus);
197134
- useEffect(() => {
197135
- if (autoFocusRef.current && domRef.current)
197136
- $6a99195332edec8b$export$80f3e147d781571c(domRef.current);
197137
- autoFocusRef.current = false;
197138
- }, [
197139
- domRef
197140
- ]);
197141
- return {
197142
- focusableProps: $3ef42575df84b30b$export$9d1611c77c2fe928$1({
197143
- ...interactions,
197144
- tabIndex: props.excludeFromTabOrder && !props.isDisabled ? -1 : void 0
197145
- }, interactionProps)
197146
- };
197147
- }
197148
- let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
197149
- function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
197150
- if (idA === idB)
197151
- return idA;
197152
- let setIdsA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);
197153
- if (setIdsA) {
197154
- setIdsA.forEach((fn) => fn(idB));
197155
- return idB;
197156
- }
197157
- let setIdsB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);
197158
- if (setIdsB) {
197159
- setIdsB.forEach((fn) => fn(idA));
197160
- return idA;
197161
- }
197162
- return idB;
197163
- }
197164
- function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
197165
- return (...args) => {
197166
- for (let callback of callbacks)
197167
- if (typeof callback === "function")
197168
- callback(...args);
197169
- };
197170
- }
197171
- function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
197172
- let result = {
197173
- ...args[0]
197174
195995
  };
197175
- for (let i2 = 1; i2 < args.length; i2++) {
197176
- let props = args[i2];
197177
- for (let key2 in props) {
197178
- let a2 = result[key2];
197179
- let b = props[key2];
197180
- if (typeof a2 === "function" && typeof b === "function" && // This is a lot faster than a regex.
197181
- key2[0] === "o" && key2[1] === "n" && key2.charCodeAt(2) >= /* 'A' */
197182
- 65 && key2.charCodeAt(2) <= /* 'Z' */
197183
- 90)
197184
- result[key2] = $ff5963eb1fccf552$export$e08e3b67e392101e(a2, b);
197185
- else if ((key2 === "className" || key2 === "UNSAFE_className") && typeof a2 === "string" && typeof b === "string")
197186
- result[key2] = clsx$1(a2, b);
197187
- else if (key2 === "id" && a2 && b)
197188
- result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a2, b);
197189
- else
197190
- result[key2] = b !== void 0 ? b : a2;
197191
- }
197192
- }
197193
- return result;
197194
- }
197195
- const $65484d02dcb7eb3e$var$DOMPropNames = /* @__PURE__ */ new Set([
197196
- "id"
197197
- ]);
197198
- const $65484d02dcb7eb3e$var$labelablePropNames = /* @__PURE__ */ new Set([
197199
- "aria-label",
197200
- "aria-labelledby",
197201
- "aria-describedby",
197202
- "aria-details"
197203
- ]);
197204
- const $65484d02dcb7eb3e$var$linkPropNames = /* @__PURE__ */ new Set([
197205
- "href",
197206
- "hrefLang",
197207
- "target",
197208
- "rel",
197209
- "download",
197210
- "ping",
197211
- "referrerPolicy"
197212
- ]);
197213
- const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
197214
- function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
197215
- let { labelable, isLink, propNames } = opts;
197216
- let filteredProps = {};
197217
- for (const prop in props)
197218
- if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop)))
197219
- filteredProps[prop] = props[prop];
197220
- return filteredProps;
197221
- }
197222
- function $c87311424ea30a05$var$testUserAgent(re2) {
197223
- var _window_navigator_userAgentData;
197224
- if (typeof window === "undefined" || window.navigator == null)
197225
- return false;
197226
- return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand) => re2.test(brand.brand))) || re2.test(window.navigator.userAgent);
197227
- }
197228
- function $c87311424ea30a05$var$testPlatform(re2) {
197229
- var _window_navigator_userAgentData;
197230
- return typeof window !== "undefined" && window.navigator != null ? re2.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
197231
- }
197232
- function $c87311424ea30a05$var$cached(fn) {
197233
- let res = null;
197234
- return () => {
197235
- if (res == null)
197236
- res = fn();
197237
- return res;
195996
+ window2.addEventListener("blur", onBlur, true);
195997
+ window2.addEventListener("focusout", onFocusOut, true);
195998
+ window2.addEventListener("focusin", onFocusIn, true);
195999
+ window2.addEventListener("focus", onFocus, true);
196000
+ let cleanup = () => {
196001
+ cancelAnimationFrame(raf);
196002
+ window2.removeEventListener("blur", onBlur, true);
196003
+ window2.removeEventListener("focusout", onFocusOut, true);
196004
+ window2.removeEventListener("focusin", onFocusIn, true);
196005
+ window2.removeEventListener("focus", onFocus, true);
196006
+ $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
196007
+ isRefocusing = false;
197238
196008
  };
196009
+ let raf = requestAnimationFrame(cleanup);
196010
+ return cleanup;
197239
196011
  }
197240
- const $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {
197241
- return $c87311424ea30a05$var$testPlatform(/^Mac/i);
197242
- });
197243
- const $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {
197244
- return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
197245
- });
197246
- const $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {
197247
- return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
197248
- $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
197249
- });
197250
- const $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {
197251
- return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
197252
- });
197253
- const $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {
197254
- return $c87311424ea30a05$var$testUserAgent(/Android/i);
197255
- });
197256
196012
  let $14c0b72509d70225$var$state = "default";
197257
196013
  let $14c0b72509d70225$var$savedUserSelect = "";
197258
196014
  let $14c0b72509d70225$var$modifiedElementMap = /* @__PURE__ */ new WeakMap();
197259
196015
  function $14c0b72509d70225$export$16a4697467175487(target) {
197260
- if ($c87311424ea30a05$export$fedb369cb70207f1$1()) {
196016
+ if ($c87311424ea30a05$export$fedb369cb70207f1()) {
197261
196017
  if ($14c0b72509d70225$var$state === "default") {
197262
196018
  const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(target);
197263
196019
  $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
@@ -197265,12 +196021,13 @@ function $14c0b72509d70225$export$16a4697467175487(target) {
197265
196021
  }
197266
196022
  $14c0b72509d70225$var$state = "disabled";
197267
196023
  } else if (target instanceof HTMLElement || target instanceof SVGElement) {
197268
- $14c0b72509d70225$var$modifiedElementMap.set(target, target.style.userSelect);
197269
- target.style.userSelect = "none";
196024
+ let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
196025
+ $14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);
196026
+ target.style[property] = "none";
197270
196027
  }
197271
196028
  }
197272
196029
  function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
197273
- if ($c87311424ea30a05$export$fedb369cb70207f1$1()) {
196030
+ if ($c87311424ea30a05$export$fedb369cb70207f1()) {
197274
196031
  if ($14c0b72509d70225$var$state !== "disabled")
197275
196032
  return;
197276
196033
  $14c0b72509d70225$var$state = "restoring";
@@ -197288,8 +196045,9 @@ function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
197288
196045
  } else if (target instanceof HTMLElement || target instanceof SVGElement) {
197289
196046
  if (target && $14c0b72509d70225$var$modifiedElementMap.has(target)) {
197290
196047
  let targetOldUserSelect = $14c0b72509d70225$var$modifiedElementMap.get(target);
197291
- if (target.style.userSelect === "none")
197292
- target.style.userSelect = targetOldUserSelect;
196048
+ let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
196049
+ if (target.style[property] === "none")
196050
+ target.style[property] = targetOldUserSelect;
197293
196051
  if (target.getAttribute("style") === "")
197294
196052
  target.removeAttribute("style");
197295
196053
  $14c0b72509d70225$var$modifiedElementMap.delete(target);
@@ -197301,11 +196059,40 @@ const $ae1eeba8b9eafd08$export$5165eccb35aaadb5 = React__default.createContext({
197301
196059
  }
197302
196060
  });
197303
196061
  $ae1eeba8b9eafd08$export$5165eccb35aaadb5.displayName = "PressResponderContext";
196062
+ function _class_apply_descriptor_get(receiver, descriptor) {
196063
+ if (descriptor.get)
196064
+ return descriptor.get.call(receiver);
196065
+ return descriptor.value;
196066
+ }
196067
+ function _class_extract_field_descriptor(receiver, privateMap, action) {
196068
+ if (!privateMap.has(receiver))
196069
+ throw new TypeError("attempted to " + action + " private field on non-instance");
196070
+ return privateMap.get(receiver);
196071
+ }
196072
+ function _class_private_field_get(receiver, privateMap) {
196073
+ var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
196074
+ return _class_apply_descriptor_get(receiver, descriptor);
196075
+ }
196076
+ function _class_apply_descriptor_set(receiver, descriptor, value) {
196077
+ if (descriptor.set)
196078
+ descriptor.set.call(receiver, value);
196079
+ else {
196080
+ if (!descriptor.writable) {
196081
+ throw new TypeError("attempted to set read only private field");
196082
+ }
196083
+ descriptor.value = value;
196084
+ }
196085
+ }
196086
+ function _class_private_field_set(receiver, privateMap, value) {
196087
+ var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
196088
+ _class_apply_descriptor_set(receiver, descriptor, value);
196089
+ return value;
196090
+ }
197304
196091
  function $f6c31cce2adf654f$var$usePressResponderContext(props) {
197305
196092
  let context = useContext($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
197306
196093
  if (context) {
197307
196094
  let { register: register2, ...contextProps } = context;
197308
- props = $3ef42575df84b30b$export$9d1611c77c2fe928$1(contextProps, props);
196095
+ props = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
197309
196096
  register2();
197310
196097
  }
197311
196098
  $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, props.ref);
@@ -197355,33 +196142,21 @@ class $f6c31cce2adf654f$var$PressEvent {
197355
196142
  }
197356
196143
  }
197357
196144
  const $f6c31cce2adf654f$var$LINK_CLICKED = Symbol("linkClicked");
196145
+ const $f6c31cce2adf654f$var$STYLE_ID = "react-aria-pressable-style";
196146
+ const $f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE = "data-react-aria-pressable";
197358
196147
  function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197359
- let {
197360
- onPress,
197361
- onPressChange,
197362
- onPressStart,
197363
- onPressEnd,
197364
- onPressUp,
197365
- isDisabled,
197366
- isPressed: isPressedProp,
197367
- preventFocusOnPress,
197368
- shouldCancelOnPointerExit,
197369
- allowTextSelectionOnPress,
197370
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
197371
- ref: _2,
197372
- ...domProps
197373
- } = $f6c31cce2adf654f$var$usePressResponderContext(props);
196148
+ let { onPress, onPressChange, onPressStart, onPressEnd, onPressUp, onClick, isDisabled, isPressed: isPressedProp, preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, ref: domRef, ...domProps } = $f6c31cce2adf654f$var$usePressResponderContext(props);
197374
196149
  let [isPressed, setPressed] = useState(false);
197375
196150
  let ref2 = useRef({
197376
196151
  isPressed: false,
197377
196152
  ignoreEmulatedMouseEvents: false,
197378
- ignoreClickAfterPress: false,
197379
196153
  didFirePressStart: false,
197380
196154
  isTriggeringEvent: false,
197381
196155
  activePointerId: null,
197382
196156
  target: null,
197383
196157
  isOverTarget: false,
197384
- pointerType: null
196158
+ pointerType: null,
196159
+ disposables: []
197385
196160
  });
197386
196161
  let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
197387
196162
  let triggerPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType) => {
@@ -197406,7 +196181,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197406
196181
  let state = ref2.current;
197407
196182
  if (!state.didFirePressStart)
197408
196183
  return false;
197409
- state.ignoreClickAfterPress = true;
197410
196184
  state.didFirePressStart = false;
197411
196185
  state.isTriggeringEvent = true;
197412
196186
  let shouldStopPropagation = true;
@@ -197442,7 +196216,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197442
196216
  let cancel = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
197443
196217
  let state = ref2.current;
197444
196218
  if (state.isPressed && state.target) {
197445
- if (state.isOverTarget && state.pointerType != null)
196219
+ if (state.didFirePressStart && state.pointerType != null)
197446
196220
  triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
197447
196221
  state.isPressed = false;
197448
196222
  state.isOverTarget = false;
@@ -197451,56 +196225,76 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197451
196225
  removeAllGlobalListeners();
197452
196226
  if (!allowTextSelectionOnPress)
197453
196227
  $14c0b72509d70225$export$b0d6fa1ab32e3295(state.target);
196228
+ for (let dispose2 of state.disposables)
196229
+ dispose2();
196230
+ state.disposables = [];
197454
196231
  }
197455
196232
  });
197456
196233
  let cancelOnPointerExit = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
197457
196234
  if (shouldCancelOnPointerExit)
197458
196235
  cancel(e);
197459
196236
  });
196237
+ let triggerClick = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
196238
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
196239
+ });
196240
+ let triggerSyntheticClick = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e, target) => {
196241
+ if (onClick) {
196242
+ let event = new MouseEvent("click", e);
196243
+ $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target);
196244
+ onClick($8a9cb279dc87e130$export$525bc4921d56d4a(event));
196245
+ }
196246
+ });
197460
196247
  let pressProps = useMemo(() => {
197461
196248
  let state = ref2.current;
197462
196249
  let pressProps2 = {
197463
196250
  onKeyDown(e) {
197464
- if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && e.currentTarget.contains(e.target)) {
196251
+ if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && $d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent))) {
197465
196252
  var _state_metaKeyEvents;
197466
- if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(e.target, e.key))
196253
+ if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent), e.key))
197467
196254
  e.preventDefault();
197468
196255
  let shouldStopPropagation = true;
197469
196256
  if (!state.isPressed && !e.repeat) {
197470
196257
  state.target = e.currentTarget;
197471
196258
  state.isPressed = true;
196259
+ state.pointerType = "keyboard";
197472
196260
  shouldStopPropagation = triggerPressStart(e, "keyboard");
197473
196261
  let originalTarget = e.currentTarget;
197474
196262
  let pressUp = (e2) => {
197475
- if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e2, originalTarget) && !e2.repeat && originalTarget.contains(e2.target) && state.target)
196263
+ if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e2, originalTarget) && !e2.repeat && $d4ee10de306f2510$export$4282f70798064fe0(originalTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e2)) && state.target)
197476
196264
  triggerPressUp($f6c31cce2adf654f$var$createEvent(state.target, e2), "keyboard");
197477
196265
  };
197478
- addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "keyup", $ff5963eb1fccf552$export$e08e3b67e392101e$1(pressUp, onKeyUp), true);
196266
+ addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "keyup", $ff5963eb1fccf552$export$e08e3b67e392101e(pressUp, onKeyUp), true);
197479
196267
  }
197480
196268
  if (shouldStopPropagation)
197481
196269
  e.stopPropagation();
197482
- if (e.metaKey && $c87311424ea30a05$export$9ac100e40613ea10$1())
196270
+ if (e.metaKey && $c87311424ea30a05$export$9ac100e40613ea10())
197483
196271
  (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.set(e.key, e.nativeEvent);
197484
196272
  } else if (e.key === "Meta")
197485
196273
  state.metaKeyEvents = /* @__PURE__ */ new Map();
197486
196274
  },
197487
196275
  onClick(e) {
197488
- if (e && !e.currentTarget.contains(e.target))
196276
+ if (e && !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197489
196277
  return;
197490
196278
  if (e && e.button === 0 && !state.isTriggeringEvent && !$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening) {
197491
196279
  let shouldStopPropagation = true;
197492
196280
  if (isDisabled)
197493
196281
  e.preventDefault();
197494
- if (!state.ignoreClickAfterPress && !state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === "virtual" || $6a7db85432448f7f$export$60278871457622de(e.nativeEvent))) {
197495
- if (!isDisabled && !preventFocusOnPress)
197496
- $7215afc6de606d6b$export$de79e2c695e052f3(e.currentTarget);
196282
+ if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === "virtual" || $6a7db85432448f7f$export$60278871457622de(e.nativeEvent))) {
197497
196283
  let stopPressStart = triggerPressStart(e, "virtual");
197498
196284
  let stopPressUp = triggerPressUp(e, "virtual");
197499
196285
  let stopPressEnd = triggerPressEnd(e, "virtual");
196286
+ triggerClick(e);
197500
196287
  shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
196288
+ } else if (state.isPressed && state.pointerType !== "keyboard") {
196289
+ let pointerType = state.pointerType || e.nativeEvent.pointerType || "virtual";
196290
+ let stopPressUp = triggerPressUp($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType);
196291
+ let stopPressEnd = triggerPressEnd($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType, true);
196292
+ shouldStopPropagation = stopPressUp && stopPressEnd;
196293
+ state.isOverTarget = false;
196294
+ triggerClick(e);
196295
+ cancel(e);
197501
196296
  }
197502
196297
  state.ignoreEmulatedMouseEvents = false;
197503
- state.ignoreClickAfterPress = false;
197504
196298
  if (shouldStopPropagation)
197505
196299
  e.stopPropagation();
197506
196300
  }
@@ -197510,12 +196304,15 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197510
196304
  var _state_metaKeyEvents;
197511
196305
  if (state.isPressed && state.target && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, state.target)) {
197512
196306
  var _state_metaKeyEvents1;
197513
- if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(e.target, e.key))
196307
+ if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e), e.key))
197514
196308
  e.preventDefault();
197515
- let target = e.target;
197516
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", state.target.contains(target));
196309
+ let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
196310
+ let wasPressed = $d4ee10de306f2510$export$4282f70798064fe0(state.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e));
196311
+ triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", wasPressed);
196312
+ if (wasPressed)
196313
+ triggerSyntheticClick(e, state.target);
197517
196314
  removeAllGlobalListeners();
197518
- if (e.key !== "Enter" && $f6c31cce2adf654f$var$isHTMLAnchorLink(state.target) && state.target.contains(target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED]) {
196315
+ if (e.key !== "Enter" && $f6c31cce2adf654f$var$isHTMLAnchorLink(state.target) && $d4ee10de306f2510$export$4282f70798064fe0(state.target, target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED]) {
197519
196316
  e[$f6c31cce2adf654f$var$LINK_CLICKED] = true;
197520
196317
  $ea8dcbcb9ea1b556$export$95185d699e05d4d7(state.target, e, false);
197521
196318
  }
@@ -197531,14 +196328,12 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197531
196328
  };
197532
196329
  if (typeof PointerEvent !== "undefined") {
197533
196330
  pressProps2.onPointerDown = (e) => {
197534
- if (e.button !== 0 || !e.currentTarget.contains(e.target))
196331
+ if (e.button !== 0 || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197535
196332
  return;
197536
196333
  if ($6a7db85432448f7f$export$29bf1b5f2c56cf63(e.nativeEvent)) {
197537
196334
  state.pointerType = "virtual";
197538
196335
  return;
197539
196336
  }
197540
- if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget))
197541
- e.preventDefault();
197542
196337
  state.pointerType = e.pointerType;
197543
196338
  let shouldStopPropagation = true;
197544
196339
  if (!state.isPressed) {
@@ -197546,12 +196341,10 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197546
196341
  state.isOverTarget = true;
197547
196342
  state.activePointerId = e.pointerId;
197548
196343
  state.target = e.currentTarget;
197549
- if (!isDisabled && !preventFocusOnPress)
197550
- $7215afc6de606d6b$export$de79e2c695e052f3(e.currentTarget);
197551
196344
  if (!allowTextSelectionOnPress)
197552
196345
  $14c0b72509d70225$export$16a4697467175487(state.target);
197553
196346
  shouldStopPropagation = triggerPressStart(e, state.pointerType);
197554
- let target = e.target;
196347
+ let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent);
197555
196348
  if ("releasePointerCapture" in target)
197556
196349
  target.releasePointerCapture(e.pointerId);
197557
196350
  addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "pointerup", onPointerUp, false);
@@ -197561,18 +196354,21 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197561
196354
  e.stopPropagation();
197562
196355
  };
197563
196356
  pressProps2.onMouseDown = (e) => {
197564
- if (!e.currentTarget.contains(e.target))
196357
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197565
196358
  return;
197566
196359
  if (e.button === 0) {
197567
- if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget))
197568
- e.preventDefault();
196360
+ if (preventFocusOnPress) {
196361
+ let dispose2 = $8a9cb279dc87e130$export$cabe61c495ee3649(e.target);
196362
+ if (dispose2)
196363
+ state.disposables.push(dispose2);
196364
+ }
197569
196365
  e.stopPropagation();
197570
196366
  }
197571
196367
  };
197572
196368
  pressProps2.onPointerUp = (e) => {
197573
- if (!e.currentTarget.contains(e.target) || state.pointerType === "virtual")
196369
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) || state.pointerType === "virtual")
197574
196370
  return;
197575
- if (e.button === 0)
196371
+ if (e.button === 0 && !state.isPressed)
197576
196372
  triggerPressUp(e, state.pointerType || e.pointerType);
197577
196373
  };
197578
196374
  pressProps2.onPointerEnter = (e) => {
@@ -197590,41 +196386,37 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197590
196386
  };
197591
196387
  let onPointerUp = (e) => {
197592
196388
  if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
197593
- if (state.target.contains(e.target) && state.pointerType != null)
197594
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
197595
- else if (state.isOverTarget && state.pointerType != null)
197596
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
197597
- state.isPressed = false;
196389
+ if ($d4ee10de306f2510$export$4282f70798064fe0(state.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) && state.pointerType != null) {
196390
+ let clicked = false;
196391
+ let timeout2 = setTimeout(() => {
196392
+ if (state.isPressed && state.target instanceof HTMLElement) {
196393
+ if (clicked)
196394
+ cancel(e);
196395
+ else {
196396
+ $7215afc6de606d6b$export$de79e2c695e052f3(state.target);
196397
+ state.target.click();
196398
+ }
196399
+ }
196400
+ }, 80);
196401
+ addGlobalListener(e.currentTarget, "click", () => clicked = true, true);
196402
+ state.disposables.push(() => clearTimeout(timeout2));
196403
+ } else
196404
+ cancel(e);
197598
196405
  state.isOverTarget = false;
197599
- state.activePointerId = null;
197600
- state.pointerType = null;
197601
- removeAllGlobalListeners();
197602
- if (!allowTextSelectionOnPress)
197603
- $14c0b72509d70225$export$b0d6fa1ab32e3295(state.target);
197604
- if ("ontouchend" in state.target && e.pointerType !== "mouse")
197605
- addGlobalListener(state.target, "touchend", onTouchEnd, {
197606
- once: true
197607
- });
197608
196406
  }
197609
196407
  };
197610
- let onTouchEnd = (e) => {
197611
- if ($f6c31cce2adf654f$var$shouldPreventDefaultUp(e.currentTarget))
197612
- e.preventDefault();
197613
- };
197614
196408
  let onPointerCancel = (e) => {
197615
196409
  cancel(e);
197616
196410
  };
197617
196411
  pressProps2.onDragStart = (e) => {
197618
- if (!e.currentTarget.contains(e.target))
196412
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197619
196413
  return;
197620
196414
  cancel(e);
197621
196415
  };
197622
- } else {
196416
+ } else if (process.env.NODE_ENV === "test") {
197623
196417
  pressProps2.onMouseDown = (e) => {
197624
- if (e.button !== 0 || !e.currentTarget.contains(e.target))
196418
+ if (e.button !== 0 || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197625
196419
  return;
197626
- if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget))
197627
- e.preventDefault();
197628
196420
  if (state.ignoreEmulatedMouseEvents) {
197629
196421
  e.stopPropagation();
197630
196422
  return;
@@ -197633,15 +196425,18 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197633
196425
  state.isOverTarget = true;
197634
196426
  state.target = e.currentTarget;
197635
196427
  state.pointerType = $6a7db85432448f7f$export$60278871457622de(e.nativeEvent) ? "virtual" : "mouse";
197636
- if (!isDisabled && !preventFocusOnPress)
197637
- $7215afc6de606d6b$export$de79e2c695e052f3(e.currentTarget);
197638
- let shouldStopPropagation = triggerPressStart(e, state.pointerType);
196428
+ let shouldStopPropagation = flushSync(() => triggerPressStart(e, state.pointerType));
197639
196429
  if (shouldStopPropagation)
197640
196430
  e.stopPropagation();
196431
+ if (preventFocusOnPress) {
196432
+ let dispose2 = $8a9cb279dc87e130$export$cabe61c495ee3649(e.target);
196433
+ if (dispose2)
196434
+ state.disposables.push(dispose2);
196435
+ }
197641
196436
  addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "mouseup", onMouseUp, false);
197642
196437
  };
197643
196438
  pressProps2.onMouseEnter = (e) => {
197644
- if (!e.currentTarget.contains(e.target))
196439
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197645
196440
  return;
197646
196441
  let shouldStopPropagation = true;
197647
196442
  if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
@@ -197652,7 +196447,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197652
196447
  e.stopPropagation();
197653
196448
  };
197654
196449
  pressProps2.onMouseLeave = (e) => {
197655
- if (!e.currentTarget.contains(e.target))
196450
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197656
196451
  return;
197657
196452
  let shouldStopPropagation = true;
197658
196453
  if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
@@ -197664,28 +196459,26 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197664
196459
  e.stopPropagation();
197665
196460
  };
197666
196461
  pressProps2.onMouseUp = (e) => {
197667
- if (!e.currentTarget.contains(e.target))
196462
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197668
196463
  return;
197669
- if (!state.ignoreEmulatedMouseEvents && e.button === 0)
196464
+ if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed)
197670
196465
  triggerPressUp(e, state.pointerType || "mouse");
197671
196466
  };
197672
196467
  let onMouseUp = (e) => {
197673
196468
  if (e.button !== 0)
197674
196469
  return;
197675
- state.isPressed = false;
197676
- removeAllGlobalListeners();
197677
196470
  if (state.ignoreEmulatedMouseEvents) {
197678
196471
  state.ignoreEmulatedMouseEvents = false;
197679
196472
  return;
197680
196473
  }
197681
- if (state.target && $f6c31cce2adf654f$var$isOverTarget(e, state.target) && state.pointerType != null)
197682
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
197683
- else if (state.target && state.isOverTarget && state.pointerType != null)
197684
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
196474
+ if (state.target && state.target.contains(e.target) && state.pointerType != null)
196475
+ ;
196476
+ else
196477
+ cancel(e);
197685
196478
  state.isOverTarget = false;
197686
196479
  };
197687
196480
  pressProps2.onTouchStart = (e) => {
197688
- if (!e.currentTarget.contains(e.target))
196481
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197689
196482
  return;
197690
196483
  let touch = $f6c31cce2adf654f$var$getTouchFromEvent(e.nativeEvent);
197691
196484
  if (!touch)
@@ -197696,8 +196489,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197696
196489
  state.isPressed = true;
197697
196490
  state.target = e.currentTarget;
197698
196491
  state.pointerType = "touch";
197699
- if (!isDisabled && !preventFocusOnPress)
197700
- $7215afc6de606d6b$export$de79e2c695e052f3(e.currentTarget);
197701
196492
  if (!allowTextSelectionOnPress)
197702
196493
  $14c0b72509d70225$export$16a4697467175487(state.target);
197703
196494
  let shouldStopPropagation = triggerPressStart($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType);
@@ -197706,7 +196497,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197706
196497
  addGlobalListener($431fbd86ca7dc216$export$f21a1ffae260145a(e.currentTarget), "scroll", onScroll, true);
197707
196498
  };
197708
196499
  pressProps2.onTouchMove = (e) => {
197709
- if (!e.currentTarget.contains(e.target))
196500
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197710
196501
  return;
197711
196502
  if (!state.isPressed) {
197712
196503
  e.stopPropagation();
@@ -197728,7 +196519,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197728
196519
  e.stopPropagation();
197729
196520
  };
197730
196521
  pressProps2.onTouchEnd = (e) => {
197731
- if (!e.currentTarget.contains(e.target))
196522
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197732
196523
  return;
197733
196524
  if (!state.isPressed) {
197734
196525
  e.stopPropagation();
@@ -197739,6 +196530,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197739
196530
  if (touch && $f6c31cce2adf654f$var$isOverTarget(touch, e.currentTarget) && state.pointerType != null) {
197740
196531
  triggerPressUp($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType);
197741
196532
  shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType);
196533
+ triggerSyntheticClick(e.nativeEvent, state.target);
197742
196534
  } else if (state.isOverTarget && state.pointerType != null)
197743
196535
  shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType, false);
197744
196536
  if (shouldStopPropagation)
@@ -197752,14 +196544,14 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197752
196544
  removeAllGlobalListeners();
197753
196545
  };
197754
196546
  pressProps2.onTouchCancel = (e) => {
197755
- if (!e.currentTarget.contains(e.target))
196547
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197756
196548
  return;
197757
196549
  e.stopPropagation();
197758
196550
  if (state.isPressed)
197759
196551
  cancel($f6c31cce2adf654f$var$createTouchEvent(state.target, e));
197760
196552
  };
197761
196553
  let onScroll = (e) => {
197762
- if (state.isPressed && e.target.contains(state.target))
196554
+ if (state.isPressed && $d4ee10de306f2510$export$4282f70798064fe0($d4ee10de306f2510$export$e58f029f0fbfdb29(e), state.target))
197763
196555
  cancel({
197764
196556
  currentTarget: state.target,
197765
196557
  shiftKey: false,
@@ -197769,7 +196561,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197769
196561
  });
197770
196562
  };
197771
196563
  pressProps2.onDragStart = (e) => {
197772
- if (!e.currentTarget.contains(e.target))
196564
+ if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)))
197773
196565
  return;
197774
196566
  cancel(e);
197775
196567
  };
@@ -197785,20 +196577,47 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
197785
196577
  cancelOnPointerExit,
197786
196578
  triggerPressEnd,
197787
196579
  triggerPressStart,
197788
- triggerPressUp
196580
+ triggerPressUp,
196581
+ triggerClick,
196582
+ triggerSyntheticClick
197789
196583
  ]);
197790
196584
  useEffect(() => {
196585
+ if (!domRef || process.env.NODE_ENV === "test")
196586
+ return;
196587
+ const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(domRef.current);
196588
+ if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($f6c31cce2adf654f$var$STYLE_ID))
196589
+ return;
196590
+ const style2 = ownerDocument.createElement("style");
196591
+ style2.id = $f6c31cce2adf654f$var$STYLE_ID;
196592
+ style2.textContent = `
196593
+ @layer {
196594
+ [${$f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE}] {
196595
+ touch-action: pan-x pan-y pinch-zoom;
196596
+ }
196597
+ }
196598
+ `.trim();
196599
+ ownerDocument.head.prepend(style2);
196600
+ }, [
196601
+ domRef
196602
+ ]);
196603
+ useEffect(() => {
196604
+ let state = ref2.current;
197791
196605
  return () => {
197792
- var _ref_current_target;
196606
+ var _state_target;
197793
196607
  if (!allowTextSelectionOnPress)
197794
- $14c0b72509d70225$export$b0d6fa1ab32e3295((_ref_current_target = ref2.current.target) !== null && _ref_current_target !== void 0 ? _ref_current_target : void 0);
196608
+ $14c0b72509d70225$export$b0d6fa1ab32e3295((_state_target = state.target) !== null && _state_target !== void 0 ? _state_target : void 0);
196609
+ for (let dispose2 of state.disposables)
196610
+ dispose2();
196611
+ state.disposables = [];
197795
196612
  };
197796
196613
  }, [
197797
196614
  allowTextSelectionOnPress
197798
196615
  ]);
197799
196616
  return {
197800
196617
  isPressed: isPressedProp || isPressed,
197801
- pressProps: $3ef42575df84b30b$export$9d1611c77c2fe928$1(domProps, pressProps)
196618
+ pressProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, pressProps, {
196619
+ [$f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE]: true
196620
+ })
197802
196621
  };
197803
196622
  }
197804
196623
  function $f6c31cce2adf654f$var$isHTMLAnchorLink(target) {
@@ -197886,9 +196705,6 @@ function $f6c31cce2adf654f$var$isOverTarget(point, target) {
197886
196705
  let pointRect = $f6c31cce2adf654f$var$getPointClientRect(point);
197887
196706
  return $f6c31cce2adf654f$var$areRectanglesOverlapping(rect, pointRect);
197888
196707
  }
197889
- function $f6c31cce2adf654f$var$shouldPreventDefaultDown(target) {
197890
- return !(target instanceof HTMLElement) || !target.hasAttribute("draggable");
197891
- }
197892
196708
  function $f6c31cce2adf654f$var$shouldPreventDefaultUp(target) {
197893
196709
  if (target instanceof HTMLInputElement)
197894
196710
  return false;
@@ -197917,6 +196733,361 @@ const $f6c31cce2adf654f$var$nonTextInputTypes = /* @__PURE__ */ new Set([
197917
196733
  function $f6c31cce2adf654f$var$isValidInputKey(target, key2) {
197918
196734
  return target.type === "checkbox" || target.type === "radio" ? key2 === " " : $f6c31cce2adf654f$var$nonTextInputTypes.has(target.type);
197919
196735
  }
196736
+ let $507fabe10e71c6fb$var$currentModality = null;
196737
+ let $507fabe10e71c6fb$var$changeHandlers = /* @__PURE__ */ new Set();
196738
+ let $507fabe10e71c6fb$export$d90243b58daecda7 = /* @__PURE__ */ new Map();
196739
+ let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
196740
+ let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
196741
+ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
196742
+ Tab: true,
196743
+ Escape: true
196744
+ };
196745
+ function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
196746
+ for (let handler of $507fabe10e71c6fb$var$changeHandlers)
196747
+ handler(modality, e);
196748
+ }
196749
+ function $507fabe10e71c6fb$var$isValidKey(e) {
196750
+ return !(e.metaKey || !$c87311424ea30a05$export$9ac100e40613ea10() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
196751
+ }
196752
+ function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
196753
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196754
+ if ($507fabe10e71c6fb$var$isValidKey(e)) {
196755
+ $507fabe10e71c6fb$var$currentModality = "keyboard";
196756
+ $507fabe10e71c6fb$var$triggerChangeHandlers("keyboard", e);
196757
+ }
196758
+ }
196759
+ function $507fabe10e71c6fb$var$handlePointerEvent(e) {
196760
+ $507fabe10e71c6fb$var$currentModality = "pointer";
196761
+ if (e.type === "mousedown" || e.type === "pointerdown") {
196762
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196763
+ $507fabe10e71c6fb$var$triggerChangeHandlers("pointer", e);
196764
+ }
196765
+ }
196766
+ function $507fabe10e71c6fb$var$handleClickEvent(e) {
196767
+ if ($6a7db85432448f7f$export$60278871457622de(e)) {
196768
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196769
+ $507fabe10e71c6fb$var$currentModality = "virtual";
196770
+ }
196771
+ }
196772
+ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
196773
+ if (e.target === window || e.target === document || $8a9cb279dc87e130$export$fda7da73ab5d4c48 || !e.isTrusted)
196774
+ return;
196775
+ if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
196776
+ $507fabe10e71c6fb$var$currentModality = "virtual";
196777
+ $507fabe10e71c6fb$var$triggerChangeHandlers("virtual", e);
196778
+ }
196779
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
196780
+ $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
196781
+ }
196782
+ function $507fabe10e71c6fb$var$handleWindowBlur() {
196783
+ if ($8a9cb279dc87e130$export$fda7da73ab5d4c48)
196784
+ return;
196785
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
196786
+ $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;
196787
+ }
196788
+ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element2) {
196789
+ if (typeof window === "undefined" || typeof document === "undefined" || $507fabe10e71c6fb$export$d90243b58daecda7.get($431fbd86ca7dc216$export$f21a1ffae260145a(element2)))
196790
+ return;
196791
+ const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element2);
196792
+ const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196793
+ let focus = windowObject.HTMLElement.prototype.focus;
196794
+ windowObject.HTMLElement.prototype.focus = function() {
196795
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
196796
+ focus.apply(this, arguments);
196797
+ };
196798
+ documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196799
+ documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196800
+ documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
196801
+ windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
196802
+ windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
196803
+ if (typeof PointerEvent !== "undefined") {
196804
+ documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196805
+ documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196806
+ documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196807
+ } else if (process.env.NODE_ENV === "test") {
196808
+ documentObject.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196809
+ documentObject.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196810
+ documentObject.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196811
+ }
196812
+ windowObject.addEventListener("beforeunload", () => {
196813
+ $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element2);
196814
+ }, {
196815
+ once: true
196816
+ });
196817
+ $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
196818
+ focus
196819
+ });
196820
+ }
196821
+ const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element2, loadListener) => {
196822
+ const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element2);
196823
+ const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196824
+ if (loadListener)
196825
+ documentObject.removeEventListener("DOMContentLoaded", loadListener);
196826
+ if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject))
196827
+ return;
196828
+ windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
196829
+ documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196830
+ documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
196831
+ documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
196832
+ windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
196833
+ windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
196834
+ if (typeof PointerEvent !== "undefined") {
196835
+ documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196836
+ documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196837
+ documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196838
+ } else if (process.env.NODE_ENV === "test") {
196839
+ documentObject.removeEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
196840
+ documentObject.removeEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
196841
+ documentObject.removeEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
196842
+ }
196843
+ $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
196844
+ };
196845
+ function $507fabe10e71c6fb$export$2f1888112f558a7d(element2) {
196846
+ const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196847
+ let loadListener;
196848
+ if (documentObject.readyState !== "loading")
196849
+ $507fabe10e71c6fb$var$setupGlobalFocusEvents(element2);
196850
+ else {
196851
+ loadListener = () => {
196852
+ $507fabe10e71c6fb$var$setupGlobalFocusEvents(element2);
196853
+ };
196854
+ documentObject.addEventListener("DOMContentLoaded", loadListener);
196855
+ }
196856
+ return () => $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element2, loadListener);
196857
+ }
196858
+ if (typeof document !== "undefined")
196859
+ $507fabe10e71c6fb$export$2f1888112f558a7d();
196860
+ function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
196861
+ return $507fabe10e71c6fb$var$currentModality !== "pointer";
196862
+ }
196863
+ function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
196864
+ return $507fabe10e71c6fb$var$currentModality;
196865
+ }
196866
+ const $507fabe10e71c6fb$var$nonTextInputTypes = /* @__PURE__ */ new Set([
196867
+ "checkbox",
196868
+ "radio",
196869
+ "range",
196870
+ "color",
196871
+ "file",
196872
+ "image",
196873
+ "button",
196874
+ "submit",
196875
+ "reset"
196876
+ ]);
196877
+ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
196878
+ let document1 = $431fbd86ca7dc216$export$b204af158042fbac(e === null || e === void 0 ? void 0 : e.target);
196879
+ const IHTMLInputElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
196880
+ const IHTMLTextAreaElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
196881
+ const IHTMLElement = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
196882
+ const IKeyboardEvent = typeof window !== "undefined" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
196883
+ isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;
196884
+ return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
196885
+ }
196886
+ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
196887
+ $507fabe10e71c6fb$var$setupGlobalFocusEvents();
196888
+ useEffect(() => {
196889
+ let handler = (modality, e) => {
196890
+ if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e))
196891
+ return;
196892
+ fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
196893
+ };
196894
+ $507fabe10e71c6fb$var$changeHandlers.add(handler);
196895
+ return () => {
196896
+ $507fabe10e71c6fb$var$changeHandlers.delete(handler);
196897
+ };
196898
+ }, deps);
196899
+ }
196900
+ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element2) {
196901
+ const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(element2);
196902
+ const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
196903
+ if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual") {
196904
+ let lastFocusedElement = activeElement;
196905
+ $bbed8b41f857bcc0$export$24490316f764c430(() => {
196906
+ if ($d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) === lastFocusedElement && element2.isConnected)
196907
+ $7215afc6de606d6b$export$de79e2c695e052f3(element2);
196908
+ });
196909
+ } else
196910
+ $7215afc6de606d6b$export$de79e2c695e052f3(element2);
196911
+ }
196912
+ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
196913
+ let { isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props;
196914
+ const onBlur = useCallback((e) => {
196915
+ if (e.target === e.currentTarget) {
196916
+ if (onBlurProp)
196917
+ onBlurProp(e);
196918
+ if (onFocusChange)
196919
+ onFocusChange(false);
196920
+ return true;
196921
+ }
196922
+ }, [
196923
+ onBlurProp,
196924
+ onFocusChange
196925
+ ]);
196926
+ const onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur);
196927
+ const onFocus = useCallback((e) => {
196928
+ const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(e.target);
196929
+ const activeElement = ownerDocument ? $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) : $d4ee10de306f2510$export$cd4e5573fbe2b576();
196930
+ if (e.target === e.currentTarget && activeElement === $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) {
196931
+ if (onFocusProp)
196932
+ onFocusProp(e);
196933
+ if (onFocusChange)
196934
+ onFocusChange(true);
196935
+ onSyntheticFocus(e);
196936
+ }
196937
+ }, [
196938
+ onFocusChange,
196939
+ onFocusProp,
196940
+ onSyntheticFocus
196941
+ ]);
196942
+ return {
196943
+ focusProps: {
196944
+ onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : void 0,
196945
+ onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : void 0
196946
+ }
196947
+ };
196948
+ }
196949
+ function $93925083ecbb358c$export$48d1ea6320830260(handler) {
196950
+ if (!handler)
196951
+ return void 0;
196952
+ let shouldStopPropagation = true;
196953
+ return (e) => {
196954
+ let event = {
196955
+ ...e,
196956
+ preventDefault() {
196957
+ e.preventDefault();
196958
+ },
196959
+ isDefaultPrevented() {
196960
+ return e.isDefaultPrevented();
196961
+ },
196962
+ stopPropagation() {
196963
+ if (shouldStopPropagation && process.env.NODE_ENV !== "production")
196964
+ console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
196965
+ else
196966
+ shouldStopPropagation = true;
196967
+ },
196968
+ continuePropagation() {
196969
+ shouldStopPropagation = false;
196970
+ },
196971
+ isPropagationStopped() {
196972
+ return shouldStopPropagation;
196973
+ }
196974
+ };
196975
+ handler(event);
196976
+ if (shouldStopPropagation)
196977
+ e.stopPropagation();
196978
+ };
196979
+ }
196980
+ function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
196981
+ return {
196982
+ keyboardProps: props.isDisabled ? {} : {
196983
+ onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
196984
+ onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
196985
+ }
196986
+ };
196987
+ }
196988
+ let $f645667febf57a63$export$f9762fab77588ecb = /* @__PURE__ */ React__default.createContext(null);
196989
+ function $f645667febf57a63$var$useFocusableContext(ref2) {
196990
+ let context = useContext($f645667febf57a63$export$f9762fab77588ecb) || {};
196991
+ $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref2);
196992
+ let { ref: _2, ...otherProps } = context;
196993
+ return otherProps;
196994
+ }
196995
+ function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
196996
+ let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
196997
+ let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
196998
+ let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(focusProps, keyboardProps);
196999
+ let domProps = $f645667febf57a63$var$useFocusableContext(domRef);
197000
+ let interactionProps = props.isDisabled ? {} : domProps;
197001
+ let autoFocusRef = useRef(props.autoFocus);
197002
+ useEffect(() => {
197003
+ if (autoFocusRef.current && domRef.current)
197004
+ $3ad3f6e1647bc98d$export$80f3e147d781571c(domRef.current);
197005
+ autoFocusRef.current = false;
197006
+ }, [
197007
+ domRef
197008
+ ]);
197009
+ let tabIndex = props.excludeFromTabOrder ? -1 : 0;
197010
+ if (props.isDisabled)
197011
+ tabIndex = void 0;
197012
+ return {
197013
+ focusableProps: $3ef42575df84b30b$export$9d1611c77c2fe928({
197014
+ ...interactions,
197015
+ tabIndex
197016
+ }, interactionProps)
197017
+ };
197018
+ }
197019
+ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
197020
+ let { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
197021
+ let state = useRef({
197022
+ isFocusWithin: false
197023
+ });
197024
+ let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
197025
+ let onBlur = useCallback((e) => {
197026
+ if (!e.currentTarget.contains(e.target))
197027
+ return;
197028
+ if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {
197029
+ state.current.isFocusWithin = false;
197030
+ removeAllGlobalListeners();
197031
+ if (onBlurWithin)
197032
+ onBlurWithin(e);
197033
+ if (onFocusWithinChange)
197034
+ onFocusWithinChange(false);
197035
+ }
197036
+ }, [
197037
+ onBlurWithin,
197038
+ onFocusWithinChange,
197039
+ state,
197040
+ removeAllGlobalListeners
197041
+ ]);
197042
+ let onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur);
197043
+ let onFocus = useCallback((e) => {
197044
+ if (!e.currentTarget.contains(e.target))
197045
+ return;
197046
+ const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(e.target);
197047
+ const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
197048
+ if (!state.current.isFocusWithin && activeElement === $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) {
197049
+ if (onFocusWithin)
197050
+ onFocusWithin(e);
197051
+ if (onFocusWithinChange)
197052
+ onFocusWithinChange(true);
197053
+ state.current.isFocusWithin = true;
197054
+ onSyntheticFocus(e);
197055
+ let currentTarget = e.currentTarget;
197056
+ addGlobalListener(ownerDocument, "focus", (e2) => {
197057
+ if (state.current.isFocusWithin && !$d4ee10de306f2510$export$4282f70798064fe0(currentTarget, e2.target)) {
197058
+ let nativeEvent = new ownerDocument.defaultView.FocusEvent("blur", {
197059
+ relatedTarget: e2.target
197060
+ });
197061
+ $8a9cb279dc87e130$export$c2b7abe5d61ec696(nativeEvent, currentTarget);
197062
+ let event = $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent);
197063
+ onBlur(event);
197064
+ }
197065
+ }, {
197066
+ capture: true
197067
+ });
197068
+ }
197069
+ }, [
197070
+ onFocusWithin,
197071
+ onFocusWithinChange,
197072
+ onSyntheticFocus,
197073
+ addGlobalListener,
197074
+ onBlur
197075
+ ]);
197076
+ if (isDisabled)
197077
+ return {
197078
+ focusWithinProps: {
197079
+ // These cannot be null, that would conflict in mergeProps
197080
+ onFocus: void 0,
197081
+ onBlur: void 0
197082
+ }
197083
+ };
197084
+ return {
197085
+ focusWithinProps: {
197086
+ onFocus,
197087
+ onBlur
197088
+ }
197089
+ };
197090
+ }
197920
197091
  let $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;
197921
197092
  let $6179b936705e76d3$var$hoverCount = 0;
197922
197093
  function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents() {
@@ -197934,7 +197105,7 @@ function $6179b936705e76d3$var$setupGlobalTouchEvents() {
197934
197105
  return;
197935
197106
  if (typeof PointerEvent !== "undefined")
197936
197107
  document.addEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
197937
- else
197108
+ else if (process.env.NODE_ENV === "test")
197938
197109
  document.addEventListener("touchend", $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
197939
197110
  $6179b936705e76d3$var$hoverCount++;
197940
197111
  return () => {
@@ -197943,7 +197114,7 @@ function $6179b936705e76d3$var$setupGlobalTouchEvents() {
197943
197114
  return;
197944
197115
  if (typeof PointerEvent !== "undefined")
197945
197116
  document.removeEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
197946
- else
197117
+ else if (process.env.NODE_ENV === "test")
197947
197118
  document.removeEventListener("touchend", $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
197948
197119
  };
197949
197120
  }
@@ -197957,6 +197128,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
197957
197128
  target: null
197958
197129
  }).current;
197959
197130
  useEffect($6179b936705e76d3$var$setupGlobalTouchEvents, []);
197131
+ let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
197960
197132
  let { hoverProps, triggerHoverEnd } = useMemo(() => {
197961
197133
  let triggerHoverStart = (event, pointerType) => {
197962
197134
  state.pointerType = pointerType;
@@ -197965,6 +197137,12 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
197965
197137
  state.isHovered = true;
197966
197138
  let target = event.currentTarget;
197967
197139
  state.target = target;
197140
+ addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(event.target), "pointerover", (e) => {
197141
+ if (state.isHovered && state.target && !$d4ee10de306f2510$export$4282f70798064fe0(state.target, e.target))
197142
+ triggerHoverEnd2(e, e.pointerType);
197143
+ }, {
197144
+ capture: true
197145
+ });
197968
197146
  if (onHoverStart)
197969
197147
  onHoverStart({
197970
197148
  type: "hoverstart",
@@ -197976,12 +197154,13 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
197976
197154
  setHovered(true);
197977
197155
  };
197978
197156
  let triggerHoverEnd2 = (event, pointerType) => {
197157
+ let target = state.target;
197979
197158
  state.pointerType = "";
197980
197159
  state.target = null;
197981
- if (pointerType === "touch" || !state.isHovered)
197160
+ if (pointerType === "touch" || !state.isHovered || !target)
197982
197161
  return;
197983
197162
  state.isHovered = false;
197984
- let target = event.currentTarget;
197163
+ removeAllGlobalListeners();
197985
197164
  if (onHoverEnd)
197986
197165
  onHoverEnd({
197987
197166
  type: "hoverend",
@@ -198003,7 +197182,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
198003
197182
  if (!isDisabled && e.currentTarget.contains(e.target))
198004
197183
  triggerHoverEnd2(e, e.pointerType);
198005
197184
  };
198006
- } else {
197185
+ } else if (process.env.NODE_ENV === "test") {
198007
197186
  hoverProps2.onTouchStart = () => {
198008
197187
  state.ignoreEmulatedMouseEvents = true;
198009
197188
  };
@@ -198026,7 +197205,9 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
198026
197205
  onHoverChange,
198027
197206
  onHoverEnd,
198028
197207
  isDisabled,
198029
- state
197208
+ state,
197209
+ addGlobalListener,
197210
+ removeAllGlobalListeners
198030
197211
  ]);
198031
197212
  useEffect(() => {
198032
197213
  if (isDisabled)
@@ -198041,6 +197222,67 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
198041
197222
  isHovered
198042
197223
  };
198043
197224
  }
197225
+ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
197226
+ let { autoFocus = false, isTextInput, within } = props;
197227
+ let state = useRef({
197228
+ isFocused: false,
197229
+ isFocusVisible: autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27()
197230
+ });
197231
+ let [isFocused, setFocused] = useState(false);
197232
+ let [isFocusVisibleState, setFocusVisible] = useState(() => state.current.isFocused && state.current.isFocusVisible);
197233
+ let updateState2 = useCallback(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
197234
+ let onFocusChange = useCallback((isFocused2) => {
197235
+ state.current.isFocused = isFocused2;
197236
+ setFocused(isFocused2);
197237
+ updateState2();
197238
+ }, [
197239
+ updateState2
197240
+ ]);
197241
+ $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible) => {
197242
+ state.current.isFocusVisible = isFocusVisible;
197243
+ updateState2();
197244
+ }, [], {
197245
+ isTextInput
197246
+ });
197247
+ let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6({
197248
+ isDisabled: within,
197249
+ onFocusChange
197250
+ });
197251
+ let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
197252
+ isDisabled: !within,
197253
+ onFocusWithinChange: onFocusChange
197254
+ });
197255
+ return {
197256
+ isFocused,
197257
+ isFocusVisible: isFocusVisibleState,
197258
+ focusProps: within ? focusWithinProps : focusProps
197259
+ };
197260
+ }
197261
+ function forwardRef(component) {
197262
+ return forwardRef$1(component);
197263
+ }
197264
+ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
197265
+ if (!variantKeys) {
197266
+ return [props, {}];
197267
+ }
197268
+ const picked = variantKeys.reduce((acc, key2) => {
197269
+ if (key2 in props) {
197270
+ return { ...acc, [key2]: props[key2] };
197271
+ } else {
197272
+ return acc;
197273
+ }
197274
+ }, {});
197275
+ if (removeVariantProps) {
197276
+ const omitted = Object.keys(props).filter((key2) => !variantKeys.includes(key2)).reduce((acc, key2) => ({ ...acc, [key2]: props[key2] }), {});
197277
+ return [omitted, picked];
197278
+ } else {
197279
+ return [props, picked];
197280
+ }
197281
+ };
197282
+ var [ButtonGroupProvider, useButtonGroupContext] = createContext2({
197283
+ name: "ButtonGroupContext",
197284
+ strict: false
197285
+ });
198044
197286
  function useAriaButton(props, ref2) {
198045
197287
  let {
198046
197288
  elementType = "button",
@@ -198048,19 +197290,18 @@ function useAriaButton(props, ref2) {
198048
197290
  onPress,
198049
197291
  onPressStart,
198050
197292
  onPressEnd,
197293
+ onPressUp,
198051
197294
  onPressChange,
198052
197295
  // @ts-ignore - undocumented
198053
197296
  preventFocusOnPress,
198054
197297
  // @ts-ignore - undocumented
198055
197298
  allowFocusWhenDisabled,
198056
- // @ts-ignore
198057
- onClick: deprecatedOnClick,
197299
+ onClick,
198058
197300
  href,
198059
197301
  target,
198060
197302
  rel,
198061
197303
  type = "button",
198062
- allowTextSelectionOnPress,
198063
- role
197304
+ allowTextSelectionOnPress
198064
197305
  } = props;
198065
197306
  let additionalProps;
198066
197307
  if (elementType === "button") {
@@ -198071,7 +197312,6 @@ function useAriaButton(props, ref2) {
198071
197312
  } else {
198072
197313
  additionalProps = {
198073
197314
  role: "button",
198074
- tabIndex: isDisabled ? void 0 : 0,
198075
197315
  href: elementType === "a" && !isDisabled ? href : void 0,
198076
197316
  target: elementType === "a" ? target : void 0,
198077
197317
  type: elementType === "input" ? type : void 0,
@@ -198080,32 +197320,19 @@ function useAriaButton(props, ref2) {
198080
197320
  rel: elementType === "a" ? rel : void 0
198081
197321
  };
198082
197322
  }
198083
- let isMobile2 = $c87311424ea30a05$export$fedb369cb70207f1() || $c87311424ea30a05$export$a11b0059900ceec8();
198084
- if (deprecatedOnClick && typeof deprecatedOnClick === "function" && // bypass since onClick is passed from <Link as={Button} /> internally
198085
- role !== "link" && // bypass since onClick is passed from useDisclosure's `getButtonProps` internally
198086
- !(props.hasOwnProperty("aria-expanded") && props.hasOwnProperty("aria-controls"))) {
198087
- warn(
198088
- "onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292",
198089
- "useButton"
198090
- );
198091
- }
198092
- const handlePress = (e) => {
198093
- if (isMobile2) {
198094
- deprecatedOnClick == null ? void 0 : deprecatedOnClick(e);
198095
- }
198096
- onPress == null ? void 0 : onPress(e);
198097
- };
198098
197323
  let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
197324
+ onClick,
198099
197325
  onPressStart,
198100
197326
  onPressEnd,
197327
+ onPressUp,
198101
197328
  onPressChange,
198102
- onPress: handlePress,
197329
+ onPress,
198103
197330
  isDisabled,
198104
197331
  preventFocusOnPress,
198105
197332
  allowTextSelectionOnPress,
198106
197333
  ref: ref2
198107
197334
  });
198108
- let { focusableProps } = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, ref2);
197335
+ let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref2);
198109
197336
  if (allowFocusWhenDisabled) {
198110
197337
  focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
198111
197338
  }
@@ -198122,12 +197349,7 @@ function useAriaButton(props, ref2) {
198122
197349
  "aria-expanded": props["aria-expanded"],
198123
197350
  "aria-controls": props["aria-controls"],
198124
197351
  "aria-pressed": props["aria-pressed"],
198125
- onClick: (e) => {
198126
- if (type === "button" && isMobile2) {
198127
- return;
198128
- }
198129
- deprecatedOnClick == null ? void 0 : deprecatedOnClick(e);
198130
- }
197352
+ "aria-current": props["aria-current"]
198131
197353
  })
198132
197354
  };
198133
197355
  }
@@ -198192,7 +197414,7 @@ function useRipple(props = {}) {
198192
197414
  function useButton(props) {
198193
197415
  var _a3, _b3, _c2, _d2, _e2, _f2, _g2, _h2, _i3;
198194
197416
  const groupContext = useButtonGroupContext();
198195
- const globalContext = useProviderContext$1();
197417
+ const globalContext = useProviderContext();
198196
197418
  const isInGroup = !!groupContext;
198197
197419
  const {
198198
197420
  ref: ref2,
@@ -198265,7 +197487,7 @@ function useButton(props) {
198265
197487
  {
198266
197488
  elementType: as,
198267
197489
  isDisabled,
198268
- onPress: $ff5963eb1fccf552$export$e08e3b67e392101e(onPress, handlePress),
197490
+ onPress: chain(onPress, handlePress),
198269
197491
  onClick,
198270
197492
  ...otherProps
198271
197493
  },
@@ -198280,7 +197502,7 @@ function useButton(props) {
198280
197502
  "data-focus-visible": dataAttr(isFocusVisible),
198281
197503
  "data-hover": dataAttr(isHovered),
198282
197504
  "data-loading": dataAttr(isLoading),
198283
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(
197505
+ ...mergeProps(
198284
197506
  ariaButtonProps,
198285
197507
  focusProps,
198286
197508
  hoverProps,
@@ -198309,8 +197531,7 @@ function useButton(props) {
198309
197531
  const getIconClone = (icon) => isValidElement(icon) ? cloneElement(icon, {
198310
197532
  // @ts-ignore
198311
197533
  "aria-hidden": true,
198312
- focusable: false,
198313
- tabIndex: -1
197534
+ focusable: false
198314
197535
  }) : null;
198315
197536
  const startContent = getIconClone(startContentProp);
198316
197537
  const endContent = getIconClone(endContentProp);
@@ -198343,31 +197564,6 @@ function useButton(props) {
198343
197564
  isIconOnly
198344
197565
  };
198345
197566
  }
198346
- function forwardRef(component) {
198347
- return forwardRef$2(component);
198348
- }
198349
- var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
198350
- if (!variantKeys) {
198351
- return [props, {}];
198352
- }
198353
- const picked = variantKeys.reduce((acc, key2) => {
198354
- if (key2 in props) {
198355
- return { ...acc, [key2]: props[key2] };
198356
- } else {
198357
- return acc;
198358
- }
198359
- }, {});
198360
- if (removeVariantProps) {
198361
- const omitted = Object.keys(props).filter((key2) => !variantKeys.includes(key2)).reduce((acc, key2) => ({ ...acc, [key2]: props[key2] }), {});
198362
- return [omitted, picked];
198363
- } else {
198364
- return [props, picked];
198365
- }
198366
- };
198367
- var [ProviderContext, useProviderContext] = createContext2({
198368
- name: "ProviderContext",
198369
- strict: false
198370
- });
198371
197567
  function useSpinner(originalProps) {
198372
197568
  var _a3, _b3;
198373
197569
  const [props, variantProps] = mapPropsVariants(originalProps, spinner.variantKeys);
@@ -198471,7 +197667,7 @@ var Spinner = forwardRef((props, ref2) => {
198471
197667
  });
198472
197668
  Spinner.displayName = "HeroUI.Spinner";
198473
197669
  var spinner_default = Spinner;
198474
- var Button2 = forwardRef$1((props, ref2) => {
197670
+ var Button2 = forwardRef((props, ref2) => {
198475
197671
  const {
198476
197672
  Component: Component2,
198477
197673
  domRef,
@@ -200321,7 +199517,7 @@ const ThemeToolbar = memo(() => {
200321
199517
  }
200322
199518
  );
200323
199519
  });
200324
- const Sheet = forwardRef$2((props, ref2) => {
199520
+ const Sheet = forwardRef$1((props, ref2) => {
200325
199521
  const { className, children, ...rest } = props;
200326
199522
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
200327
199523
  "div",
@@ -204811,7 +204007,7 @@ function DownloadCodeModal(props) {
204811
204007
  const { isOpen, onClose } = props;
204812
204008
  const [selected, setSelected] = useState(DeployType.CloudarePages);
204813
204009
  const website = useWebsite();
204814
- const { exportWebsite, isExporting } = useExportWebsite$1(
204010
+ const { exportWebsite, isExporting } = useExportWebsite(
204815
204011
  website,
204816
204012
  selected,
204817
204013
  () => {
@@ -205425,13 +204621,9 @@ export {
205425
204621
  ThemeSelectModal as T,
205426
204622
  WebsiteStudio as W,
205427
204623
  useFrontComponent as a,
205428
- useGetFrontComponents as b,
205429
- useGetPages as c,
205430
- useGetFiles as d,
205431
- useExportWebsite as e,
205432
- ThemeStudio as f,
204624
+ ThemeStudio as b,
205433
204625
  monaco_editor_core_star as m,
205434
204626
  typescriptDefaults as t,
205435
204627
  useCustomizedMaterials as u
205436
204628
  };
205437
- //# sourceMappingURL=index-e4647972.js.map
204629
+ //# sourceMappingURL=index-3256baa8.js.map