fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,59 @@
export declare const Input: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").InputProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const MultiValue: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").MultiValueProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const Placeholder: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").PlaceholderProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const SingleValue: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").SingleValueProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const ValueContainer: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").ValueContainerProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
declare const _default: import("memoize-one").MemoizedFn<(externalComponents?: Partial<{
ClearIndicator: <Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").ClearIndicatorProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element;
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends import("..").GroupBase<Option_1>>(props: import("..").ControlProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
DropdownIndicator: <Option_2, IsMulti_2 extends boolean, Group_2 extends import("..").GroupBase<Option_2>>(props: import("..").DropdownIndicatorProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
DownChevron: (props: import("../components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
CrossIcon: (props: import("../components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends import("..").GroupBase<Option_3>>(props: import("..").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends import("..").GroupBase<Option_4>>(props: import("..").GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends import("..").GroupBase<Option_5>>(props: import("..").IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends import("..").GroupBase<Option_6>>(props: import("..").IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends import("..").GroupBase<Option_7>>(props: import("..").InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
LoadingIndicator: <Option_8, IsMulti_8 extends boolean, Group_8 extends import("..").GroupBase<Option_8>>({ innerProps, isRtl, size, ...restProps }: import("..").LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends import("..").GroupBase<Option_9>>(props: import("..").MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends import("..").GroupBase<Option_10>>(props: import("..").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends import("..").GroupBase<Option_11>>(props: import("../components/Menu").MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
LoadingMessage: <Option_12, IsMulti_12 extends boolean, Group_12 extends import("..").GroupBase<Option_12>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element;
NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends import("..").GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends import("..").GroupBase<Option_14>>(props: import("..").MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueRemove: typeof import("../components/MultiValue").MultiValueRemove;
Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends import("..").GroupBase<Option_16>>(props: import("..").OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends import("..").GroupBase<Option_17>>(props: import("..").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends import("..").GroupBase<Option_18>>(props: import("..").ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends import("..").GroupBase<Option_19>>(props: import("..").SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends import("..").GroupBase<Option_20>>(props: import("..").ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
}>) => Partial<{
ClearIndicator: <Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").ClearIndicatorProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element;
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends import("..").GroupBase<Option_1>>(props: import("..").ControlProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
DropdownIndicator: <Option_2, IsMulti_2 extends boolean, Group_2 extends import("..").GroupBase<Option_2>>(props: import("..").DropdownIndicatorProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
DownChevron: (props: import("../components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
CrossIcon: (props: import("../components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends import("..").GroupBase<Option_3>>(props: import("..").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends import("..").GroupBase<Option_4>>(props: import("..").GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends import("..").GroupBase<Option_5>>(props: import("..").IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends import("..").GroupBase<Option_6>>(props: import("..").IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends import("..").GroupBase<Option_7>>(props: import("..").InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
LoadingIndicator: <Option_8, IsMulti_8 extends boolean, Group_8 extends import("..").GroupBase<Option_8>>({ innerProps, isRtl, size, ...restProps }: import("..").LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends import("..").GroupBase<Option_9>>(props: import("..").MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends import("..").GroupBase<Option_10>>(props: import("..").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends import("..").GroupBase<Option_11>>(props: import("../components/Menu").MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
LoadingMessage: <Option_12, IsMulti_12 extends boolean, Group_12 extends import("..").GroupBase<Option_12>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element;
NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends import("..").GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends import("..").GroupBase<Option_14>>(props: import("..").MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueRemove: typeof import("../components/MultiValue").MultiValueRemove;
Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends import("..").GroupBase<Option_16>>(props: import("..").OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends import("..").GroupBase<Option_17>>(props: import("..").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends import("..").GroupBase<Option_18>>(props: import("..").ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends import("..").GroupBase<Option_19>>(props: import("..").SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends import("..").GroupBase<Option_20>>(props: import("..").ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
}>>;
export default _default;

View File

@@ -0,0 +1 @@
{"version":3,"file":"local-variables-sync.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/local-variables-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAoB,MAAM,gBAAgB,CAAC;AACxF,OAAO,KAAK,EAAmC,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK7F,OAAO,KAAK,EAEV,gCAAgC,EAGhC,SAAS,EACV,MAAM,UAAU,CAAC;AAGlB,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMrG;AAED,KAAK,YAAY,GAAG,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACxE,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,mBAAmB,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/G,kDAAkD;IAClD,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAChD,2CAA2C;IAC3C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,GAAG,IAAI,CAAC;CAChF;AAED,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;AACnC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACpC,KAAK,eAAe,CAAC,CAAC,IAAI;IAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAEzD,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAiC3E;AAuVD;;GAEG;AACH,eAAO,MAAM,6BAA6B,4IAAoD,CAAC"}

View File

@@ -0,0 +1,3 @@
# @formatjs/fast-memoize
This is just a fork of `fast-memoize`.

View File

@@ -0,0 +1,58 @@
import type { ChangeColumnTableName, ColumnDataType, Dialect } from "../column-builder.js";
import type { AnyColumn, Column, ColumnBaseConfig, GetColumnData, UpdateColConfig } from "../column.js";
import type { SelectedFields } from "../operations.js";
import type { ColumnsSelection, SQL, View } from "../sql/sql.js";
import type { Subquery } from "../subquery.js";
import type { Table } from "../table.js";
import type { Assume, DrizzleTypeError, Equal, IsAny, Simplify } from "../utils.js";
export type JoinType = 'inner' | 'left' | 'right' | 'full' | 'cross';
export type JoinNullability = 'nullable' | 'not-null';
export type ApplyNullability<T, TNullability extends JoinNullability> = TNullability extends 'nullable' ? T | null : TNullability extends 'null' ? null : T;
export type ApplyNullabilityToColumn<TColumn extends Column, TNullability extends JoinNullability> = TNullability extends 'not-null' ? TColumn : Column<Assume<UpdateColConfig<TColumn['_'], {
notNull: TNullability extends 'nullable' ? false : TColumn['_']['notNull'];
}>, ColumnBaseConfig<ColumnDataType, string>>>;
export type ApplyNotNullMapToJoins<TResult, TNullabilityMap extends Record<string, JoinNullability>> = {
[TTableName in keyof TResult & keyof TNullabilityMap & string]: ApplyNullability<TResult[TTableName], TNullabilityMap[TTableName]>;
} & {};
export type SelectMode = 'partial' | 'single' | 'multiple';
export type SelectResult<TResult, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability>> = TSelectMode extends 'partial' ? SelectPartialResult<TResult, TNullabilityMap> : TSelectMode extends 'single' ? SelectResultFields<TResult> : ApplyNotNullMapToJoins<SelectResultFields<TResult>, TNullabilityMap>;
type IsUnion<T, U extends T = T> = (T extends any ? (U extends T ? false : true) : never) extends false ? false : true;
type Not<T extends boolean> = T extends true ? false : true;
type SelectPartialResult<TFields, TNullability extends Record<string, JoinNullability>> = TNullability extends TNullability ? {
[Key in keyof TFields]: TFields[Key] extends infer TField ? TField extends Table ? TField['_']['name'] extends keyof TNullability ? ApplyNullability<SelectResultFields<TField['_']['columns']>, TNullability[TField['_']['name']]> : never : TField extends Column ? TField['_']['tableName'] extends keyof TNullability ? ApplyNullability<SelectResultField<TField>, TNullability[TField['_']['tableName']]> : never : TField extends SQL | SQL.Aliased ? SelectResultField<TField> : TField extends Record<string, any> ? TField[keyof TField] extends AnyColumn<{
tableName: infer TTableName extends string;
}> | SQL | SQL.Aliased ? Not<IsUnion<TTableName>> extends true ? ApplyNullability<SelectResultFields<TField>, TNullability[TTableName]> : SelectPartialResult<TField, TNullability> : never : never : never;
} : never;
export type MapColumnsToTableAlias<TColumns extends ColumnsSelection, TAlias extends string, TDialect extends Dialect> = {
[Key in keyof TColumns]: TColumns[Key] extends Column ? ChangeColumnTableName<Assume<TColumns[Key], Column>, TAlias, TDialect> : TColumns[Key];
} & {};
export type AddAliasToSelection<TSelection extends ColumnsSelection, TAlias extends string, TDialect extends Dialect> = Simplify<IsAny<TSelection> extends true ? any : {
[Key in keyof TSelection]: TSelection[Key] extends Column ? ChangeColumnTableName<TSelection[Key], TAlias, TDialect> : TSelection[Key] extends Table ? AddAliasToSelection<TSelection[Key]['_']['columns'], TAlias, TDialect> : TSelection[Key] extends SQL | SQL.Aliased ? TSelection[Key] : TSelection[Key] extends ColumnsSelection ? MapColumnsToTableAlias<TSelection[Key], TAlias, TDialect> : never;
}>;
export type AppendToResult<TTableName extends string | undefined, TResult, TJoinedName extends string | undefined, TSelectedFields extends SelectedFields<Column, Table>, TOldSelectMode extends SelectMode> = TOldSelectMode extends 'partial' ? TResult : TOldSelectMode extends 'single' ? (TTableName extends string ? Record<TTableName, TResult> : TResult) & (TJoinedName extends string ? Record<TJoinedName, TSelectedFields> : TSelectedFields) : TResult & (TJoinedName extends string ? Record<TJoinedName, TSelectedFields> : TSelectedFields);
export type BuildSubquerySelection<TSelection extends ColumnsSelection, TNullability extends Record<string, JoinNullability>> = TSelection extends never ? any : {
[Key in keyof TSelection]: TSelection[Key] extends SQL ? DrizzleTypeError<'You cannot reference this field without assigning it an alias first - use `.as(<alias>)`'> : TSelection[Key] extends SQL.Aliased ? TSelection[Key] : TSelection[Key] extends Table ? BuildSubquerySelection<TSelection[Key]['_']['columns'], TNullability> : TSelection[Key] extends Column ? ApplyNullabilityToColumn<TSelection[Key], TNullability[TSelection[Key]['_']['tableName']]> : TSelection[Key] extends ColumnsSelection ? BuildSubquerySelection<TSelection[Key], TNullability> : never;
} & {};
type SetJoinsNullability<TNullabilityMap extends Record<string, JoinNullability>, TValue extends JoinNullability> = {
[Key in keyof TNullabilityMap]: TValue;
};
export type AppendToNullabilityMap<TJoinsNotNull extends Record<string, JoinNullability>, TJoinedName extends string | undefined, TJoinType extends JoinType> = TJoinedName extends string ? 'left' extends TJoinType ? TJoinsNotNull & {
[name in TJoinedName]: 'nullable';
} : 'right' extends TJoinType ? SetJoinsNullability<TJoinsNotNull, 'nullable'> & {
[name in TJoinedName]: 'not-null';
} : 'inner' extends TJoinType ? TJoinsNotNull & {
[name in TJoinedName]: 'not-null';
} : 'cross' extends TJoinType ? TJoinsNotNull & {
[name in TJoinedName]: 'not-null';
} : 'full' extends TJoinType ? SetJoinsNullability<TJoinsNotNull, 'nullable'> & {
[name in TJoinedName]: 'nullable';
} : never : TJoinsNotNull;
export type TableLike = Table | Subquery | View | SQL;
export type GetSelectTableName<TTable extends TableLike> = TTable extends Table ? TTable['_']['name'] : TTable extends Subquery ? TTable['_']['alias'] : TTable extends View ? TTable['_']['name'] : TTable extends SQL ? undefined : never;
export type GetSelectTableSelection<TTable extends TableLike> = TTable extends Table ? TTable['_']['columns'] : TTable extends Subquery | View ? Assume<TTable['_']['selectedFields'], ColumnsSelection> : TTable extends SQL ? {} : never;
export type SelectResultField<T, TDeep extends boolean = true> = T extends DrizzleTypeError<any> ? T : T extends Table ? Equal<TDeep, true> extends true ? SelectResultField<T['_']['columns'], false> : never : T extends Column<any> ? GetColumnData<T> : T extends SQL | SQL.Aliased ? T['_']['type'] : T extends Record<string, any> ? SelectResultFields<T, true> : never;
export type SelectResultFields<TSelectedFields, TDeep extends boolean = true> = Simplify<{
[Key in keyof TSelectedFields]: SelectResultField<TSelectedFields[Key], TDeep>;
}>;
export type SetOperator = 'union' | 'intersect' | 'except';
export {};

View File

@@ -0,0 +1,3 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export declare const GraphQLNonNegativeFloatConfig: GraphQLScalarTypeConfig<any, any>;
export declare const GraphQLNonNegativeFloat: GraphQLScalarType<any, any>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"lucide-react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,33 @@
import type { LabelFunction, OptionObject, StaticDescription, StaticLabel } from 'payload';
import React from 'react';
import type { ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js';
import './index.scss';
export type SelectInputProps = {
readonly AfterInput?: React.ReactNode;
readonly BeforeInput?: React.ReactNode;
readonly className?: string;
readonly Description?: React.ReactNode;
readonly description?: StaticDescription;
readonly Error?: React.ReactNode;
readonly filterOption?: ReactSelectAdapterProps['filterOption'];
readonly hasMany?: boolean;
readonly id?: string;
readonly isClearable?: boolean;
readonly isSortable?: boolean;
readonly Label?: React.ReactNode;
readonly label?: StaticLabel;
readonly localized?: boolean;
readonly name: string;
readonly onChange?: ReactSelectAdapterProps['onChange'];
readonly onInputChange?: ReactSelectAdapterProps['onInputChange'];
readonly options?: OptionObject[];
readonly path: string;
readonly placeholder?: LabelFunction | string;
readonly readOnly?: boolean;
readonly required?: boolean;
readonly showError?: boolean;
readonly style?: React.CSSProperties;
readonly value?: string | string[];
};
export declare const SelectInput: React.FC<SelectInputProps>;
//# sourceMappingURL=Input.d.ts.map

View File

@@ -0,0 +1,9 @@
import React from 'react';
import './index.scss';
export type ClickableArrowProps = {
direction?: 'left' | 'right';
isDisabled?: boolean;
updatePage?: () => void;
};
export declare const ClickableArrow: React.FC<ClickableArrowProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,25 @@
'use strict'
let Container = require('./container')
class AtRule extends Container {
constructor(defaults) {
super(defaults)
this.type = 'atrule'
}
append(...children) {
if (!this.proxyOf.nodes) this.nodes = []
return super.append(...children)
}
prepend(...children) {
if (!this.proxyOf.nodes) this.nodes = []
return super.prepend(...children)
}
}
module.exports = AtRule
AtRule.default = AtRule
Container.registerAtRule(AtRule)

View File

@@ -0,0 +1,24 @@
/**
* @name addMilliseconds
* @category Millisecond Helpers
* @summary Add the specified number of milliseconds to the given date.
*
* @description
* Add the specified number of milliseconds to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of milliseconds to be added.
*
* @returns The new date with the milliseconds added
*
* @example
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
* //=> Thu Jul 10 2014 12:45:30.750
*/
export declare function addMilliseconds<DateType extends Date>(
date: DateType | number | string,
amount: number,
): DateType;

View File

@@ -0,0 +1,21 @@
/**
* Inlined implementation of hoist-non-react-statics
* Original library: https://github.com/mridgway/hoist-non-react-statics
* License: BSD-3-Clause
* Copyright 2015, Yahoo! Inc.
*
* This is an inlined version to avoid ESM compatibility issues with the original package.
*/
import * as React from 'react';
/**
* Copies non-react specific statics from a child component to a parent component.
* Similar to Object.assign, but copies all static properties from source to target,
* excluding React-specific statics and known JavaScript statics.
*
* @param targetComponent - The component to copy statics to
* @param sourceComponent - The component to copy statics from
* @param excludelist - An optional object of keys to exclude from hoisting
* @returns The target component with hoisted statics
*/
export declare function hoistNonReactStatics<T extends React.ComponentType<any>, S extends React.ComponentType<any>, C extends Record<string, boolean> = Record<string, never>>(targetComponent: T, sourceComponent: S, excludelist?: C): T;
//# sourceMappingURL=hoist-non-react-statics.d.ts.map

View File

@@ -0,0 +1,6 @@
export * from "./constants/index.js";
export * from "./date/index.js";
export * from "./date/mini.js";
export * from "./tz/index.js";
export * from "./tzOffset/index.js";
export * from "./tzScan/index.js";

View File

@@ -0,0 +1,342 @@
import {RawSourceMap} from 'source-map-js';
import {Options, StringOptions} from './options';
/**
* The result of compiling Sass to CSS. Returned by {@link compile}, {@link
* compileAsync}, {@link compileString}, and {@link compileStringAsync}.
*
* @category Compile
*/
export interface CompileResult {
/**
* The generated CSS.
*
* Note that this *never* includes a `sourceMapUrl` comment—it's up to the
* caller to determine where to save the source map and how to link to it from
* the stylesheet.
*/
css: string;
/**
* The canonical URLs of all the stylesheets that were loaded during the
* Sass compilation. The order of these URLs is not guaranteed.
*/
loadedUrls: URL[];
/**
* The object representation of the source map that maps locations in the
* generated CSS back to locations in the Sass source code.
*
* This typically uses absolute `file:` URLs to refer to Sass files, although
* this can be controlled by having a custom {@link Importer} return {@link
* ImporterResult.sourceMapUrl}.
*
* This is set if and only if {@link Options.sourceMap} is `true`.
*/
sourceMap?: RawSourceMap;
}
/**
* The result of creating a synchronous compiler. Returned by
* {@link initCompiler}.
*
* @category Compile
*/
export class Compiler {
/**
* Throws an error if constructed directly, instead of via
* {@link initCompiler}.
*/
private constructor();
/**
* The {@link compile} method exposed through a Compiler instance while it is
* active. If this is called after {@link dispose} on the Compiler
* instance, an error will be thrown.
*
* During the Compiler instance's lifespan, given the same input, this will
* return an identical result to the {@link compile} method exposed at the
* module root.
*/
compile(path: string, options?: Options<'sync'>): CompileResult;
/**
* The {@link compileString} method exposed through a Compiler instance while
* it is active. If this is called after {@link dispose} on the Compiler
* instance, an error will be thrown.
*
* During the Compiler instance's lifespan, given the same input, this will
* return an identical result to the {@link compileString} method exposed at
* the module root.
*/
compileString(source: string, options?: StringOptions<'sync'>): CompileResult;
/**
* Ends the lifespan of this Compiler instance. After this is invoked, all
* calls to the Compiler instance's {@link compile} or {@link compileString}
* methods will result in an error.
*/
dispose(): void;
}
/**
* The result of creating an asynchronous compiler. Returned by
* {@link initAsyncCompiler}.
*
* @category Compile
*/
export class AsyncCompiler {
/**
* Throws an error if constructed directly, instead of via
* {@link initAsyncCompiler}.
*/
private constructor();
/**
* The {@link compileAsync} method exposed through an Async Compiler instance
* while it is active. If this is called after {@link dispose} on the Async
* Compiler instance, an error will be thrown.
*
* During the Async Compiler instance's lifespan, given the same input, this
* will return an identical result to the {@link compileAsync} method exposed
* at the module root.
*/
compileAsync(
path: string,
options?: Options<'async'>
): Promise<CompileResult>;
/**
* The {@link compileStringAsync} method exposed through an Async Compiler
* instance while it is active. If this is called after {@link dispose} on the
* Async Compiler instance, an error will be thrown.
*
* During the Async Compiler instance's lifespan, given the same input, this
* will return an identical result to the {@link compileStringAsync} method
* exposed at the module root.
*/
compileStringAsync(
source: string,
options?: StringOptions<'async'>
): Promise<CompileResult>;
/**
* Ends the lifespan of this Async Compiler instance. After this is invoked,
* all subsequent calls to the Compiler instance's `compileAsync` or
* `compileStringAsync` methods will result in an error.
*
* Any compilations that are submitted before `dispose` will not be cancelled,
* and will be allowed to settle.
*
* After all compilations have been settled and Sass completes any internal
* task cleanup, `dispose` will resolve its promise.
*/
dispose(): Promise<void>;
}
/**
* Synchronously compiles the Sass file at `path` to CSS. If it succeeds it
* returns a {@link CompileResult}, and if it fails it throws an {@link
* Exception}.
*
* This only allows synchronous {@link Importer}s and {@link CustomFunction}s.
*
* **Heads up!** When using the [sass-embedded] npm package for single
* compilations, **{@link compileAsync} is almost always faster than
* {@link compile}**, due to the overhead of emulating synchronous messaging
* with worker threads and concurrent compilations being blocked on main thread.
*
* If you are running multiple compilations with the [sass-embedded] npm
* package, using a {@link Compiler} will provide some speed improvements over
* the module-level methods, and an {@link AsyncCompiler} will be much faster.
*
* [sass-embedded]: https://www.npmjs.com/package/sass-embedded
*
* @example
*
* ```js
* const sass = require('sass');
*
* const result = sass.compile("style.scss");
* console.log(result.css);
* ```
*
* @category Compile
* @compatibility dart: "1.45.0", node: false
*/
export function compile(path: string, options?: Options<'sync'>): CompileResult;
/**
* Asynchronously compiles the Sass file at `path` to CSS. Returns a promise
* that resolves with a {@link CompileResult} if it succeeds and rejects with an
* {@link Exception} if it fails.
*
* This only allows synchronous or asynchronous {@link Importer}s and
* {@link CustomFunction}s.
*
* **Heads up!** When using the `sass` npm package, **{@link compile} is almost
* twice as fast as {@link compileAsync}**, due to the overhead of making the
* entire evaluation process asynchronous.
*
* @example
*
* ```js
* const sass = require('sass');
*
* const result = await sass.compileAsync("style.scss");
* console.log(result.css);
* ```
*
* @category Compile
* @compatibility dart: "1.45.0", node: false
*/
export function compileAsync(
path: string,
options?: Options<'async'>
): Promise<CompileResult>;
/**
* Synchronously compiles a stylesheet whose contents is `source` to CSS. If it
* succeeds it returns a {@link CompileResult}, and if it fails it throws an
* {@link Exception}.
*
* This only allows synchronous {@link Importer}s and {@link CustomFunction}s.
*
* **Heads up!** When using the [sass-embedded] npm package for single
* compilations, **{@link compileStringAsync} is almost always faster than
* {@link compileString}**, due to the overhead of emulating synchronous
* messaging with worker threads and concurrent compilations being blocked on
* main thread.
*
* If you are running multiple compilations with the [sass-embedded] npm
* package, using a {@link Compiler} will provide some speed improvements over
* the module-level methods, and an {@link AsyncCompiler} will be much faster.
*
* [sass-embedded]: https://www.npmjs.com/package/sass-embedded
*
* @example
*
* ```js
* const sass = require('sass');
*
* const result = sass.compileString(`
* h1 {
* font-size: 40px;
* code {
* font-face: Roboto Mono;
* }
* }`);
* console.log(result.css);
* ```
*
* @category Compile
* @compatibility dart: "1.45.0", node: false
*/
export function compileString(
source: string,
options?: StringOptions<'sync'>
): CompileResult;
/**
* Asynchronously compiles a stylesheet whose contents is `source` to CSS.
* Returns a promise that resolves with a {@link CompileResult} if it succeeds
* and rejects with an {@link Exception} if it fails.
*
* This only allows synchronous or asynchronous {@link Importer}s and {@link
* CustomFunction}s.
*
* **Heads up!** When using the `sass` npm package, **{@link compileString} is
* almost twice as fast as {@link compileStringAsync}**, due to the overhead
* of making the entire evaluation process asynchronous.
*
* @example
*
* ```js
* const sass = require('sass');
*
* const result = await sass.compileStringAsync(`
* h1 {
* font-size: 40px;
* code {
* font-face: Roboto Mono;
* }
* }`);
* console.log(result.css);
* ```
*
* @category Compile
* @compatibility dart: "1.45.0", node: false
*/
export function compileStringAsync(
source: string,
options?: StringOptions<'async'>
): Promise<CompileResult>;
/**
* Creates a synchronous {@link Compiler}. Each compiler instance exposes the
* {@link compile} and {@link compileString} methods within the lifespan of the
* Compiler. Given identical input, these methods will return results identical
* to their counterparts exposed at the module root. To use asynchronous
* compilation, use {@link initAsyncCompiler}.
*
* When calling the compile functions multiple times, using a compiler instance
* with the [sass-embedded] npm package is much faster than using the top-level
* compilation methods or the [sass] npm package.
*
* [sass-embedded]: https://www.npmjs.com/package/sass-embedded
*
* [sass]: https://www.npmjs.com/package/sass
*
* @example
*
* ```js
* const sass = require('sass');
* function setup() {
* const compiler = sass.initCompiler();
* const result1 = compiler.compileString('a {b: c}').css;
* const result2 = compiler.compileString('a {b: c}').css;
* compiler.dispose();
*
* // throws error
* const result3 = sass.compileString('a {b: c}').css;
* }
* ```
* @category Compile
* @compatibility dart: "1.70.0", node: false
*/
export function initCompiler(): Compiler;
/**
* Creates an asynchronous {@link AsyncCompiler}. Each compiler
* instance exposes the {@link compileAsync} and {@link compileStringAsync}
* methods within the lifespan of the Compiler. Given identical input, these
* methods will return results identical to their counterparts exposed at the
* module root. To use synchronous compilation, use {@link initCompiler};
*
* When calling the compile functions multiple times, using a compiler instance
* with the [sass-embedded] npm package is much faster than using the top-level
* compilation methods or the [sass] npm package.
*
* [sass-embedded]: https://www.npmjs.com/package/sass-embedded
*
* [sass]: https://www.npmjs.com/package/sass
*
* @example
*
* ```js
* const sass = require('sass');
* async function setup() {
* const compiler = await sass.initAsyncCompiler();
* const result1 = await compiler.compileStringAsync('a {b: c}').css;
* const result2 = await compiler.compileStringAsync('a {b: c}').css;
* await compiler.dispose();
*
* // throws error
* const result3 = await sass.compileStringAsync('a {b: c}').css;
* }
* ```
* @category Compile
* @compatibility dart: "1.70.0", node: false
*/
export function initAsyncCompiler(): Promise<AsyncCompiler>;

View File

@@ -0,0 +1,148 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { ConcatSource, RawSource } = require("webpack-sources");
const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
const { getUndoPath } = require("../util/identifier");
const {
createChunkHashHandler,
getChunkInfo
} = require("./ChunkFormatHelpers");
const {
getChunkFilenameTemplate,
getCompilationHooks
} = require("./JavascriptModulesPlugin");
const { generateEntryStartup } = require("./StartupHelpers");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compiler")} Compiler */
const PLUGIN_NAME = "CommonJsChunkFormatPlugin";
class CommonJsChunkFormatPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
compilation.hooks.additionalChunkRuntimeRequirements.tap(
PLUGIN_NAME,
(chunk, set, { chunkGraph }) => {
if (chunk.hasRuntime()) return;
if (chunkGraph.getNumberOfEntryModules(chunk) > 0) {
set.add(RuntimeGlobals.require);
set.add(RuntimeGlobals.startupEntrypoint);
set.add(RuntimeGlobals.externalInstallChunk);
}
}
);
const hooks = getCompilationHooks(compilation);
hooks.renderChunk.tap(PLUGIN_NAME, (modules, renderContext) => {
const { chunk, chunkGraph, runtimeTemplate } = renderContext;
const source = new ConcatSource();
source.add(`exports.id = ${JSON.stringify(chunk.id)};\n`);
source.add(`exports.ids = ${JSON.stringify(chunk.ids)};\n`);
source.add("exports.modules = ");
source.add(modules);
source.add(";\n");
const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder(chunk);
if (runtimeModules.length > 0) {
source.add("exports.runtime =\n");
source.add(
Template.renderChunkRuntimeModules(runtimeModules, renderContext)
);
}
const { entries, runtimeChunk } = getChunkInfo(chunk, chunkGraph);
if (runtimeChunk) {
const currentOutputName = compilation
.getPath(
getChunkFilenameTemplate(chunk, compilation.outputOptions),
{
chunk,
contentHashType: "javascript"
}
)
.replace(/^\/+/g, "")
.split("/");
const runtimeOutputName = compilation
.getPath(
getChunkFilenameTemplate(
/** @type {Chunk} */
(runtimeChunk),
compilation.outputOptions
),
{
chunk: /** @type {Chunk} */ (runtimeChunk),
contentHashType: "javascript"
}
)
.replace(/^\/+/g, "")
.split("/");
// remove common parts
while (
currentOutputName.length > 1 &&
runtimeOutputName.length > 1 &&
currentOutputName[0] === runtimeOutputName[0]
) {
currentOutputName.shift();
runtimeOutputName.shift();
}
const last = runtimeOutputName.join("/");
// create final path
const runtimePath =
getUndoPath(currentOutputName.join("/"), last, true) + last;
const entrySource = new ConcatSource();
entrySource.add(
`(${
runtimeTemplate.supportsArrowFunction() ? "() => " : "function() "
}{\n`
);
entrySource.add("var exports = {};\n");
entrySource.add(source);
entrySource.add(";\n\n// load runtime\n");
entrySource.add(
`var ${RuntimeGlobals.require} = require(${JSON.stringify(
runtimePath
)});\n`
);
entrySource.add(`${RuntimeGlobals.externalInstallChunk}(exports);\n`);
const startupSource = new RawSource(
generateEntryStartup(
chunkGraph,
runtimeTemplate,
entries,
chunk,
false
)
);
entrySource.add(
hooks.renderStartup.call(
startupSource,
entries[entries.length - 1][0],
{
...renderContext,
inlined: false
}
)
);
entrySource.add("\n})()");
return entrySource;
}
return source;
});
hooks.chunkHash.tap(PLUGIN_NAME, createChunkHashHandler(PLUGIN_NAME));
});
}
}
module.exports = CommonJsChunkFormatPlugin;

View File

@@ -0,0 +1,236 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("./makeSerializable");
/**
* @template T
* @param {Set<T>} targetSet set where items should be added
* @param {Set<Iterable<T>>} toMerge iterables to be merged
* @returns {void}
*/
const merge = (targetSet, toMerge) => {
for (const set of toMerge) {
for (const item of set) {
targetSet.add(item);
}
}
};
/**
* @template T
* @param {Set<Iterable<T>>} targetSet set where iterables should be added
* @param {LazySet<T>[]} toDeepMerge lazy sets to be flattened
* @returns {void}
*/
const flatten = (targetSet, toDeepMerge) => {
for (const set of toDeepMerge) {
if (set._set.size > 0) targetSet.add(set._set);
if (set._needMerge) {
for (const mergedSet of set._toMerge) {
targetSet.add(mergedSet);
}
flatten(targetSet, set._toDeepMerge);
}
}
};
/**
* @template T
* @typedef {import("typescript-iterable").SetIterator<T>} SetIterator
*/
/**
* Like Set but with an addAll method to eventually add items from another iterable.
* Access methods make sure that all delayed operations are executed.
* Iteration methods deopts to normal Set performance until clear is called again (because of the chance of modifications during iteration).
* @template T
*/
class LazySet {
/**
* @param {Iterable<T>=} iterable init iterable
*/
constructor(iterable) {
/** @type {Set<T>} */
this._set = new Set(iterable);
/** @type {Set<Iterable<T>>} */
this._toMerge = new Set();
/** @type {LazySet<T>[]} */
this._toDeepMerge = [];
this._needMerge = false;
this._deopt = false;
}
_flatten() {
flatten(this._toMerge, this._toDeepMerge);
this._toDeepMerge.length = 0;
}
_merge() {
this._flatten();
merge(this._set, this._toMerge);
this._toMerge.clear();
this._needMerge = false;
}
_isEmpty() {
return (
this._set.size === 0 &&
this._toMerge.size === 0 &&
this._toDeepMerge.length === 0
);
}
get size() {
if (this._needMerge) this._merge();
return this._set.size;
}
/**
* @param {T} item an item
* @returns {LazySet<T>} itself
*/
add(item) {
this._set.add(item);
return this;
}
/**
* @param {Iterable<T> | LazySet<T>} iterable a immutable iterable or another immutable LazySet which will eventually be merged into the Set
* @returns {LazySet<T>} itself
*/
addAll(iterable) {
if (this._deopt) {
const _set = this._set;
for (const item of iterable) {
_set.add(item);
}
} else {
if (iterable instanceof LazySet) {
if (iterable._isEmpty()) return this;
this._toDeepMerge.push(iterable);
this._needMerge = true;
if (this._toDeepMerge.length > 100000) {
this._flatten();
}
} else {
this._toMerge.add(iterable);
this._needMerge = true;
}
if (this._toMerge.size > 100000) this._merge();
}
return this;
}
clear() {
this._set.clear();
this._toMerge.clear();
this._toDeepMerge.length = 0;
this._needMerge = false;
this._deopt = false;
}
/**
* @param {T} value an item
* @returns {boolean} true, if the value was in the Set before
*/
delete(value) {
if (this._needMerge) this._merge();
return this._set.delete(value);
}
/**
* @returns {SetIterator<[T, T]>} entries
*/
entries() {
this._deopt = true;
if (this._needMerge) this._merge();
return this._set.entries();
}
/**
* @template K
* @param {(value: T, value2: T, set: Set<T>) => void} callbackFn function called for each entry
* @param {K} thisArg this argument for the callbackFn
* @returns {void}
*/
forEach(callbackFn, thisArg) {
this._deopt = true;
if (this._needMerge) this._merge();
// eslint-disable-next-line unicorn/no-array-for-each, unicorn/no-array-method-this-argument
this._set.forEach(callbackFn, thisArg);
}
/**
* @param {T} item an item
* @returns {boolean} true, when the item is in the Set
*/
has(item) {
if (this._needMerge) this._merge();
return this._set.has(item);
}
/**
* @returns {SetIterator<T>} keys
*/
keys() {
this._deopt = true;
if (this._needMerge) this._merge();
return this._set.keys();
}
/**
* @returns {SetIterator<T>} values
*/
values() {
this._deopt = true;
if (this._needMerge) this._merge();
return this._set.values();
}
/**
* @returns {SetIterator<T>} iterable iterator
*/
[Symbol.iterator]() {
this._deopt = true;
if (this._needMerge) this._merge();
return this._set[Symbol.iterator]();
}
/* istanbul ignore next */
get [Symbol.toStringTag]() {
return "LazySet";
}
/**
* @param {import("../serialization/ObjectMiddleware").ObjectSerializerContext} context context
*/
serialize({ write }) {
if (this._needMerge) this._merge();
write(this._set.size);
for (const item of this._set) write(item);
}
/**
* @template T
* @param {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} context context
* @returns {LazySet<T>} lazy set
*/
static deserialize({ read }) {
const count = read();
/** @type {T[]} */
const items = [];
for (let i = 0; i < count; i++) {
items.push(read());
}
return new LazySet(items);
}
}
makeSerializable(LazySet, "webpack/lib/util/LazySet");
module.exports = LazySet;

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PilcrowLeft = createLucideIcon("PilcrowLeft", [
["path", { d: "M14 3v11", key: "mlfb7b" }],
["path", { d: "M14 9h-3a3 3 0 0 1 0-6h9", key: "1ulc19" }],
["path", { d: "M18 3v11", key: "1phi0r" }],
["path", { d: "M22 18H2l4-4", key: "yt65j9" }],
["path", { d: "m6 22-4-4", key: "6jgyf5" }]
]);
export { PilcrowLeft as default };
//# sourceMappingURL=pilcrow-left.js.map

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalAutoLinkPlugin.dev.mjs') : import('./LexicalAutoLinkPlugin.prod.mjs'));
export const AutoLinkPlugin = mod.AutoLinkPlugin;
export const createLinkMatcherWithRegExp = mod.createLinkMatcherWithRegExp;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Email/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAA+B,MAAM,OAAO,CAAA;AAWnD,OAAO,cAAc,CAAA;AA8FrB,eAAO,MAAM,UAAU;;;;;+EAAqC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hono/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAkB1G,MAAM,WAAW,wBAAwB;IACvC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB;IACtE,mEAAmE;IACnE,YAAY,CAAC,EAAE,wBAAwB,CAAC;CACzC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,mBAAmB,CAAC,yBAAyB,CAAC;gBAClE,MAAM,GAAE,yBAA8B;IAIzD;;OAEG;IACI,IAAI,IAAI,mCAAmC,EAAE;IAMpD;;OAEG;IACH,OAAO,CAAC,MAAM;IA8Bd;;OAEG;IACH,OAAO,CAAC,aAAa;IA2BrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA2B/B;;OAEG;IACH,OAAO,CAAC,YAAY;IA8CpB;;OAEG;IAEH,OAAO,CAAC,YAAY;IAoBpB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAI7B;;OAEG;IACH,OAAO,CAAC,YAAY;CASrB"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/folders/utils/getFolderBreadcrumbs.ts"],"sourcesContent":["import type { Document, PayloadRequest } from '../../types/index.js'\nimport type { FolderBreadcrumb } from '../types.js'\n\ntype GetFolderBreadcrumbsArgs = {\n breadcrumbs?: FolderBreadcrumb[]\n folderID?: number | string\n req: PayloadRequest\n}\n/**\n * Builds breadcrumbs up from child folder\n * all the way up to root folder\n */\nexport const getFolderBreadcrumbs = async ({\n breadcrumbs = [],\n folderID,\n req,\n}: GetFolderBreadcrumbsArgs): Promise<FolderBreadcrumb[] | null> => {\n const { payload, user } = req\n if (folderID && payload.config.folders) {\n const folderFieldName: string = payload.config.folders.fieldName\n const folderQuery = await payload.find({\n collection: payload.config.folders.slug,\n depth: 0,\n limit: 1,\n overrideAccess: false,\n req,\n select: {\n name: true,\n [folderFieldName]: true,\n folderType: true,\n },\n user,\n where: {\n id: {\n equals: folderID,\n },\n },\n })\n\n const folder = folderQuery.docs[0] as Document\n\n if (folder) {\n breadcrumbs.push({\n id: folder.id,\n name: folder.name,\n folderType: folder.folderType,\n })\n if (folder[folderFieldName]) {\n return getFolderBreadcrumbs({\n breadcrumbs,\n folderID:\n typeof folder[folderFieldName] === 'number' ||\n typeof folder[folderFieldName] === 'string'\n ? folder[folderFieldName]\n : folder[folderFieldName].id,\n req,\n })\n }\n }\n }\n\n return breadcrumbs.reverse()\n}\n"],"names":["getFolderBreadcrumbs","breadcrumbs","folderID","req","payload","user","config","folders","folderFieldName","fieldName","folderQuery","find","collection","slug","depth","limit","overrideAccess","select","name","folderType","where","id","equals","folder","docs","push","reverse"],"mappings":"AAQA;;;CAGC,GACD,OAAO,MAAMA,uBAAuB,OAAO,EACzCC,cAAc,EAAE,EAChBC,QAAQ,EACRC,GAAG,EACsB;IACzB,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGF;IAC1B,IAAID,YAAYE,QAAQE,MAAM,CAACC,OAAO,EAAE;QACtC,MAAMC,kBAA0BJ,QAAQE,MAAM,CAACC,OAAO,CAACE,SAAS;QAChE,MAAMC,cAAc,MAAMN,QAAQO,IAAI,CAAC;YACrCC,YAAYR,QAAQE,MAAM,CAACC,OAAO,CAACM,IAAI;YACvCC,OAAO;YACPC,OAAO;YACPC,gBAAgB;YAChBb;YACAc,QAAQ;gBACNC,MAAM;gBACN,CAACV,gBAAgB,EAAE;gBACnBW,YAAY;YACd;YACAd;YACAe,OAAO;gBACLC,IAAI;oBACFC,QAAQpB;gBACV;YACF;QACF;QAEA,MAAMqB,SAASb,YAAYc,IAAI,CAAC,EAAE;QAElC,IAAID,QAAQ;YACVtB,YAAYwB,IAAI,CAAC;gBACfJ,IAAIE,OAAOF,EAAE;gBACbH,MAAMK,OAAOL,IAAI;gBACjBC,YAAYI,OAAOJ,UAAU;YAC/B;YACA,IAAII,MAAM,CAACf,gBAAgB,EAAE;gBAC3B,OAAOR,qBAAqB;oBAC1BC;oBACAC,UACE,OAAOqB,MAAM,CAACf,gBAAgB,KAAK,YACnC,OAAOe,MAAM,CAACf,gBAAgB,KAAK,WAC/Be,MAAM,CAACf,gBAAgB,GACvBe,MAAM,CAACf,gBAAgB,CAACa,EAAE;oBAChClB;gBACF;YACF;QACF;IACF;IAEA,OAAOF,YAAYyB,OAAO;AAC5B,EAAC"}

View File

@@ -0,0 +1,173 @@
import { upsertRow } from '../../../../upsertRow/index.js';
import { traverseFields } from './traverseFields.js';
export const fetchAndResave = async ({ adapter, collectionSlug, db, debug, docsToResave, fields, globalSlug, isVersions, payload, req, tableName })=>{
for (const [id, rows] of Object.entries(docsToResave)){
if (collectionSlug) {
const collectionConfig = payload.collections[collectionSlug].config;
if (collectionConfig) {
if (isVersions) {
const doc = await payload.findVersionByID({
id,
collection: collectionSlug,
depth: 0,
fallbackLocale: null,
locale: 'all',
req,
showHiddenFields: true
});
if (debug) {
payload.logger.info(`The collection "${collectionConfig.slug}" version with ID ${id} will be migrated`);
}
traverseFields({
doc,
fields,
path: '',
rows
});
try {
await upsertRow({
id: doc.id,
adapter,
collectionSlug,
data: doc,
db,
fields,
ignoreResult: true,
operation: 'update',
req,
tableName
});
} catch (err) {
payload.logger.error(`"${collectionConfig.slug}" version with ID ${doc.id} FAILED TO MIGRATE`);
throw err;
}
if (debug) {
payload.logger.info(`"${collectionConfig.slug}" version with ID ${doc.id} migrated successfully!`);
}
} else {
const doc = await payload.findByID({
id,
collection: collectionSlug,
depth: 0,
fallbackLocale: null,
locale: 'all',
req,
showHiddenFields: true
});
if (debug) {
payload.logger.info(`The collection "${collectionConfig.slug}" with ID ${doc.id} will be migrated`);
}
traverseFields({
doc,
fields,
path: '',
rows
});
try {
await upsertRow({
id: doc.id,
adapter,
collectionSlug,
data: doc,
db,
fields,
ignoreResult: true,
operation: 'update',
req,
tableName
});
} catch (err) {
payload.logger.error(`The collection "${collectionConfig.slug}" with ID ${doc.id} has FAILED TO MIGRATE`);
throw err;
}
if (debug) {
payload.logger.info(`The collection "${collectionConfig.slug}" with ID ${doc.id} has migrated successfully!`);
}
}
}
}
if (globalSlug) {
const globalConfig = payload.config.globals?.find((global)=>global.slug === globalSlug);
if (globalConfig) {
if (isVersions) {
const { docs } = await payload.findGlobalVersions({
slug: globalSlug,
depth: 0,
fallbackLocale: null,
limit: 0,
locale: 'all',
req,
showHiddenFields: true
});
if (debug) {
payload.logger.info(`${docs.length} global "${globalSlug}" versions will be migrated`);
}
for (const doc of docs){
traverseFields({
doc,
fields,
path: '',
rows
});
try {
await upsertRow({
id: doc.id,
adapter,
data: doc,
db,
fields,
globalSlug,
ignoreResult: true,
operation: 'update',
req,
tableName
});
} catch (err) {
payload.logger.error(`"${globalSlug}" version with ID ${doc.id} FAILED TO MIGRATE`);
throw err;
}
if (debug) {
payload.logger.info(`"${globalSlug}" version with ID ${doc.id} migrated successfully!`);
}
}
} else {
const doc = await payload.findGlobal({
slug: globalSlug,
depth: 0,
fallbackLocale: null,
locale: 'all',
req,
showHiddenFields: true
});
traverseFields({
doc,
fields,
path: '',
rows
});
try {
await upsertRow({
adapter,
data: doc,
db,
fields,
globalSlug,
ignoreResult: true,
operation: 'update',
req,
tableName
});
} catch (err) {
payload.logger.error(`The global "${globalSlug}" has FAILED TO MIGRATE`);
throw err;
}
if (debug) {
payload.logger.info(`The global "${globalSlug}" has migrated successfully!`);
}
}
}
}
}
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"indent.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1 @@
export declare function isTouchEvent(event: Event | undefined | null): event is TouchEvent;

View File

@@ -0,0 +1,28 @@
import type { JWK, FlattenedVerifyResult, KeyLike, FlattenedJWSInput, JWSHeaderParameters, VerifyOptions, GenericGetKeyFunction, ResolvedKey } from '../../types';
/**
* Interface for Flattened JWS Verification dynamic key resolution. No token components have been
* verified at the time of this function call.
*
* @see {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} to verify using a remote JSON Web Key Set.
*/
export interface FlattenedVerifyGetKey extends GenericGetKeyFunction<JWSHeaderParameters | undefined, FlattenedJWSInput, KeyLike | JWK | Uint8Array> {
}
/**
* Verifies the signature and format of and afterwards decodes the Flattened JWS.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/jws/flattened/verify'`.
*
* @param jws Flattened JWS.
* @param key Key to verify the JWS with. See
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
* @param options JWS Verify options.
*/
export declare function flattenedVerify(jws: FlattenedJWSInput, key: KeyLike | Uint8Array | JWK, options?: VerifyOptions): Promise<FlattenedVerifyResult>;
/**
* @param jws Flattened JWS.
* @param getKey Function resolving a key to verify the JWS with. See
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
* @param options JWS Verify options.
*/
export declare function flattenedVerify<KeyLikeType extends KeyLike = KeyLike>(jws: FlattenedJWSInput, getKey: FlattenedVerifyGetKey, options?: VerifyOptions): Promise<FlattenedVerifyResult & ResolvedKey<KeyLikeType>>;

View File

@@ -0,0 +1,32 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link endOfYear} function options.
*/
export interface EndOfYearOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name endOfYear
* @category Year Helpers
* @summary Return the end of a year for the given date.
*
* @description
* Return the end of a year for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The end of a year
*
* @example
* // The end of a year for 2 September 2014 11:55:00:
* const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))
* //=> Wed Dec 31 2014 23:59:59.999
*/
export declare function endOfYear<
DateType extends Date,
ResultDate extends Date = DateType,
>(date: DateArg<DateType>, options?: EndOfYearOptions<ResultDate>): ResultDate;

View File

@@ -0,0 +1,254 @@
'use strict'
import * as formats from './formats.js'
const has = Object.prototype.hasOwnProperty
const isArray = Array.isArray
const hexTable = (function () {
const array = []
for (let i = 0; i < 256; ++i) {
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase())
}
return array
})()
const compactQueue = function compactQueue(queue) {
while (queue.length > 1) {
const item = queue.pop()
const obj = item.obj[item.prop]
if (isArray(obj)) {
const compacted = []
for (let j = 0; j < obj.length; ++j) {
if (typeof obj[j] !== 'undefined') {
compacted.push(obj[j])
}
}
item.obj[item.prop] = compacted
}
}
}
export const arrayToObject = function arrayToObject(source, options) {
const obj = options && options.plainObjects ? Object.create(null) : {}
for (let i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i]
}
}
return obj
}
export const merge = function merge(target, source, options) {
/* eslint no-param-reassign: 0 */
if (!source) {
return target
}
if (typeof source !== 'object') {
if (isArray(target)) {
target.push(source)
} else if (target && typeof target === 'object') {
if (
(options && (options.plainObjects || options.allowPrototypes)) ||
!has.call(Object.prototype, source)
) {
target[source] = true
}
} else {
return [target, source]
}
return target
}
if (!target || typeof target !== 'object') {
return [target].concat(source)
}
let mergeTarget = target
if (isArray(target) && !isArray(source)) {
mergeTarget = arrayToObject(target, options)
}
if (isArray(target) && isArray(source)) {
source.forEach(function (item, i) {
if (has.call(target, i)) {
const targetItem = target[i]
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
target[i] = merge(targetItem, item, options)
} else {
target.push(item)
}
} else {
target[i] = item
}
})
return target
}
return Object.keys(source).reduce(function (acc, key) {
const value = source[key]
if (has.call(acc, key)) {
acc[key] = merge(acc[key], value, options)
} else {
acc[key] = value
}
return acc
}, mergeTarget)
}
export const assign = function assignSingleSource(target, source) {
return Object.keys(source).reduce(function (acc, key) {
acc[key] = source[key]
return acc
}, target)
}
export const decode = function (str, decoder, charset) {
const strWithoutPlus = str.replace(/\+/g, ' ')
if (charset === 'iso-8859-1') {
// unescape never throws, no try...catch needed:
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape)
}
// utf-8
try {
return decodeURIComponent(strWithoutPlus)
} catch (e) {
return strWithoutPlus
}
}
const limit = 1024
export const encode = function encode(str, defaultEncoder, charset, kind, format) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if (str.length === 0) {
return str
}
let string = str
if (typeof str === 'symbol') {
string = Symbol.prototype.toString.call(str)
} else if (typeof str !== 'string') {
string = String(str)
}
if (charset === 'iso-8859-1') {
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
return '%26%23' + parseInt($0.slice(2), 16) + '%3B'
})
}
let out = ''
for (let j = 0; j < string.length; j += limit) {
const segment = string.length >= limit ? string.slice(j, j + limit) : string
const arr = []
for (let i = 0; i < segment.length; ++i) {
let c = segment.charCodeAt(i)
if (
c === 0x2d || // -
c === 0x2e || // .
c === 0x5f || // _
c === 0x7e || // ~
(c >= 0x30 && c <= 0x39) || // 0-9
(c >= 0x41 && c <= 0x5a) || // a-z
(c >= 0x61 && c <= 0x7a) || // A-Z
(format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
) {
arr[arr.length] = segment.charAt(i)
continue
}
if (c < 0x80) {
arr[arr.length] = hexTable[c]
continue
}
if (c < 0x800) {
arr[arr.length] = hexTable[0xc0 | (c >> 6)] + hexTable[0x80 | (c & 0x3f)]
continue
}
if (c < 0xd800 || c >= 0xe000) {
arr[arr.length] =
hexTable[0xe0 | (c >> 12)] +
hexTable[0x80 | ((c >> 6) & 0x3f)] +
hexTable[0x80 | (c & 0x3f)]
continue
}
i += 1
c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff))
arr[arr.length] =
hexTable[0xf0 | (c >> 18)] +
hexTable[0x80 | ((c >> 12) & 0x3f)] +
hexTable[0x80 | ((c >> 6) & 0x3f)] +
hexTable[0x80 | (c & 0x3f)]
}
out += arr.join('')
}
return out
}
export const compact = function compact(value) {
const queue = [{ obj: { o: value }, prop: 'o' }]
const refs = []
for (let i = 0; i < queue.length; ++i) {
const item = queue[i]
const obj = item.obj[item.prop]
const keys = Object.keys(obj)
for (let j = 0; j < keys.length; ++j) {
const key = keys[j]
const val = obj[key]
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
queue.push({ obj: obj, prop: key })
refs.push(val)
}
}
}
compactQueue(queue)
return value
}
export const isRegExp = function isRegExp(obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]'
}
export const isBuffer = function isBuffer(obj) {
if (!obj || typeof obj !== 'object') {
return false
}
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj))
}
export const combine = function combine(a, b) {
return [].concat(a, b)
}
export const maybeMap = function maybeMap(val, fn) {
if (isArray(val)) {
const mapped = []
for (let i = 0; i < val.length; i += 1) {
mapped.push(fn(val[i]))
}
return mapped
}
return fn(val)
}

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MonitorUp = createLucideIcon("MonitorUp", [
["path", { d: "m9 10 3-3 3 3", key: "11gsxs" }],
["path", { d: "M12 13V7", key: "h0r20n" }],
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "M8 21h8", key: "1ev6f3" }]
]);
export { MonitorUp as default };
//# sourceMappingURL=monitor-up.js.map

View File

@@ -0,0 +1,3 @@
"use strict";
exports._ = require("tslib").__rewriteRelativeImportExtension;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('unary', require('../unary'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1 @@
{"version":3,"file":"shopping-basket.js","sources":["../../../src/icons/shopping-basket.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ShoppingBasket\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgMTEtMSA5IiAvPgogIDxwYXRoIGQ9Im0xOSAxMS00LTciIC8+CiAgPHBhdGggZD0iTTIgMTFoMjAiIC8+CiAgPHBhdGggZD0ibTMuNSAxMSAxLjYgNy40YTIgMiAwIDAgMCAyIDEuNmg5LjhhMiAyIDAgMCAwIDItMS42bDEuNy03LjQiIC8+CiAgPHBhdGggZD0iTTQuNSAxNS41aDE1IiAvPgogIDxwYXRoIGQ9Im01IDExIDQtNyIgLz4KICA8cGF0aCBkPSJtOSAxMSAxIDkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/shopping-basket\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ShoppingBasket = createLucideIcon('ShoppingBasket', [\n ['path', { d: 'm15 11-1 9', key: '5wnq3a' }],\n ['path', { d: 'm19 11-4-7', key: 'cnml18' }],\n ['path', { d: 'M2 11h20', key: '3eubbj' }],\n ['path', { d: 'm3.5 11 1.6 7.4a2 2 0 0 0 2 1.6h9.8a2 2 0 0 0 2-1.6l1.7-7.4', key: 'yiazzp' }],\n ['path', { d: 'M4.5 15.5h15', key: '13mye1' }],\n ['path', { d: 'm5 11 4-7', key: '116ra9' }],\n ['path', { d: 'm9 11 1 9', key: '1ojof7' }],\n]);\n\nexport default ShoppingBasket;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,25 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ono = void 0;
/* eslint-env commonjs */
const singleton_1 = require("./singleton");
Object.defineProperty(exports, "ono", { enumerable: true, get: function () { return singleton_1.ono; } });
var constructor_1 = require("./constructor");
Object.defineProperty(exports, "Ono", { enumerable: true, get: function () { return constructor_1.Ono; } });
__exportStar(require("./types"), exports);
exports.default = singleton_1.ono;
// CommonJS default export hack
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = Object.assign(module.exports.default, module.exports);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,65 @@
import MagicString, { SourceMap } from "magic-string";
import { UnpluginInstance, UnpluginOptions } from "unplugin";
import { Logger } from "./logger";
import { Options, SentrySDKBuildFlags } from "./types";
import { CodeInjection } from "./utils";
type InjectionPlugin = (injectionCode: CodeInjection, debugIds: boolean, logger: Logger) => UnpluginOptions;
type LegacyPlugins = {
releaseInjectionPlugin: (injectionCode: string) => UnpluginOptions;
moduleMetadataInjectionPlugin: (injectionCode: string) => UnpluginOptions;
debugIdInjectionPlugin: (logger: Logger) => UnpluginOptions;
};
interface SentryUnpluginFactoryOptions {
injectionPlugin: InjectionPlugin | LegacyPlugins;
componentNameAnnotatePlugin?: (ignoredComponents: string[], injectIntoHtml: boolean) => UnpluginOptions;
debugIdUploadPlugin: (upload: (buildArtifacts: string[]) => Promise<void>, logger: Logger, createDependencyOnBuildArtifacts: () => () => void, webpack_forceExitOnBuildComplete?: boolean) => UnpluginOptions;
bundleSizeOptimizationsPlugin: (buildFlags: SentrySDKBuildFlags) => UnpluginOptions;
getBundlerMajorVersion?: () => string | undefined;
}
/**
* Creates an unplugin instance used to create Sentry plugins for Vite, Rollup, esbuild, and Webpack.
*/
export declare function sentryUnpluginFactory({ injectionPlugin, componentNameAnnotatePlugin, debugIdUploadPlugin, bundleSizeOptimizationsPlugin, getBundlerMajorVersion, }: SentryUnpluginFactoryOptions): UnpluginInstance<Options | undefined, true>;
/**
* Determines whether the Sentry CLI binary is in its expected location.
* This function is useful since `@sentry/cli` installs the binary via a post-install
* script and post-install scripts may not always run. E.g. with `npm i --ignore-scripts`.
*/
export declare function sentryCliBinaryExists(): boolean;
/**
* Simplified `renderChunk` hook type from Rollup.
* We can't reference the type directly because the Vite plugin complains
* about type mismatches
*/
type RenderChunkHook = (code: string, chunk: {
fileName: string;
facadeModuleId?: string | null;
}, outputOptions?: unknown, meta?: {
magicString?: MagicString;
}) => {
code: string;
readonly map?: SourceMap;
} | null;
export declare function createRollupBundleSizeOptimizationHooks(replacementValues: SentrySDKBuildFlags): {
transform: UnpluginOptions["transform"];
};
export declare function createRollupInjectionHooks(injectionCode: CodeInjection, debugIds: boolean): {
renderChunk: RenderChunkHook;
};
export declare function createRollupDebugIdUploadHooks(upload: (buildArtifacts: string[]) => Promise<void>, _logger: Logger, createDependencyOnBuildArtifacts: () => () => void): {
writeBundle: (outputOptions: {
dir?: string;
file?: string;
}, bundle: {
[fileName: string]: unknown;
}) => Promise<void>;
};
export declare function createComponentNameAnnotateHooks(ignoredComponents: string[], injectIntoHtml: boolean): {
transform: UnpluginOptions["transform"];
};
export declare function getDebugIdSnippet(debugId: string): CodeInjection;
export type { Logger } from "./logger";
export type { Options, SentrySDKBuildFlags } from "./types";
export { CodeInjection, replaceBooleanFlagsInCode, stringToUUID } from "./utils";
export { createSentryBuildPluginManager } from "./build-plugin-manager";
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=(t,n,r,i)=>()=>(e.throwIfEmpty(t,`Collection cannot be empty`),e.throwIfEmpty(n,`Field cannot be empty`),{path:`/relations/${t}/${n}`,params:i??{},body:JSON.stringify(r),method:`PATCH`});exports.updateRelation=t;
//# sourceMappingURL=relations.cjs.map

View File

@@ -0,0 +1,5 @@
import { IPropertyTokenValueDescriptor } from '../IPropertyDescriptor';
export declare const marginTop: IPropertyTokenValueDescriptor;
export declare const marginRight: IPropertyTokenValueDescriptor;
export declare const marginBottom: IPropertyTokenValueDescriptor;
export declare const marginLeft: IPropertyTokenValueDescriptor;

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MonitorDown = createLucideIcon("MonitorDown", [
["path", { d: "M12 13V7", key: "h0r20n" }],
["path", { d: "m15 10-3 3-3-3", key: "lzhmyn" }],
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "M8 21h8", key: "1ev6f3" }]
]);
export { MonitorDown as default };
//# sourceMappingURL=monitor-down.js.map

View File

@@ -0,0 +1,10 @@
"use strict";
exports.getWeekOfMonth = void 0;
var _index = require("../getWeekOfMonth.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const getWeekOfMonth = (exports.getWeekOfMonth = (0, _index2.convertToFP)(
_index.getWeekOfMonth,
1,
));

View File

@@ -0,0 +1,8 @@
export const getArrayRelationName = ({ field, path, tableName })=>{
if (field.dbName && path.length > 63) {
return `_${tableName}`;
}
return path;
};
//# sourceMappingURL=getArrayRelationName.js.map

View File

@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareDashedBottom = createLucideIcon("SquareDashedBottom", [
[
"path",
{ d: "M5 21a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2", key: "as5y1o" }
],
["path", { d: "M9 21h1", key: "15o7lz" }],
["path", { d: "M14 21h1", key: "v9vybs" }]
]);
export { SquareDashedBottom as default };
//# sourceMappingURL=square-dashed-bottom.js.map

View File

@@ -0,0 +1,143 @@
var test = require('tape');
var path = require('path');
var parse = path.parse || require('path-parse');
var keys = require('object-keys');
var nodeModulesPaths = require('../lib/node-modules-paths');
var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) {
var moduleDirs = [].concat(moduleDirectories || 'node_modules');
if (paths) {
for (var k = 0; k < paths.length; ++k) {
moduleDirs.push(path.basename(paths[k]));
}
}
var foundModuleDirs = {};
var uniqueDirs = {};
var parsedDirs = {};
for (var i = 0; i < dirs.length; ++i) {
var parsed = parse(dirs[i]);
if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; }
foundModuleDirs[parsed.base] += 1;
parsedDirs[parsed.dir] = true;
uniqueDirs[dirs[i]] = true;
}
t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has');
var foundModuleDirNames = keys(foundModuleDirs);
t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found');
t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique');
var counts = {};
for (var j = 0; j < foundModuleDirNames.length; ++j) {
counts[foundModuleDirs[j]] = true;
}
t.equal(keys(counts).length, 1, 'all found module directories had the same count');
};
test('node-modules-paths', function (t) {
t.test('no options', function (t) {
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start);
verifyDirs(t, start, dirs);
t.end();
});
t.test('empty options', function (t) {
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, {});
verifyDirs(t, start, dirs);
t.end();
});
t.test('with paths=array option', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var dirs = nodeModulesPaths(start, { paths: paths });
verifyDirs(t, start, dirs, null, paths);
t.end();
});
t.test('with paths=function option', function (t) {
var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request));
};
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg');
verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]);
t.end();
});
t.test('with paths=function skipping node modules resolution', function (t) {
var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
return [];
};
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, { paths: paths });
t.deepEqual(dirs, [], 'no node_modules was computed');
t.end();
});
t.test('with moduleDirectory option', function (t) {
var start = path.join(__dirname, 'resolver');
var moduleDirectory = 'not node modules';
var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory });
verifyDirs(t, start, dirs, moduleDirectory);
t.end();
});
t.test('with 1 moduleDirectory and paths options', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var moduleDirectory = 'not node modules';
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory });
verifyDirs(t, start, dirs, moduleDirectory, paths);
t.end();
});
t.test('with 1+ moduleDirectory and paths options', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var moduleDirectories = ['not node modules', 'other modules'];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
verifyDirs(t, start, dirs, moduleDirectories, paths);
t.end();
});
t.test('combine paths correctly on Windows', function (t) {
var start = 'C:\\Users\\username\\myProject\\src';
var paths = [];
var moduleDirectories = ['node_modules', start];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) {
var start = '/Users/username/git/myProject/src';
var paths = [];
var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src'];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
});

