UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

1 lines 1.18 MB
{"version":3,"sources":["../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/next/src/shared/lib/utils/warn-once.ts","../node_modules/next/src/shared/lib/deployment-id.ts","../node_modules/next/src/shared/lib/image-blur-svg.ts","../node_modules/next/src/shared/lib/image-config.ts","../node_modules/next/src/shared/lib/get-img-props.ts","../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../node_modules/next/src/shared/lib/side-effect.tsx","../node_modules/next/src/shared/lib/head-manager-context.shared-runtime.ts","../node_modules/next/src/shared/lib/head.tsx","../node_modules/next/src/shared/lib/image-config-context.shared-runtime.ts","../node_modules/next/src/shared/lib/router-context.shared-runtime.ts","../node_modules/next/src/shared/lib/find-closest-quality.ts","../node_modules/next/dist/compiled/picomatch/index.js","../node_modules/next/src/shared/lib/match-local-pattern.ts","../node_modules/next/src/shared/lib/match-remote-pattern.ts","../node_modules/next/src/shared/lib/image-loader.ts","../node_modules/next/src/client/use-merged-ref.ts","../node_modules/next/src/client/image-component.tsx","../node_modules/next/src/shared/lib/image-external.tsx","../node_modules/next/image.js","../node_modules/next/src/shared/lib/router/utils/querystring.ts","../node_modules/next/src/shared/lib/router/utils/format-url.ts","../node_modules/next/src/shared/lib/router/utils/omit.ts","../node_modules/next/src/shared/lib/utils.ts","../node_modules/next/src/shared/lib/router/utils/remove-trailing-slash.ts","../node_modules/next/src/shared/lib/router/utils/parse-path.ts","../node_modules/next/src/client/normalize-trailing-slash.ts","../node_modules/next/src/shared/lib/router/utils/path-has-prefix.ts","../node_modules/next/src/client/has-base-path.ts","../node_modules/next/src/shared/lib/router/utils/is-local-url.ts","../node_modules/next/src/shared/lib/router/utils/sorted-routes.ts","../node_modules/next/src/shared/lib/page-path/ensure-leading-slash.ts","../node_modules/next/src/shared/lib/segment.ts","../node_modules/next/src/shared/lib/router/utils/app-paths.ts","../node_modules/next/src/shared/lib/router/utils/interception-routes.ts","../node_modules/next/src/shared/lib/router/utils/is-dynamic.ts","../node_modules/next/src/shared/lib/router/utils/index.ts","../node_modules/next/dist/compiled/path-to-regexp/index.js","../node_modules/next/src/lib/route-pattern-normalizer.ts","../node_modules/next/src/shared/lib/router/utils/route-match-utils.ts","../node_modules/next/src/shared/lib/router/utils/route-matcher.ts","../node_modules/next/src/lib/constants.ts","../node_modules/next/src/shared/lib/escape-regexp.ts","../node_modules/next/src/shared/lib/invariant-error.ts","../node_modules/next/src/shared/lib/router/utils/parse-loader-tree.ts","../node_modules/next/src/shared/lib/router/utils/get-segment-param.tsx","../node_modules/next/src/shared/lib/router/routes/app.ts","../node_modules/next/src/shared/lib/router/utils/interception-prefix-from-param-type.ts","../node_modules/next/src/shared/lib/router/utils/resolve-param-value.ts","../node_modules/next/src/shared/lib/router/utils/get-dynamic-param.ts","../node_modules/next/src/shared/lib/router/utils/route-regex.ts","../node_modules/next/src/shared/lib/router/utils/interpolate-as.ts","../node_modules/next/src/client/resolve-href.ts","../node_modules/next/src/shared/lib/router/utils/add-path-prefix.ts","../node_modules/next/src/shared/lib/router/utils/add-locale.ts","../node_modules/next/src/client/add-locale.ts","../node_modules/next/src/client/request-idle-callback.ts","../node_modules/next/src/client/use-intersection.tsx","../node_modules/next/src/shared/lib/i18n/normalize-locale-path.ts","../node_modules/next/src/client/normalize-locale-path.ts","../node_modules/next/src/shared/lib/i18n/detect-domain-locale.ts","../node_modules/next/src/client/detect-domain-locale.ts","../node_modules/next/src/client/get-domain-locale.ts","../node_modules/next/src/client/add-base-path.ts","../node_modules/next/src/shared/lib/utils/error-once.ts","../node_modules/next/src/client/link.tsx","../node_modules/next/link.js","../src/components/branding/HelpwaveLogo.tsx","../src/components/branding/HelpwaveBadge.tsx","../src/components/display-and-visualization/Avatar.tsx","../src/components/layout/Visibility.tsx","../src/components/user-interaction/Button.tsx","../src/components/display-and-visualization/Chip.tsx","../src/components/display-and-visualization/ExpansionIcon.tsx","../src/components/display-and-visualization/ProgressIndicator.tsx","../src/components/display-and-visualization/Tag.tsx","../src/components/form/FieldLayout.tsx","../src/components/form/FormContext.tsx","../src/components/form/FormField.tsx","../src/utils/bagFunctions.ts","../src/components/form/FormObserver.tsx","../src/components/form/FormStore.ts","../src/components/form/useCreateForm.tsx","../src/hooks/useEventCallbackStabelizer.ts","../src/components/layout/AnchoredFloatingContainer.tsx","../src/hooks/useAnchoredPosition.ts","../src/utils/math.ts","../src/hooks/useResizeCallbackWrapper.ts","../src/hooks/useResizeObserver.ts","../src/hooks/useScrollObserver.ts","../src/components/layout/Carousel.tsx","../src/utils/array.ts","../src/global-contexts/LocaleContext.tsx","../src/hooks/useStorage.ts","../src/utils/StorageListener.ts","../src/i18n/translations.ts","../src/i18n/util.ts","../src/global-contexts/HightideConfigContext.tsx","../src/i18n/useHightideTranslation.ts","../src/components/user-interaction/IconButton.tsx","../src/components/user-interaction/Tooltip.tsx","../src/hooks/useOverlayRegistry.ts","../src/hooks/useTransitionState.ts","../src/components/utils/Portal.tsx","../src/hooks/useLogOnce.ts","../src/components/layout/DividerInserter.tsx","../src/components/layout/Expandable.tsx","../src/hooks/useControlledState.ts","../src/utils/resolveSetState.ts","../src/components/layout/FAQSection.tsx","../src/components/layout/InifiniteScroll.tsx","../src/components/layout/ListBox.tsx","../src/utils/match.ts","../src/components/layout/MarkdownInterpreter.tsx","../src/components/layout/TabSwitcher.tsx","../src/utils/propsUtil.ts","../src/components/layout/TextImage.tsx","../src/components/layout/VerticalDivider.tsx","../src/components/layout/dialog/Dialog.tsx","../src/hooks/focus/useFocusTrap.ts","../src/components/utils/FocusTrap.tsx","../src/hooks/usePresenceRef.ts","../src/components/layout/dialog/DialogContext.tsx","../src/components/layout/dialog/DialogOpener.tsx","../src/components/layout/dialog/DialogRoot.tsx","../src/components/layout/dialog/premade/ConfirmDialog.tsx","../src/components/layout/dialog/premade/DiscardChangesDialog.tsx","../src/components/user-interaction/input/Input.tsx","../src/hooks/useDelay.ts","../src/hooks/focus/useFocusManagement.ts","../src/components/layout/dialog/premade/InputDialog.tsx","../src/components/user-interaction/select/Select.tsx","../src/components/user-interaction/select/SelectContext.tsx","../src/components/user-interaction/select/SelectComponents.tsx","../src/components/layout/popup/PopUp.tsx","../src/hooks/useOutsideClick.ts","../src/components/layout/popup/PopUpContext.tsx","../src/components/layout/dialog/premade/LanguageDialog.tsx","../src/components/layout/dialog/premade/ThemeDialog.tsx","../src/global-contexts/ThemeContext.tsx","../src/components/layout/drawer/Drawer.tsx","../src/components/layout/drawer/DrawerContent.tsx","../src/components/layout/drawer/DrawerContext.tsx","../src/components/layout/drawer/DrawerCloseButton.tsx","../src/components/layout/drawer/DrawerRoot.tsx","../src/components/layout/loading/ErrorComponent.tsx","../src/components/layout/loading/LoadingAndErrorComponent.tsx","../src/components/layout/loading/LoadingContainer.tsx","../src/components/layout/loading/LoadingAnimation.tsx","../src/components/layout/navigation/BreadCrumbs.tsx","../src/components/layout/navigation/Navigation.tsx","../src/components/layout/navigation/Pagination.tsx","../src/components/layout/navigation/StepperBar.tsx","../src/components/layout/popup/PopUpOpener.tsx","../src/components/layout/popup/PopUpRoot.tsx","../src/components/layout/table/AutoColumnOrderFeature.ts","../src/components/layout/table/columnSizeUtil.ts","../src/components/layout/table/ColumnSizingWithTargetFeature.ts","../src/components/layout/table/FillerCell.tsx","../src/components/layout/table/TableProvider.tsx","../src/components/layout/table/TableContext.tsx","../src/utils/filter.ts","../src/components/layout/table/TableFilter.ts","../src/components/layout/table/TableCell.tsx","../src/components/layout/table/TableBody.tsx","../src/components/layout/table/TableHeader.tsx","../src/components/layout/table/TableSortButton.tsx","../src/components/layout/table/TableFilterButton.tsx","../src/components/user-interaction/input/DateTimeInput.tsx","../src/components/user-interaction/date/TimePicker.tsx","../src/components/user-interaction/date/DatePicker.tsx","../src/utils/date.ts","../src/components/user-interaction/date/DayPicker.tsx","../src/components/user-interaction/date/YearMonthPicker.tsx","../src/components/user-interaction/date/DateTimePicker.tsx","../src/components/user-interaction/date/DateTimePickerDialog.tsx","../src/hooks/focus/useFocusGuards.ts","../src/hooks/focus/useFocusOnceVisible.ts","../src/hooks/focus/useIsMounted.ts","../src/hooks/useHandleRefs.ts","../src/hooks/useLogUnstableDependencies.ts","../src/hooks/useOverwritableState.ts","../src/hooks/useRerender.ts","../src/hooks/useSearch.ts","../src/utils/simpleSearch.ts","../src/hooks/useUpdatingDateString.ts","../src/utils/emailValidation.ts","../src/hooks/useValidators.ts","../src/components/layout/table/TableFilterPopups.tsx","../src/components/user-interaction/select/MultiSelect.tsx","../src/components/user-interaction/Checkbox.tsx","../src/components/layout/table/TableDisplay.tsx","../src/components/layout/table/TablePagination.tsx","../src/components/layout/table/TableWithSelectionProvider.tsx","../src/components/layout/table/Table.tsx","../src/components/layout/table/TableColumn.tsx","../src/components/layout/table/TableColumnSwitcher.tsx","../src/components/user-interaction/CopyToClipboardWrapper.tsx","../src/utils/writeToClipboard.ts","../src/components/user-interaction/Menu.tsx","../src/components/user-interaction/ScrollPicker.tsx","../src/components/user-interaction/Switch.tsx","../src/components/user-interaction/Textarea.tsx","../src/components/user-interaction/date/TimeDisplay.tsx","../src/components/user-interaction/input/InsideLabelInput.tsx","../src/components/user-interaction/input/SearchBar.tsx","../src/components/user-interaction/input/ToggleableInput.tsx","../src/components/user-interaction/properties/CheckboxProperty.tsx","../src/components/user-interaction/properties/PropertyBase.tsx","../src/components/user-interaction/properties/DateProperty.tsx","../src/components/user-interaction/properties/MultiSelectProperty.tsx","../src/components/user-interaction/select/MultiSelectChipDisplay.tsx","../src/components/user-interaction/properties/NumberProperty.tsx","../src/components/user-interaction/properties/SelectProperty.tsx","../src/components/user-interaction/properties/TextProperty.tsx","../src/components/utils/Transition.tsx","../src/global-contexts/HightideProvider.tsx","../src/utils/builder.ts","../src/utils/duration.ts","../src/utils/easeFunctions.ts","../src/utils/loopingArray.ts","../src/utils/noop.ts","../src/utils/promise.ts"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","/**\n * A shared function, used on both client and server, to generate a SVG blur placeholder.\n */\nexport function getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL,\n objectFit,\n}: {\n widthInt?: number\n heightInt?: number\n blurWidth?: number\n blurHeight?: number\n blurDataURL: string\n objectFit?: string\n}): string {\n const std = 20\n const svgWidth = blurWidth ? blurWidth * 40 : widthInt\n const svgHeight = blurHeight ? blurHeight * 40 : heightInt\n\n const viewBox =\n svgWidth && svgHeight ? `viewBox='0 0 ${svgWidth} ${svgHeight}'` : ''\n const preserveAspectRatio = viewBox\n ? 'none'\n : objectFit === 'contain'\n ? 'xMidYMid'\n : objectFit === 'cover'\n ? 'xMidYMid slice'\n : 'none'\n\n return `%3Csvg xmlns='http://www.w3.org/2000/svg' ${viewBox}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${preserveAspectRatio}' style='filter: url(%23b);' href='${blurDataURL}'/%3E%3C/svg%3E`\n}\n","export const VALID_LOADERS = [\n 'default',\n 'imgix',\n 'cloudinary',\n 'akamai',\n 'custom',\n] as const\n\nexport type LoaderValue = (typeof VALID_LOADERS)[number]\n\nexport type ImageLoaderProps = {\n src: string\n width: number\n quality?: number\n}\n\nexport type ImageLoaderPropsWithConfig = ImageLoaderProps & {\n config: Readonly<ImageConfig>\n}\n\nexport type LocalPattern = {\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single path segment.\n * Double `**` matches any number of path segments.\n */\n pathname?: string\n\n /**\n * Can be literal query string such as `?v=1` or\n * empty string meaning no query string.\n */\n search?: string\n}\n\nexport type RemotePattern = {\n /**\n * Must be `http` or `https`.\n */\n protocol?: 'http' | 'https'\n\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single subdomain.\n * Double `**` matches any number of subdomains.\n */\n hostname: string\n\n /**\n * Can be literal port such as `8080` or empty string\n * meaning no port.\n */\n port?: string\n\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single path segment.\n * Double `**` matches any number of path segments.\n */\n pathname?: string\n\n /**\n * Can be literal query string such as `?v=1` or\n * empty string meaning no query string.\n */\n search?: string\n}\n\ntype ImageFormat = 'image/avif' | 'image/webp'\n\n/**\n * Image configurations\n *\n * @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)\n */\nexport type ImageConfigComplete = {\n /** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */\n deviceSizes: number[]\n\n /** @see [Image sizing documentation](https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing) */\n imageSizes: number[]\n\n /** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */\n loader: LoaderValue\n\n /** @see [Image loader configuration](https://nextjs.org/docs/app/api-reference/components/image#path) */\n path: string\n\n /** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */\n loaderFile: string\n\n /**\n * @deprecated Use `remotePatterns` instead.\n */\n domains: string[]\n\n /** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */\n disableStaticImages: boolean\n\n /** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */\n minimumCacheTTL: number\n\n /** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */\n formats: ImageFormat[]\n\n /** @see [Maximum Redirects](https://nextjs.org/docs/api-reference/next/image#maximumredirects) */\n maximumRedirects: number\n\n /** @see [Maximum Response Body](https://nextjs.org/docs/api-reference/next/image#maximumresponsebody) */\n maximumResponseBody: number\n\n /** @see [Dangerously Allow Local IP](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-local-ip) */\n dangerouslyAllowLocalIP: boolean\n\n /** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */\n dangerouslyAllowSVG: boolean\n\n /** @see [Content Security Policy](https://nextjs.org/docs/api-reference/next/image#contentsecuritypolicy) */\n contentSecurityPolicy: string\n\n /** @see [Content Disposition Type](https://nextjs.org/docs/api-reference/next/image#contentdispositiontype) */\n contentDispositionType: 'inline' | 'attachment'\n\n /** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remotepatterns) */\n remotePatterns: Array<URL | RemotePattern>\n\n /** @see [Local Patterns](https://nextjs.org/docs/api-reference/next/image#localPatterns) */\n localPatterns: LocalPattern[] | undefined\n\n /** @see [Qualities](https://nextjs.org/docs/api-reference/next/image#qualities) */\n qualities: number[] | undefined\n\n /** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */\n unoptimized: boolean\n}\n\nexport type ImageConfig = Partial<ImageConfigComplete>\n\nexport const imageConfigDefault: ImageConfigComplete = {\n deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n imageSizes: [32, 48, 64, 96, 128, 256, 384],\n path: '/_next/image',\n loader: 'default',\n loaderFile: '',\n /**\n * @deprecated Use `remotePatterns` instead to protect your application from malicious users.\n */\n domains: [],\n disableStaticImages: false,\n minimumCacheTTL: 14400, // 4 hours\n formats: ['image/webp'],\n maximumRedirects: 3,\n maximumResponseBody: 50_000_000, // 50 MB\n dangerouslyAllowLocalIP: false,\n dangerouslyAllowSVG: false,\n contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,\n contentDispositionType: 'attachment',\n localPatterns: undefined, // default: allow all local images\n remotePatterns: [], // default: allow no remote images\n qualities: [75],\n unoptimized: false,\n}\n","import { warnOnce } from './utils/warn-once'\nimport { getDeploymentId } from './deployment-id'\nimport { getImageBlurSvg } from './image-blur-svg'\nimport { imageConfigDefault } from './image-config'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n ImageLoaderPropsWithConfig,\n} from './image-config'\n\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n blurWidth?: number\n blurHeight?: number\n}\n\nexport interface StaticRequire {\n default: StaticImageData\n}\n\nexport type StaticImport = StaticRequire | StaticImageData\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'\n> & {\n src: string | StaticImport\n alt: string\n width?: number | `${number}`\n height?: number | `${number}`\n fill?: boolean\n loader?: ImageLoader\n quality?: number | `${number}`\n preload?: boolean\n /**\n * @deprecated Use `preload` prop instead.\n * See https://nextjs.org/docs/app/api-reference/components/image#preload\n */\n priority?: boolean\n loading?: LoadingValue\n placeholder?: PlaceholderValue\n blurDataURL?: string\n unoptimized?: boolean\n overrideSrc?: string\n /**\n * @deprecated Use `onLoad` instead.\n * @see https://nextjs.org/docs/app/api-reference/components/image#onload\n */\n onLoadingComplete?: OnLoadingComplete\n /**\n * @deprecated Use `fill` prop instead of `layout=\"fill\"` or change import to `next/legacy/image`.\n * @see https://nextjs.org/docs/api-reference/next/legacy/image\n */\n layout?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectFit?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectPosition?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyBoundary?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyRoot?: string\n}\n\nexport type ImgProps = Omit<ImageProps, 'src' | 'loader'> & {\n loading: LoadingValue\n width: number | undefined\n height: number | undefined\n style: NonNullable<JSX.IntrinsicElements['img']['style']>\n sizes: string | undefined\n srcSet: string | undefined\n src: string\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\n\n// Object-fit values that are not valid background-size values\nconst INVALID_BACKGROUND_SIZE_VALUES = [\n '-moz-initial',\n 'fill',\n 'none',\n 'scale-down',\n undefined,\n]\ntype LoadingValue = (typeof VALID_LOADING_VALUES)[number]\ntype ImageConfig = ImageConfigComplete & {\n allSizes: number[]\n output?: 'standalone' | 'export'\n}\n\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\n// Do not export - this is an internal type only\n// because `next.config.js` is only meant for the\n// built-in loaders, not for a custom loader() prop.\ntype ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string\n\nexport type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`\nexport type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined\nexport type OnLoadingComplete = (img: HTMLImageElement) => void\n\nexport type PlaceholderStyle = Partial<\n Pick<\n CSSProperties,\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundRepeat'\n | 'backgroundImage'\n >\n>\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n !!src &&\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\nconst allImgs = new Map<\n string,\n { src: string; loading: LoadingValue; placeholder: PlaceholderValue }\n>()\nlet perfObserver: PerformanceObserver | undefined\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'undefined') {\n return x\n }\n if (typeof x === 'number') {\n return Number.isFinite(x) ? x : NaN\n }\n if (typeof x === 'string' && /^[0-9]+$/.test(x)) {\n return parseInt(x, 10)\n }\n return NaN\n}\n\nfunction getWidths(\n { deviceSizes, allSizes }: ImageConfig,\n width: number | undefined,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (typeof width !== 'number') {\n return { widths: deviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n config: ImageConfig\n src: string\n unoptimized: boolean\n loader: ImageLoaderWithConfig\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n config,\n src,\n unoptimized,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n const deploymentId = getDeploymentId()\n if (src.startsWith('/') && !src.startsWith('//') && deploymentId) {\n const sep = src.includes('?') ? '&' : '?'\n src = `${src}${sep}dpl=${deploymentId}`\n }\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(config, width, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ config, src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ config, src, quality, width: widths[last] }),\n }\n}\n\n/**\n * A shared function, used on both client and server, to generate the props for <img>.\n */\nexport function getImgProps(\n {\n src,\n sizes,\n unoptimized = false,\n priority = false,\n preload = false,\n loading,\n className,\n quality,\n width,\n height,\n fill = false,\n style,\n overrideSrc,\n onLoad,\n onLoadingComplete,\n placeholder = 'empty',\n blurDataURL,\n fetchPriority,\n decoding = 'async',\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n ...rest\n }: ImageProps,\n _state: {\n defaultLoader: ImageLoaderWithConfig\n imgConf: ImageConfigComplete\n showAltText?: boolean\n blurComplete?: boolean\n }\n): {\n props: ImgProps\n meta: {\n unoptimized: boolean\n preload: boolean\n placeholder: NonNullable<ImageProps['placeholder']>\n fill: boolean\n }\n} {\n const { imgConf, showAltText, blurComplete, defaultLoader } = _state\n let config: ImageConfig\n let c = imgConf || imageConfigDefault\n if ('allSizes' in c) {\n config = c as ImageConfig\n } else {\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n config = { ...c, allSizes, deviceSizes, qualities }\n }\n\n if (typeof defaultLoader === 'undefined') {\n throw new Error(\n 'images.loaderFile detected but the file is missing default export.\\nRead more: https://nextjs.org/docs/messages/invalid-images-config'\n )\n }\n let loader: ImageLoaderWithConfig = rest.loader || defaultLoader\n\n // Remove property so it's not spread on <img> element\n delete rest.loader\n delete (rest as any).srcSet\n\n // This special value indicates that the user\n // didn't define a \"loader\" prop or \"loader\" config.\n const isDefaultLoader = '__next_img_default' in loader\n\n if (isDefaultLoader) {\n if (config.loader === 'custom') {\n throw new Error(\n `Image with src \"${src}\" is missing \"loader\" prop.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`\n )\n }\n } else {\n // The user defined a \"loader\" prop or config.\n // Since the config object is internal only, we\n // must not pass it to the user-defined \"loader\".\n const customImageLoader = loader as ImageLoader\n loader = (obj) => {\n const { config: _, ...opts } = obj\n return customImageLoader(opts)\n }\n }\n\n if (layout) {\n if (layout === 'fill') {\n fill = true\n }\n const layoutToStyle: Record<string, Record<string, string> | undefined> = {\n intrinsic: { maxWidth: '100%', height: 'auto' },\n responsive: { width: '100%', height: 'auto' },\n }\n const layoutToSizes: Record<string, string | undefined> = {\n responsive: '100vw',\n fill: '100vw',\n }\n const layoutStyle = layoutToStyle[layout]\n if (layoutStyle) {\n style = { ...style, ...layoutStyle }\n }\n const layoutSizes = layoutToSizes[layout]\n if (layoutSizes && !sizes) {\n sizes = layoutSizes\n }\n }\n\n let staticSrc = ''\n let widthInt = getInt(width)\n let heightInt = getInt(height)\n let blurWidth: number | undefined\n let blurHeight: number | undefined\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n\n blurWidth = staticImageData.blurWidth\n blurHeight = staticImageData.blurHeight\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n\n if (!fill) {\n if (!widthInt && !heightInt) {\n widthInt = staticImageData.width\n heightInt = staticImageData.height\n } else if (widthInt && !heightInt) {\n const ratio = widthInt / staticImageData.width\n heightInt = Math.round(staticImageData.height * ratio)\n } else if (!widthInt && heightInt) {\n const ratio = heightInt / staticImageData.height\n widthInt = Math.round(staticImageData.width * ratio)\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n let isLazy =\n !priority &&\n !preload &&\n (loading === 'lazy' || typeof loading === 'undefined')\n if (!src || src.startsWith('data:') || src.startsWith('blob:')) {\n // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n if (config.unoptimized) {\n unoptimized = true\n }\n if (\n isDefaultLoader &&\n !config.dangerouslyAllowSVG &&\n src.split('?', 1)[0].endsWith('.svg')\n ) {\n // Special case to make svg serve as-is to avoid proxying\n // through the built-in Image Optimization API.\n unoptimized = true\n }\n\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n if (config.output === 'export' && isDefaultLoader && !unoptimized) {\n throw new Error(\n `Image Optimization using the default loader is not compatible with \\`{ output: 'export' }\\`.\n Possible solutions:\n - Remove \\`{ output: 'export' }\\` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure \\`{ images: { unoptimized: true } }\\` in \\`next.config.js\\` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api`\n )\n }\n if (!src) {\n // React doesn't show the stack trace and there's\n // no `src` to help identify which image, so we\n // instead console.error(ref) during mount.\n unoptimized = true\n } else {\n if (fill) {\n if (width) {\n throw new Error(\n `Image with src \"${src}\" has both \"width\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (height) {\n throw new Error(\n `Image with src \"${src}\" has both \"height\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (style?.position && style.position !== 'absolute') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.position\" properties. Images with \"fill\" always use position absolute - it cannot be modified.`\n )\n }\n if (style?.width && style.width !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.width\" properties. Images with \"fill\" always use width 100% - it cannot be modified.`\n )\n }\n if (style?.height && style.height !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.height\" properties. Images with \"fill\" always use height 100% - it cannot be modified.`\n )\n }\n } else {\n if (typeof widthInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"width\" property.`\n )\n } else if (isNaN(widthInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" property. Expected a numeric value in pixels but received \"${width}\".`\n )\n }\n if (typeof heightInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"height\" property.`\n )\n } else if (isNaN(heightInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"height\" property. Expected a numeric value in pixels but received \"${height}\".`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/^[\\x00-\\x20]/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/[\\x00-\\x20]$/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n }\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && priority) {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"priority\" properties. Only \"preload\" should be used.`\n )\n }\n if (\n placeholder !== 'empty' &&\n placeholder !== 'blur' &&\n !placeholder.startsWith('data:image/')\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"placeholder\" property \"${placeholder}\".`\n )\n }\n if (placeholder !== 'empty') {\n if (widthInt && heightInt && widthInt * heightInt < 1600) {\n warnOnce(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder\" property to improve performance.`\n )\n }\n }\n if (\n qualityInt &&\n config.qualities &&\n !config.qualities.includes(qualityInt)\n ) {\n warnOnce(\n `Image with src \"${src}\" is using quality \"${qualityInt}\" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(', ')}].` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`\n )\n }\n if (placeholder === 'blur' && !blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )} (animated images not supported)\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n if ('ref' in rest) {\n warnOnce(\n `Image with src \"${src}\" is using unsupported \"ref\" property. Consider using the \"onLoad\" property instead.`\n )\n }\n\n if (!unoptimized && !isDefaultLoader) {\n const urlStr = loader({\n config,\n src,\n width: widthInt || 400,\n quality: qualityInt || 75,\n })\n let url: URL | undefined\n try {\n url = new URL(urlStr)\n } catch (err) {}\n if (urlStr === src || (url && url.pathname === src && !url.search)) {\n warnOnce(\n `Image with src \"${src}\" has a \"loader\" property that does not implement width. Please implement it or use the \"unoptimized\" property instead.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`\n )\n }\n }\n\n if (onLoadingComplete) {\n warnOnce(\n `Image with src \"${src}\" is using deprecated \"onLoadingComplete\" property. Please use the \"onLoad\" property instead.`\n )\n }\n\n for (const [legacyKey, legacyValue] of Object.entries({\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n })) {\n if (legacyValue) {\n warnOnce(\n `Image with src \"${src}\" has legacy prop \"${legacyKey}\". Did you forget to run the codemod?` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`\n )\n }\n }\n\n if (\n typeof window !== 'undefined' &&\n !perfObserver &&\n window.PerformanceObserver\n ) {\n perfObserver = new PerformanceObserver((entryList) => {\n for (const entry of entryList.getEntries()) {\n // @ts-ignore - missing \"LargestContentfulPaint\" class with \"element\" prop\n const imgSrc = entry?.element?.src || ''\n const lcpImage = allImgs.get(imgSrc)\n if (\n lcpImage &&\n lcpImage.loading === 'lazy' &&\n lcpImage.placeholder === 'empty' &&\n !lcpImage.src.startsWith('data:') &&\n !lcpImage.src.startsWith('blob:')\n ) {\n // https://web.dev/lcp/#measure-lcp-in-javascript\n warnOnce(\n `Image with src \"${lcpImage.src}\" was detected as the Largest Contentful Paint (LCP). Please add the \\`loading=\"eager\"\\` property if this image is above the fold.` +\n `\\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`\n )\n }\n }\n })\n try {\n perfObserver.observe({\n type: 'largest-contentful-paint',\n buffered: true,\n })\n } catch (err) {\n // Log error but don't crash the app\n console.error(err)\n }\n }\n }\n const imgStyle = Object.assign(\n fill\n ? {\n position: 'absolute',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n objectFit,\n objectPosition,\n }\n : {},\n showAltText ? {} : { color: 'transparent' },\n style\n )\n\n const backgroundImage =\n !blurComplete && placeholder !== 'empty'\n ? placeholder === 'blur'\n ? `url(\"data:image/svg+xml;charset=utf-8,${getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL: blurDataURL || '', // assume not undefined\n objectFit: imgStyle.objectFit,\n })}\")`\n : `url(\"${placeholder}\")` // assume `data:image/`\n : null\n\n const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(\n imgStyle.objectFit\n )\n ? imgStyle.objectFit\n : imgStyle.objectFit === 'fill'\n ? '100% 100%' // the background-size equivalent of `fill`\n : 'cover'\n\n let placeholderStyle: PlaceholderStyle = backgroundImage\n ? {\n backgroundSize,\n backgroundPosition: imgStyle.objectPosition || '50% 50%',\n backgroundRepeat: 'no-repeat',\n backgroundImage,\n }\n : {}\n\n if (process.env.NODE_ENV === 'development') {\n if (\n placeholderStyle.backgroundImage &&\n placeholder === 'blur' &&\n blurDataURL?.startsWith('/')\n ) {\n // During `next dev`, we don't want to generate blur placeholders with webpack\n // because it can delay starting the dev server. Instead, `next-image-loader.js`\n // will inline a special url to lazily generate the blur placeholder at request time.\n placeholderStyle.backgroundImage = `url(\"${blurDataURL}\")`\n }\n }\n\n const imgAttributes = generateImgAttrs({\n config,\n src,\n unoptimized,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n\n const loadingFinal = isLazy ? 'lazy' : loading\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined') {\n let fullUrl: URL\n try {\n fullUrl = new URL(imgAttributes.src)\n } catch (e) {\n fullUrl = new URL(imgAttributes.src, window.location.href)\n }\n allImgs.set(fullUrl.href, { src, loading: loadingFinal, placeholder })\n }\n }\n\n const props: ImgProps = {\n ...rest,\n loading: loadingFinal,\n fetchPriority,\n width: widthInt,\n height: heightInt,\n decoding,\n className,\n style: { ...imgStyle, ...placeholderStyle },\n sizes: imgAttributes.sizes,\n srcSet: imgAttributes.srcSet,\n src: overrideSrc || imgAttributes.src,\n }\n const meta = { unoptimized, preload: preload || priority, placeholder, fill }\n return { props, meta }\n}\n","\"use strict\";\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexports._ = _interop_require_wildcard;\n","import type React from 'react'\nimport { Children, useEffect, useLayoutEffect, type JSX } from 'react'\n\ntype State = JSX.Element[] | undefined\n\nexport type SideEffectProps = {\n reduceComponentsToState: (components: Array<React.ReactElement<any>>) => State\n handleStateChange?: (state: State) => void\n headManager: any\n children: React.ReactNode\n}\n\nconst isServer = typeof window === 'undefined'\nconst useClientOnlyLayoutEffect = isServer ? () => {} : useLayoutEffect\nconst useClientOnlyEffect = isServer ? () => {} : useEffect\n\nexport default function SideEffect(props: SideEffectProps) {\n const { headManager, reduceComponentsToState } = props\n\n function emitChange() {\n if (headManager && headManager.mountedInstances) {\n const headElements = Children.toArray(\n Array.from(headManager.mountedInstances as Set<React.ReactNode>).filter(\n Boolean\n )\n ) as React.ReactElement[]\n headManager.updateHead(reduceComponentsToState(headElements))\n }\n }\n\n if (isServer) {\n headManager?.mountedInstances?.add(props.children)\n emitChange()\n }\n\n useClientOnlyLayoutEffect(() => {\n headManager?.mountedInstances?.add(props.children)\n return () => {\n headManager?.mountedInstances?.delete(props.children)\n }\n })\n\n // We need to call `updateHead` method whenever the `SideEffect` is trigger in all\n // life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s\n // being rendered, we only trigger the method from the last one.\n // This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`\n // singleton in the layout effect pass, and actually trigger it in the effect pass.\n useClientOnlyLayoutEffect(() => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n return () => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n }\n })\n\n useClientOnlyEffect(() => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n return () => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n }\n })\n\n return null\n}\n","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n updateHead?: (state: any) => void\n mountedInstances?: any\n updateScripts?: (state: any) => void\n scripts?: any\n getIsSsr?: () => boolean\n\n // Used in app directory, to render script tags as server components.\n appDir?: boolean\n nonce?: string\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\nimport { warnOnce } from './utils/warn-once'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't