View File

@@ -0,0 +1,9 @@
import type { SanitizedCollectionConfig } from 'payload';
export type DefaultListViewProps = {
collectionSlug: SanitizedCollectionConfig['slug'];
listSearchableFields: SanitizedCollectionConfig['admin']['listSearchableFields'];
};
export type ListIndexProps = {
collection: SanitizedCollectionConfig;
};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BlockStatement = BlockStatement;
exports.Directive = Directive;
exports.DirectiveLiteral = DirectiveLiteral;
exports.File = File;
exports.InterpreterDirective = InterpreterDirective;
exports.Placeholder = Placeholder;
exports.Program = Program;
function File(node) {
if (node.program) {
this.print(node.program.interpreter);
}
this.print(node.program);
}
function Program(node) {
var _node$directives;
this.printInnerComments(false);
const directivesLen = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
if (directivesLen) {
var _node$directives$trai;
const newline = node.body.length ? 2 : 1;
this.printSequence(node.directives, undefined, undefined, newline);
if (!((_node$directives$trai = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) {
this.newline(newline);
}
}
this.printSequence(node.body);
}
function BlockStatement(node) {
var _node$directives2;
this.tokenChar(123);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
const directivesLen = (_node$directives2 = node.directives) == null ? void 0 : _node$directives2.length;
if (directivesLen) {
var _node$directives$trai2;
const newline = node.body.length ? 2 : 1;
this.printSequence(node.directives, true, true, newline);
if (!((_node$directives$trai2 = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai2.length)) {
this.newline(newline);
}
}
this.printSequence(node.body, true, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightBrace(node);
}
function Directive(node) {
this.print(node.value);
this.semicolon();
}
const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
function DirectiveLiteral(node) {
const raw = this.getPossibleRaw(node);
if (!this.format.minified && raw !== undefined) {
this.token(raw);
return;
}
const {
value
} = node;
if (!unescapedDoubleQuoteRE.test(value)) {
this.token(`"${value}"`);
} else if (!unescapedSingleQuoteRE.test(value)) {
this.token(`'${value}'`);
} else {
throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
}
}
function InterpreterDirective(node) {
this.token(`#!${node.value}`);
this._newline();
}
function Placeholder(node) {
this.token("%%");
this.print(node.name);
this.token("%%");
if (node.expectedNode === "Statement") {
this.semicolon();
}
}
//# sourceMappingURL=base.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../src/views/NotFound/index.client.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAqCA,CAAA"}

View File

@@ -0,0 +1,73 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
var react = require('react');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Shortcut to Lexical subscriptions when values are used for render.
* @param subscription - The function to create the {@link LexicalSubscription}. This function's identity must be stable (e.g. defined at module scope or with useCallback).
*/
function useLexicalSubscription(subscription) {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
const initializedSubscription = react.useMemo(() => subscription(editor), [editor, subscription]);
const [value, setValue] = react.useState(() => initializedSubscription.initialValueFn());
const valueRef = react.useRef(value);
useLayoutEffectImpl(() => {
const {
initialValueFn,
subscribe
} = initializedSubscription;
const currentValue = initialValueFn();
if (valueRef.current !== currentValue) {
valueRef.current = currentValue;
setValue(currentValue);
}
return subscribe(newValue => {
valueRef.current = newValue;
setValue(newValue);
});
}, [initializedSubscription, subscription]);
return value;
}
exports.useLexicalSubscription = useLexicalSubscription;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 Q H 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 4C 5C","194":"0B 1B"},D:{"1":"0 1 2 3 4 5 6 7 8 uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB"},E:{"1":"ID","2":"J bB K D E F A B C L 6C bC 7C 8C 9C AD cC PC QC","322":"M G BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC"},F:{"1":"0 1 2 3 4 5 6 7 8 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC 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":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB JD KD LD MD PC xC ND QC"},G:{"2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD","322":"eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","2":"J"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"7D","2":"6D"}},B:5,C:"requestIdleCallback",D:true};

View File

@@ -0,0 +1,46 @@
"use strict";
exports.differenceInMinutes = differenceInMinutes;
var _index = require("./_lib/getRoundingMethod.cjs");
var _index2 = require("./constants.cjs");
var _index3 = require("./differenceInMilliseconds.cjs");
/**
* The {@link differenceInMinutes} function options.
*/
/**
* @name differenceInMinutes
* @category Minute Helpers
* @summary Get the number of minutes between the given dates.
*
* @description
* Get the signed number of full (rounded towards 0) minutes between the given dates.
*
* @param dateLeft - The later date
* @param dateRight - The earlier date
* @param options - An object with options.
*
* @returns The number of minutes
*
* @example
* // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?
* const result = differenceInMinutes(
* new Date(2014, 6, 2, 12, 20, 0),
* new Date(2014, 6, 2, 12, 7, 59)
* )
* //=> 12
*
* @example
* // How many minutes are between 10:01:59 and 10:00:00
* const result = differenceInMinutes(
* new Date(2000, 0, 1, 10, 0, 0),
* new Date(2000, 0, 1, 10, 1, 59)
* )
* //=> -1
*/
function differenceInMinutes(dateLeft, dateRight, options) {
const diff =
(0, _index3.differenceInMilliseconds)(dateLeft, dateRight) /
_index2.millisecondsInMinute;
return (0, _index.getRoundingMethod)(options?.roundingMethod)(diff);
}

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.preProcessRows = exports.preProcessColumns = void 0;
const table_helpers_1 = require("../utils/table-helpers");
const createComputedColumnsIfNecessary = (table) => {
if (table.computedColumns.length) {
table.computedColumns.forEach((computedColumn) => {
table.addColumn(computedColumn);
table.rows.forEach((row) => {
row.text[computedColumn.name] = computedColumn.function(row.text);
});
});
}
};
const disableColumnsIfNecessary = (table) => {
if (table.enabledColumns.length) {
table.columns = table.columns.filter((col) => table.enabledColumns.includes(col.name));
}
};
const enableColumnsIfNecessary = (table) => {
if (table.disabledColumns.length) {
table.columns = table.columns.filter((col) => !table.disabledColumns.includes(col.name));
}
};
const findColumnWidth = (table) => {
table.columns.forEach((column) => {
column.length = (0, table_helpers_1.findLenOfColumn)(column, table.rows, table.charLength);
});
};
const preProcessColumns = (table) => {
createComputedColumnsIfNecessary(table);
enableColumnsIfNecessary(table);
disableColumnsIfNecessary(table);
findColumnWidth(table);
};
exports.preProcessColumns = preProcessColumns;
const preProcessRows = (table) => {
const newRows = table.rows
.filter((r) => table.filterFunction(r.text))
.sort((r1, r2) => table.sortFunction(r1.text, r2.text));
table.rows = newRows;
};
exports.preProcessRows = preProcessRows;

View File

@@ -0,0 +1,22 @@
import { DirectusOperation } from "../../../schema/operation.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/delete/operations.d.ts
/**
* Delete multiple existing operations.
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deleteOperations: <Schema>(keys: DirectusOperation<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing operation.
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deleteOperation: <Schema>(key: DirectusOperation<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deleteOperation, deleteOperations };
//# sourceMappingURL=operations.d.cts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/utilities/dependencies/isError.ts"],"sourcesContent":["/*\n This source code has been taken and modified from https://github.com/vercel/next.js/blob/be87132327ea28acd4bf7af09a401bac2374cb64/packages/next/src/lib/is-error.ts\n\n License:\n\n The MIT License (MIT)\n\n Copyright (c) 2024 Vercel, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\nexport interface ErrorWithCode extends Error {\n code?: number | string\n}\n\nexport function isError(err: unknown): err is ErrorWithCode {\n return typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n}\n"],"names":["isError","err"],"mappings":"AAAA;;;;;;;;;;;;;;AAcA,GAMA,OAAO,SAASA,QAAQC,GAAY;IAClC,OAAO,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAClF"}

View File

@@ -0,0 +1,29 @@
'use strict'
const numeric = /^[0-9]+$/
const compareIdentifiers = (a, b) => {
if (typeof a === 'number' && typeof b === 'number') {
return a === b ? 0 : a < b ? -1 : 1
}
const anum = numeric.test(a)
const bnum = numeric.test(b)
if (anum && bnum) {
a = +a
b = +b
}
return a === b ? 0
: (anum && !bnum) ? -1
: (bnum && !anum) ? 1
: a < b ? -1
: 1
}
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
module.exports = {
compareIdentifiers,
rcompareIdentifiers,
}

View File

@@ -0,0 +1,26 @@
var createRound = require('./_createRound');
/**
* Computes `number` rounded up to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round up.
* @param {number} [precision=0] The precision to round up to.
* @returns {number} Returns the rounded up number.
* @example
*
* _.ceil(4.006);
* // => 5
*
* _.ceil(6.004, 2);
* // => 6.01
*
* _.ceil(6040, -2);
* // => 6100
*/
var ceil = createRound('ceil');
module.exports = ceil;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/postgres-js/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport type { PostgresJsDatabase } from './driver.ts';\n\nexport async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: PostgresJsDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tawait db.dialect.migrate(migrations, db.session, config);\n}\n"],"mappings":"AACA,SAAS,0BAA0B;AAGnC,eAAsB,QACrB,IACA,QACC;AACD,QAAM,aAAa,mBAAmB,MAAM;AAC5C,QAAM,GAAG,QAAQ,QAAQ,YAAY,GAAG,SAAS,MAAM;AACxD;","names":[]}

View File

@@ -0,0 +1,95 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule;
var _GraphQLError = require('../../error/GraphQLError.js');
var _kinds = require('../../language/kinds.js');
var _predicates = require('../../language/predicates.js');
var _directives = require('../../type/directives.js');
/**
* Unique directive names per location
*
* A GraphQL document is only valid if all non-repeatable directives at
* a given location are uniquely named.
*
* See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location
*/
function UniqueDirectivesPerLocationRule(context) {
const uniqueDirectiveMap = Object.create(null);
const schema = context.getSchema();
const definedDirectives = schema
? schema.getDirectives()
: _directives.specifiedDirectives;
for (const directive of definedDirectives) {
uniqueDirectiveMap[directive.name] = !directive.isRepeatable;
}
const astDefinitions = context.getDocument().definitions;
for (const def of astDefinitions) {
if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
uniqueDirectiveMap[def.name.value] = !def.repeatable;
}
}
const schemaDirectives = Object.create(null);
const typeDirectivesMap = Object.create(null);
return {
// Many different AST nodes may contain directives. Rather than listing
// them all, just listen for entering any node, and check to see if it
// defines any directives.
enter(node) {
if (!('directives' in node) || !node.directives) {
return;
}
let seenDirectives;
if (
node.kind === _kinds.Kind.SCHEMA_DEFINITION ||
node.kind === _kinds.Kind.SCHEMA_EXTENSION
) {
seenDirectives = schemaDirectives;
} else if (
(0, _predicates.isTypeDefinitionNode)(node) ||
(0, _predicates.isTypeExtensionNode)(node)
) {
const typeName = node.name.value;
seenDirectives = typeDirectivesMap[typeName];
if (seenDirectives === undefined) {
typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
}
} else {
seenDirectives = Object.create(null);
}
for (const directive of node.directives) {
const directiveName = directive.name.value;
if (uniqueDirectiveMap[directiveName]) {
if (seenDirectives[directiveName]) {
context.reportError(
new _GraphQLError.GraphQLError(
`The directive "@${directiveName}" can only be used once at this location.`,
{
nodes: [seenDirectives[directiveName], directive],
},
),
);
} else {
seenDirectives[directiveName] = directive;
}
}
}
},
};
}

View File

@@ -0,0 +1,74 @@
import type { Cache } from './utils';
export type InternalCopier<Value> = (value: Value, state: State) => Value;
export interface State {
Constructor: any;
cache: Cache;
copier: InternalCopier<any>;
prototype: any;
}
/**
* Deeply copy the indexed values in the array.
*/
export declare function copyArrayLoose(array: any[], state: State): any;
/**
* Deeply copy the indexed values in the array, as well as any custom properties.
*/
export declare function copyArrayStrict<Value extends any[]>(array: Value, state: State): Value;
/**
* Copy the contents of the ArrayBuffer.
*/
export declare function copyArrayBuffer<Value extends ArrayBuffer>(arrayBuffer: Value, _state: State): Value;
/**
* Create a new Blob with the contents of the original.
*/
export declare function copyBlob<Value extends Blob>(blob: Value, _state: State): Value;
/**
* Create a new DataView with the contents of the original.
*/
export declare function copyDataView<Value extends DataView>(dataView: Value, state: State): Value;
/**
* Create a new Date based on the time of the original.
*/
export declare function copyDate<Value extends Date>(date: Value, state: State): Value;
/**
* Deeply copy the keys and values of the original.
*/
export declare function copyMapLoose<Value extends Map<any, any>>(map: Value, state: State): Value;
/**
* Deeply copy the keys and values of the original, as well as any custom properties.
*/
export declare function copyMapStrict<Value extends Map<any, any>>(map: Value, state: State): Value;
declare function copyObjectLooseModern<Value extends Record<string, any>>(object: Value, state: State): Value;
/**
* Deeply copy the properties (keys and symbols) and values of the original.
*/
export declare const copyObjectLoose: typeof copyObjectLooseModern;
/**
* Deeply copy the properties (keys and symbols) and values of the original, as well
* as any hidden or non-enumerable properties.
*/
export declare function copyObjectStrict<Value extends Record<string, any>>(object: Value, state: State): Value;
/**
* Create a new primitive wrapper from the value of the original.
*/
export declare function copyPrimitiveWrapper<Value extends Boolean | Number | String>(primitiveObject: Value, state: State): Value;
/**
* Create a new RegExp based on the value and flags of the original.
*/
export declare function copyRegExp<Value extends RegExp>(regExp: Value, state: State): Value;
/**
* Return the original value (an identity function).
*
* @note
* THis is used for objects that cannot be copied, such as WeakMap.
*/
export declare function copySelf<Value>(value: Value, _state: State): Value;
/**
* Deeply copy the values of the original.
*/
export declare function copySetLoose<Value extends Set<any>>(set: Value, state: State): Value;
/**
* Deeply copy the values of the original, as well as any custom properties.
*/
export declare function copySetStrict<Value extends Set<any>>(set: Value, state: State): Value;
export {};

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Mateusz Burzyński
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","Pill","useTranslation","React","VersionPillLabel","baseClass","AutosaveCell","t0","$","currentlyPublishedVersion","latestDraftVersion","rowData","t","t1","_jsxs","className","children","autosave","_jsx","size","disableDate","doc","labelFirst","labelStyle"],"sources":["../../../../../src/views/Versions/cells/AutosaveCell/index.tsx"],"sourcesContent":["'use client'\nimport type { TypeWithVersion } from 'payload'\n\nimport { Pill, useTranslation } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { VersionPillLabel } from '../../../Version/VersionPillLabel/VersionPillLabel.js'\nimport './index.scss'\n\nconst baseClass = 'autosave-cell'\n\ntype AutosaveCellProps = {\n currentlyPublishedVersion?: TypeWithVersion<any>\n latestDraftVersion?: TypeWithVersion<any>\n rowData: {\n autosave?: boolean\n id: number | string\n publishedLocale?: string\n updatedAt?: string\n version: {\n [key: string]: unknown\n _status: 'draft' | 'published'\n updatedAt: string\n }\n }\n}\n\nexport const AutosaveCell: React.FC<AutosaveCellProps> = ({\n currentlyPublishedVersion,\n latestDraftVersion,\n rowData,\n}) => {\n const { t } = useTranslation()\n\n return (\n <div className={`${baseClass}__items`}>\n {rowData?.autosave && <Pill size=\"small\">{t('version:autosave')}</Pill>}\n <VersionPillLabel\n currentlyPublishedVersion={currentlyPublishedVersion}\n disableDate={true}\n doc={rowData}\n labelFirst={false}\n labelStyle=\"pill\"\n latestDraftVersion={latestDraftVersion}\n />\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,IAAI,EAAEC,cAAc,QAAQ;AACrC,OAAOC,KAAA,MAAW;AAElB,SAASC,gBAAgB,QAAQ;AAGjC,MAAMC,SAAA,GAAY;AAkBlB,OAAO,MAAMC,YAAA,GAA4CC,EAAA;EAAA,MAAAC,CAAA,GAAAR,EAAA;EAAC;IAAAS,yBAAA;IAAAC,kBAAA;IAAAC;EAAA,IAAAJ,EAIzD;EACC;IAAAK;EAAA,IAAcV,cAAA;EAAA,IAAAW,EAAA;EAAA,IAAAL,CAAA,QAAAC,yBAAA,IAAAD,CAAA,QAAAE,kBAAA,IAAAF,CAAA,QAAAG,OAAA,IAAAH,CAAA,QAAAI,CAAA;IAGZC,EAAA,GAAAC,KAAA,CAAC;MAAAC,SAAA,EAAe,GAAAV,SAAA,SAAqB;MAAAW,QAAA,GAClCL,OAAA,EAAAM,QAAA,IAAqBC,IAAA,CAAAjB,IAAA;QAAAkB,IAAA,EAAW;QAAAH,QAAA,EAASJ,CAAA,CAAE;MAAA,C,GAC5CM,IAAA,CAAAd,gBAAA;QAAAK,yBAAA;QAAAW,WAAA;QAAAC,GAAA,EAGOV,OAAA;QAAAW,UAAA;QAAAC,UAAA,EAEM;QAAAb;MAAA,C;;;;;;;;;;SAPfG,E;CAYJ","ignoreList":[]}

View File

@@ -0,0 +1 @@
!function(e){var n="(?:\\B-|\\b_|\\b)[A-Za-z][\\w-]*(?![\\w-])",t="(?:\\b(?:unsigned\\s+)?long\\s+long(?![\\w-])|\\b(?:unrestricted|unsigned)\\s+[a-z]+(?![\\w-])|(?!(?:unrestricted|unsigned)\\b)"+n+"(?:\\s*<(?:[^<>]|<[^<>]*>)*>)?)(?:\\s*\\?)?",i={};for(var r in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp("(\\bnamespace\\s+)"+n),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:i},{pattern:RegExp("(\\b(?:attribute|const|deleter|getter|optional|setter)\\s+)"+t),lookbehind:!0,inside:i},{pattern:RegExp("(\\bcallback\\s+"+n+"\\s*=\\s*)"+t),lookbehind:!0,inside:i},{pattern:RegExp("(\\btypedef\\b\\s*)"+t),lookbehind:!0,inside:i},{pattern:RegExp("(\\b(?:callback|dictionary|enum|interface(?:\\s+mixin)?)\\s+)(?!(?:interface|mixin)\\b)"+n),lookbehind:!0},{pattern:RegExp("(:\\s*)"+n),lookbehind:!0},RegExp(n+"(?=\\s+(?:implements|includes)\\b)"),{pattern:RegExp("(\\b(?:implements|includes)\\s+)"+n),lookbehind:!0},{pattern:RegExp(t+"(?=\\s*(?:\\.{3}\\s*)?"+n+"\\s*[(),;=])"),inside:i}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==r&&(i[r]=e.languages["web-idl"][r]);e.languages.webidl=e.languages["web-idl"]}(Prism);

View File

@@ -0,0 +1 @@
{"version":3,"file":"createLocalReq.d.ts","sourceRoot":"","sources":["../../src/utilities/createLocalReq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAsFvD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,GAAG,WAAW,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;AAEnG,eAAO,MAAM,cAAc,EAAE,cA+D5B,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"redo-dot.js","sources":["../../../src/icons/redo-dot.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RedoDot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE3IiByPSIxIiAvPgogIDxwYXRoIGQ9Ik0yMSA3djZoLTYiIC8+CiAgPHBhdGggZD0iTTMgMTdhOSA5IDAgMCAxIDktOSA5IDkgMCAwIDEgNiAyLjNsMyAyLjciIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/redo-dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RedoDot = createLucideIcon('RedoDot', [\n ['circle', { cx: '12', cy: '17', r: '1', key: '1ixnty' }],\n ['path', { d: 'M21 7v6h-6', key: '3ptur4' }],\n ['path', { d: 'M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7', key: '1kgawr' }],\n]);\n\nexport default RedoDot;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,298 @@
"use strict";
exports.isMatch = isMatch;
var _index = require("./isValid.cjs");
var _index2 = require("./parse.cjs");
/**
* The {@link isMatch} function options.
*/
/**
* @name isMatch
* @category Common Helpers
* @summary validates the date string against given formats
*
* @description
* Return the true if given date is string correct against the given format else
* will return false.
*
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* The characters in the format string wrapped between two single quotes characters (') are escaped.
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
*
* Format of the format string is based on Unicode Technical Standard #35:
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* with a few additions (see note 5 below the table).
*
* Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited
* and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:
*
* ```javascript
* isMatch('23 AM', 'HH a')
* //=> RangeError: The format string mustn't contain `HH` and `a` at the same time
* ```
*
* See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true
*
* Accepted format string patterns:
* | Unit |Prior| Pattern | Result examples | Notes |
* |---------------------------------|-----|---------|-----------------------------------|-------|
* | Era | 140 | G..GGG | AD, BC | |
* | | | GGGG | Anno Domini, Before Christ | 2 |
* | | | GGGGG | A, B | |
* | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |
* | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |
* | | | yy | 44, 01, 00, 17 | 4 |
* | | | yyy | 044, 001, 123, 999 | 4 |
* | | | yyyy | 0044, 0001, 1900, 2017 | 4 |
* | | | yyyyy | ... | 2,4 |
* | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |
* | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |
* | | | YY | 44, 01, 00, 17 | 4,6 |
* | | | YYY | 044, 001, 123, 999 | 4 |
* | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |
* | | | YYYYY | ... | 2,4 |
* | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |
* | | | RR | -43, 01, 00, 17 | 4,5 |
* | | | RRR | -043, 001, 123, 999, -999 | 4,5 |
* | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |
* | | | RRRRR | ... | 2,4,5 |
* | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |
* | | | uu | -43, 01, 99, -99 | 4 |
* | | | uuu | -043, 001, 123, 999, -999 | 4 |
* | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |
* | | | uuuuu | ... | 2,4 |
* | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |
* | | | Qo | 1st, 2nd, 3rd, 4th | 5 |
* | | | QQ | 01, 02, 03, 04 | |
* | | | QQQ | Q1, Q2, Q3, Q4 | |
* | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
* | | | QQQQQ | 1, 2, 3, 4 | 4 |
* | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |
* | | | qo | 1st, 2nd, 3rd, 4th | 5 |
* | | | qq | 01, 02, 03, 04 | |
* | | | qqq | Q1, Q2, Q3, Q4 | |
* | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
* | | | qqqqq | 1, 2, 3, 4 | 3 |
* | Month (formatting) | 110 | M | 1, 2, ..., 12 | |
* | | | Mo | 1st, 2nd, ..., 12th | 5 |
* | | | MM | 01, 02, ..., 12 | |
* | | | MMM | Jan, Feb, ..., Dec | |
* | | | MMMM | January, February, ..., December | 2 |
* | | | MMMMM | J, F, ..., D | |
* | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |
* | | | Lo | 1st, 2nd, ..., 12th | 5 |
* | | | LL | 01, 02, ..., 12 | |
* | | | LLL | Jan, Feb, ..., Dec | |
* | | | LLLL | January, February, ..., December | 2 |
* | | | LLLLL | J, F, ..., D | |
* | Local week of year | 100 | w | 1, 2, ..., 53 | |
* | | | wo | 1st, 2nd, ..., 53th | 5 |
* | | | ww | 01, 02, ..., 53 | |
* | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |
* | | | Io | 1st, 2nd, ..., 53th | 5 |
* | | | II | 01, 02, ..., 53 | 5 |
* | Day of month | 90 | d | 1, 2, ..., 31 | |
* | | | do | 1st, 2nd, ..., 31st | 5 |
* | | | dd | 01, 02, ..., 31 | |
* | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |
* | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |
* | | | DD | 01, 02, ..., 365, 366 | 7 |
* | | | DDD | 001, 002, ..., 365, 366 | |
* | | | DDDD | ... | 2 |
* | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Su | |
* | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
* | | | EEEEE | M, T, W, T, F, S, S | |
* | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
* | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |
* | | | io | 1st, 2nd, ..., 7th | 5 |
* | | | ii | 01, 02, ..., 07 | 5 |
* | | | iii | Mon, Tue, Wed, ..., Su | 5 |
* | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |
* | | | iiiii | M, T, W, T, F, S, S | 5 |
* | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |
* | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |
* | | | eo | 2nd, 3rd, ..., 1st | 5 |
* | | | ee | 02, 03, ..., 01 | |
* | | | eee | Mon, Tue, Wed, ..., Su | |
* | | | eeee | Monday, Tuesday, ..., Sunday | 2 |
* | | | eeeee | M, T, W, T, F, S, S | |
* | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
* | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |
* | | | co | 2nd, 3rd, ..., 1st | 5 |
* | | | cc | 02, 03, ..., 01 | |
* | | | ccc | Mon, Tue, Wed, ..., Su | |
* | | | cccc | Monday, Tuesday, ..., Sunday | 2 |
* | | | ccccc | M, T, W, T, F, S, S | |
* | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
* | AM, PM | 80 | a..aaa | AM, PM | |
* | | | aaaa | a.m., p.m. | 2 |
* | | | aaaaa | a, p | |
* | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |
* | | | bbbb | a.m., p.m., noon, midnight | 2 |
* | | | bbbbb | a, p, n, mi | |
* | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |
* | | | BBBB | at night, in the morning, ... | 2 |
* | | | BBBBB | at night, in the morning, ... | |
* | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |
* | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |
* | | | hh | 01, 02, ..., 11, 12 | |
* | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |
* | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |
* | | | HH | 00, 01, 02, ..., 23 | |
* | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |
* | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |
* | | | KK | 01, 02, ..., 11, 00 | |
* | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |
* | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |
* | | | kk | 24, 01, 02, ..., 23 | |
* | Minute | 60 | m | 0, 1, ..., 59 | |
* | | | mo | 0th, 1st, ..., 59th | 5 |
* | | | mm | 00, 01, ..., 59 | |
* | Second | 50 | s | 0, 1, ..., 59 | |
* | | | so | 0th, 1st, ..., 59th | 5 |
* | | | ss | 00, 01, ..., 59 | |
* | Seconds timestamp | 40 | t | 512969520 | |
* | | | tt | ... | 2 |
* | Fraction of second | 30 | S | 0, 1, ..., 9 | |
* | | | SS | 00, 01, ..., 99 | |
* | | | SSS | 000, 001, ..., 999 | |
* | | | SSSS | ... | 2 |
* | Milliseconds timestamp | 20 | T | 512969520900 | |
* | | | TT | ... | 2 |
* | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |
* | | | XX | -0800, +0530, Z | |
* | | | XXX | -08:00, +05:30, Z | |
* | | | XXXX | -0800, +0530, Z, +123456 | 2 |
* | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
* | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |
* | | | xx | -0800, +0530, +0000 | |
* | | | xxx | -08:00, +05:30, +00:00 | 2 |
* | | | xxxx | -0800, +0530, +0000, +123456 | |
* | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
* | Long localized date | NA | P | 05/29/1453 | 5,8 |
* | | | PP | May 29, 1453 | |
* | | | PPP | May 29th, 1453 | |
* | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |
* | Long localized time | NA | p | 12:00 AM | 5,8 |
* | | | pp | 12:00:00 AM | |
* | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |
* | | | PPpp | May 29, 1453, 12:00:00 AM | |
* | | | PPPpp | May 29th, 1453 at ... | |
* | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |
* Notes:
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
* are the same as "stand-alone" units, but are different in some languages.
* "Formatting" units are declined according to the rules of the language
* in the context of a date. "Stand-alone" units are always nominative singular.
* In `format` function, they will produce different result:
*
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* `isMatch` will try to match both formatting and stand-alone units interchangeably.
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
* the single quote characters (see below).
* If the sequence is longer than listed in table:
* - for numerical units (`yyyyyyyy`) `isMatch` will try to match a number
* as wide as the sequence
* - for text units (`MMMMMMMM`) `isMatch` will try to match the widest variation of the unit.
* These variations are marked with "2" in the last column of the table.
*
* 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
* These tokens represent the shortest form of the quarter.
*
* 4. The main difference between `y` and `u` patterns are B.C. years:
*
* | Year | `y` | `u` |
* |------|-----|-----|
* | AC 1 | 1 | 1 |
* | BC 1 | 1 | 0 |
* | BC 2 | 2 | -1 |
*
* Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:
*
* `isMatch('50', 'yy') //=> true`
*
* `isMatch('75', 'yy') //=> true`
*
* while `uu` will use the year as is:
*
* `isMatch('50', 'uu') //=> true`
*
* `isMatch('75', 'uu') //=> true`
*
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
* except local week-numbering years are dependent on `options.weekStartsOn`
* and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)
* and [setWeekYear](https://date-fns.org/docs/setWeekYear)).
*
* 5. These patterns are not in the Unicode Technical Standard #35:
* - `i`: ISO day of week
* - `I`: ISO week of year
* - `R`: ISO week-numbering year
* - `o`: ordinal number modifier
* - `P`: long localized date
* - `p`: long localized time
*
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
* on the given locale.
*
* using `en-US` locale: `P` => `MM/dd/yyyy`
* using `en-US` locale: `p` => `hh:mm a`
* using `pt-BR` locale: `P` => `dd/MM/yyyy`
* using `pt-BR` locale: `p` => `HH:mm`
*
* Values will be checked in the descending order of its unit's priority.
* Units of an equal priority overwrite each other in the order of appearance.
*
* If no values of higher priority are matched (e.g. when matching string 'January 1st' without a year),
* the values will be taken from today's using `new Date()` date which works as a context of parsing.
*
* The result may vary by locale.
*
* If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
*
* @param dateStr - The date string to verify
* @param format - The string of tokens
* @param options - An object with options.
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @returns Is format string a match for date string?
*
* @throws `options.locale` must contain `match` property
* @throws use `yyyy` instead of `YYYY` for formatting years; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `yy` instead of `YY` for formatting years; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `d` instead of `D` for formatting days of the month; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `dd` instead of `DD` for formatting days of the month; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws format string contains an unescaped latin alphabet character
*
* @example
* // Match 11 February 2014 from middle-endian format:
* const result = isMatch('02/11/2014', 'MM/dd/yyyy')
* //=> true
*
* @example
* // Match 28th of February in Esperanto locale in the context of 2010 year:
* import eo from 'date-fns/locale/eo'
* const result = isMatch('28-a de februaro', "do 'de' MMMM", {
* locale: eo
* })
* //=> true
*/
function isMatch(dateStr, formatStr, options) {
return (0, _index.isValid)(
(0, _index2.parse)(dateStr, formatStr, new Date(), options),
);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"translations.js","names":[],"sources":["../../../../src/rest/commands/read/translations.ts"],"sourcesContent":["import type { DirectusTranslation } from '../../../schema/translation.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadTranslationOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusTranslation<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all Translations that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit Translation objects. If no items are available, data will be an empty array.\n */\nexport const readTranslations =\n\t<Schema, const TQuery extends Query<Schema, DirectusTranslation<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadTranslationOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/translations`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing Translation by primary key.\n * @param key The primary key of the dashboard\n * @param query The query parameters\n * @returns Returns a Translation object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readTranslation =\n\t<Schema, const TQuery extends Query<Schema, DirectusTranslation<Schema>>>(\n\t\tkey: DirectusTranslation<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadTranslationOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/translations/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"6DAgBA,MAAa,EAEX,QAEM,CACN,KAAM,gBACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,iBAAiB,IACvB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1,72 @@
import { normalizeInterval } from "./_lib/normalizeInterval.js";
import { addMinutes } from "./addMinutes.js";
import { constructFrom } from "./constructFrom.js";
/**
* The {@link eachMinuteOfInterval} function options.
*/
/**
* The {@link eachMinuteOfInterval} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
/**
* @name eachMinuteOfInterval
* @category Interval Helpers
* @summary Return the array of minutes within the specified time interval.
*
* @description
* Returns the array of minutes within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of minutes from the minute of the interval start to the minute of the interval end
*
* @example
* // Each minute between 14 October 2020, 13:00 and 14 October 2020, 13:03
* const result = eachMinuteOfInterval({
* start: new Date(2014, 9, 14, 13),
* end: new Date(2014, 9, 14, 13, 3)
* })
* //=> [
* // Wed Oct 14 2014 13:00:00,
* // Wed Oct 14 2014 13:01:00,
* // Wed Oct 14 2014 13:02:00,
* // Wed Oct 14 2014 13:03:00
* // ]
*/
export function eachMinuteOfInterval(interval, options) {
const { start, end } = normalizeInterval(options?.in, interval);
// Set to the start of the minute
start.setSeconds(0, 0);
let reversed = +start > +end;
const endTime = reversed ? +start : +end;
let date = reversed ? end : start;
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+date <= endTime) {
dates.push(constructFrom(start, date));
date = addMinutes(date, step);
}
return reversed ? dates.reverse() : dates;
}
// Fallback for modularized imports:
export default eachMinuteOfInterval;

View File

@@ -0,0 +1,4 @@
export declare const monthsToQuarters: import("./types.js").FPFn1<
number,
number
>;

View File

@@ -0,0 +1 @@
!function(a){a.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},a.hooks.add("before-tokenize",(function(e){a.languages["markup-templating"].buildPlaceholders(e,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),a.hooks.add("after-tokenize",(function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"handlebars")})),a.languages.hbs=a.languages.handlebars,a.languages.mustache=a.languages.handlebars}(Prism);

View File

@@ -0,0 +1 @@
{"version":3,"file":"transports.d.ts","sourceRoot":"","sources":["../../../src/sentry/transports.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,oBAAoB,EACpB,SAAS,EAIV,MAAM,eAAe,CAAC;AAuFvB;cACc;AACd,wBAAgB,kCAAkC,CAChD,mBAAmB,EAAE,OAAO,CAAC,OAAO,CAAC,GACpC,CAAC,OAAO,EAAE,oBAAoB,KAAK,SAAS,CAwB9C"}

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChevronsUp = createLucideIcon("ChevronsUp", [
["path", { d: "m17 11-5-5-5 5", key: "e8nh98" }],
["path", { d: "m17 18-5-5-5 5", key: "2avn1x" }]
]);
export { ChevronsUp as default };
//# sourceMappingURL=chevrons-up.js.map

View File

@@ -0,0 +1,7 @@
import { type ReactNode } from 'react';
import type IntlConfig from '../core/IntlConfig.js';
type Props = IntlConfig & {
children: ReactNode;
};
export default function IntlProvider({ children, formats, getMessageFallback, locale, messages, now, onError, timeZone }: Props): import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -0,0 +1,12 @@
export declare const GOOGLE_GENAI_INTEGRATION_NAME = "Google_GenAI";
export declare const GOOGLE_GENAI_INSTRUMENTED_METHODS: readonly [
"models.generateContent",
"models.generateContentStream",
"chats.create",
"sendMessage",
"sendMessageStream"
];
export declare const GOOGLE_GENAI_SYSTEM_NAME = "google_genai";
export declare const CHATS_CREATE_METHOD = "chats.create";
export declare const CHAT_PATH = "chat";
//# sourceMappingURL=constants.d.ts.map

View File

@@ -0,0 +1,528 @@
'use strict';
const zlib = require('zlib');
const bufferUtil = require('./buffer-util');
const Limiter = require('./limiter');
const { kStatusCode } = require('./constants');
const FastBuffer = Buffer[Symbol.species];
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
const kPerMessageDeflate = Symbol('permessage-deflate');
const kTotalLength = Symbol('total-length');
const kCallback = Symbol('callback');
const kBuffers = Symbol('buffers');
const kError = Symbol('error');
//
// We limit zlib concurrency, which prevents severe memory fragmentation
// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913
// and https://github.com/websockets/ws/issues/1202
//
// Intentionally global; it's the global thread pool that's an issue.
//
let zlibLimiter;
/**
* permessage-deflate implementation.
*/
class PerMessageDeflate {
/**
* Creates a PerMessageDeflate instance.
*
* @param {Object} [options] Configuration options
* @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
* for, or request, a custom client window size
* @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
* acknowledge disabling of client context takeover
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
* calls to zlib
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
* use of a custom server window size
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
* disabling of server context takeover
* @param {Number} [options.threshold=1024] Size (in bytes) below which
* messages should not be compressed if context takeover is disabled
* @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
* deflate
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
* inflate
* @param {Boolean} [isServer=false] Create the instance in either server or
* client mode
* @param {Number} [maxPayload=0] The maximum allowed message length
*/
constructor(options, isServer, maxPayload) {
this._maxPayload = maxPayload | 0;
this._options = options || {};
this._threshold =
this._options.threshold !== undefined ? this._options.threshold : 1024;
this._isServer = !!isServer;
this._deflate = null;
this._inflate = null;
this.params = null;
if (!zlibLimiter) {
const concurrency =
this._options.concurrencyLimit !== undefined
? this._options.concurrencyLimit
: 10;
zlibLimiter = new Limiter(concurrency);
}
}
/**
* @type {String}
*/
static get extensionName() {
return 'permessage-deflate';
}
/**
* Create an extension negotiation offer.
*
* @return {Object} Extension parameters
* @public
*/
offer() {
const params = {};
if (this._options.serverNoContextTakeover) {
params.server_no_context_takeover = true;
}
if (this._options.clientNoContextTakeover) {
params.client_no_context_takeover = true;
}
if (this._options.serverMaxWindowBits) {
params.server_max_window_bits = this._options.serverMaxWindowBits;
}
if (this._options.clientMaxWindowBits) {
params.client_max_window_bits = this._options.clientMaxWindowBits;
} else if (this._options.clientMaxWindowBits == null) {
params.client_max_window_bits = true;
}
return params;
}
/**
* Accept an extension negotiation offer/response.
*
* @param {Array} configurations The extension negotiation offers/reponse
* @return {Object} Accepted configuration
* @public
*/
accept(configurations) {
configurations = this.normalizeParams(configurations);
this.params = this._isServer
? this.acceptAsServer(configurations)
: this.acceptAsClient(configurations);
return this.params;
}
/**
* Releases all resources used by the extension.
*
* @public
*/
cleanup() {
if (this._inflate) {
this._inflate.close();
this._inflate = null;
}
if (this._deflate) {
const callback = this._deflate[kCallback];
this._deflate.close();
this._deflate = null;
if (callback) {
callback(
new Error(
'The deflate stream was closed while data was being processed'
)
);
}
}
}
/**
* Accept an extension negotiation offer.
*
* @param {Array} offers The extension negotiation offers
* @return {Object} Accepted configuration
* @private
*/
acceptAsServer(offers) {
const opts = this._options;
const accepted = offers.find((params) => {
if (
(opts.serverNoContextTakeover === false &&
params.server_no_context_takeover) ||
(params.server_max_window_bits &&
(opts.serverMaxWindowBits === false ||
(typeof opts.serverMaxWindowBits === 'number' &&
opts.serverMaxWindowBits > params.server_max_window_bits))) ||
(typeof opts.clientMaxWindowBits === 'number' &&
!params.client_max_window_bits)
) {
return false;
}
return true;
});
if (!accepted) {
throw new Error('None of the extension offers can be accepted');
}
if (opts.serverNoContextTakeover) {
accepted.server_no_context_takeover = true;
}
if (opts.clientNoContextTakeover) {
accepted.client_no_context_takeover = true;
}
if (typeof opts.serverMaxWindowBits === 'number') {
accepted.server_max_window_bits = opts.serverMaxWindowBits;
}
if (typeof opts.clientMaxWindowBits === 'number') {
accepted.client_max_window_bits = opts.clientMaxWindowBits;
} else if (
accepted.client_max_window_bits === true ||
opts.clientMaxWindowBits === false
) {
delete accepted.client_max_window_bits;
}
return accepted;
}
/**
* Accept the extension negotiation response.
*
* @param {Array} response The extension negotiation response
* @return {Object} Accepted configuration
* @private
*/
acceptAsClient(response) {
const params = response[0];
if (
this._options.clientNoContextTakeover === false &&
params.client_no_context_takeover
) {
throw new Error('Unexpected parameter "client_no_context_takeover"');
}
if (!params.client_max_window_bits) {
if (typeof this._options.clientMaxWindowBits === 'number') {
params.client_max_window_bits = this._options.clientMaxWindowBits;
}
} else if (
this._options.clientMaxWindowBits === false ||
(typeof this._options.clientMaxWindowBits === 'number' &&
params.client_max_window_bits > this._options.clientMaxWindowBits)
) {
throw new Error(
'Unexpected or invalid parameter "client_max_window_bits"'
);
}
return params;
}
/**
* Normalize parameters.
*
* @param {Array} configurations The extension negotiation offers/reponse
* @return {Array} The offers/response with normalized parameters
* @private
*/
normalizeParams(configurations) {
configurations.forEach((params) => {
Object.keys(params).forEach((key) => {
let value = params[key];
if (value.length > 1) {
throw new Error(`Parameter "${key}" must have only a single value`);
}
value = value[0];
if (key === 'client_max_window_bits') {
if (value !== true) {
const num = +value;
if (!Number.isInteger(num) || num < 8 || num > 15) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
value = num;
} else if (!this._isServer) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
} else if (key === 'server_max_window_bits') {
const num = +value;
if (!Number.isInteger(num) || num < 8 || num > 15) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
value = num;
} else if (
key === 'client_no_context_takeover' ||
key === 'server_no_context_takeover'
) {
if (value !== true) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
} else {
throw new Error(`Unknown parameter "${key}"`);
}
params[key] = value;
});
});
return configurations;
}
/**
* Decompress data. Concurrency limited.
*
* @param {Buffer} data Compressed data
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @public
*/
decompress(data, fin, callback) {
zlibLimiter.add((done) => {
this._decompress(data, fin, (err, result) => {
done();
callback(err, result);
});
});
}
/**
* Compress data. Concurrency limited.
*
* @param {(Buffer|String)} data Data to compress
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @public
*/
compress(data, fin, callback) {
zlibLimiter.add((done) => {
this._compress(data, fin, (err, result) => {
done();
callback(err, result);
});
});
}
/**
* Decompress data.
*
* @param {Buffer} data Compressed data
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @private
*/
_decompress(data, fin, callback) {
const endpoint = this._isServer ? 'client' : 'server';
if (!this._inflate) {
const key = `${endpoint}_max_window_bits`;
const windowBits =
typeof this.params[key] !== 'number'
? zlib.Z_DEFAULT_WINDOWBITS
: this.params[key];
this._inflate = zlib.createInflateRaw({
...this._options.zlibInflateOptions,
windowBits
});
this._inflate[kPerMessageDeflate] = this;
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
this._inflate.on('error', inflateOnError);
this._inflate.on('data', inflateOnData);
}
this._inflate[kCallback] = callback;
this._inflate.write(data);
if (fin) this._inflate.write(TRAILER);
this._inflate.flush(() => {
const err = this._inflate[kError];
if (err) {
this._inflate.close();
this._inflate = null;
callback(err);
return;
}
const data = bufferUtil.concat(
this._inflate[kBuffers],
this._inflate[kTotalLength]
);
if (this._inflate._readableState.endEmitted) {
this._inflate.close();
this._inflate = null;
} else {
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._inflate.reset();
}
}
callback(null, data);
});
}
/**
* Compress data.
*
* @param {(Buffer|String)} data Data to compress
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @private
*/
_compress(data, fin, callback) {
const endpoint = this._isServer ? 'server' : 'client';
if (!this._deflate) {
const key = `${endpoint}_max_window_bits`;
const windowBits =
typeof this.params[key] !== 'number'
? zlib.Z_DEFAULT_WINDOWBITS
: this.params[key];
this._deflate = zlib.createDeflateRaw({
...this._options.zlibDeflateOptions,
windowBits
});
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
this._deflate.on('data', deflateOnData);
}
this._deflate[kCallback] = callback;
this._deflate.write(data);
this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
if (!this._deflate) {
//
// The deflate stream was closed while data was being processed.
//
return;
}
let data = bufferUtil.concat(
this._deflate[kBuffers],
this._deflate[kTotalLength]
);
if (fin) {
data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
}
//
// Ensure that the callback will not be called again in
// `PerMessageDeflate#cleanup()`.
//
this._deflate[kCallback] = null;
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._deflate.reset();
}
callback(null, data);
});
}
}
module.exports = PerMessageDeflate;
/**
* The listener of the `zlib.DeflateRaw` stream `'data'` event.
*
* @param {Buffer} chunk A chunk of data
* @private
*/
function deflateOnData(chunk) {
this[kBuffers].push(chunk);
this[kTotalLength] += chunk.length;
}
/**
* The listener of the `zlib.InflateRaw` stream `'data'` event.
*
* @param {Buffer} chunk A chunk of data
* @private
*/
function inflateOnData(chunk) {
this[kTotalLength] += chunk.length;
if (
this[kPerMessageDeflate]._maxPayload < 1 ||
this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
) {
this[kBuffers].push(chunk);
return;
}
this[kError] = new RangeError('Max payload size exceeded');
this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
this[kError][kStatusCode] = 1009;
this.removeListener('data', inflateOnData);
//
// The choice to employ `zlib.reset()` over `zlib.close()` is dictated by the
// fact that in Node.js versions prior to 13.10.0, the callback for
// `zlib.flush()` is not called if `zlib.close()` is used. Utilizing
// `zlib.reset()` ensures that either the callback is invoked or an error is
// emitted.
//
this.reset();
}
/**
* The listener of the `zlib.InflateRaw` stream `'error'` event.
*
* @param {Error} err The emitted error
* @private
*/
function inflateOnError(err) {
//
// There is no need to call `Zlib#close()` as the handle is automatically
// closed when an error is emitted.
//
this[kPerMessageDeflate]._inflate = null;
if (this[kError]) {
this[kCallback](this[kError]);
return;
}
err[kStatusCode] = 1007;
this[kCallback](err);
}

View File

@@ -0,0 +1,205 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { ReactSelect } from '../../elements/ReactSelect/index.js';
import { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js';
import { FieldDescription } from '../../fields/FieldDescription/index.js';
import { FieldError } from '../../fields/FieldError/index.js';
import { FieldLabel } from '../../fields/FieldLabel/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { fieldBaseClass } from '../shared/index.js';
import './index.scss';
export const TextInput = props => {
const $ = _c(32);
const {
AfterInput,
BeforeInput,
className,
Description,
description,
Error,
hasMany,
htmlAttributes,
inputRef,
Label,
label,
localized,
maxRows,
onChange,
onKeyDown,
path,
placeholder: placeholderFromProps,
readOnly,
required,
rtl,
showError,
style,
value,
valueToRender
} = props;
const {
i18n,
t
} = useTranslation();
const editableProps = _temp2;
let t0;
if ($[0] !== AfterInput || $[1] !== BeforeInput || $[2] !== Description || $[3] !== Error || $[4] !== Label || $[5] !== className || $[6] !== description || $[7] !== hasMany || $[8] !== htmlAttributes || $[9] !== i18n || $[10] !== inputRef || $[11] !== label || $[12] !== localized || $[13] !== maxRows || $[14] !== onChange || $[15] !== onKeyDown || $[16] !== path || $[17] !== placeholderFromProps || $[18] !== readOnly || $[19] !== required || $[20] !== rtl || $[21] !== showError || $[22] !== style || $[23] !== t || $[24] !== value || $[25] !== valueToRender) {
const placeholder = getTranslation(placeholderFromProps, i18n);
const t1 = showError && "error";
const t2 = readOnly && "read-only";
const t3 = hasMany && "has-many";
let t4;
if ($[27] !== className || $[28] !== t1 || $[29] !== t2 || $[30] !== t3) {
t4 = [fieldBaseClass, "text", className, t1, t2, t3].filter(Boolean);
$[27] = className;
$[28] = t1;
$[29] = t2;
$[30] = t3;
$[31] = t4;
} else {
t4 = $[31];
}
t0 = _jsxs("div", {
className: t4.join(" "),
style,
children: [_jsx(RenderCustomComponent, {
CustomComponent: Label,
Fallback: _jsx(FieldLabel, {
label,
localized,
path,
required
})
}), _jsxs("div", {
className: `${fieldBaseClass}__wrap`,
children: [_jsx(RenderCustomComponent, {
CustomComponent: Error,
Fallback: _jsx(FieldError, {
path,
showError
})
}), BeforeInput, hasMany ? _jsx(ReactSelect, {
className: `field-${path.replace(/\./g, "__")}`,
components: {
DropdownIndicator: null
},
customProps: {
editableProps
},
disabled: readOnly,
filterOption: () => !maxRows ? true : !(Array.isArray(value) && maxRows && value.length >= maxRows),
isClearable: false,
isCreatable: true,
isMulti: true,
isSortable: true,
menuIsOpen: false,
noOptionsMessage: () => {
const isOverHasMany = Array.isArray(value) && value.length >= maxRows;
if (isOverHasMany) {
return t("validation:limitReached", {
max: maxRows,
value: value.length + 1
});
}
return null;
},
onChange,
options: [],
placeholder,
showError,
value: valueToRender
}) : _jsx("input", {
"data-rtl": rtl,
disabled: readOnly,
id: `field-${path?.replace(/\./g, "__")}`,
name: path,
onChange,
onKeyDown,
placeholder,
ref: inputRef,
type: "text",
value: value || "",
...(htmlAttributes ?? {})
}), AfterInput, _jsx(RenderCustomComponent, {
CustomComponent: Description,
Fallback: _jsx(FieldDescription, {
description,
path
})
})]
})]
});
$[0] = AfterInput;
$[1] = BeforeInput;
$[2] = Description;
$[3] = Error;
$[4] = Label;
$[5] = className;
$[6] = description;
$[7] = hasMany;
$[8] = htmlAttributes;
$[9] = i18n;
$[10] = inputRef;
$[11] = label;
$[12] = localized;
$[13] = maxRows;
$[14] = onChange;
$[15] = onKeyDown;
$[16] = path;
$[17] = placeholderFromProps;
$[18] = readOnly;
$[19] = required;
$[20] = rtl;
$[21] = showError;
$[22] = style;
$[23] = t;
$[24] = value;
$[25] = valueToRender;
$[26] = t0;
} else {
t0 = $[26];
}
return t0;
};
function _temp(event) {
event.currentTarget.contentEditable = "false";
}
function _temp2(data, className_0, selectProps) {
const editableClassName = `${className_0}--editable`;
return {
onBlur: _temp,
onClick: event_0 => {
event_0.currentTarget.contentEditable = "true";
event_0.currentTarget.classList.add(editableClassName);
event_0.currentTarget.focus();
},
onKeyDown: event_1 => {
if (!event_1.nativeEvent.isComposing && (event_1.key === "Enter" || event_1.key === "Tab" || event_1.key === "Escape")) {
event_1.currentTarget.contentEditable = "false";
event_1.currentTarget.classList.remove(editableClassName);
data.value.value = event_1.currentTarget.innerText;
data.label = event_1.currentTarget.innerText;
if (data.value.value.replaceAll("\n", "")) {
selectProps.onChange(selectProps.value, {
action: "create-option",
option: data
});
} else {
if (Array.isArray(selectProps.value)) {
const newValues = selectProps.value.filter(v => v.id !== data.id);
selectProps.onChange(newValues, {
action: "pop-value",
removedValue: data
});
}
}
event_1.preventDefault();
}
event_1.stopPropagation();
}
};
}
//# sourceMappingURL=Input.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB,KAAK,2BAA2B,GAAG,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;AAEzE,KAAK,yBAAyB,GAAG;IAC/B;;OAEG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,KAAK,yBAAyB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAEzD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,2BAA2B,CAAC,GAC9E,yBAAyB,CAAA;AAE3B,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAC3D,eAAe,CAAC,UAAU,EAAE,2BAA2B,CAAC,CAAA;AAE1D,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAC1D,UAAU,EACV,2BAA2B,EAC3B,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAC1D,2BAA2B,EAC3B,yBAAyB,CAC1B,CAAA;AAED,KAAK,QAAQ,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;AAE9C,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CACpE,UAAU,EACV,2BAA2B,CAC5B,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,2BAA2B,CAAC,CAAA;AAEnG,MAAM,MAAM,oCAAoC,GAAG,+BAA+B,CAChF,UAAU,EACV,2BAA2B,CAC5B,CAAA;AAED,MAAM,MAAM,oCAAoC,GAC9C,+BAA+B,CAAC,2BAA2B,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CACpE,UAAU,EACV,2BAA2B,CAC5B,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,2BAA2B,CAAC,CAAA;AAEnG,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAA;AAElG,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"NonRecordingSpan.js","sourceRoot":"","sources":["../../../src/trace/NonRecordingSpan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMhE;;;;GAIG;AACH;IACE,0BACmB,YAAgD;QAAhD,6BAAA,EAAA,mCAAgD;QAAhD,iBAAY,GAAZ,YAAY,CAAoC;IAChE,CAAC;IAEJ,yBAAyB;IACzB,sCAAW,GAAX;QACE,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,0BAA0B;IAC1B,uCAAY,GAAZ,UAAa,IAAY,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,wCAAa,GAAb,UAAc,WAA2B;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,mCAAQ,GAAR,UAAS,KAAa,EAAE,WAA4B;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kCAAO,GAAP,UAAQ,KAAW;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mCAAQ,GAAR,UAAS,MAAc;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,oCAAS,GAAT,UAAU,OAAmB;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,qCAAU,GAAV,UAAW,KAAa;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,8BAAG,GAAH,UAAI,QAAoB,IAAS,CAAC;IAElC,yDAAyD;IACzD,sCAAW,GAAX;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0BAA0B;IAC1B,0CAAe,GAAf,UAAgB,UAAqB,EAAE,KAAiB,IAAS,CAAC;IACpE,uBAAC;AAAD,CAAC,AArDD,IAqDC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '../common/Exception';\nimport { TimeInput } from '../common/Time';\nimport { SpanAttributes } from './attributes';\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\nimport { SpanStatus } from './status';\nimport { Link } from './link';\n\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nexport class NonRecordingSpan implements Span {\n constructor(\n private readonly _spanContext: SpanContext = INVALID_SPAN_CONTEXT\n ) {}\n\n // Returns a SpanContext.\n spanContext(): SpanContext {\n return this._spanContext;\n }\n\n // By default does nothing\n setAttribute(_key: string, _value: unknown): this {\n return this;\n }\n\n // By default does nothing\n setAttributes(_attributes: SpanAttributes): this {\n return this;\n }\n\n // By default does nothing\n addEvent(_name: string, _attributes?: SpanAttributes): this {\n return this;\n }\n\n addLink(_link: Link): this {\n return this;\n }\n\n addLinks(_links: Link[]): this {\n return this;\n }\n\n // By default does nothing\n setStatus(_status: SpanStatus): this {\n return this;\n }\n\n // By default does nothing\n updateName(_name: string): this {\n return this;\n }\n\n // By default does nothing\n end(_endTime?: TimeInput): void {}\n\n // isRecording always returns false for NonRecordingSpan.\n isRecording(): boolean {\n return false;\n }\n\n // By default does nothing\n recordException(_exception: Exception, _time?: TimeInput): void {}\n}\n"]}

View File

@@ -0,0 +1,143 @@
'use strict'
const ANY = Symbol('SemVer ANY')
// hoisted class for cyclic dependency
class Comparator {
static get ANY () {
return ANY
}
constructor (comp, options) {
options = parseOptions(options)
if (comp instanceof Comparator) {
if (comp.loose === !!options.loose) {
return comp
} else {
comp = comp.value
}
}
comp = comp.trim().split(/\s+/).join(' ')
debug('comparator', comp, options)
this.options = options
this.loose = !!options.loose
this.parse(comp)
if (this.semver === ANY) {
this.value = ''
} else {
this.value = this.operator + this.semver.version
}
debug('comp', this)
}
parse (comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
const m = comp.match(r)
if (!m) {
throw new TypeError(`Invalid comparator: ${comp}`)
}
this.operator = m[1] !== undefined ? m[1] : ''
if (this.operator === '=') {
this.operator = ''
}
// if it literally is just '>' or '' then allow anything.
if (!m[2]) {
this.semver = ANY
} else {
this.semver = new SemVer(m[2], this.options.loose)
}
}
toString () {
return this.value
}
test (version) {
debug('Comparator.test', version, this.options.loose)
if (this.semver === ANY || version === ANY) {
return true
}
if (typeof version === 'string') {
try {
version = new SemVer(version, this.options)
} catch (er) {
return false
}
}
return cmp(version, this.operator, this.semver, this.options)
}
intersects (comp, options) {
if (!(comp instanceof Comparator)) {
throw new TypeError('a Comparator is required')
}
if (this.operator === '') {
if (this.value === '') {
return true
}
return new Range(comp.value, options).test(this.value)
} else if (comp.operator === '') {
if (comp.value === '') {
return true
}
return new Range(this.value, options).test(comp.semver)
}
options = parseOptions(options)
// Special cases where nothing can possibly be lower
if (options.includePrerelease &&
(this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
return false
}
if (!options.includePrerelease &&
(this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
return false
}
// Same direction increasing (> or >=)
if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
return true
}
// Same direction decreasing (< or <=)
if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
return true
}
// same SemVer and both sides are inclusive (<= or >=)
if (
(this.semver.version === comp.semver.version) &&
this.operator.includes('=') && comp.operator.includes('=')) {
return true
}
// opposite directions less than
if (cmp(this.semver, '<', comp.semver, options) &&
this.operator.startsWith('>') && comp.operator.startsWith('<')) {
return true
}
// opposite directions greater than
if (cmp(this.semver, '>', comp.semver, options) &&
this.operator.startsWith('<') && comp.operator.startsWith('>')) {
return true
}
return false
}
}
module.exports = Comparator
const parseOptions = require('../internal/parse-options')
const { safeRe: re, t } = require('../internal/re')
const cmp = require('../functions/cmp')
const debug = require('../internal/debug')
const SemVer = require('./semver')
const Range = require('./range')

View File

@@ -0,0 +1,135 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentationHapi = require('@opentelemetry/instrumentation-hapi');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const debugBuild = require('../../../debug-build.js');
const INTEGRATION_NAME = 'Hapi';
const instrumentHapi = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentationHapi.HapiInstrumentation());
const _hapiIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentHapi();
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/).
*
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.
*
* For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.hapiIntegration()],
* })
* ```
*/
const hapiIntegration = core.defineIntegration(_hapiIntegration);
function isErrorEvent(event) {
return !!(event && typeof event === 'object' && 'error' in event && event.error);
}
function sendErrorToSentry(errorData) {
core.captureException(errorData, {
mechanism: {
type: 'auto.function.hapi',
handled: false,
},
});
}
const hapiErrorPlugin = {
name: 'SentryHapiErrorPlugin',
version: core.SDK_VERSION,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
register: async function (serverArg) {
const server = serverArg ;
server.events.on({ name: 'request', channels: ['error'] }, (request, event) => {
if (core.getIsolationScope() !== core.getDefaultIsolationScope()) {
const route = request.route;
if (route.path) {
core.getIsolationScope().setTransactionName(`${route.method.toUpperCase()} ${route.path}`);
}
} else {
debugBuild.DEBUG_BUILD &&
core.debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName');
}
if (isErrorEvent(event)) {
sendErrorToSentry(event.error);
}
});
},
};
/**
* Add a Hapi plugin to capture errors to Sentry.
*
* @param server The Hapi server to attach the error handler to
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
* const Hapi = require('@hapi/hapi');
*
* const init = async () => {
* const server = Hapi.server();
*
* // all your routes here
*
* await Sentry.setupHapiErrorHandler(server);
*
* await server.start();
* };
* ```
*/
async function setupHapiErrorHandler(server) {
await server.register(hapiErrorPlugin);
// Sadly, middleware spans do not go through `requestHook`, so we handle those here
// We register this hook in this method, because if we register it in the integration `setup`,
// it would always run even for users that are not even using hapi
const client = core.getClient();
if (client) {
client.on('spanStart', span => {
addHapiSpanAttributes(span);
});
}
nodeCore.ensureIsWrapped(server.register, 'hapi');
}
function addHapiSpanAttributes(span) {
const attributes = core.spanToJSON(span).data;
// this is one of: router, plugin, server.ext
const type = attributes['hapi.type'];
// If this is already set, or we have no Hapi span, no need to process again...
if (attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {
return;
}
span.setAttributes({
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.hapi',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.hapi`,
});
}
exports.hapiErrorPlugin = hapiErrorPlugin;
exports.hapiIntegration = hapiIntegration;
exports.instrumentHapi = instrumentHapi;
exports.setupHapiErrorHandler = setupHapiErrorHandler;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,30 @@
import { entityKind } from "../entity.cjs";
import type { AnySingleStoreColumn, SingleStoreColumn } from "./columns/index.cjs";
import { SingleStoreTable } from "./table.cjs";
export declare function primaryKey<TTableName extends string, TColumn extends AnySingleStoreColumn<{
tableName: TTableName;
}>, TColumns extends AnySingleStoreColumn<{
tableName: TTableName;
}>[]>(config: {
name?: string;
columns: [TColumn, ...TColumns];
}): PrimaryKeyBuilder;
/**
* @deprecated: Please use primaryKey({ columns: [] }) instead of this function
* @param columns
*/
export declare function primaryKey<TTableName extends string, TColumns extends AnySingleStoreColumn<{
tableName: TTableName;
}>[]>(...columns: TColumns): PrimaryKeyBuilder;
export declare class PrimaryKeyBuilder {
static readonly [entityKind]: string;
constructor(columns: SingleStoreColumn[], name?: string);
}
export declare class PrimaryKey {
readonly table: SingleStoreTable;
static readonly [entityKind]: string;
readonly columns: SingleStoreColumn[];
readonly name?: string;
constructor(table: SingleStoreTable, columns: SingleStoreColumn[], name?: string);
getName(): string;
}

View File

@@ -0,0 +1,224 @@
export namespace util {
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type isAny<T> = 0 extends 1 & T ? true : false;
export const assertEqual = <A, B>(_: AssertEqual<A, B>): void => {};
export function assertIs<T>(_arg: T): void {}
export function assertNever(_x: never): never {
throw new Error();
}
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type InexactPartial<T> = { [k in keyof T]?: T[k] | undefined };
export const arrayToEnum = <T extends string, U extends [T, ...T[]]>(items: U): { [k in U[number]]: k } => {
const obj: any = {};
for (const item of items) {
obj[item] = item;
}
return obj;
};
export const getValidEnumValues = (obj: any): any[] => {
const validKeys = objectKeys(obj).filter((k: any) => typeof obj[obj[k]] !== "number");
const filtered: any = {};
for (const k of validKeys) {
filtered[k] = obj[k];
}
return objectValues(filtered);
};
export const objectValues = (obj: any): any[] => {
return objectKeys(obj).map(function (e) {
return obj[e];
});
};
export const objectKeys: ObjectConstructor["keys"] =
typeof Object.keys === "function" // eslint-disable-line ban/ban
? (obj: any) => Object.keys(obj) // eslint-disable-line ban/ban
: (object: any) => {
const keys = [];
for (const key in object) {
if (Object.prototype.hasOwnProperty.call(object, key)) {
keys.push(key);
}
}
return keys;
};
export const find = <T>(arr: T[], checker: (arg: T) => any): T | undefined => {
for (const item of arr) {
if (checker(item)) return item;
}
return undefined;
};
export type identity<T> = objectUtil.identity<T>;
export type flatten<T> = objectUtil.flatten<T>;
export type noUndefined<T> = T extends undefined ? never : T;
export const isInteger: NumberConstructor["isInteger"] =
typeof Number.isInteger === "function"
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
: (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
export function joinValues<T extends any[]>(array: T, separator = " | "): string {
return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator);
}
export const jsonStringifyReplacer = (_: string, value: any): any => {
if (typeof value === "bigint") {
return value.toString();
}
return value;
};
}
export namespace objectUtil {
export type MergeShapes<U, V> =
// fast path when there is no keys overlap
keyof U & keyof V extends never
? U & V
: {
[k in Exclude<keyof U, keyof V>]: U[k];
} & V;
type optionalKeys<T extends object> = {
[k in keyof T]: undefined extends T[k] ? k : never;
}[keyof T];
type requiredKeys<T extends object> = {
[k in keyof T]: undefined extends T[k] ? never : k;
}[keyof T];
export type addQuestionMarks<T extends object, _O = any> = {
[K in requiredKeys<T>]: T[K];
} & {
[K in optionalKeys<T>]?: T[K];
} & { [k in keyof T]?: unknown };
export type identity<T> = T;
export type flatten<T> = identity<{ [k in keyof T]: T[k] }>;
export type noNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type noNever<T> = identity<{
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export const mergeShapes = <U, T>(first: U, second: T): T & U => {
return {
...first,
...second, // second overwrites first
};
};
export type extendShape<A extends object, B extends object> = keyof A & keyof B extends never // fast path when there is no keys overlap
? A & B
: {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
};
}
export const ZodParsedType: {
string: "string";
nan: "nan";
number: "number";
integer: "integer";
float: "float";
boolean: "boolean";
date: "date";
bigint: "bigint";
symbol: "symbol";
function: "function";
undefined: "undefined";
null: "null";
array: "array";
object: "object";
unknown: "unknown";
promise: "promise";
void: "void";
never: "never";
map: "map";
set: "set";
} = util.arrayToEnum([
"string",
"nan",
"number",
"integer",
"float",
"boolean",
"date",
"bigint",
"symbol",
"function",
"undefined",
"null",
"array",
"object",
"unknown",
"promise",
"void",
"never",
"map",
"set",
]);
export type ZodParsedType = keyof typeof ZodParsedType;
export const getParsedType = (data: any): ZodParsedType => {
const t = typeof data;
switch (t) {
case "undefined":
return ZodParsedType.undefined;
case "string":
return ZodParsedType.string;
case "number":
return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
case "boolean":
return ZodParsedType.boolean;
case "function":
return ZodParsedType.function;
case "bigint":
return ZodParsedType.bigint;
case "symbol":
return ZodParsedType.symbol;
case "object":
if (Array.isArray(data)) {
return ZodParsedType.array;
}
if (data === null) {
return ZodParsedType.null;
}
if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
return ZodParsedType.promise;
}
if (typeof Map !== "undefined" && data instanceof Map) {
return ZodParsedType.map;
}
if (typeof Set !== "undefined" && data instanceof Set) {
return ZodParsedType.set;
}
if (typeof Date !== "undefined" && data instanceof Date) {
return ZodParsedType.date;
}
return ZodParsedType.object;
default:
return ZodParsedType.unknown;
}
};

View File

@@ -0,0 +1,34 @@
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;

View File

@@ -0,0 +1,72 @@
import { Integration, LogSeverityLevel } from '@sentry/core';
type PinoOptions = {
/**
* Automatically instrument all Pino loggers.
*
* When set to `false`, only loggers marked with `pinoIntegration.trackLogger(logger)` will be captured.
*
* @default true
*/
autoInstrument: boolean;
/**
* Options to enable capturing of error events.
*/
error: {
/**
* Levels that trigger capturing of events.
*
* @default []
*/
levels: LogSeverityLevel[];
/**
* By default, Sentry will mark captured errors as handled.
* Set this to `false` if you want to mark them as unhandled instead.
*
* @default true
*/
handled: boolean;
};
/**
* Options to enable capturing of logs.
*/
log: {
/**
* Levels that trigger capturing of logs. Logs are only captured if
* `enableLogs` is enabled.
*
* @default ["trace", "debug", "info", "warn", "error", "fatal"]
*/
levels: LogSeverityLevel[];
};
};
type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? Partial<T[P]> : T[P];
};
interface PinoIntegrationFunction {
(userOptions?: DeepPartial<PinoOptions>): Integration;
/**
* Marks a Pino logger to be tracked by the Pino integration.
*
* @param logger A Pino logger instance.
*/
trackLogger(logger: unknown): void;
/**
* Marks a Pino logger to be ignored by the Pino integration.
*
* @param logger A Pino logger instance.
*/
untrackLogger(logger: unknown): void;
}
/**
* Integration for Pino logging library.
* Captures Pino logs as Sentry logs and optionally captures some log levels as events.
*
* By default, all Pino loggers will be captured. To ignore a specific logger, use `pinoIntegration.untrackLogger(logger)`.
*
* If you disable automatic instrumentation with `autoInstrument: false`, you can mark specific loggers to be tracked with `pinoIntegration.trackLogger(logger)`.
*
* Requires Pino >=v8.0.0 and Node >=20.6.0 or >=18.19.0
*/
export declare const pinoIntegration: PinoIntegrationFunction;
export {};
//# sourceMappingURL=pino.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"globalError.js","sources":["../../../src/instrument/globalError.ts"],"sourcesContent":["import type { HandlerDataError } from '../types-hoist/instrument';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnErrorHandler: (typeof GLOBAL_OBJ)['onerror'] | null = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalErrorInstrumentationHandler(handler: (data: HandlerDataError) => void): void {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError(): void {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n GLOBAL_OBJ.onerror = function (\n msg: string | object,\n url?: string,\n line?: number,\n column?: number,\n error?: Error,\n ): boolean {\n const handlerData: HandlerDataError = {\n column,\n error,\n line,\n msg,\n url,\n };\n triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n"],"names":["addHandler","maybeInstrument","GLOBAL_OBJ","triggerHandlers"],"mappings":";;;;;AAIA,IAAI,kBAAkB,GAA0C,IAAI;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oCAAoC,CAAC,OAAO,EAA0C;AACtG,EAAE,MAAM,IAAA,GAAO,OAAO;AACtB,EAAEA,mBAAU,CAAC,IAAI,EAAE,OAAO,CAAC;AAC3B,EAAEC,wBAAe,CAAC,IAAI,EAAE,eAAe,CAAC;AACxC;;AAEA,SAAS,eAAe,GAAS;AACjC,EAAE,kBAAA,GAAqBC,oBAAU,CAAC,OAAO;;AAEzC;AACA;AACA,EAAEA,oBAAU,CAAC,OAAA,GAAU;AACvB,IAAI,GAAG;AACP,IAAI,GAAG;AACP,IAAI,IAAI;AACR,IAAI,MAAM;AACV,IAAI,KAAK;AACT,IAAa;AACb,IAAI,MAAM,WAAW,GAAqB;AAC1C,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,MAAM,IAAI;AACV,MAAM,GAAG;AACT,MAAM,GAAG;AACT,KAAK;AACL,IAAIC,wBAAe,CAAC,OAAO,EAAE,WAAW,CAAC;;AAEzC,IAAI,IAAI,kBAAkB,EAAE;AAC5B;AACA,MAAM,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC;AACtD,IAAI;;AAEJ,IAAI,OAAO,KAAK;AAChB,EAAE,CAAC;;AAEH,EAAED,oBAAU,CAAC,OAAO,CAAC,uBAAA,GAA0B,IAAI;AACnD;;;;"}

View File

@@ -0,0 +1,44 @@
{
"name": "range-parser",
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
"description": "Range header field string parser",
"version": "1.2.1",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"James Wyatt Cready <wyatt.cready@lanetix.com>",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"license": "MIT",
"keywords": [
"range",
"parser",
"http"
],
"repository": "jshttp/range-parser",
"devDependencies": {
"deep-equal": "1.0.1",
"eslint": "5.16.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-markdown": "1.0.0",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-node": "8.0.1",
"eslint-plugin-promise": "4.1.1",
"eslint-plugin-standard": "4.0.0",
"mocha": "6.1.4",
"nyc": "14.1.1"
},
"files": [
"HISTORY.md",
"LICENSE",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"test-travis": "nyc --reporter=text npm test"
}
}

View File

@@ -0,0 +1,10 @@
"use strict";
exports.__esModule = true;
exports.forceReflow = void 0;
var forceReflow = function forceReflow(node) {
return node.scrollTop;
};
exports.forceReflow = forceReflow;

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseDocumentSize = exports.parseBounds = exports.Bounds = void 0;
var Bounds = /** @class */ (function () {
function Bounds(left, top, width, height) {
this.left = left;
this.top = top;
this.width = width;
this.height = height;
}
Bounds.prototype.add = function (x, y, w, h) {
return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h);
};
Bounds.fromClientRect = function (context, clientRect) {
return new Bounds(clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, clientRect.height);
};
Bounds.fromDOMRectList = function (context, domRectList) {
var domRect = Array.from(domRectList).find(function (rect) { return rect.width !== 0; });
return domRect
? new Bounds(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height)
: Bounds.EMPTY;
};
Bounds.EMPTY = new Bounds(0, 0, 0, 0);
return Bounds;
}());
exports.Bounds = Bounds;
var parseBounds = function (context, node) {
return Bounds.fromClientRect(context, node.getBoundingClientRect());
};
exports.parseBounds = parseBounds;
var parseDocumentSize = function (document) {
var body = document.body;
var documentElement = document.documentElement;
if (!body || !documentElement) {
throw new Error("Unable to get document size");
}
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));
return new Bounds(0, 0, width, height);
};
exports.parseDocumentSize = parseDocumentSize;
//# sourceMappingURL=bounds.js.map

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'지난' eeee p",
yesterday: "'어제' p",
today: "'오늘' p",
tomorrow: "'내일' p",
nextWeek: "'다음' eeee p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

@@ -0,0 +1 @@
{"version":3,"file":"resetPassword.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/resetPassword.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA0B,MAAM,mCAAmC,CAAA;AAC3F,OAAO,KAAK,EAAE,kBAAkB,EAAa,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAe1D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAU,KAAK,SAAS,kBAAkB,QACrE,SAAS,KACd,OAAO,CAAC,MAAM,CA4NhB,CAAA"}

View File

@@ -0,0 +1,115 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Pill, useConfig, useLocale, useTranslation } from '@payloadcms/ui';
import { formatDate } from '@payloadcms/ui/shared';
import React from 'react';
import { getVersionLabel } from './getVersionLabel.js';
const baseClass = 'version-pill-label';
const renderPill = (label, pillStyle) => {
return /*#__PURE__*/_jsx(Pill, {
pillStyle: pillStyle,
size: "small",
children: label
});
};
export const VersionPillLabel = t0 => {
const $ = _c(14);
const {
currentlyPublishedVersion,
disableDate: t1,
doc,
labelFirst: t2,
labelOverride,
labelStyle: t3,
labelSuffix,
latestDraftVersion
} = t0;
const disableDate = t1 === undefined ? false : t1;
const labelFirst = t2 === undefined ? false : t2;
const labelStyle = t3 === undefined ? "pill" : t3;
const {
config: t4
} = useConfig();
const {
admin: t5,
localization
} = t4;
const {
dateFormat
} = t5;
const {
i18n,
t
} = useTranslation();
const {
code: currentLocale
} = useLocale();
let t6;
if ($[0] !== currentLocale || $[1] !== currentlyPublishedVersion || $[2] !== dateFormat || $[3] !== disableDate || $[4] !== doc || $[5] !== i18n || $[6] !== labelFirst || $[7] !== labelOverride || $[8] !== labelStyle || $[9] !== labelSuffix || $[10] !== latestDraftVersion || $[11] !== localization || $[12] !== t) {
const {
label,
pillStyle
} = getVersionLabel({
currentLocale,
currentlyPublishedVersion,
latestDraftVersion,
t,
version: doc
});
const labelText = _jsxs("span", {
children: [labelOverride || label, labelSuffix]
});
const showDate = !disableDate && doc.updatedAt;
const formattedDate = showDate ? formatDate({
date: doc.updatedAt,
i18n,
pattern: dateFormat
}) : null;
const localeCode = Array.isArray(doc.publishedLocale) ? doc.publishedLocale[0] : doc.publishedLocale;
const locale = localization && localization?.locales ? localization.locales.find(loc => loc.code === localeCode) : null;
const localeLabel = locale ? locale?.label?.[i18n?.language] || locale?.label : null;
t6 = _jsxs("div", {
className: baseClass,
children: [labelFirst ? _jsxs(React.Fragment, {
children: [labelStyle === "pill" ? renderPill(labelText, pillStyle) : _jsx("span", {
className: `${baseClass}-text`,
children: labelText
}), showDate && _jsx("span", {
className: `${baseClass}-date`,
children: formattedDate
})]
}) : _jsxs(React.Fragment, {
children: [showDate && _jsx("span", {
className: `${baseClass}-date`,
children: formattedDate
}), labelStyle === "pill" ? renderPill(labelText, pillStyle) : _jsx("span", {
className: `${baseClass}-text`,
children: labelText
})]
}), localeLabel && _jsx(Pill, {
size: "small",
children: localeLabel
})]
});
$[0] = currentLocale;
$[1] = currentlyPublishedVersion;
$[2] = dateFormat;
$[3] = disableDate;
$[4] = doc;
$[5] = i18n;
$[6] = labelFirst;
$[7] = labelOverride;
$[8] = labelStyle;
$[9] = labelSuffix;
$[10] = latestDraftVersion;
$[11] = localization;
$[12] = t;
$[13] = t6;
} else {
t6 = $[13];
}
return t6;
};
//# sourceMappingURL=VersionPillLabel.js.map

View File

@@ -0,0 +1,194 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
enum testEnum {
A = 0,
B = 1,
}
const schemas = [
z.string().readonly(),
z.number().readonly(),
z.nan().readonly(),
z.bigint().readonly(),
z.boolean().readonly(),
z.date().readonly(),
z.undefined().readonly(),
z.null().readonly(),
z.any().readonly(),
z.unknown().readonly(),
z.void().readonly(),
z.function().args(z.string(), z.number()).readonly(),
z.array(z.string()).readonly(),
z.tuple([z.string(), z.number()]).readonly(),
z.map(z.string(), z.date()).readonly(),
z.set(z.promise(z.string())).readonly(),
z.record(z.string()).readonly(),
z.record(z.string(), z.number()).readonly(),
z.object({ a: z.string(), 1: z.number() }).readonly(),
z.nativeEnum(testEnum).readonly(),
z.promise(z.string()).readonly(),
] as const;
test("flat inference", () => {
util.assertEqual<z.infer<(typeof schemas)[0]>, string>(true);
util.assertEqual<z.infer<(typeof schemas)[1]>, number>(true);
util.assertEqual<z.infer<(typeof schemas)[2]>, number>(true);
util.assertEqual<z.infer<(typeof schemas)[3]>, bigint>(true);
util.assertEqual<z.infer<(typeof schemas)[4]>, boolean>(true);
util.assertEqual<z.infer<(typeof schemas)[5]>, Date>(true);
util.assertEqual<z.infer<(typeof schemas)[6]>, undefined>(true);
util.assertEqual<z.infer<(typeof schemas)[7]>, null>(true);
util.assertEqual<z.infer<(typeof schemas)[8]>, any>(true);
util.assertEqual<z.infer<(typeof schemas)[9]>, Readonly<unknown>>(true);
util.assertEqual<z.infer<(typeof schemas)[10]>, void>(true);
util.assertEqual<z.infer<(typeof schemas)[11]>, (args_0: string, args_1: number, ...args_2: unknown[]) => unknown>(
true
);
util.assertEqual<z.infer<(typeof schemas)[12]>, readonly string[]>(true);
util.assertEqual<z.infer<(typeof schemas)[13]>, readonly [string, number]>(true);
util.assertEqual<z.infer<(typeof schemas)[14]>, ReadonlyMap<string, Date>>(true);
util.assertEqual<z.infer<(typeof schemas)[15]>, ReadonlySet<Promise<string>>>(true);
util.assertEqual<z.infer<(typeof schemas)[16]>, Readonly<Record<string, string>>>(true);
util.assertEqual<z.infer<(typeof schemas)[17]>, Readonly<Record<string, number>>>(true);
util.assertEqual<z.infer<(typeof schemas)[18]>, { readonly a: string; readonly 1: number }>(true);
util.assertEqual<z.infer<(typeof schemas)[19]>, Readonly<testEnum>>(true);
util.assertEqual<z.infer<(typeof schemas)[20]>, Promise<string>>(true);
});
// test("deep inference", () => {
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[0]>, string>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[1]>, number>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[2]>, number>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[3]>, bigint>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[4]>, boolean>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[5]>, Date>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[6]>, undefined>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[7]>, null>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[8]>, any>(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[9]>,
// Readonly<unknown>
// >(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[10]>, void>(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[11]>,
// (args_0: string, args_1: number, ...args_2: unknown[]) => unknown
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[12]>,
// readonly string[]
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[13]>,
// readonly [string, number]
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[14]>,
// ReadonlyMap<string, Date>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[15]>,
// ReadonlySet<Promise<string>>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[16]>,
// Readonly<Record<string, string>>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[17]>,
// Readonly<Record<string, number>>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[18]>,
// { readonly a: string; readonly 1: number }
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[19]>,
// Readonly<testEnum>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[20]>,
// Promise<string>
// >(true);
// util.assertEqual<
// z.infer<typeof crazyDeepReadonlySchema>,
// ReadonlyMap<
// ReadonlySet<readonly [string, number]>,
// {
// readonly a: {
// readonly [x: string]: readonly any[];
// };
// readonly b: {
// readonly c: {
// readonly d: {
// readonly e: {
// readonly f: {
// readonly g?: {};
// };
// };
// };
// };
// };
// }
// >
// >(true);
// });
test("object freezing", () => {
expect(Object.isFrozen(z.array(z.string()).readonly().parse(["a"]))).toBe(true);
expect(Object.isFrozen(z.tuple([z.string(), z.number()]).readonly().parse(["a", 1]))).toBe(true);
expect(
Object.isFrozen(
z
.map(z.string(), z.date())
.readonly()
.parse(new Map([["a", new Date()]]))
)
).toBe(true);
expect(
Object.isFrozen(
z
.set(z.promise(z.string()))
.readonly()
.parse(new Set([Promise.resolve("a")]))
)
).toBe(true);
expect(Object.isFrozen(z.record(z.string()).readonly().parse({ a: "b" }))).toBe(true);
expect(Object.isFrozen(z.record(z.string(), z.number()).readonly().parse({ a: 1 }))).toBe(true);
expect(Object.isFrozen(z.object({ a: z.string(), 1: z.number() }).readonly().parse({ a: "b", 1: 2 }))).toBe(true);
expect(Object.isFrozen(z.promise(z.string()).readonly().parse(Promise.resolve("a")))).toBe(true);
});
test("async object freezing", async () => {
expect(Object.isFrozen(await z.array(z.string()).readonly().parseAsync(["a"]))).toBe(true);
expect(Object.isFrozen(await z.tuple([z.string(), z.number()]).readonly().parseAsync(["a", 1]))).toBe(true);
expect(
Object.isFrozen(
await z
.map(z.string(), z.date())
.readonly()
.parseAsync(new Map([["a", new Date()]]))
)
).toBe(true);
expect(
Object.isFrozen(
await z
.set(z.promise(z.string()))
.readonly()
.parseAsync(new Set([Promise.resolve("a")]))
)
).toBe(true);
expect(Object.isFrozen(await z.record(z.string()).readonly().parseAsync({ a: "b" }))).toBe(true);
expect(Object.isFrozen(await z.record(z.string(), z.number()).readonly().parseAsync({ a: 1 }))).toBe(true);
expect(
Object.isFrozen(await z.object({ a: z.string(), 1: z.number() }).readonly().parseAsync({ a: "b", 1: 2 }))
).toBe(true);
expect(Object.isFrozen(await z.promise(z.string()).readonly().parseAsync(Promise.resolve("a")))).toBe(true);
});

View File

@@ -0,0 +1,139 @@
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import { useRef, useState, useEffect, useCallback } from 'react';
import { L as handleInputChange } from './index-641ee5b8.esm.js';
var _excluded = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
function useAsync(_ref) {
var _ref$defaultOptions = _ref.defaultOptions,
propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,
_ref$cacheOptions = _ref.cacheOptions,
cacheOptions = _ref$cacheOptions === void 0 ? false : _ref$cacheOptions,
propsLoadOptions = _ref.loadOptions;
_ref.options;
var _ref$isLoading = _ref.isLoading,
propsIsLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
propsOnInputChange = _ref.onInputChange,
_ref$filterOption = _ref.filterOption,
filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,
restSelectProps = _objectWithoutProperties(_ref, _excluded);
var propsInputValue = restSelectProps.inputValue;
var lastRequest = useRef(undefined);
var mounted = useRef(false);
var _useState = useState(Array.isArray(propsDefaultOptions) ? propsDefaultOptions : undefined),
_useState2 = _slicedToArray(_useState, 2),
defaultOptions = _useState2[0],
setDefaultOptions = _useState2[1];
var _useState3 = useState(typeof propsInputValue !== 'undefined' ? propsInputValue : ''),
_useState4 = _slicedToArray(_useState3, 2),
stateInputValue = _useState4[0],
setStateInputValue = _useState4[1];
var _useState5 = useState(propsDefaultOptions === true),
_useState6 = _slicedToArray(_useState5, 2),
isLoading = _useState6[0],
setIsLoading = _useState6[1];
var _useState7 = useState(undefined),
_useState8 = _slicedToArray(_useState7, 2),
loadedInputValue = _useState8[0],
setLoadedInputValue = _useState8[1];
var _useState9 = useState([]),
_useState10 = _slicedToArray(_useState9, 2),
loadedOptions = _useState10[0],
setLoadedOptions = _useState10[1];
var _useState11 = useState(false),
_useState12 = _slicedToArray(_useState11, 2),
passEmptyOptions = _useState12[0],
setPassEmptyOptions = _useState12[1];
var _useState13 = useState({}),
_useState14 = _slicedToArray(_useState13, 2),
optionsCache = _useState14[0],
setOptionsCache = _useState14[1];
var _useState15 = useState(undefined),
_useState16 = _slicedToArray(_useState15, 2),
prevDefaultOptions = _useState16[0],
setPrevDefaultOptions = _useState16[1];
var _useState17 = useState(undefined),
_useState18 = _slicedToArray(_useState17, 2),
prevCacheOptions = _useState18[0],
setPrevCacheOptions = _useState18[1];
if (cacheOptions !== prevCacheOptions) {
setOptionsCache({});
setPrevCacheOptions(cacheOptions);
}
if (propsDefaultOptions !== prevDefaultOptions) {
setDefaultOptions(Array.isArray(propsDefaultOptions) ? propsDefaultOptions : undefined);
setPrevDefaultOptions(propsDefaultOptions);
}
useEffect(function () {
mounted.current = true;
return function () {
mounted.current = false;
};
}, []);
var loadOptions = useCallback(function (inputValue, callback) {
if (!propsLoadOptions) return callback();
var loader = propsLoadOptions(inputValue, callback);
if (loader && typeof loader.then === 'function') {
loader.then(callback, function () {
return callback();
});
}
}, [propsLoadOptions]);
useEffect(function () {
if (propsDefaultOptions === true) {
loadOptions(stateInputValue, function (options) {
if (!mounted.current) return;
setDefaultOptions(options || []);
setIsLoading(!!lastRequest.current);
});
}
// NOTE: this effect is designed to only run when the component mounts,
// so we don't want to include any hook dependencies
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
var onInputChange = useCallback(function (newValue, actionMeta) {
var inputValue = handleInputChange(newValue, actionMeta, propsOnInputChange);
if (!inputValue) {
lastRequest.current = undefined;
setStateInputValue('');
setLoadedInputValue('');
setLoadedOptions([]);
setIsLoading(false);
setPassEmptyOptions(false);
return;
}
if (cacheOptions && optionsCache[inputValue]) {
setStateInputValue(inputValue);
setLoadedInputValue(inputValue);
setLoadedOptions(optionsCache[inputValue]);
setIsLoading(false);
setPassEmptyOptions(false);
} else {
var request = lastRequest.current = {};
setStateInputValue(inputValue);
setIsLoading(true);
setPassEmptyOptions(!loadedInputValue);
loadOptions(inputValue, function (options) {
if (!mounted) return;
if (request !== lastRequest.current) return;
lastRequest.current = undefined;
setIsLoading(false);
setLoadedInputValue(inputValue);
setLoadedOptions(options || []);
setPassEmptyOptions(false);
setOptionsCache(options ? _objectSpread(_objectSpread({}, optionsCache), {}, _defineProperty({}, inputValue, options)) : optionsCache);
});
}
}, [cacheOptions, loadOptions, loadedInputValue, optionsCache, propsOnInputChange]);
var options = passEmptyOptions ? [] : stateInputValue && loadedInputValue ? loadedOptions : defaultOptions || [];
return _objectSpread(_objectSpread({}, restSelectProps), {}, {
options: options,
isLoading: isLoading || propsIsLoading,
onInputChange: onInputChange,
filterOption: filterOption
});
}
export { useAsync as u };

View File

@@ -0,0 +1,85 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.tabs-field__tab-button {
@extend %btn-reset;
@extend %h4;
display: flex;
padding-bottom: base(1);
margin: 0;
margin-inline-end: $baseline;
cursor: pointer;
opacity: 0.5;
position: relative;
white-space: nowrap;
flex-shrink: 0;
gap: base(0.5);
&:last-child {
margin: 0;
}
&:after {
content: ' ';
position: absolute;
right: 0;
bottom: -1px;
left: 0;
height: 1px;
background: var(--theme-elevation-800);
opacity: 0;
}
&:hover {
opacity: 0.75;
&:after {
opacity: 0.2;
}
}
&--hidden {
display: none;
}
&--active {
opacity: 1 !important;
&:after {
opacity: 1 !important;
height: 2px;
}
}
&__description {
margin-bottom: calc(var(--base) / 2);
}
@include small-break {
margin: 0 base(0.75) 0 0;
padding-bottom: base(0.5);
&:last-child {
margin: 0;
}
}
}
html[data-theme='light'] {
.tabs-field__tab-button--has-error {
color: var(--theme-error-750);
&:after {
background: var(--theme-error-500);
}
}
}
html[data-theme='dark'] {
.tabs-field__tab-button--has-error {
color: var(--theme-error-500);
&:after {
background: var(--theme-error-500);
}
}
}
}

View File

@@ -0,0 +1,22 @@
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
module.exports = isUndefined;

View File

@@ -0,0 +1,15 @@
export {
CacheProvider,
ClassNames,
Global,
ThemeContext,
ThemeProvider,
__unsafe_useEmotionCache,
createElement,
css,
jsx,
keyframes,
useTheme,
withEmotionCache,
withTheme
} from "./emotion-react.development.cjs.js";

View File

@@ -0,0 +1,32 @@
/**
* @name endOfTomorrow
* @category Day Helpers
* @summary Return the end of tomorrow.
* @pure false
*
* @description
* Return the end of tomorrow.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @returns The end of tomorrow
*
* @example
* // If today is 6 October 2014:
* const result = endOfTomorrow()
* //=> Tue Oct 7 2014 23:59:59.999
*/
export function endOfTomorrow() {
const now = new Date();
const year = now.getFullYear();
const month = now.getMonth();
const day = now.getDate();
const date = new Date(0);
date.setFullYear(year, month, day + 1);
date.setHours(23, 59, 59, 999);
return date;
}
// Fallback for modularized imports:
export default endOfTomorrow;

Some files were not shown because too many files have changed in this diff Show More